You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2006 lines
67 KiB

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