Yeah, I have an old toy language with the same idea (also using PEG-style parsing).
-
-
Replying to @pervognsen @marc_b_reynolds
Metalua does the same thing using recursive descent parser combinators:https://github.com/fab13n/metalua/blob/master/metalua/grammar/generator.lua …
2 replies 0 retweets 0 likes -
Replying to @pervognsen
I know nothing about parser combinators..know of a good overview paper/site?
1 reply 0 retweets 0 likes -
Replying to @marc_b_reynolds
They're just higher-order functions that return parsers. There's not much to it.
1 reply 0 retweets 0 likes -
Replying to @pervognsen @marc_b_reynolds
E.g. 'sequence' takes a list of parsers and returns a parser that tries each of the parsers, PEG-style, in turn.
1 reply 0 retweets 0 likes -
Replying to @pervognsen
OK, so the name says exactly what it does...thanks.
1 reply 0 retweets 0 likes -
Replying to @marc_b_reynolds
Heh,
@TimSweeneyEpic showed me a neat template parser combinator library in 2003, before Boost Phoenix sullied the idea.2 replies 0 retweets 1 like -
Replying to @pervognsen @TimSweeneyEpic
IMHO an extensible grammar system GP could been quite interesting.."one-size fits all" doesn't work.
1 reply 0 retweets 0 likes -
Replying to @marc_b_reynolds @TimSweeneyEpic
Lisp macros are the sweet spot where you have a skeleton syntax (S-expressions) to allow composability.
2 replies 0 retweets 1 like -
Replying to @pervognsen @marc_b_reynolds
language that has full evaluation capability at the type level needs relatively little in the way of macros.
2 replies 0 retweets 0 likes
Maybe just some string-identifier translation and scope management.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.