[antlr-interest] Comment rule matches links
mail at martin-probst.com
Tue Aug 26 01:58:22 PDT 2008
> If you don't need the regular expression structure you can just match
> them as a single token. If you do need structure you could either just
> use a seperate grammar in a later phase to process the single tokens
> in your main token stream or use the technique from the island-grammar
> example, which shows island grammars under lexer control,
Island grammars under lexer control will probably not cut it, as the
'/' token is ambiguous in many languages, e.g.
"int x = 5 / 3;" vs "match(/3/, ...);". The grammar/lexer switching
has to be done in the parser.
More information about the antlr-interest