By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,389 Members | 1,844 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,389 IT Pros & Developers. It's quick & easy.

syntax of C for Parser Generator

P: n/a
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.


Nov 14 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On Sun, 4 Jan 2004 03:39:47 +0100, "Jang" <ja****@wp.pl> wrote in
comp.lang.c:
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.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
Nov 14 '05 #2

P: n/a
"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"
Nov 14 '05 #3

P: n/a
> 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?


It's my homework.
Nov 14 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.