This issue was first discussed in the mailing list
The lbnf reference specify that "An identifier is a nonempty sequence of letters, starting with a capital letter." but bnfc will accept a rule such as cat . Type = "Foo";, generating invalid haskell code.
Instead, bnfc should detect the invalid identifier and print a error message.
The text was updated successfully, but these errors were encountered:
It seems that lower case identifiers are for defined identifiers, via the define pragma. This feature is documented in the book Implementing Programming Languages, see http://www.grammaticalframework.org/ipl-book/ , but not in the user manual.
Also, there is no check that a definition is actually supplied in the grammar file. A badly implemented and badly documented feature which eventually got broken by some refactoring, see #214.
I did serious work on the define feature in #214, #266, and #285, addressing the lowercase label issue. Error reporting is better now. Also, apostrophes are now forbidden in identifiers, see #279.
Closing this now, feel free to reopen with new information.
This issue was first discussed in the mailing list
The lbnf reference specify that "An identifier is a nonempty sequence of letters, starting with a capital letter." but bnfc will accept a rule such as
cat . Type = "Foo";
, generating invalid haskell code.Instead, bnfc should detect the invalid identifier and print a error message.
The text was updated successfully, but these errors were encountered: