rascal icon indicating copy to clipboard operation
rascal copied to clipboard

Parse failure when correct interpretation is an identifier

Open fraser-wilson-anago opened this issue 5 months ago • 0 comments

Describe the bug

The attached Syntax.rsc is used to parse some small examples. A valid parse is not found.

Syntax.rsc.txt

To Reproduce

Steps to reproduce the behavior:

  1. import Syntax.rsc
  2. parse("class X feature x : T y : T end");
  3. the parse fails at position 1.

I believe it is failing to go from the identifier in the rule TypeMark to the identifier in the rule Identifier of FeatureDeclaration. The following examples do work:

  1. parse("class X feature x : T feature y : T end")
  2. parse("class X feature x : T; y : T end")
  3. parse("class X feature x : T do end y : T end")

Each of these three working examples inserts an extra token which cuts off certain branches. But I think the syntax is unambiguous without these alterations.

Expected behavior The string class X feature x : T y : T end should be parsed without errors.

Desktop (please complete the following information):

  • Context: VSCode plugin
  • Rascal Version 0.40.17

Additional context The Syntax.rsc is from an Eiffel grammar, stripped down for bug reproduction

fraser-wilson-anago avatar Jun 12 '25 08:06 fraser-wilson-anago