_ps1.0_lexer.cpp 50 KB

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