Live data from Hacker News

What the heck is a parser-combinator?

kimpel.com

11–20 of 74 posts

Re: What the heck is a parser-combinator?

#12
A few years ago I worked on a similar kind of project as part of my bachelors. We were converting SQL for Oracle to SQL for Microsoft SQL Server. One problem is dealing with features which language A supports and language B doesn't. Another problem is that it is a huge amount of work to match all syntax elements as well as all library usages. In fact, I guess it's not a good thing to say on HackerNews, but isn't it better to just buy a tool which does it for you? It seems like they are available for the author's use case: http://www.ispirer.com/application-conversion/jcl-to-powersh...

Re: What the heck is a parser-combinator?

#13
post #3

Gotta love Parsec for Haskell and pyparsing for Python. Some other awesome parsing libs: PEGTL - C++ Parsing Expression Grammar Template Library https://github.com/taocpp/PEGTL Parboiled - Java & Scala PEG Library https://github.com/sirthias/parboiled Nom - Rust parser combinator framework https://github.com/Geal/nom Nearley - JavaScript parser toolkit https://github.com/Hardmath123/nearley Neotoma - Erlang library a…

I've used Nom to parse a couple RFC-based protocols now, and I'm amazed at how easy and performant the result ends up being. There's a great walk-through of using it here, including fuzzing your parsers to make sure they're solid. https://github.com/Geal/langsec-2017-hackathon-code

Geal is very helpful too, he pops up around the place in the Rust community and is responsive on the nom Gitter channel.

Re: What the heck is a parser-combinator?

#14
post #3

Gotta love Parsec for Haskell and pyparsing for Python. Some other awesome parsing libs: PEGTL - C++ Parsing Expression Grammar Template Library https://github.com/taocpp/PEGTL Parboiled - Java & Scala PEG Library https://github.com/sirthias/parboiled Nom - Rust parser combinator framework https://github.com/Geal/nom Nearley - JavaScript parser toolkit https://github.com/Hardmath123/nearley Neotoma - Erlang library a…

angstrom - OCaml parser combinators built for speed and memory efficiency https://github.com/inhabitedtype/angstrom

Re: What the heck is a parser-combinator?

#15
post #3

Gotta love Parsec for Haskell and pyparsing for Python. Some other awesome parsing libs: PEGTL - C++ Parsing Expression Grammar Template Library https://github.com/taocpp/PEGTL Parboiled - Java & Scala PEG Library https://github.com/sirthias/parboiled Nom - Rust parser combinator framework https://github.com/Geal/nom Nearley - JavaScript parser toolkit https://github.com/Hardmath123/nearley Neotoma - Erlang library a…

Instaparse - Clojure/Clojurescript https://github.com/Engelberg/instaparse

Re: What the heck is a parser-combinator?

#17
post #12

A few years ago I worked on a similar kind of project as part of my bachelors. We were converting SQL for Oracle to SQL for Microsoft SQL Server. One problem is dealing with features which language A supports and language B doesn't. Another problem is that it is a huge amount of work to match all syntax elements as well as all library usages. In fact, I guess it's not a good thing to say on HackerNews, but isn't it b…

>One problem is dealing with features which language A supports and language B doesn't.

That's not a problem with parsers or parser-combinators though. That's a problem with converting from one DB to another.

Re: What the heck is a parser-combinator?

#19
Let's rant a little: why the fuck can't you use some darker color for your text?

Fucking tired of no-contrast website which are a pain to read. I hate having to use a DOM inspector to change some color to #000 so I can see if the content is useful.

I guess I should be happy it is not an only-js blog.

Re: What the heck is a parser-combinator?

#20
post #3

Gotta love Parsec for Haskell and pyparsing for Python. Some other awesome parsing libs: PEGTL - C++ Parsing Expression Grammar Template Library https://github.com/taocpp/PEGTL Parboiled - Java & Scala PEG Library https://github.com/sirthias/parboiled Nom - Rust parser combinator framework https://github.com/Geal/nom Nearley - JavaScript parser toolkit https://github.com/Hardmath123/nearley Neotoma - Erlang library a…

Pegged - PEG generator implemented in the D programming language https://github.com/PhilippeSigaud/Pegged , works in run-time or compile-time
Post reply on HN