Lexer.hpp 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410
  1. /* A lexical scanner generated by flex */
  2. #ifndef yyHEADER_H
  3. #define yyHEADER_H
  4. #define yyIN_HEADER 1
  5. #define FLEX_SCANNER
  6. #define YY_FLEX_MAJOR_VERSION 2
  7. #define YY_FLEX_MINOR_VERSION 6
  8. #define YY_FLEX_SUBMINOR_VERSION 4
  9. #if YY_FLEX_SUBMINOR_VERSION > 0
  10. #define FLEX_BETA
  11. #endif
  12. /* The c++ scanner is a mess. The FlexLexer.h header file relies on the
  13. * following macro. This is required in order to pass the c++-multiple-scanners
  14. * test in the regression suite. We get reports that it breaks inheritance.
  15. * We will address this in a future release of flex, or omit the C++ scanner
  16. * altogether.
  17. */
  18. #define yyFlexLexer yyFlexLexer
  19. /* First, we deal with platform-specific or compiler-specific issues. */
  20. /* begin standard C headers. */
  21. /* end standard C headers. */
  22. /* begin standard C++ headers. */
  23. #include <iostream>
  24. #include <errno.h>
  25. #include <cstdlib>
  26. #include <cstdio>
  27. #include <cstring>
  28. /* end standard C++ headers. */
  29. /* flex integer type definitions */
  30. #ifndef YYFLEX_INTTYPES_DEFINED
  31. #define YYFLEX_INTTYPES_DEFINED
  32. /* Prefer C99 integer types if available. */
  33. # if defined(__cplusplus) && __cplusplus >= 201103L
  34. #include <cstdint>
  35. # define YYFLEX_USE_STDINT
  36. # endif
  37. # if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
  38. /* Include <inttypes.h> and not <stdint.h> because Solaris 2.6 has the former
  39. * and not the latter.
  40. */
  41. #include <inttypes.h>
  42. # define YYFLEX_USE_STDINT
  43. # else
  44. # if defined(_MSC_VER) && _MSC_VER >= 1600
  45. /* Visual C++ 2010 does not define __STDC_VERSION__ and has <stdint.h> but not
  46. * <inttypes.h>.
  47. */
  48. #include <stdint.h>
  49. # define YYFLEX_USE_STDINT
  50. # endif
  51. # endif
  52. # ifdef YYFLEX_USE_STDINT
  53. typedef int8_t flex_int8_t;
  54. typedef uint8_t flex_uint8_t;
  55. typedef int16_t flex_int16_t;
  56. typedef uint16_t flex_uint16_t;
  57. typedef int32_t flex_int32_t;
  58. typedef uint32_t flex_uint32_t;
  59. # else
  60. typedef unsigned char flex_uint8_t;
  61. typedef short int flex_int16_t;
  62. typedef unsigned short int flex_uint16_t;
  63. # ifdef __STDC__
  64. typedef signed char flex_int8_t;
  65. /* ISO C only requires at least 16 bits for int. */
  66. # ifdef __cplusplus
  67. #include <climits>
  68. # else
  69. #include <limits.h>
  70. # endif
  71. # if UINT_MAX >= 4294967295
  72. # define YYFLEX_INT32_DEFINED
  73. typedef int flex_int32_t;
  74. typedef unsigned int flex_uint32_t;
  75. # endif
  76. # else
  77. typedef char flex_int8_t;
  78. # endif
  79. # ifndef YYFLEX_INT32_DEFINED
  80. typedef long int flex_int32_t;
  81. typedef unsigned long int flex_uint32_t;
  82. # endif
  83. # endif
  84. #endif /* YYFLEX_INTTYPES_DEFINED */
  85. /* TODO: this is always defined, so inline it */
  86. #define yyconst const
  87. #if defined(__GNUC__) && __GNUC__ >= 3
  88. #define yynoreturn __attribute__((__noreturn__))
  89. #else
  90. #define yynoreturn
  91. #endif
  92. #ifndef YY_TYPEDEF_YY_BUFFER_STATE
  93. #define YY_TYPEDEF_YY_BUFFER_STATE
  94. typedef struct yy_buffer_state *yybuffer;
  95. /* Legacy interface */
  96. typedef struct yy_buffer_state *YY_BUFFER_STATE;
  97. #endif
  98. #ifndef YY_TYPEDEF_YY_SIZE_T
  99. #define YY_TYPEDEF_YY_SIZE_T
  100. typedef size_t yy_size_t;
  101. #endif
  102. extern int yyleng;
  103. #ifndef YY_STRUCT_YY_BUFFER_STATE
  104. #define YY_STRUCT_YY_BUFFER_STATE
  105. struct yy_buffer_state
  106. {
  107. std::streambuf* yy_input_file;
  108. char *yy_ch_buf; /* input buffer */
  109. char *yy_buf_pos; /* current position in input buffer */
  110. /* Size of input buffer in bytes, not including room for EOB
  111. * characters.
  112. */
  113. int yy_buf_size;
  114. /* Number of characters read into yy_ch_buf, not including EOB
  115. * characters.
  116. */
  117. int yy_n_chars;
  118. /* Whether we "own" the buffer - i.e., we know we created it,
  119. * and can realloc() it to grow it, and should free() it to
  120. * delete it.
  121. */
  122. int yy_is_our_buffer;
  123. /* Whether this is an "interactive" input source; if so, and
  124. * if we're using stdio for input, then we want to use getc()
  125. * instead of fread(), to make sure we stop fetching input after
  126. * each newline.
  127. */
  128. int yy_is_interactive;
  129. /* Whether we're considered to be at the beginning of a line.
  130. * If so, '^' rules will be active on the next match, otherwise
  131. * not.
  132. */
  133. int yyatbol;
  134. int yy_bs_lineno; /**< The line count. */
  135. int yy_bs_column; /**< The column count. */
  136. /* Whether to try to fill the input buffer when we reach the
  137. * end of it.
  138. */
  139. int yy_fill_buffer;
  140. int yy_buffer_status;
  141. };
  142. #endif /* !YY_STRUCT_YY_BUFFER_STATE */
  143. void *yyalloc ( yy_size_t );
  144. void *yyrealloc ( void *, yy_size_t );
  145. void yyfree ( void * );
  146. /* Begin user sect3 */
  147. #define YY_SKIP_YYWRAP
  148. #define yytext_ptr yytext
  149. #include "nonstd/FlexLexer.h"
  150. #ifdef YY_HEADER_EXPORT_START_CONDITIONS
  151. #define INITIAL 0
  152. #endif
  153. #ifndef YY_NO_UNISTD_H
  154. /* Special case for "unistd.h", since it is non-ANSI. We include it way
  155. * down here because we want the user's section 1 to have been scanned first.
  156. * The user has a chance to override it with an option.
  157. */
  158. #include <unistd.h>
  159. #endif
  160. #ifndef YY_EXTRA_TYPE
  161. #define YY_EXTRA_TYPE void *
  162. #endif
  163. #ifndef yytext_ptr
  164. static void yy_flex_strncpy ( char *, const char *, int );
  165. #endif
  166. #ifdef YY_NEED_STRLEN
  167. static int yy_flex_strlen ( const char * );
  168. #endif
  169. #define YY_NO_YYINPUT 1
  170. #ifndef YY_NO_YYINPUT
  171. #endif
  172. /*
  173. * Amount of stuff to slurp up with each read.
  174. * We assume the stdio library has already
  175. * chosen a fit size foe whatever platform
  176. * we're running on.
  177. */
  178. #define YY_READ_BUF_SIZE BUFSIZ
  179. /* Size of default input buffer. We want to be able to fit two
  180. * OS-level reads, but efficiency gains as the buffer size
  181. * increases fall off after that
  182. */
  183. #ifndef YY_BUF_SIZE
  184. #define YY_BUF_SIZE (2 * YY_READ_BUF_SIZE)
  185. #endif
  186. /* Number of entries by which start-condition stack grows. */
  187. #ifndef YY_START_STACK_INCR
  188. #define YY_START_STACK_INCR 25
  189. #endif
  190. /* Default declaration of generated scanner - a define so the user can
  191. * easily add parameters.
  192. */
  193. #ifndef YY_DECL
  194. #define YY_DECL_IS_OURS 1
  195. #define YY_DECL int yyFlexLexer::yylex()
  196. #endif /* !YY_DECL */
  197. /* yy_get_previous_state - get the state just before the EOB char was reached */
  198. #undef YY_NEW_FILE
  199. #undef YY_FLUSH_BUFFER
  200. #undef yysetbol
  201. #undef yy_new_buffer
  202. #undef yy_set_interactive
  203. #undef YY_DO_BEFORE_ACTION
  204. #ifdef YY_DECL_IS_OURS
  205. #undef YY_DECL_IS_OURS
  206. #undef YY_DECL
  207. #endif
  208. #ifndef yy_create_buffer_ALREADY_DEFINED
  209. #undef yy_create_buffer
  210. #endif
  211. #ifndef yy_delete_buffer_ALREADY_DEFINED
  212. #undef yy_delete_buffer
  213. #endif
  214. #ifndef yy_scan_buffer_ALREADY_DEFINED
  215. #undef yy_scan_buffer
  216. #endif
  217. #ifndef yy_scan_string_ALREADY_DEFINED
  218. #undef yy_scan_string
  219. #endif
  220. #ifndef yy_scan_bytes_ALREADY_DEFINED
  221. #undef yy_scan_bytes
  222. #endif
  223. #ifndef yy_init_buffer_ALREADY_DEFINED
  224. #undef yy_init_buffer
  225. #endif
  226. #ifndef yy_flush_buffer_ALREADY_DEFINED
  227. #undef yy_flush_buffer
  228. #endif
  229. #ifndef yy_load_buffer_state_ALREADY_DEFINED
  230. #undef yy_load_buffer_state
  231. #endif
  232. #ifndef yy_switch_to_buffer_ALREADY_DEFINED
  233. #undef yy_switch_to_buffer
  234. #endif
  235. #ifndef yypush_buffer_state_ALREADY_DEFINED
  236. #undef yypush_buffer_state
  237. #endif
  238. #ifndef yypop_buffer_state_ALREADY_DEFINED
  239. #undef yypop_buffer_state
  240. #endif
  241. #ifndef yyensure_buffer_stack_ALREADY_DEFINED
  242. #undef yyensure_buffer_stack
  243. #endif
  244. #ifndef yylex_ALREADY_DEFINED
  245. #undef yylex
  246. #endif
  247. #ifndef yyrestart_ALREADY_DEFINED
  248. #undef yyrestart
  249. #endif
  250. #ifndef yylex_init_ALREADY_DEFINED
  251. #undef yylex_init
  252. #endif
  253. #ifndef yylex_init_extra_ALREADY_DEFINED
  254. #undef yylex_init_extra
  255. #endif
  256. #ifndef yylex_destroy_ALREADY_DEFINED
  257. #undef yylex_destroy
  258. #endif
  259. #ifndef yyget_debug_ALREADY_DEFINED
  260. #undef yyget_debug
  261. #endif
  262. #ifndef yyset_debug_ALREADY_DEFINED
  263. #undef yyset_debug
  264. #endif
  265. #ifndef yyget_extra_ALREADY_DEFINED
  266. #undef yyget_extra
  267. #endif
  268. #ifndef yyset_extra_ALREADY_DEFINED
  269. #undef yyset_extra
  270. #endif
  271. #ifndef yyget_in_ALREADY_DEFINED
  272. #undef yyget_in
  273. #endif
  274. #ifndef yyset_in_ALREADY_DEFINED
  275. #undef yyset_in
  276. #endif
  277. #ifndef yyget_out_ALREADY_DEFINED
  278. #undef yyget_out
  279. #endif
  280. #ifndef yyset_out_ALREADY_DEFINED
  281. #undef yyset_out
  282. #endif
  283. #ifndef yyget_leng_ALREADY_DEFINED
  284. #undef yyget_leng
  285. #endif
  286. #ifndef yyget_text_ALREADY_DEFINED
  287. #undef yyget_text
  288. #endif
  289. #ifndef yyget_lineno_ALREADY_DEFINED
  290. #undef yyget_lineno
  291. #endif
  292. #ifndef yyset_lineno_ALREADY_DEFINED
  293. #undef yyset_lineno
  294. #endif
  295. #ifndef yyget_column_ALREADY_DEFINED
  296. #undef yyget_column
  297. #endif
  298. #ifndef yyset_column_ALREADY_DEFINED
  299. #undef yyset_column
  300. #endif
  301. #ifndef yywrap_ALREADY_DEFINED
  302. #undef yywrap
  303. #endif
  304. #ifndef yyget_lval_ALREADY_DEFINED
  305. #undef yyget_lval
  306. #endif
  307. #ifndef yyset_lval_ALREADY_DEFINED
  308. #undef yyset_lval
  309. #endif
  310. #ifndef yyget_lloc_ALREADY_DEFINED
  311. #undef yyget_lloc
  312. #endif
  313. #ifndef yyset_lloc_ALREADY_DEFINED
  314. #undef yyset_lloc
  315. #endif
  316. #ifndef yyalloc_ALREADY_DEFINED
  317. #undef yyalloc
  318. #endif
  319. #ifndef yyrealloc_ALREADY_DEFINED
  320. #undef yyrealloc
  321. #endif
  322. #ifndef yyfree_ALREADY_DEFINED
  323. #undef yyfree
  324. #endif
  325. #ifndef yytext_ALREADY_DEFINED
  326. #undef yytext
  327. #endif
  328. #ifndef yyleng_ALREADY_DEFINED
  329. #undef yyleng
  330. #endif
  331. #ifndef yyin_ALREADY_DEFINED
  332. #undef yyin
  333. #endif
  334. #ifndef yyout_ALREADY_DEFINED
  335. #undef yyout
  336. #endif
  337. #ifndef yyflexdebug_ALREADY_DEFINED
  338. #undef yyflexdebug
  339. #endif
  340. #ifndef yylineno_ALREADY_DEFINED
  341. #undef yylineno
  342. #endif
  343. #ifndef yytables_fload_ALREADY_DEFINED
  344. #undef yytables_fload
  345. #endif
  346. #ifndef yytables_destroy_ALREADY_DEFINED
  347. #undef yytables_destroy
  348. #endif
  349. #ifndef yyTABLES_NAME_ALREADY_DEFINED
  350. #undef yyTABLES_NAME
  351. #endif
  352. #undef yyIN_HEADER
  353. #endif /* yyHEADER_H */
  354. #line 67 "src/lexer.l"