Search code examples
antlrantlr3tree-grammar

node from line 0:0 mismatched tree node: UNIT expecting UNIT


What does this error mean? Notice it expected a UNIT node and got what it was expecting...

Phase_2.g: node from line 0:0 mismatched tree node: UNIT expecting UNIT

Solution

  • Oops! I had forgotten the "tokenVocab" part on Phase_2.g.

    options {
        (...)
        tokenVocab=Phase1;
    }