Skip to content

parse(#Exp, "2+3") example doesn't work #1423

@Pytheas01

Description

@Pytheas01

Describe the bug

the parse(#Exp, "2+3") statement causes a CallFailed error.

To Reproduce

rascal>import demo::lang::Exp::Concrete::NoLayout::Syntax;
ok
rascal>import ParseTree;
ok
rascal>parse(#Exp, "2+3");

causes

rascal>parse(#Exp, "2+3");
|prompt:///|(12,5,<1,12>,<1,17>): CallFailed(
  |prompt:///|(12,5,<1,12>,<1,17>),
  [type(
      adt(
        "Exp",
        []),
      (adt(
          "Exp",
          []):choice(
          adt(
            "Exp",
            []),
          {
            cons(
              label(
                "add",
                adt(
                  "Exp",
                  [])),...

Expected behavior

sort("Exp"): 2+3

... as per the documentation

Desktop (please complete the following information):
Eclispse 2020.03 using 2020-May-13 version of Rascal update.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions