[antlr-interest] Errors while compiling
mzukowski at yci.com
mzukowski at yci.com
Fri Oct 18 07:48:02 PDT 2002
You need to define an imaginary node before you can use it. Put
SELECT_EXPRESSION into your 'tokens' section.
Monty
> -----Original Message-----
> From: Benhur [mailto:krupa_gadde at yahoo.com]
> Sent: Friday, October 18, 2002 1:12 AM
> To: antlr-interest at yahoogroups.com
> Subject: [antlr-interest] Errors while compiling
>
>
> Hi all,
>
> Here is a sub-rule I have defined as part of my grammar where
> MyParser extends Parser class.
>
> select_expression:
> selectexp:"select"^ ( "all"! | "distinct"! )? select_list
> ("into" column_name)?
> table_reference_list_from
> (where_condition_whole)?
> ( connect_clause )?
> ( group_clause )?
> ( ( set_clause ) => set_clause )?
> ( ( order_clause ) => order_clause )?
> ( ( update_clause ) => update_clause )?
> { #select_expression = #
> ([SELECT_EXPRESSION,"select_expression"], #select_expression); }
> ;
>
> While I compile this grammar using the antlr.Tool option, Parser,
> Lexer and TokenTypes Java programs are generated. While I am
> compiling these three Java programs, I am getting the followinr
> error -
>
> PLSqlParser.java:11247: cannot resolve symbol
> symbol : variable SELECT_EXPRESSION
> location: class MyParser.PLSqlParser
> select_expression_AST = (AST)
> astFactory.make( (new ASTArray(
> 2)).add((AST)astFactory.create
> (SELECT_EXPRESSION,"select_expression")).add(select_expression_AST));
>
> ^
> 1 error
>
> Why is this happening? This is the only sub-rule where I am trying
> to create an imaginary node. Any pointers for this, please let me
> know.
>
> Thanks in advance
> Benhur
>
>
>
>
>
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list