exparse.h 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. /* A Bison parser, made by GNU Bison 3.5.1. */
  2. /* Bison interface for Yacc-like parsers in C
  3. Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation,
  4. Inc.
  5. This program is free software: you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation, either version 3 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program. If not, see <http://www.gnu.org/licenses/>. */
  15. /* As a special exception, you may create a larger work that contains
  16. part or all of the Bison parser skeleton and distribute that work
  17. under terms of your choice, so long as that work isn't itself a
  18. parser generator using the skeleton or a modified version thereof
  19. as a parser skeleton. Alternatively, if you modify or redistribute
  20. the parser skeleton itself, you may (at your option) remove this
  21. special exception, which will cause the skeleton and the resulting
  22. Bison output files to be licensed under the GNU General Public
  23. License without this special exception.
  24. This special exception was added by the Free Software Foundation in
  25. version 2.2 of Bison. */
  26. /* Undocumented macros, especially those whose name start with YY_,
  27. are private implementation details. Do not rely on them. */
  28. #ifndef YY_EX_EXPARSE_H_INCLUDED
  29. # define YY_EX_EXPARSE_H_INCLUDED
  30. /* Debug traces. */
  31. #ifndef EX_DEBUG
  32. # if defined YYDEBUG
  33. #if YYDEBUG
  34. # define EX_DEBUG 1
  35. # else
  36. # define EX_DEBUG 0
  37. # endif
  38. # else /* ! defined YYDEBUG */
  39. # define EX_DEBUG 1
  40. # endif /* ! defined YYDEBUG */
  41. #endif /* ! defined EX_DEBUG */
  42. #if EX_DEBUG
  43. extern int ex_debug;
  44. #endif
  45. /* Token type. */
  46. #ifndef EX_TOKENTYPE
  47. # define EX_TOKENTYPE
  48. enum ex_tokentype
  49. {
  50. MINTOKEN = 258,
  51. INTEGER = 259,
  52. UNSIGNED = 260,
  53. CHARACTER = 261,
  54. FLOATING = 262,
  55. STRING = 263,
  56. VOIDTYPE = 264,
  57. ADDRESS = 265,
  58. ARRAY = 266,
  59. BREAK = 267,
  60. CALL = 268,
  61. CASE = 269,
  62. CONSTANT = 270,
  63. CONTINUE = 271,
  64. DECLARE = 272,
  65. DEFAULT = 273,
  66. DYNAMIC = 274,
  67. ELSE = 275,
  68. EXIT = 276,
  69. FOR = 277,
  70. FUNCTION = 278,
  71. GSUB = 279,
  72. ITERATE = 280,
  73. ITERATOR = 281,
  74. ID = 282,
  75. IF = 283,
  76. LABEL = 284,
  77. MEMBER = 285,
  78. NAME = 286,
  79. POS = 287,
  80. PRAGMA = 288,
  81. PRE = 289,
  82. PRINT = 290,
  83. PRINTF = 291,
  84. PROCEDURE = 292,
  85. QUERY = 293,
  86. RAND = 294,
  87. RETURN = 295,
  88. SCANF = 296,
  89. SPLIT = 297,
  90. SPRINTF = 298,
  91. SRAND = 299,
  92. SSCANF = 300,
  93. SUB = 301,
  94. SUBSTR = 302,
  95. SWITCH = 303,
  96. TOKENS = 304,
  97. UNSET = 305,
  98. WHILE = 306,
  99. F2I = 307,
  100. F2S = 308,
  101. I2F = 309,
  102. I2S = 310,
  103. S2B = 311,
  104. S2F = 312,
  105. S2I = 313,
  106. F2X = 314,
  107. I2X = 315,
  108. S2X = 316,
  109. X2F = 317,
  110. X2I = 318,
  111. X2S = 319,
  112. X2X = 320,
  113. XPRINT = 321,
  114. OR = 322,
  115. AND = 323,
  116. EQ = 324,
  117. NE = 325,
  118. LE = 326,
  119. GE = 327,
  120. LSH = 328,
  121. RSH = 329,
  122. IN_OP = 330,
  123. UNARY = 331,
  124. INC = 332,
  125. DEC = 333,
  126. CAST = 334,
  127. MAXTOKEN = 335
  128. };
  129. #endif
  130. /* Tokens. */
  131. #define MINTOKEN 258
  132. #define INTEGER 259
  133. #define UNSIGNED 260
  134. #define CHARACTER 261
  135. #define FLOATING 262
  136. #define STRING 263
  137. #define VOIDTYPE 264
  138. #define ADDRESS 265
  139. #define ARRAY 266
  140. #define BREAK 267
  141. #define CALL 268
  142. #define CASE 269
  143. #define CONSTANT 270
  144. #define CONTINUE 271
  145. #define DECLARE 272
  146. #define DEFAULT 273
  147. #define DYNAMIC 274
  148. #define ELSE 275
  149. #define EXIT 276
  150. #define FOR 277
  151. #define FUNCTION 278
  152. #define GSUB 279
  153. #define ITERATE 280
  154. #define ITERATOR 281
  155. #define ID 282
  156. #define IF 283
  157. #define LABEL 284
  158. #define MEMBER 285
  159. #define NAME 286
  160. #define POS 287
  161. #define PRAGMA 288
  162. #define PRE 289
  163. #define PRINT 290
  164. #define PRINTF 291
  165. #define PROCEDURE 292
  166. #define QUERY 293
  167. #define RAND 294
  168. #define RETURN 295
  169. #define SCANF 296
  170. #define SPLIT 297
  171. #define SPRINTF 298
  172. #define SRAND 299
  173. #define SSCANF 300
  174. #define SUB 301
  175. #define SUBSTR 302
  176. #define SWITCH 303
  177. #define TOKENS 304
  178. #define UNSET 305
  179. #define WHILE 306
  180. #define F2I 307
  181. #define F2S 308
  182. #define I2F 309
  183. #define I2S 310
  184. #define S2B 311
  185. #define S2F 312
  186. #define S2I 313
  187. #define F2X 314
  188. #define I2X 315
  189. #define S2X 316
  190. #define X2F 317
  191. #define X2I 318
  192. #define X2S 319
  193. #define X2X 320
  194. #define XPRINT 321
  195. #define OR 322
  196. #define AND 323
  197. #define EQ 324
  198. #define NE 325
  199. #define LE 326
  200. #define GE 327
  201. #define LSH 328
  202. #define RSH 329
  203. #define IN_OP 330
  204. #define UNARY 331
  205. #define INC 332
  206. #define DEC 333
  207. #define CAST 334
  208. #define MAXTOKEN 335
  209. /* Value type. */
  210. #if ! defined EX_STYPE && ! defined EX_STYPE_IS_DECLARED
  211. union EX_STYPE
  212. {
  213. #line 41 "../../lib/expr/exparse.y"
  214. struct Exnode_s*expr;
  215. double floating;
  216. struct Exref_s* reference;
  217. struct Exid_s* id;
  218. long long integer;
  219. int op;
  220. char* string;
  221. #line 235 "exparse.h"
  222. };
  223. typedef union EX_STYPE EX_STYPE;
  224. # define EX_STYPE_IS_TRIVIAL 1
  225. # define EX_STYPE_IS_DECLARED 1
  226. #endif
  227. extern EX_STYPE ex_lval;
  228. int ex_parse (void);
  229. #endif /* !YY_EX_EXPARSE_H_INCLUDED */