Pegged, a Parsing Expression Grammar (PEG) generator in D

Philippe Sigaud philippe.sigaud at gmail.com
Sun Mar 11 10:06:34 PDT 2012


>> On Sun, Mar 11, 2012 at 00:34, Alex Rønne Petersen<xtzgzorex at gmail.com>
 wrote:

[Parsing 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).

OK. I admit I downloaded the C spec online, but was a bit taken aback by
the size of it. mot of it was the definition of the standard library, but
still...

> Why do you need semantic actions for typedefs though? Can't you defer
resolution of types until after parsing?

Yes, that the way I'd do it. But some people seem to want to do it while
parsing. Maybe it blocks some parsing, if the parser encounter an
identifier where there should be a type?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-announce/attachments/20120311/f16b2ca5/attachment-0001.html>


More information about the Digitalmars-d-announce mailing list