Releases: RBastianini/polygen-php
Fixed bug related to positional generation
Fixed mistakenly accepting grammars containing a dangling comma in a positional generation construct, such as S ::= this, grammar, here, ;.
Improved lexing / parsing experience
Made lexing / parsing error messages more understandable by adding line
and column positions of the token where the error is encountered.
Added support for serialization
Added support for serialize()ing and unserialize()ing \Poligen\Language\Document objects.
Parse once, produce many (POPM)
It's not necessary to parse the source grammar every time a production is wanted: once a Polygen document is obtained, it
can be serialize()d to a string and stored as a string constant. This way, the parsing can be done only once at
"compile time", then at runtime, it's sufficient to unserialize() the string back to a Polygen document, and it can be
used as usual to obtain a production.
First release
I don't know going forward how much time I will have to continue working on this, but I believe that what I have is enough to deserve the first release. My little project of writing a parser and interpreter in PHP from scratch lives. Meet Polygen-PHP 1.0.0!
As far as I know, this should be compatible with all current Polygen grammar files. Please refer to the official Polygen documentation for guidance on how to write a grammar.