3 ms·
Seeing how im advocating that everyone should know when to be using parsing tools rather than cobbling together a regexp cludge, here are some links to some rel
by brehaut 16y ago
Seeing how im advocating that everyone should know when to be using parsing tools rather than cobbling together a regexp cludge, here are some links to some relevant tools in a variety of languages. Note that these are not parser generator tools, but parser combinator libraries:
* Python:
PyParsing - http://pyparsing.wikispaces.com/ - this
is probably the most well respected parser library
for python
picoparse - http://github.com/brehaut/picoparse - My
parsec inspired parser combinator library. It is
significantly more light weight than pyparsing, and
I would recommend pyparsing in its place for more
heavy lifting parsers.
* Ruby:
RParsec - http://rubyforge.org/projects/rparsec/ - A
ruby implementation of Parsec. I've heard good
things about it.
* Haskell:
Parsec - http://legacy.cs.uu.nl/daan/parsec.html -
This is an amazing library, worth anyones time.
http://book.realworldhaskell.org/read/using-parsec.html
http://www.haskell.org/haskellwiki/Parsec
* F#:
FParsec - http://www.quanttec.com/fparsec/ - This is
reason enough to learn F#; it is a fairly true port
of the haskell library and very nice to use.
* Scala:
Packrat Parsing - I believe this is part of the
standard lib. http://www.scala-lang.org/docu/files/api/scala/util/parsing/combinator/PackratParsers.html
* Clojure:
fnparse - http://github.com/joshua-choi/fnparse
* Java:
jparsec - http://jparsec.codehaus.org/
[edits: formating]
- jasonkester 16y agoI think this actually illustrates the other guy's point. If you want a parser, you need to go download code off the internet. If you want a Regex, you type something along the lines of new Regex().
- util 16y agohttp://research.microsoft.com/en-us/um/people/daan/parsec.html http://research.microsoft.com/en-us/um/people/daan/parsec.ht... "Nowadays, Parsec is distributed with the standard Haskell libraries with most Haskell compilers (GHC, NHC, Hugs)."
- trevorcreech 16y agoTreetop for Ruby looks pretty cool too: http://treetop.rubyforge.org/ http://treetop.rubyforge.org/