himagiri19
June 8th, 2009, 11:34 AM
hi everyone,
i am not able to execute yacc program even after installing bison and flex
could please help
if i execute it is coming like this
himagiri@ubuntu:~$ cc lex.yy.c y.tab.c -ll
.y.tab.c:282: error: expected specifier-qualifier-list before ‘YYSTYPE’
y.tab.c:982: error: expected declaration specifiers or ‘...’ before ‘YYSTYPE’
y.tab.c: In function ‘yydestruct’:
y.tab.c:991: error: ‘yyvaluep’ undeclared (first use in this function)
y.tab.c:991: error: (Each undeclared identifier is reported only once
y.tab.c:991: error: for each function it appears in.)
y.tab.c: At top level:
y.tab.c:1028: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘yylval’
y.tab.c: In function ‘yyparse’:
y.tab.c:1090: error: ‘YYSTYPE’ undeclared (first use in this function)
y.tab.c:1090: error: expected ‘;’ before ‘yyvsa’
y.tab.c:1091: error: ‘yyvs’ undeclared (first use in this function)
y.tab.c:1091: error: ‘yyvsa’ undeclared (first use in this function)
y.tab.c:1092: error: ‘yyvsp’ undeclared (first use in this function)
y.tab.c:1102: error: expected ‘;’ before ‘yyval’
y.tab.c:1182: error: ‘union yyalloc’ has no member named ‘yyvs’
y.tab.c:1182: error: ‘union yyalloc’ has no member named ‘yyvs’
y.tab.c:1269: error: ‘yylval’ undeclared (first use in this function)
y.tab.c:1299: error: ‘yyval’ undeclared (first use in this function)
prog4a.y:14: warning: incompatible implicit declaration of built-in function ‘printf’
prog4a.y:14: warning: incompatible implicit declaration of built-in function ‘exit’
y.tab.c:1400: error: too many arguments to function ‘yydestruct’
y.tab.c:1456: error: too many arguments to function ‘yydestruct’
y.tab.c:1502: error: too many arguments to function ‘yydestruct’
y.tab.c:1510: error: too many arguments to function ‘yydestruct’
prog4a.y: In function ‘main’:
prog4a.y:38: warning: incompatible implicit declaration of built-in function ‘printf’
prog4a.y: In function ‘yyerror’:
prog4a.y:48: warning: incompatible implicit declaration of built-in function ‘printf’
prog4a.y:50: warning: incompatible implicit declaration of built-in function ‘exit’
i am not able to execute yacc program even after installing bison and flex
could please help
if i execute it is coming like this
himagiri@ubuntu:~$ cc lex.yy.c y.tab.c -ll
.y.tab.c:282: error: expected specifier-qualifier-list before ‘YYSTYPE’
y.tab.c:982: error: expected declaration specifiers or ‘...’ before ‘YYSTYPE’
y.tab.c: In function ‘yydestruct’:
y.tab.c:991: error: ‘yyvaluep’ undeclared (first use in this function)
y.tab.c:991: error: (Each undeclared identifier is reported only once
y.tab.c:991: error: for each function it appears in.)
y.tab.c: At top level:
y.tab.c:1028: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘yylval’
y.tab.c: In function ‘yyparse’:
y.tab.c:1090: error: ‘YYSTYPE’ undeclared (first use in this function)
y.tab.c:1090: error: expected ‘;’ before ‘yyvsa’
y.tab.c:1091: error: ‘yyvs’ undeclared (first use in this function)
y.tab.c:1091: error: ‘yyvsa’ undeclared (first use in this function)
y.tab.c:1092: error: ‘yyvsp’ undeclared (first use in this function)
y.tab.c:1102: error: expected ‘;’ before ‘yyval’
y.tab.c:1182: error: ‘union yyalloc’ has no member named ‘yyvs’
y.tab.c:1182: error: ‘union yyalloc’ has no member named ‘yyvs’
y.tab.c:1269: error: ‘yylval’ undeclared (first use in this function)
y.tab.c:1299: error: ‘yyval’ undeclared (first use in this function)
prog4a.y:14: warning: incompatible implicit declaration of built-in function ‘printf’
prog4a.y:14: warning: incompatible implicit declaration of built-in function ‘exit’
y.tab.c:1400: error: too many arguments to function ‘yydestruct’
y.tab.c:1456: error: too many arguments to function ‘yydestruct’
y.tab.c:1502: error: too many arguments to function ‘yydestruct’
y.tab.c:1510: error: too many arguments to function ‘yydestruct’
prog4a.y: In function ‘main’:
prog4a.y:38: warning: incompatible implicit declaration of built-in function ‘printf’
prog4a.y: In function ‘yyerror’:
prog4a.y:48: warning: incompatible implicit declaration of built-in function ‘printf’
prog4a.y:50: warning: incompatible implicit declaration of built-in function ‘exit’