Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uppercase Modula identifiers may contain digits #297

Open
rdipardo opened this issue Dec 20, 2024 · 0 comments
Open

Uppercase Modula identifiers may contain digits #297

rdipardo opened this issue Dec 20, 2024 · 0 comments
Labels
committed Issue fixed in repository but not in release modula Caused by the Modula lexer

Comments

@rdipardo
Copy link
Contributor

LexModula does not anticipate alphanumeric uppercase identifiers that happen to contain standard type names, e.g.,

Text

INTERFACE Ex;

TYPE
  INTEGER32 = [-16_7fffffff-1 .. 16_7fffffff];

END Ex.

Styles

{4}INTERFACE{0} Ex{16};{0}

{4}TYPE{0}
  {5}INTEGER{6}32{0} {16}={0} {16}[-{7}16_7fffffff{16}-{6}1{0} {16}..{0} {7}16_7fffffff{16}];{0}

{4}END{0} Ex{16}.{0}

"INTEGER32" and similar are attested in GNU's implementation of ISO Modula-2 as fixed-width integral types provided by the SYSTEM module : https://gcc.gnu.org/onlinedocs/gm2/gm2-libs-iso_002fSYSTEM.html

These patches amend identifier validation to allow digits. The affected condition has also been re-expressed from a double negative to a negated OR by application of De Morgan's laws of equivalency:

@nyamatongwe nyamatongwe added the modula Caused by the Modula lexer label Dec 20, 2024
@nyamatongwe nyamatongwe added the committed Issue fixed in repository but not in release label Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
committed Issue fixed in repository but not in release modula Caused by the Modula lexer
Projects
None yet
Development

No branches or pull requests

2 participants