pyparsing
Python library for creating PEG parsers (by github-pyparsing)
luna
A DSL that translates to regex (by AbhinavOmprakash)
pyparsing | luna | |
---|---|---|
13 | 8 | |
2,100 | 141 | |
1.0% | - | |
8.3 | 0.0 | |
about 1 month ago | over 1 year ago | |
Python | Clojure | |
MIT License | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
pyparsing
Posts with mentions or reviews of pyparsing.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-08-24.
-
Pyparsing 3.1.0 released
After over a year since the last release of pyparsing, I've bundled up all the bug-fixes and changes, and they are now released as pyparsing 3.1.0. Visit this link for the details.
-
Need help developing an interpreter
Look into "parser combinators" for building an interpreter. There's a few ones out there, but PyParsing is one I've seen around that looks pretty nifty.
-
About a month ago I posted about PRegEx, an open-source project which I had started that you can use to build RegEx patterns programmatically, which the subreddit seem to like. This prompted me to keep working on it, and one month later, PRegEx v2.0.0 is out!
I havent found a way to specify an exact character match in pyparsing - https://github.com/pyparsing/pyparsing/discussions/443
-
Python toolkits
STDOUT: Lark or pyparsing
- TatSu takes grammars in variation of EBNF, outputs memoizing Python PEG parsers
-
Parser Combinators in Haskell
Since it is not mentioned in the article: Python users may also want to check out pyparsing [0]. It is slightly different from Parsec/FParsec (for instance, it ignores all whitespace by default), but I think it is a really good project.
[0]: https://github.com/pyparsing/pyparsing/
-
Pyparsing 3.0.x - off to a rocky start, but I think 3.0.6 looks fairly solid
Here is the page of all the new changes and features in pyparsing 3.0.
- luna is a Domain specific language that translates to regex. It's an attempt to make regex more readable.
-
Recommended way to read and parse a couple thousand small files
Your pyparsing parser might benefit from a tune-up. This page has some performance tips: https://github.com/pyparsing/pyparsing/wiki/Performance-Tips.
-
Script for extracting info from a SQL File
If your SQL has fairly complex structure, you will need a full blown SQL parser. If your statements are mostly simple select, you can get pretty close with Pyparsing, here is an example.
luna
Posts with mentions or reviews of luna.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-08-26.
-
Lisp feature - domain specific language
https://github.com/AbhinavOmprakash/luna (creating RegEx without having to write RegEx)
- GitHub - AbhinavOmprakash/luna: A DSL that translates to regex
- Learn RegEx step by step, from zero to advanced
-
[ANN] London Clojurians Talk: Macrobrew: Clojure macros distilled (by Abhinav Omprakash)
Abhinav is the author of luna (https://github.com/AbhinavOmprakash/luna) a DSL and functionali. He is fascinated with functional programming, programming language design, and clojure's persistent data structures. When he is not writing code, he is probably writing about code on his blog.
- luna is a Domain specific language that translates to regex. It's an attempt to make regex more readable.
- Show HN: Luna is a Clojure Domain specific language that translates to regex
What are some alternatives?
When comparing pyparsing and luna you can also consider the following projects:
parsita - The easiest way to parse text in Python
regal - Royally reified regular expressions
parser - String parser combinators
logical_verification_2020 - Companion files for Logical Verification 2020–2021 at VU Amsterdam
iregex - A way to write regex with objects instead of strings.
attoparsec - A fast Haskell library for parsing ByteStrings
re-ext - Sometimes you want to compose regexs.
sly - Sly Lex Yacc
Lark - Lark is a parsing toolkit for Python, built with a focus on ergonomics, performance and modularity.
assert-combinators - Functional assertion combinators.
ReadableRegex.jl - regexes for people who don't really want to learn or read regexes