AW: [antlr-interest] problem with TreeParser grammar -> <AST>:0:0:
expecting ), found ', '
Oliver.Kowalke at infineon.com
Oliver.Kowalke at infineon.com
Wed Dec 21 00:01:23 PST 2005
I've tested it with antlr-2.7.4.:
If I parse "otype in ('abc')" it works.
If I try to parse "otype in ('abc','efg')" I get this error:
<AST>:0:0: expecting ), found ','
It seams that the rule
strlist : LPAREN ( STRING COMMA )* STRING RPAREN;
used in
expression : #(IN OTYPE strlist)
in the tree walker doesn't fit. Why? How to fix?
Oliver
>> Hello,
>> I don't know why the tree parser grammar doesn't work if I try to
>> parse
>> " otype in ('abc','efg') ":
>>
>> <AST>: unexpected AST node: 'abc'
>>
>> Could please help me?
>
>That seems weird. Have you printed out the tree to verify you are
>tree parsing what you think you are? Is there a token type mismatch
>somehow?
More information about the antlr-interest
mailing list