lex.c_shipped 63 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583
  1. #line 2 "scripts/genksyms/lex.c"
  2. #line 4 "scripts/genksyms/lex.c"
  3. #define YY_INT_ALIGNED short int
  4. /* A lexical scanner generated by flex */
  5. /* %not-for-header */
  6. /* %if-c-only */
  7. /* %if-not-reentrant */
  8. /* %endif */
  9. /* %endif */
  10. /* %ok-for-header */
  11. #define FLEX_SCANNER
  12. #define YY_FLEX_MAJOR_VERSION 2
  13. #define YY_FLEX_MINOR_VERSION 5
  14. #define YY_FLEX_SUBMINOR_VERSION 35
  15. #if YY_FLEX_SUBMINOR_VERSION > 0
  16. #define FLEX_BETA
  17. #endif
  18. /* %if-c++-only */
  19. /* %endif */
  20. /* %if-c-only */
  21. /* %endif */
  22. /* %if-c-only */
  23. /* %endif */
  24. /* First, we deal with platform-specific or compiler-specific issues. */
  25. /* begin standard C headers. */
  26. /* %if-c-only */
  27. #include <stdio.h>
  28. #include <string.h>
  29. #include <errno.h>
  30. #include <stdlib.h>
  31. /* %endif */
  32. /* %if-tables-serialization */
  33. /* %endif */
  34. /* end standard C headers. */
  35. /* %if-c-or-c++ */
  36. /* flex integer type definitions */
  37. #ifndef FLEXINT_H
  38. #define FLEXINT_H
  39. /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
  40. #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
  41. /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
  42. * if you want the limit (max/min) macros for int types.
  43. */
  44. #ifndef __STDC_LIMIT_MACROS
  45. #define __STDC_LIMIT_MACROS 1
  46. #endif
  47. #include <inttypes.h>
  48. typedef int8_t flex_int8_t;
  49. typedef uint8_t flex_uint8_t;
  50. typedef int16_t flex_int16_t;
  51. typedef uint16_t flex_uint16_t;
  52. typedef int32_t flex_int32_t;
  53. typedef uint32_t flex_uint32_t;
  54. #else
  55. typedef signed char flex_int8_t;
  56. typedef short int flex_int16_t;
  57. typedef int flex_int32_t;
  58. typedef unsigned char flex_uint8_t;
  59. typedef unsigned short int flex_uint16_t;
  60. typedef unsigned int flex_uint32_t;
  61. #endif /* ! C99 */
  62. /* Limits of integral types. */
  63. #ifndef INT8_MIN
  64. #define INT8_MIN (-128)
  65. #endif
  66. #ifndef INT16_MIN
  67. #define INT16_MIN (-32767-1)
  68. #endif
  69. #ifndef INT32_MIN
  70. #define INT32_MIN (-2147483647-1)
  71. #endif
  72. #ifndef INT8_MAX
  73. #define INT8_MAX (127)
  74. #endif
  75. #ifndef INT16_MAX
  76. #define INT16_MAX (32767)
  77. #endif
  78. #ifndef INT32_MAX
  79. #define INT32_MAX (2147483647)
  80. #endif
  81. #ifndef UINT8_MAX
  82. #define UINT8_MAX (255U)
  83. #endif
  84. #ifndef UINT16_MAX
  85. #define UINT16_MAX (65535U)
  86. #endif
  87. #ifndef UINT32_MAX
  88. #define UINT32_MAX (4294967295U)
  89. #endif
  90. #endif /* ! FLEXINT_H */
  91. /* %endif */
  92. /* %if-c++-only */
  93. /* %endif */
  94. #ifdef __cplusplus
  95. /* The "const" storage-class-modifier is valid. */
  96. #define YY_USE_CONST
  97. #else /* ! __cplusplus */
  98. /* C99 requires __STDC__ to be defined as 1. */
  99. #if defined (__STDC__)
  100. #define YY_USE_CONST
  101. #endif /* defined (__STDC__) */
  102. #endif /* ! __cplusplus */
  103. #ifdef YY_USE_CONST
  104. #define yyconst const
  105. #else
  106. #define yyconst
  107. #endif
  108. /* %not-for-header */
  109. /* Returned upon end-of-file. */
  110. #define YY_NULL 0
  111. /* %ok-for-header */
  112. /* %not-for-header */
  113. /* Promotes a possibly negative, possibly signed char to an unsigned
  114. * integer for use as an array index. If the signed char is negative,
  115. * we want to instead treat it as an 8-bit unsigned char, hence the
  116. * double cast.
  117. */
  118. #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
  119. /* %ok-for-header */
  120. /* %if-reentrant */
  121. /* %endif */
  122. /* %if-not-reentrant */
  123. /* %endif */
  124. /* Enter a start condition. This macro really ought to take a parameter,
  125. * but we do it the disgusting crufty way forced on us by the ()-less
  126. * definition of BEGIN.
  127. */
  128. #define BEGIN (yy_start) = 1 + 2 *
  129. /* Translate the current start state into a value that can be later handed
  130. * to BEGIN to return to the state. The YYSTATE alias is for lex
  131. * compatibility.
  132. */
  133. #define YY_START (((yy_start) - 1) / 2)
  134. #define YYSTATE YY_START
  135. /* Action number for EOF rule of a given start state. */
  136. #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
  137. /* Special action meaning "start processing a new file". */
  138. #define YY_NEW_FILE yyrestart(yyin )
  139. #define YY_END_OF_BUFFER_CHAR 0
  140. /* Size of default input buffer. */
  141. #ifndef YY_BUF_SIZE
  142. #define YY_BUF_SIZE 16384
  143. #endif
  144. /* The state buf must be large enough to hold one state per character in the main buffer.
  145. */
  146. #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
  147. #ifndef YY_TYPEDEF_YY_BUFFER_STATE
  148. #define YY_TYPEDEF_YY_BUFFER_STATE
  149. typedef struct yy_buffer_state *YY_BUFFER_STATE;
  150. #endif
  151. /* %if-not-reentrant */
  152. extern int yyleng;
  153. /* %endif */
  154. /* %if-c-only */
  155. /* %if-not-reentrant */
  156. extern FILE *yyin, *yyout;
  157. /* %endif */
  158. /* %endif */
  159. #define EOB_ACT_CONTINUE_SCAN 0
  160. #define EOB_ACT_END_OF_FILE 1
  161. #define EOB_ACT_LAST_MATCH 2
  162. #define YY_LESS_LINENO(n)
  163. /* Return all but the first "n" matched characters back to the input stream. */
  164. #define yyless(n) \
  165. do \
  166. { \
  167. /* Undo effects of setting up yytext. */ \
  168. int yyless_macro_arg = (n); \
  169. YY_LESS_LINENO(yyless_macro_arg);\
  170. *yy_cp = (yy_hold_char); \
  171. YY_RESTORE_YY_MORE_OFFSET \
  172. (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
  173. YY_DO_BEFORE_ACTION; /* set up yytext again */ \
  174. } \
  175. while ( 0 )
  176. #define unput(c) yyunput( c, (yytext_ptr) )
  177. #ifndef YY_TYPEDEF_YY_SIZE_T
  178. #define YY_TYPEDEF_YY_SIZE_T
  179. typedef size_t yy_size_t;
  180. #endif
  181. #ifndef YY_STRUCT_YY_BUFFER_STATE
  182. #define YY_STRUCT_YY_BUFFER_STATE
  183. struct yy_buffer_state
  184. {
  185. /* %if-c-only */
  186. FILE *yy_input_file;
  187. /* %endif */
  188. /* %if-c++-only */
  189. /* %endif */
  190. char *yy_ch_buf; /* input buffer */
  191. char *yy_buf_pos; /* current position in input buffer */
  192. /* Size of input buffer in bytes, not including room for EOB
  193. * characters.
  194. */
  195. yy_size_t yy_buf_size;
  196. /* Number of characters read into yy_ch_buf, not including EOB
  197. * characters.
  198. */
  199. int yy_n_chars;
  200. /* Whether we "own" the buffer - i.e., we know we created it,
  201. * and can realloc() it to grow it, and should free() it to
  202. * delete it.
  203. */
  204. int yy_is_our_buffer;
  205. /* Whether this is an "interactive" input source; if so, and
  206. * if we're using stdio for input, then we want to use getc()
  207. * instead of fread(), to make sure we stop fetching input after
  208. * each newline.
  209. */
  210. int yy_is_interactive;
  211. /* Whether we're considered to be at the beginning of a line.
  212. * If so, '^' rules will be active on the next match, otherwise
  213. * not.
  214. */
  215. int yy_at_bol;
  216. int yy_bs_lineno; /**< The line count. */
  217. int yy_bs_column; /**< The column count. */
  218. /* Whether to try to fill the input buffer when we reach the
  219. * end of it.
  220. */
  221. int yy_fill_buffer;
  222. int yy_buffer_status;
  223. #define YY_BUFFER_NEW 0
  224. #define YY_BUFFER_NORMAL 1
  225. /* When an EOF's been seen but there's still some text to process
  226. * then we mark the buffer as YY_EOF_PENDING, to indicate that we
  227. * shouldn't try reading from the input source any more. We might
  228. * still have a bunch of tokens to match, though, because of
  229. * possible backing-up.
  230. *
  231. * When we actually see the EOF, we change the status to "new"
  232. * (via yyrestart()), so that the user can continue scanning by
  233. * just pointing yyin at a new input file.
  234. */
  235. #define YY_BUFFER_EOF_PENDING 2
  236. };
  237. #endif /* !YY_STRUCT_YY_BUFFER_STATE */
  238. /* %if-c-only Standard (non-C++) definition */
  239. /* %not-for-header */
  240. /* %if-not-reentrant */
  241. /* Stack of input buffers. */
  242. static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
  243. static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
  244. static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
  245. /* %endif */
  246. /* %ok-for-header */
  247. /* %endif */
  248. /* We provide macros for accessing buffer states in case in the
  249. * future we want to put the buffer states in a more general
  250. * "scanner state".
  251. *
  252. * Returns the top of the stack, or NULL.
  253. */
  254. #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
  255. ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
  256. : NULL)
  257. /* Same as previous macro, but useful when we know that the buffer stack is not
  258. * NULL or when we need an lvalue. For internal use only.
  259. */
  260. #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
  261. /* %if-c-only Standard (non-C++) definition */
  262. /* %if-not-reentrant */
  263. /* %not-for-header */
  264. /* yy_hold_char holds the character lost when yytext is formed. */
  265. static char yy_hold_char;
  266. static int yy_n_chars; /* number of characters read into yy_ch_buf */
  267. int yyleng;
  268. /* Points to current character in buffer. */
  269. static char *yy_c_buf_p = (char *) 0;
  270. static int yy_init = 0; /* whether we need to initialize */
  271. static int yy_start = 0; /* start state number */
  272. /* Flag which is used to allow yywrap()'s to do buffer switches
  273. * instead of setting up a fresh yyin. A bit of a hack ...
  274. */
  275. static int yy_did_buffer_switch_on_eof;
  276. /* %ok-for-header */
  277. /* %endif */
  278. void yyrestart (FILE *input_file );
  279. void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
  280. YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
  281. void yy_delete_buffer (YY_BUFFER_STATE b );
  282. void yy_flush_buffer (YY_BUFFER_STATE b );
  283. void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
  284. void yypop_buffer_state (void );
  285. static void yyensure_buffer_stack (void );
  286. static void yy_load_buffer_state (void );
  287. static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
  288. #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
  289. YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
  290. YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
  291. YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len );
  292. /* %endif */
  293. void *yyalloc (yy_size_t );
  294. void *yyrealloc (void *,yy_size_t );
  295. void yyfree (void * );
  296. #define yy_new_buffer yy_create_buffer
  297. #define yy_set_interactive(is_interactive) \
  298. { \
  299. if ( ! YY_CURRENT_BUFFER ){ \
  300. yyensure_buffer_stack (); \
  301. YY_CURRENT_BUFFER_LVALUE = \
  302. yy_create_buffer(yyin,YY_BUF_SIZE ); \
  303. } \
  304. YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
  305. }
  306. #define yy_set_bol(at_bol) \
  307. { \
  308. if ( ! YY_CURRENT_BUFFER ){\
  309. yyensure_buffer_stack (); \
  310. YY_CURRENT_BUFFER_LVALUE = \
  311. yy_create_buffer(yyin,YY_BUF_SIZE ); \
  312. } \
  313. YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
  314. }
  315. #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
  316. /* %% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here */
  317. /* Begin user sect3 */
  318. #define yywrap(n) 1
  319. #define YY_SKIP_YYWRAP
  320. #define FLEX_DEBUG
  321. typedef unsigned char YY_CHAR;
  322. FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
  323. typedef int yy_state_type;
  324. extern int yylineno;
  325. int yylineno = 1;
  326. extern char *yytext;
  327. #define yytext_ptr yytext
  328. /* %if-c-only Standard (non-C++) definition */
  329. static yy_state_type yy_get_previous_state (void );
  330. static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
  331. static int yy_get_next_buffer (void );
  332. static void yy_fatal_error (yyconst char msg[] );
  333. /* %endif */
  334. /* Done after the current pattern has been matched and before the
  335. * corresponding action - sets up yytext.
  336. */
  337. #define YY_DO_BEFORE_ACTION \
  338. (yytext_ptr) = yy_bp; \
  339. /* %% [2.0] code to fiddle yytext and yyleng for yymore() goes here \ */\
  340. yyleng = (size_t) (yy_cp - yy_bp); \
  341. (yy_hold_char) = *yy_cp; \
  342. *yy_cp = '\0'; \
  343. /* %% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \ */\
  344. (yy_c_buf_p) = yy_cp;
  345. /* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */
  346. #define YY_NUM_RULES 13
  347. #define YY_END_OF_BUFFER 14
  348. /* This struct is not used in this scanner,
  349. but its presence is necessary. */
  350. struct yy_trans_info
  351. {
  352. flex_int32_t yy_verify;
  353. flex_int32_t yy_nxt;
  354. };
  355. static yyconst flex_int16_t yy_accept[73] =
  356. { 0,
  357. 0, 0, 14, 12, 4, 3, 12, 7, 12, 12,
  358. 12, 12, 12, 9, 9, 12, 12, 7, 12, 12,
  359. 4, 0, 5, 0, 7, 8, 0, 6, 0, 0,
  360. 10, 10, 9, 0, 0, 9, 9, 0, 9, 0,
  361. 0, 0, 0, 2, 0, 0, 11, 0, 10, 0,
  362. 10, 9, 9, 0, 0, 0, 10, 10, 0, 0,
  363. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  364. 1, 0
  365. } ;
  366. static yyconst flex_int32_t yy_ec[256] =
  367. { 0,
  368. 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
  369. 4, 4, 4, 1, 1, 1, 1, 1, 1, 1,
  370. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  371. 1, 2, 1, 5, 6, 7, 8, 9, 10, 1,
  372. 1, 8, 11, 1, 12, 13, 8, 14, 15, 15,
  373. 15, 15, 15, 15, 15, 16, 16, 1, 1, 17,
  374. 18, 19, 1, 1, 20, 20, 20, 20, 21, 22,
  375. 7, 7, 7, 7, 7, 23, 7, 7, 7, 7,
  376. 7, 7, 7, 7, 24, 7, 7, 25, 7, 7,
  377. 1, 26, 1, 8, 7, 1, 20, 20, 20, 20,
  378. 21, 22, 7, 7, 7, 7, 7, 27, 7, 7,
  379. 7, 7, 7, 7, 7, 7, 24, 7, 7, 25,
  380. 7, 7, 1, 28, 1, 8, 1, 1, 1, 1,
  381. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  382. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  383. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  384. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  385. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  386. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  387. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  388. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  389. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  390. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  391. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  392. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  393. 1, 1, 1, 1, 1
  394. } ;
  395. static yyconst flex_int32_t yy_meta[29] =
  396. { 0,
  397. 1, 1, 2, 1, 1, 1, 3, 1, 1, 1,
  398. 4, 4, 5, 6, 6, 6, 1, 1, 1, 7,
  399. 8, 7, 3, 3, 3, 1, 3, 1
  400. } ;
  401. static yyconst flex_int16_t yy_base[85] =
  402. { 0,
  403. 0, 145, 150, 266, 27, 266, 25, 0, 131, 23,
  404. 23, 16, 23, 39, 31, 25, 39, 60, 22, 65,
  405. 57, 43, 266, 0, 0, 266, 61, 266, 0, 128,
  406. 74, 0, 113, 59, 62, 113, 52, 0, 0, 72,
  407. 66, 110, 100, 266, 73, 74, 266, 70, 266, 90,
  408. 103, 266, 84, 129, 108, 113, 143, 266, 107, 66,
  409. 118, 137, 168, 120, 80, 91, 145, 143, 83, 41,
  410. 266, 266, 190, 196, 204, 212, 220, 228, 232, 237,
  411. 238, 243, 249, 257
  412. } ;
  413. static yyconst flex_int16_t yy_def[85] =
  414. { 0,
  415. 72, 1, 72, 72, 72, 72, 73, 74, 72, 72,
  416. 75, 72, 72, 72, 14, 72, 72, 74, 72, 76,
  417. 72, 73, 72, 77, 74, 72, 75, 72, 78, 72,
  418. 72, 31, 14, 79, 80, 72, 72, 81, 15, 73,
  419. 75, 76, 76, 72, 73, 75, 72, 82, 72, 72,
  420. 72, 72, 81, 76, 54, 72, 72, 72, 76, 54,
  421. 76, 76, 76, 54, 83, 76, 63, 83, 84, 84,
  422. 72, 0, 72, 72, 72, 72, 72, 72, 72, 72,
  423. 72, 72, 72, 72
  424. } ;
  425. static yyconst flex_int16_t yy_nxt[295] =
  426. { 0,
  427. 4, 5, 6, 5, 7, 4, 8, 9, 10, 11,
  428. 9, 12, 13, 14, 15, 15, 16, 9, 17, 8,
  429. 8, 8, 18, 8, 8, 4, 8, 19, 21, 23,
  430. 21, 26, 28, 26, 26, 30, 31, 31, 31, 26,
  431. 26, 26, 26, 71, 39, 39, 39, 23, 29, 26,
  432. 24, 32, 33, 33, 34, 72, 26, 26, 21, 35,
  433. 21, 36, 37, 38, 40, 36, 43, 44, 24, 41,
  434. 28, 32, 50, 50, 52, 28, 23, 23, 52, 35,
  435. 56, 56, 44, 28, 42, 71, 29, 31, 31, 31,
  436. 42, 29, 59, 44, 48, 49, 49, 24, 24, 29,
  437. 49, 43, 44, 51, 51, 51, 36, 37, 59, 44,
  438. 36, 65, 44, 54, 55, 55, 51, 51, 51, 59,
  439. 44, 64, 64, 64, 58, 58, 57, 57, 57, 58,
  440. 59, 44, 42, 64, 64, 64, 52, 72, 59, 44,
  441. 47, 66, 60, 60, 42, 44, 59, 69, 26, 72,
  442. 20, 61, 62, 63, 72, 61, 57, 57, 57, 66,
  443. 72, 72, 72, 66, 49, 49, 72, 61, 62, 49,
  444. 44, 61, 72, 72, 72, 72, 72, 72, 72, 72,
  445. 72, 67, 67, 67, 72, 72, 72, 67, 67, 67,
  446. 22, 22, 22, 22, 22, 22, 22, 22, 25, 72,
  447. 72, 25, 25, 25, 27, 27, 27, 27, 27, 27,
  448. 27, 27, 42, 42, 42, 42, 42, 42, 42, 42,
  449. 45, 72, 45, 45, 45, 45, 45, 45, 46, 72,
  450. 46, 46, 46, 46, 46, 46, 34, 34, 72, 34,
  451. 51, 72, 51, 53, 53, 53, 57, 72, 57, 68,
  452. 68, 68, 68, 68, 68, 68, 68, 70, 70, 70,
  453. 70, 70, 70, 70, 70, 3, 72, 72, 72, 72,
  454. 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
  455. 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
  456. 72, 72, 72, 72
  457. } ;
  458. static yyconst flex_int16_t yy_chk[295] =
  459. { 0,
  460. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  461. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  462. 1, 1, 1, 1, 1, 1, 1, 1, 5, 7,
  463. 5, 10, 11, 12, 12, 13, 13, 13, 13, 19,
  464. 10, 16, 16, 70, 15, 15, 15, 22, 11, 19,
  465. 7, 14, 14, 14, 14, 15, 17, 17, 21, 14,
  466. 21, 14, 14, 14, 18, 14, 20, 20, 22, 18,
  467. 27, 34, 35, 35, 37, 41, 40, 45, 37, 34,
  468. 48, 48, 65, 46, 65, 69, 27, 31, 31, 31,
  469. 60, 41, 66, 66, 31, 31, 31, 40, 45, 46,
  470. 31, 43, 43, 50, 50, 50, 53, 53, 59, 59,
  471. 53, 59, 42, 43, 43, 43, 51, 51, 51, 61,
  472. 61, 55, 55, 55, 51, 51, 56, 56, 56, 51,
  473. 54, 54, 55, 64, 64, 64, 36, 33, 62, 62,
  474. 30, 61, 54, 54, 64, 68, 67, 68, 9, 3,
  475. 2, 54, 54, 54, 0, 54, 57, 57, 57, 62,
  476. 0, 0, 0, 62, 57, 57, 0, 67, 67, 57,
  477. 63, 67, 0, 0, 0, 0, 0, 0, 0, 0,
  478. 0, 63, 63, 63, 0, 0, 0, 63, 63, 63,
  479. 73, 73, 73, 73, 73, 73, 73, 73, 74, 0,
  480. 0, 74, 74, 74, 75, 75, 75, 75, 75, 75,
  481. 75, 75, 76, 76, 76, 76, 76, 76, 76, 76,
  482. 77, 0, 77, 77, 77, 77, 77, 77, 78, 0,
  483. 78, 78, 78, 78, 78, 78, 79, 79, 0, 79,
  484. 80, 0, 80, 81, 81, 81, 82, 0, 82, 83,
  485. 83, 83, 83, 83, 83, 83, 83, 84, 84, 84,
  486. 84, 84, 84, 84, 84, 72, 72, 72, 72, 72,
  487. 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
  488. 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
  489. 72, 72, 72, 72
  490. } ;
  491. static yy_state_type yy_last_accepting_state;
  492. static char *yy_last_accepting_cpos;
  493. extern int yy_flex_debug;
  494. int yy_flex_debug = 1;
  495. static yyconst flex_int16_t yy_rule_linenum[13] =
  496. { 0,
  497. 67, 68, 69, 72, 75, 76, 77, 83, 84, 85,
  498. 87, 90
  499. } ;
  500. /* The intent behind this definition is that it'll catch
  501. * any uses of REJECT which flex missed.
  502. */
  503. #define REJECT reject_used_but_not_detected
  504. #define yymore() yymore_used_but_not_detected
  505. #define YY_MORE_ADJ 0
  506. #define YY_RESTORE_YY_MORE_OFFSET
  507. char *yytext;
  508. #line 1 "scripts/genksyms/lex.l"
  509. /* Lexical analysis for genksyms.
  510. Copyright 1996, 1997 Linux International.
  511. New implementation contributed by Richard Henderson <rth@tamu.edu>
  512. Based on original work by Bjorn Ekwall <bj0rn@blox.se>
  513. Taken from Linux modutils 2.4.22.
  514. This program is free software; you can redistribute it and/or modify it
  515. under the terms of the GNU General Public License as published by the
  516. Free Software Foundation; either version 2 of the License, or (at your
  517. option) any later version.
  518. This program is distributed in the hope that it will be useful, but
  519. WITHOUT ANY WARRANTY; without even the implied warranty of
  520. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  521. General Public License for more details.
  522. You should have received a copy of the GNU General Public License
  523. along with this program; if not, write to the Free Software Foundation,
  524. Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
  525. #line 25 "scripts/genksyms/lex.l"
  526. #include <limits.h>
  527. #include <stdlib.h>
  528. #include <string.h>
  529. #include <ctype.h>
  530. #include "genksyms.h"
  531. #include "parse.h"
  532. /* We've got a two-level lexer here. We let flex do basic tokenization
  533. and then we categorize those basic tokens in the second stage. */
  534. #define YY_DECL static int yylex1(void)
  535. /* We don't do multiple input files. */
  536. #define YY_NO_INPUT 1
  537. #line 668 "scripts/genksyms/lex.c"
  538. #define INITIAL 0
  539. #ifndef YY_NO_UNISTD_H
  540. /* Special case for "unistd.h", since it is non-ANSI. We include it way
  541. * down here because we want the user's section 1 to have been scanned first.
  542. * The user has a chance to override it with an option.
  543. */
  544. /* %if-c-only */
  545. #include <unistd.h>
  546. /* %endif */
  547. /* %if-c++-only */
  548. /* %endif */
  549. #endif
  550. #ifndef YY_EXTRA_TYPE
  551. #define YY_EXTRA_TYPE void *
  552. #endif
  553. /* %if-c-only Reentrant structure and macros (non-C++). */
  554. /* %if-reentrant */
  555. /* %if-c-only */
  556. static int yy_init_globals (void );
  557. /* %endif */
  558. /* %if-reentrant */
  559. /* %endif */
  560. /* %endif End reentrant structures and macros. */
  561. /* Accessor methods to globals.
  562. These are made visible to non-reentrant scanners for convenience. */
  563. int yylex_destroy (void );
  564. int yyget_debug (void );
  565. void yyset_debug (int debug_flag );
  566. YY_EXTRA_TYPE yyget_extra (void );
  567. void yyset_extra (YY_EXTRA_TYPE user_defined );
  568. FILE *yyget_in (void );
  569. void yyset_in (FILE * in_str );
  570. FILE *yyget_out (void );
  571. void yyset_out (FILE * out_str );
  572. int yyget_leng (void );
  573. char *yyget_text (void );
  574. int yyget_lineno (void );
  575. void yyset_lineno (int line_number );
  576. /* %if-bison-bridge */
  577. /* %endif */
  578. /* Macros after this point can all be overridden by user definitions in
  579. * section 1.
  580. */
  581. #ifndef YY_SKIP_YYWRAP
  582. #ifdef __cplusplus
  583. extern "C" int yywrap (void );
  584. #else
  585. extern int yywrap (void );
  586. #endif
  587. #endif
  588. /* %not-for-header */
  589. static void yyunput (int c,char *buf_ptr );
  590. /* %ok-for-header */
  591. /* %endif */
  592. #ifndef yytext_ptr
  593. static void yy_flex_strncpy (char *,yyconst char *,int );
  594. #endif
  595. #ifdef YY_NEED_STRLEN
  596. static int yy_flex_strlen (yyconst char * );
  597. #endif
  598. #ifndef YY_NO_INPUT
  599. /* %if-c-only Standard (non-C++) definition */
  600. /* %not-for-header */
  601. #ifdef __cplusplus
  602. static int yyinput (void );
  603. #else
  604. static int input (void );
  605. #endif
  606. /* %ok-for-header */
  607. /* %endif */
  608. #endif
  609. /* %if-c-only */
  610. /* %endif */
  611. /* Amount of stuff to slurp up with each read. */
  612. #ifndef YY_READ_BUF_SIZE
  613. #define YY_READ_BUF_SIZE 8192
  614. #endif
  615. /* Copy whatever the last rule matched to the standard output. */
  616. #ifndef ECHO
  617. /* %if-c-only Standard (non-C++) definition */
  618. /* This used to be an fputs(), but since the string might contain NUL's,
  619. * we now use fwrite().
  620. */
  621. #define ECHO fwrite( yytext, yyleng, 1, yyout )
  622. /* %endif */
  623. /* %if-c++-only C++ definition */
  624. /* %endif */
  625. #endif
  626. /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
  627. * is returned in "result".
  628. */
  629. #ifndef YY_INPUT
  630. #define YY_INPUT(buf,result,max_size) \
  631. /* %% [5.0] fread()/read() definition of YY_INPUT goes here unless we're doing C++ \ */\
  632. if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
  633. { \
  634. int c = '*'; \
  635. int n; \
  636. for ( n = 0; n < max_size && \
  637. (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
  638. buf[n] = (char) c; \
  639. if ( c == '\n' ) \
  640. buf[n++] = (char) c; \
  641. if ( c == EOF && ferror( yyin ) ) \
  642. YY_FATAL_ERROR( "input in flex scanner failed" ); \
  643. result = n; \
  644. } \
  645. else \
  646. { \
  647. errno=0; \
  648. while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
  649. { \
  650. if( errno != EINTR) \
  651. { \
  652. YY_FATAL_ERROR( "input in flex scanner failed" ); \
  653. break; \
  654. } \
  655. errno=0; \
  656. clearerr(yyin); \
  657. } \
  658. }\
  659. \
  660. /* %if-c++-only C++ definition \ */\
  661. /* %endif */
  662. #endif
  663. /* No semi-colon after return; correct usage is to write "yyterminate();" -
  664. * we don't want an extra ';' after the "return" because that will cause
  665. * some compilers to complain about unreachable statements.
  666. */
  667. #ifndef yyterminate
  668. #define yyterminate() return YY_NULL
  669. #endif
  670. /* Number of entries by which start-condition stack grows. */
  671. #ifndef YY_START_STACK_INCR
  672. #define YY_START_STACK_INCR 25
  673. #endif
  674. /* Report a fatal error. */
  675. #ifndef YY_FATAL_ERROR
  676. /* %if-c-only */
  677. #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
  678. /* %endif */
  679. /* %if-c++-only */
  680. /* %endif */
  681. #endif
  682. /* %if-tables-serialization structures and prototypes */
  683. /* %not-for-header */
  684. /* %ok-for-header */
  685. /* %not-for-header */
  686. /* %tables-yydmap generated elements */
  687. /* %endif */
  688. /* end tables serialization structures and prototypes */
  689. /* %ok-for-header */
  690. /* Default declaration of generated scanner - a define so the user can
  691. * easily add parameters.
  692. */
  693. #ifndef YY_DECL
  694. #define YY_DECL_IS_OURS 1
  695. /* %if-c-only Standard (non-C++) definition */
  696. extern int yylex (void);
  697. #define YY_DECL int yylex (void)
  698. /* %endif */
  699. /* %if-c++-only C++ definition */
  700. /* %endif */
  701. #endif /* !YY_DECL */
  702. /* Code executed at the beginning of each rule, after yytext and yyleng
  703. * have been set up.
  704. */
  705. #ifndef YY_USER_ACTION
  706. #define YY_USER_ACTION
  707. #endif
  708. /* Code executed at the end of each rule. */
  709. #ifndef YY_BREAK
  710. #define YY_BREAK break;
  711. #endif
  712. /* %% [6.0] YY_RULE_SETUP definition goes here */
  713. #define YY_RULE_SETUP \
  714. if ( yyleng > 0 ) \
  715. YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
  716. (yytext[yyleng - 1] == '\n'); \
  717. YY_USER_ACTION
  718. /* %not-for-header */
  719. /** The main scanner function which does all the work.
  720. */
  721. YY_DECL
  722. {
  723. register yy_state_type yy_current_state;
  724. register char *yy_cp, *yy_bp;
  725. register int yy_act;
  726. /* %% [7.0] user's declarations go here */
  727. #line 63 "scripts/genksyms/lex.l"
  728. /* Keep track of our location in the original source files. */
  729. #line 918 "scripts/genksyms/lex.c"
  730. if ( !(yy_init) )
  731. {
  732. (yy_init) = 1;
  733. #ifdef YY_USER_INIT
  734. YY_USER_INIT;
  735. #endif
  736. if ( ! (yy_start) )
  737. (yy_start) = 1; /* first start state */
  738. if ( ! yyin )
  739. /* %if-c-only */
  740. yyin = stdin;
  741. /* %endif */
  742. /* %if-c++-only */
  743. /* %endif */
  744. if ( ! yyout )
  745. /* %if-c-only */
  746. yyout = stdout;
  747. /* %endif */
  748. /* %if-c++-only */
  749. /* %endif */
  750. if ( ! YY_CURRENT_BUFFER ) {
  751. yyensure_buffer_stack ();
  752. YY_CURRENT_BUFFER_LVALUE =
  753. yy_create_buffer(yyin,YY_BUF_SIZE );
  754. }
  755. yy_load_buffer_state( );
  756. }
  757. while ( 1 ) /* loops until end-of-file is reached */
  758. {
  759. /* %% [8.0] yymore()-related code goes here */
  760. yy_cp = (yy_c_buf_p);
  761. /* Support of yytext. */
  762. *yy_cp = (yy_hold_char);
  763. /* yy_bp points to the position in yy_ch_buf of the start of
  764. * the current run.
  765. */
  766. yy_bp = yy_cp;
  767. /* %% [9.0] code to set up and find next match goes here */
  768. yy_current_state = (yy_start);
  769. yy_current_state += YY_AT_BOL();
  770. yy_match:
  771. do
  772. {
  773. register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
  774. if ( yy_accept[yy_current_state] )
  775. {
  776. (yy_last_accepting_state) = yy_current_state;
  777. (yy_last_accepting_cpos) = yy_cp;
  778. }
  779. while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  780. {
  781. yy_current_state = (int) yy_def[yy_current_state];
  782. if ( yy_current_state >= 73 )
  783. yy_c = yy_meta[(unsigned int) yy_c];
  784. }
  785. yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
  786. ++yy_cp;
  787. }
  788. while ( yy_base[yy_current_state] != 266 );
  789. yy_find_action:
  790. /* %% [10.0] code to find the action number goes here */
  791. yy_act = yy_accept[yy_current_state];
  792. if ( yy_act == 0 )
  793. { /* have to back up */
  794. yy_cp = (yy_last_accepting_cpos);
  795. yy_current_state = (yy_last_accepting_state);
  796. yy_act = yy_accept[yy_current_state];
  797. }
  798. YY_DO_BEFORE_ACTION;
  799. /* %% [11.0] code for yylineno update goes here */
  800. do_action: /* This label is used only to access EOF actions. */
  801. /* %% [12.0] debug code goes here */
  802. if ( yy_flex_debug )
  803. {
  804. if ( yy_act == 0 )
  805. fprintf( stderr, "--scanner backing up\n" );
  806. else if ( yy_act < 13 )
  807. fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n",
  808. (long)yy_rule_linenum[yy_act], yytext );
  809. else if ( yy_act == 13 )
  810. fprintf( stderr, "--accepting default rule (\"%s\")\n",
  811. yytext );
  812. else if ( yy_act == 14 )
  813. fprintf( stderr, "--(end of buffer or a NUL)\n" );
  814. else
  815. fprintf( stderr, "--EOF (start condition %d)\n", YY_START );
  816. }
  817. switch ( yy_act )
  818. { /* beginning of action switch */
  819. /* %% [13.0] actions go here */
  820. case 0: /* must back up */
  821. /* undo the effects of YY_DO_BEFORE_ACTION */
  822. *yy_cp = (yy_hold_char);
  823. yy_cp = (yy_last_accepting_cpos);
  824. yy_current_state = (yy_last_accepting_state);
  825. goto yy_find_action;
  826. case 1:
  827. /* rule 1 can match eol */
  828. YY_RULE_SETUP
  829. #line 67 "scripts/genksyms/lex.l"
  830. return FILENAME;
  831. YY_BREAK
  832. case 2:
  833. /* rule 2 can match eol */
  834. YY_RULE_SETUP
  835. #line 68 "scripts/genksyms/lex.l"
  836. cur_line++;
  837. YY_BREAK
  838. case 3:
  839. /* rule 3 can match eol */
  840. YY_RULE_SETUP
  841. #line 69 "scripts/genksyms/lex.l"
  842. cur_line++;
  843. YY_BREAK
  844. /* Ignore all other whitespace. */
  845. case 4:
  846. YY_RULE_SETUP
  847. #line 72 "scripts/genksyms/lex.l"
  848. ;
  849. YY_BREAK
  850. case 5:
  851. /* rule 5 can match eol */
  852. YY_RULE_SETUP
  853. #line 75 "scripts/genksyms/lex.l"
  854. return STRING;
  855. YY_BREAK
  856. case 6:
  857. /* rule 6 can match eol */
  858. YY_RULE_SETUP
  859. #line 76 "scripts/genksyms/lex.l"
  860. return CHAR;
  861. YY_BREAK
  862. case 7:
  863. YY_RULE_SETUP
  864. #line 77 "scripts/genksyms/lex.l"
  865. return IDENT;
  866. YY_BREAK
  867. /* The Pedant requires that the other C multi-character tokens be
  868. recognized as tokens. We don't actually use them since we don't
  869. parse expressions, but we do want whitespace to be arranged
  870. around them properly. */
  871. case 8:
  872. YY_RULE_SETUP
  873. #line 83 "scripts/genksyms/lex.l"
  874. return OTHER;
  875. YY_BREAK
  876. case 9:
  877. YY_RULE_SETUP
  878. #line 84 "scripts/genksyms/lex.l"
  879. return INT;
  880. YY_BREAK
  881. case 10:
  882. YY_RULE_SETUP
  883. #line 85 "scripts/genksyms/lex.l"
  884. return REAL;
  885. YY_BREAK
  886. case 11:
  887. YY_RULE_SETUP
  888. #line 87 "scripts/genksyms/lex.l"
  889. return DOTS;
  890. YY_BREAK
  891. /* All other tokens are single characters. */
  892. case 12:
  893. YY_RULE_SETUP
  894. #line 90 "scripts/genksyms/lex.l"
  895. return yytext[0];
  896. YY_BREAK
  897. case 13:
  898. YY_RULE_SETUP
  899. #line 93 "scripts/genksyms/lex.l"
  900. ECHO;
  901. YY_BREAK
  902. #line 1109 "scripts/genksyms/lex.c"
  903. case YY_STATE_EOF(INITIAL):
  904. yyterminate();
  905. case YY_END_OF_BUFFER:
  906. {
  907. /* Amount of text matched not including the EOB char. */
  908. int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
  909. /* Undo the effects of YY_DO_BEFORE_ACTION. */
  910. *yy_cp = (yy_hold_char);
  911. YY_RESTORE_YY_MORE_OFFSET
  912. if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
  913. {
  914. /* We're scanning a new file or input source. It's
  915. * possible that this happened because the user
  916. * just pointed yyin at a new source and called
  917. * yylex(). If so, then we have to assure
  918. * consistency between YY_CURRENT_BUFFER and our
  919. * globals. Here is the right place to do so, because
  920. * this is the first action (other than possibly a
  921. * back-up) that will match for the new input source.
  922. */
  923. (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
  924. YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
  925. YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
  926. }
  927. /* Note that here we test for yy_c_buf_p "<=" to the position
  928. * of the first EOB in the buffer, since yy_c_buf_p will
  929. * already have been incremented past the NUL character
  930. * (since all states make transitions on EOB to the
  931. * end-of-buffer state). Contrast this with the test
  932. * in input().
  933. */
  934. if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
  935. { /* This was really a NUL. */
  936. yy_state_type yy_next_state;
  937. (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
  938. yy_current_state = yy_get_previous_state( );
  939. /* Okay, we're now positioned to make the NUL
  940. * transition. We couldn't have
  941. * yy_get_previous_state() go ahead and do it
  942. * for us because it doesn't know how to deal
  943. * with the possibility of jamming (and we don't
  944. * want to build jamming into it because then it
  945. * will run more slowly).
  946. */
  947. yy_next_state = yy_try_NUL_trans( yy_current_state );
  948. yy_bp = (yytext_ptr) + YY_MORE_ADJ;
  949. if ( yy_next_state )
  950. {
  951. /* Consume the NUL. */
  952. yy_cp = ++(yy_c_buf_p);
  953. yy_current_state = yy_next_state;
  954. goto yy_match;
  955. }
  956. else
  957. {
  958. /* %% [14.0] code to do back-up for compressed tables and set up yy_cp goes here */
  959. yy_cp = (yy_c_buf_p);
  960. goto yy_find_action;
  961. }
  962. }
  963. else switch ( yy_get_next_buffer( ) )
  964. {
  965. case EOB_ACT_END_OF_FILE:
  966. {
  967. (yy_did_buffer_switch_on_eof) = 0;
  968. if ( yywrap( ) )
  969. {
  970. /* Note: because we've taken care in
  971. * yy_get_next_buffer() to have set up
  972. * yytext, we can now set up
  973. * yy_c_buf_p so that if some total
  974. * hoser (like flex itself) wants to
  975. * call the scanner after we return the
  976. * YY_NULL, it'll still work - another
  977. * YY_NULL will get returned.
  978. */
  979. (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
  980. yy_act = YY_STATE_EOF(YY_START);
  981. goto do_action;
  982. }
  983. else
  984. {
  985. if ( ! (yy_did_buffer_switch_on_eof) )
  986. YY_NEW_FILE;
  987. }
  988. break;
  989. }
  990. case EOB_ACT_CONTINUE_SCAN:
  991. (yy_c_buf_p) =
  992. (yytext_ptr) + yy_amount_of_matched_text;
  993. yy_current_state = yy_get_previous_state( );
  994. yy_cp = (yy_c_buf_p);
  995. yy_bp = (yytext_ptr) + YY_MORE_ADJ;
  996. goto yy_match;
  997. case EOB_ACT_LAST_MATCH:
  998. (yy_c_buf_p) =
  999. &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
  1000. yy_current_state = yy_get_previous_state( );
  1001. yy_cp = (yy_c_buf_p);
  1002. yy_bp = (yytext_ptr) + YY_MORE_ADJ;
  1003. goto yy_find_action;
  1004. }
  1005. break;
  1006. }
  1007. default:
  1008. YY_FATAL_ERROR(
  1009. "fatal flex scanner internal error--no action found" );
  1010. } /* end of action switch */
  1011. } /* end of scanning one token */
  1012. } /* end of yylex */
  1013. /* %ok-for-header */
  1014. /* %if-c++-only */
  1015. /* %not-for-header */
  1016. /* %ok-for-header */
  1017. /* %endif */
  1018. /* yy_get_next_buffer - try to read in a new buffer
  1019. *
  1020. * Returns a code representing an action:
  1021. * EOB_ACT_LAST_MATCH -
  1022. * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
  1023. * EOB_ACT_END_OF_FILE - end of file
  1024. */
  1025. /* %if-c-only */
  1026. static int yy_get_next_buffer (void)
  1027. /* %endif */
  1028. /* %if-c++-only */
  1029. /* %endif */
  1030. {
  1031. register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
  1032. register char *source = (yytext_ptr);
  1033. register int number_to_move, i;
  1034. int ret_val;
  1035. if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
  1036. YY_FATAL_ERROR(
  1037. "fatal flex scanner internal error--end of buffer missed" );
  1038. if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
  1039. { /* Don't try to fill the buffer, so this is an EOF. */
  1040. if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
  1041. {
  1042. /* We matched a single character, the EOB, so
  1043. * treat this as a final EOF.
  1044. */
  1045. return EOB_ACT_END_OF_FILE;
  1046. }
  1047. else
  1048. {
  1049. /* We matched some text prior to the EOB, first
  1050. * process it.
  1051. */
  1052. return EOB_ACT_LAST_MATCH;
  1053. }
  1054. }
  1055. /* Try to read more data. */
  1056. /* First move last chars to start of buffer. */
  1057. number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
  1058. for ( i = 0; i < number_to_move; ++i )
  1059. *(dest++) = *(source++);
  1060. if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
  1061. /* don't do the read, it's not guaranteed to return an EOF,
  1062. * just force an EOF
  1063. */
  1064. YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
  1065. else
  1066. {
  1067. int num_to_read =
  1068. YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
  1069. while ( num_to_read <= 0 )
  1070. { /* Not enough room in the buffer - grow it. */
  1071. /* just a shorter name for the current buffer */
  1072. YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
  1073. int yy_c_buf_p_offset =
  1074. (int) ((yy_c_buf_p) - b->yy_ch_buf);
  1075. if ( b->yy_is_our_buffer )
  1076. {
  1077. int new_size = b->yy_buf_size * 2;
  1078. if ( new_size <= 0 )
  1079. b->yy_buf_size += b->yy_buf_size / 8;
  1080. else
  1081. b->yy_buf_size *= 2;
  1082. b->yy_ch_buf = (char *)
  1083. /* Include room in for 2 EOB chars. */
  1084. yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
  1085. }
  1086. else
  1087. /* Can't grow it, we don't own it. */
  1088. b->yy_ch_buf = 0;
  1089. if ( ! b->yy_ch_buf )
  1090. YY_FATAL_ERROR(
  1091. "fatal error - scanner input buffer overflow" );
  1092. (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
  1093. num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
  1094. number_to_move - 1;
  1095. }
  1096. if ( num_to_read > YY_READ_BUF_SIZE )
  1097. num_to_read = YY_READ_BUF_SIZE;
  1098. /* Read in more data. */
  1099. YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
  1100. (yy_n_chars), (size_t) num_to_read );
  1101. YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
  1102. }
  1103. if ( (yy_n_chars) == 0 )
  1104. {
  1105. if ( number_to_move == YY_MORE_ADJ )
  1106. {
  1107. ret_val = EOB_ACT_END_OF_FILE;
  1108. yyrestart(yyin );
  1109. }
  1110. else
  1111. {
  1112. ret_val = EOB_ACT_LAST_MATCH;
  1113. YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
  1114. YY_BUFFER_EOF_PENDING;
  1115. }
  1116. }
  1117. else
  1118. ret_val = EOB_ACT_CONTINUE_SCAN;
  1119. if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
  1120. /* Extend the array by 50%, plus the number we really need. */
  1121. yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
  1122. YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
  1123. if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
  1124. YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
  1125. }
  1126. (yy_n_chars) += number_to_move;
  1127. YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
  1128. YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
  1129. (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
  1130. return ret_val;
  1131. }
  1132. /* yy_get_previous_state - get the state just before the EOB char was reached */
  1133. /* %if-c-only */
  1134. /* %not-for-header */
  1135. static yy_state_type yy_get_previous_state (void)
  1136. /* %endif */
  1137. /* %if-c++-only */
  1138. /* %endif */
  1139. {
  1140. register yy_state_type yy_current_state;
  1141. register char *yy_cp;
  1142. /* %% [15.0] code to get the start state into yy_current_state goes here */
  1143. yy_current_state = (yy_start);
  1144. yy_current_state += YY_AT_BOL();
  1145. for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
  1146. {
  1147. /* %% [16.0] code to find the next state goes here */
  1148. register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
  1149. if ( yy_accept[yy_current_state] )
  1150. {
  1151. (yy_last_accepting_state) = yy_current_state;
  1152. (yy_last_accepting_cpos) = yy_cp;
  1153. }
  1154. while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  1155. {
  1156. yy_current_state = (int) yy_def[yy_current_state];
  1157. if ( yy_current_state >= 73 )
  1158. yy_c = yy_meta[(unsigned int) yy_c];
  1159. }
  1160. yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
  1161. }
  1162. return yy_current_state;
  1163. }
  1164. /* yy_try_NUL_trans - try to make a transition on the NUL character
  1165. *
  1166. * synopsis
  1167. * next_state = yy_try_NUL_trans( current_state );
  1168. */
  1169. /* %if-c-only */
  1170. static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
  1171. /* %endif */
  1172. /* %if-c++-only */
  1173. /* %endif */
  1174. {
  1175. register int yy_is_jam;
  1176. /* %% [17.0] code to find the next state, and perhaps do backing up, goes here */
  1177. register char *yy_cp = (yy_c_buf_p);
  1178. register YY_CHAR yy_c = 1;
  1179. if ( yy_accept[yy_current_state] )
  1180. {
  1181. (yy_last_accepting_state) = yy_current_state;
  1182. (yy_last_accepting_cpos) = yy_cp;
  1183. }
  1184. while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  1185. {
  1186. yy_current_state = (int) yy_def[yy_current_state];
  1187. if ( yy_current_state >= 73 )
  1188. yy_c = yy_meta[(unsigned int) yy_c];
  1189. }
  1190. yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
  1191. yy_is_jam = (yy_current_state == 72);
  1192. return yy_is_jam ? 0 : yy_current_state;
  1193. }
  1194. /* %if-c-only */
  1195. static void yyunput (int c, register char * yy_bp )
  1196. /* %endif */
  1197. /* %if-c++-only */
  1198. /* %endif */
  1199. {
  1200. register char *yy_cp;
  1201. yy_cp = (yy_c_buf_p);
  1202. /* undo effects of setting up yytext */
  1203. *yy_cp = (yy_hold_char);
  1204. if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
  1205. { /* need to shift things up to make room */
  1206. /* +2 for EOB chars. */
  1207. register int number_to_move = (yy_n_chars) + 2;
  1208. register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
  1209. YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
  1210. register char *source =
  1211. &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
  1212. while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
  1213. *--dest = *--source;
  1214. yy_cp += (int) (dest - source);
  1215. yy_bp += (int) (dest - source);
  1216. YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
  1217. (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
  1218. if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
  1219. YY_FATAL_ERROR( "flex scanner push-back overflow" );
  1220. }
  1221. *--yy_cp = (char) c;
  1222. /* %% [18.0] update yylineno here */
  1223. (yytext_ptr) = yy_bp;
  1224. (yy_hold_char) = *yy_cp;
  1225. (yy_c_buf_p) = yy_cp;
  1226. }
  1227. /* %if-c-only */
  1228. /* %endif */
  1229. /* %if-c-only */
  1230. #ifndef YY_NO_INPUT
  1231. #ifdef __cplusplus
  1232. static int yyinput (void)
  1233. #else
  1234. static int input (void)
  1235. #endif
  1236. /* %endif */
  1237. /* %if-c++-only */
  1238. /* %endif */
  1239. {
  1240. int c;
  1241. *(yy_c_buf_p) = (yy_hold_char);
  1242. if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
  1243. {
  1244. /* yy_c_buf_p now points to the character we want to return.
  1245. * If this occurs *before* the EOB characters, then it's a
  1246. * valid NUL; if not, then we've hit the end of the buffer.
  1247. */
  1248. if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
  1249. /* This was really a NUL. */
  1250. *(yy_c_buf_p) = '\0';
  1251. else
  1252. { /* need more input */
  1253. int offset = (yy_c_buf_p) - (yytext_ptr);
  1254. ++(yy_c_buf_p);
  1255. switch ( yy_get_next_buffer( ) )
  1256. {
  1257. case EOB_ACT_LAST_MATCH:
  1258. /* This happens because yy_g_n_b()
  1259. * sees that we've accumulated a
  1260. * token and flags that we need to
  1261. * try matching the token before
  1262. * proceeding. But for input(),
  1263. * there's no matching to consider.
  1264. * So convert the EOB_ACT_LAST_MATCH
  1265. * to EOB_ACT_END_OF_FILE.
  1266. */
  1267. /* Reset buffer status. */
  1268. yyrestart(yyin );
  1269. /*FALLTHROUGH*/
  1270. case EOB_ACT_END_OF_FILE:
  1271. {
  1272. if ( yywrap( ) )
  1273. return EOF;
  1274. if ( ! (yy_did_buffer_switch_on_eof) )
  1275. YY_NEW_FILE;
  1276. #ifdef __cplusplus
  1277. return yyinput();
  1278. #else
  1279. return input();
  1280. #endif
  1281. }
  1282. case EOB_ACT_CONTINUE_SCAN:
  1283. (yy_c_buf_p) = (yytext_ptr) + offset;
  1284. break;
  1285. }
  1286. }
  1287. }
  1288. c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
  1289. *(yy_c_buf_p) = '\0'; /* preserve yytext */
  1290. (yy_hold_char) = *++(yy_c_buf_p);
  1291. /* %% [19.0] update BOL and yylineno */
  1292. YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
  1293. return c;
  1294. }
  1295. /* %if-c-only */
  1296. #endif /* ifndef YY_NO_INPUT */
  1297. /* %endif */
  1298. /** Immediately switch to a different input stream.
  1299. * @param input_file A readable stream.
  1300. *
  1301. * @note This function does not reset the start condition to @c INITIAL .
  1302. */
  1303. /* %if-c-only */
  1304. void yyrestart (FILE * input_file )
  1305. /* %endif */
  1306. /* %if-c++-only */
  1307. /* %endif */
  1308. {
  1309. if ( ! YY_CURRENT_BUFFER ){
  1310. yyensure_buffer_stack ();
  1311. YY_CURRENT_BUFFER_LVALUE =
  1312. yy_create_buffer(yyin,YY_BUF_SIZE );
  1313. }
  1314. yy_init_buffer(YY_CURRENT_BUFFER,input_file );
  1315. yy_load_buffer_state( );
  1316. }
  1317. /** Switch to a different input buffer.
  1318. * @param new_buffer The new input buffer.
  1319. *
  1320. */
  1321. /* %if-c-only */
  1322. void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
  1323. /* %endif */
  1324. /* %if-c++-only */
  1325. /* %endif */
  1326. {
  1327. /* TODO. We should be able to replace this entire function body
  1328. * with
  1329. * yypop_buffer_state();
  1330. * yypush_buffer_state(new_buffer);
  1331. */
  1332. yyensure_buffer_stack ();
  1333. if ( YY_CURRENT_BUFFER == new_buffer )
  1334. return;
  1335. if ( YY_CURRENT_BUFFER )
  1336. {
  1337. /* Flush out information for old buffer. */
  1338. *(yy_c_buf_p) = (yy_hold_char);
  1339. YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
  1340. YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
  1341. }
  1342. YY_CURRENT_BUFFER_LVALUE = new_buffer;
  1343. yy_load_buffer_state( );
  1344. /* We don't actually know whether we did this switch during
  1345. * EOF (yywrap()) processing, but the only time this flag
  1346. * is looked at is after yywrap() is called, so it's safe
  1347. * to go ahead and always set it.
  1348. */
  1349. (yy_did_buffer_switch_on_eof) = 1;
  1350. }
  1351. /* %if-c-only */
  1352. static void yy_load_buffer_state (void)
  1353. /* %endif */
  1354. /* %if-c++-only */
  1355. /* %endif */
  1356. {
  1357. (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
  1358. (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
  1359. yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
  1360. (yy_hold_char) = *(yy_c_buf_p);
  1361. }
  1362. /** Allocate and initialize an input buffer state.
  1363. * @param file A readable stream.
  1364. * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
  1365. *
  1366. * @return the allocated buffer state.
  1367. */
  1368. /* %if-c-only */
  1369. YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
  1370. /* %endif */
  1371. /* %if-c++-only */
  1372. /* %endif */
  1373. {
  1374. YY_BUFFER_STATE b;
  1375. b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
  1376. if ( ! b )
  1377. YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
  1378. b->yy_buf_size = size;
  1379. /* yy_ch_buf has to be 2 characters longer than the size given because
  1380. * we need to put in 2 end-of-buffer characters.
  1381. */
  1382. b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 );
  1383. if ( ! b->yy_ch_buf )
  1384. YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
  1385. b->yy_is_our_buffer = 1;
  1386. yy_init_buffer(b,file );
  1387. return b;
  1388. }
  1389. /** Destroy the buffer.
  1390. * @param b a buffer created with yy_create_buffer()
  1391. *
  1392. */
  1393. /* %if-c-only */
  1394. void yy_delete_buffer (YY_BUFFER_STATE b )
  1395. /* %endif */
  1396. /* %if-c++-only */
  1397. /* %endif */
  1398. {
  1399. if ( ! b )
  1400. return;
  1401. if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
  1402. YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
  1403. if ( b->yy_is_our_buffer )
  1404. yyfree((void *) b->yy_ch_buf );
  1405. yyfree((void *) b );
  1406. }
  1407. /* %if-c-only */
  1408. #ifndef __cplusplus
  1409. extern int isatty (int );
  1410. #endif /* __cplusplus */
  1411. /* %endif */
  1412. /* %if-c++-only */
  1413. /* %endif */
  1414. /* Initializes or reinitializes a buffer.
  1415. * This function is sometimes called more than once on the same buffer,
  1416. * such as during a yyrestart() or at EOF.
  1417. */
  1418. /* %if-c-only */
  1419. static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
  1420. /* %endif */
  1421. /* %if-c++-only */
  1422. /* %endif */
  1423. {
  1424. int oerrno = errno;
  1425. yy_flush_buffer(b );
  1426. b->yy_input_file = file;
  1427. b->yy_fill_buffer = 1;
  1428. /* If b is the current buffer, then yy_init_buffer was _probably_
  1429. * called from yyrestart() or through yy_get_next_buffer.
  1430. * In that case, we don't want to reset the lineno or column.
  1431. */
  1432. if (b != YY_CURRENT_BUFFER){
  1433. b->yy_bs_lineno = 1;
  1434. b->yy_bs_column = 0;
  1435. }
  1436. /* %if-c-only */
  1437. b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
  1438. /* %endif */
  1439. /* %if-c++-only */
  1440. /* %endif */
  1441. errno = oerrno;
  1442. }
  1443. /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
  1444. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
  1445. *
  1446. */
  1447. /* %if-c-only */
  1448. void yy_flush_buffer (YY_BUFFER_STATE b )
  1449. /* %endif */
  1450. /* %if-c++-only */
  1451. /* %endif */
  1452. {
  1453. if ( ! b )
  1454. return;
  1455. b->yy_n_chars = 0;
  1456. /* We always need two end-of-buffer characters. The first causes
  1457. * a transition to the end-of-buffer state. The second causes
  1458. * a jam in that state.
  1459. */
  1460. b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
  1461. b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
  1462. b->yy_buf_pos = &b->yy_ch_buf[0];
  1463. b->yy_at_bol = 1;
  1464. b->yy_buffer_status = YY_BUFFER_NEW;
  1465. if ( b == YY_CURRENT_BUFFER )
  1466. yy_load_buffer_state( );
  1467. }
  1468. /* %if-c-or-c++ */
  1469. /** Pushes the new state onto the stack. The new state becomes
  1470. * the current state. This function will allocate the stack
  1471. * if necessary.
  1472. * @param new_buffer The new state.
  1473. *
  1474. */
  1475. /* %if-c-only */
  1476. void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
  1477. /* %endif */
  1478. /* %if-c++-only */
  1479. /* %endif */
  1480. {
  1481. if (new_buffer == NULL)
  1482. return;
  1483. yyensure_buffer_stack();
  1484. /* This block is copied from yy_switch_to_buffer. */
  1485. if ( YY_CURRENT_BUFFER )
  1486. {
  1487. /* Flush out information for old buffer. */
  1488. *(yy_c_buf_p) = (yy_hold_char);
  1489. YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
  1490. YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
  1491. }
  1492. /* Only push if top exists. Otherwise, replace top. */
  1493. if (YY_CURRENT_BUFFER)
  1494. (yy_buffer_stack_top)++;
  1495. YY_CURRENT_BUFFER_LVALUE = new_buffer;
  1496. /* copied from yy_switch_to_buffer. */
  1497. yy_load_buffer_state( );
  1498. (yy_did_buffer_switch_on_eof) = 1;
  1499. }
  1500. /* %endif */
  1501. /* %if-c-or-c++ */
  1502. /** Removes and deletes the top of the stack, if present.
  1503. * The next element becomes the new top.
  1504. *
  1505. */
  1506. /* %if-c-only */
  1507. void yypop_buffer_state (void)
  1508. /* %endif */
  1509. /* %if-c++-only */
  1510. /* %endif */
  1511. {
  1512. if (!YY_CURRENT_BUFFER)
  1513. return;
  1514. yy_delete_buffer(YY_CURRENT_BUFFER );
  1515. YY_CURRENT_BUFFER_LVALUE = NULL;
  1516. if ((yy_buffer_stack_top) > 0)
  1517. --(yy_buffer_stack_top);
  1518. if (YY_CURRENT_BUFFER) {
  1519. yy_load_buffer_state( );
  1520. (yy_did_buffer_switch_on_eof) = 1;
  1521. }
  1522. }
  1523. /* %endif */
  1524. /* %if-c-or-c++ */
  1525. /* Allocates the stack if it does not exist.
  1526. * Guarantees space for at least one push.
  1527. */
  1528. /* %if-c-only */
  1529. static void yyensure_buffer_stack (void)
  1530. /* %endif */
  1531. /* %if-c++-only */
  1532. /* %endif */
  1533. {
  1534. int num_to_alloc;
  1535. if (!(yy_buffer_stack)) {
  1536. /* First allocation is just for 2 elements, since we don't know if this
  1537. * scanner will even need a stack. We use 2 instead of 1 to avoid an
  1538. * immediate realloc on the next call.
  1539. */
  1540. num_to_alloc = 1;
  1541. (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
  1542. (num_to_alloc * sizeof(struct yy_buffer_state*)
  1543. );
  1544. if ( ! (yy_buffer_stack) )
  1545. YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
  1546. memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
  1547. (yy_buffer_stack_max) = num_to_alloc;
  1548. (yy_buffer_stack_top) = 0;
  1549. return;
  1550. }
  1551. if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
  1552. /* Increase the buffer to prepare for a possible push. */
  1553. int grow_size = 8 /* arbitrary grow size */;
  1554. num_to_alloc = (yy_buffer_stack_max) + grow_size;
  1555. (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
  1556. ((yy_buffer_stack),
  1557. num_to_alloc * sizeof(struct yy_buffer_state*)
  1558. );
  1559. if ( ! (yy_buffer_stack) )
  1560. YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
  1561. /* zero only the new slots.*/
  1562. memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
  1563. (yy_buffer_stack_max) = num_to_alloc;
  1564. }
  1565. }
  1566. /* %endif */
  1567. /* %if-c-only */
  1568. /** Setup the input buffer state to scan directly from a user-specified character buffer.
  1569. * @param base the character buffer
  1570. * @param size the size in bytes of the character buffer
  1571. *
  1572. * @return the newly allocated buffer state object.
  1573. */
  1574. YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
  1575. {
  1576. YY_BUFFER_STATE b;
  1577. if ( size < 2 ||
  1578. base[size-2] != YY_END_OF_BUFFER_CHAR ||
  1579. base[size-1] != YY_END_OF_BUFFER_CHAR )
  1580. /* They forgot to leave room for the EOB's. */
  1581. return 0;
  1582. b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
  1583. if ( ! b )
  1584. YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
  1585. b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
  1586. b->yy_buf_pos = b->yy_ch_buf = base;
  1587. b->yy_is_our_buffer = 0;
  1588. b->yy_input_file = 0;
  1589. b->yy_n_chars = b->yy_buf_size;
  1590. b->yy_is_interactive = 0;
  1591. b->yy_at_bol = 1;
  1592. b->yy_fill_buffer = 0;
  1593. b->yy_buffer_status = YY_BUFFER_NEW;
  1594. yy_switch_to_buffer(b );
  1595. return b;
  1596. }
  1597. /* %endif */
  1598. /* %if-c-only */
  1599. /** Setup the input buffer state to scan a string. The next call to yylex() will
  1600. * scan from a @e copy of @a str.
  1601. * @param yystr a NUL-terminated string to scan
  1602. *
  1603. * @return the newly allocated buffer state object.
  1604. * @note If you want to scan bytes that may contain NUL values, then use
  1605. * yy_scan_bytes() instead.
  1606. */
  1607. YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
  1608. {
  1609. return yy_scan_bytes(yystr,strlen(yystr) );
  1610. }
  1611. /* %endif */
  1612. /* %if-c-only */
  1613. /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
  1614. * scan from a @e copy of @a bytes.
  1615. * @param bytes the byte buffer to scan
  1616. * @param len the number of bytes in the buffer pointed to by @a bytes.
  1617. *
  1618. * @return the newly allocated buffer state object.
  1619. */
  1620. YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len )
  1621. {
  1622. YY_BUFFER_STATE b;
  1623. char *buf;
  1624. yy_size_t n;
  1625. int i;
  1626. /* Get memory for full buffer, including space for trailing EOB's. */
  1627. n = _yybytes_len + 2;
  1628. buf = (char *) yyalloc(n );
  1629. if ( ! buf )
  1630. YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
  1631. for ( i = 0; i < _yybytes_len; ++i )
  1632. buf[i] = yybytes[i];
  1633. buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
  1634. b = yy_scan_buffer(buf,n );
  1635. if ( ! b )
  1636. YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
  1637. /* It's okay to grow etc. this buffer, and we should throw it
  1638. * away when we're done.
  1639. */
  1640. b->yy_is_our_buffer = 1;
  1641. return b;
  1642. }
  1643. /* %endif */
  1644. #ifndef YY_EXIT_FAILURE
  1645. #define YY_EXIT_FAILURE 2
  1646. #endif
  1647. /* %if-c-only */
  1648. static void yy_fatal_error (yyconst char* msg )
  1649. {
  1650. (void) fprintf( stderr, "%s\n", msg );
  1651. exit( YY_EXIT_FAILURE );
  1652. }
  1653. /* %endif */
  1654. /* %if-c++-only */
  1655. /* %endif */
  1656. /* Redefine yyless() so it works in section 3 code. */
  1657. #undef yyless
  1658. #define yyless(n) \
  1659. do \
  1660. { \
  1661. /* Undo effects of setting up yytext. */ \
  1662. int yyless_macro_arg = (n); \
  1663. YY_LESS_LINENO(yyless_macro_arg);\
  1664. yytext[yyleng] = (yy_hold_char); \
  1665. (yy_c_buf_p) = yytext + yyless_macro_arg; \
  1666. (yy_hold_char) = *(yy_c_buf_p); \
  1667. *(yy_c_buf_p) = '\0'; \
  1668. yyleng = yyless_macro_arg; \
  1669. } \
  1670. while ( 0 )
  1671. /* Accessor methods (get/set functions) to struct members. */
  1672. /* %if-c-only */
  1673. /* %if-reentrant */
  1674. /* %endif */
  1675. /** Get the current line number.
  1676. *
  1677. */
  1678. int yyget_lineno (void)
  1679. {
  1680. return yylineno;
  1681. }
  1682. /** Get the input stream.
  1683. *
  1684. */
  1685. FILE *yyget_in (void)
  1686. {
  1687. return yyin;
  1688. }
  1689. /** Get the output stream.
  1690. *
  1691. */
  1692. FILE *yyget_out (void)
  1693. {
  1694. return yyout;
  1695. }
  1696. /** Get the length of the current token.
  1697. *
  1698. */
  1699. int yyget_leng (void)
  1700. {
  1701. return yyleng;
  1702. }
  1703. /** Get the current token.
  1704. *
  1705. */
  1706. char *yyget_text (void)
  1707. {
  1708. return yytext;
  1709. }
  1710. /* %if-reentrant */
  1711. /* %endif */
  1712. /** Set the current line number.
  1713. * @param line_number
  1714. *
  1715. */
  1716. void yyset_lineno (int line_number )
  1717. {
  1718. yylineno = line_number;
  1719. }
  1720. /** Set the input stream. This does not discard the current
  1721. * input buffer.
  1722. * @param in_str A readable stream.
  1723. *
  1724. * @see yy_switch_to_buffer
  1725. */
  1726. void yyset_in (FILE * in_str )
  1727. {
  1728. yyin = in_str ;
  1729. }
  1730. void yyset_out (FILE * out_str )
  1731. {
  1732. yyout = out_str ;
  1733. }
  1734. int yyget_debug (void)
  1735. {
  1736. return yy_flex_debug;
  1737. }
  1738. void yyset_debug (int bdebug )
  1739. {
  1740. yy_flex_debug = bdebug ;
  1741. }
  1742. /* %endif */
  1743. /* %if-reentrant */
  1744. /* %if-bison-bridge */
  1745. /* %endif */
  1746. /* %endif if-c-only */
  1747. /* %if-c-only */
  1748. static int yy_init_globals (void)
  1749. {
  1750. /* Initialization is the same as for the non-reentrant scanner.
  1751. * This function is called from yylex_destroy(), so don't allocate here.
  1752. */
  1753. (yy_buffer_stack) = 0;
  1754. (yy_buffer_stack_top) = 0;
  1755. (yy_buffer_stack_max) = 0;
  1756. (yy_c_buf_p) = (char *) 0;
  1757. (yy_init) = 0;
  1758. (yy_start) = 0;
  1759. /* Defined in main.c */
  1760. #ifdef YY_STDINIT
  1761. yyin = stdin;
  1762. yyout = stdout;
  1763. #else
  1764. yyin = (FILE *) 0;
  1765. yyout = (FILE *) 0;
  1766. #endif
  1767. /* For future reference: Set errno on error, since we are called by
  1768. * yylex_init()
  1769. */
  1770. return 0;
  1771. }
  1772. /* %endif */
  1773. /* %if-c-only SNIP! this currently causes conflicts with the c++ scanner */
  1774. /* yylex_destroy is for both reentrant and non-reentrant scanners. */
  1775. int yylex_destroy (void)
  1776. {
  1777. /* Pop the buffer stack, destroying each element. */
  1778. while(YY_CURRENT_BUFFER){
  1779. yy_delete_buffer(YY_CURRENT_BUFFER );
  1780. YY_CURRENT_BUFFER_LVALUE = NULL;
  1781. yypop_buffer_state();
  1782. }
  1783. /* Destroy the stack itself. */
  1784. yyfree((yy_buffer_stack) );
  1785. (yy_buffer_stack) = NULL;
  1786. /* Reset the globals. This is important in a non-reentrant scanner so the next time
  1787. * yylex() is called, initialization will occur. */
  1788. yy_init_globals( );
  1789. /* %if-reentrant */
  1790. /* %endif */
  1791. return 0;
  1792. }
  1793. /* %endif */
  1794. /*
  1795. * Internal utility routines.
  1796. */
  1797. #ifndef yytext_ptr
  1798. static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
  1799. {
  1800. register int i;
  1801. for ( i = 0; i < n; ++i )
  1802. s1[i] = s2[i];
  1803. }
  1804. #endif
  1805. #ifdef YY_NEED_STRLEN
  1806. static int yy_flex_strlen (yyconst char * s )
  1807. {
  1808. register int n;
  1809. for ( n = 0; s[n]; ++n )
  1810. ;
  1811. return n;
  1812. }
  1813. #endif
  1814. void *yyalloc (yy_size_t size )
  1815. {
  1816. return (void *) malloc( size );
  1817. }
  1818. void *yyrealloc (void * ptr, yy_size_t size )
  1819. {
  1820. /* The cast to (char *) in the following accommodates both
  1821. * implementations that use char* generic pointers, and those
  1822. * that use void* generic pointers. It works with the latter
  1823. * because both ANSI C and C++ allow castless assignment from
  1824. * any pointer type to void*, and deal with argument conversions
  1825. * as though doing an assignment.
  1826. */
  1827. return (void *) realloc( (char *) ptr, size );
  1828. }
  1829. void yyfree (void * ptr )
  1830. {
  1831. free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
  1832. }
  1833. /* %if-tables-serialization definitions */
  1834. /* %define-yytables The name for this specific scanner's tables. */
  1835. #define YYTABLES_NAME "yytables"
  1836. /* %endif */
  1837. /* %ok-for-header */
  1838. #line 93 "scripts/genksyms/lex.l"
  1839. /* Bring in the keyword recognizer. */
  1840. #include "keywords.c"
  1841. /* Macros to append to our phrase collection list. */
  1842. /*
  1843. * We mark any token, that that equals to a known enumerator, as
  1844. * SYM_ENUM_CONST. The parser will change this for struct and union tags later,
  1845. * the only problem is struct and union members:
  1846. * enum e { a, b }; struct s { int a, b; }
  1847. * but in this case, the only effect will be, that the ABI checksums become
  1848. * more volatile, which is acceptable. Also, such collisions are quite rare,
  1849. * so far it was only observed in include/linux/telephony.h.
  1850. */
  1851. #define _APP(T,L) do { \
  1852. cur_node = next_node; \
  1853. next_node = xmalloc(sizeof(*next_node)); \
  1854. next_node->next = cur_node; \
  1855. cur_node->string = memcpy(xmalloc(L+1), T, L+1); \
  1856. cur_node->tag = \
  1857. find_symbol(cur_node->string, SYM_ENUM_CONST, 1)?\
  1858. SYM_ENUM_CONST : SYM_NORMAL ; \
  1859. } while (0)
  1860. #define APP _APP(yytext, yyleng)
  1861. /* The second stage lexer. Here we incorporate knowledge of the state
  1862. of the parser to tailor the tokens that are returned. */
  1863. int
  1864. yylex(void)
  1865. {
  1866. static enum {
  1867. ST_NOTSTARTED, ST_NORMAL, ST_ATTRIBUTE, ST_ASM, ST_BRACKET, ST_BRACE,
  1868. ST_EXPRESSION, ST_TABLE_1, ST_TABLE_2, ST_TABLE_3, ST_TABLE_4,
  1869. ST_TABLE_5, ST_TABLE_6
  1870. } lexstate = ST_NOTSTARTED;
  1871. static int suppress_type_lookup, dont_want_brace_phrase;
  1872. static struct string_list *next_node;
  1873. int token, count = 0;
  1874. struct string_list *cur_node;
  1875. if (lexstate == ST_NOTSTARTED)
  1876. {
  1877. next_node = xmalloc(sizeof(*next_node));
  1878. next_node->next = NULL;
  1879. lexstate = ST_NORMAL;
  1880. }
  1881. repeat:
  1882. token = yylex1();
  1883. if (token == 0)
  1884. return 0;
  1885. else if (token == FILENAME)
  1886. {
  1887. char *file, *e;
  1888. /* Save the filename and line number for later error messages. */
  1889. if (cur_filename)
  1890. free(cur_filename);
  1891. file = strchr(yytext, '\"')+1;
  1892. e = strchr(file, '\"');
  1893. *e = '\0';
  1894. cur_filename = memcpy(xmalloc(e-file+1), file, e-file+1);
  1895. cur_line = atoi(yytext+2);
  1896. goto repeat;
  1897. }
  1898. switch (lexstate)
  1899. {
  1900. case ST_NORMAL:
  1901. switch (token)
  1902. {
  1903. case IDENT:
  1904. APP;
  1905. {
  1906. const struct resword *r = is_reserved_word(yytext, yyleng);
  1907. if (r)
  1908. {
  1909. switch (token = r->token)
  1910. {
  1911. case ATTRIBUTE_KEYW:
  1912. lexstate = ST_ATTRIBUTE;
  1913. count = 0;
  1914. goto repeat;
  1915. case ASM_KEYW:
  1916. lexstate = ST_ASM;
  1917. count = 0;
  1918. goto repeat;
  1919. case STRUCT_KEYW:
  1920. case UNION_KEYW:
  1921. case ENUM_KEYW:
  1922. dont_want_brace_phrase = 3;
  1923. suppress_type_lookup = 2;
  1924. goto fini;
  1925. case EXPORT_SYMBOL_KEYW:
  1926. goto fini;
  1927. }
  1928. }
  1929. if (!suppress_type_lookup)
  1930. {
  1931. if (find_symbol(yytext, SYM_TYPEDEF, 1))
  1932. token = TYPE;
  1933. }
  1934. }
  1935. break;
  1936. case '[':
  1937. APP;
  1938. lexstate = ST_BRACKET;
  1939. count = 1;
  1940. goto repeat;
  1941. case '{':
  1942. APP;
  1943. if (dont_want_brace_phrase)
  1944. break;
  1945. lexstate = ST_BRACE;
  1946. count = 1;
  1947. goto repeat;
  1948. case '=': case ':':
  1949. APP;
  1950. lexstate = ST_EXPRESSION;
  1951. break;
  1952. case DOTS:
  1953. default:
  1954. APP;
  1955. break;
  1956. }
  1957. break;
  1958. case ST_ATTRIBUTE:
  1959. APP;
  1960. switch (token)
  1961. {
  1962. case '(':
  1963. ++count;
  1964. goto repeat;
  1965. case ')':
  1966. if (--count == 0)
  1967. {
  1968. lexstate = ST_NORMAL;
  1969. token = ATTRIBUTE_PHRASE;
  1970. break;
  1971. }
  1972. goto repeat;
  1973. default:
  1974. goto repeat;
  1975. }
  1976. break;
  1977. case ST_ASM:
  1978. APP;
  1979. switch (token)
  1980. {
  1981. case '(':
  1982. ++count;
  1983. goto repeat;
  1984. case ')':
  1985. if (--count == 0)
  1986. {
  1987. lexstate = ST_NORMAL;
  1988. token = ASM_PHRASE;
  1989. break;
  1990. }
  1991. goto repeat;
  1992. default:
  1993. goto repeat;
  1994. }
  1995. break;
  1996. case ST_BRACKET:
  1997. APP;
  1998. switch (token)
  1999. {
  2000. case '[':
  2001. ++count;
  2002. goto repeat;
  2003. case ']':
  2004. if (--count == 0)
  2005. {
  2006. lexstate = ST_NORMAL;
  2007. token = BRACKET_PHRASE;
  2008. break;
  2009. }
  2010. goto repeat;
  2011. default:
  2012. goto repeat;
  2013. }
  2014. break;
  2015. case ST_BRACE:
  2016. APP;
  2017. switch (token)
  2018. {
  2019. case '{':
  2020. ++count;
  2021. goto repeat;
  2022. case '}':
  2023. if (--count == 0)
  2024. {
  2025. lexstate = ST_NORMAL;
  2026. token = BRACE_PHRASE;
  2027. break;
  2028. }
  2029. goto repeat;
  2030. default:
  2031. goto repeat;
  2032. }
  2033. break;
  2034. case ST_EXPRESSION:
  2035. switch (token)
  2036. {
  2037. case '(': case '[': case '{':
  2038. ++count;
  2039. APP;
  2040. goto repeat;
  2041. case '}':
  2042. /* is this the last line of an enum declaration? */
  2043. if (count == 0)
  2044. {
  2045. /* Put back the token we just read so's we can find it again
  2046. after registering the expression. */
  2047. unput(token);
  2048. lexstate = ST_NORMAL;
  2049. token = EXPRESSION_PHRASE;
  2050. break;
  2051. }
  2052. /* FALLTHRU */
  2053. case ')': case ']':
  2054. --count;
  2055. APP;
  2056. goto repeat;
  2057. case ',': case ';':
  2058. if (count == 0)
  2059. {
  2060. /* Put back the token we just read so's we can find it again
  2061. after registering the expression. */
  2062. unput(token);
  2063. lexstate = ST_NORMAL;
  2064. token = EXPRESSION_PHRASE;
  2065. break;
  2066. }
  2067. APP;
  2068. goto repeat;
  2069. default:
  2070. APP;
  2071. goto repeat;
  2072. }
  2073. break;
  2074. case ST_TABLE_1:
  2075. goto repeat;
  2076. case ST_TABLE_2:
  2077. if (token == IDENT && yyleng == 1 && yytext[0] == 'X')
  2078. {
  2079. token = EXPORT_SYMBOL_KEYW;
  2080. lexstate = ST_TABLE_5;
  2081. APP;
  2082. break;
  2083. }
  2084. lexstate = ST_TABLE_6;
  2085. /* FALLTHRU */
  2086. case ST_TABLE_6:
  2087. switch (token)
  2088. {
  2089. case '{': case '[': case '(':
  2090. ++count;
  2091. break;
  2092. case '}': case ']': case ')':
  2093. --count;
  2094. break;
  2095. case ',':
  2096. if (count == 0)
  2097. lexstate = ST_TABLE_2;
  2098. break;
  2099. };
  2100. goto repeat;
  2101. case ST_TABLE_3:
  2102. goto repeat;
  2103. case ST_TABLE_4:
  2104. if (token == ';')
  2105. lexstate = ST_NORMAL;
  2106. goto repeat;
  2107. case ST_TABLE_5:
  2108. switch (token)
  2109. {
  2110. case ',':
  2111. token = ';';
  2112. lexstate = ST_TABLE_2;
  2113. APP;
  2114. break;
  2115. default:
  2116. APP;
  2117. break;
  2118. }
  2119. break;
  2120. default:
  2121. exit(1);
  2122. }
  2123. fini:
  2124. if (suppress_type_lookup > 0)
  2125. --suppress_type_lookup;
  2126. if (dont_want_brace_phrase > 0)
  2127. --dont_want_brace_phrase;
  2128. yylval = &next_node->next;
  2129. return token;
  2130. }