Antrl3 conditional tree rewrites
问题 Stackoverflow. Continuing on my journey into Antlr (Previous questions may provide additional clues on what I'm trying to achieve! Q1 - How do I make a tree parser and Q2 - Solving LL recursion problem) I've hit yet another roadblock I cannot flathom. Basically (I believe) the expression rule in my grammar needs to either create a new root node depending on the number of datatype s it has matched. I have put together an example to try best describe what I mean: Given the following input: