我是彎曲新手,野牛和我一直在工作在這個項目上幾天。我有過蜜蜂以前正常工作野牛文件,我改變了一點,現在,它不會創建tab.h文件...我已經放置在兩個錯誤,我的野牛和下面的柔性文件... 錯誤:野牛不是創建tab.h文件
In file included from stojk_3_2.y:55:
stojkovic_project1_2.l:4:27: error: stojk_3_2.tab.h: No such file or directory
stojk_3_2.tab.c: In function ‘int yyparse()’:
stojk_3_2.tab.c:1416: warning: deprecated conversion from string constant to ‘char*’
stojk_3_2.tab.c:1562: warning: deprecated conversion from string constant to ‘char*’
.Y文件:
%{
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#define YYSTYPE double
int yylex(void);
static
void yyerror(char *s)
{
printf("yyerror: %s\n", s);
}
%}
%token PLUS
%token MINUS
%token MULT
%token DIVIDE
%token LPAREN
%token RPAREN
%token UNSIGNEDINTEGER
%left PLUS MINUS
%left MULT DIVIDE
%token Variable
%token Exp
%token Sign
%token Unsigned_int
%token Unsigned_float_int
%token Factor
%%
lines : lines expr '\n' {printf("%g\n", $2);}
| lines '\n'
| /*empty*/
;
expr : expr PLUS expr {$$ = $1 + $3;}
| expr MINUS expr {$$ = $1 - $3;}
| expr MULT expr {$$ = $1 * $3;}
| expr DIVIDE expr {$$ = $1/$3;}
| LPAREN expr RPAREN {$$ = $2;}
| UNSIGNEDINTEGER
;
%%
#include "lex.yy.c"
int yylex(void);
int yyparse(void);
int main(void)
{
return yyparse();
}
.L文件
我重新簽名,因爲這不是關於Adobe/Apache UI框架。 – JeffryHouser