You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Target: c++
Generating parser code with ANTLR 4.13.0
Expected behavior: does not trigger any error .
Actual behavior: triggers an error(33): missing code generation template SetNonLocalAttrHeader
The DynScope grammar from the doc triggers the error. (from "Actions and Attributes" chapter, exactly as it is in it.)
antlr4 -Dlanguage=Java DynScope.g4 works
antlr4 -Dlanguage=PHP DynScope.g4 works
antlr4 -Dlanguage=JavaScript DynScope.g4 works
antlr4 -Dlanguage=Cpp DynScope.g4 does not work and generate the error(33).
Here is a simplified version of the grammar that triggers the same error:
replacing {$block::myInt += 1;} by {((BlockContext*)$ctx->parent)->myInt +=1 ;} seems to work properly.
The text was updated successfully, but these errors were encountered:
Kameneth
changed the title
Dynamically-Scoped Attributes generate error(33): missing code generation template SetNonLocalAttrHeader in C++ target.
Dynamically-Scoped Attributes generate error(33): missing code generation template SetNonLocalAttrHeader ONLY in C++ target.
Aug 17, 2023
Target: c++
Generating parser code with ANTLR 4.13.0
Expected behavior: does not trigger any error .
Actual behavior: triggers an
error(33): missing code generation template SetNonLocalAttrHeader
The DynScope grammar from the doc triggers the error. (from "Actions and Attributes" chapter, exactly as it is in it.)
antlr4 -Dlanguage=Java DynScope.g4
worksantlr4 -Dlanguage=PHP DynScope.g4
worksantlr4 -Dlanguage=JavaScript DynScope.g4
worksantlr4 -Dlanguage=Cpp DynScope.g4
does not work and generate the error(33).Here is a simplified version of the grammar that triggers the same error:
if i just comment the
{$block::myInt+=1;} ';'
, no errors is triggered.like that:
replacing
{$block::myInt += 1;}
by{((BlockContext*)$ctx->parent)->myInt +=1 ;}
seems to work properly.The text was updated successfully, but these errors were encountered: