commit python-lark-parser for openSUSE:Factory
Hello community, here is the log from the commit of package python-lark-parser for openSUSE:Factory checked in at 2020-07-06 16:17:56 Comparing /work/SRC/openSUSE:Factory/python-lark-parser (Old) and /work/SRC/openSUSE:Factory/.python-lark-parser.new.3060 (New) Package is "python-lark-parser" Mon Jul 6 16:17:56 2020 rev:8 rq:818516 version:0.9.0 Changes: --- /work/SRC/openSUSE:Factory/python-lark-parser/python-lark-parser.changes 2020-04-16 22:59:43.059513021 +0200 +++ /work/SRC/openSUSE:Factory/.python-lark-parser.new.3060/python-lark-parser.changes 2020-07-06 16:18:56.817254675 +0200 @@ -1,0 +2,34 @@ +Fri Jul 3 09:25:30 UTC 2020 - Antonio Larrosa + +- Update to 0.9.0 + * Added error handling to LALR! ++ on_error option to Lark.parse(). ++ Parser now comes with a puppet for advanced error handling. + * Support for better regexps with the regex module, when using +Lark(..., regex=True) + +- Update to 0.8.9 + * Bugfix for PyInstaller (2) (Fixing the last two releases) + +- Update to 0.8.8 + * Reverted EOF commit due to unexpected problems. + +- Update to 0.8.7 + * Bugfix for PyInstaller + +- Update to 0.8.6 + * Grammar caching: It's now possible to cache the results of the +LALR grammar analysis, for x2 to x3 faster loading. Use +Lark(..., cache=True) or specify a file name. + * Grammar templates: Added support for grammar "functions" that +expand in preprocessing. + * Lark online IDE: Technically not a feature, but it's possible to +run Lark in the browser. Now we also have a simple IDE on github +pages: https://lark-parser.github.io/lark/ide/app.html + * Other changes: ++ Improved performance for large grammars ++ More debug prints when in debug mode ++ Better support for PyInstaller ++ Lots of bugfixes: mypy stubs, v_args, docs, and more. + +--- Old: lark-0.8.5.tar.gz New: lark-0.9.0.tar.gz Other differences: -- ++ python-lark-parser.spec ++ --- /var/tmp/diff_new_pack.eOQigS/_old 2020-07-06 16:18:57.461256653 +0200 +++ /var/tmp/diff_new_pack.eOQigS/_new 2020-07-06 16:18:57.461256653 +0200 @@ -18,7 +18,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-lark-parser -Version:0.8.5 +Version:0.9.0 Release:0 Summary:A parsing library for Python License:MPL-2.0 @@ -31,8 +31,9 @@ BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros -BuildArch: noarch +Requires: python-regex Suggests: python-Js2Py >= 0.68 +BuildArch: noarch %python_subpackages %description ++ lark-0.8.5.tar.gz -> lark-0.9.0.tar.gz ++ 8037 lines of diff (skipped)
commit python-lark-parser for openSUSE:Factory
Hello community, here is the log from the commit of package python-lark-parser for openSUSE:Factory checked in at 2020-04-16 22:59:42 Comparing /work/SRC/openSUSE:Factory/python-lark-parser (Old) and /work/SRC/openSUSE:Factory/.python-lark-parser.new.2738 (New) Package is "python-lark-parser" Thu Apr 16 22:59:42 2020 rev:7 rq:794188 version:0.8.5 Changes: --- /work/SRC/openSUSE:Factory/python-lark-parser/python-lark-parser.changes 2019-11-04 17:09:19.620448337 +0100 +++ /work/SRC/openSUSE:Factory/.python-lark-parser.new.2738/python-lark-parser.changes 2020-04-16 22:59:43.059513021 +0200 @@ -1,0 +2,15 @@ +Wed Apr 15 10:54:30 UTC 2020 - Marketa Calabkova + +- Update to 0.8.5 + * Updated js2py version (for the optional nearley support) + * Added the g_regex_flags option, to allow applying flags to all terminals. + * The standalone parser is now MPL2, instead of GPL. The Mozilla +Public License is much less restrictive, so this shouldn't affect +anyone who's already using the standalone parser. But it should +make it easier for other users to adopt it. + * The biggest change to this release is a new LALR engine, that is +capable of dealing with a few edge cases that the previous parser couldn't. + * Transformers now visit tokens, as well as rules (an alternative to +lexer_callbacks) + +--- Old: lark-0.7.7.tar.gz New: lark-0.8.5.tar.gz Other differences: -- ++ python-lark-parser.spec ++ --- /var/tmp/diff_new_pack.tkozT7/_old 2020-04-16 22:59:44.487514096 +0200 +++ /var/tmp/diff_new_pack.tkozT7/_new 2020-04-16 22:59:44.491514099 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-lark-parser # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,21 +18,21 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-lark-parser -Version:0.7.7 +Version:0.8.5 Release:0 Summary:A parsing library for Python -License:MIT +License:MPL-2.0 Group: Development/Languages/Python URL:https://github.com/lark-parser Source: https://github.com/lark-parser/lark/archive/%{version}.tar.gz#/lark-%{version}.tar.gz # extracted test gramars from nearley -> https://github.com/kach/nearley Source1:testdata.tar.gz -BuildRequires: %{python_module Js2Py} +BuildRequires: %{python_module Js2Py >= 0.68} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros BuildArch: noarch -Suggests: python-Js2Py +Suggests: python-Js2Py >= 0.68 %python_subpackages %description ++ lark-0.7.7.tar.gz -> lark-0.8.5.tar.gz ++ 5183 lines of diff (skipped)
commit python-lark-parser for openSUSE:Factory
Hello community, here is the log from the commit of package python-lark-parser for openSUSE:Factory checked in at 2019-11-04 17:09:17 Comparing /work/SRC/openSUSE:Factory/python-lark-parser (Old) and /work/SRC/openSUSE:Factory/.python-lark-parser.new.2990 (New) Package is "python-lark-parser" Mon Nov 4 17:09:17 2019 rev:6 rq:743738 version:0.7.7 Changes: --- /work/SRC/openSUSE:Factory/python-lark-parser/python-lark-parser.changes 2019-09-23 12:08:14.173897188 +0200 +++ /work/SRC/openSUSE:Factory/.python-lark-parser.new.2990/python-lark-parser.changes 2019-11-04 17:09:19.620448337 +0100 @@ -1,0 +2,10 @@ +Sun Oct 27 14:28:26 UTC 2019 - Lars Vogdt + +- Update to 0.7.7: + * Fixed a bug in Earley where running it from different threads +produced bad results + * Improved error reporting when using LALR + * Added 'edit_terminals' option, to allow programmatical manipulation +of terminals, for example to support keywords in different languages. + +--- Old: lark-parser-0.7.5.tar.gz New: lark-0.7.7.tar.gz Other differences: -- ++ python-lark-parser.spec ++ --- /var/tmp/diff_new_pack.Z7O5HJ/_old 2019-11-04 17:09:20.208448966 +0100 +++ /var/tmp/diff_new_pack.Z7O5HJ/_new 2019-11-04 17:09:20.212448970 +0100 @@ -18,13 +18,13 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-lark-parser -Version:0.7.5 +Version:0.7.7 Release:0 Summary:A parsing library for Python License:MIT Group: Development/Languages/Python -URL:https://github.com/erezsh/lark -Source: https://github.com/lark-parser/lark/archive/%{version}.tar.gz#/lark-parser-%{version}.tar.gz +URL:https://github.com/lark-parser +Source: https://github.com/lark-parser/lark/archive/%{version}.tar.gz#/lark-%{version}.tar.gz # extracted test gramars from nearley -> https://github.com/kach/nearley Source1:testdata.tar.gz BuildRequires: %{python_module Js2Py} ++ lark-parser-0.7.5.tar.gz -> lark-0.7.7.tar.gz ++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lark-0.7.5/docs/grammar.md new/lark-0.7.7/docs/grammar.md --- old/lark-0.7.5/docs/grammar.md 2019-09-06 07:18:42.0 +0200 +++ new/lark-0.7.7/docs/grammar.md 2019-10-03 10:29:49.0 +0200 @@ -1,5 +1,13 @@ # Grammar Reference +Table of contents: + +1. [Definitions](#defs) +1. [Terminals](#terms) +1. [Rules](#rules) +1. [Directives](#dirs) + + ## Definitions **A grammar** is a list of rules and terminals, that together define a language. @@ -25,6 +33,7 @@ Names of rules are always in lowercase, while names of terminals are always in uppercase. This distinction has practical effects, for the shape of the generated parse-tree, and the automatic construction of the lexer (aka tokenizer, or scanner). + ## Terminals Terminals are used to match text into symbols. They can be defined as a combination of literals and other terminals. @@ -70,6 +79,53 @@ SQL_SELECT: "select"i ``` +### Regular expressions & Ambiguity + +Each terminal is eventually compiled to a regular expression. All the operators and references inside it are mapped to their respective expressions. + +For example, in the following grammar, `A1` and `A2`, are equivalent: +```perl +A1: "a" | "b" +A2: /a|b/ +``` + +This means that inside terminals, Lark cannot detect or resolve ambiguity, even when using Earley. + +For example, for this grammar: +```perl +start : (A | B)+ +A : "a" | "ab" +B : "b" +``` +We get this behavior: + +```bash +>>> p.parse("ab") +Tree(start, [Token(A, 'a'), Token(B, 'b')]) +``` + +This is happening because Python's regex engine always returns the first matching option. + +If you find yourself in this situation, the recommended solution is to use rules instead. + +Example: + +```python +>>> p = Lark("""start: (a | b)+ +... !a: "a" | "ab" +... !b: "b" +... """, ambiguity="explicit") +>>> print(p.parse("ab").pretty()) +_ambig + start +a ab + start +a a +b b +``` + + + ## Rules **Syntax:** @@ -114,6 +170,7 @@ Priority can be either positive or negative. In not specified for a terminal, it's assumed to be 1 (i.e. the default). + ## Directives ### %ignore diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lark-0.7.5/docs/json_tutorial.md new/lark-0.7.7/docs/json_tutorial.md --- old/lark-0.7.5/docs/json_tutorial.md2019-09-06 07:18:42.0 +0200 +++
commit python-lark-parser for openSUSE:Factory
Hello community, here is the log from the commit of package python-lark-parser for openSUSE:Factory checked in at 2019-09-23 12:08:10 Comparing /work/SRC/openSUSE:Factory/python-lark-parser (Old) and /work/SRC/openSUSE:Factory/.python-lark-parser.new.7948 (New) Package is "python-lark-parser" Mon Sep 23 12:08:10 2019 rev:5 rq:730144 version:0.7.5 Changes: --- /work/SRC/openSUSE:Factory/python-lark-parser/python-lark-parser.changes 2019-09-02 13:24:38.277320468 +0200 +++ /work/SRC/openSUSE:Factory/.python-lark-parser.new.7948/python-lark-parser.changes 2019-09-23 12:08:14.173897188 +0200 @@ -1,0 +2,10 @@ +Wed Sep 11 13:06:32 UTC 2019 - Tomáš Chvátal + +- Update to 0.7.5: + * Lark transformers can now visit tokens as wel + * Fixed long-standing non-determinism and prioritization bugs in Earley. + * Serialize tool now supports multiple start symbols + * iter_subtrees, find_data and find_pred methods are now included in standalone parser + * Bugfixes for the transformer interface, for the custom lexer, for grammar imports, and many more + +--- Old: lark-parser-0.7.3.tar.gz New: lark-parser-0.7.5.tar.gz Other differences: -- ++ python-lark-parser.spec ++ --- /var/tmp/diff_new_pack.x3BsGa/_old 2019-09-23 12:08:15.433896980 +0200 +++ /var/tmp/diff_new_pack.x3BsGa/_new 2019-09-23 12:08:15.437896979 +0200 @@ -18,7 +18,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-lark-parser -Version:0.7.3 +Version:0.7.5 Release:0 Summary:A parsing library for Python License:MIT ++ lark-parser-0.7.3.tar.gz -> lark-parser-0.7.5.tar.gz ++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lark-0.7.3/README.md new/lark-0.7.5/README.md --- old/lark-0.7.3/README.md2019-08-14 11:31:43.0 +0200 +++ new/lark-0.7.5/README.md2019-09-06 07:18:42.0 +0200 @@ -72,7 +72,7 @@ ![fruitflies.png](examples/fruitflies.png) -See more [examples in the wiki](https://github.com/erezsh/lark/wiki/Examples) +See more [examples here](https://github.com/lark-parser/lark/tree/master/examples) @@ -95,7 +95,7 @@ - Extensive test suite [![codecov](https://codecov.io/gh/erezsh/lark/branch/master/graph/badge.svg)](https://codecov.io/gh/erezsh/lark) - And much more! -See the full list of [features in the wiki](https://github.com/erezsh/lark/wiki/Features) +See the full list of [features here](https://lark-parser.readthedocs.io/en/latest/features/) ### Comparison to other libraries diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lark-0.7.3/lark/__init__.py new/lark-0.7.5/lark/__init__.py --- old/lark-0.7.3/lark/__init__.py 2019-08-14 11:31:43.0 +0200 +++ new/lark-0.7.5/lark/__init__.py 2019-09-06 07:18:42.0 +0200 @@ -5,4 +5,4 @@ from .lexer import Token from .lark import Lark -__version__ = "0.7.3" +__version__ = "0.7.5" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lark-0.7.3/lark/lexer.py new/lark-0.7.5/lark/lexer.py --- old/lark-0.7.3/lark/lexer.py2019-08-14 11:31:43.0 +0200 +++ new/lark-0.7.5/lark/lexer.py2019-09-06 07:18:42.0 +0200 @@ -101,7 +101,7 @@ self.type = type_ self.pos_in_stream = pos_in_stream -self.value = Str(value) +self.value = value self.line = line self.column = column self.end_line = end_line @@ -268,7 +268,7 @@ return _build_mres(terminals, len(terminals), match_whole) def _regexp_has_newline(r): -"""Expressions that may indicate newlines in a regexp: +r"""Expressions that may indicate newlines in a regexp: - newlines (\n) - escaped newline (\\n) - anything but ([^...]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lark-0.7.3/lark/load_grammar.py new/lark-0.7.5/lark/load_grammar.py --- old/lark-0.7.3/lark/load_grammar.py 2019-08-14 11:31:43.0 +0200 +++ new/lark-0.7.5/lark/load_grammar.py 2019-09-06 07:18:42.0 +0200 @@ -12,7 +12,7 @@ from .parser_frontends import LALR_TraditionalLexer from .common import LexerConf, ParserConf from .grammar import RuleOptions, Rule, Terminal, NonTerminal, Symbol -from .utils import classify, suppress, dedup_list +from .utils import classify, suppress, dedup_list, Str from .exceptions import GrammarError, UnexpectedCharacters, UnexpectedToken from .tree import Tree, SlottedTree as ST @@ -351,7 +351,10 @@ for n in i: w += n
commit python-lark-parser for openSUSE:Factory
Hello community, here is the log from the commit of package python-lark-parser for openSUSE:Factory checked in at 2019-09-02 13:24:37 Comparing /work/SRC/openSUSE:Factory/python-lark-parser (Old) and /work/SRC/openSUSE:Factory/.python-lark-parser.new.7948 (New) Package is "python-lark-parser" Mon Sep 2 13:24:37 2019 rev:4 rq:726282 version:0.7.3 Changes: --- /work/SRC/openSUSE:Factory/python-lark-parser/python-lark-parser.changes 2019-05-22 10:52:34.431278218 +0200 +++ /work/SRC/openSUSE:Factory/.python-lark-parser.new.7948/python-lark-parser.changes 2019-09-02 13:24:38.277320468 +0200 @@ -1,0 +2,18 @@ +Mon Aug 26 13:28:28 UTC 2019 - John Vandenberg + +- Drop no longer necessary disable_test.patch +- Replace %doc entry docs/ with docs/* to avoid extra sub-directory +- Added Suggests: python-Js2Py for optional runtime dependency +- Update to v0.7.3 + * Added a new tool called Serialize, that stores Lark's internal +state as JSON. That will allow for integration with other languages. + * Minor bugfix regarding line-counting and the \s regex +- from v0.7.2 + * Lark now allows you to specify the start symbol when calling +Lark.parse() (requires pre-declaration of all possible start states, +see the start option) + * Negative priority now allowed in rules and terminals + * Also includes many minor bugfixes, optimizations, and improvements +to documentation + +--- Old: 0.7.1.tar.gz disable_test.patch New: lark-parser-0.7.3.tar.gz Other differences: -- ++ python-lark-parser.spec ++ --- /var/tmp/diff_new_pack.8VFv2r/_old 2019-09-02 13:24:38.917320347 +0200 +++ /var/tmp/diff_new_pack.8VFv2r/_new 2019-09-02 13:24:38.921320346 +0200 @@ -18,21 +18,21 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-lark-parser -Version:0.7.1 +Version:0.7.3 Release:0 Summary:A parsing library for Python License:MIT Group: Development/Languages/Python URL:https://github.com/erezsh/lark -Source: https://github.com/lark-parser/lark/archive/%{version}.tar.gz +Source: https://github.com/lark-parser/lark/archive/%{version}.tar.gz#/lark-parser-%{version}.tar.gz # extracted test gramars from nearley -> https://github.com/kach/nearley Source1:testdata.tar.gz -Patch0: disable_test.patch BuildRequires: %{python_module Js2Py} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros BuildArch: noarch +Suggests: python-Js2Py %python_subpackages %description @@ -41,8 +41,7 @@ With Lark, one can parse any context-free grammar with little code. %prep -%setup -qa1 -n lark-%{version} -%patch0 -p1 +%setup -q -n lark-%{version} -a1 %build %python_build @@ -52,11 +51,11 @@ %python_expand %fdupes %{buildroot}%{$python_sitelib} %check -%python_exec -mtests +%python_exec setup.py test %files %{python_files} %license LICENSE -%doc README.md docs +%doc README.md docs/* %{python_sitelib}/* %changelog ++ testdata.tar.gz ++ 4984 lines of diff (skipped)
commit python-lark-parser for openSUSE:Factory
Hello community, here is the log from the commit of package python-lark-parser for openSUSE:Factory checked in at 2019-05-22 10:52:32 Comparing /work/SRC/openSUSE:Factory/python-lark-parser (Old) and /work/SRC/openSUSE:Factory/.python-lark-parser.new.5148 (New) Package is "python-lark-parser" Wed May 22 10:52:32 2019 rev:3 rq:704529 version:0.7.1 Changes: --- /work/SRC/openSUSE:Factory/python-lark-parser/python-lark-parser.changes 2019-04-04 12:04:43.317418417 +0200 +++ /work/SRC/openSUSE:Factory/.python-lark-parser.new.5148/python-lark-parser.changes 2019-05-22 10:52:34.431278218 +0200 @@ -1,0 +2,17 @@ +Tue May 21 14:06:52 UTC 2019 - pgaj...@suse.com + +- version update to 0.7.1 +Lark can now serialize its parsers, resulting in simplified stand-alone code. +Bugfix for v_args (Issue #350) +Improvements and bugfixes for importing rules from grammar files +Performance improvement for the reconstructor feature +New Earley implementation with SPPF support +Added support for importing rules between grammars. The import mechanism + is namespace-aware. +Added the maybe_placeholders option, which causes optionals of the form + [expr] to return None when not matched, instead of just not appearing. + (optionals of the form expr? maintain the previous behavior of not + appearing unless matched) +Plenty of bugfixes, better errors, and better docs + +--- Old: 0.6.7.tar.gz New: 0.7.1.tar.gz Other differences: -- ++ python-lark-parser.spec ++ --- /var/tmp/diff_new_pack.OkSkrW/_old 2019-05-22 10:52:36.167276628 +0200 +++ /var/tmp/diff_new_pack.OkSkrW/_new 2019-05-22 10:52:36.191276605 +0200 @@ -18,7 +18,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-lark-parser -Version:0.6.7 +Version:0.7.1 Release:0 Summary:A parsing library for Python License:MIT @@ -56,7 +56,7 @@ %files %{python_files} %license LICENSE -%doc README.md +%doc README.md docs %{python_sitelib}/* %changelog ++ 0.6.7.tar.gz -> 0.7.1.tar.gz ++ 6822 lines of diff (skipped)
commit python-lark-parser for openSUSE:Factory
Hello community, here is the log from the commit of package python-lark-parser for openSUSE:Factory checked in at 2019-04-04 12:04:39 Comparing /work/SRC/openSUSE:Factory/python-lark-parser (Old) and /work/SRC/openSUSE:Factory/.python-lark-parser.new.3908 (New) Package is "python-lark-parser" Thu Apr 4 12:04:39 2019 rev:2 rq:690282 version:0.6.7 Changes: --- /work/SRC/openSUSE:Factory/python-lark-parser/python-lark-parser.changes 2019-03-26 15:42:41.852234489 +0100 +++ /work/SRC/openSUSE:Factory/.python-lark-parser.new.3908/python-lark-parser.changes 2019-04-04 12:04:43.317418417 +0200 @@ -1,0 +2,5 @@ +Thu Mar 14 16:41:11 UTC 2019 - Jan Engelhardt + +- Trim bias from description. + +--- Other differences: -- ++ python-lark-parser.spec ++ --- /var/tmp/diff_new_pack.NdxCaC/_old 2019-04-04 12:04:44.397418763 +0200 +++ /var/tmp/diff_new_pack.NdxCaC/_new 2019-04-04 12:04:44.397418763 +0200 @@ -20,7 +20,7 @@ Name: python-lark-parser Version:0.6.7 Release:0 -Summary:a modern parsing library +Summary:A parsing library for Python License:MIT Group: Development/Languages/Python URL:https://github.com/erezsh/lark @@ -36,15 +36,13 @@ %python_subpackages %description +Lark is a general-purpose parsing library for Python. -Lark is a modern general-purpose parsing library for Python. - -With Lark, you can parse any context-free grammar, efficiently, with very little code. +With Lark, one can parse any context-free grammar with little code. %prep -%setup -q -n lark-%{version} +%setup -qa1 -n lark-%{version} %patch0 -p1 -tar xvzf %{SOURCE1} %build %python_build