Hi,
--- On Mon, Sep 26, 2011 at 10:01 PM, Gautam Akiwate
<gautam.akiwate(a)gmail.com> wrote:
| But when I do a make it generates an error saying that it is unable to find
| yylwrap etc.
\--
In addition, I also got the error 'undefined reference to yyerror'
when I tried your language-parser-1.0 sources that you had sent. I
added the following in ie_parser.c after the inclusion of lp.h:
=== CODE ===
/* Line 189 of yacc.c */
#line 20 "ie_parser.y"
#include<stdio.h>
#include "lp.h"
+ void yyerror (char *s)
+ {
+ fprintf (stderr, "%s\n", s);
+ }
=== END ===
I also added a yywrap() before the main() function in ie_parser.c:
=== CODE ===
+ int yywrap()
+ {
+ return (1);
+ }
main(){
do {
yyparse();
}
while(!feof(yyin));
}
=== END ===
I was then able to build, and test run it:
$ aclocal; autoconf; automake -a -c
$ ./configure; make
$ ./lparser < learn.txt
SK
--
Shakthi Kannan
http://www.shakthimaan.com