Hey All, I'm looking for some feedback on a grammar that creates an AST for a simple syntax representing a tree.
Tr.g & TrWalker.g http://pastie.org/1631538 See some examples string and tree string representations below. The question I have is A{B} 1. => (TREE A (NODE B)) better then 2. => (TREE A (TREE (NODE B))) If so any suggestions on to generate version 1. Thanks Gary Some examples A{B C D E} => (TREE A (TREE (NODE B) (NODE C) (NODE D) (NODE E))) A{B { C } D E} => (TREE A (TREE (NODE B) (TREE (NODE C)) (NODE D) (NODE E))) A{B { C D } E} => (TREE A (TREE (NODE B) (TREE (NODE C) (NODE D)) (NODE E))) A{B { C { D } } E} => (TREE A (TREE (NODE B) (TREE (NODE C) (TREE (NODE D))) (NODE E))) A{B { C { D { E } } } } => (TREE A (TREE (NODE B) (TREE (NODE C) (TREE (NODE D) (TREE (NODE E)))))) 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.
