Open azrdev opened 6 years ago
test.g4:
test.g4
grammar test; test @after{ print( $stop.text); } : 'foo' 'bar' { print( $start.text ); } 'baz' ;
What happens?
$ antlr4 -o /tmp/antlr/gen -Dlanguage=Cpp test.g4 error(33): missing code generation template ThisRulePropertyRef_startHeader error(33): missing code generation template ThisRulePropertyRef_stopHeader
Versions:
$ antlr4 ANTLR Parser Generator Version 4.7.1 [...] $ java -version openjdk version "1.8.0_144" OpenJDK Runtime Environment (build 1.8.0_144-b01) OpenJDK 64-Bit Server VM (build 25.144-b01, mixed mode)
I get no error and the generated Parser.cpp looks fine when using instead $ctx.start.text etc.
$ctx.start.text
test.g4
:What happens?
Versions: