[antlr-interest] minor 3.0b4 bug?

Robert Hill rob.hill at blueyonder.co.uk
Sat Oct 7 03:35:16 PDT 2006


service	:  LParen  RParen	;
paramList	: 	;

and 

service	:  LParen  paramList RParen	;
paramList	: 	;

compile ok, but if you add a kleene star to the paramlist

service	:  LParen paramList* RParen ;
paramList
	: 
	;
I get the following error :

ANTLR Parser Generator   Early Access Version 3.0b4 (??, 2006)  1989-2006
D:\ActiveProjects\IdeaProjects\Jtest1\src\SGenParser.g:86:12: Decision can
match input such as "RParen" using multiple alternatives: 1, 2
As a result, alternative(s) 2 were disabled for that input
D:\ActiveProjects\IdeaProjects\Jtest1\src\SGenParser.g:86:12: The following
alternatives are unreachable: 2

Where is Alt 2?

Ok, I know that having an empty rule is a bit daft, but I was half way
through writing it, and the old habit of save/build every 10 seconds is
still alive and kicking.. at least it stops me typing too much guff in and
not knowing where the errors are coming from LOL..

Cheers,
Rob






More information about the antlr-interest mailing list