On some linux machines when I compile my yacc program it works fine. However, on other machines, I noticed that none of the c statements that are interspersed with the grammar rules are ever executed, even printf. What could be the problem? I noticed that on these machines I have to take out the -ly option because it gives an error if I try to compile with it.
An example is the following:
declaration : var_declaration
| fun_declaration
| '$' {printTable();} ;
The last line, which usually works fine, will not execute.