summaryrefslogtreecommitdiff
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* Selected backports from 3.0.0 workptmcg2020-03-061-3/+16
|
* Version 2.4.2a1 - changing [...] notation to ZeroOrMore, not OneOrMorePaul McGuire2019-07-232-267/+267
|
* Update coding styles; better comments, attribution of example filePaul McGuire2019-07-201-9/+21
|
* Change example to use addCondition instead of parse action that raises ↵Paul McGuire2019-07-191-10/+10
| | | | ParseException
* Update/cleanup code in examplesPaul McGuire2019-07-137-1187/+1244
|
* Code reorg/reformat, added results namesPaul McGuire2019-07-061-127/+151
|
* Add support for multiple '...' skips in a single expression; `_skippped` ↵Paul McGuire2019-07-061-4/+5
| | | | results name will always return a list of skipped items
* Update examples to reflect newer pyparsing and coding styles, and use '...' ↵ptmcg2019-07-053-91/+93
| | | | to illustrate repetition and skipping
* Add compatibility results name; ungroup qty expression to simplify accessing ↵Paul McGuire2019-05-291-6/+8
| | | | qty value
* Some code cleanup, and added tests and test validationsPaul McGuire2019-05-281-6/+27
|
* Fix description in module headerPaul McGuire2019-05-281-1/+3
|
* delta_time fixes: add more time validations; add 1-second epsilon when ↵ptmcg2019-05-281-2/+24
| | | | verifying computed times; add 'an' for 'an hour' times
* Update generated code for both unnamed and named state transition state machinesPaul McGuire2019-05-271-1/+9
|
* Typo - `isinstance` should be `issubclass`Paul McGuire2019-05-271-1/+1
|
* Fine tuning of statemachine example, moving InvalidStateTransition ↵Paul McGuire2019-05-277-12/+167
| | | | declaration inside generated class; added video state machine demo; added vending machine state machine demo showing how to using statemachine without importing a .pystate file
* Updated runTests to call postParse before dumping parsed results; added ↵Paul McGuire2019-05-263-208/+366
| | | | nested_markup.py and updated delta_time.py (renamed from deltaTime.py) examples
* Fix generated stateMixin class to properly implement overridable transition ↵Paul McGuire2019-04-172-9/+7
| | | | methods instead of messing with getattr; allows use of `super().transition_name()` in classes that subclass from the Mixin
* Added change note re: changes to statemachine example; some code ↵Paul McGuire2019-04-161-1/+13
| | | | reformat/cleanup/commenting in statemachine.py
* Refactor generated State code to use overridden transition methods instead ↵Paul McGuire2019-04-154-78/+117
| | | | of overriding getattr; add generation of state-managing mixin class to delegate to _state instance variable, and reworked demos to use mixin instead of replicating state code
* Code updates to current idiomspyparsing_2.4.0Paul McGuire2019-04-072-54/+117
|
* Improved support for "python setup.py test"Paul McGuire2019-04-071-219/+223
|
* Fixed dict structure in makeHTMLTags expressions, and added tag_body ↵Paul McGuire2019-04-0610-528/+452
| | | | attribute to the generated start expression giving easy access to a SkipTo(closeTag) that will parse the tag's body text; some code cleanup and removed duplication among examples
* Updated examples to current pyparsing styles, and to use runTestsPaul McGuire2019-04-062-96/+90
|
* Some reformatting for better readability, and more explanatory commentsPaul McGuire2019-04-051-22/+33
|
* Add example include_preprocessor.pyPaul McGuire2019-04-051-0/+77
|
* SimpleSQL.py update - nested select and infixNotation for 'where'Paul McGuire2019-03-301-88/+95
|
* Add example showing scraping/parsing of an HTML table into a Python dictPaul McGuire2019-03-301-0/+61
|
* Update original "Hello, World!" parser to latest coding, plus runTestsPaul McGuire2019-03-301-17/+25
|
* Add compiler from rosettacode.org; fix bug in ParserElement.runTests that ↵Paul McGuire2019-01-311-0/+278
| | | | interpreted newlines in quotes as test delimiters
* Update examples and unit tests to more preferred coding styles, imports for ↵ptmcg2019-01-3012-85/+94
| | | | pyparsing_common as ppc and pyparsing_unicode as ppu
* Merge pull request #64 from mcepl/denosepyparsing_2.3.1Paul McGuire2019-01-101-193/+190
|\ | | | | Denose
| * Remove dependency on noseMatěj Cepl2019-01-071-183/+180
| |
| * Convert CRLF to LFMatěj Cepl2019-01-071-193/+193
| |
* | Add enumerated place holders for strings that invoke str.format(), for Py2 ↵ptmcg2019-01-0917-71/+71
|/ | | | compatibility
* Clean up CHANGES notes for new examplesptmcg2018-12-312-258/+0
|
* Add document signoff and library book state examples;ptmcg2018-12-317-38/+277
|
* Update statemachine demo code to Py3Paul McGuire2018-12-313-29/+60
|
* Update Lucene grammar example, but remove from Travis-CI acceptance scriptsPaul McGuire2018-12-301-1/+5
|
* Update Travis-CI scripts to include examples; fix bug in runTests if ↵Paul McGuire2018-12-303-22/+25
| | | | postParse function returns None (or any non-str value)
* Update chemicalFormulas.py example to use new runTests postParse argument, ↵Paul McGuire2018-12-301-27/+48
| | | | add test cases that parse subscript integers
* Fix partial named results when And embedded in named MatchFirst or Orptmcg2018-12-284-0/+482
|
* Use HTTPS URLs where available in docs, examples, and commentsJon Dufresne2018-12-2517-18/+18
|
* Merge branch 'master' into psycoPaul McGuire2018-12-244-709/+708
|\
| * Replace bare 'except:' with 'except Exception;'Jon Dufresne2018-12-244-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Catching all exceptions is generally considered a bad practice under most circumstances as it will also catch KeyboardInterrupt and SystemExit. These special cases should be raised to the interpreter to allow the Python process to exit. This fix complies with pycodestyle's error code E722: https://pycodestyle.readthedocs.io/en/latest/intro.html#error-codes > do not use bare except, specify exception instead
* | Remove mentions of 'psyco' from docs and examplesJon Dufresne2018-12-241-13/+0
|/ | | | | | | | | | | | | | | The psyco package has been declared umaintained and dead. It is no longer receiving bug fixes including for security issues. From http://psyco.sourceforge.net/ > 12 March 2012 > > Psyco is unmaintained and dead. Please look at PyPy for the > state-of-the-art in JIT compilers for Python. Avoid recommending the use of an unmaintained package (since 2012). Users can continue to use PyPy for the latest and greatest in Python JIT.
* Remove unused imports throughout projectJon Dufresne2018-12-2425-47/+35
| | | | | | | | | | | | | Unused imports were discovered using flake8. By removing the unused imports, the code is a bit friendlier to new contributors as it is clearer what is being used and not simply leftover from previous refactoring. The flake8 command: $ flake8 . --select F401 http://flake8.pycqa.org/
* Merge changes from last PR, plus some more up-to-date coding styles and ↵Paul McGuire2018-12-231-5/+21
| | | | pyparsing features
* Trim trailing white space throughout the projectJon Dufresne2018-12-2276-919/+879
| | | | | | Many editors clean up trailing white space on save. By removing it all in one go, it helps keep future diffs cleaner by avoiding spurious white space changes on unrelated lines.
* Fix encoding cookie to use encoding "utf-8"Jon Dufresne2018-12-221-1/+1
| | | | | | | | | | | | | | | The all caps "UTF-8" causes warnings or errors in some editors. "utf-8" is more widely recognized. For example, when opening files in Emacs, I see: > Warning (mule): Invalid coding system ‘UTF-8’ is specified > for the current buffer/file by the :coding tag. > It is highly recommended to fix it before writing to a file. > Really proceed with writing? (yes or no) I'm then promped before saving. The CPython source code uses the lowecase form.
* Fix failing tests (both py2K and py3k)Matěj Cepl2018-11-212-4/+4
| | | | Fixes #48