Discussion:
Cosmetic changes to M2R10 spec (back port from M2C)
(too old to reply)
trijezdci
2016-05-15 14:56:29 UTC
Permalink
Raw Message
While implementing M2C it turned out to be simpler to

* replace the tilde in the indeterminate record syntax with VAR
* replace NONE in the extensible record syntax with NIL

The former because M2C uses the same lexer for PIM and its M2R10 subset, and tilde may be used in PIM as a synonym for NOT. The latter because it means M2C can do without any additional reserved words for both PIM and its M2R10 subset (at least for now).

However, we didn't want to have any diversion between the M2R10 specification and M2C's subset thereof. Therefore we decided to "back port" the changes into the M2R10 specification.

As a result:

(1) the use of the tilde has been completely eliminated from M2R10
(2) within the extensible record syntax NIL replaces NONE in M2R10
(3) tilde has been reserved for use by the template engine utility

This has now been updated on the wiki.

http://modula-2.info/m2r10/pmwiki.php/SyntaxDiagrams/NonTerminals

The affected productions are #15.2, #34.1, #34.2, #57 and #57.1.
trijezdci
2016-05-16 12:22:29 UTC
Permalink
Raw Message
Furthermore, M2C permits the use of lowline and dollar in identifiers which can be enabled by compiler switch. Since module identifiers are generally mapped to the basename of filenames of source files and compilation products this can lead to cross platform incompatibilities of library names because some filesystems do not permit lowline and/or dollar in filenames.

For this reason we had decided to forbid the use of lowline and dollar in module identifiers even when lowline and dollar identifiers are enabled.

This restriction has now also been back ported to the M2R10 specification.

The updated M2R10 grammar only permits letters and digits in module identifiers, blueprint identifiers, template identifiers and template placeholders.

http://modula-2.info/m2r10/pmwiki.php/SyntaxDiagrams/Terminals#LibIdent
trijezdci
2016-05-18 07:23:18 UTC
Permalink
Raw Message
the names of the two identifier tokens have now changed to be more intuitive

http://modula-2.info/m2r10/pmwiki.php/SyntaxDiagrams/NonTerminals#AlphaNumIdent

http://modula-2.info/m2r10/pmwiki.php/SyntaxDiagrams/NonTerminals#ForeignIdent
Loading...