Re: [fonc] working on a C grammar

2008-05-01 Thread Robert Feldt
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

Re: [fonc] working on a C grammar

2008-05-01 Thread Ian Piumarta
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

Re: [fonc] working on a C grammar

2008-05-01 Thread Aaron Gray
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 ___

Re: [fonc] working on a C grammar

2008-05-01 Thread Michael FIG
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:

[fonc] working on a C grammar

2008-04-30 Thread Michael FIG
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