Tools for lexing and utilizing lexemes that integrate with Parsec.

Latest on Hackage:0.0.2

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow to host generated Haddocks.

BSD3 licensed by Zankoku Okuno

Like parser combinators? Building a big parser? Save hundreds of sloc, hours of debuging and several headaches by using Luthor on top of the familiar Parsec library.

Parsec works great for small parsers, but as the size of the parser grows, complexity can grow exponentially without taking serious and tricky precautions. Luthor provides reusable utilities to isolate the complex parts of parsing. Amonst its weaponry are 1) more composable combinators, 2) pre-built token parsers, 3) tools to build a scannerful parser, and 4) tools to work with indentation. Luthor reduces overall complexity, generally increases performance and error reporting, and cuts down on wheel re-invention.

BIG CAVEAT: It is difficult to understand all the ways in which Parsec fails to be composable, so there may be some combinators in Luthor which fail to be composable. If you're getting weird (i.e. Parsec-like) results, add a try and please report.


Change Log

v0.0.1 -- 2014-10-12

  • Text.Luthor.Syntax.scientific: Hexadecimal notation now uses p instead of h. Hopefully this is easier to read. Decimal notation can also use p.
  • Text.Luthor.Syntax.scientific: Now accepts bases 2, 8, 10 and 16, just like the other parsers.
  • Fixed failure-to-backtrack bug in Text.Luthor.Combinators.many etal.
  • Added Text.Luthor.Syntax.ellipsis2 and .ellipsis3.
  • Added Text.Luthor.Syntax.manyChar and .many1Char.
  • Added Text.Luthor.Syntax.hexOctet.
  • Changed Text.Luthor.Syntax.uniIdClass to .uniId, and likewise for .uniIdMinus.

v0.0.2 -- 2015-11-25

  • Text.Luthor.Indent: Removed Text.Parsec.Prim.many export
Depends on:
Used by 1 package:
comments powered byDisqus