An end of statement in our language is the end of the line. Strings can be surrounded by double quotes, single quotes, or backslash. The backslash can also have another meeting as a different symbol. So I want a STRINGLITERAL when there are two backslashes on the same line, with everything in between as part of the string, or I want a separate token just for the backslash. In my lexer, its starting down the stringliteral path, and then throwing an error that it cant match the last token. Any suggestions?
BACKSLASH : '\\'; STRINGLITERAL : ('"' (~('"' | '\n' | '\r'))* '"') | ('\'' (~('\'' | '\n' | '\r'))* '\'') | ('\\' (~('\\' | '\n' | '\r'))* '\\') ; ________________________________ Disclaimer: This message is intended only for the personal and confidential use of the designated recipient(s) named above. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. In addition, if you have received this message in error, please advise the sender by reply e-mail and delete the message. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to il-antlr-interest@googlegroups.com To unsubscribe from this group, send email to il-antlr-interest+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en -~----------~----~----~----~------~----~------~--~---
List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address