Skip to content

[Bug] Bison file prefixes for C/C++ not generating correctly #172

Description

@dcavar

When generating C or C++ and using prefixes, the generated Bison-file is missing the prefixes in the error function. Example (take any well-formed and otherwise working Test.cf):

bnfc -m --cpp -p test Test.cf

the generated Test.y will have missing prefixes in the error function:

void testyyerror(const char *str)
{
  extern char *testyytext;
  fprintf(stderr,"error: line %d: %s at %s\n", 
    yy_mylinenumber, str, yytext);
}

but it should prepend the prefixes on all the variable references in that function:

void testyyerror(const char *str)
{
  extern char *testyytext;
  fprintf(stderr,"error: line %d: %s at %s\n", 
    testyy_mylinenumber, str, testyytext);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions