Merge branch 'main' of gitlab.cs.wallawalla.edu:lustje/language-interpreter-lab into josh_11_7

This commit is contained in:
Josh 2024-11-14 17:53:39 -08:00
commit 4c21e104c9
3 changed files with 15 additions and 3 deletions

View File

@ -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");

View File

@ -24,7 +24,7 @@ void yyerror(const char*);
extern int yylineno;
struct stmt *parser_result = 0;
extern struct stmt *parser_result = 0;
%}

View File

@ -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