cmListFileLexer.c 75 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316
  1. #line 2 "cmListFileLexer.c"
  2. #line 4 "cmListFileLexer.c"
  3. #define YY_INT_ALIGNED short int
  4. /* A lexical scanner generated by flex */
  5. #define FLEX_SCANNER
  6. #define YY_FLEX_MAJOR_VERSION 2
  7. #define YY_FLEX_MINOR_VERSION 5
  8. #define YY_FLEX_SUBMINOR_VERSION 31
  9. #if YY_FLEX_SUBMINOR_VERSION > 0
  10. #define FLEX_BETA
  11. #endif
  12. /* First, we deal with platform-specific or compiler-specific issues. */
  13. /* begin standard C headers. */
  14. #include <stdio.h>
  15. #include <string.h>
  16. #include <errno.h>
  17. #include <stdlib.h>
  18. /* end standard C headers. */
  19. /* flex integer type definitions */
  20. #ifndef FLEXINT_H
  21. #define FLEXINT_H
  22. /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
  23. #if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
  24. #include <inttypes.h>
  25. typedef int8_t flex_int8_t;
  26. typedef uint8_t flex_uint8_t;
  27. typedef int16_t flex_int16_t;
  28. typedef uint16_t flex_uint16_t;
  29. typedef int32_t flex_int32_t;
  30. typedef uint32_t flex_uint32_t;
  31. #else
  32. typedef signed char flex_int8_t;
  33. typedef short int flex_int16_t;
  34. typedef int flex_int32_t;
  35. typedef unsigned char flex_uint8_t;
  36. typedef unsigned short int flex_uint16_t;
  37. typedef unsigned int flex_uint32_t;
  38. #endif /* ! C99 */
  39. /* Limits of integral types. */
  40. #ifndef INT8_MIN
  41. #define INT8_MIN (-128)
  42. #endif
  43. #ifndef INT16_MIN
  44. #define INT16_MIN (-32767-1)
  45. #endif
  46. #ifndef INT32_MIN
  47. #define INT32_MIN (-2147483647-1)
  48. #endif
  49. #ifndef INT8_MAX
  50. #define INT8_MAX (127)
  51. #endif
  52. #ifndef INT16_MAX
  53. #define INT16_MAX (32767)
  54. #endif
  55. #ifndef INT32_MAX
  56. #define INT32_MAX (2147483647)
  57. #endif
  58. #ifndef UINT8_MAX
  59. #define UINT8_MAX (255U)
  60. #endif
  61. #ifndef UINT16_MAX
  62. #define UINT16_MAX (65535U)
  63. #endif
  64. #ifndef UINT32_MAX
  65. #define UINT32_MAX (4294967295U)
  66. #endif
  67. #endif /* ! FLEXINT_H */
  68. #ifdef __cplusplus
  69. /* The "const" storage-class-modifier is valid. */
  70. #define YY_USE_CONST
  71. #else /* ! __cplusplus */
  72. #if __STDC__
  73. #define YY_USE_CONST
  74. #endif /* __STDC__ */
  75. #endif /* ! __cplusplus */
  76. #ifdef YY_USE_CONST
  77. #define yyconst const
  78. #else
  79. #define yyconst
  80. #endif
  81. /* Returned upon end-of-file. */
  82. #define YY_NULL 0
  83. /* Promotes a possibly negative, possibly signed char to an unsigned
  84. * integer for use as an array index. If the signed char is negative,
  85. * we want to instead treat it as an 8-bit unsigned char, hence the
  86. * double cast.
  87. */
  88. #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
  89. /* An opaque pointer. */
  90. #ifndef YY_TYPEDEF_YY_SCANNER_T
  91. #define YY_TYPEDEF_YY_SCANNER_T
  92. typedef void* yyscan_t;
  93. #endif
  94. /* For convenience, these vars (plus the bison vars far below)
  95. are macros in the reentrant scanner. */
  96. #define yyin yyg->yyin_r
  97. #define yyout yyg->yyout_r
  98. #define yyextra yyg->yyextra_r
  99. #define yyleng yyg->yyleng_r
  100. #define yytext yyg->yytext_r
  101. #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
  102. #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
  103. #define yy_flex_debug yyg->yy_flex_debug_r
  104. int cmListFileLexer_yylex_init (yyscan_t* scanner);
  105. /* Enter a start condition. This macro really ought to take a parameter,
  106. * but we do it the disgusting crufty way forced on us by the ()-less
  107. * definition of BEGIN.
  108. */
  109. #define BEGIN yyg->yy_start = 1 + 2 *
  110. /* Translate the current start state into a value that can be later handed
  111. * to BEGIN to return to the state. The YYSTATE alias is for lex
  112. * compatibility.
  113. */
  114. #define YY_START ((yyg->yy_start - 1) / 2)
  115. #define YYSTATE YY_START
  116. /* Action number for EOF rule of a given start state. */
  117. #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
  118. /* Special action meaning "start processing a new file". */
  119. #define YY_NEW_FILE cmListFileLexer_yyrestart(yyin ,yyscanner )
  120. #define YY_END_OF_BUFFER_CHAR 0
  121. /* Size of default input buffer. */
  122. #ifndef YY_BUF_SIZE
  123. #define YY_BUF_SIZE 16384
  124. #endif
  125. #ifndef YY_TYPEDEF_YY_BUFFER_STATE
  126. #define YY_TYPEDEF_YY_BUFFER_STATE
  127. typedef struct yy_buffer_state *YY_BUFFER_STATE;
  128. #endif
  129. #define EOB_ACT_CONTINUE_SCAN 0
  130. #define EOB_ACT_END_OF_FILE 1
  131. #define EOB_ACT_LAST_MATCH 2
  132. /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
  133. * access to the local variable yy_act. Since yyless() is a macro, it would break
  134. * existing scanners that call yyless() from OUTSIDE cmListFileLexer_yylex.
  135. * One obvious solution it to make yy_act a global. I tried that, and saw
  136. * a 5% performance hit in a non-yylineno scanner, because yy_act is
  137. * normally declared as a register variable-- so it is not worth it.
  138. */
  139. #define YY_LESS_LINENO(n) \
  140. do { \
  141. int yyl;\
  142. for ( yyl = n; yyl < yyleng; ++yyl )\
  143. if ( yytext[yyl] == '\n' )\
  144. --yylineno;\
  145. }while(0)
  146. /* Return all but the first "n" matched characters back to the input stream. */
  147. #define yyless(n) \
  148. do \
  149. { \
  150. /* Undo effects of setting up yytext. */ \
  151. int yyless_macro_arg = (n); \
  152. YY_LESS_LINENO(yyless_macro_arg);\
  153. *yy_cp = yyg->yy_hold_char; \
  154. YY_RESTORE_YY_MORE_OFFSET \
  155. yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
  156. YY_DO_BEFORE_ACTION; /* set up yytext again */ \
  157. } \
  158. while ( 0 )
  159. /* The following is because we cannot portably get our hands on size_t
  160. * (without autoconf's help, which isn't available because we want
  161. * flex-generated scanners to compile on their own).
  162. */
  163. #ifndef YY_TYPEDEF_YY_SIZE_T
  164. #define YY_TYPEDEF_YY_SIZE_T
  165. typedef unsigned int yy_size_t;
  166. #endif
  167. #ifndef YY_STRUCT_YY_BUFFER_STATE
  168. #define YY_STRUCT_YY_BUFFER_STATE
  169. struct yy_buffer_state
  170. {
  171. FILE *yy_input_file;
  172. char *yy_ch_buf; /* input buffer */
  173. char *yy_buf_pos; /* current position in input buffer */
  174. /* Size of input buffer in bytes, not including room for EOB
  175. * characters.
  176. */
  177. yy_size_t yy_buf_size;
  178. /* Number of characters read into yy_ch_buf, not including EOB
  179. * characters.
  180. */
  181. int yy_n_chars;
  182. /* Whether we "own" the buffer - i.e., we know we created it,
  183. * and can realloc() it to grow it, and should free() it to
  184. * delete it.
  185. */
  186. int yy_is_our_buffer;
  187. /* Whether this is an "interactive" input source; if so, and
  188. * if we're using stdio for input, then we want to use getc()
  189. * instead of fread(), to make sure we stop fetching input after
  190. * each newline.
  191. */
  192. int yy_is_interactive;
  193. /* Whether we're considered to be at the beginning of a line.
  194. * If so, '^' rules will be active on the next match, otherwise
  195. * not.
  196. */
  197. int yy_at_bol;
  198. int yy_bs_lineno; /**< The line count. */
  199. int yy_bs_column; /**< The column count. */
  200. /* Whether to try to fill the input buffer when we reach the
  201. * end of it.
  202. */
  203. int yy_fill_buffer;
  204. int yy_buffer_status;
  205. #define YY_BUFFER_NEW 0
  206. #define YY_BUFFER_NORMAL 1
  207. /* When an EOF's been seen but there's still some text to process
  208. * then we mark the buffer as YY_EOF_PENDING, to indicate that we
  209. * shouldn't try reading from the input source any more. We might
  210. * still have a bunch of tokens to match, though, because of
  211. * possible backing-up.
  212. *
  213. * When we actually see the EOF, we change the status to "new"
  214. * (via cmListFileLexer_yyrestart()), so that the user can continue scanning by
  215. * just pointing yyin at a new input file.
  216. */
  217. #define YY_BUFFER_EOF_PENDING 2
  218. };
  219. #endif /* !YY_STRUCT_YY_BUFFER_STATE */
  220. /* We provide macros for accessing buffer states in case in the
  221. * future we want to put the buffer states in a more general
  222. * "scanner state".
  223. *
  224. * Returns the top of the stack, or NULL.
  225. */
  226. #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
  227. ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
  228. : NULL)
  229. /* Same as previous macro, but useful when we know that the buffer stack is not
  230. * NULL or when we need an lvalue. For internal use only.
  231. */
  232. #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
  233. void cmListFileLexer_yyrestart (FILE *input_file ,yyscan_t yyscanner );
  234. void cmListFileLexer_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
  235. YY_BUFFER_STATE cmListFileLexer_yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner );
  236. void cmListFileLexer_yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
  237. void cmListFileLexer_yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
  238. void cmListFileLexer_yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
  239. void cmListFileLexer_yypop_buffer_state (yyscan_t yyscanner );
  240. static void cmListFileLexer_yyensure_buffer_stack (yyscan_t yyscanner );
  241. static void cmListFileLexer_yy_load_buffer_state (yyscan_t yyscanner );
  242. static void cmListFileLexer_yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
  243. #define YY_FLUSH_BUFFER cmListFileLexer_yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
  244. YY_BUFFER_STATE cmListFileLexer_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
  245. YY_BUFFER_STATE cmListFileLexer_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
  246. YY_BUFFER_STATE cmListFileLexer_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
  247. void *cmListFileLexer_yyalloc (yy_size_t ,yyscan_t yyscanner );
  248. void *cmListFileLexer_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner );
  249. void cmListFileLexer_yyfree (void * ,yyscan_t yyscanner );
  250. #define yy_new_buffer cmListFileLexer_yy_create_buffer
  251. #define yy_set_interactive(is_interactive) \
  252. { \
  253. if ( ! YY_CURRENT_BUFFER ){ \
  254. cmListFileLexer_yyensure_buffer_stack (yyscanner); \
  255. YY_CURRENT_BUFFER_LVALUE = \
  256. cmListFileLexer_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
  257. } \
  258. YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
  259. }
  260. #define yy_set_bol(at_bol) \
  261. { \
  262. if ( ! YY_CURRENT_BUFFER ){\
  263. cmListFileLexer_yyensure_buffer_stack (yyscanner); \
  264. YY_CURRENT_BUFFER_LVALUE = \
  265. cmListFileLexer_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
  266. } \
  267. YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
  268. }
  269. #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
  270. /* Begin user sect3 */
  271. #define cmListFileLexer_yywrap(n) 1
  272. #define YY_SKIP_YYWRAP
  273. typedef unsigned char YY_CHAR;
  274. typedef int yy_state_type;
  275. #define yytext_ptr yytext_r
  276. static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
  277. static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner);
  278. static int yy_get_next_buffer (yyscan_t yyscanner );
  279. static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
  280. /* Done after the current pattern has been matched and before the
  281. * corresponding action - sets up yytext.
  282. */
  283. #define YY_DO_BEFORE_ACTION \
  284. yyg->yytext_ptr = yy_bp; \
  285. yyleng = (size_t) (yy_cp - yy_bp); \
  286. yyg->yy_hold_char = *yy_cp; \
  287. *yy_cp = '\0'; \
  288. yyg->yy_c_buf_p = yy_cp;
  289. #define YY_NUM_RULES 14
  290. #define YY_END_OF_BUFFER 15
  291. /* This struct is not used in this scanner,
  292. but its presence is necessary. */
  293. struct yy_trans_info
  294. {
  295. flex_int32_t yy_verify;
  296. flex_int32_t yy_nxt;
  297. };
  298. static yyconst flex_int16_t yy_accept[39] =
  299. { 0,
  300. 0, 0, 0, 0, 15, 6, 12, 1, 7, 2,
  301. 6, 3, 4, 6, 13, 8, 9, 10, 11, 6,
  302. 0, 6, 0, 2, 0, 5, 6, 8, 0, 0,
  303. 0, 0, 0, 0, 0, 0, 0, 0
  304. } ;
  305. static yyconst flex_int32_t yy_ec[256] =
  306. { 0,
  307. 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
  308. 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
  309. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  310. 1, 2, 1, 5, 6, 7, 1, 1, 1, 8,
  311. 9, 1, 1, 1, 1, 1, 1, 10, 10, 10,
  312. 10, 10, 10, 10, 10, 10, 10, 1, 1, 1,
  313. 1, 1, 1, 1, 11, 11, 11, 11, 11, 11,
  314. 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
  315. 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
  316. 1, 12, 1, 1, 11, 1, 11, 11, 11, 11,
  317. 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
  318. 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
  319. 11, 11, 1, 1, 1, 1, 1, 1, 1, 1,
  320. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  321. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  322. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  323. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  324. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  325. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  326. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  327. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  328. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  329. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  330. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  331. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  332. 1, 1, 1, 1, 1
  333. } ;
  334. static yyconst flex_int32_t yy_meta[13] =
  335. { 0,
  336. 1, 1, 2, 1, 3, 1, 1, 1, 4, 4,
  337. 4, 1
  338. } ;
  339. static yyconst flex_int16_t yy_base[48] =
  340. { 0,
  341. 0, 0, 10, 20, 34, 32, 89, 89, 89, 0,
  342. 23, 89, 89, 35, 0, 18, 89, 89, 44, 0,
  343. 49, 21, 0, 0, 19, 0, 0, 15, 59, 0,
  344. 18, 0, 15, 12, 11, 10, 9, 89, 64, 68,
  345. 72, 76, 80, 13, 84, 12, 10
  346. } ;
  347. static yyconst flex_int16_t yy_def[48] =
  348. { 0,
  349. 38, 1, 39, 39, 38, 38, 38, 38, 38, 40,
  350. 6, 38, 38, 6, 41, 42, 38, 38, 42, 6,
  351. 38, 6, 43, 40, 44, 14, 6, 42, 42, 21,
  352. 21, 45, 46, 44, 47, 46, 47, 0, 38, 38,
  353. 38, 38, 38, 38, 38, 38, 38
  354. } ;
  355. static yyconst flex_int16_t yy_nxt[102] =
  356. { 0,
  357. 6, 7, 8, 7, 9, 10, 11, 12, 13, 6,
  358. 14, 15, 17, 37, 18, 36, 34, 30, 20, 30,
  359. 27, 19, 17, 20, 18, 35, 29, 27, 33, 29,
  360. 25, 19, 20, 38, 38, 38, 21, 38, 22, 38,
  361. 38, 20, 20, 23, 26, 26, 28, 38, 28, 30,
  362. 30, 38, 38, 20, 38, 31, 38, 38, 30, 30,
  363. 32, 28, 38, 28, 16, 16, 16, 16, 24, 38,
  364. 24, 24, 27, 38, 27, 27, 28, 38, 38, 28,
  365. 20, 38, 20, 20, 30, 38, 30, 30, 5, 38,
  366. 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
  367. 38
  368. } ;
  369. static yyconst flex_int16_t yy_chk[102] =
  370. { 0,
  371. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  372. 1, 1, 3, 47, 3, 46, 44, 37, 36, 35,
  373. 34, 3, 4, 33, 4, 31, 28, 25, 22, 16,
  374. 11, 4, 6, 5, 0, 0, 6, 0, 6, 0,
  375. 0, 6, 6, 6, 14, 14, 19, 0, 19, 21,
  376. 21, 0, 0, 21, 0, 21, 0, 0, 21, 21,
  377. 21, 29, 0, 29, 39, 39, 39, 39, 40, 0,
  378. 40, 40, 41, 0, 41, 41, 42, 0, 0, 42,
  379. 43, 0, 43, 43, 45, 0, 45, 45, 38, 38,
  380. 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
  381. 38
  382. } ;
  383. /* Table of booleans, true if rule could match eol. */
  384. static yyconst flex_int32_t yy_rule_can_match_eol[15] =
  385. { 0,
  386. 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, };
  387. /* The intent behind this definition is that it'll catch
  388. * any uses of REJECT which flex missed.
  389. */
  390. #define REJECT reject_used_but_not_detected
  391. #define yymore() yymore_used_but_not_detected
  392. #define YY_MORE_ADJ 0
  393. #define YY_RESTORE_YY_MORE_OFFSET
  394. #line 1 "cmListFileLexer.in.l"
  395. #line 2 "cmListFileLexer.in.l"
  396. /*============================================================================
  397. CMake - Cross Platform Makefile Generator
  398. Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
  399. Distributed under the OSI-approved BSD License (the "License");
  400. see accompanying file Copyright.txt for details.
  401. This software is distributed WITHOUT ANY WARRANTY; without even the
  402. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  403. See the License for more information.
  404. ============================================================================*/
  405. /*
  406. This file must be translated to C and modified to build everywhere.
  407. Run flex like this:
  408. flex --prefix=cmListFileLexer_yy -ocmListFileLexer.c cmListFileLexer.in.l
  409. Modify cmListFileLexer.c:
  410. - remove TABs
  411. - remove the yyunput function
  412. - add a statement "(void)yyscanner;" to the top of these methods:
  413. yy_fatal_error, cmListFileLexer_yyalloc, cmListFileLexer_yyrealloc, cmListFileLexer_yyfree
  414. - remove all YY_BREAK lines occurring right after return statements
  415. - remove the isatty forward declaration
  416. */
  417. #include "cmStandardLexer.h"
  418. /* Setup the proper cmListFileLexer_yylex declaration. */
  419. #define YY_EXTRA_TYPE cmListFileLexer*
  420. #define YY_DECL int cmListFileLexer_yylex (yyscan_t yyscanner, cmListFileLexer* lexer)
  421. #include "cmListFileLexer.h"
  422. /*--------------------------------------------------------------------------*/
  423. struct cmListFileLexer_s
  424. {
  425. cmListFileLexer_Token token;
  426. int line;
  427. int column;
  428. int size;
  429. FILE* file;
  430. char* string_buffer;
  431. char* string_position;
  432. int string_left;
  433. yyscan_t scanner;
  434. };
  435. static void cmListFileLexerSetToken(cmListFileLexer* lexer, const char* text,
  436. int length);
  437. static void cmListFileLexerAppend(cmListFileLexer* lexer, const char* text,
  438. int length);
  439. static int cmListFileLexerInput(cmListFileLexer* lexer, char* buffer,
  440. size_t bufferSize);
  441. static void cmListFileLexerInit(cmListFileLexer* lexer);
  442. static void cmListFileLexerDestroy(cmListFileLexer* lexer);
  443. /* Replace the lexer input function. */
  444. #undef YY_INPUT
  445. #define YY_INPUT(buf, result, max_size) \
  446. { result = cmListFileLexerInput(cmListFileLexer_yyget_extra(yyscanner), buf, max_size); }
  447. /*--------------------------------------------------------------------------*/
  448. #line 568 "cmListFileLexer.c"
  449. #define INITIAL 0
  450. #define STRING 1
  451. #ifndef YY_NO_UNISTD_H
  452. /* Special case for "unistd.h", since it is non-ANSI. We include it way
  453. * down here because we want the user's section 1 to have been scanned first.
  454. * The user has a chance to override it with an option.
  455. */
  456. #include <unistd.h>
  457. #endif
  458. #ifndef YY_EXTRA_TYPE
  459. #define YY_EXTRA_TYPE void *
  460. #endif
  461. /* Holds the entire state of the reentrant scanner. */
  462. struct yyguts_t
  463. {
  464. /* User-defined. Not touched by flex. */
  465. YY_EXTRA_TYPE yyextra_r;
  466. /* The rest are the same as the globals declared in the non-reentrant scanner. */
  467. FILE *yyin_r, *yyout_r;
  468. size_t yy_buffer_stack_top; /**< index of top of stack. */
  469. size_t yy_buffer_stack_max; /**< capacity of stack. */
  470. YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
  471. char yy_hold_char;
  472. int yy_n_chars;
  473. int yyleng_r;
  474. char *yy_c_buf_p;
  475. int yy_init;
  476. int yy_start;
  477. int yy_did_buffer_switch_on_eof;
  478. int yy_start_stack_ptr;
  479. int yy_start_stack_depth;
  480. int *yy_start_stack;
  481. yy_state_type yy_last_accepting_state;
  482. char* yy_last_accepting_cpos;
  483. int yylineno_r;
  484. int yy_flex_debug_r;
  485. char *yytext_r;
  486. int yy_more_flag;
  487. int yy_more_len;
  488. }; /* end struct yyguts_t */
  489. /* Accessor methods to globals.
  490. These are made visible to non-reentrant scanners for convenience. */
  491. int cmListFileLexer_yylex_destroy (yyscan_t yyscanner );
  492. int cmListFileLexer_yyget_debug (yyscan_t yyscanner );
  493. void cmListFileLexer_yyset_debug (int debug_flag ,yyscan_t yyscanner );
  494. YY_EXTRA_TYPE cmListFileLexer_yyget_extra (yyscan_t yyscanner );
  495. void cmListFileLexer_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
  496. FILE *cmListFileLexer_yyget_in (yyscan_t yyscanner );
  497. void cmListFileLexer_yyset_in (FILE * in_str ,yyscan_t yyscanner );
  498. FILE *cmListFileLexer_yyget_out (yyscan_t yyscanner );
  499. void cmListFileLexer_yyset_out (FILE * out_str ,yyscan_t yyscanner );
  500. int cmListFileLexer_yyget_leng (yyscan_t yyscanner );
  501. char *cmListFileLexer_yyget_text (yyscan_t yyscanner );
  502. int cmListFileLexer_yyget_lineno (yyscan_t yyscanner );
  503. void cmListFileLexer_yyset_lineno (int line_number ,yyscan_t yyscanner );
  504. /* Macros after this point can all be overridden by user definitions in
  505. * section 1.
  506. */
  507. #ifndef YY_SKIP_YYWRAP
  508. #ifdef __cplusplus
  509. extern "C" int cmListFileLexer_yywrap (yyscan_t yyscanner );
  510. #else
  511. extern int cmListFileLexer_yywrap (yyscan_t yyscanner );
  512. #endif
  513. #endif
  514. #ifndef yytext_ptr
  515. static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
  516. #endif
  517. #ifdef YY_NEED_STRLEN
  518. static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
  519. #endif
  520. #ifndef YY_NO_INPUT
  521. #ifdef __cplusplus
  522. static int yyinput (yyscan_t yyscanner );
  523. #else
  524. static int input (yyscan_t yyscanner );
  525. #endif
  526. #endif
  527. /* Amount of stuff to slurp up with each read. */
  528. #ifndef YY_READ_BUF_SIZE
  529. #define YY_READ_BUF_SIZE 8192
  530. #endif
  531. /* Copy whatever the last rule matched to the standard output. */
  532. #ifndef ECHO
  533. /* This used to be an fputs(), but since the string might contain NUL's,
  534. * we now use fwrite().
  535. */
  536. #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
  537. #endif
  538. /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
  539. * is returned in "result".
  540. */
  541. #ifndef YY_INPUT
  542. #define YY_INPUT(buf,result,max_size) \
  543. if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
  544. { \
  545. int c = '*'; \
  546. size_t n; \
  547. for ( n = 0; n < max_size && \
  548. (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
  549. buf[n] = (char) c; \
  550. if ( c == '\n' ) \
  551. buf[n++] = (char) c; \
  552. if ( c == EOF && ferror( yyin ) ) \
  553. YY_FATAL_ERROR( "input in flex scanner failed" ); \
  554. result = n; \
  555. } \
  556. else \
  557. { \
  558. errno=0; \
  559. while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
  560. { \
  561. if( errno != EINTR) \
  562. { \
  563. YY_FATAL_ERROR( "input in flex scanner failed" ); \
  564. break; \
  565. } \
  566. errno=0; \
  567. clearerr(yyin); \
  568. } \
  569. }\
  570. \
  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 , yyscanner)
  586. #endif
  587. /* end tables serialization structures and prototypes */
  588. /* Default declaration of generated scanner - a define so the user can
  589. * easily add parameters.
  590. */
  591. #ifndef YY_DECL
  592. #define YY_DECL_IS_OURS 1
  593. extern int cmListFileLexer_yylex (yyscan_t yyscanner);
  594. #define YY_DECL int cmListFileLexer_yylex (yyscan_t yyscanner)
  595. #endif /* !YY_DECL */
  596. /* Code executed at the beginning of each rule, after yytext and yyleng
  597. * have been set up.
  598. */
  599. #ifndef YY_USER_ACTION
  600. #define YY_USER_ACTION
  601. #endif
  602. /* Code executed at the end of each rule. */
  603. #ifndef YY_BREAK
  604. #define YY_BREAK break;
  605. #endif
  606. #define YY_RULE_SETUP \
  607. YY_USER_ACTION
  608. /** The main scanner function which does all the work.
  609. */
  610. YY_DECL
  611. {
  612. register yy_state_type yy_current_state;
  613. register char *yy_cp, *yy_bp;
  614. register int yy_act;
  615. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  616. #line 100 "cmListFileLexer.in.l"
  617. #line 787 "cmListFileLexer.c"
  618. if ( yyg->yy_init )
  619. {
  620. yyg->yy_init = 0;
  621. #ifdef YY_USER_INIT
  622. YY_USER_INIT;
  623. #endif
  624. if ( ! yyg->yy_start )
  625. yyg->yy_start = 1; /* first start state */
  626. if ( ! yyin )
  627. yyin = stdin;
  628. if ( ! yyout )
  629. yyout = stdout;
  630. if ( ! YY_CURRENT_BUFFER ) {
  631. cmListFileLexer_yyensure_buffer_stack (yyscanner);
  632. YY_CURRENT_BUFFER_LVALUE =
  633. cmListFileLexer_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
  634. }
  635. cmListFileLexer_yy_load_buffer_state(yyscanner );
  636. }
  637. while ( 1 ) /* loops until end-of-file is reached */
  638. {
  639. yy_cp = yyg->yy_c_buf_p;
  640. /* Support of yytext. */
  641. *yy_cp = yyg->yy_hold_char;
  642. /* yy_bp points to the position in yy_ch_buf of the start of
  643. * the current run.
  644. */
  645. yy_bp = yy_cp;
  646. yy_current_state = yyg->yy_start;
  647. yy_match:
  648. do
  649. {
  650. register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
  651. if ( yy_accept[yy_current_state] )
  652. {
  653. yyg->yy_last_accepting_state = yy_current_state;
  654. yyg->yy_last_accepting_cpos = yy_cp;
  655. }
  656. while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  657. {
  658. yy_current_state = (int) yy_def[yy_current_state];
  659. if ( yy_current_state >= 39 )
  660. yy_c = yy_meta[(unsigned int) yy_c];
  661. }
  662. yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
  663. ++yy_cp;
  664. }
  665. while ( yy_base[yy_current_state] != 89 );
  666. yy_find_action:
  667. yy_act = yy_accept[yy_current_state];
  668. if ( yy_act == 0 )
  669. { /* have to back up */
  670. yy_cp = yyg->yy_last_accepting_cpos;
  671. yy_current_state = yyg->yy_last_accepting_state;
  672. yy_act = yy_accept[yy_current_state];
  673. }
  674. YY_DO_BEFORE_ACTION;
  675. if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
  676. {
  677. int yyl;
  678. for ( yyl = 0; yyl < yyleng; ++yyl )
  679. if ( yytext[yyl] == '\n' )
  680. do{ yylineno++;
  681. yycolumn=0;
  682. }while(0)
  683. ;
  684. }
  685. do_action: /* This label is used only to access EOF actions. */
  686. switch ( yy_act )
  687. { /* beginning of action switch */
  688. case 0: /* must back up */
  689. /* undo the effects of YY_DO_BEFORE_ACTION */
  690. *yy_cp = yyg->yy_hold_char;
  691. yy_cp = yyg->yy_last_accepting_cpos;
  692. yy_current_state = yyg->yy_last_accepting_state;
  693. goto yy_find_action;
  694. case 1:
  695. /* rule 1 can match eol */
  696. YY_RULE_SETUP
  697. #line 102 "cmListFileLexer.in.l"
  698. {
  699. lexer->token.type = cmListFileLexer_Token_Newline;
  700. cmListFileLexerSetToken(lexer, yytext, yyleng);
  701. ++lexer->line;
  702. lexer->column = 1;
  703. return 1;
  704. }
  705. case 2:
  706. YY_RULE_SETUP
  707. #line 110 "cmListFileLexer.in.l"
  708. {
  709. lexer->column += yyleng;
  710. }
  711. YY_BREAK
  712. case 3:
  713. YY_RULE_SETUP
  714. #line 114 "cmListFileLexer.in.l"
  715. {
  716. lexer->token.type = cmListFileLexer_Token_ParenLeft;
  717. cmListFileLexerSetToken(lexer, yytext, yyleng);
  718. lexer->column += yyleng;
  719. return 1;
  720. }
  721. case 4:
  722. YY_RULE_SETUP
  723. #line 121 "cmListFileLexer.in.l"
  724. {
  725. lexer->token.type = cmListFileLexer_Token_ParenRight;
  726. cmListFileLexerSetToken(lexer, yytext, yyleng);
  727. lexer->column += yyleng;
  728. return 1;
  729. }
  730. case 5:
  731. YY_RULE_SETUP
  732. #line 128 "cmListFileLexer.in.l"
  733. {
  734. lexer->token.type = cmListFileLexer_Token_Identifier;
  735. cmListFileLexerSetToken(lexer, yytext, yyleng);
  736. lexer->column += yyleng;
  737. return 1;
  738. }
  739. case 6:
  740. YY_RULE_SETUP
  741. #line 135 "cmListFileLexer.in.l"
  742. {
  743. lexer->token.type = cmListFileLexer_Token_ArgumentUnquoted;
  744. cmListFileLexerSetToken(lexer, yytext, yyleng);
  745. lexer->column += yyleng;
  746. return 1;
  747. }
  748. case 7:
  749. YY_RULE_SETUP
  750. #line 142 "cmListFileLexer.in.l"
  751. {
  752. lexer->token.type = cmListFileLexer_Token_ArgumentQuoted;
  753. cmListFileLexerSetToken(lexer, "", 0);
  754. lexer->column += yyleng;
  755. BEGIN(STRING);
  756. }
  757. YY_BREAK
  758. case 8:
  759. /* rule 8 can match eol */
  760. YY_RULE_SETUP
  761. #line 149 "cmListFileLexer.in.l"
  762. {
  763. cmListFileLexerAppend(lexer, yytext, yyleng);
  764. lexer->column += yyleng;
  765. }
  766. YY_BREAK
  767. case 9:
  768. /* rule 9 can match eol */
  769. YY_RULE_SETUP
  770. #line 154 "cmListFileLexer.in.l"
  771. {
  772. cmListFileLexerAppend(lexer, yytext, yyleng);
  773. ++lexer->line;
  774. lexer->column = 1;
  775. }
  776. YY_BREAK
  777. case 10:
  778. YY_RULE_SETUP
  779. #line 160 "cmListFileLexer.in.l"
  780. {
  781. lexer->column += yyleng;
  782. BEGIN(INITIAL);
  783. return 1;
  784. }
  785. case 11:
  786. YY_RULE_SETUP
  787. #line 166 "cmListFileLexer.in.l"
  788. {
  789. cmListFileLexerAppend(lexer, yytext, yyleng);
  790. lexer->column += yyleng;
  791. }
  792. YY_BREAK
  793. case YY_STATE_EOF(STRING):
  794. #line 171 "cmListFileLexer.in.l"
  795. {
  796. lexer->token.type = cmListFileLexer_Token_BadString;
  797. BEGIN(INITIAL);
  798. return 1;
  799. }
  800. case 12:
  801. YY_RULE_SETUP
  802. #line 177 "cmListFileLexer.in.l"
  803. {
  804. lexer->column += yyleng;
  805. }
  806. YY_BREAK
  807. case 13:
  808. YY_RULE_SETUP
  809. #line 181 "cmListFileLexer.in.l"
  810. {
  811. lexer->token.type = cmListFileLexer_Token_BadCharacter;
  812. cmListFileLexerSetToken(lexer, yytext, yyleng);
  813. lexer->column += yyleng;
  814. return 1;
  815. }
  816. case YY_STATE_EOF(INITIAL):
  817. #line 188 "cmListFileLexer.in.l"
  818. {
  819. lexer->token.type = cmListFileLexer_Token_None;
  820. cmListFileLexerSetToken(lexer, 0, 0);
  821. return 0;
  822. }
  823. case 14:
  824. YY_RULE_SETUP
  825. #line 194 "cmListFileLexer.in.l"
  826. ECHO;
  827. YY_BREAK
  828. #line 1025 "cmListFileLexer.c"
  829. case YY_END_OF_BUFFER:
  830. {
  831. /* Amount of text matched not including the EOB char. */
  832. int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
  833. /* Undo the effects of YY_DO_BEFORE_ACTION. */
  834. *yy_cp = yyg->yy_hold_char;
  835. YY_RESTORE_YY_MORE_OFFSET
  836. if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
  837. {
  838. /* We're scanning a new file or input source. It's
  839. * possible that this happened because the user
  840. * just pointed yyin at a new source and called
  841. * cmListFileLexer_yylex(). If so, then we have to assure
  842. * consistency between YY_CURRENT_BUFFER and our
  843. * globals. Here is the right place to do so, because
  844. * this is the first action (other than possibly a
  845. * back-up) that will match for the new input source.
  846. */
  847. yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
  848. YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
  849. YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
  850. }
  851. /* Note that here we test for yy_c_buf_p "<=" to the position
  852. * of the first EOB in the buffer, since yy_c_buf_p will
  853. * already have been incremented past the NUL character
  854. * (since all states make transitions on EOB to the
  855. * end-of-buffer state). Contrast this with the test
  856. * in input().
  857. */
  858. if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
  859. { /* This was really a NUL. */
  860. yy_state_type yy_next_state;
  861. yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
  862. yy_current_state = yy_get_previous_state( yyscanner );
  863. /* Okay, we're now positioned to make the NUL
  864. * transition. We couldn't have
  865. * yy_get_previous_state() go ahead and do it
  866. * for us because it doesn't know how to deal
  867. * with the possibility of jamming (and we don't
  868. * want to build jamming into it because then it
  869. * will run more slowly).
  870. */
  871. yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
  872. yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
  873. if ( yy_next_state )
  874. {
  875. /* Consume the NUL. */
  876. yy_cp = ++yyg->yy_c_buf_p;
  877. yy_current_state = yy_next_state;
  878. goto yy_match;
  879. }
  880. else
  881. {
  882. yy_cp = yyg->yy_c_buf_p;
  883. goto yy_find_action;
  884. }
  885. }
  886. else switch ( yy_get_next_buffer( yyscanner ) )
  887. {
  888. case EOB_ACT_END_OF_FILE:
  889. {
  890. yyg->yy_did_buffer_switch_on_eof = 0;
  891. if ( cmListFileLexer_yywrap(yyscanner ) )
  892. {
  893. /* Note: because we've taken care in
  894. * yy_get_next_buffer() to have set up
  895. * yytext, we can now set up
  896. * yy_c_buf_p so that if some total
  897. * hoser (like flex itself) wants to
  898. * call the scanner after we return the
  899. * YY_NULL, it'll still work - another
  900. * YY_NULL will get returned.
  901. */
  902. yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
  903. yy_act = YY_STATE_EOF(YY_START);
  904. goto do_action;
  905. }
  906. else
  907. {
  908. if ( ! yyg->yy_did_buffer_switch_on_eof )
  909. YY_NEW_FILE;
  910. }
  911. break;
  912. }
  913. case EOB_ACT_CONTINUE_SCAN:
  914. yyg->yy_c_buf_p =
  915. yyg->yytext_ptr + yy_amount_of_matched_text;
  916. yy_current_state = yy_get_previous_state( yyscanner );
  917. yy_cp = yyg->yy_c_buf_p;
  918. yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
  919. goto yy_match;
  920. case EOB_ACT_LAST_MATCH:
  921. yyg->yy_c_buf_p =
  922. &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
  923. yy_current_state = yy_get_previous_state( yyscanner );
  924. yy_cp = yyg->yy_c_buf_p;
  925. yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
  926. goto yy_find_action;
  927. }
  928. break;
  929. }
  930. default:
  931. YY_FATAL_ERROR(
  932. "fatal flex scanner internal error--no action found" );
  933. } /* end of action switch */
  934. } /* end of scanning one token */
  935. } /* end of cmListFileLexer_yylex */
  936. /* yy_get_next_buffer - try to read in a new buffer
  937. *
  938. * Returns a code representing an action:
  939. * EOB_ACT_LAST_MATCH -
  940. * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
  941. * EOB_ACT_END_OF_FILE - end of file
  942. */
  943. static int yy_get_next_buffer (yyscan_t yyscanner)
  944. {
  945. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  946. register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
  947. register char *source = yyg->yytext_ptr;
  948. register int number_to_move, i;
  949. int ret_val;
  950. if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
  951. YY_FATAL_ERROR(
  952. "fatal flex scanner internal error--end of buffer missed" );
  953. if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
  954. { /* Don't try to fill the buffer, so this is an EOF. */
  955. if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
  956. {
  957. /* We matched a single character, the EOB, so
  958. * treat this as a final EOF.
  959. */
  960. return EOB_ACT_END_OF_FILE;
  961. }
  962. else
  963. {
  964. /* We matched some text prior to the EOB, first
  965. * process it.
  966. */
  967. return EOB_ACT_LAST_MATCH;
  968. }
  969. }
  970. /* Try to read more data. */
  971. /* First move last chars to start of buffer. */
  972. number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
  973. for ( i = 0; i < number_to_move; ++i )
  974. *(dest++) = *(source++);
  975. if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
  976. /* don't do the read, it's not guaranteed to return an EOF,
  977. * just force an EOF
  978. */
  979. YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
  980. else
  981. {
  982. size_t num_to_read =
  983. YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
  984. while ( num_to_read <= 0 )
  985. { /* Not enough room in the buffer - grow it. */
  986. /* just a shorter name for the current buffer */
  987. YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
  988. int yy_c_buf_p_offset =
  989. (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
  990. if ( b->yy_is_our_buffer )
  991. {
  992. int new_size = b->yy_buf_size * 2;
  993. if ( new_size <= 0 )
  994. b->yy_buf_size += b->yy_buf_size / 8;
  995. else
  996. b->yy_buf_size *= 2;
  997. b->yy_ch_buf = (char *)
  998. /* Include room in for 2 EOB chars. */
  999. cmListFileLexer_yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
  1000. }
  1001. else
  1002. /* Can't grow it, we don't own it. */
  1003. b->yy_ch_buf = 0;
  1004. if ( ! b->yy_ch_buf )
  1005. YY_FATAL_ERROR(
  1006. "fatal error - scanner input buffer overflow" );
  1007. yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
  1008. num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
  1009. number_to_move - 1;
  1010. }
  1011. if ( num_to_read > YY_READ_BUF_SIZE )
  1012. num_to_read = YY_READ_BUF_SIZE;
  1013. /* Read in more data. */
  1014. YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
  1015. yyg->yy_n_chars, num_to_read );
  1016. YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
  1017. }
  1018. if ( yyg->yy_n_chars == 0 )
  1019. {
  1020. if ( number_to_move == YY_MORE_ADJ )
  1021. {
  1022. ret_val = EOB_ACT_END_OF_FILE;
  1023. cmListFileLexer_yyrestart(yyin ,yyscanner);
  1024. }
  1025. else
  1026. {
  1027. ret_val = EOB_ACT_LAST_MATCH;
  1028. YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
  1029. YY_BUFFER_EOF_PENDING;
  1030. }
  1031. }
  1032. else
  1033. ret_val = EOB_ACT_CONTINUE_SCAN;
  1034. yyg->yy_n_chars += number_to_move;
  1035. YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
  1036. YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
  1037. yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
  1038. return ret_val;
  1039. }
  1040. /* yy_get_previous_state - get the state just before the EOB char was reached */
  1041. static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
  1042. {
  1043. register yy_state_type yy_current_state;
  1044. register char *yy_cp;
  1045. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  1046. yy_current_state = yyg->yy_start;
  1047. for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
  1048. {
  1049. register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
  1050. if ( yy_accept[yy_current_state] )
  1051. {
  1052. yyg->yy_last_accepting_state = yy_current_state;
  1053. yyg->yy_last_accepting_cpos = yy_cp;
  1054. }
  1055. while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  1056. {
  1057. yy_current_state = (int) yy_def[yy_current_state];
  1058. if ( yy_current_state >= 39 )
  1059. yy_c = yy_meta[(unsigned int) yy_c];
  1060. }
  1061. yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
  1062. }
  1063. return yy_current_state;
  1064. }
  1065. /* yy_try_NUL_trans - try to make a transition on the NUL character
  1066. *
  1067. * synopsis
  1068. * next_state = yy_try_NUL_trans( current_state );
  1069. */
  1070. static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
  1071. {
  1072. register int yy_is_jam;
  1073. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  1074. register char *yy_cp = yyg->yy_c_buf_p;
  1075. register YY_CHAR yy_c = 1;
  1076. if ( yy_accept[yy_current_state] )
  1077. {
  1078. yyg->yy_last_accepting_state = yy_current_state;
  1079. yyg->yy_last_accepting_cpos = yy_cp;
  1080. }
  1081. while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  1082. {
  1083. yy_current_state = (int) yy_def[yy_current_state];
  1084. if ( yy_current_state >= 39 )
  1085. yy_c = yy_meta[(unsigned int) yy_c];
  1086. }
  1087. yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
  1088. yy_is_jam = (yy_current_state == 38);
  1089. return yy_is_jam ? 0 : yy_current_state;
  1090. }
  1091. #ifndef YY_NO_INPUT
  1092. #ifdef __cplusplus
  1093. static int yyinput (yyscan_t yyscanner)
  1094. #else
  1095. static int input (yyscan_t yyscanner)
  1096. #endif
  1097. {
  1098. int c;
  1099. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  1100. *yyg->yy_c_buf_p = yyg->yy_hold_char;
  1101. if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
  1102. {
  1103. /* yy_c_buf_p now points to the character we want to return.
  1104. * If this occurs *before* the EOB characters, then it's a
  1105. * valid NUL; if not, then we've hit the end of the buffer.
  1106. */
  1107. if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
  1108. /* This was really a NUL. */
  1109. *yyg->yy_c_buf_p = '\0';
  1110. else
  1111. { /* need more input */
  1112. int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
  1113. ++yyg->yy_c_buf_p;
  1114. switch ( yy_get_next_buffer( yyscanner ) )
  1115. {
  1116. case EOB_ACT_LAST_MATCH:
  1117. /* This happens because yy_g_n_b()
  1118. * sees that we've accumulated a
  1119. * token and flags that we need to
  1120. * try matching the token before
  1121. * proceeding. But for input(),
  1122. * there's no matching to consider.
  1123. * So convert the EOB_ACT_LAST_MATCH
  1124. * to EOB_ACT_END_OF_FILE.
  1125. */
  1126. /* Reset buffer status. */
  1127. cmListFileLexer_yyrestart(yyin ,yyscanner);
  1128. /*FALLTHROUGH*/
  1129. case EOB_ACT_END_OF_FILE:
  1130. {
  1131. if ( cmListFileLexer_yywrap(yyscanner ) )
  1132. return EOF;
  1133. if ( ! yyg->yy_did_buffer_switch_on_eof )
  1134. YY_NEW_FILE;
  1135. #ifdef __cplusplus
  1136. return yyinput(yyscanner);
  1137. #else
  1138. return input(yyscanner);
  1139. #endif
  1140. }
  1141. case EOB_ACT_CONTINUE_SCAN:
  1142. yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
  1143. break;
  1144. }
  1145. }
  1146. }
  1147. c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */
  1148. *yyg->yy_c_buf_p = '\0'; /* preserve yytext */
  1149. yyg->yy_hold_char = *++yyg->yy_c_buf_p;
  1150. if ( c == '\n' )
  1151. do{ yylineno++;
  1152. yycolumn=0;
  1153. }while(0)
  1154. ;
  1155. return c;
  1156. }
  1157. #endif /* ifndef YY_NO_INPUT */
  1158. /** Immediately switch to a different input stream.
  1159. * @param input_file A readable stream.
  1160. * @param yyscanner The scanner object.
  1161. * @note This function does not reset the start condition to @c INITIAL .
  1162. */
  1163. void cmListFileLexer_yyrestart (FILE * input_file , yyscan_t yyscanner)
  1164. {
  1165. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  1166. if ( ! YY_CURRENT_BUFFER ){
  1167. cmListFileLexer_yyensure_buffer_stack (yyscanner);
  1168. YY_CURRENT_BUFFER_LVALUE =
  1169. cmListFileLexer_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
  1170. }
  1171. cmListFileLexer_yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
  1172. cmListFileLexer_yy_load_buffer_state(yyscanner );
  1173. }
  1174. /** Switch to a different input buffer.
  1175. * @param new_buffer The new input buffer.
  1176. * @param yyscanner The scanner object.
  1177. */
  1178. void cmListFileLexer_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
  1179. {
  1180. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  1181. /* TODO. We should be able to replace this entire function body
  1182. * with
  1183. * cmListFileLexer_yypop_buffer_state();
  1184. * cmListFileLexer_yypush_buffer_state(new_buffer);
  1185. */
  1186. cmListFileLexer_yyensure_buffer_stack (yyscanner);
  1187. if ( YY_CURRENT_BUFFER == new_buffer )
  1188. return;
  1189. if ( YY_CURRENT_BUFFER )
  1190. {
  1191. /* Flush out information for old buffer. */
  1192. *yyg->yy_c_buf_p = yyg->yy_hold_char;
  1193. YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
  1194. YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
  1195. }
  1196. YY_CURRENT_BUFFER_LVALUE = new_buffer;
  1197. cmListFileLexer_yy_load_buffer_state(yyscanner );
  1198. /* We don't actually know whether we did this switch during
  1199. * EOF (cmListFileLexer_yywrap()) processing, but the only time this flag
  1200. * is looked at is after cmListFileLexer_yywrap() is called, so it's safe
  1201. * to go ahead and always set it.
  1202. */
  1203. yyg->yy_did_buffer_switch_on_eof = 1;
  1204. }
  1205. static void cmListFileLexer_yy_load_buffer_state (yyscan_t yyscanner)
  1206. {
  1207. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  1208. yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
  1209. yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
  1210. yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
  1211. yyg->yy_hold_char = *yyg->yy_c_buf_p;
  1212. }
  1213. /** Allocate and initialize an input buffer state.
  1214. * @param file A readable stream.
  1215. * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
  1216. * @param yyscanner The scanner object.
  1217. * @return the allocated buffer state.
  1218. */
  1219. YY_BUFFER_STATE cmListFileLexer_yy_create_buffer (FILE * file, int size , yyscan_t yyscanner)
  1220. {
  1221. YY_BUFFER_STATE b;
  1222. b = (YY_BUFFER_STATE) cmListFileLexer_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
  1223. if ( ! b )
  1224. YY_FATAL_ERROR( "out of dynamic memory in cmListFileLexer_yy_create_buffer()" );
  1225. b->yy_buf_size = size;
  1226. /* yy_ch_buf has to be 2 characters longer than the size given because
  1227. * we need to put in 2 end-of-buffer characters.
  1228. */
  1229. b->yy_ch_buf = (char *) cmListFileLexer_yyalloc(b->yy_buf_size + 2 ,yyscanner );
  1230. if ( ! b->yy_ch_buf )
  1231. YY_FATAL_ERROR( "out of dynamic memory in cmListFileLexer_yy_create_buffer()" );
  1232. b->yy_is_our_buffer = 1;
  1233. cmListFileLexer_yy_init_buffer(b,file ,yyscanner);
  1234. return b;
  1235. }
  1236. /** Destroy the buffer.
  1237. * @param b a buffer created with cmListFileLexer_yy_create_buffer()
  1238. * @param yyscanner The scanner object.
  1239. */
  1240. void cmListFileLexer_yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
  1241. {
  1242. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  1243. if ( ! b )
  1244. return;
  1245. if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
  1246. YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
  1247. if ( b->yy_is_our_buffer )
  1248. cmListFileLexer_yyfree((void *) b->yy_ch_buf ,yyscanner );
  1249. cmListFileLexer_yyfree((void *) b ,yyscanner );
  1250. }
  1251. /* Initializes or reinitializes a buffer.
  1252. * This function is sometimes called more than once on the same buffer,
  1253. * such as during a cmListFileLexer_yyrestart() or at EOF.
  1254. */
  1255. static void cmListFileLexer_yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
  1256. {
  1257. int oerrno = errno;
  1258. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  1259. cmListFileLexer_yy_flush_buffer(b ,yyscanner);
  1260. b->yy_input_file = file;
  1261. b->yy_fill_buffer = 1;
  1262. /* If b is the current buffer, then cmListFileLexer_yy_init_buffer was _probably_
  1263. * called from cmListFileLexer_yyrestart() or through yy_get_next_buffer.
  1264. * In that case, we don't want to reset the lineno or column.
  1265. */
  1266. if (b != YY_CURRENT_BUFFER){
  1267. b->yy_bs_lineno = 1;
  1268. b->yy_bs_column = 0;
  1269. }
  1270. b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
  1271. errno = oerrno;
  1272. }
  1273. /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
  1274. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
  1275. * @param yyscanner The scanner object.
  1276. */
  1277. void cmListFileLexer_yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
  1278. {
  1279. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  1280. if ( ! b )
  1281. return;
  1282. b->yy_n_chars = 0;
  1283. /* We always need two end-of-buffer characters. The first causes
  1284. * a transition to the end-of-buffer state. The second causes
  1285. * a jam in that state.
  1286. */
  1287. b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
  1288. b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
  1289. b->yy_buf_pos = &b->yy_ch_buf[0];
  1290. b->yy_at_bol = 1;
  1291. b->yy_buffer_status = YY_BUFFER_NEW;
  1292. if ( b == YY_CURRENT_BUFFER )
  1293. cmListFileLexer_yy_load_buffer_state(yyscanner );
  1294. }
  1295. /** Pushes the new state onto the stack. The new state becomes
  1296. * the current state. This function will allocate the stack
  1297. * if necessary.
  1298. * @param new_buffer The new state.
  1299. * @param yyscanner The scanner object.
  1300. */
  1301. void cmListFileLexer_yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
  1302. {
  1303. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  1304. if (new_buffer == NULL)
  1305. return;
  1306. cmListFileLexer_yyensure_buffer_stack(yyscanner);
  1307. /* This block is copied from cmListFileLexer_yy_switch_to_buffer. */
  1308. if ( YY_CURRENT_BUFFER )
  1309. {
  1310. /* Flush out information for old buffer. */
  1311. *yyg->yy_c_buf_p = yyg->yy_hold_char;
  1312. YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
  1313. YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
  1314. }
  1315. /* Only push if top exists. Otherwise, replace top. */
  1316. if (YY_CURRENT_BUFFER)
  1317. yyg->yy_buffer_stack_top++;
  1318. YY_CURRENT_BUFFER_LVALUE = new_buffer;
  1319. /* copied from cmListFileLexer_yy_switch_to_buffer. */
  1320. cmListFileLexer_yy_load_buffer_state(yyscanner );
  1321. yyg->yy_did_buffer_switch_on_eof = 1;
  1322. }
  1323. /** Removes and deletes the top of the stack, if present.
  1324. * The next element becomes the new top.
  1325. * @param yyscanner The scanner object.
  1326. */
  1327. void cmListFileLexer_yypop_buffer_state (yyscan_t yyscanner)
  1328. {
  1329. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  1330. if (!YY_CURRENT_BUFFER)
  1331. return;
  1332. cmListFileLexer_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
  1333. YY_CURRENT_BUFFER_LVALUE = NULL;
  1334. if (yyg->yy_buffer_stack_top > 0)
  1335. --yyg->yy_buffer_stack_top;
  1336. if (YY_CURRENT_BUFFER) {
  1337. cmListFileLexer_yy_load_buffer_state(yyscanner );
  1338. yyg->yy_did_buffer_switch_on_eof = 1;
  1339. }
  1340. }
  1341. /* Allocates the stack if it does not exist.
  1342. * Guarantees space for at least one push.
  1343. */
  1344. static void cmListFileLexer_yyensure_buffer_stack (yyscan_t yyscanner)
  1345. {
  1346. int num_to_alloc;
  1347. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  1348. if (!yyg->yy_buffer_stack) {
  1349. /* First allocation is just for 2 elements, since we don't know if this
  1350. * scanner will even need a stack. We use 2 instead of 1 to avoid an
  1351. * immediate realloc on the next call.
  1352. */
  1353. num_to_alloc = 1;
  1354. yyg->yy_buffer_stack = (struct yy_buffer_state**)cmListFileLexer_yyalloc
  1355. (num_to_alloc * sizeof(struct yy_buffer_state*)
  1356. , yyscanner);
  1357. memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
  1358. yyg->yy_buffer_stack_max = num_to_alloc;
  1359. yyg->yy_buffer_stack_top = 0;
  1360. return;
  1361. }
  1362. if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
  1363. /* Increase the buffer to prepare for a possible push. */
  1364. int grow_size = 8 /* arbitrary grow size */;
  1365. num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
  1366. yyg->yy_buffer_stack = (struct yy_buffer_state**)cmListFileLexer_yyrealloc
  1367. (yyg->yy_buffer_stack,
  1368. num_to_alloc * sizeof(struct yy_buffer_state*)
  1369. , yyscanner);
  1370. /* zero only the new slots.*/
  1371. memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
  1372. yyg->yy_buffer_stack_max = num_to_alloc;
  1373. }
  1374. }
  1375. /** Setup the input buffer state to scan directly from a user-specified character buffer.
  1376. * @param base the character buffer
  1377. * @param size the size in bytes of the character buffer
  1378. * @param yyscanner The scanner object.
  1379. * @return the newly allocated buffer state object.
  1380. */
  1381. YY_BUFFER_STATE cmListFileLexer_yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
  1382. {
  1383. YY_BUFFER_STATE b;
  1384. if ( size < 2 ||
  1385. base[size-2] != YY_END_OF_BUFFER_CHAR ||
  1386. base[size-1] != YY_END_OF_BUFFER_CHAR )
  1387. /* They forgot to leave room for the EOB's. */
  1388. return 0;
  1389. b = (YY_BUFFER_STATE) cmListFileLexer_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
  1390. if ( ! b )
  1391. YY_FATAL_ERROR( "out of dynamic memory in cmListFileLexer_yy_scan_buffer()" );
  1392. b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
  1393. b->yy_buf_pos = b->yy_ch_buf = base;
  1394. b->yy_is_our_buffer = 0;
  1395. b->yy_input_file = 0;
  1396. b->yy_n_chars = b->yy_buf_size;
  1397. b->yy_is_interactive = 0;
  1398. b->yy_at_bol = 1;
  1399. b->yy_fill_buffer = 0;
  1400. b->yy_buffer_status = YY_BUFFER_NEW;
  1401. cmListFileLexer_yy_switch_to_buffer(b ,yyscanner );
  1402. return b;
  1403. }
  1404. /** Setup the input buffer state to scan a string. The next call to cmListFileLexer_yylex() will
  1405. * scan from a @e copy of @a str.
  1406. * @param str a NUL-terminated string to scan
  1407. * @param yyscanner The scanner object.
  1408. * @return the newly allocated buffer state object.
  1409. * @note If you want to scan bytes that may contain NUL values, then use
  1410. * cmListFileLexer_yy_scan_bytes() instead.
  1411. */
  1412. YY_BUFFER_STATE cmListFileLexer_yy_scan_string (yyconst char * yy_str , yyscan_t yyscanner)
  1413. {
  1414. return cmListFileLexer_yy_scan_bytes(yy_str,strlen(yy_str) ,yyscanner);
  1415. }
  1416. /** Setup the input buffer state to scan the given bytes. The next call to cmListFileLexer_yylex() will
  1417. * scan from a @e copy of @a bytes.
  1418. * @param bytes the byte buffer to scan
  1419. * @param len the number of bytes in the buffer pointed to by @a bytes.
  1420. * @param yyscanner The scanner object.
  1421. * @return the newly allocated buffer state object.
  1422. */
  1423. YY_BUFFER_STATE cmListFileLexer_yy_scan_bytes (yyconst char * bytes, int len , yyscan_t yyscanner)
  1424. {
  1425. YY_BUFFER_STATE b;
  1426. char *buf;
  1427. yy_size_t n;
  1428. int i;
  1429. /* Get memory for full buffer, including space for trailing EOB's. */
  1430. n = len + 2;
  1431. buf = (char *) cmListFileLexer_yyalloc(n ,yyscanner );
  1432. if ( ! buf )
  1433. YY_FATAL_ERROR( "out of dynamic memory in cmListFileLexer_yy_scan_bytes()" );
  1434. for ( i = 0; i < len; ++i )
  1435. buf[i] = bytes[i];
  1436. buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
  1437. b = cmListFileLexer_yy_scan_buffer(buf,n ,yyscanner);
  1438. if ( ! b )
  1439. YY_FATAL_ERROR( "bad buffer in cmListFileLexer_yy_scan_bytes()" );
  1440. /* It's okay to grow etc. this buffer, and we should throw it
  1441. * away when we're done.
  1442. */
  1443. b->yy_is_our_buffer = 1;
  1444. return b;
  1445. }
  1446. #ifndef YY_EXIT_FAILURE
  1447. #define YY_EXIT_FAILURE 2
  1448. #endif
  1449. static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
  1450. {
  1451. (void)yyscanner;
  1452. (void) fprintf( stderr, "%s\n", msg );
  1453. exit( YY_EXIT_FAILURE );
  1454. }
  1455. /* Redefine yyless() so it works in section 3 code. */
  1456. #undef yyless
  1457. #define yyless(n) \
  1458. do \
  1459. { \
  1460. /* Undo effects of setting up yytext. */ \
  1461. int yyless_macro_arg = (n); \
  1462. YY_LESS_LINENO(yyless_macro_arg);\
  1463. yytext[yyleng] = yyg->yy_hold_char; \
  1464. yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
  1465. yyg->yy_hold_char = *yyg->yy_c_buf_p; \
  1466. *yyg->yy_c_buf_p = '\0'; \
  1467. yyleng = yyless_macro_arg; \
  1468. } \
  1469. while ( 0 )
  1470. /* Accessor methods (get/set functions) to struct members. */
  1471. /** Get the user-defined data for this scanner.
  1472. * @param yyscanner The scanner object.
  1473. */
  1474. YY_EXTRA_TYPE cmListFileLexer_yyget_extra (yyscan_t yyscanner)
  1475. {
  1476. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  1477. return yyextra;
  1478. }
  1479. /** Get the current line number.
  1480. * @param yyscanner The scanner object.
  1481. */
  1482. int cmListFileLexer_yyget_lineno (yyscan_t yyscanner)
  1483. {
  1484. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  1485. if (! YY_CURRENT_BUFFER)
  1486. return 0;
  1487. return yylineno;
  1488. }
  1489. /** Get the current column number.
  1490. * @param yyscanner The scanner object.
  1491. */
  1492. int cmListFileLexer_yyget_column (yyscan_t yyscanner)
  1493. {
  1494. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  1495. if (! YY_CURRENT_BUFFER)
  1496. return 0;
  1497. return yycolumn;
  1498. }
  1499. /** Get the input stream.
  1500. * @param yyscanner The scanner object.
  1501. */
  1502. FILE *cmListFileLexer_yyget_in (yyscan_t yyscanner)
  1503. {
  1504. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  1505. return yyin;
  1506. }
  1507. /** Get the output stream.
  1508. * @param yyscanner The scanner object.
  1509. */
  1510. FILE *cmListFileLexer_yyget_out (yyscan_t yyscanner)
  1511. {
  1512. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  1513. return yyout;
  1514. }
  1515. /** Get the length of the current token.
  1516. * @param yyscanner The scanner object.
  1517. */
  1518. int cmListFileLexer_yyget_leng (yyscan_t yyscanner)
  1519. {
  1520. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  1521. return yyleng;
  1522. }
  1523. /** Get the current token.
  1524. * @param yyscanner The scanner object.
  1525. */
  1526. char *cmListFileLexer_yyget_text (yyscan_t yyscanner)
  1527. {
  1528. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  1529. return yytext;
  1530. }
  1531. /** Set the user-defined data. This data is never touched by the scanner.
  1532. * @param user_defined The data to be associated with this scanner.
  1533. * @param yyscanner The scanner object.
  1534. */
  1535. void cmListFileLexer_yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
  1536. {
  1537. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  1538. yyextra = user_defined ;
  1539. }
  1540. /** Set the current line number.
  1541. * @param line_number
  1542. * @param yyscanner The scanner object.
  1543. */
  1544. void cmListFileLexer_yyset_lineno (int line_number , yyscan_t yyscanner)
  1545. {
  1546. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  1547. /* lineno is only valid if an input buffer exists. */
  1548. if (! YY_CURRENT_BUFFER )
  1549. yy_fatal_error( "cmListFileLexer_yyset_lineno called with no buffer" , yyscanner);
  1550. yylineno = line_number;
  1551. }
  1552. /** Set the current column.
  1553. * @param line_number
  1554. * @param yyscanner The scanner object.
  1555. */
  1556. void cmListFileLexer_yyset_column (int column_no , yyscan_t yyscanner)
  1557. {
  1558. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  1559. /* column is only valid if an input buffer exists. */
  1560. if (! YY_CURRENT_BUFFER )
  1561. yy_fatal_error( "cmListFileLexer_yyset_column called with no buffer" , yyscanner);
  1562. yycolumn = column_no;
  1563. }
  1564. /** Set the input stream. This does not discard the current
  1565. * input buffer.
  1566. * @param in_str A readable stream.
  1567. * @param yyscanner The scanner object.
  1568. * @see cmListFileLexer_yy_switch_to_buffer
  1569. */
  1570. void cmListFileLexer_yyset_in (FILE * in_str , yyscan_t yyscanner)
  1571. {
  1572. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  1573. yyin = in_str ;
  1574. }
  1575. void cmListFileLexer_yyset_out (FILE * out_str , yyscan_t yyscanner)
  1576. {
  1577. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  1578. yyout = out_str ;
  1579. }
  1580. int cmListFileLexer_yyget_debug (yyscan_t yyscanner)
  1581. {
  1582. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  1583. return yy_flex_debug;
  1584. }
  1585. void cmListFileLexer_yyset_debug (int bdebug , yyscan_t yyscanner)
  1586. {
  1587. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  1588. yy_flex_debug = bdebug ;
  1589. }
  1590. /* Accessor methods for yylval and yylloc */
  1591. static int yy_init_globals (yyscan_t yyscanner)
  1592. {
  1593. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  1594. /* Initialization is the same as for the non-reentrant scanner.
  1595. This function is called once per scanner lifetime. */
  1596. yyg->yy_buffer_stack = 0;
  1597. yyg->yy_buffer_stack_top = 0;
  1598. yyg->yy_buffer_stack_max = 0;
  1599. yyg->yy_c_buf_p = (char *) 0;
  1600. yyg->yy_init = 1;
  1601. yyg->yy_start = 0;
  1602. yyg->yy_start_stack_ptr = 0;
  1603. yyg->yy_start_stack_depth = 0;
  1604. yyg->yy_start_stack = (int *) 0;
  1605. /* Defined in main.c */
  1606. #ifdef YY_STDINIT
  1607. yyin = stdin;
  1608. yyout = stdout;
  1609. #else
  1610. yyin = (FILE *) 0;
  1611. yyout = (FILE *) 0;
  1612. #endif
  1613. /* For future reference: Set errno on error, since we are called by
  1614. * cmListFileLexer_yylex_init()
  1615. */
  1616. return 0;
  1617. }
  1618. /* User-visible API */
  1619. /* cmListFileLexer_yylex_init is special because it creates the scanner itself, so it is
  1620. * the ONLY reentrant function that doesn't take the scanner as the last argument.
  1621. * That's why we explicitly handle the declaration, instead of using our macros.
  1622. */
  1623. int cmListFileLexer_yylex_init(yyscan_t* ptr_yy_globals)
  1624. {
  1625. if (ptr_yy_globals == NULL){
  1626. errno = EINVAL;
  1627. return 1;
  1628. }
  1629. *ptr_yy_globals = (yyscan_t) cmListFileLexer_yyalloc ( sizeof( struct yyguts_t ), NULL );
  1630. if (*ptr_yy_globals == NULL){
  1631. errno = ENOMEM;
  1632. return 1;
  1633. }
  1634. memset(*ptr_yy_globals,0,sizeof(struct yyguts_t));
  1635. return yy_init_globals ( *ptr_yy_globals );
  1636. }
  1637. /* cmListFileLexer_yylex_destroy is for both reentrant and non-reentrant scanners. */
  1638. int cmListFileLexer_yylex_destroy (yyscan_t yyscanner)
  1639. {
  1640. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  1641. /* Pop the buffer stack, destroying each element. */
  1642. while(YY_CURRENT_BUFFER){
  1643. cmListFileLexer_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
  1644. YY_CURRENT_BUFFER_LVALUE = NULL;
  1645. cmListFileLexer_yypop_buffer_state(yyscanner);
  1646. }
  1647. /* Destroy the stack itself. */
  1648. cmListFileLexer_yyfree(yyg->yy_buffer_stack ,yyscanner);
  1649. yyg->yy_buffer_stack = NULL;
  1650. /* Destroy the start condition stack. */
  1651. cmListFileLexer_yyfree(yyg->yy_start_stack ,yyscanner );
  1652. yyg->yy_start_stack = NULL;
  1653. /* Destroy the main struct (reentrant only). */
  1654. cmListFileLexer_yyfree ( yyscanner , yyscanner );
  1655. return 0;
  1656. }
  1657. /*
  1658. * Internal utility routines.
  1659. */
  1660. #ifndef yytext_ptr
  1661. static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
  1662. {
  1663. register int i;
  1664. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  1665. for ( i = 0; i < n; ++i )
  1666. s1[i] = s2[i];
  1667. }
  1668. #endif
  1669. #ifdef YY_NEED_STRLEN
  1670. static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
  1671. {
  1672. register int n;
  1673. struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  1674. for ( n = 0; s[n]; ++n )
  1675. ;
  1676. return n;
  1677. }
  1678. #endif
  1679. void *cmListFileLexer_yyalloc (yy_size_t size , yyscan_t yyscanner)
  1680. {
  1681. (void)yyscanner;
  1682. return (void *) malloc( size );
  1683. }
  1684. void *cmListFileLexer_yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
  1685. {
  1686. /* The cast to (char *) in the following accommodates both
  1687. * implementations that use char* generic pointers, and those
  1688. * that use void* generic pointers. It works with the latter
  1689. * because both ANSI C and C++ allow castless assignment from
  1690. * any pointer type to void*, and deal with argument conversions
  1691. * as though doing an assignment.
  1692. */
  1693. (void)yyscanner;
  1694. return (void *) realloc( (char *) ptr, size );
  1695. }
  1696. void cmListFileLexer_yyfree (void * ptr , yyscan_t yyscanner)
  1697. {
  1698. (void)yyscanner;
  1699. free( (char *) ptr ); /* see cmListFileLexer_yyrealloc() for (char *) cast */
  1700. }
  1701. #define YYTABLES_NAME "yytables"
  1702. #undef YY_NEW_FILE
  1703. #undef YY_FLUSH_BUFFER
  1704. #undef yy_set_bol
  1705. #undef yy_new_buffer
  1706. #undef yy_set_interactive
  1707. #undef yytext_ptr
  1708. #undef YY_DO_BEFORE_ACTION
  1709. #ifdef YY_DECL_IS_OURS
  1710. #undef YY_DECL_IS_OURS
  1711. #undef YY_DECL
  1712. #endif
  1713. #line 194 "cmListFileLexer.in.l"
  1714. /*--------------------------------------------------------------------------*/
  1715. static void cmListFileLexerSetToken(cmListFileLexer* lexer, const char* text,
  1716. int length)
  1717. {
  1718. /* Set the token line and column number. */
  1719. lexer->token.line = lexer->line;
  1720. lexer->token.column = lexer->column;
  1721. /* Use the same buffer if possible. */
  1722. if(lexer->token.text)
  1723. {
  1724. if(text && length < lexer->size)
  1725. {
  1726. strcpy(lexer->token.text, text);
  1727. lexer->token.length = length;
  1728. return;
  1729. }
  1730. free(lexer->token.text);
  1731. lexer->token.text = 0;
  1732. lexer->size = 0;
  1733. }
  1734. /* Need to extend the buffer. */
  1735. if(text)
  1736. {
  1737. lexer->token.text = strdup(text);
  1738. lexer->token.length = length;
  1739. lexer->size = length+1;
  1740. }
  1741. else
  1742. {
  1743. lexer->token.length = 0;
  1744. }
  1745. }
  1746. /*--------------------------------------------------------------------------*/
  1747. static void cmListFileLexerAppend(cmListFileLexer* lexer, const char* text,
  1748. int length)
  1749. {
  1750. char* temp;
  1751. int newSize;
  1752. /* If the appended text will fit in the buffer, do not reallocate. */
  1753. newSize = lexer->token.length + length + 1;
  1754. if(lexer->token.text && newSize <= lexer->size)
  1755. {
  1756. strcpy(lexer->token.text+lexer->token.length, text);
  1757. lexer->token.length += length;
  1758. return;
  1759. }
  1760. /* We need to extend the buffer. */
  1761. temp = (char*)malloc(newSize);
  1762. if(lexer->token.text)
  1763. {
  1764. memcpy(temp, lexer->token.text, lexer->token.length);
  1765. free(lexer->token.text);
  1766. }
  1767. memcpy(temp+lexer->token.length, text, length);
  1768. temp[lexer->token.length+length] = 0;
  1769. lexer->token.text = temp;
  1770. lexer->token.length += length;
  1771. lexer->size = newSize;
  1772. }
  1773. /*--------------------------------------------------------------------------*/
  1774. static int cmListFileLexerInput(cmListFileLexer* lexer, char* buffer,
  1775. size_t bufferSize)
  1776. {
  1777. if(lexer)
  1778. {
  1779. if(lexer->file)
  1780. {
  1781. return (int)fread(buffer, 1, bufferSize, lexer->file);
  1782. }
  1783. else if(lexer->string_left)
  1784. {
  1785. int length = lexer->string_left;
  1786. if((int)bufferSize < length) { length = (int)bufferSize; }
  1787. memcpy(buffer, lexer->string_position, length);
  1788. lexer->string_position += length;
  1789. lexer->string_left -= length;
  1790. return length;
  1791. }
  1792. }
  1793. return 0;
  1794. }
  1795. /*--------------------------------------------------------------------------*/
  1796. static void cmListFileLexerInit(cmListFileLexer* lexer)
  1797. {
  1798. if(lexer->file || lexer->string_buffer)
  1799. {
  1800. cmListFileLexer_yylex_init(&lexer->scanner);
  1801. cmListFileLexer_yyset_extra(lexer, lexer->scanner);
  1802. }
  1803. }
  1804. /*--------------------------------------------------------------------------*/
  1805. static void cmListFileLexerDestroy(cmListFileLexer* lexer)
  1806. {
  1807. if(lexer->file || lexer->string_buffer)
  1808. {
  1809. cmListFileLexer_yylex_destroy(lexer->scanner);
  1810. if(lexer->file)
  1811. {
  1812. fclose(lexer->file);
  1813. lexer->file = 0;
  1814. }
  1815. if(lexer->string_buffer)
  1816. {
  1817. free(lexer->string_buffer);
  1818. lexer->string_buffer = 0;
  1819. lexer->string_left = 0;
  1820. lexer->string_position = 0;
  1821. }
  1822. }
  1823. }
  1824. /*--------------------------------------------------------------------------*/
  1825. cmListFileLexer* cmListFileLexer_New()
  1826. {
  1827. cmListFileLexer* lexer = (cmListFileLexer*)malloc(sizeof(cmListFileLexer));
  1828. if(!lexer)
  1829. {
  1830. return 0;
  1831. }
  1832. memset(lexer, 0, sizeof(*lexer));
  1833. lexer->line = 1;
  1834. lexer->column = 1;
  1835. return lexer;
  1836. }
  1837. /*--------------------------------------------------------------------------*/
  1838. void cmListFileLexer_Delete(cmListFileLexer* lexer)
  1839. {
  1840. cmListFileLexer_SetFileName(lexer, 0);
  1841. free(lexer);
  1842. }
  1843. /*--------------------------------------------------------------------------*/
  1844. int cmListFileLexer_SetFileName(cmListFileLexer* lexer, const char* name)
  1845. {
  1846. int result = 1;
  1847. cmListFileLexerDestroy(lexer);
  1848. if(name)
  1849. {
  1850. lexer->file = fopen(name, "r");
  1851. if(!lexer->file)
  1852. {
  1853. result = 0;
  1854. }
  1855. }
  1856. cmListFileLexerInit(lexer);
  1857. return result;
  1858. }
  1859. /*--------------------------------------------------------------------------*/
  1860. int cmListFileLexer_SetString(cmListFileLexer* lexer, const char* text)
  1861. {
  1862. int result = 1;
  1863. cmListFileLexerDestroy(lexer);
  1864. if(text)
  1865. {
  1866. int length = (int)strlen(text);
  1867. lexer->string_buffer = (char*)malloc(length+1);
  1868. if(lexer->string_buffer)
  1869. {
  1870. strcpy(lexer->string_buffer, text);
  1871. lexer->string_position = lexer->string_buffer;
  1872. lexer->string_left = length;
  1873. }
  1874. else
  1875. {
  1876. result = 0;
  1877. }
  1878. }
  1879. cmListFileLexerInit(lexer);
  1880. return result;
  1881. }
  1882. /*--------------------------------------------------------------------------*/
  1883. cmListFileLexer_Token* cmListFileLexer_Scan(cmListFileLexer* lexer)
  1884. {
  1885. if(!lexer->file)
  1886. {
  1887. return 0;
  1888. }
  1889. if(cmListFileLexer_yylex(lexer->scanner, lexer))
  1890. {
  1891. return &lexer->token;
  1892. }
  1893. else
  1894. {
  1895. cmListFileLexer_SetFileName(lexer, 0);
  1896. return 0;
  1897. }
  1898. }
  1899. /*--------------------------------------------------------------------------*/
  1900. long cmListFileLexer_GetCurrentLine(cmListFileLexer* lexer)
  1901. {
  1902. if(lexer->file)
  1903. {
  1904. return lexer->line;
  1905. }
  1906. else
  1907. {
  1908. return 0;
  1909. }
  1910. }
  1911. /*--------------------------------------------------------------------------*/
  1912. long cmListFileLexer_GetCurrentColumn(cmListFileLexer* lexer)
  1913. {
  1914. if(lexer->file)
  1915. {
  1916. return lexer->column;
  1917. }
  1918. else
  1919. {
  1920. return 0;
  1921. }
  1922. }
  1923. /*--------------------------------------------------------------------------*/
  1924. const char* cmListFileLexer_GetTypeAsString(cmListFileLexer* lexer,
  1925. cmListFileLexer_Type type)
  1926. {
  1927. (void)lexer;
  1928. switch(type)
  1929. {
  1930. case cmListFileLexer_Token_None: return "nothing";
  1931. case cmListFileLexer_Token_Newline: return "newline";
  1932. case cmListFileLexer_Token_Identifier: return "identifier";
  1933. case cmListFileLexer_Token_ParenLeft: return "left paren";
  1934. case cmListFileLexer_Token_ParenRight: return "right paren";
  1935. case cmListFileLexer_Token_ArgumentUnquoted: return "unquoted argument";
  1936. case cmListFileLexer_Token_ArgumentQuoted: return "quoted argument";
  1937. case cmListFileLexer_Token_BadCharacter: return "bad character";
  1938. case cmListFileLexer_Token_BadString: return "unterminated string";
  1939. }
  1940. return "unknown token";
  1941. }