On 13 May 2015 at 17:11, Jonathan S. Shapiro <[email protected]> wrote: > > > Well, you certainly don't want blind looping, but I think you mean > backtrack here rather than loop. And it's not so much that you don't want > to backtrack as that you don't want to redo the work you have already done > when you *do* backtrack. But assuming your parser is functional, it's a > performance issue rather than a correctness issue. > > Hmm. Though it really helps to be able to do some compile-time analysis so > that you know when memoized subtress can safely be discarded as unreachable. >
What I meant is that we want to produce a parser specialised to the grammar as the output of the combinator meta-program. In other words the meta-program consists of combinators that output an AST, and another meta-program that reads he AST and generates the specialised parser. This is a bit like parser generators the read EBNF syntax and output C/C++ code, except the combinators form a DSL in the host language, and the code generation happens at compile time in the meta program, instead of a tool outside the language. Keean.
_______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
