pyparsing
Python library for creating PEG parsers (by github-pyparsing)
attoparsec
A fast Haskell library for parsing ByteStrings (by haskell)
Our great sponsors
pyparsing | attoparsec | |
---|---|---|
13 | 6 | |
2,083 | 508 | |
1.6% | 0.4% | |
8.5 | 3.4 | |
19 days ago | 4 months ago | |
Python | Haskell | |
MIT License | BSD 3-clause "New" or "Revised" 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.
-
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.
attoparsec
Posts with mentions or reviews of attoparsec.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-03-24.
-
Functional Implementation of a parser?
The basic idea is to create a state monad (usually using the State monad transformer) which contains a string to be parsed, and which also lifts other monad transformers like Except for throwing syntax errors. Or you can use a parser combinator like Parser provided by a parsing library like Megaparsec or Attoparsec that defines an efficient State+Except monad transformer combination for you.
-
Haskell - Important Libraries
attoparsec
-
On a daily base in this sub
good libraries for parsing: parsec, attoparsec etc.
- Parser Combinators in Haskell
-
Splitting html tags string into list of string
The more "idiomatic" way would be to use a parser library, e.g. parsec, attoparsec, or megaparsec. But even then I think it would be a lot easier to maintain if you could preserve the angle brackets <> in the input.
-
Ditch regex for parser combinators, a Rust / nom step-by-step guide
- https://hackage.haskell.org/package/attoparsec - https://hackage.haskell.org/package/megaparsec
What are some alternatives?
When comparing pyparsing and attoparsec you can also consider the following projects:
parsita - The easiest way to parse text in Python
megaparsec - Industrial-strength monadic parser combinator library
iregex - A way to write regex with objects instead of strings.
parsec - A monadic parser combinator library
parser - String parser combinators
attoparsec-parsec - An Attoparsec compatibility layer for Parsec
sly - Sly Lex Yacc
attoparsec-data - Parsers for the standard Haskell data types
assert-combinators - Functional assertion combinators.
parsers - Generic parser combinators
Lark - Lark is a parsing toolkit for Python, built with a focus on ergonomics, performance and modularity.
parser-combinators - Lightweight package providing commonly useful parser combinators