A new lexer/parser for c2hs [was: [C2hs] Re: support for 6.4]

Manuel M T Chakravarty chak at cse.unsw.edu.au
Mon May 30 23:54:12 EDT 2005


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




More information about the C2hs mailing list