./devel/py-pyparsing, Parsing module for Python

[ CVSweb ] [ Homepage ] [ RSS ] [ Required by ] [ Add to tracker ]


Branch: CURRENT, Version: 2.4.7, Package name: py37-pyparsing-2.4.7, Maintainer: pkgsrc-users

The pyparsing module is an alternative approach to creating and executing
simple grammars, vs. the traditional lex/yacc approach, or the use of regular
expressions. The pyparsing module provides a library of classes that client
code uses to construct the grammar directly in Python code.


Required to run:
[devel/py-setuptools] [lang/python37]

Required to build:
[pkgtools/cwrappers]

Master sites:

SHA1: ca8d892c93fe2d54ea5e6f31c5798e40c58e8667
RMD160: 2dbbca645985bb7f4b4d7a36b6ba3958302adfb9
Filesize: 634.49 KB

Version history: (Expand)


CVS history: (Expand)


   2020-04-07 14:08:13 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-pyparsing: updated to 2.4.7

Version 2.4.7
- Backport of selected fixes from 3.0.0 work:
  . Each bug with Regex expressions
  . And expressions not properly constructing with generator
  . Traceback abbreviation
  . Bug in delta_time example
  . Fix regexen in pyparsing_common.real and .sci_real
  . Avoid FutureWarning on Python 3.7 or later
  . Cleanup output in runTests if comments are embedded in test string
   2020-01-03 13:47:22 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-pyparsing: updated to 2.4.6

Version 2.4.6:

- Fixed typos in White mapping of whitespace characters, to use
  correct "\u" prefix instead of "u\".

- Fix bug in left-associative ternary operators defined using
  infixNotation. First reported on StackOverflow by user Jeronimo.

- Backport of pyparsing_test namespace from 3.0.0, including
  TestParseResultsAsserts mixin class defining unittest-helper
  methods:
  . def assertParseResultsEquals(
            self, result, expected_list=None, expected_dict=None, msg=None)
  . def assertParseAndCheckList(
            self, expr, test_string, expected_list, msg=None, verbose=True)
  . def assertParseAndCheckDict(
            self, expr, test_string, expected_dict, msg=None, verbose=True)
  . def assertRunTestResults(
            self, run_tests_report, expected_parse_results=None, msg=None)
  . def assertRaisesParseException(self, exc_type=ParseException, msg=None)

  To use the methods in this mixin class, declare your unittest classes as:

    from pyparsing import pyparsing_test as ppt
    class MyParserTest(ppt.TestParseResultsAsserts, unittest.TestCase):
        ...
   2019-11-11 16:14:30 by Thomas Klausner | Files touched by this commit (1)
Log message:
py-pyparsing: remove removed patch from distinfo
   2019-11-11 16:12:52 by Adam Ciarcinski | Files touched by this commit (3) | Package updated
Log message:
py-pyparsing: updated to 2.4.5

Version 2.4.5:
- Fixed encoding when setup.py reads README.rst to include the
  project long description when uploading to PyPI. A stray
  unicode space in README.rst prevented the source install on
  systems whose default encoding is not 'utf-8'.
   2019-11-08 10:47:55 by Thomas Klausner | Files touched by this commit (2)
Log message:
py-pyparsing: fix build with python 3.6
   2019-11-06 10:31:29 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-pyparsing: updated to 2.4.4

Version 2.4.4:
- Unresolved symbol reference in 2.4.3 release was masked by stdout
  buffering in unit tests.

Version 2.4.3:
- Fixed a bug in ParserElement.__eq__ that would for some parsers
  create a recursion error at parser definition time.
- Fixed bug in indentedBlock where a block that ended at the end
  of the input string could cause pyaprsing to loop forever.
- Backports from pyparsing 3.0.0:
  . __diag__.enable_all_warnings()
  . Fixed bug in PrecededBy which caused infinite recursion
  . support for using regex-compiled RE to construct Regex expressions
   2019-08-21 15:03:41 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-pyparsing: updated to 2.4.2

