make it compile on code.cs
This commit is contained in:
parent
2bab25cad9
commit
6bdc28b8fe
|
|
@ -16,7 +16,7 @@ extern int yylex();
|
|||
|
||||
/* Clunky: Declare the result of the parser from parser.bison */
|
||||
|
||||
struct stmt *parser_result;
|
||||
extern struct stmt *parser_result;
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
printf("Lab 6 Example Interpreter Compiler\n");
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ void yyerror(const char*);
|
|||
|
||||
extern int yylineno;
|
||||
|
||||
struct stmt *parser_result = 0;
|
||||
extern struct stmt *parser_result = 0;
|
||||
|
||||
%}
|
||||
|
||||
|
|
|
|||
|
|
@ -111,7 +111,19 @@ extern int yydebug;
|
|||
|
||||
/* Value type. */
|
||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||
typedef int YYSTYPE;
|
||||
union YYSTYPE
|
||||
{
|
||||
#line 91 "parser.bison"
|
||||
|
||||
struct expr *expr;
|
||||
struct stmt *stmt;
|
||||
struct decl *decl;
|
||||
struct type *type;
|
||||
|
||||
#line 124 "token.h"
|
||||
|
||||
};
|
||||
typedef union YYSTYPE YYSTYPE;
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
# define YYSTYPE_IS_DECLARED 1
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue