Nothing Special   »   [go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
dcavar opened this issue Mar 4, 2016 · 3 comments
Closed

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

dcavar opened this issue Mar 4, 2016 · 3 comments

Comments

@dcavar
Copy link
dcavar commented Mar 4, 2016

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);
}

@pascalh
Copy link
Contributor
pascalh commented Mar 8, 2016

I applied the suggested changes to the C++-backend in my branch. Please confirm that my changes solve the issue.

@dcavar
Copy link
Author
dcavar commented Mar 8, 2016

Dear Pascal,

As far as I can tell, the Bison-issue is not solved. The previous issues with multi-character comment delimiters seem to be solved, though.

DC

On 03/08/2016 08:20 AM, Pascal Hof wrote:

I applied the suggested changes to the C++-backend in my branch
https://github.com/pascalh/bnfc/tree/issue172. Please confirm that my
changes solve the issue.


Reply to this email directly or view it on GitHub
#172 (comment).

Damir Cavar
https://linguistlist.org/people/damir_cavar.html

@dcavar dcavar changed the title Prefixes not generating correctly .y files [Bug] Bison file prefixes for C/C++ not generating correctly Jun 26, 2016
@gdetrez
Copy link
Contributor
gdetrez commented Aug 23, 2016

I believe that @pascalh's pull request #174 is solving this issue. @dcavar if you have time to test it and there is still a problem, feel free to re-open it.

@gdetrez gdetrez closed this as completed Aug 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants