Fixed '<' and '>' typo in the parser.

git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@642 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2005-07-14 12:11:27 +00:00
parent aa395c9324
commit 39b4f91c0d
3 changed files with 925 additions and 692 deletions

View File

@ -44,8 +44,8 @@ expression: expression '+' expression { fprintf(stderr, " +"); $$ = new PlusExpr
| expression '&' expression { fprintf(stderr, " &"); $$ = new BinAndExpression($1, $3); }
| expression '|' expression { fprintf(stderr, " |"); $$ = new BinOrExpression($1, $3); }
| expression '^' expression { fprintf(stderr, " ^"); $$ = new BinXorExpression($1, $3); }
| expression '>' expression { fprintf(stderr, " <"); $$ = new LessExpression($1, $3); }
| expression '<' expression { fprintf(stderr, " >"); $$ = new GreaterExpression($1, $3); }
| expression '<' expression { fprintf(stderr, " <"); $$ = new LessExpression($1, $3); }
| expression '>' expression { fprintf(stderr, " >"); $$ = new GreaterExpression($1, $3); }
| expression GTE expression { fprintf(stderr, " >="); $$ = new GreaterEqualsExpression($1, $3); }
| expression LTE expression { fprintf(stderr, " <="); $$ = new LessEqualsExpression($1, $3); }
| expression NE expression { fprintf(stderr, " !="); $$ = new NotEqualsExpression($1, $3); }

File diff suppressed because it is too large Load Diff

View File

@ -1,27 +1,76 @@
#ifndef BISON_Y_TAB_H
# define BISON_Y_TAB_H
/* A Bison parser, made by GNU Bison 2.0. */
#ifndef YYSTYPE
typedef union {
/* Skeleton parser for Yacc-like parsing with Bison,
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, when this file is copied by Bison into a
Bison output file, you may use that output file without restriction.
This special exception was added by the Free Software Foundation
in version 1.24 of Bison. */
/* Tokens. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
/* Put the tokens into the symbol table, so that GDB and other debuggers
know about them. */
enum yytokentype {
NUMBER = 258,
LOG_OR = 259,
LOG_AND = 260,
LOG_NOT = 261,
SHL = 262,
SHR = 263,
EQ = 264,
NE = 265,
LTE = 266,
GTE = 267,
UMINUS = 268
};
#endif
#define NUMBER 258
#define LOG_OR 259
#define LOG_AND 260
#define LOG_NOT 261
#define SHL 262
#define SHR 263
#define EQ 264
#define NE 265
#define LTE 266
#define GTE 267
#define UMINUS 268
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
#line 16 "stella.y"
typedef union YYSTYPE {
int val;
Expression *exp;
} yystype;
# define YYSTYPE yystype
} YYSTYPE;
/* Line 1318 of yacc.c. */
#line 68 "y.tab.h"
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1
#endif
# define NUMBER 257
# define LOG_OR 258
# define LOG_AND 259
# define LOG_NOT 260
# define SHR 261
# define SHL 262
# define GTE 263
# define LTE 264
# define NE 265
# define EQ 266
# define UMINUS 267
extern YYSTYPE yylval;
#endif /* not BISON_Y_TAB_H */