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

C++: define does not work with token categories #285

Closed
andreasabel opened this issue Jan 3, 2020 · 0 comments
Closed

C++: define does not work with token categories #285

andreasabel opened this issue Jan 3, 2020 · 0 comments
Assignees
Labels
bug C++ define Issue with define pragma Java
Milestone

Comments

@andreasabel
Copy link
Member

INil.  Ints ::=                  ;
iSg.   Ints ::= Integer          ;
ISnoc. Ints ::= Ints "," Integer ;

define iSg i = ISnoc INil i      ;

The C++ backend adds to the yacc file the definition

Ints * iSg_ (Integer * i_) {
  return new ISnoc(new INil(), i_);
}

but correct would be just Integer i_ for the argument.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug C++ define Issue with define pragma Java
Projects
None yet
Development

No branches or pull requests

1 participant