syntax of C for Parser Generator

J

Jang

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 ?

Thank in advance.
 
J

Jack Klein

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 ?

Thank in advance.

Always check to see if a group has a FAQ and see if it answers your
question before posting.

In this case, see question 18.15. There is a link to the FAQ in my
signature block.
 
K

Keith Thompson

Jang said:
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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top