[antlr-interest] Syntax Errors in Tree grammars because of trees multiplicities
Nieves.Salor.Moral at esa.int
Nieves.Salor.Moral at esa.int
Fri Aug 27 01:57:50 PDT 2010
Hello everyone!!
I am currently writing the tree grammar from my parse one, and I have
discovered that I get errors if I use structures like these:
a: ^(A1 b+)
;
b: ^(B1 b ^(ACTION c)*)
;
c: whatever
But, it works if I change the previous tree grammar like this:
a: ^(A1 b+)
;
b: ^(B1 b b_sub*)
;
b_sub: ^(ACTION c)
;
c: whatever
The same happens each time that I use a modifier of multiplicity (?,*,+)
for a whole parse tree. Why is it not allowed? How can I solve this?
Thanks in advance
Nieves
More information about the antlr-interest
mailing list