xref: /netbsd-src/external/lgpl3/gmp/dist/demos/calc/calc.h (revision 1daf83e636cd998f45e5597a8f995a540e2d5b4a)
1 /* A Bison parser, made by GNU Bison 3.6.4.  */
2 
3 /* Bison interface for Yacc-like parsers in C
4 
5    Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation,
6    Inc.
7 
8    This program is free software: you can redistribute it and/or modify
9    it under the terms of the GNU General Public License as published by
10    the Free Software Foundation, either version 3 of the License, or
11    (at your option) any later version.
12 
13    This program is distributed in the hope that it will be useful,
14    but WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16    GNU General Public License for more details.
17 
18    You should have received a copy of the GNU General Public License
19    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
20 
21 /* As a special exception, you may create a larger work that contains
22    part or all of the Bison parser skeleton and distribute that work
23    under terms of your choice, so long as that work isn't itself a
24    parser generator using the skeleton or a modified version thereof
25    as a parser skeleton.  Alternatively, if you modify or redistribute
26    the parser skeleton itself, you may (at your option) remove this
27    special exception, which will cause the skeleton and the resulting
28    Bison output files to be licensed under the GNU General Public
29    License without this special exception.
30 
31    This special exception was added by the Free Software Foundation in
32    version 2.2 of Bison.  */
33 
34 /* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
35    especially those whose name start with YY_ or yy_.  They are
36    private implementation details that can be changed or removed.  */
37 
38 #ifndef YY_YY_CALC_H_INCLUDED
39 # define YY_YY_CALC_H_INCLUDED
40 /* Debug traces.  */
41 #ifndef YYDEBUG
42 # define YYDEBUG 0
43 #endif
44 #if YYDEBUG
45 extern int yydebug;
46 #endif
47 
48 /* Token kinds.  */
49 #ifndef YYTOKENTYPE
50 # define YYTOKENTYPE
51   enum yytokentype
52   {
53     YYEMPTY = -2,
54     YYEOF = 0,                     /* "end of file"  */
55     YYerror = 256,                 /* error  */
56     YYUNDEF = 257,                 /* "invalid token"  */
57     EOS = 258,                     /* EOS  */
58     BAD = 259,                     /* BAD  */
59     HELP = 260,                    /* HELP  */
60     HEX = 261,                     /* HEX  */
61     DECIMAL = 262,                 /* DECIMAL  */
62     QUIT = 263,                    /* QUIT  */
63     ABS = 264,                     /* ABS  */
64     BIN = 265,                     /* BIN  */
65     FIB = 266,                     /* FIB  */
66     GCD = 267,                     /* GCD  */
67     KRON = 268,                    /* KRON  */
68     LCM = 269,                     /* LCM  */
69     LUCNUM = 270,                  /* LUCNUM  */
70     NEXTPRIME = 271,               /* NEXTPRIME  */
71     POWM = 272,                    /* POWM  */
72     ROOT = 273,                    /* ROOT  */
73     SQRT = 274,                    /* SQRT  */
74     NUMBER = 275,                  /* NUMBER  */
75     VARIABLE = 276,                /* VARIABLE  */
76     LOR = 277,                     /* LOR  */
77     LAND = 278,                    /* LAND  */
78     EQ = 279,                      /* EQ  */
79     NE = 280,                      /* NE  */
80     LE = 281,                      /* LE  */
81     GE = 282,                      /* GE  */
82     LSHIFT = 283,                  /* LSHIFT  */
83     RSHIFT = 284,                  /* RSHIFT  */
84     UMINUS = 285                   /* UMINUS  */
85   };
86   typedef enum yytokentype yytoken_kind_t;
87 #endif
88 /* Token kinds.  */
89 #define YYEOF 0
90 #define YYerror 256
91 #define YYUNDEF 257
92 #define EOS 258
93 #define BAD 259
94 #define HELP 260
95 #define HEX 261
96 #define DECIMAL 262
97 #define QUIT 263
98 #define ABS 264
99 #define BIN 265
100 #define FIB 266
101 #define GCD 267
102 #define KRON 268
103 #define LCM 269
104 #define LUCNUM 270
105 #define NEXTPRIME 271
106 #define POWM 272
107 #define ROOT 273
108 #define SQRT 274
109 #define NUMBER 275
110 #define VARIABLE 276
111 #define LOR 277
112 #define LAND 278
113 #define EQ 279
114 #define NE 280
115 #define LE 281
116 #define GE 282
117 #define LSHIFT 283
118 #define RSHIFT 284
119 #define UMINUS 285
120 
121 /* Value type.  */
122 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
123 union YYSTYPE
124 {
125 #line 142 "../../../gmp/demos/calc/calc.y"
126 
127   char  *str;
128   int   var;
129 
130 #line 131 "calc.h"
131 
132 };
133 typedef union YYSTYPE YYSTYPE;
134 # define YYSTYPE_IS_TRIVIAL 1
135 # define YYSTYPE_IS_DECLARED 1
136 #endif
137 
138 
139 extern YYSTYPE yylval;
140 
141 int yyparse (void);
142 
143 #endif /* !YY_YY_CALC_H_INCLUDED  */
144