summaryrefslogtreecommitdiff
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* Merge changes from masterPaul McGuire2019-09-261-0/+19
|
* Add Py2 compat code at submitter's request; add non-Western test case; more ↵Paul McGuire2019-08-181-98/+109
| | | | helpful message when tests fail; exit with exit code to include with package tests; trim trailing whitespace
* Boolean Search query parser: allows to perform searches with the common ↵xecgr2019-08-131-0/+394
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | boolean search syntax against a text (#21) * Add files via upload Boolean Search query parser, based on searchparser, that allows to perform searches with the common boolean search syntax against a text (western + non-western alphabets) SAMPLE USAGE: from booleansearchparser import BooleanSearchParser bsp = BooleanSearchParser() text = u"wildcards at the begining of a search term " exprs= [ u"*cards and term", #True u"wild* and term", #True u"not terms", #True u"terms or begin", #False ] for expr in exprs: print bsp.match(text,expr) #non-western samples text = u"안녕하세요, 당신은 어떠세요?" exprs= [ u"*신은 and 어떠세요", #True u"not 당신은", #False u"당신 or 당", #False ] for expr in exprs: print bsp.match(text,expr) * from __future__ import print_function and changing this over to be Python 2/3 compatible * ptmcg conversation issues
* Update example to proto3 syntax (#113)Andrew Artyushok2019-08-131-5/+18
| | | Thanks again for submitting!
* Typo and spelling cleanup, add helpful commentsPaul McGuire2019-08-071-3/+10
|
* Fixed bug in CloseMatch where end location was incorrectly computed; and ↵Paul McGuire2019-08-051-88/+51
| | | | updated partial_gene_match.py example.
* Code style updates; remove deprecated methodsPaul McGuire2019-08-053-144/+147
|
* Example BigQuery view SQL parser (#112)Michael Smedberg2019-08-041-0/+1510
| | | | Example BigQuery view SQL parser
* fourFn.py updates - handle leading '+' and '-' unary signs for parenthesized ↵Paul McGuire2019-08-041-4/+11
| | | | expressions; and real numbers with no leading digit before the decimal
* Update fourFn.py to handle functions that take multiple args, and nested ↵Paul McGuire2019-08-032-309/+354
| | | | functions
* 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
|