[antlr-interest] adding actions to rules breaks stuff

Benjamin Shropshire shro8822 at vandals.uidaho.edu
Mon Feb 11 14:12:57 PST 2008


I have a grammar that Antlr will process. However when I try to add actions

example:
///////
document [Object o]
    : i+=import* c+=thing* EOF {o=new Doc(i,o);}
    ;

import [Object s]
    : 'import' s_=Text eol_ {s=s_;}
    ;
//////
it says this:

    missing parameter(s) on rule reference: import

When I add an action to the top most rule it works, but when I add an 
action to any rule that is used by anyone else, I get that error message.
I'm assuming I'm doing something wrong but I can't find anything in the 
docs that is useful. A (well documented) example or a pointer into the 
documentation would be appreciated. Also, how could I have found the 
info my self would be of even more help.

Benjamin Shropshire


More information about the antlr-interest mailing list