yacc - What does the default main() created by flex look like? -


I want to do the same to my flex / yacc program that already does, but I modified it a bit Want to do If I had put a main () in my .l file, and did it do something like I did not add a main (), then what does the code look like?

You can generate code normally, then copy your "normal key".

But expect input from standard parser stdin, you should call in main () , call / code> yyparse ()

  main (AC, AV) {yyparse (); Return 0; }  

On page 96 there is a more complete example which sets input and output through this type of code:

  extern file * yyin , * Yyout; Yin = FOPN (Infil, "R"); If (yyin == NULL) / * handle error * / yyout = fopen (outfile, "w") / * handling area * error * / yyparse (); / * Post Processing * / Exit (0);  

Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

jquery - SimpleModal Confirm fails to submit form -

php - Multiple Select with Explode: only returns the word "Array" -