Grako 3.20.0 released
Juancarlo Añez
apalala at gmail.com
Fri Apr 7 18:24:36 EDT 2017
Added
-
Added grako.compile(grammar, name=None, **kwargs) as a substitute for
grako.genmodel (which remains for backwards compatibility).
-
Added a grako.parse(grammar, input, **kwargs) that will compile a
grammar and uset to parse the given input. For efficiency, parsed grammars
are cached.
-
Added a grako.to_python_sourcecode(grammar, name=None, filename=None,
**kwargs) that compiles the grammar to the Python sourcecode that
implements the parser.
-
Rename the existing *join* (.{}) expression to *gather*, and use *join* for
a new expression (%{}) that keeps the separator in the resulting AST.
-
Added left-join (<{}) and right-join (>{}) expressions to the grammar.
Changed
-
Enable python setup.py test with pytest.
-
Remove the deprecated prefix= argument to ParseContext.closure().
-
Document that *Grako* may be used as a library (with no code generation)
by compiling grammars to Grammar objects that can be used to parse any
given input, much like Python's re does with regular expressions.
-
Refactored grammar so double naming (name1:name2:exp) is disallowed.
Grako 3.20.0 <https://pypi.python.org/pypi/grako/3.20.0>
*Grako* (for *grammar compiler*) is a tool that takes grammars in a
variation of EBNF as input, and outputs memoizing (Packrat) PEG parsers
in Python.
*Grako* can also compile a grammar stored in a string into a
grako.grammars.Grammar object that can be used to parse any given input,
much like the *re* module does with regular expressions.
https://pypi.python.org/pypi/grako/3.20.0
https://bitbucket.org/neogeny/grako/
--
Juancarlo *Añez*
More information about the Python-announce-list
mailing list