Skip to content

Releases: igordejanovic/parglare

Release 0.18.0

23 Feb 16:18
0.18.0
Compare
Choose a tag to compare

Release 0.17.0

14 Feb 19:57
0.17.0
Compare
Choose a tag to compare

Release 0.16.1

27 Feb 17:12
0.16.1
Compare
Choose a tag to compare

Fixed

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

0.16.0

16 Jul 09:33
0.16.0
Compare
Choose a tag to compare

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

14 Jul 13:30
0.15.0
Compare
Choose a tag to compare

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

19 Jun 13:27
0.14.0
Compare
Choose a tag to compare

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

04 Feb 15:06
0.13.0
Compare
Choose a tag to compare

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)