[antlr-interest] unexpected token: FUNCTIONCALL

Robert Colquhoun rjc at trump.net.au
Fri May 28 03:57:19 PDT 2004


At 08:03 PM 28/05/2004, Anthony Youngman wrote:
>antlr.Tool is blowing up with this in my treeparser ...
>
>.....
>         : idnt:IDENT {int junk = st.FindSymbol( 2, idnt.getText());} (
>arglist { ## = #(#[FUNCTIONCALL,"function-call"], ##); } )? ;
>
>and the treeparser is
>.....
>
>functionorident
>         : (idnt:IDENT) {st.write("PUSHV "+idnt.getText());}
>         | #(FUNCTIONCALL)
>         ;

I think you need either:

         | #(FUNCTIONCALL IDENT)
or
         | FUNCTIONCALL

You can't have a tree of only one node.

  - Robert



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
     antlr-interest-unsubscribe at yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/
 



More information about the antlr-interest mailing list