Skip to content

Releases: RBastianini/polygen-php

Fixed bug related to positional generation

05 Jun 10:19
bf3e57f

Choose a tag to compare

Fixed mistakenly accepting grammars containing a dangling comma in a positional generation construct, such as S ::= this, grammar, here, ;.

Improved lexing / parsing experience

03 May 22:43
6cf0e6d

Choose a tag to compare

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

20 Jun 22:44

Choose a tag to compare

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

23 May 22:28

Choose a tag to compare

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.