Hi Michael,

I was wondering if any of you out there have a freely licensed PEG for
C?

No guarantees that left recursion has been removed correctly. C grammars also admit a lot that is syntactically correct but semantic nonsense and that has to be eliminated in the middle of the compiler. (The standard is large in part because they have to explain, in English, all the exceptions to the overly-permissive rules in their grammar.)

In my experience, parsing C is fairly easy but pre-processing real- world .c and .h files into something you can then parse is a nightmare.

Cheers,
Ian

Attachment: c99.leg
Description: Binary data

_______________________________________________
fonc mailing list
[email protected]
http://vpri.org/mailman/listinfo/fonc

Reply via email to