<p><br>
>> On 2012-07-05 18:32, Roman D. Boiko wrote:<br>
>><br>
>>> My vote would be for Pegged, I guess.<br></p>
<p>As much as I'm flattered by that, my current impression is Pegged is very far from being performant. </p>
<p>As a proof-of-concept that, in D,  it's possible to parse a string and create a parse tree at compile-time and then generate code from this, it's also successful. Go D!</p>
<p>As a parser proper, Pegged is awful :-) Nothing I'm ashamed of, as I learn by coding. Hey, I just received the Dragon Book (International Edition), I'm sure I'll learn many things in there.</p>
<p>So, if anyone is willing to change the code generated by Pegged, I'm game. The results you showed me on keyword parsing are very interesting!</p>
<p>But, my impression is that the need for a 'D'-only parser and lexer is far greater and much more imediate that the need for a parser generator. All the reasons advanced upthread ask for a D parser, not a generic generator. Parser generators are for those of us interested in having DSLs or macros in D.<br>

So Pegged or any other generator should *not* get the community focus right now.</p>
<p>My plan would be as follow:</p>
<p>1- assemble a group of people knowing parsing. I don't think I'm exactly knowledgeable, but I'm ready to be part of such a group. <br>
2- create a github process.<br>
3- translate an existing parser / adapt a D parser for Phobos. I'm ready to be part of this (I'm sure I'll learn in the process)<br>
4- spend 1-2 years fighting over LR parsing and such :) (Just kidding)<br>
5- submit it to Phobos and have it adopted.</p>
<p>much later:<br>
6- see the way the parser code is organized and tweak a code generator (Pegged is a possibility if recursive parsing is OK) to produce an equivalent code when fed the D grammar.</p>
<p>side-effect: maybe a std.tree or std.collection.tree to deal with trees in a generic way.</p>
<p>Philippe</p>