I've a couple of tokens:
PNAME
and ENAME
- both are strings.
Now I want to setup 2 rules in my lexer, in order to match those tokens.
The first rule (PNAME
) should match when the string consist of characters a-z, and optional special
characters @/().
The second rule (ENAME
) should match when the string consist of characters a-z, and an optional prefix (#/.).
Now how would I make up a rule in my lexer file that only would match ENAME
- Even when theres no prefix?
If it makes any difference, then ENAME
will have a {
after it's string like: (prefix)eName {
- However this bracket shouldn't be passed into the parser...
Any suggestions?