[antlr-interest] ANTLRWorks hiccup?

Kay Roepke kroepke at dolphin-services.de
Thu Dec 15 16:50:13 PST 2005


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