ANTLR3 C Target - parser return 'misses' out root element
问题 I'm trying to use the ANTLR3 C Target to make sense of an AST, but am running into some difficulties. I have a simple SQL-like grammar file: grammar sql; options { language = C; output=AST; ASTLabelType=pANTLR3_BASE_TREE; } sql : VERB fields; fields : FIELD (',' FIELD)*; VERB : 'SELECT' | 'UPDATE' | 'INSERT'; FIELD : CHAR+; fragment CHAR : 'a'..'z'; and this works as expected within ANTLRWorks. In my C code I have: const char pInput[] = "SELECT one,two,three"; pANTLR3_INPUT_STREAM pNewStrm =