Login
Register
@
Dark Mode
Profile
Edit my Profile
Messages
My favorites
Register
Activity
Q&A
Questions
Unanswered
Tags
Subjects
Users
Ask
Previous Years
Blogs
New Blog
Exams
Dark Mode
Token
srestha
asked
in
Compiler Design
Jan 13, 2018
1,710
views
5
votes
5
votes
How many tokens are there?
1) int a /*b
2) printf ("%
compiler-tokenization
srestha
asked
in
Compiler Design
Jan 13, 2018
by
srestha
1.7k
views
answer
comment
Follow
share this
share
4 Comments
Show 20 previous comments
by
Anu007
commented
Jan 16, 2018
reply
Follow
share this
yes it is not lexical error according to me.
1
1
by
Ashwin Kulkarni
commented
Jan 16, 2018
reply
Follow
share this
@Anu sir so what is finally answer for this Q?
2nd one is invalid and
what about 1st one ?
Thanks :)
0
0
by
srestha
commented
Jan 18, 2018
reply
Follow
share this
2) will also give lexical error
0
0
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
1
Answer
0
votes
0
votes
Both will give lexical error,
as in first one comment doesn't end, we will not final state (make dfa for this regx)
for the second case same reason
Vegeta
answered
Sep 15, 2018
by
Vegeta
comment
Follow
share this
0 Comments
Please
log in
or
register
to add a comment.
← Previous
Next →
← Previous in category
Next in category →
Related questions
2
votes
2
votes
2
answers
1
Rhythm
asked
in
Compiler Design
Jun 5, 2019
3,996
views
token generation doubt
which one of the following string can definitely said to be a token without looking at the next input: +(++,+=) return(return a) *(*=) =(==) ++ , ( ) ‘ ; option e is: plusplus, comma, bracket open, bracket close, single quote ;
Rhythm
asked
in
Compiler Design
Jun 5, 2019
by
Rhythm
4.0k
views
lexical-analysis
compiler-tokenization
1
vote
1
vote
0
answers
2
Aakash_
asked
in
Compiler Design
Nov 20, 2018
909
views
Self Doubt Token Count - Character Literal
How many tokens are there ? int main() { char name={'A','A','K','A','S','H'}; return 0; } Please give any reference if possible, my doubt is about the characters in the braces, do we count them individually or like a string.
Aakash_
asked
in
Compiler Design
Nov 20, 2018
by
Aakash_
909
views
compiler-tokenization
compiler-design
1
vote
1
vote
1
answer
3
Mayankprakash
asked
in
Compiler Design
Aug 9, 2018
490
views
Token
No of token? $a b c d + y{^3}+(2-5+x$ $6/2$--;$ Please suggest how to count token in this type of questions?
Mayankprakash
asked
in
Compiler Design
Aug 9, 2018
by
Mayankprakash
490
views
compiler-design
compiler-tokenization
1
vote
1
vote
1
answer
4
ankit_thawal
asked
in
Compiler Design
Feb 1, 2018
704
views
cd lexical analysis token
1. macros are not considered as tokens in tokenizing. 2.#include considered as single token 2.stdio.h considered as single token. Are the above statements true?
ankit_thawal
asked
in
Compiler Design
Feb 1, 2018
by
ankit_thawal
704
views
compiler-design
lexical-analysis
compiler-tokenization
true-false
Subscribe to GATE CSE 2024 Test Series
Subscribe to GO Classes for GATE CSE 2024
Quick search syntax
tags
tag:apple
author
user:martin
title
title:apple
content
content:apple
exclude
-tag:apple
force match
+apple
views
views:100
score
score:10
answers
answers:2
is accepted
isaccepted:true
is closed
isclosed:true
Recent Posts
Post GATE 2024 Guidance [Counseling tips and resources]
GATE CSE 2024 Result Responses
[Project Contest] Pytorch backend support for MLCommons Cpp Inference implementation
Participating in MLCommons Inference v4.0 submission (deadline is February 23 12pm IST)
IIITH PGEE 2024 Test Series by GO Classes
Subjects
All categories
General Aptitude
(3.5k)
Engineering Mathematics
(10.4k)
Digital Logic
(3.6k)
Programming and DS
(6.2k)
Algorithms
(4.8k)
Theory of Computation
(6.9k)
Compiler Design
(2.5k)
Operating System
(5.2k)
Databases
(4.8k)
CO and Architecture
(4.0k)
Computer Networks
(4.9k)
Artificial Intelligence
(79)
Machine Learning
(48)
Data Mining and Warehousing
(24)
Non GATE
(1.4k)
Others
(2.7k)
Admissions
(682)
Exam Queries
(1.6k)
Tier 1 Placement Questions
(17)
Job Queries
(80)
Projects
(11)
Unknown Category
(870)
64.3k
questions
77.9k
answers
243k
comments
79.6k
users
Recent Blog Comments
Hlo I'm Rupesh I got AIR 3485 in gate CS and AIR...
@Ajay Sasank here is the direct link...
Thank you for the post didi My GATE 2023 & 2024...
I Hope it helps 😊
Today's best post I seen thank you for motivation
Twitter
WhatsApp
Facebook
Reddit
LinkedIn
Email
Link Copied!
Copy