Parsing and pattern matching made easy
Parsley is a parsing library for people who find parsers scary or annoying. I wrote it because I wanted to parse a programming language, and tools like PLY or ANTLR or Bison were very hard to understand and integrate into my Python code. Most parser generators are based on LL or LR parsing algorithms that compile to big state machine tables. It was like I had to wake up a different section of my brain to understand or work on grammar rules.
Parsley, like pyparsing and ZestyParser, uses the PEG algorithm, so each expression in the grammar rules works like a Python expression. In particular, alternatives are evaluated in order, unlike table-driven parsers such as yacc, bison or PLY.
Parsley is an implementation of OMeta, an object-oriented pattern-matching language developed by Alessandro Warth at http://tinlizzie.org/ometa/ . For further reading, see Warth's PhD thesis, which provides a detailed description of OMeta: http://www.vpri.org/pdf/tr2008003_experimenting.pdf
- Developed at devel:languages:python
-
2
derived packages
- Download package
-
Checkout Package
osc -A https://api.opensuse.org checkout openSUSE:Factory/python-Parsley && cd $_
- Create Badge
Source Files
Filename | Size | Changed |
---|---|---|
Parsley-1.3.tar.gz | 0000099616 97.3 KB | |
python-Parsley.changes | 0000002982 2.91 KB | |
python-Parsley.spec | 0000003404 3.32 KB | |
support-python312.patch | 0000004342 4.24 KB |
Latest Revision
- Add patch support-python312.patch: * Support Python 3.12 by using non-removed assertion functions. - Switch to autosetup and pyproject macros. - Correct URL. - Stop using greedy globs in %files.
Comments 0