At 17:18 29/04/2009, Simon, Peter wrote: >you can specify the special characters in your >lexer rules as Unicode. >For example: '\u00dc' for ‘Ü‘ >It’s also possible to define ranges like: '\u00a0'..'\u00ff'
Also, if you specify the following as your last lexer rule: OTHER : . ; then you will get an OTHER token instead of a lexer error on encountering an unexpected character. This usually will in turn mean that you'll be able to provide better error messages (since the parser or tree parser will have better information about the context). List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en -~----------~----~----~----~------~----~------~--~---
