[antlr-interest] A bug at C# DLLs?
Gavin Lambert
antlr at mirality.co.nz
Tue Nov 18 01:48:28 PST 2008
At 09:08 18/11/2008, Rodrigo C. L. wrote:
>compilation : specification EOF! ;
>specification : ( definition )* -> ^( SPECIFICATION definition*
);
>definition : module ';' ;
>module : 'module' ID '{' specification '}' -> ^(MODULE ID
>specification) ;
[...]
>Antlr.Runtime.Tree.RewriteEmptyStreamException{"token ID"},
>
>which is odd, because ID should be 'etal'.
>
>I changed the rule module using operators and got
>NullReferenceException, for the same reason.
I'm not sure why the error message mentions ID, but I suspect the
problem is actually with the 'definition' rule. It's the only
rule in the group that doesn't contain any tree construction at
all (neither rewrite expressions nor tree operators).
I've never been entirely sure what ANTLR does with rules that
don't define tree construction, but I seem to recall it causing
problems at some point. So try:
definition : module ';'! ;
More information about the antlr-interest
mailing list