Discussion: using a "parsing" library
See original GitHub issue@alanmcruickshank I see that the project implements its own parsing primitives from scratch in parser/
, I’m curious if you think introducing a dedicated library like parsy would be beneficial (I picked a parser combinator because it’s close to the pattern we’re using).
IMO that could mean less code to maintain on our end, and less concepts that people need to get “familiar with” if they want to contribute to the parser (and are familiar with parser combinators). I’d hope we would get performance improvements too!
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
parsing-library · GitHub Topics
A DOM-less JSON parser that can parse a JSON object without allocating a single byte of memory on the heap. json cpp messages...
Read more >How to Select the Right Library for Parsing HTML | Agatton
This article will discuss practical ways to get the correct library to process HTML using C#, Java, Python, and Javascript. Parsing HTML ...
Read more >Your favourite parser library? : r/Python - Reddit
So I thought: let's ask this community: what library/libraries do you use to write parsers? I'm curious to see what's popular and why!...
Read more >Parsing text with Python - vipinajayakumar
Parsing in Python: Tools and Libraries: Tools and libraries that allow you to create parsers when regular expressions are not enough. Conclusion.
Read more >Web Scraping and HTML Parsing using BeautifulSoup Python ...
BeautifulSoup is a useful Python Library for parsing HTML and XML. In this article, I will discuss how to install BeautifulSoup and parse...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@dmateusp and I had a brief discussion on this topic in the context of #325, which surfaced a tricky parsing ambiguity with angle brackets and relational operators. I think we are converging on a conclusion that we have a workable approach for now, so using a parsing library is not needed, at least for the foreseeable future. Should we close this ticket?
So I will take your requirements list @alanmcruickshank and your concerns @barrywhart and try to implement a POC that satisfies both, or at least illustrates what’s not working!
We (at Earnest) use a parsing library often which follows the same principles as
parsy
(but in Haskell) to validate CLI inputs, the most complex use of it we have (that I’m aware of) is translating Glue API responses into types to do a translation from a Glue Schema to a Snowflake Schema.For these use cases in my opinion we end up with very readable and re-usable code, but I haven’t done anything as complex as what is done in
sqlfluff
, so it’ll be interesting!