Computing.Net > Forums > Programming > tokens in C

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

tokens in C

Reply to Message Icon

Name: imtiaz
Date: February 16, 2003 at 12:45:39 Pacific
OS: win 98
CPU/Ram: 128
Comment:

Hi friends
I want to display and calculate the tokens in "exe" file of C.
For example I have a prog
#include
#include
void main()
{
clrscr();
int a,b;
getch();
}

I want the output like this

void is token
main is token
{ is token
int is token
a is token
b is token
} is token
, is token
; is token
Total no of Token = 9

Plz help me. I will be very thankful to u.



Sponsored Link
Ads by Google

Response Number 1
Name: w
Date: February 16, 2003 at 14:39:58 Pacific
Reply:

well, somthing about parsing. i wondering why "include", "clrscr", "getch"

:)


0

Response Number 2
Name: Mathew Joy
Date: February 18, 2003 at 01:55:26 Pacific
Reply:

Dear Imtiaz,
You cannot calculate tokens from an 'exe' file because it is in a machine level format. U can extract each word from the '.C' file and check with the array of tokens in ur program. U can do it from '.c' file cause it is in a text format.


0

Response Number 3
Name: imtiaz
Date: February 18, 2003 at 12:08:56 Pacific
Reply:

Dear Methew

Please tell me how can I extract tokens from '.C' file . Please give me a code or refer a suitable site. Thanks a lot for help.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: tokens in C

calculation of tokens in C www.computing.net/answers/programming/calculation-of-tokens-in-c/5526.html

Passing an Open File in C++ www.computing.net/answers/programming/passing-an-open-file-in-c/17174.html

Pointers in C/C++ www.computing.net/answers/programming/pointers-in-cc/876.html