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

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