Compile Time D Expression Parser?

Dmitry Olshansky dmitry.olsh at gmail.com
Mon Feb 27 02:42:03 PST 2012


On 26.02.2012 15:07, kenji hara wrote:
> Hisayuki Mima's ctpg is compile-time parser generater, and the
> generated parser works in compile time!
> https://github.com/youkei/ctpg
>
> Kenji Hara
>

Nice! I'm curious as to which parsing method the generated parser does 
employ (it isn't immediately obvious ;) ).
Examples look good, but I don't seem to get how recursive sample
fails match(?) e.g. "aaaaa" given the grammar:
recursive -> A $
A -> a A a | a

I mean it's any odd-length sequence of a.

-- 
Dmitry Olshansky


More information about the Digitalmars-d mailing list