writing an interpreter for a simple language

Discussion in 'C Programming' started by eyalkz, Oct 28, 2003.

  1. eyalkz

    eyalkz Guest

    Hi Everybody,

    I need to write a simple interpreter (in C) for a very Simple language...
    the language (was invented for the project) has only

    variable or numbers (there are also built-in variables)
    routines and expressions (routines can have recursion )

    where can I find help and source code on that project...?

    I heard this assignment is often given to students on programming courses...

    Please Help,
    Egal Konn
     
    eyalkz, Oct 28, 2003
    #1
    1. Advertising

  2. eyalkz wrote:
    >
    > Hi Everybody,
    >
    > I need to write a simple interpreter (in C) for a very Simple language...
    > the language (was invented for the project) has only
    >
    > variable or numbers (there are also built-in variables)
    > routines and expressions (routines can have recursion )
    >
    > where can I find help and source code on that project...?
    >
    > I heard this assignment is often given to students on programming courses...
    >
    > Please Help,
    > Egal Konn


    Try using YACC to generate your interpreter since you want it in C.

    --
    Julian V. Noble
    Professor Emeritus of Physics

    ^^^^^^^^^^^^^^^^^^
    http://galileo.phys.virginia.edu/~jvn/

    "Science knows only one commandment: contribute to science."
    -- Bertolt Brecht, "Galileo".
     
    Julian V. Noble, Oct 28, 2003
    #2
    1. Advertising

  3. "eyalkz" <> wrote in message
    news:...
    > Hi Everybody,
    >
    > I need to write a simple interpreter (in C) for a very Simple language...
    > the language (was invented for the project) has only
    >
    > variable or numbers (there are also built-in variables)
    > routines and expressions (routines can have recursion )
    >
    > where can I find help and source code on that project...?
    >
    > I heard this assignment is often given to students on programming

    courses...

    Books on compilers should describe how to write parsers, which are the most
    important part. You might also look to lex/flex and bison/yacc, tools to
    make parser writing easier.

    -- glen
     
    Glen Herrmannsfeldt, Oct 28, 2003
    #3
  4. Hi,

    try CioinaEval from http://www.delphipages.com/result.cfm?ID=3482

    (eyalkz) wrote in message news:<>...
    > Hi Everybody,
    >
    > I need to write a simple interpreter (in C) for a very Simple language...
    > the language (was invented for the project) has only
    >
    > variable or numbers (there are also built-in variables)
    > routines and expressions (routines can have recursion )
    >
    > where can I find help and source code on that project...?
    >
    > I heard this assignment is often given to students on programming courses...
    >
    > Please Help,
    > Egal Konn
     
    Alexei Cioina, Oct 29, 2003
    #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. C B
    Replies:
    1
    Views:
    440
  2. eyalkz

    build an interpreter for a simple language

    eyalkz, Oct 29, 2003, in forum: C Programming
    Replies:
    2
    Views:
    584
    Tristan Miller
    Oct 29, 2003
  3. Replies:
    3
    Views:
    762
    Ziga Seilnacht
    Jan 3, 2007
  4. luvsat
    Replies:
    5
    Views:
    334
  5. Shravani
    Replies:
    8
    Views:
    802
    Bartc
    Mar 16, 2008
Loading...

Share This Page