Hi, As I understood, I can use syntactic predicates to deal with non-regular structures. Unfortunately, I don't get it right. Here is an excerpt of my grammar (without syntactic predicates):
type : moldType | setType ; moldType : 'Mold' '<' Identifier '>' ; setType : 'Set' '<' Identifier '>' | 'Set' '<' pairType '>' ; pairType : 'Pair' '<' ( Identifier | pairType ) ',' ( Identifier | pairType ) '>' ; In my grammar, type is used as part of variable / method declarations. So, type declarations can be: Mold<X>, Set<X>, Set<Pair<X,X>>, Set<Pair<X,Pair<X,X>>>, ... I get an "non-LL(*) decision error" reported. I assume the problem is due to the recursion in pairType. How can I fix this grammar? Thanks a lot for your help! Stephanie List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en.
