guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Parsing


From: Ian Grant
Subject: Re: Parsing
Date: Mon, 15 Sep 2014 16:45:48 -0400

I'll make this the last reply to my own message.

Here is a memoizing (with 'eager' semantic actions) implementation of Ridge's combinator parsers in 221 lines of Standard ML. Scheme wouldn't be much more,
Adding the binarizing grammar generator and an Earley oracle wouldn't add more than another 300 lines, perhaps.

https://code.google.com/p/metaprogramming/source/browse/Parser.sml

and there are the parser monads here, which are tiny:

https://code.google.com/p/metaprogramming/source/browse/ParserMonad.sml

and here's the parser-generator which does a totally unnecessary two-stage bootstrap that is just showing off. Without this it would be 1/3d of the length it is.

https://code.google.com/p/metaprogramming/source/browse/ParserModule.sml

Happy software engineering!

​Ian


reply via email to

[Prev in Thread] Current Thread [Next in Thread]