strictly noreply
2009-05-18 09:28:32 UTC
For comparative studies I recently created ANTLR grammars for both PIM
and ISO M2. Just in case these might be of help to anyone else, I made
them available online ...
PIM3 grammar:
http://www.sunrisetel.net/software/papers/modula2/m2pim3.g
ISO grammar:
http://www.sunrisetel.net/software/papers/modula2/m2iso.g
Both grammars follow the naming conventions and structure of the EBNF
given in PIM3 and ISO/IEC IS 10514 respectively, but those grammars
were written for documentation purposes only. They are not LL(1), nor
even LL(k), ANTLR will not validate them in this form. As time
permits, I intend to refactor them to create LL(1) versions. If and
when I get around to doing that, I will post the LL(1) versions, too.
Meanwhile the grammars can be used to generate syntax diagrams with
ANTLRworks.
and ISO M2. Just in case these might be of help to anyone else, I made
them available online ...
PIM3 grammar:
http://www.sunrisetel.net/software/papers/modula2/m2pim3.g
ISO grammar:
http://www.sunrisetel.net/software/papers/modula2/m2iso.g
Both grammars follow the naming conventions and structure of the EBNF
given in PIM3 and ISO/IEC IS 10514 respectively, but those grammars
were written for documentation purposes only. They are not LL(1), nor
even LL(k), ANTLR will not validate them in this form. As time
permits, I intend to refactor them to create LL(1) versions. If and
when I get around to doing that, I will post the LL(1) versions, too.
Meanwhile the grammars can be used to generate syntax diagrams with
ANTLRworks.