ANN: Parser Combinator library

43 views
Skip to first unread message

Wim Vanderbauwhede

unread,
Aug 27, 2013, 10:15:34 AM8/27/13
to lives...@googlegroups.com
Hi folks,

In case you're interested, I've just written a parser combinator library in LiveScript. If you need to do some parsing and don't want to go for heavyweight grammars and parser generators, you might want to give it a try.
For example, to  parse a JavaScript variable declaration

     var res = 42;

the parser is simply

    p = sequence [
            symbol('var'),   
            word,
            symbol('='),
            natural,
            semi
        ]

Please have a look at https://github.com/wimvanderbauwhede/parser-combinators-ls

Have fun,

Wim

Reply all
Reply to author
Forward
0 new messages