[antlr-interest] controlling tree sequence in a parser
Bryan Ewbank
ewbank at gmail.com
Thu Apr 13 11:37:36 PDT 2006
Since you cannot have a list of nodes as a root, the question you ask
has the answer "you can't do that".
What, exactly, are you trying to do? Simply discard the "from" and
preserve the tree constructed below? If so, the syntax to discard the
"from" and keep the rest is this:
select_expression
:
"select" select_list
"into" variable_list
"from"! table_reference_list
Again, this is a guess based on what I think you might be asking. To
give a better answer requires a better understanding of what you
need...
On 4/13/06, Michiel Vermandel <Michiel_Vermandel at axi.be> wrote:
>
> Hi,
>
> I want to move up a complete subrule in my AST tree.
> I try to use the '^' character, but seems to be illegal to use on anything
> else but a single token.
> Thus this is rejected:
>
> select_expression
> :
> "select" select_list
> "into" variable_list
> "from" table_reference_list^ // <-- not accepted
> ;
>
>
> Any Idea how I can get the result of the subrule " table_reference_list" to
> the top of the AST tree?
>
> Thanks!
>
> Michiel
More information about the antlr-interest
mailing list