No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

lex.yy.c 49KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953
  1. #line 3 "lex.yy.c"
  2. #define YY_INT_ALIGNED short int
  3. /* A lexical scanner generated by flex */
  4. #define FLEX_SCANNER
  5. #define YY_FLEX_MAJOR_VERSION 2
  6. #define YY_FLEX_MINOR_VERSION 6
  7. #define YY_FLEX_SUBMINOR_VERSION 4
  8. #if YY_FLEX_SUBMINOR_VERSION > 0
  9. #define FLEX_BETA
  10. #endif
  11. /* First, we deal with platform-specific or compiler-specific issues. */
  12. /* begin standard C headers. */
  13. #include <stdio.h>
  14. #include <string.h>
  15. #include <errno.h>
  16. #include <stdlib.h>
  17. /* end standard C headers. */
  18. /* flex integer type definitions */
  19. #ifndef FLEXINT_H
  20. #define FLEXINT_H
  21. /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
  22. #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
  23. /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
  24. * if you want the limit (max/min) macros for int types.
  25. */
  26. #ifndef __STDC_LIMIT_MACROS
  27. #define __STDC_LIMIT_MACROS 1
  28. #endif
  29. #include <inttypes.h>
  30. typedef int8_t flex_int8_t;
  31. typedef uint8_t flex_uint8_t;
  32. typedef int16_t flex_int16_t;
  33. typedef uint16_t flex_uint16_t;
  34. typedef int32_t flex_int32_t;
  35. typedef uint32_t flex_uint32_t;
  36. #else
  37. typedef signed char flex_int8_t;
  38. typedef short int flex_int16_t;
  39. typedef int flex_int32_t;
  40. typedef unsigned char flex_uint8_t;
  41. typedef unsigned short int flex_uint16_t;
  42. typedef unsigned int flex_uint32_t;
  43. /* Limits of integral types. */
  44. #ifndef INT8_MIN
  45. #define INT8_MIN (-128)
  46. #endif
  47. #ifndef INT16_MIN
  48. #define INT16_MIN (-32767-1)
  49. #endif
  50. #ifndef INT32_MIN
  51. #define INT32_MIN (-2147483647-1)
  52. #endif
  53. #ifndef INT8_MAX
  54. #define INT8_MAX (127)
  55. #endif
  56. #ifndef INT16_MAX
  57. #define INT16_MAX (32767)
  58. #endif
  59. #ifndef INT32_MAX
  60. #define INT32_MAX (2147483647)
  61. #endif
  62. #ifndef UINT8_MAX
  63. #define UINT8_MAX (255U)
  64. #endif
  65. #ifndef UINT16_MAX
  66. #define UINT16_MAX (65535U)
  67. #endif
  68. #ifndef UINT32_MAX
  69. #define UINT32_MAX (4294967295U)
  70. #endif
  71. #ifndef SIZE_MAX
  72. #define SIZE_MAX (~(size_t)0)
  73. #endif
  74. #endif /* ! C99 */
  75. #endif /* ! FLEXINT_H */
  76. /* begin standard C++ headers. */
  77. /* TODO: this is always defined, so inline it */
  78. #define yyconst const
  79. #if defined(__GNUC__) && __GNUC__ >= 3
  80. #define yynoreturn __attribute__((__noreturn__))
  81. #else
  82. #define yynoreturn
  83. #endif
  84. /* Returned upon end-of-file. */
  85. #define YY_NULL 0
  86. /* Promotes a possibly negative, possibly signed char to an
  87. * integer in range [0..255] for use as an array index.
  88. */
  89. #define YY_SC_TO_UI(c) ((YY_CHAR) (c))
  90. /* Enter a start condition. This macro really ought to take a parameter,
  91. * but we do it the disgusting crufty way forced on us by the ()-less
  92. * definition of BEGIN.
  93. */
  94. #define BEGIN (yy_start) = 1 + 2 *
  95. /* Translate the current start state into a value that can be later handed
  96. * to BEGIN to return to the state. The YYSTATE alias is for lex
  97. * compatibility.
  98. */
  99. #define YY_START (((yy_start) - 1) / 2)
  100. #define YYSTATE YY_START
  101. /* Action number for EOF rule of a given start state. */
  102. #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
  103. /* Special action meaning "start processing a new file". */
  104. #define YY_NEW_FILE yyrestart( yyin )
  105. #define YY_END_OF_BUFFER_CHAR 0
  106. /* Size of default input buffer. */
  107. #ifndef YY_BUF_SIZE
  108. #ifdef __ia64__
  109. /* On IA-64, the buffer size is 16k, not 8k.
  110. * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
  111. * Ditto for the __ia64__ case accordingly.
  112. */
  113. #define YY_BUF_SIZE 32768
  114. #else
  115. #define YY_BUF_SIZE 16384
  116. #endif /* __ia64__ */
  117. #endif
  118. /* The state buf must be large enough to hold one state per character in the main buffer.
  119. */
  120. #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
  121. #ifndef YY_TYPEDEF_YY_BUFFER_STATE
  122. #define YY_TYPEDEF_YY_BUFFER_STATE
  123. typedef struct yy_buffer_state *YY_BUFFER_STATE;
  124. #endif
  125. #ifndef YY_TYPEDEF_YY_SIZE_T
  126. #define YY_TYPEDEF_YY_SIZE_T
  127. typedef size_t yy_size_t;
  128. #endif
  129. extern int yyleng;
  130. extern FILE *yyin, *yyout;
  131. #define EOB_ACT_CONTINUE_SCAN 0
  132. #define EOB_ACT_END_OF_FILE 1
  133. #define EOB_ACT_LAST_MATCH 2
  134. #define YY_LESS_LINENO(n)
  135. #define YY_LINENO_REWIND_TO(ptr)
  136. /* Return all but the first "n" matched characters back to the input stream. */
  137. #define yyless(n) \
  138. do \
  139. { \
  140. /* Undo effects of setting up yytext. */ \
  141. int yyless_macro_arg = (n); \
  142. YY_LESS_LINENO(yyless_macro_arg);\
  143. *yy_cp = (yy_hold_char); \
  144. YY_RESTORE_YY_MORE_OFFSET \
  145. (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
  146. YY_DO_BEFORE_ACTION; /* set up yytext again */ \
  147. } \
  148. while ( 0 )
  149. #define unput(c) yyunput( c, (yytext_ptr) )
  150. #ifndef YY_STRUCT_YY_BUFFER_STATE
  151. #define YY_STRUCT_YY_BUFFER_STATE
  152. struct yy_buffer_state
  153. {
  154. FILE *yy_input_file;
  155. char *yy_ch_buf; /* input buffer */
  156. char *yy_buf_pos; /* current position in input buffer */
  157. /* Size of input buffer in bytes, not including room for EOB
  158. * characters.
  159. */
  160. int yy_buf_size;
  161. /* Number of characters read into yy_ch_buf, not including EOB
  162. * characters.
  163. */
  164. int yy_n_chars;
  165. /* Whether we "own" the buffer - i.e., we know we created it,
  166. * and can realloc() it to grow it, and should free() it to
  167. * delete it.
  168. */
  169. int yy_is_our_buffer;
  170. /* Whether this is an "interactive" input source; if so, and
  171. * if we're using stdio for input, then we want to use getc()
  172. * instead of fread(), to make sure we stop fetching input after
  173. * each newline.
  174. */
  175. int yy_is_interactive;
  176. /* Whether we're considered to be at the beginning of a line.
  177. * If so, '^' rules will be active on the next match, otherwise
  178. * not.
  179. */
  180. int yy_at_bol;
  181. int yy_bs_lineno; /**< The line count. */
  182. int yy_bs_column; /**< The column count. */
  183. /* Whether to try to fill the input buffer when we reach the
  184. * end of it.
  185. */
  186. int yy_fill_buffer;
  187. int yy_buffer_status;
  188. #define YY_BUFFER_NEW 0
  189. #define YY_BUFFER_NORMAL 1
  190. /* When an EOF's been seen but there's still some text to process
  191. * then we mark the buffer as YY_EOF_PENDING, to indicate that we
  192. * shouldn't try reading from the input source any more. We might
  193. * still have a bunch of tokens to match, though, because of
  194. * possible backing-up.
  195. *
  196. * When we actually see the EOF, we change the status to "new"
  197. * (via yyrestart()), so that the user can continue scanning by
  198. * just pointing yyin at a new input file.
  199. */
  200. #define YY_BUFFER_EOF_PENDING 2
  201. };
  202. #endif /* !YY_STRUCT_YY_BUFFER_STATE */
  203. /* Stack of input buffers. */
  204. static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
  205. static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
  206. static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
  207. /* We provide macros for accessing buffer states in case in the
  208. * future we want to put the buffer states in a more general
  209. * "scanner state".
  210. *
  211. * Returns the top of the stack, or NULL.
  212. */
  213. #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
  214. ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
  215. : NULL)
  216. /* Same as previous macro, but useful when we know that the buffer stack is not
  217. * NULL or when we need an lvalue. For internal use only.
  218. */
  219. #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
  220. /* yy_hold_char holds the character lost when yytext is formed. */
  221. static char yy_hold_char;
  222. static int yy_n_chars; /* number of characters read into yy_ch_buf */
  223. int yyleng;
  224. /* Points to current character in buffer. */
  225. static char *yy_c_buf_p = NULL;
  226. static int yy_init = 0; /* whether we need to initialize */
  227. static int yy_start = 0; /* start state number */
  228. /* Flag which is used to allow yywrap()'s to do buffer switches
  229. * instead of setting up a fresh yyin. A bit of a hack ...
  230. */
  231. static int yy_did_buffer_switch_on_eof;
  232. void yyrestart ( FILE *input_file );
  233. void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer );
  234. YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size );
  235. void yy_delete_buffer ( YY_BUFFER_STATE b );
  236. void yy_flush_buffer ( YY_BUFFER_STATE b );
  237. void yypush_buffer_state ( YY_BUFFER_STATE new_buffer );
  238. void yypop_buffer_state ( void );
  239. static void yyensure_buffer_stack ( void );
  240. static void yy_load_buffer_state ( void );
  241. static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file );
  242. #define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
  243. YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size );
  244. YY_BUFFER_STATE yy_scan_string ( const char *yy_str );
  245. YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len );
  246. void *yyalloc ( yy_size_t );
  247. void *yyrealloc ( void *, yy_size_t );
  248. void yyfree ( void * );
  249. #define yy_new_buffer yy_create_buffer
  250. #define yy_set_interactive(is_interactive) \
  251. { \
  252. if ( ! YY_CURRENT_BUFFER ){ \
  253. yyensure_buffer_stack (); \
  254. YY_CURRENT_BUFFER_LVALUE = \
  255. yy_create_buffer( yyin, YY_BUF_SIZE ); \
  256. } \
  257. YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
  258. }
  259. #define yy_set_bol(at_bol) \
  260. { \
  261. if ( ! YY_CURRENT_BUFFER ){\
  262. yyensure_buffer_stack (); \
  263. YY_CURRENT_BUFFER_LVALUE = \
  264. yy_create_buffer( yyin, YY_BUF_SIZE ); \
  265. } \
  266. YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
  267. }
  268. #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
  269. /* Begin user sect3 */
  270. typedef flex_uint8_t YY_CHAR;
  271. FILE *yyin = NULL, *yyout = NULL;
  272. typedef int yy_state_type;
  273. extern int yylineno;
  274. int yylineno = 1;
  275. extern char *yytext;
  276. #ifdef yytext_ptr
  277. #undef yytext_ptr
  278. #endif
  279. #define yytext_ptr yytext
  280. static yy_state_type yy_get_previous_state ( void );
  281. static yy_state_type yy_try_NUL_trans ( yy_state_type current_state );
  282. static int yy_get_next_buffer ( void );
  283. static void yynoreturn yy_fatal_error ( const char* msg );
  284. /* Done after the current pattern has been matched and before the
  285. * corresponding action - sets up yytext.
  286. */
  287. #define YY_DO_BEFORE_ACTION \
  288. (yytext_ptr) = yy_bp; \
  289. yyleng = (int) (yy_cp - yy_bp); \
  290. (yy_hold_char) = *yy_cp; \
  291. *yy_cp = '\0'; \
  292. (yy_c_buf_p) = yy_cp;
  293. #define YY_NUM_RULES 34
  294. #define YY_END_OF_BUFFER 35
  295. /* This struct is not used in this scanner,
  296. but its presence is necessary. */
  297. struct yy_trans_info
  298. {
  299. flex_int32_t yy_verify;
  300. flex_int32_t yy_nxt;
  301. };
  302. static const flex_int16_t yy_accept[70] =
  303. { 0,
  304. 0, 0, 35, 34, 10, 11, 20, 34, 5, 6,
  305. 3, 1, 12, 2, 4, 31, 9, 16, 13, 17,
  306. 33, 33, 33, 33, 33, 33, 33, 33, 7, 34,
  307. 8, 15, 26, 31, 33, 33, 18, 14, 19, 33,
  308. 33, 27, 33, 33, 33, 33, 33, 25, 32, 33,
  309. 33, 22, 33, 33, 33, 33, 33, 28, 21, 33,
  310. 33, 33, 30, 33, 33, 29, 23, 24, 0
  311. } ;
  312. static const YY_CHAR yy_ec[256] =
  313. { 0,
  314. 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
  315. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  316. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  317. 1, 4, 5, 1, 1, 1, 1, 6, 1, 7,
  318. 8, 9, 10, 11, 12, 1, 13, 14, 14, 14,
  319. 14, 14, 14, 14, 14, 14, 14, 1, 15, 16,
  320. 17, 18, 1, 1, 19, 19, 19, 19, 19, 19,
  321. 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
  322. 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
  323. 1, 1, 1, 1, 19, 1, 20, 19, 21, 19,
  324. 22, 23, 19, 24, 25, 19, 19, 26, 27, 28,
  325. 29, 30, 19, 31, 32, 33, 34, 19, 35, 19,
  326. 19, 19, 36, 37, 38, 1, 1, 1, 1, 1,
  327. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  328. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  329. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  330. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  331. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  332. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  333. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  334. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  335. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  336. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  337. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  338. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  339. 1, 1, 1, 1, 1
  340. } ;
  341. static const YY_CHAR yy_meta[39] =
  342. { 0,
  343. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  344. 1, 1, 1, 2, 1, 1, 1, 1, 2, 2,
  345. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  346. 2, 2, 2, 2, 2, 1, 1, 1
  347. } ;
  348. static const flex_int16_t yy_base[71] =
  349. { 0,
  350. 0, 0, 79, 80, 80, 80, 61, 71, 80, 80,
  351. 80, 80, 80, 80, 80, 25, 80, 59, 58, 57,
  352. 0, 44, 46, 17, 51, 39, 47, 44, 80, 30,
  353. 80, 80, 80, 27, 0, 52, 80, 80, 80, 37,
  354. 32, 0, 30, 37, 36, 27, 34, 80, 44, 25,
  355. 34, 0, 27, 26, 19, 26, 18, 0, 0, 17,
  356. 17, 24, 0, 21, 15, 0, 0, 0, 80, 40
  357. } ;
  358. static const flex_int16_t yy_def[71] =
  359. { 0,
  360. 69, 1, 69, 69, 69, 69, 69, 69, 69, 69,
  361. 69, 69, 69, 69, 69, 70, 69, 69, 69, 69,
  362. 70, 70, 70, 70, 70, 70, 70, 70, 69, 69,
  363. 69, 69, 69, 70, 70, 70, 69, 69, 69, 70,
  364. 70, 70, 70, 70, 70, 70, 70, 69, 70, 70,
  365. 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
  366. 70, 70, 70, 70, 70, 70, 70, 70, 0, 69
  367. } ;
  368. static const flex_int16_t yy_nxt[119] =
  369. { 0,
  370. 4, 5, 6, 5, 7, 8, 9, 10, 11, 12,
  371. 13, 14, 15, 16, 17, 18, 19, 20, 21, 21,
  372. 22, 23, 21, 21, 24, 21, 25, 21, 21, 26,
  373. 27, 21, 21, 21, 28, 29, 30, 31, 34, 42,
  374. 34, 35, 68, 67, 43, 66, 36, 65, 36, 64,
  375. 63, 62, 61, 60, 59, 58, 57, 49, 56, 55,
  376. 54, 53, 52, 51, 50, 49, 48, 47, 46, 45,
  377. 44, 41, 40, 39, 38, 37, 33, 32, 69, 3,
  378. 69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
  379. 69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
  380. 69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
  381. 69, 69, 69, 69, 69, 69, 69, 69
  382. } ;
  383. static const flex_int16_t yy_chk[119] =
  384. { 0,
  385. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  386. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  387. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  388. 1, 1, 1, 1, 1, 1, 1, 1, 16, 24,
  389. 34, 70, 65, 64, 24, 62, 16, 61, 34, 60,
  390. 57, 56, 55, 54, 53, 51, 50, 49, 47, 46,
  391. 45, 44, 43, 41, 40, 36, 30, 28, 27, 26,
  392. 25, 23, 22, 20, 19, 18, 8, 7, 3, 69,
  393. 69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
  394. 69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
  395. 69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
  396. 69, 69, 69, 69, 69, 69, 69, 69
  397. } ;
  398. static yy_state_type yy_last_accepting_state;
  399. static char *yy_last_accepting_cpos;
  400. extern int yy_flex_debug;
  401. int yy_flex_debug = 0;
  402. /* The intent behind this definition is that it'll catch
  403. * any uses of REJECT which flex missed.
  404. */
  405. #define REJECT reject_used_but_not_detected
  406. #define yymore() yymore_used_but_not_detected
  407. #define YY_MORE_ADJ 0
  408. #define YY_RESTORE_YY_MORE_OFFSET
  409. char *yytext;
  410. #line 1 "analyse_lexicale.lex"
  411. #line 2 "analyse_lexicale.lex"
  412. #include "analyse_syntaxique.tab.h"
  413. int yywrap(void){
  414. return 1;
  415. }
  416. #line 492 "lex.yy.c"
  417. #line 493 "lex.yy.c"
  418. #define INITIAL 0
  419. #ifndef YY_NO_UNISTD_H
  420. /* Special case for "unistd.h", since it is non-ANSI. We include it way
  421. * down here because we want the user's section 1 to have been scanned first.
  422. * The user has a chance to override it with an option.
  423. */
  424. #include <unistd.h>
  425. #endif
  426. #ifndef YY_EXTRA_TYPE
  427. #define YY_EXTRA_TYPE void *
  428. #endif
  429. static int yy_init_globals ( void );
  430. /* Accessor methods to globals.
  431. These are made visible to non-reentrant scanners for convenience. */
  432. int yylex_destroy ( void );
  433. int yyget_debug ( void );
  434. void yyset_debug ( int debug_flag );
  435. YY_EXTRA_TYPE yyget_extra ( void );
  436. void yyset_extra ( YY_EXTRA_TYPE user_defined );
  437. FILE *yyget_in ( void );
  438. void yyset_in ( FILE * _in_str );
  439. FILE *yyget_out ( void );
  440. void yyset_out ( FILE * _out_str );
  441. int yyget_leng ( void );
  442. char *yyget_text ( void );
  443. int yyget_lineno ( void );
  444. void yyset_lineno ( int _line_number );
  445. /* Macros after this point can all be overridden by user definitions in
  446. * section 1.
  447. */
  448. #ifndef YY_SKIP_YYWRAP
  449. #ifdef __cplusplus
  450. extern "C" int yywrap ( void );
  451. #else
  452. extern int yywrap ( void );
  453. #endif
  454. #endif
  455. #ifndef YY_NO_UNPUT
  456. static void yyunput ( int c, char *buf_ptr );
  457. #endif
  458. #ifndef yytext_ptr
  459. static void yy_flex_strncpy ( char *, const char *, int );
  460. #endif
  461. #ifdef YY_NEED_STRLEN
  462. static int yy_flex_strlen ( const char * );
  463. #endif
  464. #ifndef YY_NO_INPUT
  465. #ifdef __cplusplus
  466. static int yyinput ( void );
  467. #else
  468. static int input ( void );
  469. #endif
  470. #endif
  471. /* Amount of stuff to slurp up with each read. */
  472. #ifndef YY_READ_BUF_SIZE
  473. #ifdef __ia64__
  474. /* On IA-64, the buffer size is 16k, not 8k */
  475. #define YY_READ_BUF_SIZE 16384
  476. #else
  477. #define YY_READ_BUF_SIZE 8192
  478. #endif /* __ia64__ */
  479. #endif
  480. /* Copy whatever the last rule matched to the standard output. */
  481. #ifndef ECHO
  482. /* This used to be an fputs(), but since the string might contain NUL's,
  483. * we now use fwrite().
  484. */
  485. #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
  486. #endif
  487. /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
  488. * is returned in "result".
  489. */
  490. #ifndef YY_INPUT
  491. #define YY_INPUT(buf,result,max_size) \
  492. if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
  493. { \
  494. int c = '*'; \
  495. int n; \
  496. for ( n = 0; n < max_size && \
  497. (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
  498. buf[n] = (char) c; \
  499. if ( c == '\n' ) \
  500. buf[n++] = (char) c; \
  501. if ( c == EOF && ferror( yyin ) ) \
  502. YY_FATAL_ERROR( "input in flex scanner failed" ); \
  503. result = n; \
  504. } \
  505. else \
  506. { \
  507. errno=0; \
  508. while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
  509. { \
  510. if( errno != EINTR) \
  511. { \
  512. YY_FATAL_ERROR( "input in flex scanner failed" ); \
  513. break; \
  514. } \
  515. errno=0; \
  516. clearerr(yyin); \
  517. } \
  518. }\
  519. \
  520. #endif
  521. /* No semi-colon after return; correct usage is to write "yyterminate();" -
  522. * we don't want an extra ';' after the "return" because that will cause
  523. * some compilers to complain about unreachable statements.
  524. */
  525. #ifndef yyterminate
  526. #define yyterminate() return YY_NULL
  527. #endif
  528. /* Number of entries by which start-condition stack grows. */
  529. #ifndef YY_START_STACK_INCR
  530. #define YY_START_STACK_INCR 25
  531. #endif
  532. /* Report a fatal error. */
  533. #ifndef YY_FATAL_ERROR
  534. #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
  535. #endif
  536. /* end tables serialization structures and prototypes */
  537. /* Default declaration of generated scanner - a define so the user can
  538. * easily add parameters.
  539. */
  540. #ifndef YY_DECL
  541. #define YY_DECL_IS_OURS 1
  542. extern int yylex (void);
  543. #define YY_DECL int yylex (void)
  544. #endif /* !YY_DECL */
  545. /* Code executed at the beginning of each rule, after yytext and yyleng
  546. * have been set up.
  547. */
  548. #ifndef YY_USER_ACTION
  549. #define YY_USER_ACTION
  550. #endif
  551. /* Code executed at the end of each rule. */
  552. #ifndef YY_BREAK
  553. #define YY_BREAK /*LINTED*/break;
  554. #endif
  555. #define YY_RULE_SETUP \
  556. YY_USER_ACTION
  557. /** The main scanner function which does all the work.
  558. */
  559. YY_DECL
  560. {
  561. yy_state_type yy_current_state;
  562. char *yy_cp, *yy_bp;
  563. int yy_act;
  564. if ( !(yy_init) )
  565. {
  566. (yy_init) = 1;
  567. #ifdef YY_USER_INIT
  568. YY_USER_INIT;
  569. #endif
  570. if ( ! (yy_start) )
  571. (yy_start) = 1; /* first start state */
  572. if ( ! yyin )
  573. yyin = stdin;
  574. if ( ! yyout )
  575. yyout = stdout;
  576. if ( ! YY_CURRENT_BUFFER ) {
  577. yyensure_buffer_stack ();
  578. YY_CURRENT_BUFFER_LVALUE =
  579. yy_create_buffer( yyin, YY_BUF_SIZE );
  580. }
  581. yy_load_buffer_state( );
  582. }
  583. {
  584. #line 53 "analyse_lexicale.lex"
  585. #line 713 "lex.yy.c"
  586. while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
  587. {
  588. yy_cp = (yy_c_buf_p);
  589. /* Support of yytext. */
  590. *yy_cp = (yy_hold_char);
  591. /* yy_bp points to the position in yy_ch_buf of the start of
  592. * the current run.
  593. */
  594. yy_bp = yy_cp;
  595. yy_current_state = (yy_start);
  596. yy_match:
  597. do
  598. {
  599. YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
  600. if ( yy_accept[yy_current_state] )
  601. {
  602. (yy_last_accepting_state) = yy_current_state;
  603. (yy_last_accepting_cpos) = yy_cp;
  604. }
  605. while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  606. {
  607. yy_current_state = (int) yy_def[yy_current_state];
  608. if ( yy_current_state >= 70 )
  609. yy_c = yy_meta[yy_c];
  610. }
  611. yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
  612. ++yy_cp;
  613. }
  614. while ( yy_base[yy_current_state] != 80 );
  615. yy_find_action:
  616. yy_act = yy_accept[yy_current_state];
  617. if ( yy_act == 0 )
  618. { /* have to back up */
  619. yy_cp = (yy_last_accepting_cpos);
  620. yy_current_state = (yy_last_accepting_state);
  621. yy_act = yy_accept[yy_current_state];
  622. }
  623. YY_DO_BEFORE_ACTION;
  624. do_action: /* This label is used only to access EOF actions. */
  625. switch ( yy_act )
  626. { /* beginning of action switch */
  627. case 0: /* must back up */
  628. /* undo the effects of YY_DO_BEFORE_ACTION */
  629. *yy_cp = (yy_hold_char);
  630. yy_cp = (yy_last_accepting_cpos);
  631. yy_current_state = (yy_last_accepting_state);
  632. goto yy_find_action;
  633. case 1:
  634. YY_RULE_SETUP
  635. #line 55 "analyse_lexicale.lex"
  636. {return tADD ;}
  637. YY_BREAK
  638. case 2:
  639. YY_RULE_SETUP
  640. #line 56 "analyse_lexicale.lex"
  641. {return tSUB ;}
  642. YY_BREAK
  643. case 3:
  644. YY_RULE_SETUP
  645. #line 57 "analyse_lexicale.lex"
  646. {return tMUL ;}
  647. YY_BREAK
  648. case 4:
  649. YY_RULE_SETUP
  650. #line 58 "analyse_lexicale.lex"
  651. {return tDIV ;}
  652. YY_BREAK
  653. case 5:
  654. YY_RULE_SETUP
  655. #line 60 "analyse_lexicale.lex"
  656. {return tPO ;}
  657. YY_BREAK
  658. case 6:
  659. YY_RULE_SETUP
  660. #line 61 "analyse_lexicale.lex"
  661. {return tPF ;}
  662. YY_BREAK
  663. case 7:
  664. YY_RULE_SETUP
  665. #line 62 "analyse_lexicale.lex"
  666. {return tAO ;}
  667. YY_BREAK
  668. case 8:
  669. YY_RULE_SETUP
  670. #line 63 "analyse_lexicale.lex"
  671. {return tAF ;}
  672. YY_BREAK
  673. case 9:
  674. YY_RULE_SETUP
  675. #line 65 "analyse_lexicale.lex"
  676. {return tPV ;}
  677. YY_BREAK
  678. case 10:
  679. YY_RULE_SETUP
  680. #line 66 "analyse_lexicale.lex"
  681. {}
  682. YY_BREAK
  683. case 11:
  684. /* rule 11 can match eol */
  685. YY_RULE_SETUP
  686. #line 67 "analyse_lexicale.lex"
  687. {}
  688. YY_BREAK
  689. case 12:
  690. YY_RULE_SETUP
  691. #line 68 "analyse_lexicale.lex"
  692. {return tVIRGULE ;}
  693. YY_BREAK
  694. case 13:
  695. YY_RULE_SETUP
  696. #line 70 "analyse_lexicale.lex"
  697. {return tAFFECTATION ;}
  698. YY_BREAK
  699. case 14:
  700. YY_RULE_SETUP
  701. #line 72 "analyse_lexicale.lex"
  702. {return tEGAL ;}
  703. YY_BREAK
  704. case 15:
  705. YY_RULE_SETUP
  706. #line 73 "analyse_lexicale.lex"
  707. {return tDIFF ;}
  708. YY_BREAK
  709. case 16:
  710. YY_RULE_SETUP
  711. #line 74 "analyse_lexicale.lex"
  712. {return tLT ;}
  713. YY_BREAK
  714. case 17:
  715. YY_RULE_SETUP
  716. #line 75 "analyse_lexicale.lex"
  717. {return tGT ;}
  718. YY_BREAK
  719. case 18:
  720. YY_RULE_SETUP
  721. #line 76 "analyse_lexicale.lex"
  722. {return tLTE ;}
  723. YY_BREAK
  724. case 19:
  725. YY_RULE_SETUP
  726. #line 77 "analyse_lexicale.lex"
  727. {return tGTE ;}
  728. YY_BREAK
  729. case 20:
  730. YY_RULE_SETUP
  731. #line 78 "analyse_lexicale.lex"
  732. {return tNOT ;}
  733. YY_BREAK
  734. case 21:
  735. YY_RULE_SETUP
  736. #line 81 "analyse_lexicale.lex"
  737. {return tMAIN ;}
  738. YY_BREAK
  739. case 22:
  740. YY_RULE_SETUP
  741. #line 82 "analyse_lexicale.lex"
  742. {return tINT ;}
  743. YY_BREAK
  744. case 23:
  745. YY_RULE_SETUP
  746. #line 83 "analyse_lexicale.lex"
  747. {return tPRINT ;}
  748. YY_BREAK
  749. case 24:
  750. YY_RULE_SETUP
  751. #line 84 "analyse_lexicale.lex"
  752. {return tRETURN ;}
  753. YY_BREAK
  754. case 25:
  755. YY_RULE_SETUP
  756. #line 86 "analyse_lexicale.lex"
  757. {return tOR ;}
  758. YY_BREAK
  759. case 26:
  760. YY_RULE_SETUP
  761. #line 87 "analyse_lexicale.lex"
  762. {return tAND ;}
  763. YY_BREAK
  764. case 27:
  765. YY_RULE_SETUP
  766. #line 89 "analyse_lexicale.lex"
  767. {return tIF ;}
  768. YY_BREAK
  769. case 28:
  770. YY_RULE_SETUP
  771. #line 90 "analyse_lexicale.lex"
  772. {return tELSE ;}
  773. YY_BREAK
  774. case 29:
  775. YY_RULE_SETUP
  776. #line 91 "analyse_lexicale.lex"
  777. {return tWHILE ;}
  778. YY_BREAK
  779. case 30:
  780. YY_RULE_SETUP
  781. #line 93 "analyse_lexicale.lex"
  782. {return tCONST ;}
  783. YY_BREAK
  784. case 31:
  785. YY_RULE_SETUP
  786. #line 94 "analyse_lexicale.lex"
  787. {yylval.nombre = atoi(yytext); return tENTIER ;}
  788. YY_BREAK
  789. case 32:
  790. YY_RULE_SETUP
  791. #line 95 "analyse_lexicale.lex"
  792. {yylval.nombre = -1; return tENTIEREXP;}
  793. YY_BREAK
  794. case 33:
  795. YY_RULE_SETUP
  796. #line 96 "analyse_lexicale.lex"
  797. {strcpy(yylval.id, yytext); return tVAR ;}
  798. YY_BREAK
  799. case 34:
  800. YY_RULE_SETUP
  801. #line 98 "analyse_lexicale.lex"
  802. ECHO;
  803. YY_BREAK
  804. #line 941 "lex.yy.c"
  805. case YY_STATE_EOF(INITIAL):
  806. yyterminate();
  807. case YY_END_OF_BUFFER:
  808. {
  809. /* Amount of text matched not including the EOB char. */
  810. int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
  811. /* Undo the effects of YY_DO_BEFORE_ACTION. */
  812. *yy_cp = (yy_hold_char);
  813. YY_RESTORE_YY_MORE_OFFSET
  814. if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
  815. {
  816. /* We're scanning a new file or input source. It's
  817. * possible that this happened because the user
  818. * just pointed yyin at a new source and called
  819. * yylex(). If so, then we have to assure
  820. * consistency between YY_CURRENT_BUFFER and our
  821. * globals. Here is the right place to do so, because
  822. * this is the first action (other than possibly a
  823. * back-up) that will match for the new input source.
  824. */
  825. (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
  826. YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
  827. YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
  828. }
  829. /* Note that here we test for yy_c_buf_p "<=" to the position
  830. * of the first EOB in the buffer, since yy_c_buf_p will
  831. * already have been incremented past the NUL character
  832. * (since all states make transitions on EOB to the
  833. * end-of-buffer state). Contrast this with the test
  834. * in input().
  835. */
  836. if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
  837. { /* This was really a NUL. */
  838. yy_state_type yy_next_state;
  839. (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
  840. yy_current_state = yy_get_previous_state( );
  841. /* Okay, we're now positioned to make the NUL
  842. * transition. We couldn't have
  843. * yy_get_previous_state() go ahead and do it
  844. * for us because it doesn't know how to deal
  845. * with the possibility of jamming (and we don't
  846. * want to build jamming into it because then it
  847. * will run more slowly).
  848. */
  849. yy_next_state = yy_try_NUL_trans( yy_current_state );
  850. yy_bp = (yytext_ptr) + YY_MORE_ADJ;
  851. if ( yy_next_state )
  852. {
  853. /* Consume the NUL. */
  854. yy_cp = ++(yy_c_buf_p);
  855. yy_current_state = yy_next_state;
  856. goto yy_match;
  857. }
  858. else
  859. {
  860. yy_cp = (yy_c_buf_p);
  861. goto yy_find_action;
  862. }
  863. }
  864. else switch ( yy_get_next_buffer( ) )
  865. {
  866. case EOB_ACT_END_OF_FILE:
  867. {
  868. (yy_did_buffer_switch_on_eof) = 0;
  869. if ( yywrap( ) )
  870. {
  871. /* Note: because we've taken care in
  872. * yy_get_next_buffer() to have set up
  873. * yytext, we can now set up
  874. * yy_c_buf_p so that if some total
  875. * hoser (like flex itself) wants to
  876. * call the scanner after we return the
  877. * YY_NULL, it'll still work - another
  878. * YY_NULL will get returned.
  879. */
  880. (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
  881. yy_act = YY_STATE_EOF(YY_START);
  882. goto do_action;
  883. }
  884. else
  885. {
  886. if ( ! (yy_did_buffer_switch_on_eof) )
  887. YY_NEW_FILE;
  888. }
  889. break;
  890. }
  891. case EOB_ACT_CONTINUE_SCAN:
  892. (yy_c_buf_p) =
  893. (yytext_ptr) + yy_amount_of_matched_text;
  894. yy_current_state = yy_get_previous_state( );
  895. yy_cp = (yy_c_buf_p);
  896. yy_bp = (yytext_ptr) + YY_MORE_ADJ;
  897. goto yy_match;
  898. case EOB_ACT_LAST_MATCH:
  899. (yy_c_buf_p) =
  900. &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
  901. yy_current_state = yy_get_previous_state( );
  902. yy_cp = (yy_c_buf_p);
  903. yy_bp = (yytext_ptr) + YY_MORE_ADJ;
  904. goto yy_find_action;
  905. }
  906. break;
  907. }
  908. default:
  909. YY_FATAL_ERROR(
  910. "fatal flex scanner internal error--no action found" );
  911. } /* end of action switch */
  912. } /* end of scanning one token */
  913. } /* end of user's declarations */
  914. } /* end of yylex */
  915. /* yy_get_next_buffer - try to read in a new buffer
  916. *
  917. * Returns a code representing an action:
  918. * EOB_ACT_LAST_MATCH -
  919. * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
  920. * EOB_ACT_END_OF_FILE - end of file
  921. */
  922. static int yy_get_next_buffer (void)
  923. {
  924. char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
  925. char *source = (yytext_ptr);
  926. int number_to_move, i;
  927. int ret_val;
  928. if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
  929. YY_FATAL_ERROR(
  930. "fatal flex scanner internal error--end of buffer missed" );
  931. if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
  932. { /* Don't try to fill the buffer, so this is an EOF. */
  933. if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
  934. {
  935. /* We matched a single character, the EOB, so
  936. * treat this as a final EOF.
  937. */
  938. return EOB_ACT_END_OF_FILE;
  939. }
  940. else
  941. {
  942. /* We matched some text prior to the EOB, first
  943. * process it.
  944. */
  945. return EOB_ACT_LAST_MATCH;
  946. }
  947. }
  948. /* Try to read more data. */
  949. /* First move last chars to start of buffer. */
  950. number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
  951. for ( i = 0; i < number_to_move; ++i )
  952. *(dest++) = *(source++);
  953. if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
  954. /* don't do the read, it's not guaranteed to return an EOF,
  955. * just force an EOF
  956. */
  957. YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
  958. else
  959. {
  960. int num_to_read =
  961. YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
  962. while ( num_to_read <= 0 )
  963. { /* Not enough room in the buffer - grow it. */
  964. /* just a shorter name for the current buffer */
  965. YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
  966. int yy_c_buf_p_offset =
  967. (int) ((yy_c_buf_p) - b->yy_ch_buf);
  968. if ( b->yy_is_our_buffer )
  969. {
  970. int new_size = b->yy_buf_size * 2;
  971. if ( new_size <= 0 )
  972. b->yy_buf_size += b->yy_buf_size / 8;
  973. else
  974. b->yy_buf_size *= 2;
  975. b->yy_ch_buf = (char *)
  976. /* Include room in for 2 EOB chars. */
  977. yyrealloc( (void *) b->yy_ch_buf,
  978. (yy_size_t) (b->yy_buf_size + 2) );
  979. }
  980. else
  981. /* Can't grow it, we don't own it. */
  982. b->yy_ch_buf = NULL;
  983. if ( ! b->yy_ch_buf )
  984. YY_FATAL_ERROR(
  985. "fatal error - scanner input buffer overflow" );
  986. (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
  987. num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
  988. number_to_move - 1;
  989. }
  990. if ( num_to_read > YY_READ_BUF_SIZE )
  991. num_to_read = YY_READ_BUF_SIZE;
  992. /* Read in more data. */
  993. YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
  994. (yy_n_chars), num_to_read );
  995. YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
  996. }
  997. if ( (yy_n_chars) == 0 )
  998. {
  999. if ( number_to_move == YY_MORE_ADJ )
  1000. {
  1001. ret_val = EOB_ACT_END_OF_FILE;
  1002. yyrestart( yyin );
  1003. }
  1004. else
  1005. {
  1006. ret_val = EOB_ACT_LAST_MATCH;
  1007. YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
  1008. YY_BUFFER_EOF_PENDING;
  1009. }
  1010. }
  1011. else
  1012. ret_val = EOB_ACT_CONTINUE_SCAN;
  1013. if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
  1014. /* Extend the array by 50%, plus the number we really need. */
  1015. int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
  1016. YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
  1017. (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
  1018. if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
  1019. YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
  1020. /* "- 2" to take care of EOB's */
  1021. YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
  1022. }
  1023. (yy_n_chars) += number_to_move;
  1024. YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
  1025. YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
  1026. (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
  1027. return ret_val;
  1028. }
  1029. /* yy_get_previous_state - get the state just before the EOB char was reached */
  1030. static yy_state_type yy_get_previous_state (void)
  1031. {
  1032. yy_state_type yy_current_state;
  1033. char *yy_cp;
  1034. yy_current_state = (yy_start);
  1035. for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
  1036. {
  1037. YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
  1038. if ( yy_accept[yy_current_state] )
  1039. {
  1040. (yy_last_accepting_state) = yy_current_state;
  1041. (yy_last_accepting_cpos) = yy_cp;
  1042. }
  1043. while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  1044. {
  1045. yy_current_state = (int) yy_def[yy_current_state];
  1046. if ( yy_current_state >= 70 )
  1047. yy_c = yy_meta[yy_c];
  1048. }
  1049. yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
  1050. }
  1051. return yy_current_state;
  1052. }
  1053. /* yy_try_NUL_trans - try to make a transition on the NUL character
  1054. *
  1055. * synopsis
  1056. * next_state = yy_try_NUL_trans( current_state );
  1057. */
  1058. static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
  1059. {
  1060. int yy_is_jam;
  1061. char *yy_cp = (yy_c_buf_p);
  1062. YY_CHAR yy_c = 1;
  1063. if ( yy_accept[yy_current_state] )
  1064. {
  1065. (yy_last_accepting_state) = yy_current_state;
  1066. (yy_last_accepting_cpos) = yy_cp;
  1067. }
  1068. while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  1069. {
  1070. yy_current_state = (int) yy_def[yy_current_state];
  1071. if ( yy_current_state >= 70 )
  1072. yy_c = yy_meta[yy_c];
  1073. }
  1074. yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
  1075. yy_is_jam = (yy_current_state == 69);
  1076. return yy_is_jam ? 0 : yy_current_state;
  1077. }
  1078. #ifndef YY_NO_UNPUT
  1079. static void yyunput (int c, char * yy_bp )
  1080. {
  1081. char *yy_cp;
  1082. yy_cp = (yy_c_buf_p);
  1083. /* undo effects of setting up yytext */
  1084. *yy_cp = (yy_hold_char);
  1085. if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
  1086. { /* need to shift things up to make room */
  1087. /* +2 for EOB chars. */
  1088. int number_to_move = (yy_n_chars) + 2;
  1089. char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
  1090. YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
  1091. char *source =
  1092. &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
  1093. while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
  1094. *--dest = *--source;
  1095. yy_cp += (int) (dest - source);
  1096. yy_bp += (int) (dest - source);
  1097. YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
  1098. (yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
  1099. if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
  1100. YY_FATAL_ERROR( "flex scanner push-back overflow" );
  1101. }
  1102. *--yy_cp = (char) c;
  1103. (yytext_ptr) = yy_bp;
  1104. (yy_hold_char) = *yy_cp;
  1105. (yy_c_buf_p) = yy_cp;
  1106. }
  1107. #endif
  1108. #ifndef YY_NO_INPUT
  1109. #ifdef __cplusplus
  1110. static int yyinput (void)
  1111. #else
  1112. static int input (void)
  1113. #endif
  1114. {
  1115. int c;
  1116. *(yy_c_buf_p) = (yy_hold_char);
  1117. if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
  1118. {
  1119. /* yy_c_buf_p now points to the character we want to return.
  1120. * If this occurs *before* the EOB characters, then it's a
  1121. * valid NUL; if not, then we've hit the end of the buffer.
  1122. */
  1123. if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
  1124. /* This was really a NUL. */
  1125. *(yy_c_buf_p) = '\0';
  1126. else
  1127. { /* need more input */
  1128. int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
  1129. ++(yy_c_buf_p);
  1130. switch ( yy_get_next_buffer( ) )
  1131. {
  1132. case EOB_ACT_LAST_MATCH:
  1133. /* This happens because yy_g_n_b()
  1134. * sees that we've accumulated a
  1135. * token and flags that we need to
  1136. * try matching the token before
  1137. * proceeding. But for input(),
  1138. * there's no matching to consider.
  1139. * So convert the EOB_ACT_LAST_MATCH
  1140. * to EOB_ACT_END_OF_FILE.
  1141. */
  1142. /* Reset buffer status. */
  1143. yyrestart( yyin );
  1144. /*FALLTHROUGH*/
  1145. case EOB_ACT_END_OF_FILE:
  1146. {
  1147. if ( yywrap( ) )
  1148. return 0;
  1149. if ( ! (yy_did_buffer_switch_on_eof) )
  1150. YY_NEW_FILE;
  1151. #ifdef __cplusplus
  1152. return yyinput();
  1153. #else
  1154. return input();
  1155. #endif
  1156. }
  1157. case EOB_ACT_CONTINUE_SCAN:
  1158. (yy_c_buf_p) = (yytext_ptr) + offset;
  1159. break;
  1160. }
  1161. }
  1162. }
  1163. c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
  1164. *(yy_c_buf_p) = '\0'; /* preserve yytext */
  1165. (yy_hold_char) = *++(yy_c_buf_p);
  1166. return c;
  1167. }
  1168. #endif /* ifndef YY_NO_INPUT */
  1169. /** Immediately switch to a different input stream.
  1170. * @param input_file A readable stream.
  1171. *
  1172. * @note This function does not reset the start condition to @c INITIAL .
  1173. */
  1174. void yyrestart (FILE * input_file )
  1175. {
  1176. if ( ! YY_CURRENT_BUFFER ){
  1177. yyensure_buffer_stack ();
  1178. YY_CURRENT_BUFFER_LVALUE =
  1179. yy_create_buffer( yyin, YY_BUF_SIZE );
  1180. }
  1181. yy_init_buffer( YY_CURRENT_BUFFER, input_file );
  1182. yy_load_buffer_state( );
  1183. }
  1184. /** Switch to a different input buffer.
  1185. * @param new_buffer The new input buffer.
  1186. *
  1187. */
  1188. void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
  1189. {
  1190. /* TODO. We should be able to replace this entire function body
  1191. * with
  1192. * yypop_buffer_state();
  1193. * yypush_buffer_state(new_buffer);
  1194. */
  1195. yyensure_buffer_stack ();
  1196. if ( YY_CURRENT_BUFFER == new_buffer )
  1197. return;
  1198. if ( YY_CURRENT_BUFFER )
  1199. {
  1200. /* Flush out information for old buffer. */
  1201. *(yy_c_buf_p) = (yy_hold_char);
  1202. YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
  1203. YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
  1204. }
  1205. YY_CURRENT_BUFFER_LVALUE = new_buffer;
  1206. yy_load_buffer_state( );
  1207. /* We don't actually know whether we did this switch during
  1208. * EOF (yywrap()) processing, but the only time this flag
  1209. * is looked at is after yywrap() is called, so it's safe
  1210. * to go ahead and always set it.
  1211. */
  1212. (yy_did_buffer_switch_on_eof) = 1;
  1213. }
  1214. static void yy_load_buffer_state (void)
  1215. {
  1216. (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
  1217. (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
  1218. yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
  1219. (yy_hold_char) = *(yy_c_buf_p);
  1220. }
  1221. /** Allocate and initialize an input buffer state.
  1222. * @param file A readable stream.
  1223. * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
  1224. *
  1225. * @return the allocated buffer state.
  1226. */
  1227. YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
  1228. {
  1229. YY_BUFFER_STATE b;
  1230. b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
  1231. if ( ! b )
  1232. YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
  1233. b->yy_buf_size = size;
  1234. /* yy_ch_buf has to be 2 characters longer than the size given because
  1235. * we need to put in 2 end-of-buffer characters.
  1236. */
  1237. b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
  1238. if ( ! b->yy_ch_buf )
  1239. YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
  1240. b->yy_is_our_buffer = 1;
  1241. yy_init_buffer( b, file );
  1242. return b;
  1243. }
  1244. /** Destroy the buffer.
  1245. * @param b a buffer created with yy_create_buffer()
  1246. *
  1247. */
  1248. void yy_delete_buffer (YY_BUFFER_STATE b )
  1249. {
  1250. if ( ! b )
  1251. return;
  1252. if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
  1253. YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
  1254. if ( b->yy_is_our_buffer )
  1255. yyfree( (void *) b->yy_ch_buf );
  1256. yyfree( (void *) b );
  1257. }
  1258. /* Initializes or reinitializes a buffer.
  1259. * This function is sometimes called more than once on the same buffer,
  1260. * such as during a yyrestart() or at EOF.
  1261. */
  1262. static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
  1263. {
  1264. int oerrno = errno;
  1265. yy_flush_buffer( b );
  1266. b->yy_input_file = file;
  1267. b->yy_fill_buffer = 1;
  1268. /* If b is the current buffer, then yy_init_buffer was _probably_
  1269. * called from yyrestart() or through yy_get_next_buffer.
  1270. * In that case, we don't want to reset the lineno or column.
  1271. */
  1272. if (b != YY_CURRENT_BUFFER){
  1273. b->yy_bs_lineno = 1;
  1274. b->yy_bs_column = 0;
  1275. }
  1276. b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
  1277. errno = oerrno;
  1278. }
  1279. /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
  1280. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
  1281. *
  1282. */
  1283. void yy_flush_buffer (YY_BUFFER_STATE b )
  1284. {
  1285. if ( ! b )
  1286. return;
  1287. b->yy_n_chars = 0;
  1288. /* We always need two end-of-buffer characters. The first causes
  1289. * a transition to the end-of-buffer state. The second causes
  1290. * a jam in that state.
  1291. */
  1292. b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
  1293. b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
  1294. b->yy_buf_pos = &b->yy_ch_buf[0];
  1295. b->yy_at_bol = 1;
  1296. b->yy_buffer_status = YY_BUFFER_NEW;
  1297. if ( b == YY_CURRENT_BUFFER )
  1298. yy_load_buffer_state( );
  1299. }
  1300. /** Pushes the new state onto the stack. The new state becomes
  1301. * the current state. This function will allocate the stack
  1302. * if necessary.
  1303. * @param new_buffer The new state.
  1304. *
  1305. */
  1306. void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
  1307. {
  1308. if (new_buffer == NULL)
  1309. return;
  1310. yyensure_buffer_stack();
  1311. /* This block is copied from yy_switch_to_buffer. */
  1312. if ( YY_CURRENT_BUFFER )
  1313. {
  1314. /* Flush out information for old buffer. */
  1315. *(yy_c_buf_p) = (yy_hold_char);
  1316. YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
  1317. YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
  1318. }
  1319. /* Only push if top exists. Otherwise, replace top. */
  1320. if (YY_CURRENT_BUFFER)
  1321. (yy_buffer_stack_top)++;
  1322. YY_CURRENT_BUFFER_LVALUE = new_buffer;
  1323. /* copied from yy_switch_to_buffer. */
  1324. yy_load_buffer_state( );
  1325. (yy_did_buffer_switch_on_eof) = 1;
  1326. }
  1327. /** Removes and deletes the top of the stack, if present.
  1328. * The next element becomes the new top.
  1329. *
  1330. */
  1331. void yypop_buffer_state (void)
  1332. {
  1333. if (!YY_CURRENT_BUFFER)
  1334. return;
  1335. yy_delete_buffer(YY_CURRENT_BUFFER );
  1336. YY_CURRENT_BUFFER_LVALUE = NULL;
  1337. if ((yy_buffer_stack_top) > 0)
  1338. --(yy_buffer_stack_top);
  1339. if (YY_CURRENT_BUFFER) {
  1340. yy_load_buffer_state( );
  1341. (yy_did_buffer_switch_on_eof) = 1;
  1342. }
  1343. }
  1344. /* Allocates the stack if it does not exist.
  1345. * Guarantees space for at least one push.
  1346. */
  1347. static void yyensure_buffer_stack (void)
  1348. {
  1349. yy_size_t num_to_alloc;
  1350. if (!(yy_buffer_stack)) {
  1351. /* First allocation is just for 2 elements, since we don't know if this
  1352. * scanner will even need a stack. We use 2 instead of 1 to avoid an
  1353. * immediate realloc on the next call.
  1354. */
  1355. num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
  1356. (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
  1357. (num_to_alloc * sizeof(struct yy_buffer_state*)
  1358. );
  1359. if ( ! (yy_buffer_stack) )
  1360. YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
  1361. memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
  1362. (yy_buffer_stack_max) = num_to_alloc;
  1363. (yy_buffer_stack_top) = 0;
  1364. return;
  1365. }
  1366. if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
  1367. /* Increase the buffer to prepare for a possible push. */
  1368. yy_size_t grow_size = 8 /* arbitrary grow size */;
  1369. num_to_alloc = (yy_buffer_stack_max) + grow_size;
  1370. (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
  1371. ((yy_buffer_stack),
  1372. num_to_alloc * sizeof(struct yy_buffer_state*)
  1373. );
  1374. if ( ! (yy_buffer_stack) )
  1375. YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
  1376. /* zero only the new slots.*/
  1377. memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
  1378. (yy_buffer_stack_max) = num_to_alloc;
  1379. }
  1380. }
  1381. /** Setup the input buffer state to scan directly from a user-specified character buffer.
  1382. * @param base the character buffer
  1383. * @param size the size in bytes of the character buffer
  1384. *
  1385. * @return the newly allocated buffer state object.
  1386. */
  1387. YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
  1388. {
  1389. YY_BUFFER_STATE b;
  1390. if ( size < 2 ||
  1391. base[size-2] != YY_END_OF_BUFFER_CHAR ||
  1392. base[size-1] != YY_END_OF_BUFFER_CHAR )
  1393. /* They forgot to leave room for the EOB's. */
  1394. return NULL;
  1395. b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
  1396. if ( ! b )
  1397. YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
  1398. b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
  1399. b->yy_buf_pos = b->yy_ch_buf = base;
  1400. b->yy_is_our_buffer = 0;
  1401. b->yy_input_file = NULL;
  1402. b->yy_n_chars = b->yy_buf_size;
  1403. b->yy_is_interactive = 0;
  1404. b->yy_at_bol = 1;
  1405. b->yy_fill_buffer = 0;
  1406. b->yy_buffer_status = YY_BUFFER_NEW;
  1407. yy_switch_to_buffer( b );
  1408. return b;
  1409. }
  1410. /** Setup the input buffer state to scan a string. The next call to yylex() will
  1411. * scan from a @e copy of @a str.
  1412. * @param yystr a NUL-terminated string to scan
  1413. *
  1414. * @return the newly allocated buffer state object.
  1415. * @note If you want to scan bytes that may contain NUL values, then use
  1416. * yy_scan_bytes() instead.
  1417. */
  1418. YY_BUFFER_STATE yy_scan_string (const char * yystr )
  1419. {
  1420. return yy_scan_bytes( yystr, (int) strlen(yystr) );
  1421. }
  1422. /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
  1423. * scan from a @e copy of @a bytes.
  1424. * @param yybytes the byte buffer to scan
  1425. * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
  1426. *
  1427. * @return the newly allocated buffer state object.
  1428. */
  1429. YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
  1430. {
  1431. YY_BUFFER_STATE b;
  1432. char *buf;
  1433. yy_size_t n;
  1434. int i;
  1435. /* Get memory for full buffer, including space for trailing EOB's. */
  1436. n = (yy_size_t) (_yybytes_len + 2);
  1437. buf = (char *) yyalloc( n );
  1438. if ( ! buf )
  1439. YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
  1440. for ( i = 0; i < _yybytes_len; ++i )
  1441. buf[i] = yybytes[i];
  1442. buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
  1443. b = yy_scan_buffer( buf, n );
  1444. if ( ! b )
  1445. YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
  1446. /* It's okay to grow etc. this buffer, and we should throw it
  1447. * away when we're done.
  1448. */
  1449. b->yy_is_our_buffer = 1;
  1450. return b;
  1451. }
  1452. #ifndef YY_EXIT_FAILURE
  1453. #define YY_EXIT_FAILURE 2
  1454. #endif
  1455. static void yynoreturn yy_fatal_error (const char* msg )
  1456. {
  1457. fprintf( stderr, "%s\n", msg );
  1458. exit( YY_EXIT_FAILURE );
  1459. }
  1460. /* Redefine yyless() so it works in section 3 code. */
  1461. #undef yyless
  1462. #define yyless(n) \
  1463. do \
  1464. { \
  1465. /* Undo effects of setting up yytext. */ \
  1466. int yyless_macro_arg = (n); \
  1467. YY_LESS_LINENO(yyless_macro_arg);\
  1468. yytext[yyleng] = (yy_hold_char); \
  1469. (yy_c_buf_p) = yytext + yyless_macro_arg; \
  1470. (yy_hold_char) = *(yy_c_buf_p); \
  1471. *(yy_c_buf_p) = '\0'; \
  1472. yyleng = yyless_macro_arg; \
  1473. } \
  1474. while ( 0 )
  1475. /* Accessor methods (get/set functions) to struct members. */
  1476. /** Get the current line number.
  1477. *
  1478. */
  1479. int yyget_lineno (void)
  1480. {
  1481. return yylineno;
  1482. }
  1483. /** Get the input stream.
  1484. *
  1485. */
  1486. FILE *yyget_in (void)
  1487. {
  1488. return yyin;
  1489. }
  1490. /** Get the output stream.
  1491. *
  1492. */
  1493. FILE *yyget_out (void)
  1494. {
  1495. return yyout;
  1496. }
  1497. /** Get the length of the current token.
  1498. *
  1499. */
  1500. int yyget_leng (void)
  1501. {
  1502. return yyleng;
  1503. }
  1504. /** Get the current token.
  1505. *
  1506. */
  1507. char *yyget_text (void)
  1508. {
  1509. return yytext;
  1510. }
  1511. /** Set the current line number.
  1512. * @param _line_number line number
  1513. *
  1514. */
  1515. void yyset_lineno (int _line_number )
  1516. {
  1517. yylineno = _line_number;
  1518. }
  1519. /** Set the input stream. This does not discard the current
  1520. * input buffer.
  1521. * @param _in_str A readable stream.
  1522. *
  1523. * @see yy_switch_to_buffer
  1524. */
  1525. void yyset_in (FILE * _in_str )
  1526. {
  1527. yyin = _in_str ;
  1528. }
  1529. void yyset_out (FILE * _out_str )
  1530. {
  1531. yyout = _out_str ;
  1532. }
  1533. int yyget_debug (void)
  1534. {
  1535. return yy_flex_debug;
  1536. }
  1537. void yyset_debug (int _bdebug )
  1538. {
  1539. yy_flex_debug = _bdebug ;
  1540. }
  1541. static int yy_init_globals (void)
  1542. {
  1543. /* Initialization is the same as for the non-reentrant scanner.
  1544. * This function is called from yylex_destroy(), so don't allocate here.
  1545. */
  1546. (yy_buffer_stack) = NULL;
  1547. (yy_buffer_stack_top) = 0;
  1548. (yy_buffer_stack_max) = 0;
  1549. (yy_c_buf_p) = NULL;
  1550. (yy_init) = 0;
  1551. (yy_start) = 0;
  1552. /* Defined in main.c */
  1553. #ifdef YY_STDINIT
  1554. yyin = stdin;
  1555. yyout = stdout;
  1556. #else
  1557. yyin = NULL;
  1558. yyout = NULL;
  1559. #endif
  1560. /* For future reference: Set errno on error, since we are called by
  1561. * yylex_init()
  1562. */
  1563. return 0;
  1564. }
  1565. /* yylex_destroy is for both reentrant and non-reentrant scanners. */
  1566. int yylex_destroy (void)
  1567. {
  1568. /* Pop the buffer stack, destroying each element. */
  1569. while(YY_CURRENT_BUFFER){
  1570. yy_delete_buffer( YY_CURRENT_BUFFER );
  1571. YY_CURRENT_BUFFER_LVALUE = NULL;
  1572. yypop_buffer_state();
  1573. }
  1574. /* Destroy the stack itself. */
  1575. yyfree((yy_buffer_stack) );
  1576. (yy_buffer_stack) = NULL;
  1577. /* Reset the globals. This is important in a non-reentrant scanner so the next time
  1578. * yylex() is called, initialization will occur. */
  1579. yy_init_globals( );
  1580. return 0;
  1581. }
  1582. /*
  1583. * Internal utility routines.
  1584. */
  1585. #ifndef yytext_ptr
  1586. static void yy_flex_strncpy (char* s1, const char * s2, int n )
  1587. {
  1588. int i;
  1589. for ( i = 0; i < n; ++i )
  1590. s1[i] = s2[i];
  1591. }
  1592. #endif
  1593. #ifdef YY_NEED_STRLEN
  1594. static int yy_flex_strlen (const char * s )
  1595. {
  1596. int n;
  1597. for ( n = 0; s[n]; ++n )
  1598. ;
  1599. return n;
  1600. }
  1601. #endif
  1602. void *yyalloc (yy_size_t size )
  1603. {
  1604. return malloc(size);
  1605. }
  1606. void *yyrealloc (void * ptr, yy_size_t size )
  1607. {
  1608. /* The cast to (char *) in the following accommodates both
  1609. * implementations that use char* generic pointers, and those
  1610. * that use void* generic pointers. It works with the latter
  1611. * because both ANSI C and C++ allow castless assignment from
  1612. * any pointer type to void*, and deal with argument conversions
  1613. * as though doing an assignment.
  1614. */
  1615. return realloc(ptr, size);
  1616. }
  1617. void yyfree (void * ptr )
  1618. {
  1619. free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
  1620. }
  1621. #define YYTABLES_NAME "yytables"
  1622. #line 98 "analyse_lexicale.lex"
  1623. //int main(void){
  1624. // yylex();
  1625. //}