How can I express syntax rules like "[0-9/.:*+!_'?-] are valid symbol constituent, but not as the first char"?

Or "/ is a valid symbol constituent, but can only appear once and in the middle of a symbol".

  • I'm afraid that that's not possible with syntax tables, they are just simple classifiers. You'd probably want to take a look at Semantic
    – wvxvw
    Commented Nov 26, 2015 at 14:52
  • 3
    I am no expert, however syntax-propertize-function can express these more complicated rules like you describe. You can provide regular expressions (which should be able to describe such conditional behavior) via syntax-propertize-rules clauses.
    – InHarmsWay
    Commented Nov 26, 2015 at 15:03


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.