About a week ago I have started a online course “compilers” at coursera.org. Today I got some code for begining.
I was hoping you could help me to get answers to some questions.
%{ /* some code */ %} => what is this, I always thinked that % is module operator
[ \t]+
[0-9]+ { return(NUM); } => I can understand [0-9]+ part of code but I dont understand what [\t]+ is doing here.
This looks like Lex, not C++
%{ %}specifies C/C++ code that will be copied verbatim into the output source.[ \t]+ignores all blanks and tabs (\tis tab).