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

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