Skip to content

Language composition example throws error #23

Open
@didrikmunther

Description

@didrikmunther

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
...

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @didrikmunther

        Issue actions

          Language composition example throws error · Issue #23 · miking-lang/miking-lang.github.io