in Compiler Design
1,710 views
5 votes
5 votes
How many tokens are there?

1) int a /*b

2) printf ("%
in Compiler Design
by
1.7k views

4 Comments

yes it is not lexical error according to me.
1
1
@Anu sir so what is finally answer for this Q?

2nd one is invalid and

what about 1st one ?

Thanks :)
0
0
2) will also give lexical error
0
0

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

Related questions