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 48KB

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