Newsgroups: comp.lang.c Path: utzoo!henry From: henry@utzoo.uucp (Henry Spencer) Subject: Re: Want C syntax in lex Message-ID: <1989Mar29.224649.5766@utzoo.uucp> Organization: U of Toronto Zoology References: <2188@mister-curious.sw.mcc.com> Date: Wed, 29 Mar 89 22:46:49 GMT In article <2188@mister-curious.sw.mcc.com> loo@mister-curious.sw.mcc.com (Joel Loo) writes: >Is there a C syntax definition in lex which can be obtained easily? Um, surely you are thinking of yacc, not lex? It's easy enough to write a lex description of the syntax of C's tokens, if you ignore one or two preprocessor oddities, but a full syntax of C can't possibly be done in lex -- you need something like yacc for that. I did a lex description of C tokens a couple of years ago which I can post if people are interested. It's not up-to-date in a couple of small respects, I think, but it's close. -- Welcome to Mars! Your | Henry Spencer at U of Toronto Zoology passport and visa, comrade? | uunet!attcan!utzoo!henry henry@zoo.toronto.edu