syntax of C for Parser Generator

Discussion in 'C Programming' started by Jang, Jan 4, 2004.

  1. Jang

    Jang Guest

    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.
    Jang, Jan 4, 2004
    #1
    1. Advertising

  2. Jang

    Jack Klein Guest

    On Sun, 4 Jan 2004 03:39:47 +0100, "Jang" <> 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/~ajo/docs/FAQ-acllc.html
    Jack Klein, Jan 4, 2004
    #2
    1. Advertising

  3. "Jang" <> 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) <http://www.ghoti.net/~kst>
    San Diego Supercomputer Center <*> <http://www.sdsc.edu/~kst>
    Schroedinger does Shakespeare: "To be *and* not to be"
    Keith Thompson, Jan 4, 2004
    #3
  4. Jang

    Jang Guest

    > 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.
    Jang, Jan 4, 2004
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Martin Maurer
    Replies:
    3
    Views:
    4,784
    Peter
    Apr 19, 2006
  2. TheDustbustr
    Replies:
    1
    Views:
    437
    Sami Hangaslammi
    Jul 25, 2003
  3. Replies:
    9
    Views:
    531
  4. Chris Withers

    Problems with email.Generator.Generator

    Chris Withers, Sep 11, 2006, in forum: Python
    Replies:
    20
    Views:
    1,673
    Max M
    Sep 12, 2006
  5. Terry Reedy

    Generator functions subclass generator?

    Terry Reedy, Jun 18, 2009, in forum: Python
    Replies:
    0
    Views:
    449
    Terry Reedy
    Jun 18, 2009
Loading...

Share This Page