"Jang" <ja****@wp.pl> writes:
Could anyone point or send me a syntax of C which fits to Parser Generator
(YAAC) ? I've got a big problem because I have to write a translator
C ->assembler :[ There is a lot of work to convert rules in BNF to YAAC.
How to deal with it ?
Jack Klein pointed you to the FAQ. Something it doesn't directly
mention is that you're likely to run into problems with typedefs. An
identifier that's been declared as a typedef has to be parsed as if it
were a keyword (like int or float). This means you need feedback from
the symbol table to the parser.
BTW, a C->assembler translator is also known as a compiler; a number
of them already exist. Why do you need to write your own?
--
Keith Thompson (The_Other_Keith)
ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://www.sdsc.edu/~kst>
Schroedinger does Shakespeare: "To be *and* not to be"