D parsing

Chad Joan chadjoan at gmail.com
Wed Nov 6 00:18:31 PST 2013


On Tuesday, 5 November 2013 at 16:31:52 UTC, Philippe Sigaud 
wrote:
> On Tue, Nov 5, 2013 at 5:45 AM, Chad Joan <chadjoan at gmail.com> 
> wrote:
>
>>  Use the repetition operator(s) and turn the resulting array 
>> into
>>> whatever tree you like.  In practice, I have never had a 
>>> problem with this.
>>>
>>> I have used both Pegged and have written an SQL parser at 
>>> work (not
>>> exhaustive, just what's needed) that uses C macros as PEG 
>>> elements.
>>>  Tangent: Using C macros for this worked surprisingly well 
>>> and allowed me
>>> to avoid an extra step in the build process (I do not have 
>>> access to D for
>>> that project).  Pegged is still much more scalable, 
>>> optimizable, and the
>>> grammars are a lot less ugly/finicky.
>>>
>>
> That made my day, thanks!

You're very welcome!

Thank you for spending all that time to make a neat thing.

Maybe I'll rub it in:
Pegged taught me about PEGs and how to build reasonably powerful 
parsers with extremely limited tools and support.  It's like 
being able to make shelter in the woods when no one gives you a 
tent.  And my company's codebase is a jungle.  So even when D 
isn't around, it is still /useful/.  Thanks.


More information about the Digitalmars-d mailing list