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 ';'! ;


List: http://www.antlr.org:8080/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org:8080/mailman/options/antlr-interest/your-email-address


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to