Version 2.4.2:

- Updated the shorthand notation that has been added for repetition
  expressions: expr[min, max], with '...' valid as a min or max value:
     - expr[...] and expr[0, ...] are equivalent to ZeroOrMore(expr)
     - expr[1, ...] is equivalent to OneOrMore(expr)
     - expr[n, ...] or expr[n,] is equivalent
          to expr*n + ZeroOrMore(expr)
          (read as "n or more instances of expr")
     - expr[..., n] is equivalent to expr*(0, n)
     - expr[m, n] is equivalent to expr*(m, n)
  Note that expr[..., n] and expr[m, n] do not raise an exception
  if more than n exprs exist in the input stream.  If this
  behavior is desired, then write expr[..., n] + ~expr.

  Better interpretation of [...] as ZeroOrMore raised by crowsonkb,
  thanks for keeping me in line!

  If upgrading from 2.4.1 or 2.4.1.1 and you have used `expr[...]`
  for `OneOrMore(expr)`, it must be updated to `expr[1, ...]`.

- The defaults on all the `__diag__` switches have been set to False,
  to avoid getting alarming warnings. To use these diagnostics, set
  them to True after importing pyparsing.

  Example:
      import pyparsing as pp
      pp.__diag__.warn_multiple_tokens_in_named_alternation = True

- Fixed bug introduced by the use of __getitem__ for repetition,
  overlooking Python's legacy implementation of iteration
  by sequentially calling __getitem__ with increasing numbers until
  getting an IndexError. Found during investigation of problem
  reported by murlock, merci!
   2019-04-08 12:41:05 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-pyparsing: updated to 2.4.0

Version 2.4.0:

- Well, it looks like the API change that was introduced in 2.3.1 was more
  drastic than expected, so for a friendlier forward upgrade path, this
  release:
  . Bumps the current version number to 2.4.0, to reflect this
    incompatible change.
  . Adds a pyparsing.__compat__ object for specifying compatibility with
    future breaking changes.
  . Conditionalizes the API-breaking behavior, based on the value
    pyparsing.__compat__.collect_all_And_tokens.  By default, this value
    will be set to True, reflecting the new bugfixed behavior. To set this
    value to False, add to your code:

        import pyparsing
        pyparsing.__compat__.collect_all_And_tokens = False

  . User code that is dependent on the pre-bugfix behavior can restore
    it by setting this value to False.

  In 2.5 and later versions, the conditional code will be removed and
  setting the flag to True or False in these later versions will have no
  effect.

- Updated unitTests.py and simple_unit_tests.py to be compatible with
  "python setup.py test". To run tests using setup, do:

      python setup.py test
      python setup.py test -s unitTests.suite
      python setup.py test -s simple_unit_tests.suite

- Fixed bug in runTests handling '\n' literals in quoted strings.

- Added tag_body attribute to the start tag expressions generated by
  makeHTMLTags, so that you can avoid using SkipTo to roll your own
  tag body expression:

      a, aEnd = pp.makeHTMLTags('a')
      link = a + a.tag_body("displayed_text") + aEnd
      for t in s.searchString(html_page):
          print(t.displayed_text, '->', t.startA.href)

- indentedBlock failure handling was improved

- Address Py2 incompatibility in simpleUnitTests, plus explain() and
  Forward str() cleanup.

- Fixed docstring with embedded '\w', which creates SyntaxWarnings in
  Py3.8.

- Examples:
  - Added example parser for rosettacode.org tutorial compiler.

  - Added example to show how an HTML table can be parsed into a
    collection of Python lists or dicts, one per row.

  - Updated SimpleSQL.py example to handle nested selects, reworked
    'where' expression to use infixNotation.

  - Added include_preprocessor.py, similar to macroExpander.py.

  - Examples using makeHTMLTags use new tag_body expression when
    retrieving a tag's body text.

  - Updated examples that are runnable as unit tests:
        python setup.py test -s examples.antlr_grammar_tests
        python setup.py test -s examples.test_bibparse