[antlr-interest] ANTLRWorks hiccup?
Jean Bovet
antlr-list at arizona-software.ch
Thu Dec 15 17:01:38 PST 2005
No, you are not blind... it is just that ANTLRWorks is doesn't fully
handle pure lexer/parser/tree grammar (removing the lexer transform
the grammar to a "combined" grammar that is currently correctly
handled by ANTLRWorks). Note that ANTLRWorks will also report some
syntax errors if you are using some rewrite or tree syntax (which
doesn't prevent all the other features to work well - it's only
esthetic).
Most of these issues will be fixed in the next release (I will
working more on pure lexer/parser grammar in the following weeks).
Thanks for reporting the problem.
Jean Bovet
Le 15 déc. 05 à 16:50, Kay Roepke a écrit :
> Excuse if I'm being stupid, too tired, or just plain blind, but
> shouldn't this be a valid lexer grammar:
>
> ------
> lexer grammar Lexer;
>
> START : ID WS+ ID
> ;
>
> ID : ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'0'..'9'|'_')*
> ;
>
> WS : (' ' | '\t' | '\n' | '\r')
> ;
>
>
> -----
>
> ANTLRWorks keeps telling me that it can't show the DFA/NFA diagram
> for the rules, because there's no start rule to be found.
> This is certainly not the case, and ANTLR happily produces a lexer
> for me.
> Manually deleting the "lexer" part from the first line and then
> typing it again fixes the issue?!?
>
> The generated source (by ANTLR) seems to be ok to me...
>
> puzzled,
>
> Kay
More information about the antlr-interest
mailing list