I have absolutely no background in compilers, and I started traveling "learn". I learn lex using this tutorial and typed something like this into a file calledfirst.l
%%
. ECHO;
\n ECHO;
%%
int yywrap(void) {
return 1;
}
int main(void) {
yylex();
return 0;
}
Now I understand that lex should generate a tokenizer that will simply select everything it receives using the above file first.l. I went ahead and ran
lex first.l
Created a file with the name lex.yy.c. Then, the textbook provides several more examples and transitions to yacc. Can someone tell me what can be done with the file lex.yy.cthat lex creates? I thought I now have a tokenizer, but how do I now compile this file to a binary file? Using gcc?