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

Language composition example throws error #23

Open
didrikmunther opened this issue Mar 20, 2024 · 0 comments
Open

Language composition example throws error #23

didrikmunther opened this issue Mar 20, 2024 · 0 comments

Comments

@didrikmunther
Copy link

Running the code

utest eval (Add (If (False(), Num 0, Num 5), Num 2)) with Num 7 in
throws an error in the current version of Miking:

'syn' name conflict, found two definitions of 'Expr'

'sem' name conflict, found two definitions of 'eval'

To solve it, you need to inherit Expr and eval from a base language:

lang MyBase
  syn Expr =

  sem eval =
end

...

lang Arith = MyBase
...

lang MyBool = MyBase
...
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

1 participant