jakl
asked on
tokenize sourcecode, compiler design
in which tokens would a C compiler tokenize this little func?
int max(int i, int j)
/* this is a comment */
{
return i > j ? i : j;
}
int max(int i, int j)
/* this is a comment */
{
return i > j ? i : j;
}
homework ?
ASKER
should have known...
answer or dont, if i told you it was not homework you wouldnt believe it anyway.
answer or dont, if i told you it was not homework you wouldnt believe it anyway.
jakl,
Please realize that experts are here to provide solutions and they do not derive pleasure out of declining to answer questions.
Your profile says that you are a student. The question is simple and homework like and unfortunately your reply is not very convincing.
Study and reasearch is an integral part of learning. I am afraid you will have to do your homework yourself. However, if you get stuck on something specific, ask here.
sunnycoder
Please realize that experts are here to provide solutions and they do not derive pleasure out of declining to answer questions.
Your profile says that you are a student. The question is simple and homework like and unfortunately your reply is not very convincing.
Study and reasearch is an integral part of learning. I am afraid you will have to do your homework yourself. However, if you get stuck on something specific, ask here.
sunnycoder
Hey Jakl,
Don't be disappointed....
Just tell us what you have understood of the question and what answer you have come out with....
All of us here will really help you if you are really stuck.
Cheers.
Don't be disappointed....
Just tell us what you have understood of the question and what answer you have come out with....
All of us here will really help you if you are really stuck.
Cheers.
ASKER
heh, disappointed? i think not. after all, this is just a question in some forum.
just for the sake of it.. the question is from an ebook in pdf format(one file per chapter). after every chapter there is a summary in form of some exercises. unfortunately the answer-appendices are missing.
well, these are the tokens i came up with and just wanted to get checked:
identifiers: max i j
operators: ( ) = > ? :
punctuators: { } , ;
keywords: int return
constants: -
string constants: -
nevermind if they are correct or not. i really dont know why im explaining myself here...
just for the sake of it.. the question is from an ebook in pdf format(one file per chapter). after every chapter there is a summary in form of some exercises. unfortunately the answer-appendices are missing.
well, these are the tokens i came up with and just wanted to get checked:
identifiers: max i j
operators: ( ) = > ? :
punctuators: { } , ;
keywords: int return
constants: -
string constants: -
nevermind if they are correct or not. i really dont know why im explaining myself here...
ASKER
well then, lets discuss.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks.