
Am Montag, den 30.05.2005, 19:18 +0100 schrieb Duncan Coutts:
On Thu, 2005-05-26 at 16:46 +1000, Manuel M T Chakravarty wrote:
Duncan Coutts:
On Wed, 2005-05-25 at 11:44 +1000, Manuel M T Chakravarty wrote:
An Alex/Happy parser would be an option if it improves matters significantly. If you or anybody else has a go at it, please follow the C language definition closely, as does the existing lexer and parser (with comments stating to which sections in K&R the individual productions relate).
Intrim status update:
Another status update:
I started with a yacc C grammar and added the semantic actions by translating from the existing parser. I reordered the clauses to match the order in the original parser and kept the comments (but removed the bits that are no longer true). I think I've added back in all the syntactic extensions supported by c2hs. There is one shift/reduce conflict to do with the "if then else" syntax which I believe is benign.
It's not quite finished yet (in particular I've not done allocation of attributes), but it does already parse the Gtk+ headers. It is quite quick and importantly uses very little heap space. [..]
Sounds all very promising. Thanks for the effort! Manuel