Contents    Page-10    Prev    Next    Page+10    Index   

Using yacc

yacc compiles an input file (with .y suffix), always producing the output file y.tab.c (a C file that can be compiled to an executable using the C compiler).

y.tab.c contains:

The parser in y.tab.c is designed to call a lexical analyzer produced by lex. The user's C code will contain the main() program; main() calls the code generator as a subroutine after parsing is complete.