Ticket #332 (new defect)

Opened 1 year ago

Last modified 1 year ago

Grammar error

Reported by: Yoric Assigned to: anonymous
Type: defect Priority: major
Milestone: M1 Component: Spec
Version: 4 Keywords: Grammar
Cc:

Description

In production 133 (NewExpression -> new MemberExpression), either arguments must be added after MemberExpression or (as in parser.sml), the new must only be seen by the lookahead.

Attachments

Change History

Changed 1 year ago by Yoric

Sorry, misread the rule. Still, there's an error:

New Expression
-> MemberExpression
-> new NewExpression

will consume all the new, without leaving any for MemberExpression to determine that it's an instanciation and that it must take an argument.

Suggestion: replace -> MemberExpression by -> new MemberExpression .

Changed 1 year ago by Yoric

Additionally, the syntax used in builtins/*.es requires that arguments be optional after a new.

Changed 1 year ago by Yoric

Unrelated suggestion: the syntax used in builtins/*.es seems to require that Path use SimpleQualifiedName rather than Identifier.

Note: See TracTickets for help on using tickets.