Closed Thread
Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19

Thread: parser for c language help me

  1. #11
    Join Date
    Mar 2008
    Location
    The North Pole
    Posts
    13,174
    Blog Entries
    13
    Rep Power
    114

    Re: parser for c language help me

    So - I presume English isn't your primary language? What do you speak fluently?

    Quote Originally Posted by Jordan View Post
    Good members, like yourself, stick around and post for ages to come!
    Mr. Xav | Blog | Forums

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Location
    Advertising world
    Posts
    Many

     
  3. #12
    ~bleach~ is offline Newbie
    Join Date
    May 2008
    Posts
    15
    Rep Power
    0

    Re: parser for c language help me

    iam arabian man

  4. #13
    Join Date
    Mar 2008
    Location
    The North Pole
    Posts
    13,174
    Blog Entries
    13
    Rep Power
    114

    Re: parser for c language help me

    Really! Great! Salaam akaykum!

    Quote Originally Posted by Jordan View Post
    Good members, like yourself, stick around and post for ages to come!
    Mr. Xav | Blog | Forums

  5. #14
    ~bleach~ is offline Newbie
    Join Date
    May 2008
    Posts
    15
    Rep Power
    0

    Re: parser for c language help me

    alekm alslam

  6. #15
    Join Date
    May 2008
    Posts
    2,126
    Blog Entries
    1
    Rep Power
    33

    Re: parser for c language help me

    Ok this gives an example of "parsing" text in the way that you want to....

    Code:
    /* Parsing Function */
    #include <windows.h>
    #include <iostream>
    using namespace std;
    
    void Parse_It(char* the_text);
    
    int main() {
        char text_line[300];
        while (1) {
              cout << "Enter a line of text to be parsed: ";
              cin.getline(text_line, 299, '\n');
              Parse_It(text_line);
        }
    }
    
    void Parse_It(char* the_text) {
         int i;
         int len_str = strlen(the_text);
         for (i = 0; i < len_str; i++) {
             if ((the_text[i] != 'a') && (the_text[i] != 'b')) {
                 cout << "Invalid character(s) in the phrase\n";
                  return;         
             }
         }
         cout << "All character(s) are valid!\n";         
    }
    Hope this helps.......
    Last edited by MeTh0Dz; 05-29-2008 at 02:52 PM.

  7. #16
    ~bleach~ is offline Newbie
    Join Date
    May 2008
    Posts
    15
    Rep Power
    0

    Re: parser for c language help me

    you right it in c++ but i want it in c

    second i want the user he input what he want from language

    you can see what i put in the first in this subject in c langage and try to fixed it

    iam trying to understand it but i like it in c and have many function

  8. #17
    Join Date
    May 2008
    Posts
    2,126
    Blog Entries
    1
    Rep Power
    33

    Re: parser for c language help me

    Dude what do you think I am your personal coder? C and C++ syntax does not differ much especially in simple stuff like this, just substitute out the C++ only stuff. You should be able to look at my code and figure out what you need to change in order to get it to do what you need. Otherwise you are nothing but a scriptkiddie, and scriptkiddies are teh sux.

  9. #18
    ~bleach~ is offline Newbie
    Join Date
    May 2008
    Posts
    15
    Rep Power
    0

    Re: parser for c language help me

    ok thankyou for helping me

  10. #19
    Join Date
    May 2008
    Posts
    2,126
    Blog Entries
    1
    Rep Power
    33

    Re: parser for c language help me

    Yeah just experiment with that code and eventually you'll get what you need. The only functionality you really need to add is what characters to check for, which won't be difficult at all if you see how I am already doing it with "a" and "b". It already prompts the user for the string to parse..

Closed Thread
Page 2 of 2 FirstFirst 12

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Need help with php dom parser
    By thatsme in forum PHP Development
    Replies: 1
    Last Post: 07-18-2011, 05:00 AM
  2. Irc Parser
    By Warrior in forum Member Software/Projects
    Replies: 2
    Last Post: 07-07-2010, 10:27 AM
  3. help with cfg parser!
    By ASDF_guy in forum The Lounge
    Replies: 1
    Last Post: 05-08-2009, 09:06 AM
  4. XML Parser
    By John_L in forum Perl
    Replies: 1
    Last Post: 05-13-2008, 05:22 PM
  5. Help in SLR parser
    By vithasekar in forum C and C++
    Replies: 3
    Last Post: 02-14-2007, 11:50 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts