-
-
Notifications
You must be signed in to change notification settings - Fork 223
Open
Description
Given a simple grammar:
Myopic {
Program = ExpressionList
ExpressionList = Expression*
Expression = BlockExpression | number
BlockExpression = "block" "{" ExpressionList "}"
number = digit+
}
I feed it a program with a deliberate error, and I get a beautiful error:
This is correct, the "?" is not a valid expression, and it is flagged as such.
However, if I add a description (to any of the rules),
Myopic {
Program (p) = ExpressionList
ExpressionList = Expression*
Expression = BlockExpression | number
BlockExpression = "block" "{" ExpressionList "}"
number = digit+
}
the error now gets shuffled up to the top-level:
Am I misunderstanding how this is supposed to work?
Cheers (and thanks for a very nice-looking project)
Dave Thomas
@pragdave
Metadata
Metadata
Assignees
Labels
No labels

