Lex & YACC
Hi,
Could any one give me a link to a comprehensive tutorial on lex and yacc. I'm having problems understanding about YYSTYPE , yylval etc. and how to link lex and yacc files so on. |
Try this page. Download the pdf file.
http://www.epaperpress.com/lexandyacc/ |
Thanx. That was of some help.
|
yylval is a global variable of type YYSTYPE.
since all the grammar variables use it for storing/passing their symantic values, it should be declared as a union (or a struct). typedef YYSTYPE some_struct_or_union; the problem with structs, is that they soon get bloated if you have a lot of variables... |
All times are GMT -5. The time now is 11:07 PM. |