search
Log In
2 votes
405 views

What are different set of characters which are taken as single token in lexical analysis in compiler design?

For eg. Charaters under double quotes are taken as single token, post-increment and pre-increment is taken as single token etc.

in Compiler Design 405 views
0
Depends on language.

2 Answers

3 votes
Operator attached with another operator and form a meaning full operator(ex:<=,>=,>>,<<,==,++,--)  

considered as a single token.
1 vote

Related questions

2 votes
1 answer
1
404 views
The above diagram is Transition Diagrams for identifiers. As we can see that the identifier is said to be accepted if it starts with a letter and ends with a valid delimiter, which includes blank symbol, arithmetic, logical operator, left parenthesis, right parenthesis, +, ... ends with a delimiter and + is a valid delimiter and the error in declaration will not be detected at this stage...
asked Jun 9, 2019 in Compiler Design Hirak 404 views
1 vote
3 answers
2
378 views
How will the compiler detect whether "if" is a keyword or an identifier? Please tell me the concept behind this.
asked Nov 7, 2018 in Compiler Design Lovejeet Singh 378 views
13 votes
2 answers
4
1.4k views
Consider the following C program: int main (void) { in/*this is an example*/z; double/*is it an error?*/y; print( “This is simple” ); return 0; } - How many Different tokens are there in the above code.
asked Dec 13, 2016 in Compiler Design dd 1.4k views
...