Parglare Versions Save

A pure Python LR/GLR parser - http://www.igordejanovic.net/parglare/

0.18.0

2 months ago

0.17.0

2 months ago

0.16.1

1 year ago

Fixed

  • Fix AST to_str in the context of syntactic sugar (BNF extensions) 6a99f96.

0.16.0

1 year ago

Added

  • _pg_extras slot on dynamically created Python objects for additional user-defined information (e.g. info used during semantic analysis) (#140)
  • _pg_children/_pg_children_names on dynamically created Python objects for named assignments 0771ca5, 204b5a0.
  • to_str method for dynamically created Python objects 204b5a0.

Changed

  • visit function of the visitor pattern now has a third parameter which is the depth of the current tree node [63e6e42]. (BIC)
  • Relaxed click dependency to allow for 8.x versions. (#142). Thanks GabDug@GitHub.

Fixed

  • Fix visitor memoization caching #138. Thanks vladaindjic@GitHub.

0.15.0

2 years ago

Added

  • forest.get_first_tree() for efficiently unpacking tree 0 7cb006c.
  • forest.disambiguate(callable) for removing ambiguities from the forest f4664af.
  • Greedy repetitions (*!, +!, and ?!) 517d33e.

Changed

  • Make Parent iterable over possibilities 57606c9.

Fixed

  • Fix parse tree iteration and indexing 6947942.
  • Fix passing sub-results in dynamic filter 65a1cbf.

0.14.0

2 years ago

This release brings multiple new features and improvements. Read the Release Notes for more info.

Added

  • pglr parse for parsing files and displaying parse trees and forests.
  • pglr trace --frontier for organizing GSS nodes for GLR trace into frontiers (a.k.a. shift levels)
  • to_dot on trees and forests for rendering GraphViz dot string. Used in pglr parse if --dot switch is provided to create dot file of a parse forest/tree.
  • Parenthesized groups in grammar rules.
  • New examples: JSON, BibTeX, Java (based on Jave SE 16).
  • New performance tests based on the new example grammars.

Changed

  • Changed tree_str on parse trees to to_str. (BIC)
  • Improved GLR implementation. Improved performance.
  • GLR parsing now returns Forest object which can be indexed and iterated yielding lazy trees. See Release Notes for more info. (BIC)
  • Dropping support for deprecated Python 3.4 and 3.5 versions. (BIC)

0.13.0

3 years ago

Changed

  • Optimized calculating line/column from a position (#131). Thanks xor2003@GitHub.
  • LR/GLR implementation rework and cleanup. Corrected handling of EMPTY reductions. Support for full CFG set. Better tracing output. (possible (BIC))
  • Removed context parameter to parse* calls. Added extra parameter for keeping of additional state during parsing. If extra is not given it is dict by default. ((BIC))
  • Dynamic disambiguation filter parameters change ((BIC), see the docs)
  • Removed explicit Context class. Now, there are context-like objects ( parser head, error context, GSS node parent etc.) (possible (BIC))
  • Moved project meta-data to setup.cfg and introduced git based versioning using setuptools_scm. Thanks KOLANICH@GitHub (#104).

Fixes

  • During GLR rework several bugs are fixed:
    • Wrong positions reported with GLR and EMPTY. Reported by Hyldrean@GitHub (see #110)
    • Issue with handling of EMPTY productions in ambiguous grammars. Reported by johnw3d@GitHub and stuartlangridge@GitHub (see #112, #114)