I am writing a simple scanner in flex. I want my scanner to print out "integer type seen" when it sees the keyword "int". Is there any difference between the following two ways?
1st way:
%%
int printf("integer type seen");
%%
2nd way:
%%
"int" printf("integer type seen");
%%
So, is there a difference between writing if
or "if"
? Also, for example when we see a ==
operator, we print something. Is there a difference between writing ==
or "=="
in the flex file?