[antlr-interest] errors reported in console
antlr at mirality.co.nz
Tue Mar 17 11:37:55 PDT 2009
At 01:05 18/03/2009, Java Developer wrote:
>Could you refer me to a link explaining fragment rules versus
>top-level rules (I find the Wiki pages confusing)? A keyword
>search on google did not help.
To turn a non-fragment lexer rule into a fragment rule, you just
put the word "fragment" in front of it. This means that it's no
longer considered a possible candidate to be selected as a full
token -- it has to be referenced from other lexer rules in order
to have any effect. (It is still allocated a token id, though,
which is useful for more advanced problems.)
Have a look at the example v3 grammars. You might also want to
get TDAR (the ANTLR book).
More information about the antlr-interest