What is wrong with this simple example?

2009-12-20 Thread Peng Yu
I try to run the example on http://tldp.org/HOWTO/Lex-YACC-HOWTO-4.html. But I get the following error. Could somebody let me know what I am wrong? $ bison -d example4.y example4.y:24.1-8: syntax error, unexpected identifier: $ cat example4.y %{ #include #include void yyerror(const char *str) {

Re: What is wrong with this simple example?

2009-12-20 Thread Joel E. Denny
On Sun, 20 Dec 2009, Peng Yu wrote: > I try to run the example on > http://tldp.org/HOWTO/Lex-YACC-HOWTO-4.html. But I get the following > error. Could somebody let me know what I am wrong? > > $ bison -d example4.y > example4.y:24.1-8: syntax error, unexpected identifier: > $ cat example4.y > %{