Pegged, a Parsing Expression Grammar (PEG) generator in D
Alex Rønne Petersen
xtzgzorex at gmail.com
Sun Mar 11 05:33:17 PDT 2012
On 11-03-2012 08:22, Philippe Sigaud wrote:
> On Sun, Mar 11, 2012 at 00:34, Alex Rønne Petersen<xtzgzorex at gmail.com> wrote:
>
>> Admittedly I have not heard of PEGs before, so I'm curious: Is this powerful
>> enough to parse a language such as C?
>
> I think so. But you'd have to do add some semantic action to deal with
> typedefs and macros.
Oh, I should have mentioned I only meant the actual language (ignoring
the preprocessor).
Why do you need semantic actions for typedefs though? Can't you defer
resolution of types until after parsing?
>
> People parsed Java and Javascript with them. I personnally never used
> Pegged for more than JSON and custom formats, but I intend to try the
> D grammar.
--
- Alex
More information about the Digitalmars-d-announce
mailing list