Make the Name mandatory in RULE statement #1366
hanjoosten
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As discussed earlier we are in the proces of restricting names to single word, non-empty strings. In doing so, I bump into a parse-problem with the RULE statement. There is an optional part directly after the RULE keyword. The optional part is a name and a colon.
When the name (and colon) is missing, this can result in error messages that are hard to interpret for a user.
Also, in FormalAmpersand ALL rules have a name. So if the name is missing, Ampersand will generate one automatically internaly. This also can give rise to wierd error messages, containing a name of a rule that the user does not expect.
As a last argument, we want to be able to add the posibility to specify a label in addition to places where the user specifies a name. If the name is optional, this makes the grammar even more difficult to parse (but not impossible), potentially leading to even more difficult-to-read errormessages.
I am in favour of requiring a name for the RULE statement.
I do not want to have a lengthy debate on this, because I want to carry on with the currently at hand namespaces change.
Please @stefjoosten , @RieksJ , @Michiel-s comment asap.
Beta Was this translation helpful? Give feedback.
All reactions