query

Discussion in 'C Programming' started by indian, Sep 27, 2005.

  1. indian

    indian Guest

    i want to work on a c project can anybody suggest me one?
     
    indian, Sep 27, 2005
    #1
    1. Advertising

  2. "indian" <> wrote in message
    news:...
    > i want to work on a c project can anybody suggest me one?

    off topic
    Alex
     
    Alexei A. Frounze, Sep 27, 2005
    #2
    1. Advertising

  3. indian

    Robben Guest

    indian wrote:
    > i want to work on a c project can anybody suggest me one?


    Try to create a parser which checks if the file passed in is a valid c
    program.

    example

    int main()
    {
    //ss
    return 0;
    }

    1) get the tokens first is int store it in some place
    2) get the next token whic is main store it in some place and you
    should expect ( as next token if you cannot get then log an error lly )
    3) get the next token found // which means it is a comment, so ignore
    the complete line
    4) get the next token in the next line, found return store it in some
    place
    5) get the next token found 0 store it in some place, log an error if
    the return value is not int.

    hope you got what I am expecting,

    You can keep on adding additional features to it until you are
    satisfied...
     
    Robben, Sep 27, 2005
    #3
  4. indian

    Savio Guest

    Dear indian ..

    In my point of view rather than moving to application
    programming in C it would be better if u can do some system programming
    like developing some drivers like that .... these things r little bit
    tough but if u develop one it can make a real change in ur career. like
    for example u can develop a driver for the modem of the computer
    running Linux Redhat 9.0 ...
     
    Savio, Sep 27, 2005
    #4
  5. "Robben" <> writes:
    > indian wrote:
    >> i want to work on a c project can anybody suggest me one?

    >
    > Try to create a parser which checks if the file passed in is a valid c
    > program.
    >
    > example
    >
    > int main()
    > {
    > //ss
    > return 0;
    > }
    >
    > 1) get the tokens first is int store it in some place
    > 2) get the next token whic is main store it in some place and you
    > should expect ( as next token if you cannot get then log an error lly )
    > 3) get the next token found // which means it is a comment, so ignore
    > the complete line
    > 4) get the next token in the next line, found return store it in some
    > place
    > 5) get the next token found 0 store it in some place, log an error if
    > the return value is not int.


    A C tokenizer, or perhaps a preprocessor, would be a good
    intermediate-level C project. A C parser is substantially more
    advanced. You can't just read tokens and determine whether each one
    is valid. If you want a fully general parser, there are aspects of C
    that make it more complex than many other languages; typedef names are
    treated differently than ordinary identifiers.

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
    We must do something. This is something. Therefore, we must do this.
     
    Keith Thompson, Sep 27, 2005
    #5
    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. Learner
    Replies:
    1
    Views:
    1,024
    Marina Levit [MVP]
    Jan 30, 2006
  2. Anonymous
    Replies:
    0
    Views:
    1,546
    Anonymous
    Oct 13, 2005
  3. David Gordon

    xpath query query

    David Gordon, May 18, 2005, in forum: XML
    Replies:
    2
    Views:
    831
    David Gordon
    May 18, 2005
  4. Eric Nelson
    Replies:
    5
    Views:
    1,574
    Alexey Smirnov
    Feb 4, 2009
  5. Jon F.

    CAML Query: Multiple Query Fields Issue

    Jon F., May 12, 2004, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    773
    Jon F.
    May 12, 2004
Loading...

Share This Page