Hi Michael,
Check out Rats source distribution (
http://www.cs.nyu.edu/rgrimm/xtc/xtc-core.zip )
in xtc/src/xtc/lang/C.rats which is a complete C grammar. It might use
Rats-specific constructs and the license is GPL2 so maybe not liberal
enough.
Regards,
Robert Feldt
On Thu, May 1, 2008 at
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
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.
Its the C preprocessor macros that often make the semantics undecypherable
to a machine process.
Aaron
___
Hi,
Ian Piumarta [EMAIL PROTECTED] writes:
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.
I guess I'll start with CPP then. I found a BSD-licensed preprocessor
that looks really good:
Hi all,
I was wondering if any of you out there have a freely licensed PEG for
C? I'm interested in combining it with a C preprocessor grammar to
start interpreting (or compiling via Slink) some C code. With a
little work, this would be extensible to handle Id code, and then we'd
be one step