From 9bad0dfccedcc1cd71ee2579486f6729cb9d7749 Mon Sep 17 00:00:00 2001 From: Daniel Pfeifer Date: Fri, 28 Apr 2017 20:26:55 +0200 Subject: LexerParser: move to custom directory --- Source/.gitattributes | 18 - Source/CMakeLists.txt | 40 +- Source/LexerParser/.gitattributes | 17 + Source/LexerParser/cmCommandArgumentLexer.cxx | 2072 +++++++ Source/LexerParser/cmCommandArgumentLexer.h | 336 + Source/LexerParser/cmCommandArgumentLexer.in.l | 139 + Source/LexerParser/cmCommandArgumentParser.cxx | 1723 ++++++ Source/LexerParser/cmCommandArgumentParser.y | 191 + Source/LexerParser/cmCommandArgumentParserTokens.h | 82 + Source/LexerParser/cmDependsJavaLexer.cxx | 2738 +++++++++ Source/LexerParser/cmDependsJavaLexer.h | 336 + Source/LexerParser/cmDependsJavaLexer.in.l | 174 + Source/LexerParser/cmDependsJavaParser.cxx | 6421 ++++++++++++++++++++ Source/LexerParser/cmDependsJavaParser.y | 3214 ++++++++++ Source/LexerParser/cmDependsJavaParserTokens.h | 264 + Source/LexerParser/cmExprLexer.cxx | 2033 +++++++ Source/LexerParser/cmExprLexer.h | 334 + Source/LexerParser/cmExprLexer.in.l | 57 + Source/LexerParser/cmExprParser.cxx | 1698 ++++++ Source/LexerParser/cmExprParser.y | 164 + Source/LexerParser/cmExprParserTokens.h | 86 + Source/LexerParser/cmFortranLexer.cxx | 2511 ++++++++ Source/LexerParser/cmFortranLexer.h | 338 ++ Source/LexerParser/cmFortranLexer.in.l | 186 + Source/LexerParser/cmFortranParser.cxx | 1988 ++++++ Source/LexerParser/cmFortranParser.y | 247 + Source/LexerParser/cmFortranParserTokens.h | 149 + Source/LexerParser/cmListFileLexer.c | 2688 ++++++++ Source/LexerParser/cmListFileLexer.in.l | 564 ++ Source/cmCommandArgumentLexer.cxx | 2072 ------- Source/cmCommandArgumentLexer.h | 336 - Source/cmCommandArgumentLexer.in.l | 139 - Source/cmCommandArgumentParser.cxx | 1723 ------ Source/cmCommandArgumentParser.y | 192 - Source/cmCommandArgumentParserTokens.h | 82 - Source/cmDependsJavaLexer.cxx | 2738 --------- Source/cmDependsJavaLexer.h | 336 - Source/cmDependsJavaLexer.in.l | 174 - Source/cmDependsJavaParser.cxx | 6421 -------------------- Source/cmDependsJavaParser.y | 3215 ---------- Source/cmDependsJavaParserTokens.h | 264 - Source/cmExprLexer.cxx | 2033 ------- Source/cmExprLexer.h | 334 - Source/cmExprLexer.in.l | 57 - Source/cmExprParser.cxx | 1699 ------ Source/cmExprParser.y | 165 - Source/cmExprParserTokens.h | 86 - Source/cmFortranLexer.cxx | 2511 -------- Source/cmFortranLexer.h | 338 -- Source/cmFortranLexer.in.l | 186 - Source/cmFortranParser.cxx | 1988 ------ Source/cmFortranParser.y | 247 - Source/cmFortranParserTokens.h | 149 - Source/cmListFileLexer.c | 2688 -------- Source/cmListFileLexer.in.l | 564 -- bootstrap | 25 +- 56 files changed, 30797 insertions(+), 30773 deletions(-) create mode 100644 Source/LexerParser/.gitattributes create mode 100644 Source/LexerParser/cmCommandArgumentLexer.cxx create mode 100644 Source/LexerParser/cmCommandArgumentLexer.h create mode 100644 Source/LexerParser/cmCommandArgumentLexer.in.l create mode 100644 Source/LexerParser/cmCommandArgumentParser.cxx create mode 100644 Source/LexerParser/cmCommandArgumentParser.y create mode 100644 Source/LexerParser/cmCommandArgumentParserTokens.h create mode 100644 Source/LexerParser/cmDependsJavaLexer.cxx create mode 100644 Source/LexerParser/cmDependsJavaLexer.h create mode 100644 Source/LexerParser/cmDependsJavaLexer.in.l create mode 100644 Source/LexerParser/cmDependsJavaParser.cxx create mode 100644 Source/LexerParser/cmDependsJavaParser.y create mode 100644 Source/LexerParser/cmDependsJavaParserTokens.h create mode 100644 Source/LexerParser/cmExprLexer.cxx create mode 100644 Source/LexerParser/cmExprLexer.h create mode 100644 Source/LexerParser/cmExprLexer.in.l create mode 100644 Source/LexerParser/cmExprParser.cxx create mode 100644 Source/LexerParser/cmExprParser.y create mode 100644 Source/LexerParser/cmExprParserTokens.h create mode 100644 Source/LexerParser/cmFortranLexer.cxx create mode 100644 Source/LexerParser/cmFortranLexer.h create mode 100644 Source/LexerParser/cmFortranLexer.in.l create mode 100644 Source/LexerParser/cmFortranParser.cxx create mode 100644 Source/LexerParser/cmFortranParser.y create mode 100644 Source/LexerParser/cmFortranParserTokens.h create mode 100644 Source/LexerParser/cmListFileLexer.c create mode 100644 Source/LexerParser/cmListFileLexer.in.l delete mode 100644 Source/cmCommandArgumentLexer.cxx delete mode 100644 Source/cmCommandArgumentLexer.h delete mode 100644 Source/cmCommandArgumentLexer.in.l delete mode 100644 Source/cmCommandArgumentParser.cxx delete mode 100644 Source/cmCommandArgumentParser.y delete mode 100644 Source/cmCommandArgumentParserTokens.h delete mode 100644 Source/cmDependsJavaLexer.cxx delete mode 100644 Source/cmDependsJavaLexer.h delete mode 100644 Source/cmDependsJavaLexer.in.l delete mode 100644 Source/cmDependsJavaParser.cxx delete mode 100644 Source/cmDependsJavaParser.y delete mode 100644 Source/cmDependsJavaParserTokens.h delete mode 100644 Source/cmExprLexer.cxx delete mode 100644 Source/cmExprLexer.h delete mode 100644 Source/cmExprLexer.in.l delete mode 100644 Source/cmExprParser.cxx delete mode 100644 Source/cmExprParser.y delete mode 100644 Source/cmExprParserTokens.h delete mode 100644 Source/cmFortranLexer.cxx delete mode 100644 Source/cmFortranLexer.h delete mode 100644 Source/cmFortranLexer.in.l delete mode 100644 Source/cmFortranParser.cxx delete mode 100644 Source/cmFortranParser.y delete mode 100644 Source/cmFortranParserTokens.h delete mode 100644 Source/cmListFileLexer.c delete mode 100644 Source/cmListFileLexer.in.l diff --git a/Source/.gitattributes b/Source/.gitattributes index f69ad9d..0f829a3 100644 --- a/Source/.gitattributes +++ b/Source/.gitattributes @@ -1,20 +1,2 @@ -/cmCommandArgumentLexer.cxx generated -/cmCommandArgumentLexer.h generated -/cmCommandArgumentParser.cxx generated -/cmCommandArgumentParserTokens.h generated -/cmDependsJavaLexer.cxx generated -/cmDependsJavaLexer.h generated -/cmDependsJavaParser.cxx generated -/cmDependsJavaParserTokens.h generated -/cmExprLexer.cxx generated -/cmExprLexer.h generated -/cmExprParser.cxx generated -/cmExprParserTokens.h generated -/cmFortranLexer.cxx generated -/cmFortranLexer.h generated -/cmFortranParser.cxx generated -/cmFortranParserTokens.h generated -/cmListFileLexer.c generated - # Do not format third-party sources. /kwsys/** -format.clang-format diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 7c72a11..1ea75bf 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -78,6 +78,7 @@ configure_file( include_directories( "${CMake_BINARY_DIR}/Source" "${CMake_SOURCE_DIR}/Source" + "${CMake_SOURCE_DIR}/Source/LexerParser" ${CMAKE_ZLIB_INCLUDES} ${CMAKE_EXPAT_INCLUDES} ${CMAKE_TAR_INCLUDES} @@ -102,14 +103,40 @@ endif() # Sources for CMakeLib # set(SRCS + # Lexers/Parsers + LexerParser/cmCommandArgumentLexer.cxx + LexerParser/cmCommandArgumentLexer.h + LexerParser/cmCommandArgumentLexer.in.l + LexerParser/cmCommandArgumentParser.cxx + LexerParser/cmCommandArgumentParserTokens.h + LexerParser/cmCommandArgumentParser.y + LexerParser/cmDependsJavaLexer.cxx + LexerParser/cmDependsJavaLexer.h + LexerParser/cmDependsJavaLexer.in.l + LexerParser/cmDependsJavaParser.cxx + LexerParser/cmDependsJavaParserTokens.h + LexerParser/cmDependsJavaParser.y + LexerParser/cmExprLexer.cxx + LexerParser/cmExprLexer.h + LexerParser/cmExprLexer.in.l + LexerParser/cmExprParser.cxx + LexerParser/cmExprParserTokens.h + LexerParser/cmExprParser.y + LexerParser/cmFortranLexer.cxx + LexerParser/cmFortranLexer.h + LexerParser/cmFortranLexer.in.l + LexerParser/cmFortranParser.cxx + LexerParser/cmFortranParserTokens.h + LexerParser/cmFortranParser.y + LexerParser/cmListFileLexer.c + LexerParser/cmListFileLexer.in.l + cmArchiveWrite.cxx cmBase32.cxx cmCacheManager.cxx cmCacheManager.h cmCLocaleEnvironmentScope.h cmCLocaleEnvironmentScope.cxx - cmCommandArgumentLexer.cxx - cmCommandArgumentParser.cxx cmCommandArgumentParserHelper.cxx cmCommonTargetGenerator.cxx cmCommonTargetGenerator.h @@ -141,8 +168,6 @@ set(SRCS cmDependsFortran.h cmDependsJava.cxx cmDependsJava.h - cmDependsJavaLexer.cxx - cmDependsJavaParser.cxx cmDependsJavaParserHelper.cxx cmDependsJavaParserHelper.h cmDocumentation.cxx @@ -151,8 +176,6 @@ set(SRCS cmDynamicLoader.cxx cmDynamicLoader.h ${ELF_SRCS} - cmExprLexer.cxx - cmExprParser.cxx cmExprParserHelper.cxx cmExportBuildAndroidMKGenerator.h cmExportBuildAndroidMKGenerator.cxx @@ -192,10 +215,6 @@ set(SRCS cmFilePathChecksum.h cmFileTimeComparison.cxx cmFileTimeComparison.h - cmFortranLexer.cxx - cmFortranLexer.h - cmFortranParser.cxx - cmFortranParser.h cmFortranParserImpl.cxx cmGeneratedFileStream.cxx cmGeneratorExpressionContext.cxx @@ -247,7 +266,6 @@ set(SRCS cmLinkLineDeviceComputer.h cmListFileCache.cxx cmListFileCache.h - cmListFileLexer.c cmLocalCommonGenerator.cxx cmLocalCommonGenerator.h cmLocalGenerator.cxx diff --git a/Source/LexerParser/.gitattributes b/Source/LexerParser/.gitattributes new file mode 100644 index 0000000..47eedfb --- /dev/null +++ b/Source/LexerParser/.gitattributes @@ -0,0 +1,17 @@ +/cmCommandArgumentLexer.cxx generated +/cmCommandArgumentLexer.h generated +/cmCommandArgumentParser.cxx generated +/cmCommandArgumentParserTokens.h generated +/cmDependsJavaLexer.cxx generated +/cmDependsJavaLexer.h generated +/cmDependsJavaParser.cxx generated +/cmDependsJavaParserTokens.h generated +/cmExprLexer.cxx generated +/cmExprLexer.h generated +/cmExprParser.cxx generated +/cmExprParserTokens.h generated +/cmFortranLexer.cxx generated +/cmFortranLexer.h generated +/cmFortranParser.cxx generated +/cmFortranParserTokens.h generated +/cmListFileLexer.c generated diff --git a/Source/LexerParser/cmCommandArgumentLexer.cxx b/Source/LexerParser/cmCommandArgumentLexer.cxx new file mode 100644 index 0000000..12dce37 --- /dev/null +++ b/Source/LexerParser/cmCommandArgumentLexer.cxx @@ -0,0 +1,2072 @@ +#include "cmStandardLexer.h" +#line 2 "cmCommandArgumentLexer.cxx" + +#line 4 "cmCommandArgumentLexer.cxx" + +#define FLEXINT_H 1 +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 6 +#define YY_FLEX_SUBMINOR_VERSION 1 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ +#include +#include +#include +#include + +/* end standard C headers. */ + +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have . Non-C99 systems may or may not. */ + +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 +#endif + +#include +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#endif /* ! C99 */ + +#endif /* ! FLEXINT_H */ + +/* TODO: this is always defined, so inline it */ +#define yyconst const + +#if defined(__GNUC__) && __GNUC__ >= 3 +#define yynoreturn __attribute__((__noreturn__)) +#else +#define yynoreturn +#endif + +/* Returned upon end-of-file. */ +#define YY_NULL 0 + +/* Promotes a possibly negative, possibly signed char to an unsigned + * integer for use as an array index. If the signed char is negative, + * we want to instead treat it as an 8-bit unsigned char, hence the + * double cast. + */ +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) + +/* An opaque pointer. */ +#ifndef YY_TYPEDEF_YY_SCANNER_T +#define YY_TYPEDEF_YY_SCANNER_T +typedef void* yyscan_t; +#endif + +/* For convenience, these vars (plus the bison vars far below) + are macros in the reentrant scanner. */ +#define yyin yyg->yyin_r +#define yyout yyg->yyout_r +#define yyextra yyg->yyextra_r +#define yyleng yyg->yyleng_r +#define yytext yyg->yytext_r +#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) +#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) +#define yy_flex_debug yyg->yy_flex_debug_r + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN yyg->yy_start = 1 + 2 * + +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START ((yyg->yy_start - 1) / 2) +#define YYSTATE YY_START + +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) + +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE cmCommandArgument_yyrestart(yyin ,yyscanner ) + +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#ifndef YY_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k. + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. + * Ditto for the __ia64__ case accordingly. + */ +#define YY_BUF_SIZE 32768 +#else +#define YY_BUF_SIZE 16384 +#endif /* __ia64__ */ +#endif + +/* The state buf must be large enough to hold one state per character in the main buffer. + */ +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE +typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + + #define YY_LESS_LINENO(n) + #define YY_LINENO_REWIND_TO(ptr) + +/* Return all but the first "n" matched characters back to the input stream. */ +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = yyg->yy_hold_char; \ + YY_RESTORE_YY_MORE_OFFSET \ + yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) + +#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) + +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via cmCommandArgument_yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + * + * Returns the top of the stack, or NULL. + */ +#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ + ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ + : NULL) + +/* Same as previous macro, but useful when we know that the buffer stack is not + * NULL or when we need an lvalue. For internal use only. + */ +#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] + +void cmCommandArgument_yyrestart (FILE *input_file ,yyscan_t yyscanner ); +void cmCommandArgument_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); +YY_BUFFER_STATE cmCommandArgument_yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner ); +void cmCommandArgument_yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); +void cmCommandArgument_yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); +void cmCommandArgument_yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); +void cmCommandArgument_yypop_buffer_state (yyscan_t yyscanner ); + +static void cmCommandArgument_yyensure_buffer_stack (yyscan_t yyscanner ); +static void cmCommandArgument_yy_load_buffer_state (yyscan_t yyscanner ); +static void cmCommandArgument_yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner ); + +#define YY_FLUSH_BUFFER cmCommandArgument_yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner) + +YY_BUFFER_STATE cmCommandArgument_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); +YY_BUFFER_STATE cmCommandArgument_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); +YY_BUFFER_STATE cmCommandArgument_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); + +void *cmCommandArgument_yyalloc (yy_size_t ,yyscan_t yyscanner ); +void *cmCommandArgument_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); +void cmCommandArgument_yyfree (void * ,yyscan_t yyscanner ); + +#define yy_new_buffer cmCommandArgument_yy_create_buffer + +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + cmCommandArgument_yyensure_buffer_stack (yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = \ + cmCommandArgument_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } + +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + cmCommandArgument_yyensure_buffer_stack (yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = \ + cmCommandArgument_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } + +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) + +/* Begin user sect3 */ + +#define cmCommandArgument_yywrap(yyscanner) (/*CONSTCOND*/1) +#define YY_SKIP_YYWRAP + +typedef unsigned char YY_CHAR; + +typedef int yy_state_type; + +#define yytext_ptr yytext_r + +static yy_state_type yy_get_previous_state (yyscan_t yyscanner ); +static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner); +static int yy_get_next_buffer (yyscan_t yyscanner ); +static void yynoreturn yy_fatal_error (yyconst char* msg ,yyscan_t yyscanner ); + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up yytext. + */ +#define YY_DO_BEFORE_ACTION \ + yyg->yytext_ptr = yy_bp; \ + yyleng = (int) (yy_cp - yy_bp); \ + yyg->yy_hold_char = *yy_cp; \ + *yy_cp = '\0'; \ + yyg->yy_c_buf_p = yy_cp; + +#define YY_NUM_RULES 14 +#define YY_END_OF_BUFFER 15 +/* This struct is not used in this scanner, + but its presence is necessary. */ +struct yy_trans_info + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static yyconst flex_int16_t yy_accept[30] = + { 0, + 0, 0, 0, 0, 0, 0, 15, 9, 10, 7, + 6, 14, 11, 5, 12, 13, 9, 0, 0, 4, + 7, 0, 8, 2, 0, 3, 0, 1, 0 + } ; + +static yyconst YY_CHAR yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, + 1, 1, 4, 1, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, + 1, 1, 1, 5, 4, 4, 4, 4, 6, 4, + 4, 4, 4, 4, 4, 4, 4, 7, 4, 4, + 4, 4, 4, 4, 4, 8, 4, 4, 4, 4, + 1, 9, 1, 1, 4, 1, 4, 4, 4, 4, + + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 10, 1, 11, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static yyconst YY_CHAR yy_meta[12] = + { 0, + 1, 2, 3, 4, 3, 4, 4, 4, 3, 5, + 3 + } ; + +static yyconst flex_uint16_t yy_base[35] = + { 0, + 0, 0, 31, 30, 29, 28, 36, 0, 6, 16, + 0, 41, 41, 41, 0, 41, 0, 22, 22, 41, + 18, 18, 41, 41, 7, 41, 4, 41, 41, 20, + 21, 26, 9, 30 + } ; + +static yyconst flex_int16_t yy_def[35] = + { 0, + 29, 1, 1, 1, 1, 1, 29, 30, 31, 32, + 33, 29, 29, 29, 34, 29, 30, 31, 18, 29, + 32, 33, 29, 29, 18, 29, 18, 29, 0, 29, + 29, 29, 29, 29 + } ; + +static yyconst flex_uint16_t yy_nxt[53] = + { 0, + 8, 8, 9, 10, 11, 10, 10, 10, 12, 13, + 14, 19, 22, 28, 27, 20, 17, 17, 17, 17, + 17, 17, 26, 17, 18, 18, 21, 21, 25, 21, + 23, 24, 23, 23, 23, 29, 16, 16, 15, 15, + 7, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29 + } ; + +static yyconst flex_int16_t yy_chk[53] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 9, 33, 27, 25, 9, 10, 10, 21, 21, + 30, 30, 22, 30, 31, 31, 32, 32, 19, 32, + 34, 18, 34, 34, 34, 7, 6, 5, 4, 3, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29 + } ; + +/* The intent behind this definition is that it'll catch + * any uses of REJECT which flex missed. + */ +#define REJECT reject_used_but_not_detected +#define yymore() yymore_used_but_not_detected +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET +#line 1 "cmCommandArgumentLexer.in.l" +#line 2 "cmCommandArgumentLexer.in.l" +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +/* + +This file must be translated to C++ and modified to build everywhere. + +Run flex >= 2.6 like this: + + flex --nounistd -DFLEXINT_H --prefix=cmCommandArgument_yy --header-file=cmCommandArgumentLexer.h -ocmCommandArgumentLexer.cxx cmCommandArgumentLexer.in.l + +Modify cmCommandArgumentLexer.cxx: + - remove trailing whitespace: sed -i 's/\s*$//' cmCommandArgumentLexer.h cmCommandArgumentLexer.cxx + - remove blank lines at end of file + - #include "cmStandardLexer.h" at the top + - add cast in cmCommandArgument_yy_scan_bytes for loop condition of _yybytes_len to size_t + +*/ + +/* IWYU pragma: no_forward_declare yyguts_t */ + +#include "cmCommandArgumentParserHelper.h" + +/* Replace the lexer input function. */ +#undef YY_INPUT +#define YY_INPUT(buf, result, max_size) \ + { result = yyextra->LexInput(buf, max_size); } + +/* Include the set of tokens from the parser. */ +#include "cmCommandArgumentParserTokens.h" + +/*--------------------------------------------------------------------------*/ + + +#line 484 "cmCommandArgumentLexer.cxx" + +#define INITIAL 0 +#define ESCAPES 1 +#define NOESCAPES 2 + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +/* Holds the entire state of the reentrant scanner. */ +struct yyguts_t + { + + /* User-defined. Not touched by flex. */ + YY_EXTRA_TYPE yyextra_r; + + /* The rest are the same as the globals declared in the non-reentrant scanner. */ + FILE *yyin_r, *yyout_r; + size_t yy_buffer_stack_top; /**< index of top of stack. */ + size_t yy_buffer_stack_max; /**< capacity of stack. */ + YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ + char yy_hold_char; + int yy_n_chars; + int yyleng_r; + char *yy_c_buf_p; + int yy_init; + int yy_start; + int yy_did_buffer_switch_on_eof; + int yy_start_stack_ptr; + int yy_start_stack_depth; + int *yy_start_stack; + yy_state_type yy_last_accepting_state; + char* yy_last_accepting_cpos; + + int yylineno_r; + int yy_flex_debug_r; + + char *yytext_r; + int yy_more_flag; + int yy_more_len; + + }; /* end struct yyguts_t */ + +static int yy_init_globals (yyscan_t yyscanner ); + +int cmCommandArgument_yylex_init (yyscan_t* scanner); + +int cmCommandArgument_yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); + +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int cmCommandArgument_yylex_destroy (yyscan_t yyscanner ); + +int cmCommandArgument_yyget_debug (yyscan_t yyscanner ); + +void cmCommandArgument_yyset_debug (int debug_flag ,yyscan_t yyscanner ); + +YY_EXTRA_TYPE cmCommandArgument_yyget_extra (yyscan_t yyscanner ); + +void cmCommandArgument_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); + +FILE *cmCommandArgument_yyget_in (yyscan_t yyscanner ); + +void cmCommandArgument_yyset_in (FILE * _in_str ,yyscan_t yyscanner ); + +FILE *cmCommandArgument_yyget_out (yyscan_t yyscanner ); + +void cmCommandArgument_yyset_out (FILE * _out_str ,yyscan_t yyscanner ); + + int cmCommandArgument_yyget_leng (yyscan_t yyscanner ); + +char *cmCommandArgument_yyget_text (yyscan_t yyscanner ); + +int cmCommandArgument_yyget_lineno (yyscan_t yyscanner ); + +void cmCommandArgument_yyset_lineno (int _line_number ,yyscan_t yyscanner ); + +int cmCommandArgument_yyget_column (yyscan_t yyscanner ); + +void cmCommandArgument_yyset_column (int _column_no ,yyscan_t yyscanner ); + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int cmCommandArgument_yywrap (yyscan_t yyscanner ); +#else +extern int cmCommandArgument_yywrap (yyscan_t yyscanner ); +#endif +#endif + +#ifndef YY_NO_UNPUT + +#endif + +#ifndef yytext_ptr +static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); +#endif + +#ifndef YY_NO_INPUT + +#ifdef __cplusplus +static int yyinput (yyscan_t yyscanner ); +#else +static int input (yyscan_t yyscanner ); +#endif + +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k */ +#define YY_READ_BUF_SIZE 16384 +#else +#define YY_READ_BUF_SIZE 8192 +#endif /* __ia64__ */ +#endif + +/* Copy whatever the last rule matched to the standard output. */ +#ifndef ECHO +/* This used to be an fputs(), but since the string might contain NUL's, + * we now use fwrite(). + */ +#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ + { \ + int c = '*'; \ + size_t n; \ + for ( n = 0; n < max_size && \ + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else \ + { \ + errno=0; \ + while ( (result = (int) fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(yyin); \ + } \ + }\ +\ + +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) +#endif + +/* end tables serialization structures and prototypes */ + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL_IS_OURS 1 + +extern int cmCommandArgument_yylex (yyscan_t yyscanner); + +#define YY_DECL int cmCommandArgument_yylex (yyscan_t yyscanner) +#endif /* !YY_DECL */ + +/* Code executed at the beginning of each rule, after yytext and yyleng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK /*LINTED*/break; +#endif + +#define YY_RULE_SETUP \ + YY_USER_ACTION + +/** The main scanner function which does all the work. + */ +YY_DECL +{ + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if ( !yyg->yy_init ) + { + yyg->yy_init = 1; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + if ( ! yyg->yy_start ) + yyg->yy_start = 1; /* first start state */ + + if ( ! yyin ) + yyin = stdin; + + if ( ! yyout ) + yyout = stdout; + + if ( ! YY_CURRENT_BUFFER ) { + cmCommandArgument_yyensure_buffer_stack (yyscanner); + YY_CURRENT_BUFFER_LVALUE = + cmCommandArgument_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); + } + + cmCommandArgument_yy_load_buffer_state(yyscanner ); + } + + { +#line 42 "cmCommandArgumentLexer.in.l" + + +#line 740 "cmCommandArgumentLexer.cxx" + + while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ + { + yy_cp = yyg->yy_c_buf_p; + + /* Support of yytext. */ + *yy_cp = yyg->yy_hold_char; + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = yyg->yy_start; +yy_match: + do + { + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 30 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; + ++yy_cp; + } + while ( yy_base[yy_current_state] != 41 ); + +yy_find_action: + yy_act = yy_accept[yy_current_state]; + if ( yy_act == 0 ) + { /* have to back up */ + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + yy_act = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + +do_action: /* This label is used only to access EOF actions. */ + + switch ( yy_act ) + { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = yyg->yy_hold_char; + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + goto yy_find_action; + +case 1: +YY_RULE_SETUP +#line 44 "cmCommandArgumentLexer.in.l" +{ + //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; + yyextra->AllocateParserType(yylvalp, yytext+1, strlen(yytext)-2); + return cal_ENVCURLY; +} + YY_BREAK +case 2: +YY_RULE_SETUP +#line 50 "cmCommandArgumentLexer.in.l" +{ + //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; + yyextra->AllocateParserType(yylvalp, yytext+1, strlen(yytext)-2); + return cal_NCURLY; +} + YY_BREAK +case 3: +YY_RULE_SETUP +#line 56 "cmCommandArgumentLexer.in.l" +{ + //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; + yyextra->AllocateParserType(yylvalp, yytext+1, strlen(yytext)-2); + return cal_ATNAME; +} + YY_BREAK +case 4: +YY_RULE_SETUP +#line 62 "cmCommandArgumentLexer.in.l" +{ + //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; + //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + yylvalp->str = yyextra->DCURLYVariable; + return cal_DCURLY; +} + YY_BREAK +case 5: +YY_RULE_SETUP +#line 69 "cmCommandArgumentLexer.in.l" +{ + //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; + //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + yylvalp->str = yyextra->RCURLYVariable; + return cal_RCURLY; +} + YY_BREAK +case 6: +YY_RULE_SETUP +#line 76 "cmCommandArgumentLexer.in.l" +{ + //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; + //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + yylvalp->str = yyextra->ATVariable; + return cal_AT; +} + YY_BREAK +case 7: +YY_RULE_SETUP +#line 83 "cmCommandArgumentLexer.in.l" +{ + //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; + yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + return cal_NAME; +} + YY_BREAK +case 8: +YY_RULE_SETUP +#line 89 "cmCommandArgumentLexer.in.l" +{ + if ( !yyextra->HandleEscapeSymbol(yylvalp, *(yytext+1)) ) + { + return cal_ERROR; + } + return cal_SYMBOL; +} + YY_BREAK +case 9: +/* rule 9 can match eol */ +YY_RULE_SETUP +#line 97 "cmCommandArgumentLexer.in.l" +{ + //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; + yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + return cal_SYMBOL; +} + YY_BREAK +case 10: +YY_RULE_SETUP +#line 103 "cmCommandArgumentLexer.in.l" +{ + //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + yylvalp->str = yyextra->DOLLARVariable; + return cal_DOLLAR; +} + YY_BREAK +case 11: +YY_RULE_SETUP +#line 109 "cmCommandArgumentLexer.in.l" +{ + //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + yylvalp->str = yyextra->LCURLYVariable; + return cal_LCURLY; +} + YY_BREAK +case 12: +YY_RULE_SETUP +#line 115 "cmCommandArgumentLexer.in.l" +{ + //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + yylvalp->str = yyextra->BSLASHVariable; + return cal_BSLASH; +} + YY_BREAK +case 13: +YY_RULE_SETUP +#line 121 "cmCommandArgumentLexer.in.l" +{ + //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + yylvalp->str = yyextra->BSLASHVariable; + return cal_SYMBOL; +} + YY_BREAK +case 14: +YY_RULE_SETUP +#line 127 "cmCommandArgumentLexer.in.l" +ECHO; + YY_BREAK +#line 925 "cmCommandArgumentLexer.cxx" +case YY_STATE_EOF(INITIAL): +case YY_STATE_EOF(ESCAPES): +case YY_STATE_EOF(NOESCAPES): + yyterminate(); + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = yyg->yy_hold_char; + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * cmCommandArgument_yylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( yyscanner ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); + + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++yyg->yy_c_buf_p; + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = yyg->yy_c_buf_p; + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( yyscanner ) ) + { + case EOB_ACT_END_OF_FILE: + { + yyg->yy_did_buffer_switch_on_eof = 0; + + if ( cmCommandArgument_yywrap(yyscanner ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! yyg->yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = + yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( yyscanner ); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + yyg->yy_c_buf_p = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; + + yy_current_state = yy_get_previous_state( yyscanner ); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of user's declarations */ +} /* end of cmCommandArgument_yylex */ + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ +static int yy_get_next_buffer (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = yyg->yytext_ptr; + yy_size_t number_to_move, i; + int ret_val; + + if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (yy_size_t) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1; + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; + + else + { + int num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; + + int yy_c_buf_p_offset = + (int) (yyg->yy_c_buf_p - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + cmCommandArgument_yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = NULL; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + yyg->yy_n_chars, num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + if ( yyg->yy_n_chars == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + cmCommandArgument_yyrestart(yyin ,yyscanner); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if ((int) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) cmCommandArgument_yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + } + + yyg->yy_n_chars += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; + + yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; +} + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + + static yy_state_type yy_get_previous_state (yyscan_t yyscanner) +{ + yy_state_type yy_current_state; + char *yy_cp; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + yy_current_state = yyg->yy_start; + + for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) + { + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 30 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; + } + + return yy_current_state; +} + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) +{ + int yy_is_jam; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ + char *yy_cp = yyg->yy_c_buf_p; + + YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 30 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; + yy_is_jam = (yy_current_state == 29); + + (void)yyg; + return yy_is_jam ? 0 : yy_current_state; +} + +#ifndef YY_NO_UNPUT + +#endif + +#ifndef YY_NO_INPUT +#ifdef __cplusplus + static int yyinput (yyscan_t yyscanner) +#else + static int input (yyscan_t yyscanner) +#endif + +{ + int c; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + *yyg->yy_c_buf_p = yyg->yy_hold_char; + + if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) + /* This was really a NUL. */ + *yyg->yy_c_buf_p = '\0'; + + else + { /* need more input */ + int offset = yyg->yy_c_buf_p - yyg->yytext_ptr; + ++yyg->yy_c_buf_p; + + switch ( yy_get_next_buffer( yyscanner ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + cmCommandArgument_yyrestart(yyin ,yyscanner); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( cmCommandArgument_yywrap(yyscanner ) ) + return 0; + + if ( ! yyg->yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(yyscanner); +#else + return input(yyscanner); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = yyg->yytext_ptr + offset; + break; + } + } + } + + c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ + *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ + yyg->yy_hold_char = *++yyg->yy_c_buf_p; + + return c; +} +#endif /* ifndef YY_NO_INPUT */ + +/** Immediately switch to a different input stream. + * @param input_file A readable stream. + * @param yyscanner The scanner object. + * @note This function does not reset the start condition to @c INITIAL . + */ + void cmCommandArgument_yyrestart (FILE * input_file , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if ( ! YY_CURRENT_BUFFER ){ + cmCommandArgument_yyensure_buffer_stack (yyscanner); + YY_CURRENT_BUFFER_LVALUE = + cmCommandArgument_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); + } + + cmCommandArgument_yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner); + cmCommandArgument_yy_load_buffer_state(yyscanner ); +} + +/** Switch to a different input buffer. + * @param new_buffer The new input buffer. + * @param yyscanner The scanner object. + */ + void cmCommandArgument_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* TODO. We should be able to replace this entire function body + * with + * cmCommandArgument_yypop_buffer_state(); + * cmCommandArgument_yypush_buffer_state(new_buffer); + */ + cmCommandArgument_yyensure_buffer_stack (yyscanner); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + cmCommandArgument_yy_load_buffer_state(yyscanner ); + + /* We don't actually know whether we did this switch during + * EOF (cmCommandArgument_yywrap()) processing, but the only time this flag + * is looked at is after cmCommandArgument_yywrap() is called, so it's safe + * to go ahead and always set it. + */ + yyg->yy_did_buffer_switch_on_eof = 1; +} + +static void cmCommandArgument_yy_load_buffer_state (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + yyg->yy_hold_char = *yyg->yy_c_buf_p; +} + +/** Allocate and initialize an input buffer state. + * @param file A readable stream. + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. + * @param yyscanner The scanner object. + * @return the allocated buffer state. + */ + YY_BUFFER_STATE cmCommandArgument_yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) +{ + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) cmCommandArgument_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in cmCommandArgument_yy_create_buffer()" ); + + b->yy_buf_size = (yy_size_t)size; + + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) cmCommandArgument_yyalloc(b->yy_buf_size + 2 ,yyscanner ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in cmCommandArgument_yy_create_buffer()" ); + + b->yy_is_our_buffer = 1; + + cmCommandArgument_yy_init_buffer(b,file ,yyscanner); + + return b; +} + +/** Destroy the buffer. + * @param b a buffer created with cmCommandArgument_yy_create_buffer() + * @param yyscanner The scanner object. + */ + void cmCommandArgument_yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if ( ! b ) + return; + + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + cmCommandArgument_yyfree((void *) b->yy_ch_buf ,yyscanner ); + + cmCommandArgument_yyfree((void *) b ,yyscanner ); +} + +/* Initializes or reinitializes a buffer. + * This function is sometimes called more than once on the same buffer, + * such as during a cmCommandArgument_yyrestart() or at EOF. + */ + static void cmCommandArgument_yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) + +{ + int oerrno = errno; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + cmCommandArgument_yy_flush_buffer(b ,yyscanner); + + b->yy_input_file = file; + b->yy_fill_buffer = 1; + + /* If b is the current buffer, then cmCommandArgument_yy_init_buffer was _probably_ + * called from cmCommandArgument_yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } + + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; + + errno = oerrno; +} + +/** Discard all buffered characters. On the next scan, YY_INPUT will be called. + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. + * @param yyscanner The scanner object. + */ + void cmCommandArgument_yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if ( ! b ) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == YY_CURRENT_BUFFER ) + cmCommandArgument_yy_load_buffer_state(yyscanner ); +} + +/** Pushes the new state onto the stack. The new state becomes + * the current state. This function will allocate the stack + * if necessary. + * @param new_buffer The new state. + * @param yyscanner The scanner object. + */ +void cmCommandArgument_yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if (new_buffer == NULL) + return; + + cmCommandArgument_yyensure_buffer_stack(yyscanner); + + /* This block is copied from cmCommandArgument_yy_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + yyg->yy_buffer_stack_top++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from cmCommandArgument_yy_switch_to_buffer. */ + cmCommandArgument_yy_load_buffer_state(yyscanner ); + yyg->yy_did_buffer_switch_on_eof = 1; +} + +/** Removes and deletes the top of the stack, if present. + * The next element becomes the new top. + * @param yyscanner The scanner object. + */ +void cmCommandArgument_yypop_buffer_state (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if (!YY_CURRENT_BUFFER) + return; + + cmCommandArgument_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner); + YY_CURRENT_BUFFER_LVALUE = NULL; + if (yyg->yy_buffer_stack_top > 0) + --yyg->yy_buffer_stack_top; + + if (YY_CURRENT_BUFFER) { + cmCommandArgument_yy_load_buffer_state(yyscanner ); + yyg->yy_did_buffer_switch_on_eof = 1; + } +} + +/* Allocates the stack if it does not exist. + * Guarantees space for at least one push. + */ +static void cmCommandArgument_yyensure_buffer_stack (yyscan_t yyscanner) +{ + int num_to_alloc; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if (!yyg->yy_buffer_stack) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ + yyg->yy_buffer_stack = (struct yy_buffer_state**)cmCommandArgument_yyalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + , yyscanner); + if ( ! yyg->yy_buffer_stack ) + YY_FATAL_ERROR( "out of dynamic memory in cmCommandArgument_yyensure_buffer_stack()" ); + + memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + yyg->yy_buffer_stack_max = num_to_alloc; + yyg->yy_buffer_stack_top = 0; + return; + } + + if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + yy_size_t grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = yyg->yy_buffer_stack_max + grow_size; + yyg->yy_buffer_stack = (struct yy_buffer_state**)cmCommandArgument_yyrealloc + (yyg->yy_buffer_stack, + num_to_alloc * sizeof(struct yy_buffer_state*) + , yyscanner); + if ( ! yyg->yy_buffer_stack ) + YY_FATAL_ERROR( "out of dynamic memory in cmCommandArgument_yyensure_buffer_stack()" ); + + /* zero only the new slots.*/ + memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); + yyg->yy_buffer_stack_max = num_to_alloc; + } +} + +/** Setup the input buffer state to scan directly from a user-specified character buffer. + * @param base the character buffer + * @param size the size in bytes of the character buffer + * @param yyscanner The scanner object. + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE cmCommandArgument_yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) +{ + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return NULL; + + b = (YY_BUFFER_STATE) cmCommandArgument_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in cmCommandArgument_yy_scan_buffer()" ); + + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = NULL; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + cmCommandArgument_yy_switch_to_buffer(b ,yyscanner ); + + return b; +} + +/** Setup the input buffer state to scan a string. The next call to cmCommandArgument_yylex() will + * scan from a @e copy of @a str. + * @param yystr a NUL-terminated string to scan + * @param yyscanner The scanner object. + * @return the newly allocated buffer state object. + * @note If you want to scan bytes that may contain NUL values, then use + * cmCommandArgument_yy_scan_bytes() instead. + */ +YY_BUFFER_STATE cmCommandArgument_yy_scan_string (yyconst char * yystr , yyscan_t yyscanner) +{ + + return cmCommandArgument_yy_scan_bytes(yystr,(int) strlen(yystr) ,yyscanner); +} + +/** Setup the input buffer state to scan the given bytes. The next call to cmCommandArgument_yylex() will + * scan from a @e copy of @a bytes. + * @param yybytes the byte buffer to scan + * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. + * @param yyscanner The scanner object. + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE cmCommandArgument_yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner) +{ + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + yy_size_t i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = (yy_size_t) _yybytes_len + 2; + buf = (char *) cmCommandArgument_yyalloc(n ,yyscanner ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in cmCommandArgument_yy_scan_bytes()" ); + + for ( i = 0; i < (size_t)_yybytes_len; ++i ) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; + + b = cmCommandArgument_yy_scan_buffer(buf,n ,yyscanner); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in cmCommandArgument_yy_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; +} + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +static void yynoreturn yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + (void) fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); +} + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + yytext[yyleng] = yyg->yy_hold_char; \ + yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ + yyg->yy_hold_char = *yyg->yy_c_buf_p; \ + *yyg->yy_c_buf_p = '\0'; \ + yyleng = yyless_macro_arg; \ + } \ + while ( 0 ) + +/* Accessor methods (get/set functions) to struct members. */ + +/** Get the user-defined data for this scanner. + * @param yyscanner The scanner object. + */ +YY_EXTRA_TYPE cmCommandArgument_yyget_extra (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyextra; +} + +/** Get the current line number. + * @param yyscanner The scanner object. + */ +int cmCommandArgument_yyget_lineno (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if (! YY_CURRENT_BUFFER) + return 0; + + return yylineno; +} + +/** Get the current column number. + * @param yyscanner The scanner object. + */ +int cmCommandArgument_yyget_column (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if (! YY_CURRENT_BUFFER) + return 0; + + return yycolumn; +} + +/** Get the input stream. + * @param yyscanner The scanner object. + */ +FILE *cmCommandArgument_yyget_in (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyin; +} + +/** Get the output stream. + * @param yyscanner The scanner object. + */ +FILE *cmCommandArgument_yyget_out (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyout; +} + +/** Get the length of the current token. + * @param yyscanner The scanner object. + */ +int cmCommandArgument_yyget_leng (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyleng; +} + +/** Get the current token. + * @param yyscanner The scanner object. + */ + +char *cmCommandArgument_yyget_text (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yytext; +} + +/** Set the user-defined data. This data is never touched by the scanner. + * @param user_defined The data to be associated with this scanner. + * @param yyscanner The scanner object. + */ +void cmCommandArgument_yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyextra = user_defined ; +} + +/** Set the current line number. + * @param _line_number line number + * @param yyscanner The scanner object. + */ +void cmCommandArgument_yyset_lineno (int _line_number , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* lineno is only valid if an input buffer exists. */ + if (! YY_CURRENT_BUFFER ) + YY_FATAL_ERROR( "cmCommandArgument_yyset_lineno called with no buffer" ); + + yylineno = _line_number; +} + +/** Set the current column. + * @param _column_no column number + * @param yyscanner The scanner object. + */ +void cmCommandArgument_yyset_column (int _column_no , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* column is only valid if an input buffer exists. */ + if (! YY_CURRENT_BUFFER ) + YY_FATAL_ERROR( "cmCommandArgument_yyset_column called with no buffer" ); + + yycolumn = _column_no; +} + +/** Set the input stream. This does not discard the current + * input buffer. + * @param _in_str A readable stream. + * @param yyscanner The scanner object. + * @see cmCommandArgument_yy_switch_to_buffer + */ +void cmCommandArgument_yyset_in (FILE * _in_str , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyin = _in_str ; +} + +void cmCommandArgument_yyset_out (FILE * _out_str , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyout = _out_str ; +} + +int cmCommandArgument_yyget_debug (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yy_flex_debug; +} + +void cmCommandArgument_yyset_debug (int _bdebug , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yy_flex_debug = _bdebug ; +} + +/* Accessor methods for yylval and yylloc */ + +/* User-visible API */ + +/* cmCommandArgument_yylex_init is special because it creates the scanner itself, so it is + * the ONLY reentrant function that doesn't take the scanner as the last argument. + * That's why we explicitly handle the declaration, instead of using our macros. + */ + +int cmCommandArgument_yylex_init(yyscan_t* ptr_yy_globals) + +{ + if (ptr_yy_globals == NULL){ + errno = EINVAL; + return 1; + } + + *ptr_yy_globals = (yyscan_t) cmCommandArgument_yyalloc ( sizeof( struct yyguts_t ), NULL ); + + if (*ptr_yy_globals == NULL){ + errno = ENOMEM; + return 1; + } + + /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); + + return yy_init_globals ( *ptr_yy_globals ); +} + +/* cmCommandArgument_yylex_init_extra has the same functionality as cmCommandArgument_yylex_init, but follows the + * convention of taking the scanner as the last argument. Note however, that + * this is a *pointer* to a scanner, as it will be allocated by this call (and + * is the reason, too, why this function also must handle its own declaration). + * The user defined value in the first argument will be available to cmCommandArgument_yyalloc in + * the yyextra field. + */ + +int cmCommandArgument_yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals ) + +{ + struct yyguts_t dummy_yyguts; + + cmCommandArgument_yyset_extra (yy_user_defined, &dummy_yyguts); + + if (ptr_yy_globals == NULL){ + errno = EINVAL; + return 1; + } + + *ptr_yy_globals = (yyscan_t) cmCommandArgument_yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); + + if (*ptr_yy_globals == NULL){ + errno = ENOMEM; + return 1; + } + + /* By setting to 0xAA, we expose bugs in + yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); + + cmCommandArgument_yyset_extra (yy_user_defined, *ptr_yy_globals); + + return yy_init_globals ( *ptr_yy_globals ); +} + +static int yy_init_globals (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from cmCommandArgument_yylex_destroy(), so don't allocate here. + */ + + yyg->yy_buffer_stack = NULL; + yyg->yy_buffer_stack_top = 0; + yyg->yy_buffer_stack_max = 0; + yyg->yy_c_buf_p = NULL; + yyg->yy_init = 0; + yyg->yy_start = 0; + + yyg->yy_start_stack_ptr = 0; + yyg->yy_start_stack_depth = 0; + yyg->yy_start_stack = NULL; + +/* Defined in main.c */ +#ifdef YY_STDINIT + yyin = stdin; + yyout = stdout; +#else + yyin = NULL; + yyout = NULL; +#endif + + /* For future reference: Set errno on error, since we are called by + * cmCommandArgument_yylex_init() + */ + return 0; +} + +/* cmCommandArgument_yylex_destroy is for both reentrant and non-reentrant scanners. */ +int cmCommandArgument_yylex_destroy (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + cmCommandArgument_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner ); + YY_CURRENT_BUFFER_LVALUE = NULL; + cmCommandArgument_yypop_buffer_state(yyscanner); + } + + /* Destroy the stack itself. */ + cmCommandArgument_yyfree(yyg->yy_buffer_stack ,yyscanner); + yyg->yy_buffer_stack = NULL; + + /* Destroy the start condition stack. */ + cmCommandArgument_yyfree(yyg->yy_start_stack ,yyscanner ); + yyg->yy_start_stack = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * cmCommandArgument_yylex() is called, initialization will occur. */ + yy_init_globals( yyscanner); + + /* Destroy the main struct (reentrant only). */ + cmCommandArgument_yyfree ( yyscanner , yyscanner ); + yyscanner = NULL; + return 0; +} + +/* + * Internal utility routines. + */ + +#ifndef yytext_ptr +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + + int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; +} +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) +{ + int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; +} +#endif + +void *cmCommandArgument_yyalloc (yy_size_t size , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + return malloc(size); +} + +void *cmCommandArgument_yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return realloc(ptr, size); +} + +void cmCommandArgument_yyfree (void * ptr , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + free( (char *) ptr ); /* see cmCommandArgument_yyrealloc() for (char *) cast */ +} + +#define YYTABLES_NAME "yytables" + +#line 127 "cmCommandArgumentLexer.in.l" + + + +/*--------------------------------------------------------------------------*/ +void cmCommandArgument_SetupEscapes(yyscan_t yyscanner, bool noEscapes) +{ + /* Hack into the internal flex-generated scanner to set the state. */ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if(noEscapes) { + BEGIN(NOESCAPES); + } else { + BEGIN(ESCAPES); + } +} diff --git a/Source/LexerParser/cmCommandArgumentLexer.h b/Source/LexerParser/cmCommandArgumentLexer.h new file mode 100644 index 0000000..82e87b5 --- /dev/null +++ b/Source/LexerParser/cmCommandArgumentLexer.h @@ -0,0 +1,336 @@ +#ifndef cmCommandArgument_yyHEADER_H +#define cmCommandArgument_yyHEADER_H 1 +#define cmCommandArgument_yyIN_HEADER 1 + +#line 6 "cmCommandArgumentLexer.h" + +#line 8 "cmCommandArgumentLexer.h" + +#define FLEXINT_H 1 +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 6 +#define YY_FLEX_SUBMINOR_VERSION 1 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ +#include +#include +#include +#include + +/* end standard C headers. */ + +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have . Non-C99 systems may or may not. */ + +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 +#endif + +#include +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#endif /* ! C99 */ + +#endif /* ! FLEXINT_H */ + +/* TODO: this is always defined, so inline it */ +#define yyconst const + +#if defined(__GNUC__) && __GNUC__ >= 3 +#define yynoreturn __attribute__((__noreturn__)) +#else +#define yynoreturn +#endif + +/* An opaque pointer. */ +#ifndef YY_TYPEDEF_YY_SCANNER_T +#define YY_TYPEDEF_YY_SCANNER_T +typedef void* yyscan_t; +#endif + +/* For convenience, these vars (plus the bison vars far below) + are macros in the reentrant scanner. */ +#define yyin yyg->yyin_r +#define yyout yyg->yyout_r +#define yyextra yyg->yyextra_r +#define yyleng yyg->yyleng_r +#define yytext yyg->yytext_r +#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) +#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) +#define yy_flex_debug yyg->yy_flex_debug_r + +/* Size of default input buffer. */ +#ifndef YY_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k. + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. + * Ditto for the __ia64__ case accordingly. + */ +#define YY_BUF_SIZE 32768 +#else +#define YY_BUF_SIZE 16384 +#endif /* __ia64__ */ +#endif + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE +typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +void cmCommandArgument_yyrestart (FILE *input_file ,yyscan_t yyscanner ); +void cmCommandArgument_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); +YY_BUFFER_STATE cmCommandArgument_yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner ); +void cmCommandArgument_yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); +void cmCommandArgument_yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); +void cmCommandArgument_yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); +void cmCommandArgument_yypop_buffer_state (yyscan_t yyscanner ); + +YY_BUFFER_STATE cmCommandArgument_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); +YY_BUFFER_STATE cmCommandArgument_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); +YY_BUFFER_STATE cmCommandArgument_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); + +void *cmCommandArgument_yyalloc (yy_size_t ,yyscan_t yyscanner ); +void *cmCommandArgument_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); +void cmCommandArgument_yyfree (void * ,yyscan_t yyscanner ); + +/* Begin user sect3 */ + +#define cmCommandArgument_yywrap(yyscanner) (/*CONSTCOND*/1) +#define YY_SKIP_YYWRAP + +#define yytext_ptr yytext_r + +#ifdef YY_HEADER_EXPORT_START_CONDITIONS +#define INITIAL 0 +#define ESCAPES 1 +#define NOESCAPES 2 + +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +int cmCommandArgument_yylex_init (yyscan_t* scanner); + +int cmCommandArgument_yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); + +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int cmCommandArgument_yylex_destroy (yyscan_t yyscanner ); + +int cmCommandArgument_yyget_debug (yyscan_t yyscanner ); + +void cmCommandArgument_yyset_debug (int debug_flag ,yyscan_t yyscanner ); + +YY_EXTRA_TYPE cmCommandArgument_yyget_extra (yyscan_t yyscanner ); + +void cmCommandArgument_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); + +FILE *cmCommandArgument_yyget_in (yyscan_t yyscanner ); + +void cmCommandArgument_yyset_in (FILE * _in_str ,yyscan_t yyscanner ); + +FILE *cmCommandArgument_yyget_out (yyscan_t yyscanner ); + +void cmCommandArgument_yyset_out (FILE * _out_str ,yyscan_t yyscanner ); + + int cmCommandArgument_yyget_leng (yyscan_t yyscanner ); + +char *cmCommandArgument_yyget_text (yyscan_t yyscanner ); + +int cmCommandArgument_yyget_lineno (yyscan_t yyscanner ); + +void cmCommandArgument_yyset_lineno (int _line_number ,yyscan_t yyscanner ); + +int cmCommandArgument_yyget_column (yyscan_t yyscanner ); + +void cmCommandArgument_yyset_column (int _column_no ,yyscan_t yyscanner ); + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int cmCommandArgument_yywrap (yyscan_t yyscanner ); +#else +extern int cmCommandArgument_yywrap (yyscan_t yyscanner ); +#endif +#endif + +#ifndef yytext_ptr +static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); +#endif + +#ifndef YY_NO_INPUT + +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k */ +#define YY_READ_BUF_SIZE 16384 +#else +#define YY_READ_BUF_SIZE 8192 +#endif /* __ia64__ */ +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL_IS_OURS 1 + +extern int cmCommandArgument_yylex (yyscan_t yyscanner); + +#define YY_DECL int cmCommandArgument_yylex (yyscan_t yyscanner) +#endif /* !YY_DECL */ + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + +#undef YY_NEW_FILE +#undef YY_FLUSH_BUFFER +#undef yy_set_bol +#undef yy_new_buffer +#undef yy_set_interactive +#undef YY_DO_BEFORE_ACTION + +#ifdef YY_DECL_IS_OURS +#undef YY_DECL_IS_OURS +#undef YY_DECL +#endif + +#line 127 "cmCommandArgumentLexer.in.l" + + +#line 335 "cmCommandArgumentLexer.h" +#undef cmCommandArgument_yyIN_HEADER +#endif /* cmCommandArgument_yyHEADER_H */ diff --git a/Source/LexerParser/cmCommandArgumentLexer.in.l b/Source/LexerParser/cmCommandArgumentLexer.in.l new file mode 100644 index 0000000..e3a8094 --- /dev/null +++ b/Source/LexerParser/cmCommandArgumentLexer.in.l @@ -0,0 +1,139 @@ +%{ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +/* + +This file must be translated to C++ and modified to build everywhere. + +Run flex >= 2.6 like this: + + flex --nounistd -DFLEXINT_H --prefix=cmCommandArgument_yy --header-file=cmCommandArgumentLexer.h -ocmCommandArgumentLexer.cxx cmCommandArgumentLexer.in.l + +Modify cmCommandArgumentLexer.cxx: + - remove trailing whitespace: sed -i 's/\s*$//' cmCommandArgumentLexer.h cmCommandArgumentLexer.cxx + - remove blank lines at end of file + - #include "cmStandardLexer.h" at the top + - add cast in yy_scan_bytes for loop condition of _yybytes_len to size_t + +*/ + +/* IWYU pragma: no_forward_declare yyguts_t */ + +#include "cmCommandArgumentParserHelper.h" + +/* Replace the lexer input function. */ +#undef YY_INPUT +#define YY_INPUT(buf, result, max_size) \ + { result = yyextra->LexInput(buf, max_size); } + +/* Include the set of tokens from the parser. */ +#include "cmCommandArgumentParserTokens.h" + +/*--------------------------------------------------------------------------*/ +%} + +%option reentrant +%option noyywrap +%option nounput +%pointer +%s ESCAPES +%s NOESCAPES + +%% + +\$ENV\{ { + //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; + yyextra->AllocateParserType(yylvalp, yytext+1, strlen(yytext)-2); + return cal_ENVCURLY; +} + +\$[A-Za-z0-9/_.+-]+\{ { + //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; + yyextra->AllocateParserType(yylvalp, yytext+1, strlen(yytext)-2); + return cal_NCURLY; +} + +@[A-Za-z0-9/_.+-]+@ { + //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; + yyextra->AllocateParserType(yylvalp, yytext+1, strlen(yytext)-2); + return cal_ATNAME; +} + +"${" { + //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; + //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + yylvalp->str = yyextra->DCURLYVariable; + return cal_DCURLY; +} + +"}" { + //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; + //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + yylvalp->str = yyextra->RCURLYVariable; + return cal_RCURLY; +} + +"@" { + //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; + //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + yylvalp->str = yyextra->ATVariable; + return cal_AT; +} + +[A-Za-z0-9/_.+-]+ { + //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; + yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + return cal_NAME; +} + +\\. { + if ( !yyextra->HandleEscapeSymbol(yylvalp, *(yytext+1)) ) + { + return cal_ERROR; + } + return cal_SYMBOL; +} + +[^\${}\\@]+ { + //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; + yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + return cal_SYMBOL; +} + +"$" { + //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + yylvalp->str = yyextra->DOLLARVariable; + return cal_DOLLAR; +} + +"{" { + //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + yylvalp->str = yyextra->LCURLYVariable; + return cal_LCURLY; +} + +"\\" { + //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + yylvalp->str = yyextra->BSLASHVariable; + return cal_BSLASH; +} + +"\\" { + //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + yylvalp->str = yyextra->BSLASHVariable; + return cal_SYMBOL; +} + +%% + +/*--------------------------------------------------------------------------*/ +void cmCommandArgument_SetupEscapes(yyscan_t yyscanner, bool noEscapes) +{ + /* Hack into the internal flex-generated scanner to set the state. */ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if(noEscapes) { + BEGIN(NOESCAPES); + } else { + BEGIN(ESCAPES); + } +} diff --git a/Source/LexerParser/cmCommandArgumentParser.cxx b/Source/LexerParser/cmCommandArgumentParser.cxx new file mode 100644 index 0000000..aed0826 --- /dev/null +++ b/Source/LexerParser/cmCommandArgumentParser.cxx @@ -0,0 +1,1723 @@ +/* A Bison parser, made by GNU Bison 3.0.4. */ + +/* Bison implementation for Yacc-like parsers in C + + Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* C LALR(1) parser skeleton written by Richard Stallman, by + simplifying the original so-called "semantic" parser. */ + +/* All symbols defined below should begin with yy or YY, to avoid + infringing on user name space. This should be done even for local + variables, as they might otherwise be expanded by user macros. + There are some unavoidable exceptions within include files to + define necessary library symbols; they are noted "INFRINGES ON + USER NAME SPACE" below. */ + +/* Identify Bison output. */ +#define YYBISON 1 + +/* Bison version. */ +#define YYBISON_VERSION "3.0.4" + +/* Skeleton name. */ +#define YYSKELETON_NAME "yacc.c" + +/* Pure parsers. */ +#define YYPURE 1 + +/* Push parsers. */ +#define YYPUSH 0 + +/* Pull parsers. */ +#define YYPULL 1 + + +/* Substitute the variable and function names. */ +#define yyparse cmCommandArgument_yyparse +#define yylex cmCommandArgument_yylex +#define yyerror cmCommandArgument_yyerror +#define yydebug cmCommandArgument_yydebug +#define yynerrs cmCommandArgument_yynerrs + + +/* Copy the first part of user declarations. */ +#line 1 "cmCommandArgumentParser.y" /* yacc.c:339 */ + +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +/* + +This file must be translated to C and modified to build everywhere. + +Run bison like this: + + bison --yacc --name-prefix=cmCommandArgument_yy --defines=cmCommandArgumentParserTokens.h -ocmCommandArgumentParser.cxx cmCommandArgumentParser.y + +Modify cmCommandArgumentParser.cxx: + - "#if 0" out yyerrorlab block in range ["goto yyerrlab1", "yyerrlab1:"] + +*/ + +#include "cmConfigure.h" // IWYU pragma: keep + +#include + +#define yyGetParser (cmCommandArgument_yyget_extra(yyscanner)) + +/* Make sure malloc and free are available on QNX. */ +#ifdef __QNX__ +# include +#endif + +/* Make sure the parser uses standard memory allocation. The default + generated parser malloc/free declarations do not work on all + platforms. */ +#include +#define YYMALLOC malloc +#define YYFREE free + +/*-------------------------------------------------------------------------*/ +#include "cmCommandArgumentParserHelper.h" /* Interface to parser object. */ +#include "cmCommandArgumentLexer.h" /* Interface to lexer object. */ +#include "cmCommandArgumentParserTokens.h" /* Need YYSTYPE for YY_DECL. */ + +/* Forward declare the lexer entry point. */ +YY_DECL; + +/* Helper function to forward error callback from parser. */ +static void cmCommandArgument_yyerror(yyscan_t yyscanner, const char* message); + +/* Configure the parser to support large input. */ +#define YYMAXDEPTH 100000 +#define YYINITDEPTH 10000 + +/* Disable some warnings in the generated code. */ +#ifdef _MSC_VER +# pragma warning (disable: 4102) /* Unused goto label. */ +# pragma warning (disable: 4065) /* Switch statement contains default but no + case. */ +# pragma warning (disable: 4244) /* loss of precision */ +# pragma warning (disable: 4702) /* unreachable code */ +#endif + +#line 131 "cmCommandArgumentParser.cxx" /* yacc.c:339 */ + +# ifndef YY_NULLPTR +# if defined __cplusplus && 201103L <= __cplusplus +# define YY_NULLPTR nullptr +# else +# define YY_NULLPTR 0 +# endif +# endif + +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 1 +#endif + +/* In a future release of Bison, this section will be replaced + by #include "cmCommandArgumentParserTokens.h". */ +#ifndef YY_CMCOMMANDARGUMENT_YY_CMCOMMANDARGUMENTPARSERTOKENS_H_INCLUDED +# define YY_CMCOMMANDARGUMENT_YY_CMCOMMANDARGUMENTPARSERTOKENS_H_INCLUDED +/* Debug traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif +#if YYDEBUG +extern int cmCommandArgument_yydebug; +#endif + +/* Token type. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + enum yytokentype + { + cal_ENVCURLY = 258, + cal_NCURLY = 259, + cal_DCURLY = 260, + cal_DOLLAR = 261, + cal_LCURLY = 262, + cal_RCURLY = 263, + cal_NAME = 264, + cal_BSLASH = 265, + cal_SYMBOL = 266, + cal_AT = 267, + cal_ERROR = 268, + cal_ATNAME = 269 + }; +#endif +/* Tokens. */ +#define cal_ENVCURLY 258 +#define cal_NCURLY 259 +#define cal_DCURLY 260 +#define cal_DOLLAR 261 +#define cal_LCURLY 262 +#define cal_RCURLY 263 +#define cal_NAME 264 +#define cal_BSLASH 265 +#define cal_SYMBOL 266 +#define cal_AT 267 +#define cal_ERROR 268 +#define cal_ATNAME 269 + +/* Value type. */ + + + +int cmCommandArgument_yyparse (yyscan_t yyscanner); + +#endif /* !YY_CMCOMMANDARGUMENT_YY_CMCOMMANDARGUMENTPARSERTOKENS_H_INCLUDED */ + +/* Copy the second part of user declarations. */ + +#line 204 "cmCommandArgumentParser.cxx" /* yacc.c:358 */ + +#ifdef short +# undef short +#endif + +#ifdef YYTYPE_UINT8 +typedef YYTYPE_UINT8 yytype_uint8; +#else +typedef unsigned char yytype_uint8; +#endif + +#ifdef YYTYPE_INT8 +typedef YYTYPE_INT8 yytype_int8; +#else +typedef signed char yytype_int8; +#endif + +#ifdef YYTYPE_UINT16 +typedef YYTYPE_UINT16 yytype_uint16; +#else +typedef unsigned short int yytype_uint16; +#endif + +#ifdef YYTYPE_INT16 +typedef YYTYPE_INT16 yytype_int16; +#else +typedef short int yytype_int16; +#endif + +#ifndef YYSIZE_T +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif ! defined YYSIZE_T +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned int +# endif +#endif + +#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) + +#ifndef YY_ +# if defined YYENABLE_NLS && YYENABLE_NLS +# if ENABLE_NLS +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_(Msgid) dgettext ("bison-runtime", Msgid) +# endif +# endif +# ifndef YY_ +# define YY_(Msgid) Msgid +# endif +#endif + +#ifndef YY_ATTRIBUTE +# if (defined __GNUC__ \ + && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ + || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C +# define YY_ATTRIBUTE(Spec) __attribute__(Spec) +# else +# define YY_ATTRIBUTE(Spec) /* empty */ +# endif +#endif + +#ifndef YY_ATTRIBUTE_PURE +# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) +#endif + +#ifndef YY_ATTRIBUTE_UNUSED +# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) +#endif + +#if !defined _Noreturn \ + && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) +# if defined _MSC_VER && 1200 <= _MSC_VER +# define _Noreturn __declspec (noreturn) +# else +# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) +# endif +#endif + +/* Suppress unused-variable warnings by "using" E. */ +#if ! defined lint || defined __GNUC__ +# define YYUSE(E) ((void) (E)) +#else +# define YYUSE(E) /* empty */ +#endif + +#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ +/* Suppress an incorrect diagnostic about yylval being uninitialized. */ +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") +#else +# define YY_INITIAL_VALUE(Value) Value +#endif +#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END +#endif +#ifndef YY_INITIAL_VALUE +# define YY_INITIAL_VALUE(Value) /* Nothing. */ +#endif + + +#if ! defined yyoverflow || YYERROR_VERBOSE + +/* The parser invokes alloca or malloc; define the necessary symbols. */ + +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# elif defined __BUILTIN_VA_ARG_INCR +# include /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca +# else +# define YYSTACK_ALLOC alloca +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS +# include /* INFRINGES ON USER NAME SPACE */ + /* Use EXIT_SUCCESS as a witness for stdlib.h. */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's 'empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +# endif +# else +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined EXIT_SUCCESS \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined EXIT_SUCCESS +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined EXIT_SUCCESS +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# endif +#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ + + +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + +/* A type that is properly aligned for any stack member. */ +union yyalloc +{ + yytype_int16 yyss_alloc; + YYSTYPE yyvs_alloc; +}; + +/* The size of the maximum gap between one aligned stack and the next. */ +# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) + +/* The size of an array large to enough to hold all stacks, each with + N elements. */ +# define YYSTACK_BYTES(N) \ + ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + + YYSTACK_GAP_MAXIMUM) + +# define YYCOPY_NEEDED 1 + +/* Relocate STACK from its old location to the new one. The + local variables YYSIZE and YYSTACKSIZE give the old and new number of + elements in the stack, and YYPTR gives the new location of the + stack. Advance YYPTR to a properly aligned location for the next + stack. */ +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (0) + +#endif + +#if defined YYCOPY_NEEDED && YYCOPY_NEEDED +/* Copy COUNT objects from SRC to DST. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(Dst, Src, Count) \ + __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) +# else +# define YYCOPY(Dst, Src, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (Dst)[yyi] = (Src)[yyi]; \ + } \ + while (0) +# endif +# endif +#endif /* !YYCOPY_NEEDED */ + +/* YYFINAL -- State number of the termination state. */ +#define YYFINAL 25 +/* YYLAST -- Last index in YYTABLE. */ +#define YYLAST 40 + +/* YYNTOKENS -- Number of terminals. */ +#define YYNTOKENS 15 +/* YYNNTS -- Number of nonterminals. */ +#define YYNNTS 10 +/* YYNRULES -- Number of rules. */ +#define YYNRULES 24 +/* YYNSTATES -- Number of states. */ +#define YYNSTATES 33 + +/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned + by yylex, with out-of-bounds checking. */ +#define YYUNDEFTOK 2 +#define YYMAXUTOK 269 + +#define YYTRANSLATE(YYX) \ + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) + +/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM + as returned by yylex, without out-of-bounds checking. */ +static const yytype_uint8 yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 +}; + +#if YYDEBUG + /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ +static const yytype_uint8 yyrline[] = +{ + 0, 96, 96, 102, 105, 110, 113, 118, 121, 126, + 129, 132, 135, 138, 141, 146, 149, 152, 155, 160, + 163, 168, 171, 176, 179 +}; +#endif + +#if YYDEBUG || YYERROR_VERBOSE || 1 +/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ +static const char *const yytname[] = +{ + "$end", "error", "$undefined", "cal_ENVCURLY", "cal_NCURLY", + "cal_DCURLY", "\"$\"", "\"{\"", "\"}\"", "cal_NAME", "\"\\\\\"", + "cal_SYMBOL", "\"@\"", "cal_ERROR", "cal_ATNAME", "$accept", "Start", + "GoalWithOptionalBackSlash", "Goal", "String", "OuterText", "Variable", + "EnvVarName", "MultipleIds", "ID", YY_NULLPTR +}; +#endif + +# ifdef YYPRINT +/* YYTOKNUM[NUM] -- (External) token number corresponding to the + (internal) symbol number NUM (which must be that of a token). */ +static const yytype_uint16 yytoknum[] = +{ + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269 +}; +# endif + +#define YYPACT_NINF -3 + +#define yypact_value_is_default(Yystate) \ + (!!((Yystate) == (-3))) + +#define YYTABLE_NINF -1 + +#define yytable_value_is_error(Yytable_value) \ + 0 + + /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +static const yytype_int8 yypact[] = +{ + 0, 14, 26, 26, -3, -3, -3, -3, -3, -3, + -3, 10, -3, 3, 0, -3, -3, -3, 14, -3, + 7, -3, 26, 13, 16, -3, -3, -3, -3, -3, + -3, -3, -3 +}; + + /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE does not specify something else to do. Zero + means the default is an error. */ +static const yytype_uint8 yydefact[] = +{ + 5, 21, 21, 21, 11, 12, 13, 9, 14, 10, + 18, 0, 2, 3, 5, 7, 8, 23, 21, 24, + 0, 19, 21, 0, 0, 1, 4, 6, 20, 15, + 22, 16, 17 +}; + + /* YYPGOTO[NTERM-NUM]. */ +static const yytype_int8 yypgoto[] = +{ + -3, -3, -3, 8, -3, -3, 2, 9, -2, -3 +}; + + /* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int8 yydefgoto[] = +{ + -1, 11, 12, 13, 14, 15, 19, 20, 21, 22 +}; + + /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule whose + number is the opposite. If YYTABLE_NINF, syntax error. */ +static const yytype_uint8 yytable[] = +{ + 23, 24, 16, 1, 2, 3, 4, 5, 6, 7, + 25, 8, 9, 26, 10, 29, 16, 1, 2, 3, + 30, 31, 27, 17, 32, 18, 0, 28, 10, 1, + 2, 3, 0, 0, 0, 17, 0, 0, 0, 0, + 10 +}; + +static const yytype_int8 yycheck[] = +{ + 2, 3, 0, 3, 4, 5, 6, 7, 8, 9, + 0, 11, 12, 10, 14, 8, 14, 3, 4, 5, + 22, 8, 14, 9, 8, 11, -1, 18, 14, 3, + 4, 5, -1, -1, -1, 9, -1, -1, -1, -1, + 14 +}; + + /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ +static const yytype_uint8 yystos[] = +{ + 0, 3, 4, 5, 6, 7, 8, 9, 11, 12, + 14, 16, 17, 18, 19, 20, 21, 9, 11, 21, + 22, 23, 24, 23, 23, 0, 10, 18, 22, 8, + 23, 8, 8 +}; + + /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint8 yyr1[] = +{ + 0, 15, 16, 17, 17, 18, 18, 19, 19, 20, + 20, 20, 20, 20, 20, 21, 21, 21, 21, 22, + 22, 23, 23, 24, 24 +}; + + /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = +{ + 0, 2, 1, 1, 2, 0, 2, 1, 1, 1, + 1, 1, 1, 1, 1, 3, 3, 3, 1, 1, + 2, 0, 2, 1, 1 +}; + + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab + + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } \ + else \ + { \ + yyerror (yyscanner, YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ +while (0) + +/* Error token number */ +#define YYTERROR 1 +#define YYERRCODE 256 + + + +/* Enable debugging if requested. */ +#if YYDEBUG + +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) + +/* This macro is provided for backward compatibility. */ +#ifndef YY_LOCATION_PRINT +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +#endif + + +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value, yyscanner); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) + + +/*----------------------------------------. +| Print this symbol's value on YYOUTPUT. | +`----------------------------------------*/ + +static void +yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, yyscan_t yyscanner) +{ + FILE *yyo = yyoutput; + YYUSE (yyo); + YYUSE (yyscanner); + if (!yyvaluep) + return; +# ifdef YYPRINT + if (yytype < YYNTOKENS) + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# endif + YYUSE (yytype); +} + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +static void +yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, yyscan_t yyscanner) +{ + YYFPRINTF (yyoutput, "%s %s (", + yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); + + yy_symbol_value_print (yyoutput, yytype, yyvaluep, yyscanner); + YYFPRINTF (yyoutput, ")"); +} + +/*------------------------------------------------------------------. +| yy_stack_print -- Print the state stack from its BOTTOM up to its | +| TOP (included). | +`------------------------------------------------------------------*/ + +static void +yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) +{ + YYFPRINTF (stderr, "Stack now"); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } + YYFPRINTF (stderr, "\n"); +} + +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (0) + + +/*------------------------------------------------. +| Report that the YYRULE is going to be reduced. | +`------------------------------------------------*/ + +static void +yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule, yyscan_t yyscanner) +{ + unsigned long int yylno = yyrline[yyrule]; + int yynrhs = yyr2[yyrule]; + int yyi; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", + yyrule - 1, yylno); + /* The symbols being reduced. */ + for (yyi = 0; yyi < yynrhs; yyi++) + { + YYFPRINTF (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, + yystos[yyssp[yyi + 1 - yynrhs]], + &(yyvsp[(yyi + 1) - (yynrhs)]) + , yyscanner); + YYFPRINTF (stderr, "\n"); + } +} + +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyssp, yyvsp, Rule, yyscanner); \ +} while (0) + +/* Nonzero means print parse trace. It is left uninitialized so that + multiple parsers can coexist. */ +int yydebug; +#else /* !YYDEBUG */ +# define YYDPRINTF(Args) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) +#endif /* !YYDEBUG */ + + +/* YYINITDEPTH -- initial size of the parser's stacks. */ +#ifndef YYINITDEPTH +# define YYINITDEPTH 200 +#endif + +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only + if the built-in stack extension method is used). + + Do not make this value too large; the results are undefined if + YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) + evaluated with infinite-precision integer arithmetic. */ + +#ifndef YYMAXDEPTH +# define YYMAXDEPTH 10000 +#endif + + +#if YYERROR_VERBOSE + +# ifndef yystrlen +# if defined __GLIBC__ && defined _STRING_H +# define yystrlen strlen +# else +/* Return the length of YYSTR. */ +static YYSIZE_T +yystrlen (const char *yystr) +{ + YYSIZE_T yylen; + for (yylen = 0; yystr[yylen]; yylen++) + continue; + return yylen; +} +# endif +# endif + +# ifndef yystpcpy +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# define yystpcpy stpcpy +# else +/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in + YYDEST. */ +static char * +yystpcpy (char *yydest, const char *yysrc) +{ + char *yyd = yydest; + const char *yys = yysrc; + + while ((*yyd++ = *yys++) != '\0') + continue; + + return yyd - 1; +} +# endif +# endif + +# ifndef yytnamerr +/* Copy to YYRES the contents of YYSTR after stripping away unnecessary + quotes and backslashes, so that it's suitable for yyerror. The + heuristic is that double-quoting is unnecessary unless the string + contains an apostrophe, a comma, or backslash (other than + backslash-backslash). YYSTR is taken from yytname. If YYRES is + null, do not copy; instead, return the length of what the result + would have been. */ +static YYSIZE_T +yytnamerr (char *yyres, const char *yystr) +{ + if (*yystr == '"') + { + YYSIZE_T yyn = 0; + char const *yyp = yystr; + + for (;;) + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } + + if (! yyres) + return yystrlen (yystr); + + return yystpcpy (yyres, yystr) - yyres; +} +# endif + +/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message + about the unexpected token YYTOKEN for the state stack whose top is + YYSSP. + + Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is + not large enough to hold the message. In that case, also set + *YYMSG_ALLOC to the required number of bytes. Return 2 if the + required number of bytes is too large to store. */ +static int +yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, + yytype_int16 *yyssp, int yytoken) +{ + YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); + YYSIZE_T yysize = yysize0; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + /* Internationalized format string. */ + const char *yyformat = YY_NULLPTR; + /* Arguments of yyformat. */ + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + /* Number of reported tokens (one for the "unexpected", one per + "expected"). */ + int yycount = 0; + + /* There are many possibilities here to consider: + - If this state is a consistent state with a default action, then + the only way this function was invoked is if the default action + is an error action. In that case, don't check for expected + tokens because there are none. + - The only way there can be no lookahead present (in yychar) is if + this state is a consistent state with a default action. Thus, + detecting the absence of a lookahead is sufficient to determine + that there is no unexpected or expected token to report. In that + case, just report a simple "syntax error". + - Don't assume there isn't a lookahead just because this state is a + consistent state with a default action. There might have been a + previous inconsistent state, consistent state with a non-default + action, or user semantic action that manipulated yychar. + - Of course, the expected token list depends on states to have + correct lookahead information, and it depends on the parser not + to perform extra reductions after fetching a lookahead from the + scanner and before detecting a syntax error. Thus, state merging + (from LALR or IELR) and default reductions corrupt the expected + token list. However, the list is correct for canonical LR with + one exception: it will still contain any token that will not be + accepted due to an error action in a later state. + */ + if (yytoken != YYEMPTY) + { + int yyn = yypact[*yyssp]; + yyarg[yycount++] = yytname[yytoken]; + if (!yypact_value_is_default (yyn)) + { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR + && !yytable_value_is_error (yytable[yyx + yyn])) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + break; + } + yyarg[yycount++] = yytname[yyx]; + { + YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); + if (! (yysize <= yysize1 + && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } + } + } + } + + switch (yycount) + { +# define YYCASE_(N, S) \ + case N: \ + yyformat = S; \ + break + YYCASE_(0, YY_("syntax error")); + YYCASE_(1, YY_("syntax error, unexpected %s")); + YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); + YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); + YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); + YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); +# undef YYCASE_ + } + + { + YYSIZE_T yysize1 = yysize + yystrlen (yyformat); + if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } + + if (*yymsg_alloc < yysize) + { + *yymsg_alloc = 2 * yysize; + if (! (yysize <= *yymsg_alloc + && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) + *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; + return 1; + } + + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + { + char *yyp = *yymsg; + int yyi = 0; + while ((*yyp = *yyformat) != '\0') + if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyformat += 2; + } + else + { + yyp++; + yyformat++; + } + } + return 0; +} +#endif /* YYERROR_VERBOSE */ + +/*-----------------------------------------------. +| Release the memory associated to this symbol. | +`-----------------------------------------------*/ + +static void +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, yyscan_t yyscanner) +{ + YYUSE (yyvaluep); + YYUSE (yyscanner); + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + YYUSE (yytype); + YY_IGNORE_MAYBE_UNINITIALIZED_END +} + + + + +/*----------. +| yyparse. | +`----------*/ + +int +yyparse (yyscan_t yyscanner) +{ +/* The lookahead symbol. */ +int yychar; + + +/* The semantic value of the lookahead symbol. */ +/* Default value used for initialization, for pacifying older GCCs + or non-GCC compilers. */ +YY_INITIAL_VALUE (static YYSTYPE yyval_default;) +YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); + + /* Number of syntax errors so far. */ + int yynerrs; + + int yystate; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + + /* The stacks and their tools: + 'yyss': related to states. + 'yyvs': related to semantic values. + + Refer to the stacks through separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss; + yytype_int16 *yyssp; + + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs; + YYSTYPE *yyvsp; + + YYSIZE_T yystacksize; + + int yyn; + int yyresult; + /* Lookahead token as an internal (translated) token number. */ + int yytoken = 0; + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; + +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) + + /* The number of symbols on the RHS of the reduced rule. + Keep to zero when no symbol should be popped. */ + int yylen = 0; + + yyssp = yyss = yyssa; + yyvsp = yyvs = yyvsa; + yystacksize = YYINITDEPTH; + + YYDPRINTF ((stderr, "Starting parse\n")); + + yystate = 0; + yyerrstatus = 0; + yynerrs = 0; + yychar = YYEMPTY; /* Cause a token to be read. */ + goto yysetstate; + +/*------------------------------------------------------------. +| yynewstate -- Push a new state, which is found in yystate. | +`------------------------------------------------------------*/ + yynewstate: + /* In all cases, when you get here, the value and location stacks + have just been pushed. So pushing a state here evens the stacks. */ + yyssp++; + + yysetstate: + *yyssp = yystate; + + if (yyss + yystacksize - 1 <= yyssp) + { + /* Get the current used size of the three stacks, in elements. */ + YYSIZE_T yysize = yyssp - yyss + 1; + +#ifdef yyoverflow + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + &yystacksize); + + yyss = yyss1; + yyvs = yyvs1; + } +#else /* no yyoverflow */ +# ifndef YYSTACK_RELOCATE + goto yyexhaustedlab; +# else + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) + goto yyexhaustedlab; + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif +#endif /* no yyoverflow */ + + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + + YYDPRINTF ((stderr, "Stack size increased to %lu\n", + (unsigned long int) yystacksize)); + + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } + + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + + if (yystate == YYFINAL) + YYACCEPT; + + goto yybackup; + +/*-----------. +| yybackup. | +`-----------*/ +yybackup: + + /* Do appropriate processing given the current state. Read a + lookahead token if we need one and don't already have one. */ + + /* First try to decide what to do without reference to lookahead token. */ + yyn = yypact[yystate]; + if (yypact_value_is_default (yyn)) + goto yydefault; + + /* Not known => get a lookahead token if don't already have one. */ + + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + if (yychar == YYEMPTY) + { + YYDPRINTF ((stderr, "Reading a token: ")); + yychar = yylex (&yylval, yyscanner); + } + + if (yychar <= YYEOF) + { + yychar = yytoken = YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); + } + else + { + yytoken = YYTRANSLATE (yychar); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); + } + + /* If the proper action on seeing token YYTOKEN is to reduce or to + detect an error, take that action. */ + yyn += yytoken; + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) + goto yydefault; + yyn = yytable[yyn]; + if (yyn <= 0) + { + if (yytable_value_is_error (yyn)) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } + + /* Count tokens shifted since error; after three, turn off error + status. */ + if (yyerrstatus) + yyerrstatus--; + + /* Shift the lookahead token. */ + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + + /* Discard the shifted token. */ + yychar = YYEMPTY; + + yystate = yyn; + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END + + goto yynewstate; + + +/*-----------------------------------------------------------. +| yydefault -- do the default action for the current state. | +`-----------------------------------------------------------*/ +yydefault: + yyn = yydefact[yystate]; + if (yyn == 0) + goto yyerrlab; + goto yyreduce; + + +/*-----------------------------. +| yyreduce -- Do a reduction. | +`-----------------------------*/ +yyreduce: + /* yyn is the number of a rule to reduce with. */ + yylen = yyr2[yyn]; + + /* If YYLEN is nonzero, implement the default value of the action: + '$$ = $1'. + + Otherwise, the following line sets YYVAL to garbage. + This behavior is undocumented and Bison + users should not rely upon it. Assigning to YYVAL + unconditionally makes the parser a bit smaller, and it avoids a + GCC warning that YYVAL may be used uninitialized. */ + yyval = yyvsp[1-yylen]; + + + YY_REDUCE_PRINT (yyn); + switch (yyn) + { + case 2: +#line 96 "cmCommandArgumentParser.y" /* yacc.c:1646 */ + { + (yyval.str) = 0; + yyGetParser->SetResult((yyvsp[0].str)); + } +#line 1306 "cmCommandArgumentParser.cxx" /* yacc.c:1646 */ + break; + + case 3: +#line 102 "cmCommandArgumentParser.y" /* yacc.c:1646 */ + { + (yyval.str) = (yyvsp[0].str); + } +#line 1314 "cmCommandArgumentParser.cxx" /* yacc.c:1646 */ + break; + + case 4: +#line 105 "cmCommandArgumentParser.y" /* yacc.c:1646 */ + { + (yyval.str) = yyGetParser->CombineUnions((yyvsp[-1].str), (yyvsp[0].str)); + } +#line 1322 "cmCommandArgumentParser.cxx" /* yacc.c:1646 */ + break; + + case 5: +#line 110 "cmCommandArgumentParser.y" /* yacc.c:1646 */ + { + (yyval.str) = 0; + } +#line 1330 "cmCommandArgumentParser.cxx" /* yacc.c:1646 */ + break; + + case 6: +#line 113 "cmCommandArgumentParser.y" /* yacc.c:1646 */ + { + (yyval.str) = yyGetParser->CombineUnions((yyvsp[-1].str), (yyvsp[0].str)); + } +#line 1338 "cmCommandArgumentParser.cxx" /* yacc.c:1646 */ + break; + + case 7: +#line 118 "cmCommandArgumentParser.y" /* yacc.c:1646 */ + { + (yyval.str) = (yyvsp[0].str); + } +#line 1346 "cmCommandArgumentParser.cxx" /* yacc.c:1646 */ + break; + + case 8: +#line 121 "cmCommandArgumentParser.y" /* yacc.c:1646 */ + { + (yyval.str) = (yyvsp[0].str); + } +#line 1354 "cmCommandArgumentParser.cxx" /* yacc.c:1646 */ + break; + + case 9: +#line 126 "cmCommandArgumentParser.y" /* yacc.c:1646 */ + { + (yyval.str) = (yyvsp[0].str); + } +#line 1362 "cmCommandArgumentParser.cxx" /* yacc.c:1646 */ + break; + + case 10: +#line 129 "cmCommandArgumentParser.y" /* yacc.c:1646 */ + { + (yyval.str) = (yyvsp[0].str); + } +#line 1370 "cmCommandArgumentParser.cxx" /* yacc.c:1646 */ + break; + + case 11: +#line 132 "cmCommandArgumentParser.y" /* yacc.c:1646 */ + { + (yyval.str) = (yyvsp[0].str); + } +#line 1378 "cmCommandArgumentParser.cxx" /* yacc.c:1646 */ + break; + + case 12: +#line 135 "cmCommandArgumentParser.y" /* yacc.c:1646 */ + { + (yyval.str) = (yyvsp[0].str); + } +#line 1386 "cmCommandArgumentParser.cxx" /* yacc.c:1646 */ + break; + + case 13: +#line 138 "cmCommandArgumentParser.y" /* yacc.c:1646 */ + { + (yyval.str) = (yyvsp[0].str); + } +#line 1394 "cmCommandArgumentParser.cxx" /* yacc.c:1646 */ + break; + + case 14: +#line 141 "cmCommandArgumentParser.y" /* yacc.c:1646 */ + { + (yyval.str) = (yyvsp[0].str); + } +#line 1402 "cmCommandArgumentParser.cxx" /* yacc.c:1646 */ + break; + + case 15: +#line 146 "cmCommandArgumentParser.y" /* yacc.c:1646 */ + { + (yyval.str) = yyGetParser->ExpandSpecialVariable((yyvsp[-2].str), (yyvsp[-1].str)); + } +#line 1410 "cmCommandArgumentParser.cxx" /* yacc.c:1646 */ + break; + + case 16: +#line 149 "cmCommandArgumentParser.y" /* yacc.c:1646 */ + { + (yyval.str) = yyGetParser->ExpandSpecialVariable((yyvsp[-2].str), (yyvsp[-1].str)); + } +#line 1418 "cmCommandArgumentParser.cxx" /* yacc.c:1646 */ + break; + + case 17: +#line 152 "cmCommandArgumentParser.y" /* yacc.c:1646 */ + { + (yyval.str) = yyGetParser->ExpandVariable((yyvsp[-1].str)); + } +#line 1426 "cmCommandArgumentParser.cxx" /* yacc.c:1646 */ + break; + + case 18: +#line 155 "cmCommandArgumentParser.y" /* yacc.c:1646 */ + { + (yyval.str) = yyGetParser->ExpandVariableForAt((yyvsp[0].str)); + } +#line 1434 "cmCommandArgumentParser.cxx" /* yacc.c:1646 */ + break; + + case 19: +#line 160 "cmCommandArgumentParser.y" /* yacc.c:1646 */ + { + (yyval.str) = (yyvsp[0].str); + } +#line 1442 "cmCommandArgumentParser.cxx" /* yacc.c:1646 */ + break; + + case 20: +#line 163 "cmCommandArgumentParser.y" /* yacc.c:1646 */ + { + (yyval.str) = (yyvsp[-1].str); + } +#line 1450 "cmCommandArgumentParser.cxx" /* yacc.c:1646 */ + break; + + case 21: +#line 168 "cmCommandArgumentParser.y" /* yacc.c:1646 */ + { + (yyval.str) = 0; + } +#line 1458 "cmCommandArgumentParser.cxx" /* yacc.c:1646 */ + break; + + case 22: +#line 171 "cmCommandArgumentParser.y" /* yacc.c:1646 */ + { + (yyval.str) = yyGetParser->CombineUnions((yyvsp[-1].str), (yyvsp[0].str)); + } +#line 1466 "cmCommandArgumentParser.cxx" /* yacc.c:1646 */ + break; + + case 23: +#line 176 "cmCommandArgumentParser.y" /* yacc.c:1646 */ + { + (yyval.str) = (yyvsp[0].str); + } +#line 1474 "cmCommandArgumentParser.cxx" /* yacc.c:1646 */ + break; + + case 24: +#line 179 "cmCommandArgumentParser.y" /* yacc.c:1646 */ + { + (yyval.str) = (yyvsp[0].str); + } +#line 1482 "cmCommandArgumentParser.cxx" /* yacc.c:1646 */ + break; + + +#line 1486 "cmCommandArgumentParser.cxx" /* yacc.c:1646 */ + default: break; + } + /* User semantic actions sometimes alter yychar, and that requires + that yytoken be updated with the new translation. We take the + approach of translating immediately before every use of yytoken. + One alternative is translating here after every semantic action, + but that translation would be missed if the semantic action invokes + YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or + if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an + incorrect destructor might then be invoked immediately. In the + case of YYERROR or YYBACKUP, subsequent parser actions might lead + to an incorrect destructor call or verbose syntax error message + before the lookahead is translated. */ + YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); + + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + + *++yyvsp = yyval; + + /* Now 'shift' the result of the reduction. Determine what state + that goes to, based on the state we popped back to and the rule + number reduced by. */ + + yyn = yyr1[yyn]; + + yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; + if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yytable[yystate]; + else + yystate = yydefgoto[yyn - YYNTOKENS]; + + goto yynewstate; + + +/*--------------------------------------. +| yyerrlab -- here on detecting error. | +`--------------------------------------*/ +yyerrlab: + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); + + /* If not already recovering from an error, report this error. */ + if (!yyerrstatus) + { + ++yynerrs; +#if ! YYERROR_VERBOSE + yyerror (yyscanner, YY_("syntax error")); +#else +# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ + yyssp, yytoken) + { + char const *yymsgp = YY_("syntax error"); + int yysyntax_error_status; + yysyntax_error_status = YYSYNTAX_ERROR; + if (yysyntax_error_status == 0) + yymsgp = yymsg; + else if (yysyntax_error_status == 1) + { + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); + if (!yymsg) + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = 2; + } + else + { + yysyntax_error_status = YYSYNTAX_ERROR; + yymsgp = yymsg; + } + } + yyerror (yyscanner, yymsgp); + if (yysyntax_error_status == 2) + goto yyexhaustedlab; + } +# undef YYSYNTAX_ERROR +#endif + } + + + + if (yyerrstatus == 3) + { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ + + if (yychar <= YYEOF) + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } + else + { + yydestruct ("Error: discarding", + yytoken, &yylval, yyscanner); + yychar = YYEMPTY; + } + } + +#if 0 + /* Else will try to reuse lookahead token after shifting the error + token. */ + goto yyerrlab1; + + +/*---------------------------------------------------. +| yyerrorlab -- error raised explicitly by YYERROR. | +`---------------------------------------------------*/ +yyerrorlab: + + /* Pacify compilers like GCC when the user code never invokes + YYERROR and the label yyerrorlab therefore never appears in user + code. */ + if (/*CONSTCOND*/ 0) + goto yyerrorlab; + + /* Do not reclaim the symbols of the rule whose action triggered + this YYERROR. */ + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + yystate = *yyssp; + goto yyerrlab1; + + +/*-------------------------------------------------------------. +| yyerrlab1 -- common code for both syntax error and YYERROR. | +`-------------------------------------------------------------*/ +yyerrlab1: +#endif + yyerrstatus = 3; /* Each real token shifted decrements this. */ + + for (;;) + { + yyn = yypact[yystate]; + if (!yypact_value_is_default (yyn)) + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } + + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; + + + yydestruct ("Error: popping", + yystos[yystate], yyvsp, yyscanner); + YYPOPSTACK (1); + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); + } + + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END + + + /* Shift the error token. */ + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); + + yystate = yyn; + goto yynewstate; + + +/*-------------------------------------. +| yyacceptlab -- YYACCEPT comes here. | +`-------------------------------------*/ +yyacceptlab: + yyresult = 0; + goto yyreturn; + +/*-----------------------------------. +| yyabortlab -- YYABORT comes here. | +`-----------------------------------*/ +yyabortlab: + yyresult = 1; + goto yyreturn; + +#if !defined yyoverflow || YYERROR_VERBOSE +/*-------------------------------------------------. +| yyexhaustedlab -- memory exhaustion comes here. | +`-------------------------------------------------*/ +yyexhaustedlab: + yyerror (yyscanner, YY_("memory exhausted")); + yyresult = 2; + /* Fall through. */ +#endif + +yyreturn: + if (yychar != YYEMPTY) + { + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = YYTRANSLATE (yychar); + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval, yyscanner); + } + /* Do not reclaim the symbols of the rule whose action triggered + this YYABORT or YYACCEPT. */ + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + yystos[*yyssp], yyvsp, yyscanner); + YYPOPSTACK (1); + } +#ifndef yyoverflow + if (yyss != yyssa) + YYSTACK_FREE (yyss); +#endif +#if YYERROR_VERBOSE + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); +#endif + return yyresult; +} +#line 184 "cmCommandArgumentParser.y" /* yacc.c:1906 */ + +/* End of grammar */ + +/*--------------------------------------------------------------------------*/ +void cmCommandArgument_yyerror(yyscan_t yyscanner, const char* message) +{ + yyGetParser->Error(message); +} diff --git a/Source/LexerParser/cmCommandArgumentParser.y b/Source/LexerParser/cmCommandArgumentParser.y new file mode 100644 index 0000000..55a88df --- /dev/null +++ b/Source/LexerParser/cmCommandArgumentParser.y @@ -0,0 +1,191 @@ +%{ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +/* + +This file must be translated to C and modified to build everywhere. + +Run bison like this: + + bison --yacc --name-prefix=cmCommandArgument_yy --defines=cmCommandArgumentParserTokens.h -ocmCommandArgumentParser.cxx cmCommandArgumentParser.y + +Modify cmCommandArgumentParser.cxx: + - "#if 0" out yyerrorlab block in range ["goto yyerrlab1", "yyerrlab1:"] + +*/ + +#include "cmConfigure.h" // IWYU pragma: keep + +#include + +#define yyGetParser (cmCommandArgument_yyget_extra(yyscanner)) + +/* Make sure malloc and free are available on QNX. */ +#ifdef __QNX__ +# include +#endif + +/* Make sure the parser uses standard memory allocation. The default + generated parser malloc/free declarations do not work on all + platforms. */ +#include +#define YYMALLOC malloc +#define YYFREE free + +/*-------------------------------------------------------------------------*/ +#include "cmCommandArgumentParserHelper.h" /* Interface to parser object. */ +#include "cmCommandArgumentLexer.h" /* Interface to lexer object. */ +#include "cmCommandArgumentParserTokens.h" /* Need YYSTYPE for YY_DECL. */ + +/* Forward declare the lexer entry point. */ +YY_DECL; + +/* Helper function to forward error callback from parser. */ +static void cmCommandArgument_yyerror(yyscan_t yyscanner, const char* message); + +/* Configure the parser to support large input. */ +#define YYMAXDEPTH 100000 +#define YYINITDEPTH 10000 + +/* Disable some warnings in the generated code. */ +#ifdef _MSC_VER +# pragma warning (disable: 4102) /* Unused goto label. */ +# pragma warning (disable: 4065) /* Switch statement contains default but no + case. */ +# pragma warning (disable: 4244) /* loss of precision */ +# pragma warning (disable: 4702) /* unreachable code */ +#endif +%} + +/* Generate a reentrant parser object. */ +%define api.pure + +/* Configure the parser to use a lexer object. */ +%lex-param {yyscan_t yyscanner} +%parse-param {yyscan_t yyscanner} + +%define parse.error verbose + +/* +%union { + char* string; +} +*/ + +/*-------------------------------------------------------------------------*/ +/* Tokens */ +%token cal_ENVCURLY +%token cal_NCURLY +%token cal_DCURLY +%token cal_DOLLAR "$" +%token cal_LCURLY "{" +%token cal_RCURLY "}" +%token cal_NAME +%token cal_BSLASH "\\" +%token cal_SYMBOL +%token cal_AT "@" +%token cal_ERROR +%token cal_ATNAME + +/*-------------------------------------------------------------------------*/ +/* grammar */ +%% + + +Start: + GoalWithOptionalBackSlash { + $$ = 0; + yyGetParser->SetResult($1); + } + +GoalWithOptionalBackSlash: + Goal { + $$ = $1; + } +| Goal cal_BSLASH { + $$ = yyGetParser->CombineUnions($1, $2); + } + +Goal: + { + $$ = 0; + } +| String Goal { + $$ = yyGetParser->CombineUnions($1, $2); + } + +String: + OuterText { + $$ = $1; + } +| Variable { + $$ = $1; + } + +OuterText: + cal_NAME { + $$ = $1; + } +| cal_AT { + $$ = $1; + } +| cal_DOLLAR { + $$ = $1; + } +| cal_LCURLY { + $$ = $1; + } +| cal_RCURLY { + $$ = $1; + } +| cal_SYMBOL { + $$ = $1; + } + +Variable: + cal_ENVCURLY EnvVarName cal_RCURLY { + $$ = yyGetParser->ExpandSpecialVariable($1, $2); + } +| cal_NCURLY MultipleIds cal_RCURLY { + $$ = yyGetParser->ExpandSpecialVariable($1, $2); + } +| cal_DCURLY MultipleIds cal_RCURLY { + $$ = yyGetParser->ExpandVariable($2); + } +| cal_ATNAME { + $$ = yyGetParser->ExpandVariableForAt($1); + } + +EnvVarName: + MultipleIds { + $$ = $1; + } +| cal_SYMBOL EnvVarName { + $$ = $1; + } + +MultipleIds: + { + $$ = 0; + } +| ID MultipleIds { + $$ = yyGetParser->CombineUnions($1, $2); + } + +ID: + cal_NAME { + $$ = $1; + } +| Variable { + $$ = $1; + } +; + +%% +/* End of grammar */ + +/*--------------------------------------------------------------------------*/ +void cmCommandArgument_yyerror(yyscan_t yyscanner, const char* message) +{ + yyGetParser->Error(message); +} diff --git a/Source/LexerParser/cmCommandArgumentParserTokens.h b/Source/LexerParser/cmCommandArgumentParserTokens.h new file mode 100644 index 0000000..3172182 --- /dev/null +++ b/Source/LexerParser/cmCommandArgumentParserTokens.h @@ -0,0 +1,82 @@ +/* A Bison parser, made by GNU Bison 3.0.4. */ + +/* Bison interface for Yacc-like parsers in C + + Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +#ifndef YY_CMCOMMANDARGUMENT_YY_CMCOMMANDARGUMENTPARSERTOKENS_H_INCLUDED +# define YY_CMCOMMANDARGUMENT_YY_CMCOMMANDARGUMENTPARSERTOKENS_H_INCLUDED +/* Debug traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif +#if YYDEBUG +extern int cmCommandArgument_yydebug; +#endif + +/* Token type. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + enum yytokentype + { + cal_ENVCURLY = 258, + cal_NCURLY = 259, + cal_DCURLY = 260, + cal_DOLLAR = 261, + cal_LCURLY = 262, + cal_RCURLY = 263, + cal_NAME = 264, + cal_BSLASH = 265, + cal_SYMBOL = 266, + cal_AT = 267, + cal_ERROR = 268, + cal_ATNAME = 269 + }; +#endif +/* Tokens. */ +#define cal_ENVCURLY 258 +#define cal_NCURLY 259 +#define cal_DCURLY 260 +#define cal_DOLLAR 261 +#define cal_LCURLY 262 +#define cal_RCURLY 263 +#define cal_NAME 264 +#define cal_BSLASH 265 +#define cal_SYMBOL 266 +#define cal_AT 267 +#define cal_ERROR 268 +#define cal_ATNAME 269 + +/* Value type. */ + + + +int cmCommandArgument_yyparse (yyscan_t yyscanner); + +#endif /* !YY_CMCOMMANDARGUMENT_YY_CMCOMMANDARGUMENTPARSERTOKENS_H_INCLUDED */ diff --git a/Source/LexerParser/cmDependsJavaLexer.cxx b/Source/LexerParser/cmDependsJavaLexer.cxx new file mode 100644 index 0000000..8159f47 --- /dev/null +++ b/Source/LexerParser/cmDependsJavaLexer.cxx @@ -0,0 +1,2738 @@ +#include "cmStandardLexer.h" +#line 2 "cmDependsJavaLexer.cxx" + +#line 4 "cmDependsJavaLexer.cxx" + +#define FLEXINT_H 1 +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 6 +#define YY_FLEX_SUBMINOR_VERSION 1 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ +#include +#include +#include +#include + +/* end standard C headers. */ + +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have . Non-C99 systems may or may not. */ + +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 +#endif + +#include +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#endif /* ! C99 */ + +#endif /* ! FLEXINT_H */ + +/* TODO: this is always defined, so inline it */ +#define yyconst const + +#if defined(__GNUC__) && __GNUC__ >= 3 +#define yynoreturn __attribute__((__noreturn__)) +#else +#define yynoreturn +#endif + +/* Returned upon end-of-file. */ +#define YY_NULL 0 + +/* Promotes a possibly negative, possibly signed char to an unsigned + * integer for use as an array index. If the signed char is negative, + * we want to instead treat it as an 8-bit unsigned char, hence the + * double cast. + */ +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) + +/* An opaque pointer. */ +#ifndef YY_TYPEDEF_YY_SCANNER_T +#define YY_TYPEDEF_YY_SCANNER_T +typedef void* yyscan_t; +#endif + +/* For convenience, these vars (plus the bison vars far below) + are macros in the reentrant scanner. */ +#define yyin yyg->yyin_r +#define yyout yyg->yyout_r +#define yyextra yyg->yyextra_r +#define yyleng yyg->yyleng_r +#define yytext yyg->yytext_r +#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) +#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) +#define yy_flex_debug yyg->yy_flex_debug_r + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN yyg->yy_start = 1 + 2 * + +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START ((yyg->yy_start - 1) / 2) +#define YYSTATE YY_START + +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) + +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE cmDependsJava_yyrestart(yyin ,yyscanner ) + +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#ifndef YY_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k. + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. + * Ditto for the __ia64__ case accordingly. + */ +#define YY_BUF_SIZE 32768 +#else +#define YY_BUF_SIZE 16384 +#endif /* __ia64__ */ +#endif + +/* The state buf must be large enough to hold one state per character in the main buffer. + */ +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE +typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + + #define YY_LESS_LINENO(n) + #define YY_LINENO_REWIND_TO(ptr) + +/* Return all but the first "n" matched characters back to the input stream. */ +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = yyg->yy_hold_char; \ + YY_RESTORE_YY_MORE_OFFSET \ + yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) + +#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) + +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via cmDependsJava_yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + * + * Returns the top of the stack, or NULL. + */ +#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ + ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ + : NULL) + +/* Same as previous macro, but useful when we know that the buffer stack is not + * NULL or when we need an lvalue. For internal use only. + */ +#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] + +void cmDependsJava_yyrestart (FILE *input_file ,yyscan_t yyscanner ); +void cmDependsJava_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); +YY_BUFFER_STATE cmDependsJava_yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner ); +void cmDependsJava_yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); +void cmDependsJava_yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); +void cmDependsJava_yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); +void cmDependsJava_yypop_buffer_state (yyscan_t yyscanner ); + +static void cmDependsJava_yyensure_buffer_stack (yyscan_t yyscanner ); +static void cmDependsJava_yy_load_buffer_state (yyscan_t yyscanner ); +static void cmDependsJava_yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner ); + +#define YY_FLUSH_BUFFER cmDependsJava_yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner) + +YY_BUFFER_STATE cmDependsJava_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); +YY_BUFFER_STATE cmDependsJava_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); +YY_BUFFER_STATE cmDependsJava_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); + +void *cmDependsJava_yyalloc (yy_size_t ,yyscan_t yyscanner ); +void *cmDependsJava_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); +void cmDependsJava_yyfree (void * ,yyscan_t yyscanner ); + +#define yy_new_buffer cmDependsJava_yy_create_buffer + +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + cmDependsJava_yyensure_buffer_stack (yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = \ + cmDependsJava_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } + +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + cmDependsJava_yyensure_buffer_stack (yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = \ + cmDependsJava_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } + +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) + +/* Begin user sect3 */ + +#define cmDependsJava_yywrap(yyscanner) (/*CONSTCOND*/1) +#define YY_SKIP_YYWRAP + +typedef unsigned char YY_CHAR; + +typedef int yy_state_type; + +#define yytext_ptr yytext_r + +static yy_state_type yy_get_previous_state (yyscan_t yyscanner ); +static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner); +static int yy_get_next_buffer (yyscan_t yyscanner ); +static void yynoreturn yy_fatal_error (yyconst char* msg ,yyscan_t yyscanner ); + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up yytext. + */ +#define YY_DO_BEFORE_ACTION \ + yyg->yytext_ptr = yy_bp; \ + yyleng = (int) (yy_cp - yy_bp); \ + yyg->yy_hold_char = *yy_cp; \ + *yy_cp = '\0'; \ + yyg->yy_c_buf_p = yy_cp; + +#define YY_NUM_RULES 111 +#define YY_END_OF_BUFFER 112 +/* This struct is not used in this scanner, + but its presence is necessary. */ +struct yy_trans_info + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static yyconst flex_int16_t yy_accept[327] = + { 0, + 0, 0, 0, 0, 0, 0, 112, 110, 109, 109, + 77, 4, 73, 94, 60, 110, 93, 92, 105, 99, + 68, 89, 74, 71, 56, 56, 67, 103, 86, 75, + 79, 102, 107, 64, 63, 65, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, + 107, 70, 96, 69, 104, 3, 3, 6, 111, 5, + 78, 95, 61, 62, 0, 0, 106, 101, 100, 91, + 90, 57, 1, 0, 72, 57, 56, 57, 0, 56, + 0, 88, 87, 76, 80, 81, 107, 66, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, 18, 107, + + 107, 107, 107, 107, 107, 26, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 97, 98, 2, 55, 55, + 0, 0, 0, 108, 57, 0, 57, 58, 85, 82, + 83, 107, 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, 25, 107, + 107, 30, 107, 107, 34, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, + 107, 50, 107, 107, 107, 0, 0, 58, 84, 107, + 107, 107, 107, 11, 12, 107, 14, 107, 107, 107, + + 107, 20, 107, 107, 107, 107, 107, 107, 107, 107, + 32, 107, 59, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 46, 107, 107, 54, 51, 107, + 107, 107, 107, 107, 10, 13, 15, 107, 107, 107, + 107, 22, 24, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 40, 107, 107, 43, 107, 107, 47, + 107, 107, 53, 107, 8, 107, 107, 107, 19, 107, + 107, 107, 28, 107, 107, 33, 107, 107, 107, 38, + 39, 41, 107, 44, 107, 48, 107, 107, 107, 9, + 107, 17, 21, 23, 107, 107, 107, 35, 36, 107, + + 107, 107, 107, 107, 7, 16, 107, 107, 107, 107, + 42, 107, 107, 52, 107, 107, 31, 37, 107, 49, + 27, 29, 107, 107, 45, 0 + } ; + +static yyconst YY_CHAR yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 4, 5, 1, 6, 7, 8, 9, 10, + 11, 12, 13, 14, 15, 16, 17, 18, 19, 19, + 19, 19, 19, 19, 19, 20, 20, 21, 22, 23, + 24, 25, 26, 1, 27, 27, 27, 28, 29, 28, + 30, 30, 30, 30, 30, 31, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 32, 30, 30, + 33, 34, 35, 36, 30, 1, 37, 38, 39, 40, + + 41, 42, 43, 44, 45, 30, 46, 47, 48, 49, + 50, 51, 30, 52, 53, 54, 55, 56, 57, 58, + 59, 60, 61, 62, 63, 64, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static yyconst YY_CHAR yy_meta[65] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, + 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, + 1, 1, 1, 1, 1, 1, 3, 3, 3, 4, + 4, 4, 1, 1, 1, 1, 3, 3, 3, 3, + 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 1, 1, 1, 1 + } ; + +static yyconst flex_uint16_t yy_base[334] = + { 0, + 0, 0, 401, 400, 62, 63, 411, 414, 414, 414, + 386, 414, 414, 385, 61, 374, 414, 414, 383, 57, + 414, 56, 54, 65, 74, 43, 414, 414, 55, 382, + 59, 414, 0, 414, 414, 381, 38, 36, 60, 46, + 51, 75, 69, 354, 82, 76, 362, 85, 56, 352, + 357, 414, 100, 414, 414, 414, 383, 414, 414, 414, + 414, 414, 414, 414, 390, 127, 414, 414, 414, 414, + 414, 129, 414, 395, 414, 132, 95, 414, 165, 414, + 0, 373, 414, 414, 414, 109, 0, 414, 343, 342, + 344, 352, 338, 101, 354, 353, 340, 346, 332, 333, + + 331, 337, 334, 332, 329, 0, 329, 110, 330, 324, + 320, 329, 336, 93, 336, 319, 322, 89, 320, 325, + 320, 114, 131, 120, 323, 414, 414, 414, 414, 358, + 170, 357, 362, 414, 173, 157, 176, 150, 414, 414, + 340, 309, 321, 314, 323, 318, 317, 318, 304, 302, + 300, 316, 314, 310, 309, 296, 311, 310, 0, 153, + 292, 304, 301, 298, 0, 295, 295, 284, 285, 291, + 282, 284, 281, 289, 292, 278, 292, 277, 279, 279, + 286, 0, 286, 288, 277, 189, 314, 414, 414, 270, + 269, 279, 273, 0, 0, 274, 0, 264, 271, 260, + + 267, 0, 264, 271, 264, 256, 268, 256, 270, 254, + 0, 249, 0, 267, 266, 261, 256, 248, 245, 253, + 258, 244, 256, 250, 0, 236, 239, 0, 0, 237, + 249, 252, 234, 250, 0, 0, 0, 237, 238, 243, + 243, 235, 0, 233, 226, 230, 236, 236, 233, 221, + 235, 234, 223, 0, 232, 216, 0, 225, 216, 214, + 221, 220, 0, 225, 0, 214, 207, 207, 0, 207, + 200, 217, 0, 218, 219, 0, 214, 213, 199, 0, + 0, 0, 210, 0, 201, 0, 209, 202, 194, 0, + 206, 0, 0, 0, 197, 204, 205, 0, 0, 202, + + 191, 192, 191, 198, 0, 0, 163, 162, 170, 170, + 0, 164, 152, 0, 152, 157, 0, 0, 127, 0, + 0, 0, 115, 95, 0, 414, 218, 222, 226, 228, + 232, 96, 235 + } ; + +static yyconst flex_int16_t yy_def[334] = + { 0, + 326, 1, 327, 327, 328, 328, 326, 326, 326, 326, + 326, 326, 326, 326, 326, 329, 326, 326, 326, 326, + 326, 326, 326, 326, 326, 25, 326, 326, 326, 326, + 326, 326, 330, 326, 326, 326, 330, 330, 330, 330, + 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, + 330, 326, 326, 326, 326, 326, 326, 326, 326, 326, + 326, 326, 326, 326, 326, 329, 326, 326, 326, 326, + 326, 326, 326, 331, 326, 326, 25, 326, 326, 326, + 332, 326, 326, 326, 326, 326, 330, 326, 330, 330, + 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, + + 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, + 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, + 330, 330, 330, 330, 330, 326, 326, 326, 326, 326, + 326, 333, 331, 326, 326, 326, 326, 332, 326, 326, + 326, 330, 330, 330, 330, 330, 330, 330, 330, 330, + 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, + 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, + 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, + 330, 330, 330, 330, 330, 326, 333, 326, 326, 330, + 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, + + 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, + 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, + 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, + 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, + 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, + 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, + 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, + 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, + 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, + 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, + + 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, + 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, + 330, 330, 330, 330, 330, 0, 326, 326, 326, 326, + 326, 326, 326 + } ; + +static yyconst flex_uint16_t yy_nxt[479] = + { 0, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 26, + 27, 28, 29, 30, 31, 32, 33, 33, 33, 33, + 33, 33, 34, 8, 35, 36, 37, 38, 39, 40, + 41, 42, 33, 33, 43, 33, 44, 33, 45, 33, + 46, 47, 48, 49, 33, 50, 51, 33, 33, 33, + 52, 53, 54, 55, 59, 59, 60, 60, 63, 68, + 70, 72, 72, 72, 326, 89, 73, 82, 83, 71, + 69, 74, 85, 86, 64, 91, 98, 92, 75, 76, + 90, 77, 77, 77, 93, 99, 94, 100, 138, 122, + + 326, 78, 79, 95, 80, 81, 96, 123, 101, 97, + 106, 102, 113, 78, 79, 78, 107, 108, 110, 103, + 80, 104, 111, 126, 105, 173, 326, 114, 117, 326, + 115, 81, 140, 141, 325, 130, 112, 168, 118, 119, + 174, 120, 169, 121, 131, 131, 72, 72, 72, 135, + 135, 135, 326, 147, 148, 324, 78, 79, 178, 78, + 79, 127, 161, 162, 183, 179, 184, 180, 78, 79, + 78, 78, 79, 78, 137, 137, 137, 136, 129, 136, + 188, 132, 137, 137, 137, 181, 323, 186, 186, 182, + 135, 135, 135, 137, 137, 137, 188, 129, 322, 207, + + 78, 79, 208, 78, 321, 320, 186, 186, 319, 318, + 317, 316, 78, 79, 78, 78, 315, 78, 56, 56, + 56, 56, 58, 58, 58, 58, 65, 65, 65, 65, + 87, 87, 133, 133, 133, 133, 187, 187, 314, 313, + 312, 311, 310, 309, 308, 307, 306, 305, 304, 303, + 302, 301, 300, 299, 298, 297, 296, 295, 294, 293, + 292, 291, 290, 289, 288, 287, 286, 285, 284, 283, + 282, 281, 280, 279, 278, 277, 276, 275, 274, 273, + 272, 271, 270, 269, 268, 267, 266, 265, 264, 263, + 262, 261, 260, 259, 258, 257, 256, 255, 254, 253, + + 252, 251, 250, 249, 248, 247, 246, 245, 244, 243, + 242, 228, 241, 240, 239, 238, 237, 236, 235, 234, + 233, 232, 129, 231, 230, 229, 228, 227, 226, 225, + 224, 223, 222, 221, 220, 219, 218, 217, 216, 215, + 214, 213, 212, 211, 210, 209, 206, 205, 204, 203, + 202, 201, 200, 199, 198, 197, 196, 195, 194, 193, + 192, 191, 190, 189, 134, 129, 129, 185, 177, 176, + 175, 172, 171, 170, 167, 166, 165, 164, 163, 160, + 159, 158, 157, 156, 155, 154, 153, 152, 151, 150, + 149, 146, 145, 144, 143, 142, 139, 134, 129, 128, + + 125, 124, 116, 109, 88, 84, 67, 66, 62, 61, + 326, 57, 57, 7, 326, 326, 326, 326, 326, 326, + 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, + 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, + 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, + 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, + 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, + 326, 326, 326, 326, 326, 326, 326, 326 + } ; + +static yyconst flex_int16_t yy_chk[479] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 5, 6, 5, 6, 15, 20, + 22, 23, 23, 23, 26, 37, 24, 29, 29, 22, + 20, 24, 31, 31, 15, 38, 40, 38, 24, 25, + 37, 25, 25, 25, 38, 40, 39, 41, 332, 49, + + 26, 25, 25, 39, 25, 25, 39, 49, 41, 39, + 43, 42, 46, 25, 25, 25, 43, 43, 45, 42, + 25, 42, 45, 53, 42, 118, 77, 46, 48, 66, + 46, 25, 86, 86, 324, 66, 45, 114, 48, 48, + 118, 48, 114, 48, 66, 66, 72, 72, 72, 76, + 76, 76, 77, 94, 94, 323, 72, 72, 122, 76, + 76, 53, 108, 108, 124, 122, 124, 123, 72, 72, + 72, 76, 76, 76, 136, 136, 136, 79, 131, 79, + 138, 66, 79, 79, 79, 123, 319, 131, 131, 123, + 135, 135, 135, 137, 137, 137, 138, 186, 316, 160, + + 135, 135, 160, 137, 315, 313, 186, 186, 312, 310, + 309, 308, 135, 135, 135, 137, 307, 137, 327, 327, + 327, 327, 328, 328, 328, 328, 329, 329, 329, 329, + 330, 330, 331, 331, 331, 331, 333, 333, 304, 303, + 302, 301, 300, 297, 296, 295, 291, 289, 288, 287, + 285, 283, 279, 278, 277, 275, 274, 272, 271, 270, + 268, 267, 266, 264, 262, 261, 260, 259, 258, 256, + 255, 253, 252, 251, 250, 249, 248, 247, 246, 245, + 244, 242, 241, 240, 239, 238, 234, 233, 232, 231, + 230, 227, 226, 224, 223, 222, 221, 220, 219, 218, + + 217, 216, 215, 214, 212, 210, 209, 208, 207, 206, + 205, 204, 203, 201, 200, 199, 198, 196, 193, 192, + 191, 190, 187, 185, 184, 183, 181, 180, 179, 178, + 177, 176, 175, 174, 173, 172, 171, 170, 169, 168, + 167, 166, 164, 163, 162, 161, 158, 157, 156, 155, + 154, 153, 152, 151, 150, 149, 148, 147, 146, 145, + 144, 143, 142, 141, 133, 132, 130, 125, 121, 120, + 119, 117, 116, 115, 113, 112, 111, 110, 109, 107, + 105, 104, 103, 102, 101, 100, 99, 98, 97, 96, + 95, 93, 92, 91, 90, 89, 82, 74, 65, 57, + + 51, 50, 47, 44, 36, 30, 19, 16, 14, 11, + 7, 4, 3, 326, 326, 326, 326, 326, 326, 326, + 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, + 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, + 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, + 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, + 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, + 326, 326, 326, 326, 326, 326, 326, 326 + } ; + +/* The intent behind this definition is that it'll catch + * any uses of REJECT which flex missed. + */ +#define REJECT reject_used_but_not_detected +#define yymore() yymore_used_but_not_detected +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET +#line 1 "cmDependsJavaLexer.in.l" +#line 2 "cmDependsJavaLexer.in.l" +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +/* + +This file must be translated to C++ and modified to build everywhere. + +Run flex >= 2.6 like this: + + flex --nounistd -DFLEXINT_H --prefix=cmDependsJava_yy --header-file=cmDependsJavaLexer.h -ocmDependsJavaLexer.cxx cmDependsJavaLexer.in.l + +Modify cmDependsJavaLexer.cxx: + - remove trailing whitespace: sed -i 's/\s*$//' cmDependsJavaLexer.h cmDependsJavaLexer.cxx + - remove blank lines at end of file + - #include "cmStandardLexer.h" at the top + - add cast in cmDependsJava_yy_scan_bytes for loop condition of _yybytes_len to size_t + +*/ + +/* IWYU pragma: no_forward_declare yyguts_t */ + +#include + +#include "cmDependsJavaParserHelper.h" + +/* Replace the lexer input function. */ +#undef YY_INPUT +#define YY_INPUT(buf, result, max_size) \ + { result = yyextra->LexInput(buf, max_size); } + +/* Include the set of tokens from the parser. */ +#include "cmDependsJavaParserTokens.h" + +#define KEYWORD yylvalp->str = 0 +#define SYMBOL yylvalp->str = 0 +#define PRIMITIVE yylvalp->str = 0 + +/*--------------------------------------------------------------------------*/ + + +#line 686 "cmDependsJavaLexer.cxx" + +#define INITIAL 0 +#define comment 1 +#define string 2 + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +/* Holds the entire state of the reentrant scanner. */ +struct yyguts_t + { + + /* User-defined. Not touched by flex. */ + YY_EXTRA_TYPE yyextra_r; + + /* The rest are the same as the globals declared in the non-reentrant scanner. */ + FILE *yyin_r, *yyout_r; + size_t yy_buffer_stack_top; /**< index of top of stack. */ + size_t yy_buffer_stack_max; /**< capacity of stack. */ + YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ + char yy_hold_char; + int yy_n_chars; + int yyleng_r; + char *yy_c_buf_p; + int yy_init; + int yy_start; + int yy_did_buffer_switch_on_eof; + int yy_start_stack_ptr; + int yy_start_stack_depth; + int *yy_start_stack; + yy_state_type yy_last_accepting_state; + char* yy_last_accepting_cpos; + + int yylineno_r; + int yy_flex_debug_r; + + char *yytext_r; + int yy_more_flag; + int yy_more_len; + + }; /* end struct yyguts_t */ + +static int yy_init_globals (yyscan_t yyscanner ); + +int cmDependsJava_yylex_init (yyscan_t* scanner); + +int cmDependsJava_yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); + +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int cmDependsJava_yylex_destroy (yyscan_t yyscanner ); + +int cmDependsJava_yyget_debug (yyscan_t yyscanner ); + +void cmDependsJava_yyset_debug (int debug_flag ,yyscan_t yyscanner ); + +YY_EXTRA_TYPE cmDependsJava_yyget_extra (yyscan_t yyscanner ); + +void cmDependsJava_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); + +FILE *cmDependsJava_yyget_in (yyscan_t yyscanner ); + +void cmDependsJava_yyset_in (FILE * _in_str ,yyscan_t yyscanner ); + +FILE *cmDependsJava_yyget_out (yyscan_t yyscanner ); + +void cmDependsJava_yyset_out (FILE * _out_str ,yyscan_t yyscanner ); + + int cmDependsJava_yyget_leng (yyscan_t yyscanner ); + +char *cmDependsJava_yyget_text (yyscan_t yyscanner ); + +int cmDependsJava_yyget_lineno (yyscan_t yyscanner ); + +void cmDependsJava_yyset_lineno (int _line_number ,yyscan_t yyscanner ); + +int cmDependsJava_yyget_column (yyscan_t yyscanner ); + +void cmDependsJava_yyset_column (int _column_no ,yyscan_t yyscanner ); + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int cmDependsJava_yywrap (yyscan_t yyscanner ); +#else +extern int cmDependsJava_yywrap (yyscan_t yyscanner ); +#endif +#endif + +#ifndef YY_NO_UNPUT + + static void yyunput (int c,char *buf_ptr ,yyscan_t yyscanner); + +#endif + +#ifndef yytext_ptr +static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); +#endif + +#ifndef YY_NO_INPUT + +#ifdef __cplusplus +static int yyinput (yyscan_t yyscanner ); +#else +static int input (yyscan_t yyscanner ); +#endif + +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k */ +#define YY_READ_BUF_SIZE 16384 +#else +#define YY_READ_BUF_SIZE 8192 +#endif /* __ia64__ */ +#endif + +/* Copy whatever the last rule matched to the standard output. */ +#ifndef ECHO +/* This used to be an fputs(), but since the string might contain NUL's, + * we now use fwrite(). + */ +#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ + { \ + int c = '*'; \ + size_t n; \ + for ( n = 0; n < max_size && \ + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else \ + { \ + errno=0; \ + while ( (result = (int) fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(yyin); \ + } \ + }\ +\ + +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) +#endif + +/* end tables serialization structures and prototypes */ + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL_IS_OURS 1 + +extern int cmDependsJava_yylex (yyscan_t yyscanner); + +#define YY_DECL int cmDependsJava_yylex (yyscan_t yyscanner) +#endif /* !YY_DECL */ + +/* Code executed at the beginning of each rule, after yytext and yyleng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK /*LINTED*/break; +#endif + +#define YY_RULE_SETUP \ + YY_USER_ACTION + +/** The main scanner function which does all the work. + */ +YY_DECL +{ + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if ( !yyg->yy_init ) + { + yyg->yy_init = 1; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + if ( ! yyg->yy_start ) + yyg->yy_start = 1; /* first start state */ + + if ( ! yyin ) + yyin = stdin; + + if ( ! yyout ) + yyout = stdout; + + if ( ! YY_CURRENT_BUFFER ) { + cmDependsJava_yyensure_buffer_stack (yyscanner); + YY_CURRENT_BUFFER_LVALUE = + cmDependsJava_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); + } + + cmDependsJava_yy_load_buffer_state(yyscanner ); + } + + { +#line 48 "cmDependsJavaLexer.in.l" + +#line 943 "cmDependsJavaLexer.cxx" + + while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ + { + yy_cp = yyg->yy_c_buf_p; + + /* Support of yytext. */ + *yy_cp = yyg->yy_hold_char; + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = yyg->yy_start; +yy_match: + do + { + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 327 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; + ++yy_cp; + } + while ( yy_base[yy_current_state] != 414 ); + +yy_find_action: + yy_act = yy_accept[yy_current_state]; + if ( yy_act == 0 ) + { /* have to back up */ + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + yy_act = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + +do_action: /* This label is used only to access EOF actions. */ + + switch ( yy_act ) + { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = yyg->yy_hold_char; + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + goto yy_find_action; + +case 1: +YY_RULE_SETUP +#line 49 "cmDependsJavaLexer.in.l" +{ BEGIN(comment); } + YY_BREAK +case 2: +YY_RULE_SETUP +#line 50 "cmDependsJavaLexer.in.l" +{ BEGIN(INITIAL); } + YY_BREAK +case 3: +/* rule 3 can match eol */ +YY_RULE_SETUP +#line 51 "cmDependsJavaLexer.in.l" +{} + YY_BREAK +case 4: +YY_RULE_SETUP +#line 53 "cmDependsJavaLexer.in.l" +{ BEGIN(string); } + YY_BREAK +case 5: +YY_RULE_SETUP +#line 54 "cmDependsJavaLexer.in.l" +{ BEGIN(INITIAL); return jp_STRINGLITERAL; } + YY_BREAK +case 6: +YY_RULE_SETUP +#line 55 "cmDependsJavaLexer.in.l" +{} + YY_BREAK +case 7: +YY_RULE_SETUP +#line 57 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_ABSTRACT; } + YY_BREAK +case 8: +YY_RULE_SETUP +#line 58 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_ASSERT; } + YY_BREAK +case 9: +YY_RULE_SETUP +#line 59 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_BOOLEAN_TYPE; } + YY_BREAK +case 10: +YY_RULE_SETUP +#line 60 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_BREAK; } + YY_BREAK +case 11: +YY_RULE_SETUP +#line 61 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_BYTE_TYPE; } + YY_BREAK +case 12: +YY_RULE_SETUP +#line 62 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_CASE; } + YY_BREAK +case 13: +YY_RULE_SETUP +#line 63 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_CATCH; } + YY_BREAK +case 14: +YY_RULE_SETUP +#line 64 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_CHAR_TYPE; } + YY_BREAK +case 15: +YY_RULE_SETUP +#line 65 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_CLASS; } + YY_BREAK +case 16: +YY_RULE_SETUP +#line 66 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_CONTINUE; } + YY_BREAK +case 17: +YY_RULE_SETUP +#line 67 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_DEFAULT; } + YY_BREAK +case 18: +YY_RULE_SETUP +#line 68 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_DO; } + YY_BREAK +case 19: +YY_RULE_SETUP +#line 69 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_DOUBLE_TYPE; } + YY_BREAK +case 20: +YY_RULE_SETUP +#line 70 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_ELSE; } + YY_BREAK +case 21: +YY_RULE_SETUP +#line 71 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_EXTENDS; } + YY_BREAK +case 22: +YY_RULE_SETUP +#line 72 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_FINAL; } + YY_BREAK +case 23: +YY_RULE_SETUP +#line 73 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_FINALLY; } + YY_BREAK +case 24: +YY_RULE_SETUP +#line 74 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_FLOAT_TYPE; } + YY_BREAK +case 25: +YY_RULE_SETUP +#line 75 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_FOR; } + YY_BREAK +case 26: +YY_RULE_SETUP +#line 76 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_IF; } + YY_BREAK +case 27: +YY_RULE_SETUP +#line 77 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_IMPLEMENTS; } + YY_BREAK +case 28: +YY_RULE_SETUP +#line 78 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_IMPORT; } + YY_BREAK +case 29: +YY_RULE_SETUP +#line 79 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_INSTANCEOF; } + YY_BREAK +case 30: +YY_RULE_SETUP +#line 80 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_INT_TYPE; } + YY_BREAK +case 31: +YY_RULE_SETUP +#line 81 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_INTERFACE; } + YY_BREAK +case 32: +YY_RULE_SETUP +#line 82 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_LONG_TYPE; } + YY_BREAK +case 33: +YY_RULE_SETUP +#line 83 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_NATIVE; } + YY_BREAK +case 34: +YY_RULE_SETUP +#line 84 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_NEW; } + YY_BREAK +case 35: +YY_RULE_SETUP +#line 85 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_PACKAGE; } + YY_BREAK +case 36: +YY_RULE_SETUP +#line 86 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_PRIVATE; } + YY_BREAK +case 37: +YY_RULE_SETUP +#line 87 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_PROTECTED; } + YY_BREAK +case 38: +YY_RULE_SETUP +#line 88 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_PUBLIC; } + YY_BREAK +case 39: +YY_RULE_SETUP +#line 89 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_RETURN; } + YY_BREAK +case 40: +YY_RULE_SETUP +#line 90 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_SHORT_TYPE; } + YY_BREAK +case 41: +YY_RULE_SETUP +#line 91 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_STATIC; } + YY_BREAK +case 42: +YY_RULE_SETUP +#line 92 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_STRICTFP; } + YY_BREAK +case 43: +YY_RULE_SETUP +#line 93 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_SUPER; } + YY_BREAK +case 44: +YY_RULE_SETUP +#line 94 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_SWITCH; } + YY_BREAK +case 45: +YY_RULE_SETUP +#line 95 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_SYNCHRONIZED; } + YY_BREAK +case 46: +YY_RULE_SETUP +#line 96 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_THIS; } + YY_BREAK +case 47: +YY_RULE_SETUP +#line 97 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_THROW; } + YY_BREAK +case 48: +YY_RULE_SETUP +#line 98 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_THROWS; } + YY_BREAK +case 49: +YY_RULE_SETUP +#line 99 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_TRANSIENT; } + YY_BREAK +case 50: +YY_RULE_SETUP +#line 100 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_TRY; } + YY_BREAK +case 51: +YY_RULE_SETUP +#line 101 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_VOID; } + YY_BREAK +case 52: +YY_RULE_SETUP +#line 102 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_VOLATILE; } + YY_BREAK +case 53: +YY_RULE_SETUP +#line 103 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_WHILE; } + YY_BREAK +case 54: +YY_RULE_SETUP +#line 105 "cmDependsJavaLexer.in.l" +{ PRIMITIVE; return jp_BOOLEANLITERAL; } + YY_BREAK +case 55: +/* rule 55 can match eol */ +YY_RULE_SETUP +#line 106 "cmDependsJavaLexer.in.l" +{ PRIMITIVE; return jp_CHARACTERLITERAL; } + YY_BREAK +case 56: +YY_RULE_SETUP +#line 107 "cmDependsJavaLexer.in.l" +{ PRIMITIVE; return jp_DECIMALINTEGERLITERAL; } + YY_BREAK +case 57: +YY_RULE_SETUP +#line 108 "cmDependsJavaLexer.in.l" +{ PRIMITIVE; return jp_FLOATINGPOINTLITERAL; } + YY_BREAK +case 58: +YY_RULE_SETUP +#line 109 "cmDependsJavaLexer.in.l" +{ PRIMITIVE; return jp_HEXINTEGERLITERAL; } + YY_BREAK +case 59: +YY_RULE_SETUP +#line 110 "cmDependsJavaLexer.in.l" +{ PRIMITIVE; return jp_NULLLITERAL; } + YY_BREAK +case 60: +YY_RULE_SETUP +#line 112 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_AND; } + YY_BREAK +case 61: +YY_RULE_SETUP +#line 113 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_ANDAND; } + YY_BREAK +case 62: +YY_RULE_SETUP +#line 114 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_ANDEQUALS; } + YY_BREAK +case 63: +YY_RULE_SETUP +#line 115 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_BRACKETEND; } + YY_BREAK +case 64: +YY_RULE_SETUP +#line 116 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_BRACKETSTART; } + YY_BREAK +case 65: +YY_RULE_SETUP +#line 117 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_CARROT; } + YY_BREAK +case 66: +YY_RULE_SETUP +#line 118 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_CARROTEQUALS; } + YY_BREAK +case 67: +YY_RULE_SETUP +#line 119 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_COLON; } + YY_BREAK +case 68: +YY_RULE_SETUP +#line 120 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_COMMA; } + YY_BREAK +case 69: +YY_RULE_SETUP +#line 121 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_CURLYEND; } + YY_BREAK +case 70: +YY_RULE_SETUP +#line 122 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_CURLYSTART; } + YY_BREAK +case 71: +YY_RULE_SETUP +#line 123 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_DIVIDE; } + YY_BREAK +case 72: +YY_RULE_SETUP +#line 124 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_DIVIDEEQUALS; } + YY_BREAK +case 73: +YY_RULE_SETUP +#line 125 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_DOLLAR; } + YY_BREAK +case 74: +YY_RULE_SETUP +#line 126 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_DOT; } + YY_BREAK +case 75: +YY_RULE_SETUP +#line 127 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_EQUALS; } + YY_BREAK +case 76: +YY_RULE_SETUP +#line 128 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_EQUALSEQUALS; } + YY_BREAK +case 77: +YY_RULE_SETUP +#line 129 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_EXCLAMATION; } + YY_BREAK +case 78: +YY_RULE_SETUP +#line 130 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_EXCLAMATIONEQUALS; } + YY_BREAK +case 79: +YY_RULE_SETUP +#line 131 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_GREATER; } + YY_BREAK +case 80: +YY_RULE_SETUP +#line 132 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_GTEQUALS; } + YY_BREAK +case 81: +YY_RULE_SETUP +#line 133 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_GTGT; } + YY_BREAK +case 82: +YY_RULE_SETUP +#line 134 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_GTGTEQUALS; } + YY_BREAK +case 83: +YY_RULE_SETUP +#line 135 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_GTGTGT; } + YY_BREAK +case 84: +YY_RULE_SETUP +#line 136 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_GTGTGTEQUALS; } + YY_BREAK +case 85: +YY_RULE_SETUP +#line 137 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_LESLESEQUALS; } + YY_BREAK +case 86: +YY_RULE_SETUP +#line 138 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_LESSTHAN; } + YY_BREAK +case 87: +YY_RULE_SETUP +#line 139 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_LTEQUALS; } + YY_BREAK +case 88: +YY_RULE_SETUP +#line 140 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_LTLT; } + YY_BREAK +case 89: +YY_RULE_SETUP +#line 141 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_MINUS; } + YY_BREAK +case 90: +YY_RULE_SETUP +#line 142 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_MINUSEQUALS; } + YY_BREAK +case 91: +YY_RULE_SETUP +#line 143 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_MINUSMINUS; } + YY_BREAK +case 92: +YY_RULE_SETUP +#line 144 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_PAREEND; } + YY_BREAK +case 93: +YY_RULE_SETUP +#line 145 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_PARESTART; } + YY_BREAK +case 94: +YY_RULE_SETUP +#line 146 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_PERCENT; } + YY_BREAK +case 95: +YY_RULE_SETUP +#line 147 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_PERCENTEQUALS; } + YY_BREAK +case 96: +YY_RULE_SETUP +#line 148 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_PIPE; } + YY_BREAK +case 97: +YY_RULE_SETUP +#line 149 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_PIPEEQUALS; } + YY_BREAK +case 98: +YY_RULE_SETUP +#line 150 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_PIPEPIPE; } + YY_BREAK +case 99: +YY_RULE_SETUP +#line 151 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_PLUS; } + YY_BREAK +case 100: +YY_RULE_SETUP +#line 152 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_PLUSEQUALS; } + YY_BREAK +case 101: +YY_RULE_SETUP +#line 153 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_PLUSPLUS; } + YY_BREAK +case 102: +YY_RULE_SETUP +#line 154 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_QUESTION; } + YY_BREAK +case 103: +YY_RULE_SETUP +#line 155 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_SEMICOL; } + YY_BREAK +case 104: +YY_RULE_SETUP +#line 156 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_TILDE; } + YY_BREAK +case 105: +YY_RULE_SETUP +#line 157 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_TIMES; } + YY_BREAK +case 106: +YY_RULE_SETUP +#line 158 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_TIMESEQUALS; } + YY_BREAK +case 107: +YY_RULE_SETUP +#line 160 "cmDependsJavaLexer.in.l" +{ + yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + return jp_NAME; +} + YY_BREAK +case 108: +/* rule 108 can match eol */ +YY_RULE_SETUP +#line 165 "cmDependsJavaLexer.in.l" +{ } + YY_BREAK +case 109: +/* rule 109 can match eol */ +YY_RULE_SETUP +#line 166 "cmDependsJavaLexer.in.l" +{ } + YY_BREAK +case 110: +YY_RULE_SETUP +#line 167 "cmDependsJavaLexer.in.l" +{ + std::cerr << "Unknown character: " << yytext[0] + << " (" << (int)yytext[0] << ")" << std::endl; + yyextra->Error("Unknown character"); + return jp_ERROR; +} + YY_BREAK +case 111: +YY_RULE_SETUP +#line 174 "cmDependsJavaLexer.in.l" +ECHO; + YY_BREAK +#line 1567 "cmDependsJavaLexer.cxx" +case YY_STATE_EOF(INITIAL): +case YY_STATE_EOF(comment): +case YY_STATE_EOF(string): + yyterminate(); + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = yyg->yy_hold_char; + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * cmDependsJava_yylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( yyscanner ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); + + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++yyg->yy_c_buf_p; + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = yyg->yy_c_buf_p; + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( yyscanner ) ) + { + case EOB_ACT_END_OF_FILE: + { + yyg->yy_did_buffer_switch_on_eof = 0; + + if ( cmDependsJava_yywrap(yyscanner ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! yyg->yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = + yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( yyscanner ); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + yyg->yy_c_buf_p = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; + + yy_current_state = yy_get_previous_state( yyscanner ); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of user's declarations */ +} /* end of cmDependsJava_yylex */ + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ +static int yy_get_next_buffer (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = yyg->yytext_ptr; + yy_size_t number_to_move, i; + int ret_val; + + if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (yy_size_t) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1; + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; + + else + { + int num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; + + int yy_c_buf_p_offset = + (int) (yyg->yy_c_buf_p - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + cmDependsJava_yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = NULL; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + yyg->yy_n_chars, num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + if ( yyg->yy_n_chars == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + cmDependsJava_yyrestart(yyin ,yyscanner); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if ((int) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) cmDependsJava_yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + } + + yyg->yy_n_chars += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; + + yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; +} + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + + static yy_state_type yy_get_previous_state (yyscan_t yyscanner) +{ + yy_state_type yy_current_state; + char *yy_cp; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + yy_current_state = yyg->yy_start; + + for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) + { + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 327 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; + } + + return yy_current_state; +} + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) +{ + int yy_is_jam; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ + char *yy_cp = yyg->yy_c_buf_p; + + YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 327 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; + yy_is_jam = (yy_current_state == 326); + + (void)yyg; + return yy_is_jam ? 0 : yy_current_state; +} + +#ifndef YY_NO_UNPUT + + static void yyunput (int c, char * yy_bp , yyscan_t yyscanner) +{ + char *yy_cp; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + yy_cp = yyg->yy_c_buf_p; + + /* undo effects of setting up yytext */ + *yy_cp = yyg->yy_hold_char; + + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + { /* need to shift things up to make room */ + /* +2 for EOB chars. */ + int number_to_move = yyg->yy_n_chars + 2; + char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; + char *source = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; + + while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + *--dest = *--source; + + yy_cp += (int) (dest - source); + yy_bp += (int) (dest - source); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = + yyg->yy_n_chars = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size; + + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + YY_FATAL_ERROR( "flex scanner push-back overflow" ); + } + + *--yy_cp = (char) c; + + yyg->yytext_ptr = yy_bp; + yyg->yy_hold_char = *yy_cp; + yyg->yy_c_buf_p = yy_cp; +} + +#endif + +#ifndef YY_NO_INPUT +#ifdef __cplusplus + static int yyinput (yyscan_t yyscanner) +#else + static int input (yyscan_t yyscanner) +#endif + +{ + int c; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + *yyg->yy_c_buf_p = yyg->yy_hold_char; + + if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) + /* This was really a NUL. */ + *yyg->yy_c_buf_p = '\0'; + + else + { /* need more input */ + int offset = yyg->yy_c_buf_p - yyg->yytext_ptr; + ++yyg->yy_c_buf_p; + + switch ( yy_get_next_buffer( yyscanner ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + cmDependsJava_yyrestart(yyin ,yyscanner); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( cmDependsJava_yywrap(yyscanner ) ) + return 0; + + if ( ! yyg->yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(yyscanner); +#else + return input(yyscanner); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = yyg->yytext_ptr + offset; + break; + } + } + } + + c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ + *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ + yyg->yy_hold_char = *++yyg->yy_c_buf_p; + + return c; +} +#endif /* ifndef YY_NO_INPUT */ + +/** Immediately switch to a different input stream. + * @param input_file A readable stream. + * @param yyscanner The scanner object. + * @note This function does not reset the start condition to @c INITIAL . + */ + void cmDependsJava_yyrestart (FILE * input_file , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if ( ! YY_CURRENT_BUFFER ){ + cmDependsJava_yyensure_buffer_stack (yyscanner); + YY_CURRENT_BUFFER_LVALUE = + cmDependsJava_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); + } + + cmDependsJava_yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner); + cmDependsJava_yy_load_buffer_state(yyscanner ); +} + +/** Switch to a different input buffer. + * @param new_buffer The new input buffer. + * @param yyscanner The scanner object. + */ + void cmDependsJava_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* TODO. We should be able to replace this entire function body + * with + * cmDependsJava_yypop_buffer_state(); + * cmDependsJava_yypush_buffer_state(new_buffer); + */ + cmDependsJava_yyensure_buffer_stack (yyscanner); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + cmDependsJava_yy_load_buffer_state(yyscanner ); + + /* We don't actually know whether we did this switch during + * EOF (cmDependsJava_yywrap()) processing, but the only time this flag + * is looked at is after cmDependsJava_yywrap() is called, so it's safe + * to go ahead and always set it. + */ + yyg->yy_did_buffer_switch_on_eof = 1; +} + +static void cmDependsJava_yy_load_buffer_state (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + yyg->yy_hold_char = *yyg->yy_c_buf_p; +} + +/** Allocate and initialize an input buffer state. + * @param file A readable stream. + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. + * @param yyscanner The scanner object. + * @return the allocated buffer state. + */ + YY_BUFFER_STATE cmDependsJava_yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) +{ + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) cmDependsJava_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in cmDependsJava_yy_create_buffer()" ); + + b->yy_buf_size = (yy_size_t)size; + + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) cmDependsJava_yyalloc(b->yy_buf_size + 2 ,yyscanner ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in cmDependsJava_yy_create_buffer()" ); + + b->yy_is_our_buffer = 1; + + cmDependsJava_yy_init_buffer(b,file ,yyscanner); + + return b; +} + +/** Destroy the buffer. + * @param b a buffer created with cmDependsJava_yy_create_buffer() + * @param yyscanner The scanner object. + */ + void cmDependsJava_yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if ( ! b ) + return; + + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + cmDependsJava_yyfree((void *) b->yy_ch_buf ,yyscanner ); + + cmDependsJava_yyfree((void *) b ,yyscanner ); +} + +/* Initializes or reinitializes a buffer. + * This function is sometimes called more than once on the same buffer, + * such as during a cmDependsJava_yyrestart() or at EOF. + */ + static void cmDependsJava_yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) + +{ + int oerrno = errno; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + cmDependsJava_yy_flush_buffer(b ,yyscanner); + + b->yy_input_file = file; + b->yy_fill_buffer = 1; + + /* If b is the current buffer, then cmDependsJava_yy_init_buffer was _probably_ + * called from cmDependsJava_yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } + + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; + + errno = oerrno; +} + +/** Discard all buffered characters. On the next scan, YY_INPUT will be called. + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. + * @param yyscanner The scanner object. + */ + void cmDependsJava_yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if ( ! b ) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == YY_CURRENT_BUFFER ) + cmDependsJava_yy_load_buffer_state(yyscanner ); +} + +/** Pushes the new state onto the stack. The new state becomes + * the current state. This function will allocate the stack + * if necessary. + * @param new_buffer The new state. + * @param yyscanner The scanner object. + */ +void cmDependsJava_yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if (new_buffer == NULL) + return; + + cmDependsJava_yyensure_buffer_stack(yyscanner); + + /* This block is copied from cmDependsJava_yy_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + yyg->yy_buffer_stack_top++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from cmDependsJava_yy_switch_to_buffer. */ + cmDependsJava_yy_load_buffer_state(yyscanner ); + yyg->yy_did_buffer_switch_on_eof = 1; +} + +/** Removes and deletes the top of the stack, if present. + * The next element becomes the new top. + * @param yyscanner The scanner object. + */ +void cmDependsJava_yypop_buffer_state (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if (!YY_CURRENT_BUFFER) + return; + + cmDependsJava_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner); + YY_CURRENT_BUFFER_LVALUE = NULL; + if (yyg->yy_buffer_stack_top > 0) + --yyg->yy_buffer_stack_top; + + if (YY_CURRENT_BUFFER) { + cmDependsJava_yy_load_buffer_state(yyscanner ); + yyg->yy_did_buffer_switch_on_eof = 1; + } +} + +/* Allocates the stack if it does not exist. + * Guarantees space for at least one push. + */ +static void cmDependsJava_yyensure_buffer_stack (yyscan_t yyscanner) +{ + int num_to_alloc; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if (!yyg->yy_buffer_stack) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ + yyg->yy_buffer_stack = (struct yy_buffer_state**)cmDependsJava_yyalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + , yyscanner); + if ( ! yyg->yy_buffer_stack ) + YY_FATAL_ERROR( "out of dynamic memory in cmDependsJava_yyensure_buffer_stack()" ); + + memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + yyg->yy_buffer_stack_max = num_to_alloc; + yyg->yy_buffer_stack_top = 0; + return; + } + + if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + yy_size_t grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = yyg->yy_buffer_stack_max + grow_size; + yyg->yy_buffer_stack = (struct yy_buffer_state**)cmDependsJava_yyrealloc + (yyg->yy_buffer_stack, + num_to_alloc * sizeof(struct yy_buffer_state*) + , yyscanner); + if ( ! yyg->yy_buffer_stack ) + YY_FATAL_ERROR( "out of dynamic memory in cmDependsJava_yyensure_buffer_stack()" ); + + /* zero only the new slots.*/ + memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); + yyg->yy_buffer_stack_max = num_to_alloc; + } +} + +/** Setup the input buffer state to scan directly from a user-specified character buffer. + * @param base the character buffer + * @param size the size in bytes of the character buffer + * @param yyscanner The scanner object. + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE cmDependsJava_yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) +{ + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return NULL; + + b = (YY_BUFFER_STATE) cmDependsJava_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in cmDependsJava_yy_scan_buffer()" ); + + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = NULL; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + cmDependsJava_yy_switch_to_buffer(b ,yyscanner ); + + return b; +} + +/** Setup the input buffer state to scan a string. The next call to cmDependsJava_yylex() will + * scan from a @e copy of @a str. + * @param yystr a NUL-terminated string to scan + * @param yyscanner The scanner object. + * @return the newly allocated buffer state object. + * @note If you want to scan bytes that may contain NUL values, then use + * cmDependsJava_yy_scan_bytes() instead. + */ +YY_BUFFER_STATE cmDependsJava_yy_scan_string (yyconst char * yystr , yyscan_t yyscanner) +{ + + return cmDependsJava_yy_scan_bytes(yystr,(int) strlen(yystr) ,yyscanner); +} + +/** Setup the input buffer state to scan the given bytes. The next call to cmDependsJava_yylex() will + * scan from a @e copy of @a bytes. + * @param yybytes the byte buffer to scan + * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. + * @param yyscanner The scanner object. + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE cmDependsJava_yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner) +{ + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + yy_size_t i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = (yy_size_t) _yybytes_len + 2; + buf = (char *) cmDependsJava_yyalloc(n ,yyscanner ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in cmDependsJava_yy_scan_bytes()" ); + + for ( i = 0; i < (size_t)_yybytes_len; ++i ) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; + + b = cmDependsJava_yy_scan_buffer(buf,n ,yyscanner); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in cmDependsJava_yy_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; +} + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +static void yynoreturn yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + (void) fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); +} + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + yytext[yyleng] = yyg->yy_hold_char; \ + yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ + yyg->yy_hold_char = *yyg->yy_c_buf_p; \ + *yyg->yy_c_buf_p = '\0'; \ + yyleng = yyless_macro_arg; \ + } \ + while ( 0 ) + +/* Accessor methods (get/set functions) to struct members. */ + +/** Get the user-defined data for this scanner. + * @param yyscanner The scanner object. + */ +YY_EXTRA_TYPE cmDependsJava_yyget_extra (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyextra; +} + +/** Get the current line number. + * @param yyscanner The scanner object. + */ +int cmDependsJava_yyget_lineno (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if (! YY_CURRENT_BUFFER) + return 0; + + return yylineno; +} + +/** Get the current column number. + * @param yyscanner The scanner object. + */ +int cmDependsJava_yyget_column (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if (! YY_CURRENT_BUFFER) + return 0; + + return yycolumn; +} + +/** Get the input stream. + * @param yyscanner The scanner object. + */ +FILE *cmDependsJava_yyget_in (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyin; +} + +/** Get the output stream. + * @param yyscanner The scanner object. + */ +FILE *cmDependsJava_yyget_out (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyout; +} + +/** Get the length of the current token. + * @param yyscanner The scanner object. + */ +int cmDependsJava_yyget_leng (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyleng; +} + +/** Get the current token. + * @param yyscanner The scanner object. + */ + +char *cmDependsJava_yyget_text (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yytext; +} + +/** Set the user-defined data. This data is never touched by the scanner. + * @param user_defined The data to be associated with this scanner. + * @param yyscanner The scanner object. + */ +void cmDependsJava_yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyextra = user_defined ; +} + +/** Set the current line number. + * @param _line_number line number + * @param yyscanner The scanner object. + */ +void cmDependsJava_yyset_lineno (int _line_number , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* lineno is only valid if an input buffer exists. */ + if (! YY_CURRENT_BUFFER ) + YY_FATAL_ERROR( "cmDependsJava_yyset_lineno called with no buffer" ); + + yylineno = _line_number; +} + +/** Set the current column. + * @param _column_no column number + * @param yyscanner The scanner object. + */ +void cmDependsJava_yyset_column (int _column_no , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* column is only valid if an input buffer exists. */ + if (! YY_CURRENT_BUFFER ) + YY_FATAL_ERROR( "cmDependsJava_yyset_column called with no buffer" ); + + yycolumn = _column_no; +} + +/** Set the input stream. This does not discard the current + * input buffer. + * @param _in_str A readable stream. + * @param yyscanner The scanner object. + * @see cmDependsJava_yy_switch_to_buffer + */ +void cmDependsJava_yyset_in (FILE * _in_str , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyin = _in_str ; +} + +void cmDependsJava_yyset_out (FILE * _out_str , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyout = _out_str ; +} + +int cmDependsJava_yyget_debug (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yy_flex_debug; +} + +void cmDependsJava_yyset_debug (int _bdebug , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yy_flex_debug = _bdebug ; +} + +/* Accessor methods for yylval and yylloc */ + +/* User-visible API */ + +/* cmDependsJava_yylex_init is special because it creates the scanner itself, so it is + * the ONLY reentrant function that doesn't take the scanner as the last argument. + * That's why we explicitly handle the declaration, instead of using our macros. + */ + +int cmDependsJava_yylex_init(yyscan_t* ptr_yy_globals) + +{ + if (ptr_yy_globals == NULL){ + errno = EINVAL; + return 1; + } + + *ptr_yy_globals = (yyscan_t) cmDependsJava_yyalloc ( sizeof( struct yyguts_t ), NULL ); + + if (*ptr_yy_globals == NULL){ + errno = ENOMEM; + return 1; + } + + /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); + + return yy_init_globals ( *ptr_yy_globals ); +} + +/* cmDependsJava_yylex_init_extra has the same functionality as cmDependsJava_yylex_init, but follows the + * convention of taking the scanner as the last argument. Note however, that + * this is a *pointer* to a scanner, as it will be allocated by this call (and + * is the reason, too, why this function also must handle its own declaration). + * The user defined value in the first argument will be available to cmDependsJava_yyalloc in + * the yyextra field. + */ + +int cmDependsJava_yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals ) + +{ + struct yyguts_t dummy_yyguts; + + cmDependsJava_yyset_extra (yy_user_defined, &dummy_yyguts); + + if (ptr_yy_globals == NULL){ + errno = EINVAL; + return 1; + } + + *ptr_yy_globals = (yyscan_t) cmDependsJava_yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); + + if (*ptr_yy_globals == NULL){ + errno = ENOMEM; + return 1; + } + + /* By setting to 0xAA, we expose bugs in + yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); + + cmDependsJava_yyset_extra (yy_user_defined, *ptr_yy_globals); + + return yy_init_globals ( *ptr_yy_globals ); +} + +static int yy_init_globals (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from cmDependsJava_yylex_destroy(), so don't allocate here. + */ + + yyg->yy_buffer_stack = NULL; + yyg->yy_buffer_stack_top = 0; + yyg->yy_buffer_stack_max = 0; + yyg->yy_c_buf_p = NULL; + yyg->yy_init = 0; + yyg->yy_start = 0; + + yyg->yy_start_stack_ptr = 0; + yyg->yy_start_stack_depth = 0; + yyg->yy_start_stack = NULL; + +/* Defined in main.c */ +#ifdef YY_STDINIT + yyin = stdin; + yyout = stdout; +#else + yyin = NULL; + yyout = NULL; +#endif + + /* For future reference: Set errno on error, since we are called by + * cmDependsJava_yylex_init() + */ + return 0; +} + +/* cmDependsJava_yylex_destroy is for both reentrant and non-reentrant scanners. */ +int cmDependsJava_yylex_destroy (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + cmDependsJava_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner ); + YY_CURRENT_BUFFER_LVALUE = NULL; + cmDependsJava_yypop_buffer_state(yyscanner); + } + + /* Destroy the stack itself. */ + cmDependsJava_yyfree(yyg->yy_buffer_stack ,yyscanner); + yyg->yy_buffer_stack = NULL; + + /* Destroy the start condition stack. */ + cmDependsJava_yyfree(yyg->yy_start_stack ,yyscanner ); + yyg->yy_start_stack = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * cmDependsJava_yylex() is called, initialization will occur. */ + yy_init_globals( yyscanner); + + /* Destroy the main struct (reentrant only). */ + cmDependsJava_yyfree ( yyscanner , yyscanner ); + yyscanner = NULL; + return 0; +} + +/* + * Internal utility routines. + */ + +#ifndef yytext_ptr +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + + int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; +} +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) +{ + int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; +} +#endif + +void *cmDependsJava_yyalloc (yy_size_t size , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + return malloc(size); +} + +void *cmDependsJava_yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return realloc(ptr, size); +} + +void cmDependsJava_yyfree (void * ptr , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + free( (char *) ptr ); /* see cmDependsJava_yyrealloc() for (char *) cast */ +} + +#define YYTABLES_NAME "yytables" + +#line 174 "cmDependsJavaLexer.in.l" diff --git a/Source/LexerParser/cmDependsJavaLexer.h b/Source/LexerParser/cmDependsJavaLexer.h new file mode 100644 index 0000000..ccadd70 --- /dev/null +++ b/Source/LexerParser/cmDependsJavaLexer.h @@ -0,0 +1,336 @@ +#ifndef cmDependsJava_yyHEADER_H +#define cmDependsJava_yyHEADER_H 1 +#define cmDependsJava_yyIN_HEADER 1 + +#line 6 "cmDependsJavaLexer.h" + +#line 8 "cmDependsJavaLexer.h" + +#define FLEXINT_H 1 +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 6 +#define YY_FLEX_SUBMINOR_VERSION 1 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ +#include +#include +#include +#include + +/* end standard C headers. */ + +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have . Non-C99 systems may or may not. */ + +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 +#endif + +#include +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#endif /* ! C99 */ + +#endif /* ! FLEXINT_H */ + +/* TODO: this is always defined, so inline it */ +#define yyconst const + +#if defined(__GNUC__) && __GNUC__ >= 3 +#define yynoreturn __attribute__((__noreturn__)) +#else +#define yynoreturn +#endif + +/* An opaque pointer. */ +#ifndef YY_TYPEDEF_YY_SCANNER_T +#define YY_TYPEDEF_YY_SCANNER_T +typedef void* yyscan_t; +#endif + +/* For convenience, these vars (plus the bison vars far below) + are macros in the reentrant scanner. */ +#define yyin yyg->yyin_r +#define yyout yyg->yyout_r +#define yyextra yyg->yyextra_r +#define yyleng yyg->yyleng_r +#define yytext yyg->yytext_r +#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) +#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) +#define yy_flex_debug yyg->yy_flex_debug_r + +/* Size of default input buffer. */ +#ifndef YY_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k. + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. + * Ditto for the __ia64__ case accordingly. + */ +#define YY_BUF_SIZE 32768 +#else +#define YY_BUF_SIZE 16384 +#endif /* __ia64__ */ +#endif + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE +typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +void cmDependsJava_yyrestart (FILE *input_file ,yyscan_t yyscanner ); +void cmDependsJava_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); +YY_BUFFER_STATE cmDependsJava_yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner ); +void cmDependsJava_yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); +void cmDependsJava_yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); +void cmDependsJava_yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); +void cmDependsJava_yypop_buffer_state (yyscan_t yyscanner ); + +YY_BUFFER_STATE cmDependsJava_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); +YY_BUFFER_STATE cmDependsJava_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); +YY_BUFFER_STATE cmDependsJava_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); + +void *cmDependsJava_yyalloc (yy_size_t ,yyscan_t yyscanner ); +void *cmDependsJava_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); +void cmDependsJava_yyfree (void * ,yyscan_t yyscanner ); + +/* Begin user sect3 */ + +#define cmDependsJava_yywrap(yyscanner) (/*CONSTCOND*/1) +#define YY_SKIP_YYWRAP + +#define yytext_ptr yytext_r + +#ifdef YY_HEADER_EXPORT_START_CONDITIONS +#define INITIAL 0 +#define comment 1 +#define string 2 + +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +int cmDependsJava_yylex_init (yyscan_t* scanner); + +int cmDependsJava_yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); + +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int cmDependsJava_yylex_destroy (yyscan_t yyscanner ); + +int cmDependsJava_yyget_debug (yyscan_t yyscanner ); + +void cmDependsJava_yyset_debug (int debug_flag ,yyscan_t yyscanner ); + +YY_EXTRA_TYPE cmDependsJava_yyget_extra (yyscan_t yyscanner ); + +void cmDependsJava_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); + +FILE *cmDependsJava_yyget_in (yyscan_t yyscanner ); + +void cmDependsJava_yyset_in (FILE * _in_str ,yyscan_t yyscanner ); + +FILE *cmDependsJava_yyget_out (yyscan_t yyscanner ); + +void cmDependsJava_yyset_out (FILE * _out_str ,yyscan_t yyscanner ); + + int cmDependsJava_yyget_leng (yyscan_t yyscanner ); + +char *cmDependsJava_yyget_text (yyscan_t yyscanner ); + +int cmDependsJava_yyget_lineno (yyscan_t yyscanner ); + +void cmDependsJava_yyset_lineno (int _line_number ,yyscan_t yyscanner ); + +int cmDependsJava_yyget_column (yyscan_t yyscanner ); + +void cmDependsJava_yyset_column (int _column_no ,yyscan_t yyscanner ); + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int cmDependsJava_yywrap (yyscan_t yyscanner ); +#else +extern int cmDependsJava_yywrap (yyscan_t yyscanner ); +#endif +#endif + +#ifndef yytext_ptr +static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); +#endif + +#ifndef YY_NO_INPUT + +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k */ +#define YY_READ_BUF_SIZE 16384 +#else +#define YY_READ_BUF_SIZE 8192 +#endif /* __ia64__ */ +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL_IS_OURS 1 + +extern int cmDependsJava_yylex (yyscan_t yyscanner); + +#define YY_DECL int cmDependsJava_yylex (yyscan_t yyscanner) +#endif /* !YY_DECL */ + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + +#undef YY_NEW_FILE +#undef YY_FLUSH_BUFFER +#undef yy_set_bol +#undef yy_new_buffer +#undef yy_set_interactive +#undef YY_DO_BEFORE_ACTION + +#ifdef YY_DECL_IS_OURS +#undef YY_DECL_IS_OURS +#undef YY_DECL +#endif + +#line 174 "cmDependsJavaLexer.in.l" + + +#line 335 "cmDependsJavaLexer.h" +#undef cmDependsJava_yyIN_HEADER +#endif /* cmDependsJava_yyHEADER_H */ diff --git a/Source/LexerParser/cmDependsJavaLexer.in.l b/Source/LexerParser/cmDependsJavaLexer.in.l new file mode 100644 index 0000000..8cb42b1 --- /dev/null +++ b/Source/LexerParser/cmDependsJavaLexer.in.l @@ -0,0 +1,174 @@ +%{ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +/* + +This file must be translated to C++ and modified to build everywhere. + +Run flex >= 2.6 like this: + + flex --nounistd -DFLEXINT_H --prefix=cmDependsJava_yy --header-file=cmDependsJavaLexer.h -ocmDependsJavaLexer.cxx cmDependsJavaLexer.in.l + +Modify cmDependsJavaLexer.cxx: + - remove trailing whitespace: sed -i 's/\s*$//' cmDependsJavaLexer.h cmDependsJavaLexer.cxx + - remove blank lines at end of file + - #include "cmStandardLexer.h" at the top + - add cast in yy_scan_bytes for loop condition of _yybytes_len to size_t + +*/ + +/* IWYU pragma: no_forward_declare yyguts_t */ + +#include + +#include "cmDependsJavaParserHelper.h" + +/* Replace the lexer input function. */ +#undef YY_INPUT +#define YY_INPUT(buf, result, max_size) \ + { result = yyextra->LexInput(buf, max_size); } + +/* Include the set of tokens from the parser. */ +#include "cmDependsJavaParserTokens.h" + +#define KEYWORD yylvalp->str = 0 +#define SYMBOL yylvalp->str = 0 +#define PRIMITIVE yylvalp->str = 0 + +/*--------------------------------------------------------------------------*/ +%} + +%option reentrant +%option noyywrap +%pointer + +%x comment +%x string + +%% +"/*" { BEGIN(comment); } +"*/" { BEGIN(INITIAL); } +.|\n {} + +\" { BEGIN(string); } +\" { BEGIN(INITIAL); return jp_STRINGLITERAL; } +. {} + +abstract { KEYWORD; return jp_ABSTRACT; } +assert { KEYWORD; return jp_ASSERT; } +boolean { KEYWORD; return jp_BOOLEAN_TYPE; } +break { KEYWORD; return jp_BREAK; } +byte { KEYWORD; return jp_BYTE_TYPE; } +case { KEYWORD; return jp_CASE; } +catch { KEYWORD; return jp_CATCH; } +char { KEYWORD; return jp_CHAR_TYPE; } +class { KEYWORD; return jp_CLASS; } +continue { KEYWORD; return jp_CONTINUE; } +default { KEYWORD; return jp_DEFAULT; } +do { KEYWORD; return jp_DO; } +double { KEYWORD; return jp_DOUBLE_TYPE; } +else { KEYWORD; return jp_ELSE; } +extends { KEYWORD; return jp_EXTENDS; } +final { KEYWORD; return jp_FINAL; } +finally { KEYWORD; return jp_FINALLY; } +float { KEYWORD; return jp_FLOAT_TYPE; } +for { KEYWORD; return jp_FOR; } +if { KEYWORD; return jp_IF; } +implements { KEYWORD; return jp_IMPLEMENTS; } +import { KEYWORD; return jp_IMPORT; } +instanceof { KEYWORD; return jp_INSTANCEOF; } +int { KEYWORD; return jp_INT_TYPE; } +interface { KEYWORD; return jp_INTERFACE; } +long { KEYWORD; return jp_LONG_TYPE; } +native { KEYWORD; return jp_NATIVE; } +new { KEYWORD; return jp_NEW; } +package { KEYWORD; return jp_PACKAGE; } +private { KEYWORD; return jp_PRIVATE; } +protected { KEYWORD; return jp_PROTECTED; } +public { KEYWORD; return jp_PUBLIC; } +return { KEYWORD; return jp_RETURN; } +short { KEYWORD; return jp_SHORT_TYPE; } +static { KEYWORD; return jp_STATIC; } +strictfp { KEYWORD; return jp_STRICTFP; } +super { KEYWORD; return jp_SUPER; } +switch { KEYWORD; return jp_SWITCH; } +synchronized { KEYWORD; return jp_SYNCHRONIZED; } +this { KEYWORD; return jp_THIS; } +throw { KEYWORD; return jp_THROW; } +throws { KEYWORD; return jp_THROWS; } +transient { KEYWORD; return jp_TRANSIENT; } +try { KEYWORD; return jp_TRY; } +void { KEYWORD; return jp_VOID; } +volatile { KEYWORD; return jp_VOLATILE; } +while { KEYWORD; return jp_WHILE; } + +(true|false) { PRIMITIVE; return jp_BOOLEANLITERAL; } +\'([^\\]|\\.|\\u[0-9a-fA-F]*|\\[0-7]*)\' { PRIMITIVE; return jp_CHARACTERLITERAL; } +(0|[0-9]+)[lL]? { PRIMITIVE; return jp_DECIMALINTEGERLITERAL; } +([0-9]+\.[0-9]*|\.[0-9]+|[0-9]+)([eE][+\-]?[0-9]+)?[fFdD]? { PRIMITIVE; return jp_FLOATINGPOINTLITERAL; } +0[xX][0-9a-fA-F]+[lL]? { PRIMITIVE; return jp_HEXINTEGERLITERAL; } +null { PRIMITIVE; return jp_NULLLITERAL; } + +"&" { SYMBOL; return jp_AND; } +"&&" { SYMBOL; return jp_ANDAND; } +"&=" { SYMBOL; return jp_ANDEQUALS; } +"\]" { SYMBOL; return jp_BRACKETEND; } +"\[" { SYMBOL; return jp_BRACKETSTART; } +"\^" { SYMBOL; return jp_CARROT; } +"\^=" { SYMBOL; return jp_CARROTEQUALS; } +":" { SYMBOL; return jp_COLON; } +"," { SYMBOL; return jp_COMMA; } +"}" { SYMBOL; return jp_CURLYEND; } +"{" { SYMBOL; return jp_CURLYSTART; } +"/" { SYMBOL; return jp_DIVIDE; } +"/=" { SYMBOL; return jp_DIVIDEEQUALS; } +"\$" { SYMBOL; return jp_DOLLAR; } +"\." { SYMBOL; return jp_DOT; } +"=" { SYMBOL; return jp_EQUALS; } +"==" { SYMBOL; return jp_EQUALSEQUALS; } +"\!" { SYMBOL; return jp_EXCLAMATION; } +"\!=" { SYMBOL; return jp_EXCLAMATIONEQUALS; } +">" { SYMBOL; return jp_GREATER; } +">=" { SYMBOL; return jp_GTEQUALS; } +">>" { SYMBOL; return jp_GTGT; } +">>=" { SYMBOL; return jp_GTGTEQUALS; } +">>>" { SYMBOL; return jp_GTGTGT; } +">>>=" { SYMBOL; return jp_GTGTGTEQUALS; } +"<<=" { SYMBOL; return jp_LESLESEQUALS; } +"<" { SYMBOL; return jp_LESSTHAN; } +"<=" { SYMBOL; return jp_LTEQUALS; } +"<<" { SYMBOL; return jp_LTLT; } +"-" { SYMBOL; return jp_MINUS; } +"-=" { SYMBOL; return jp_MINUSEQUALS; } +"--" { SYMBOL; return jp_MINUSMINUS; } +"\)" { SYMBOL; return jp_PAREEND; } +"\(" { SYMBOL; return jp_PARESTART; } +"%" { SYMBOL; return jp_PERCENT; } +"%=" { SYMBOL; return jp_PERCENTEQUALS; } +"\|" { SYMBOL; return jp_PIPE; } +"\|=" { SYMBOL; return jp_PIPEEQUALS; } +"\|\|" { SYMBOL; return jp_PIPEPIPE; } +"\+" { SYMBOL; return jp_PLUS; } +"\+=" { SYMBOL; return jp_PLUSEQUALS; } +"\+\+" { SYMBOL; return jp_PLUSPLUS; } +"\?" { SYMBOL; return jp_QUESTION; } +";" { SYMBOL; return jp_SEMICOL; } +"\~" { SYMBOL; return jp_TILDE; } +"\*" { SYMBOL; return jp_TIMES; } +"\*=" { SYMBOL; return jp_TIMESEQUALS; } + +[a-z_A-Z][a-z_0-9A-Z]* { + yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + return jp_NAME; +} + +\/\/.*\n { } +[ \f\t\n\r] { } +. { + std::cerr << "Unknown character: " << yytext[0] + << " (" << (int)yytext[0] << ")" << std::endl; + yyextra->Error("Unknown character"); + return jp_ERROR; +} + +%% diff --git a/Source/LexerParser/cmDependsJavaParser.cxx b/Source/LexerParser/cmDependsJavaParser.cxx new file mode 100644 index 0000000..bc45d45 --- /dev/null +++ b/Source/LexerParser/cmDependsJavaParser.cxx @@ -0,0 +1,6421 @@ +/* A Bison parser, made by GNU Bison 3.0.4. */ + +/* Bison implementation for Yacc-like parsers in C + + Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* C LALR(1) parser skeleton written by Richard Stallman, by + simplifying the original so-called "semantic" parser. */ + +/* All symbols defined below should begin with yy or YY, to avoid + infringing on user name space. This should be done even for local + variables, as they might otherwise be expanded by user macros. + There are some unavoidable exceptions within include files to + define necessary library symbols; they are noted "INFRINGES ON + USER NAME SPACE" below. */ + +/* Identify Bison output. */ +#define YYBISON 1 + +/* Bison version. */ +#define YYBISON_VERSION "3.0.4" + +/* Skeleton name. */ +#define YYSKELETON_NAME "yacc.c" + +/* Pure parsers. */ +#define YYPURE 1 + +/* Push parsers. */ +#define YYPUSH 0 + +/* Pull parsers. */ +#define YYPULL 1 + + +/* Substitute the variable and function names. */ +#define yyparse cmDependsJava_yyparse +#define yylex cmDependsJava_yylex +#define yyerror cmDependsJava_yyerror +#define yydebug cmDependsJava_yydebug +#define yynerrs cmDependsJava_yynerrs + + +/* Copy the first part of user declarations. */ +#line 1 "cmDependsJavaParser.y" /* yacc.c:339 */ + +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +/* + +This file must be translated to C and modified to build everywhere. + +Run bison like this: + + bison --yacc --name-prefix=cmDependsJava_yy --defines=cmDependsJavaParserTokens.h -ocmDependsJavaParser.cxx cmDependsJavaParser.y + +Modify cmDependsJavaParser.cxx: + - "#if 0" out yyerrorlab block in range ["goto yyerrlab1", "yyerrlab1:"] + +*/ + +#include "cmConfigure.h" // IWYU pragma: keep + +#include +#include +#include + +#define yyGetParser (cmDependsJava_yyget_extra(yyscanner)) + +/*-------------------------------------------------------------------------*/ +#include "cmDependsJavaParserHelper.h" /* Interface to parser object. */ +#include "cmDependsJavaLexer.h" /* Interface to lexer object. */ +#include "cmDependsJavaParserTokens.h" /* Need YYSTYPE for YY_DECL. */ + +/* Forward declare the lexer entry point. */ +YY_DECL; + +/* Helper function to forward error callback from parser. */ +static void cmDependsJava_yyerror(yyscan_t yyscanner, const char* message); + +#define YYMAXDEPTH 1000000 + + +#define jpCheckEmpty(cnt) yyGetParser->CheckEmpty(__LINE__, cnt, yyvsp); +#define jpElementStart(cnt) yyGetParser->PrepareElement(&yyval) +#define jpStoreClass(str) yyGetParser->AddClassFound(str); yyGetParser->DeallocateParserType(&(str)) +/* Disable some warnings in the generated code. */ +#ifdef _MSC_VER +# pragma warning (disable: 4102) /* Unused goto label. */ +# pragma warning (disable: 4065) /* Switch statement contains default but no case. */ +#endif + +#line 120 "cmDependsJavaParser.cxx" /* yacc.c:339 */ + +# ifndef YY_NULLPTR +# if defined __cplusplus && 201103L <= __cplusplus +# define YY_NULLPTR nullptr +# else +# define YY_NULLPTR 0 +# endif +# endif + +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 1 +#endif + +/* In a future release of Bison, this section will be replaced + by #include "cmDependsJavaParserTokens.h". */ +#ifndef YY_CMDEPENDSJAVA_YY_CMDEPENDSJAVAPARSERTOKENS_H_INCLUDED +# define YY_CMDEPENDSJAVA_YY_CMDEPENDSJAVAPARSERTOKENS_H_INCLUDED +/* Debug traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif +#if YYDEBUG +extern int cmDependsJava_yydebug; +#endif + +/* Token type. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + enum yytokentype + { + jp_ABSTRACT = 258, + jp_ASSERT = 259, + jp_BOOLEAN_TYPE = 260, + jp_BREAK = 261, + jp_BYTE_TYPE = 262, + jp_CASE = 263, + jp_CATCH = 264, + jp_CHAR_TYPE = 265, + jp_CLASS = 266, + jp_CONTINUE = 267, + jp_DEFAULT = 268, + jp_DO = 269, + jp_DOUBLE_TYPE = 270, + jp_ELSE = 271, + jp_EXTENDS = 272, + jp_FINAL = 273, + jp_FINALLY = 274, + jp_FLOAT_TYPE = 275, + jp_FOR = 276, + jp_IF = 277, + jp_IMPLEMENTS = 278, + jp_IMPORT = 279, + jp_INSTANCEOF = 280, + jp_INT_TYPE = 281, + jp_INTERFACE = 282, + jp_LONG_TYPE = 283, + jp_NATIVE = 284, + jp_NEW = 285, + jp_PACKAGE = 286, + jp_PRIVATE = 287, + jp_PROTECTED = 288, + jp_PUBLIC = 289, + jp_RETURN = 290, + jp_SHORT_TYPE = 291, + jp_STATIC = 292, + jp_STRICTFP = 293, + jp_SUPER = 294, + jp_SWITCH = 295, + jp_SYNCHRONIZED = 296, + jp_THIS = 297, + jp_THROW = 298, + jp_THROWS = 299, + jp_TRANSIENT = 300, + jp_TRY = 301, + jp_VOID = 302, + jp_VOLATILE = 303, + jp_WHILE = 304, + jp_BOOLEANLITERAL = 305, + jp_CHARACTERLITERAL = 306, + jp_DECIMALINTEGERLITERAL = 307, + jp_FLOATINGPOINTLITERAL = 308, + jp_HEXINTEGERLITERAL = 309, + jp_NULLLITERAL = 310, + jp_STRINGLITERAL = 311, + jp_NAME = 312, + jp_AND = 313, + jp_ANDAND = 314, + jp_ANDEQUALS = 315, + jp_BRACKETEND = 316, + jp_BRACKETSTART = 317, + jp_CARROT = 318, + jp_CARROTEQUALS = 319, + jp_COLON = 320, + jp_COMMA = 321, + jp_CURLYEND = 322, + jp_CURLYSTART = 323, + jp_DIVIDE = 324, + jp_DIVIDEEQUALS = 325, + jp_DOLLAR = 326, + jp_DOT = 327, + jp_EQUALS = 328, + jp_EQUALSEQUALS = 329, + jp_EXCLAMATION = 330, + jp_EXCLAMATIONEQUALS = 331, + jp_GREATER = 332, + jp_GTEQUALS = 333, + jp_GTGT = 334, + jp_GTGTEQUALS = 335, + jp_GTGTGT = 336, + jp_GTGTGTEQUALS = 337, + jp_LESLESEQUALS = 338, + jp_LESSTHAN = 339, + jp_LTEQUALS = 340, + jp_LTLT = 341, + jp_MINUS = 342, + jp_MINUSEQUALS = 343, + jp_MINUSMINUS = 344, + jp_PAREEND = 345, + jp_PARESTART = 346, + jp_PERCENT = 347, + jp_PERCENTEQUALS = 348, + jp_PIPE = 349, + jp_PIPEEQUALS = 350, + jp_PIPEPIPE = 351, + jp_PLUS = 352, + jp_PLUSEQUALS = 353, + jp_PLUSPLUS = 354, + jp_QUESTION = 355, + jp_SEMICOL = 356, + jp_TILDE = 357, + jp_TIMES = 358, + jp_TIMESEQUALS = 359, + jp_ERROR = 360 + }; +#endif +/* Tokens. */ +#define jp_ABSTRACT 258 +#define jp_ASSERT 259 +#define jp_BOOLEAN_TYPE 260 +#define jp_BREAK 261 +#define jp_BYTE_TYPE 262 +#define jp_CASE 263 +#define jp_CATCH 264 +#define jp_CHAR_TYPE 265 +#define jp_CLASS 266 +#define jp_CONTINUE 267 +#define jp_DEFAULT 268 +#define jp_DO 269 +#define jp_DOUBLE_TYPE 270 +#define jp_ELSE 271 +#define jp_EXTENDS 272 +#define jp_FINAL 273 +#define jp_FINALLY 274 +#define jp_FLOAT_TYPE 275 +#define jp_FOR 276 +#define jp_IF 277 +#define jp_IMPLEMENTS 278 +#define jp_IMPORT 279 +#define jp_INSTANCEOF 280 +#define jp_INT_TYPE 281 +#define jp_INTERFACE 282 +#define jp_LONG_TYPE 283 +#define jp_NATIVE 284 +#define jp_NEW 285 +#define jp_PACKAGE 286 +#define jp_PRIVATE 287 +#define jp_PROTECTED 288 +#define jp_PUBLIC 289 +#define jp_RETURN 290 +#define jp_SHORT_TYPE 291 +#define jp_STATIC 292 +#define jp_STRICTFP 293 +#define jp_SUPER 294 +#define jp_SWITCH 295 +#define jp_SYNCHRONIZED 296 +#define jp_THIS 297 +#define jp_THROW 298 +#define jp_THROWS 299 +#define jp_TRANSIENT 300 +#define jp_TRY 301 +#define jp_VOID 302 +#define jp_VOLATILE 303 +#define jp_WHILE 304 +#define jp_BOOLEANLITERAL 305 +#define jp_CHARACTERLITERAL 306 +#define jp_DECIMALINTEGERLITERAL 307 +#define jp_FLOATINGPOINTLITERAL 308 +#define jp_HEXINTEGERLITERAL 309 +#define jp_NULLLITERAL 310 +#define jp_STRINGLITERAL 311 +#define jp_NAME 312 +#define jp_AND 313 +#define jp_ANDAND 314 +#define jp_ANDEQUALS 315 +#define jp_BRACKETEND 316 +#define jp_BRACKETSTART 317 +#define jp_CARROT 318 +#define jp_CARROTEQUALS 319 +#define jp_COLON 320 +#define jp_COMMA 321 +#define jp_CURLYEND 322 +#define jp_CURLYSTART 323 +#define jp_DIVIDE 324 +#define jp_DIVIDEEQUALS 325 +#define jp_DOLLAR 326 +#define jp_DOT 327 +#define jp_EQUALS 328 +#define jp_EQUALSEQUALS 329 +#define jp_EXCLAMATION 330 +#define jp_EXCLAMATIONEQUALS 331 +#define jp_GREATER 332 +#define jp_GTEQUALS 333 +#define jp_GTGT 334 +#define jp_GTGTEQUALS 335 +#define jp_GTGTGT 336 +#define jp_GTGTGTEQUALS 337 +#define jp_LESLESEQUALS 338 +#define jp_LESSTHAN 339 +#define jp_LTEQUALS 340 +#define jp_LTLT 341 +#define jp_MINUS 342 +#define jp_MINUSEQUALS 343 +#define jp_MINUSMINUS 344 +#define jp_PAREEND 345 +#define jp_PARESTART 346 +#define jp_PERCENT 347 +#define jp_PERCENTEQUALS 348 +#define jp_PIPE 349 +#define jp_PIPEEQUALS 350 +#define jp_PIPEPIPE 351 +#define jp_PLUS 352 +#define jp_PLUSEQUALS 353 +#define jp_PLUSPLUS 354 +#define jp_QUESTION 355 +#define jp_SEMICOL 356 +#define jp_TILDE 357 +#define jp_TIMES 358 +#define jp_TIMESEQUALS 359 +#define jp_ERROR 360 + +/* Value type. */ + + + +int cmDependsJava_yyparse (yyscan_t yyscanner); + +#endif /* !YY_CMDEPENDSJAVA_YY_CMDEPENDSJAVAPARSERTOKENS_H_INCLUDED */ + +/* Copy the second part of user declarations. */ + +#line 375 "cmDependsJavaParser.cxx" /* yacc.c:358 */ + +#ifdef short +# undef short +#endif + +#ifdef YYTYPE_UINT8 +typedef YYTYPE_UINT8 yytype_uint8; +#else +typedef unsigned char yytype_uint8; +#endif + +#ifdef YYTYPE_INT8 +typedef YYTYPE_INT8 yytype_int8; +#else +typedef signed char yytype_int8; +#endif + +#ifdef YYTYPE_UINT16 +typedef YYTYPE_UINT16 yytype_uint16; +#else +typedef unsigned short int yytype_uint16; +#endif + +#ifdef YYTYPE_INT16 +typedef YYTYPE_INT16 yytype_int16; +#else +typedef short int yytype_int16; +#endif + +#ifndef YYSIZE_T +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif ! defined YYSIZE_T +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned int +# endif +#endif + +#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) + +#ifndef YY_ +# if defined YYENABLE_NLS && YYENABLE_NLS +# if ENABLE_NLS +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_(Msgid) dgettext ("bison-runtime", Msgid) +# endif +# endif +# ifndef YY_ +# define YY_(Msgid) Msgid +# endif +#endif + +#ifndef YY_ATTRIBUTE +# if (defined __GNUC__ \ + && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ + || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C +# define YY_ATTRIBUTE(Spec) __attribute__(Spec) +# else +# define YY_ATTRIBUTE(Spec) /* empty */ +# endif +#endif + +#ifndef YY_ATTRIBUTE_PURE +# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) +#endif + +#ifndef YY_ATTRIBUTE_UNUSED +# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) +#endif + +#if !defined _Noreturn \ + && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) +# if defined _MSC_VER && 1200 <= _MSC_VER +# define _Noreturn __declspec (noreturn) +# else +# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) +# endif +#endif + +/* Suppress unused-variable warnings by "using" E. */ +#if ! defined lint || defined __GNUC__ +# define YYUSE(E) ((void) (E)) +#else +# define YYUSE(E) /* empty */ +#endif + +#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ +/* Suppress an incorrect diagnostic about yylval being uninitialized. */ +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") +#else +# define YY_INITIAL_VALUE(Value) Value +#endif +#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END +#endif +#ifndef YY_INITIAL_VALUE +# define YY_INITIAL_VALUE(Value) /* Nothing. */ +#endif + + +#if ! defined yyoverflow || YYERROR_VERBOSE + +/* The parser invokes alloca or malloc; define the necessary symbols. */ + +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# elif defined __BUILTIN_VA_ARG_INCR +# include /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca +# else +# define YYSTACK_ALLOC alloca +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS +# include /* INFRINGES ON USER NAME SPACE */ + /* Use EXIT_SUCCESS as a witness for stdlib.h. */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's 'empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +# endif +# else +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined EXIT_SUCCESS \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined EXIT_SUCCESS +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined EXIT_SUCCESS +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# endif +#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ + + +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + +/* A type that is properly aligned for any stack member. */ +union yyalloc +{ + yytype_int16 yyss_alloc; + YYSTYPE yyvs_alloc; +}; + +/* The size of the maximum gap between one aligned stack and the next. */ +# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) + +/* The size of an array large to enough to hold all stacks, each with + N elements. */ +# define YYSTACK_BYTES(N) \ + ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + + YYSTACK_GAP_MAXIMUM) + +# define YYCOPY_NEEDED 1 + +/* Relocate STACK from its old location to the new one. The + local variables YYSIZE and YYSTACKSIZE give the old and new number of + elements in the stack, and YYPTR gives the new location of the + stack. Advance YYPTR to a properly aligned location for the next + stack. */ +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (0) + +#endif + +#if defined YYCOPY_NEEDED && YYCOPY_NEEDED +/* Copy COUNT objects from SRC to DST. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(Dst, Src, Count) \ + __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) +# else +# define YYCOPY(Dst, Src, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (Dst)[yyi] = (Src)[yyi]; \ + } \ + while (0) +# endif +# endif +#endif /* !YYCOPY_NEEDED */ + +/* YYFINAL -- State number of the termination state. */ +#define YYFINAL 23 +/* YYLAST -- Last index in YYTABLE. */ +#define YYLAST 2215 + +/* YYNTOKENS -- Number of terminals. */ +#define YYNTOKENS 106 +/* YYNNTS -- Number of nonterminals. */ +#define YYNNTS 158 +/* YYNRULES -- Number of rules. */ +#define YYNRULES 351 +/* YYNSTATES -- Number of states. */ +#define YYNSTATES 575 + +/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned + by yylex, with out-of-bounds checking. */ +#define YYUNDEFTOK 2 +#define YYMAXUTOK 360 + +#define YYTRANSLATE(YYX) \ + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) + +/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM + as returned by yylex, without out-of-bounds checking. */ +static const yytype_uint8 yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105 +}; + +#if YYDEBUG + /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ +static const yytype_uint16 yyrline[] = +{ + 0, 179, 179, 188, 196, 204, 212, 220, 228, 237, + 245, 254, 262, 271, 276, 281, 286, 291, 296, 301, + 306, 312, 320, 329, 339, 348, 357, 365, 375, 381, + 388, 395, 401, 408, 417, 427, 437, 446, 454, 463, + 472, 478, 487, 493, 502, 508, 517, 529, 537, 546, + 558, 571, 579, 587, 596, 604, 613, 613, 613, 614, + 615, 615, 615, 615, 615, 615, 616, 619, 629, 638, + 647, 656, 666, 672, 681, 690, 699, 707, 716, 725, + 731, 740, 748, 756, 764, 773, 781, 790, 796, 804, + 813, 821, 830, 839, 848, 856, 865, 873, 881, 890, + 899, 909, 916, 926, 936, 943, 950, 953, 959, 969, + 979, 989, 995, 1005, 1015, 1025, 1034, 1044, 1055, 1065, + 1072, 1082, 1091, 1101, 1110, 1120, 1126, 1136, 1145, 1155, + 1165, 1172, 1181, 1190, 1199, 1208, 1216, 1225, 1234, 1244, + 1254, 1263, 1273, 1283, 1290, 1299, 1309, 1318, 1328, 1337, + 1344, 1354, 1363, 1373, 1382, 1391, 1401, 1411, 1420, 1430, + 1439, 1448, 1457, 1466, 1475, 1485, 1494, 1503, 1512, 1521, + 1531, 1540, 1549, 1558, 1567, 1576, 1585, 1594, 1603, 1612, + 1621, 1630, 1640, 1650, 1661, 1671, 1681, 1690, 1699, 1708, + 1717, 1726, 1735, 1745, 1755, 1765, 1775, 1782, 1789, 1796, + 1806, 1813, 1823, 1833, 1842, 1852, 1861, 1871, 1878, 1885, + 1892, 1900, 1907, 1917, 1924, 1934, 1944, 1951, 1961, 1970, + 1980, 1990, 1999, 2009, 2018, 2028, 2039, 2046, 2053, 2064, + 2074, 2084, 2094, 2103, 2113, 2120, 2130, 2139, 2149, 2156, + 2166, 2175, 2185, 2194, 2200, 2209, 2218, 2227, 2236, 2246, + 2256, 2263, 2273, 2280, 2290, 2299, 2309, 2318, 2327, 2336, + 2346, 2353, 2363, 2372, 2382, 2392, 2398, 2405, 2415, 2425, + 2435, 2446, 2456, 2467, 2477, 2488, 2498, 2508, 2517, 2526, + 2535, 2544, 2554, 2564, 2574, 2583, 2592, 2601, 2610, 2620, + 2630, 2640, 2649, 2658, 2667, 2677, 2686, 2695, 2702, 2711, + 2720, 2729, 2739, 2748, 2757, 2767, 2776, 2785, 2794, 2804, + 2813, 2822, 2831, 2840, 2849, 2859, 2868, 2877, 2887, 2896, + 2906, 2915, 2925, 2934, 2944, 2953, 2963, 2972, 2982, 2991, + 3001, 3010, 3020, 3030, 3040, 3049, 3059, 3068, 3077, 3086, + 3095, 3104, 3113, 3122, 3131, 3140, 3149, 3158, 3168, 3178, + 3188, 3197 +}; +#endif + +#if YYDEBUG || YYERROR_VERBOSE || 1 +/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ +static const char *const yytname[] = +{ + "$end", "error", "$undefined", "jp_ABSTRACT", "jp_ASSERT", + "jp_BOOLEAN_TYPE", "jp_BREAK", "jp_BYTE_TYPE", "jp_CASE", "jp_CATCH", + "jp_CHAR_TYPE", "jp_CLASS", "jp_CONTINUE", "jp_DEFAULT", "jp_DO", + "jp_DOUBLE_TYPE", "jp_ELSE", "jp_EXTENDS", "jp_FINAL", "jp_FINALLY", + "jp_FLOAT_TYPE", "jp_FOR", "jp_IF", "jp_IMPLEMENTS", "jp_IMPORT", + "jp_INSTANCEOF", "jp_INT_TYPE", "jp_INTERFACE", "jp_LONG_TYPE", + "jp_NATIVE", "jp_NEW", "jp_PACKAGE", "jp_PRIVATE", "jp_PROTECTED", + "jp_PUBLIC", "jp_RETURN", "jp_SHORT_TYPE", "jp_STATIC", "jp_STRICTFP", + "jp_SUPER", "jp_SWITCH", "jp_SYNCHRONIZED", "jp_THIS", "jp_THROW", + "jp_THROWS", "jp_TRANSIENT", "jp_TRY", "jp_VOID", "jp_VOLATILE", + "jp_WHILE", "jp_BOOLEANLITERAL", "jp_CHARACTERLITERAL", + "jp_DECIMALINTEGERLITERAL", "jp_FLOATINGPOINTLITERAL", + "jp_HEXINTEGERLITERAL", "jp_NULLLITERAL", "jp_STRINGLITERAL", "jp_NAME", + "jp_AND", "jp_ANDAND", "jp_ANDEQUALS", "jp_BRACKETEND", + "jp_BRACKETSTART", "jp_CARROT", "jp_CARROTEQUALS", "jp_COLON", + "jp_COMMA", "jp_CURLYEND", "jp_CURLYSTART", "jp_DIVIDE", + "jp_DIVIDEEQUALS", "jp_DOLLAR", "jp_DOT", "jp_EQUALS", "jp_EQUALSEQUALS", + "jp_EXCLAMATION", "jp_EXCLAMATIONEQUALS", "jp_GREATER", "jp_GTEQUALS", + "jp_GTGT", "jp_GTGTEQUALS", "jp_GTGTGT", "jp_GTGTGTEQUALS", + "jp_LESLESEQUALS", "jp_LESSTHAN", "jp_LTEQUALS", "jp_LTLT", "jp_MINUS", + "jp_MINUSEQUALS", "jp_MINUSMINUS", "jp_PAREEND", "jp_PARESTART", + "jp_PERCENT", "jp_PERCENTEQUALS", "jp_PIPE", "jp_PIPEEQUALS", + "jp_PIPEPIPE", "jp_PLUS", "jp_PLUSEQUALS", "jp_PLUSPLUS", "jp_QUESTION", + "jp_SEMICOL", "jp_TILDE", "jp_TIMES", "jp_TIMESEQUALS", "jp_ERROR", + "$accept", "Goal", "Literal", "IntegerLiteral", "Type", "PrimitiveType", + "ReferenceType", "ClassOrInterfaceType", "ClassType", "InterfaceType", + "ArrayType", "Name", "SimpleName", "Identifier", "QualifiedName", + "SimpleType", "CompilationUnit", "PackageDeclarationopt", + "ImportDeclarations", "TypeDeclarations", "PackageDeclaration", + "ImportDeclaration", "SingleTypeImportDeclaration", + "TypeImportOnDemandDeclaration", "TypeDeclaration", "Modifiers", + "Modifier", "ClassHeader", "ClassDeclaration", "Modifiersopt", "Super", + "Interfaces", "InterfaceTypeList", "ClassBody", "ClassBodyDeclarations", + "ClassBodyDeclaration", "ClassMemberDeclaration", "FieldDeclaration", + "VariableDeclarators", "VariableDeclarator", "VariableDeclaratorId", + "VariableInitializer", "MethodDeclaration", "MethodHeader", "Throwsopt", + "MethodDeclarator", "FormalParameterListopt", "FormalParameterList", + "FormalParameter", "Throws", "ClassTypeList", "MethodBody", + "StaticInitializer", "ConstructorDeclaration", "ConstructorDeclarator", + "ConstructorBody", "ExplicitConstructorInvocationopt", + "ExplicitConstructorInvocation", "InterfaceHeader", + "InterfaceDeclaration", "ExtendsInterfacesopt", "ExtendsInterfaces", + "InterfaceBody", "InterfaceMemberDeclarations", + "InterfaceMemberDeclaration", "ConstantDeclaration", + "AbstractMethodDeclaration", "Semicols", "ArrayInitializer", + "VariableInitializersOptional", "VariableInitializers", "Block", + "BlockStatementsopt", "BlockStatements", "BlockStatement", + "LocalVariableDeclarationStatement", "LocalVariableDeclaration", + "Statement", "StatementNoShortIf", + "StatementWithoutTrailingSubstatement", "EmptyStatement", + "LabeledStatement", "LabeledStatementNoShortIf", "ExpressionStatement", + "StatementExpression", "IfThenStatement", "IfThenElseStatement", + "IfThenElseStatementNoShortIf", "SwitchStatement", "SwitchBlock", + "SwitchLabelsopt", "SwitchBlockStatementGroups", + "SwitchBlockStatementGroup", "SwitchLabels", "SwitchLabel", + "WhileStatement", "WhileStatementNoShortIf", "DoStatement", + "ForStatement", "ForUpdateopt", "ForInitopt", "ForStatementNoShortIf", + "Expressionopt", "ForInit", "ForUpdate", "StatementExpressionList", + "AssertStatement", "BreakStatement", "Identifieropt", + "ContinueStatement", "ReturnStatement", "ThrowStatement", + "SynchronizedStatement", "TryStatement", "Catchesopt", "Catches", + "CatchClause", "Finally", "Primary", "PrimaryNoNewArray", + "ClassInstanceCreationExpression", "ClassBodyOpt", "ArgumentListopt", + "ArgumentList", "ArrayCreationExpression", "Dimsopt", "DimExprs", + "DimExpr", "Dims", "FieldAccess", "MethodInvocation", "ArrayAccess", + "PostfixExpression", "PostIncrementExpression", + "PostDecrementExpression", "UnaryExpression", "PreIncrementExpression", + "PreDecrementExpression", "UnaryExpressionNotPlusMinus", + "CastExpression", "MultiplicativeExpression", "AdditiveExpression", + "ShiftExpression", "RelationalExpression", "EqualityExpression", + "AndExpression", "ExclusiveOrExpression", "InclusiveOrExpression", + "ConditionalAndExpression", "ConditionalOrExpression", + "ConditionalExpression", "AssignmentExpression", "Assignment", + "LeftHandSide", "AssignmentOperator", "Expression", "ConstantExpression", + "New", YY_NULLPTR +}; +#endif + +# ifdef YYPRINT +/* YYTOKNUM[NUM] -- (External) token number corresponding to the + (internal) symbol number NUM (which must be that of a token). */ +static const yytype_uint16 yytoknum[] = +{ + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, + 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, + 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, + 355, 356, 357, 358, 359, 360 +}; +# endif + +#define YYPACT_NINF -503 + +#define yypact_value_is_default(Yystate) \ + (!!((Yystate) == (-503))) + +#define YYTABLE_NINF -336 + +#define yytable_value_is_error(Yytable_value) \ + 0 + + /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +static const yytype_int16 yypact[] = +{ + 159, 1039, 236, -503, -503, -503, -503, -503, -503, -503, + -503, -503, -503, -503, -503, -503, 186, -503, 56, -503, + -503, -503, 178, -503, 35, -503, 21, -503, 248, 1039, + 273, -503, -503, -503, -503, -503, -503, -503, 78, -503, + -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, + -503, -503, 2088, -503, 32, -503, 16, 245, -503, 28, + -503, -503, 1039, 1039, -503, 80, 206, -503, 129, 129, + 1039, 221, 228, 194, -503, -503, 225, -503, -503, 234, + 164, 206, -503, -503, -503, -503, -503, -503, -503, 1039, + -503, 1039, 233, -503, -503, 739, -503, -503, -503, -503, + -49, -503, -503, -503, 1116, -503, -503, 1276, -503, 129, + 129, 40, -503, -503, -503, 122, 212, 265, -503, 215, + -503, -503, 219, 739, -503, 222, 224, -503, -503, -503, + 1820, 129, 129, 1627, 237, 238, -503, 1820, 241, 239, + 242, 283, 1820, 233, 266, -503, -503, -503, -503, -503, + -503, -503, 1820, 1820, 1820, -503, -503, -503, 129, 284, + 476, 293, 2067, -503, 349, -503, 296, 1366, -503, -503, + 264, -503, -503, -503, -503, -503, 268, -503, -503, -503, + -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, + 294, 305, 72, -503, 2070, 88, 2084, 121, 130, 148, + -503, -503, -503, 2111, 1039, 281, 133, 281, -25, -503, + 126, 133, 314, 315, 315, 921, 1039, 308, -503, -503, + -503, -503, 277, -503, 1820, 1820, 1820, 1820, 1820, 317, + 284, 545, -503, -503, 121, -503, -503, -503, -503, -503, + -503, -503, 73, 124, 163, 59, 196, 323, 319, 290, + 324, 18, -503, -503, -503, -30, -503, 285, 286, 242, + 342, 1941, 1820, 291, -503, 129, 1820, 1820, 129, 292, + 385, 1820, 96, -503, -503, -503, 310, -503, -503, 329, + 387, 1085, 3, 1820, 1627, 129, -503, -503, -503, -503, + 175, 1820, -503, -503, -503, -503, -503, -503, -503, -503, + -503, -503, -503, -503, -503, -503, 1820, 339, 339, 311, + 921, 343, -503, 129, -503, 344, 1766, -503, -503, 346, + 1039, 313, 347, -503, -503, 353, -503, 307, -503, -503, + -503, 6, 545, 326, -503, -503, 1820, 1820, 1820, 1820, + 1820, 1820, 1820, 1820, 1039, 1820, 1820, 1820, 1820, 1820, + 1820, 1820, 1820, 1820, 1820, 1820, 1820, 1820, -503, -503, + -503, 330, 2067, -503, -503, 327, -503, 354, 334, -503, + 345, 335, 340, 348, -503, 351, 416, 232, -503, 356, + -503, -503, 376, -503, 357, 377, -503, -503, 329, -503, + 358, 390, -503, 1085, 339, -503, 154, 339, 154, 1820, + 362, -503, -503, -503, 1766, -503, -503, -503, -503, 129, + -503, 2088, 1039, 1456, -503, 363, 70, 93, 1874, -503, + -503, -503, 73, 73, 124, 124, 124, -503, 163, 163, + 163, 163, 59, 59, 196, 323, 319, 290, 324, 383, + 360, 1820, 1820, 1995, 1699, 1820, 386, 233, 1820, 2088, + 233, -503, -503, 1627, -503, -503, 1820, 1820, -503, 394, + -503, -503, 315, -503, -503, -503, 369, -503, -503, 396, + 404, 410, -503, -503, 26, 113, -503, 407, 1820, 1874, + -503, 1820, -503, 391, 374, -503, 393, 395, 397, 411, + -503, 466, 471, -503, -503, -503, -503, 399, -503, -503, + -503, 400, 401, -503, -503, -503, 402, -503, 206, -503, + 1766, 1820, 1820, -503, -503, -503, -503, 403, 1995, 1941, + 1820, 1820, 1699, 1627, -503, 34, -503, 233, -503, -503, + -503, -503, 405, 412, -503, 413, -503, 354, 406, 418, + 421, -503, -503, 1820, 429, 430, -503, 1186, -503, -503, + 419, 422, 1627, 1820, 1699, 1699, -503, 447, -503, -503, + 1555, -503, -503, -503, -503, 423, 497, -503, -503, 1995, + 1699, 432, -503, 1699, -503 +}; + + /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE does not specify something else to do. Zero + means the default is an error. */ +static const yytype_uint16 yydefact[] = +{ + 40, 0, 0, 2, 42, 41, 20, 13, 17, 19, + 18, 15, 16, 14, 38, 31, 0, 37, 0, 28, + 30, 29, 0, 1, 44, 32, 0, 46, 0, 0, + 72, 43, 47, 48, 34, 35, 33, 36, 0, 60, + 61, 62, 58, 57, 56, 59, 66, 63, 64, 65, + 53, 45, 73, 54, 0, 51, 0, 125, 52, 0, + 49, 55, 0, 0, 79, 0, 0, 68, 0, 0, + 0, 0, 126, 0, 24, 74, 23, 25, 76, 75, + 72, 0, 70, 69, 67, 123, 127, 130, 124, 0, + 50, 0, 59, 78, 84, 0, 80, 81, 85, 86, + 0, 82, 83, 71, 72, 128, 77, 72, 114, 38, + 0, 11, 12, 21, 22, 23, 28, 101, 96, 97, + 113, 129, 134, 0, 138, 0, 136, 131, 132, 133, + 0, 226, 226, 0, 0, 0, 350, 216, 0, 0, + 63, 243, 0, 0, 0, 5, 6, 9, 4, 10, + 8, 7, 0, 0, 0, 182, 242, 3, 0, 22, + 333, 30, 73, 155, 0, 170, 0, 72, 151, 153, + 0, 154, 159, 171, 160, 172, 0, 161, 162, 173, + 163, 174, 164, 181, 175, 176, 177, 179, 178, 180, + 277, 240, 245, 241, 246, 247, 248, 0, 189, 190, + 187, 188, 186, 0, 0, 0, 101, 92, 0, 88, + 90, 101, 0, 26, 27, 72, 0, 0, 102, 98, + 135, 140, 139, 137, 0, 0, 0, 0, 0, 37, + 0, 278, 245, 247, 291, 280, 281, 298, 284, 285, + 288, 294, 302, 305, 309, 315, 318, 320, 322, 324, + 326, 328, 330, 348, 331, 0, 227, 0, 0, 0, + 0, 213, 0, 0, 217, 0, 0, 0, 0, 0, + 234, 0, 278, 246, 248, 290, 0, 289, 92, 158, + 0, 0, 0, 252, 0, 0, 148, 152, 156, 185, + 0, 0, 283, 282, 345, 346, 338, 336, 343, 344, + 342, 341, 339, 347, 340, 337, 0, 37, 24, 0, + 72, 0, 100, 0, 87, 0, 0, 99, 265, 0, + 0, 0, 106, 107, 111, 110, 119, 115, 141, 293, + 287, 37, 278, 0, 286, 292, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 223, 225, + 228, 0, 0, 219, 221, 0, 214, 218, 0, 229, + 268, 0, 0, 269, 230, 0, 0, 232, 236, 0, + 244, 279, 0, 351, 0, 253, 254, 183, 157, 270, + 267, 0, 332, 0, 260, 262, 0, 260, 0, 252, + 0, 104, 89, 93, 143, 91, 95, 94, 266, 0, + 117, 72, 0, 72, 116, 0, 26, 27, 244, 300, + 301, 299, 304, 303, 307, 308, 306, 314, 311, 313, + 310, 312, 316, 317, 319, 321, 323, 325, 327, 0, + 0, 0, 216, 0, 0, 252, 0, 0, 252, 72, + 0, 233, 237, 0, 275, 271, 0, 252, 276, 0, + 256, 263, 261, 258, 257, 259, 0, 103, 146, 0, + 144, 109, 108, 112, 0, 243, 120, 0, 0, 0, + 296, 0, 224, 0, 0, 222, 0, 0, 0, 30, + 193, 0, 159, 166, 167, 168, 169, 0, 200, 196, + 231, 0, 0, 239, 207, 255, 0, 264, 250, 142, + 145, 252, 252, 118, 295, 297, 329, 0, 211, 213, + 0, 0, 0, 0, 273, 198, 274, 0, 272, 251, + 249, 147, 0, 0, 209, 0, 212, 220, 0, 0, + 0, 184, 194, 0, 0, 0, 201, 72, 203, 238, + 0, 0, 0, 216, 0, 0, 349, 0, 206, 197, + 202, 204, 122, 121, 210, 0, 0, 208, 205, 211, + 0, 0, 195, 0, 215 +}; + + /* YYPGOTO[NTERM-NUM]. */ +static const yytype_int16 yypgoto[] = +{ + -503, -503, -503, -503, -85, 2, 181, -41, -198, -45, + -87, -1, 431, 14, -503, -503, -503, -503, -503, -503, + -503, -503, -503, -503, 448, -81, -47, -503, 7, -23, + -503, 462, -503, -64, -503, -503, -503, 425, -146, 217, + 123, -391, -503, 427, -101, 424, 230, -503, -360, -503, + -503, -503, -503, -503, -503, -503, -503, -503, -503, 439, + -503, -503, -503, -503, -503, -503, -503, -503, -110, -503, + -503, -77, 138, -12, -163, -503, -250, -13, -421, -414, + -503, -503, -503, -503, -252, -503, -503, -503, -503, -503, + -503, -503, -503, -503, 5, -503, -503, -503, -503, -16, + 36, -503, -418, -503, -503, -502, -503, -503, 440, -503, + -503, -503, -503, -503, -503, -503, 179, -503, -503, -503, + -54, -503, -341, -503, -503, -149, 255, -136, 102, 652, + 101, 688, 145, 157, 201, -98, 289, 338, -384, -503, + -59, -58, -92, -57, 213, 226, 218, 223, 227, -503, + 95, 274, 350, -503, -503, 660, -503, -503 +}; + + /* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int16 yydefgoto[] = +{ + -1, 2, 156, 157, 158, 229, 112, 113, 75, 78, + 230, 231, 19, 20, 21, 22, 3, 4, 24, 30, + 5, 31, 32, 33, 51, 52, 53, 54, 163, 164, + 65, 66, 79, 67, 80, 96, 97, 98, 208, 209, + 210, 405, 99, 100, 217, 206, 321, 322, 323, 218, + 325, 119, 101, 102, 117, 327, 413, 476, 57, 58, + 71, 72, 88, 104, 127, 128, 129, 222, 406, 469, + 470, 165, 166, 167, 168, 169, 170, 171, 491, 172, + 173, 174, 493, 175, 176, 177, 178, 494, 179, 499, + 545, 525, 546, 547, 548, 180, 495, 181, 182, 535, + 365, 496, 263, 366, 536, 367, 183, 184, 257, 185, + 186, 187, 188, 189, 376, 377, 378, 451, 190, 191, + 232, 530, 384, 385, 193, 415, 394, 395, 214, 194, + 233, 196, 234, 235, 236, 237, 238, 239, 240, 241, + 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 203, 306, 386, 557, 204 +}; + + /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule whose + number is the opposite. If YYTABLE_NINF, syntax error. */ +static const yytype_int16 yytable[] = +{ + 18, 82, 83, 17, 287, 61, 309, 56, 114, 364, + 110, 363, 279, 468, 34, 108, 537, 103, 324, 107, + 159, 74, 77, 120, 484, 86, 162, 68, 38, 77, + 492, 17, 34, 383, 480, 357, 114, 55, 110, 34, + 36, 313, 543, 69, 105, 35, 106, 544, 77, 62, + 77, 472, 118, 192, 275, 63, 277, 95, 466, 29, + 15, 76, 76, 35, 17, 17, 270, 537, 212, 76, + 35, 358, 17, 36, 16, 114, 314, 285, 15, 192, + 159, 123, 84, 85, 344, 15, 162, 55, 76, 502, + 76, 17, 16, 17, 115, 515, -260, 111, 265, 16, + 64, 541, 212, 63, 497, 312, 160, 501, 492, 111, + 317, 122, -37, 192, 355, 61, 506, 511, 356, 531, + 260, 161, 115, 205, 207, 111, 329, 330, 26, 334, + 335, 73, 319, 566, 567, 565, 345, 346, -192, 388, + 492, 492, 336, 347, 348, 256, 256, 161, 64, 572, + 59, 272, 574, 272, -191, 319, 492, 27, 281, 492, + -261, 115, -192, 308, 111, 337, 160, 39, 282, 111, + 532, 533, 278, -192, 159, 74, 338, 216, -191, 60, + 362, 161, 40, 479, 212, 268, 15, 283, 315, -191, + 1, 485, 320, 41, 26, 311, 42, 43, 44, 316, + 16, 92, 46, 76, 512, 47, 307, 192, 195, 48, + 292, 339, 49, 213, 473, 76, 319, 389, 17, -280, + 293, 340, 404, 272, 272, 332, 272, 272, 331, -280, + 192, 93, 15, 114, 195, 409, 23, -281, 419, 420, + 421, 375, 341, 25, 342, 460, 16, -281, 464, 343, + 28, -235, 197, 428, 429, 430, 431, 114, 461, 37, + 160, 461, 70, 111, 198, 50, 364, 364, 195, 363, + 349, 387, 350, -39, 64, 114, 39, 285, 197, 370, + 422, 423, 373, 424, 425, 426, 463, 320, 465, 87, + 198, 40, 432, 433, 89, 90, 36, 26, 161, 278, + 91, 107, 41, 215, 390, 42, 43, 44, 199, 216, + 45, 46, 197, 265, 47, 61, 219, 364, 48, 115, + 220, 49, 111, 221, 198, 223, 159, 278, 261, 262, + 266, 213, 162, 267, 199, 272, 272, 272, 272, 272, + 272, 272, 272, 115, 272, 272, 272, 272, 272, 272, + 272, 272, 272, 272, 272, 268, 280, 271, 284, 192, + 68, 115, 195, 286, 111, 288, 290, 291, 199, 289, + 500, 74, 310, 503, 50, 318, 326, 319, 328, 212, + 514, 351, 352, 354, 353, 195, 359, 360, 320, 192, + 192, 361, 369, 374, 375, 313, 200, 287, 381, 192, + 380, 393, 399, 410, 401, 403, 197, 408, 414, 396, + 398, 76, 160, 411, 17, 111, 418, 272, 198, 412, + 443, 441, 200, 278, 444, 446, 320, 161, 442, 197, + 447, 490, 159, 416, 417, 450, 445, 454, 362, 448, + 504, 198, 449, 456, 529, 201, 453, 455, 481, 457, + 549, 458, 467, 478, 498, 507, 200, 202, 489, 508, + 159, 482, 199, 509, 192, 192, 162, 161, 192, 192, + 510, 201, 315, 159, 513, 518, 522, 272, 272, 162, + 272, 517, 523, 202, 519, 199, 520, -165, 521, 524, + 526, 527, 528, 192, 558, 550, 462, 559, 192, 462, + 192, 192, 551, 552, 534, 201, 192, 553, 554, 387, + 542, 555, 568, 570, 195, 192, 192, 202, 160, 192, + 562, 111, 573, 563, 569, 427, 116, 81, 94, 124, + 402, 125, 471, -23, 211, 560, 489, 161, 281, 564, + 400, 490, 504, 126, 195, 195, 160, -23, 282, 111, + 200, 477, 561, 571, 195, 538, 452, 542, 197, 160, + 564, 161, 111, 397, 434, -278, 161, 283, 489, 489, + 198, 436, 258, 200, 161, -278, 516, 437, 435, 0, + 392, 0, 438, 0, 489, 0, 0, 489, 197, 197, + 0, 0, 0, 0, 0, 0, 0, 0, 197, 201, + 198, 198, 0, 0, 0, -333, 0, 281, 0, -333, + 198, 202, 0, 0, 199, -333, 0, 282, -333, 195, + 195, 0, 201, 195, 195, -333, 0, -333, -333, 0, + 0, 0, 0, -333, 202, 0, 283, 0, -333, 0, + -333, 0, 0, -333, 199, 199, 0, 0, 195, -333, + 0, 0, 0, 195, 199, 195, 195, 0, 0, 0, + 0, 195, 0, 197, 197, 0, 0, 197, 197, 0, + 195, 195, 0, 0, 195, 198, 198, 0, 0, 198, + 198, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 197, 0, 0, 0, 0, 197, 0, 197, + 197, 0, 200, 0, 198, 197, 0, 0, 0, 198, + 0, 198, 198, 0, 197, 197, 0, 198, 197, 199, + 199, 0, 0, 199, 199, 0, 198, 198, 0, 0, + 198, 0, 200, 200, 0, 0, 0, 0, 0, 0, + 0, 0, 200, 0, 6, 0, 7, 0, 199, 8, + 68, 201, 0, 199, 9, 199, 199, 0, 0, 10, + 0, 199, 0, 202, 0, 11, 69, 12, 0, 0, + 199, 199, 0, 0, 199, 13, 0, 0, 0, 0, + 0, 201, 201, 0, 0, 0, 109, 0, 0, 0, + 255, 201, 0, 202, 202, 0, 15, 264, 0, 0, + 0, 0, 269, 202, 273, 0, 273, 200, 200, 0, + 16, 200, 200, 276, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 200, 0, 0, 0, + 274, 200, 274, 200, 200, 0, 0, 0, 0, 200, + 0, 0, 0, 0, 0, 0, 201, 201, 200, 200, + 201, 201, 200, 0, 0, 0, 0, 0, 202, 202, + 0, 0, 202, 202, 0, 0, 273, 273, 0, 273, + 273, 0, 0, 0, 0, 201, 333, 0, 0, 0, + 201, 0, 201, 201, 0, 0, 0, 202, 201, 0, + 0, 0, 202, 0, 202, 202, 0, 201, 201, 0, + 202, 201, 274, 274, 0, 274, 274, 0, 0, 202, + 202, 0, 368, 202, 39, 0, 371, 372, 0, 0, + 0, 379, 0, 0, 0, 0, 0, 0, 0, 40, + 0, 382, 0, 0, 0, 0, 0, 0, 0, 0, + 41, 391, 0, 42, 43, 44, 0, 0, 45, 46, + 0, 0, 47, 0, 0, 0, 48, 0, 0, 49, + 0, 0, 0, 0, 0, 0, 407, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 273, 273, + 273, 273, 273, 273, 273, 273, 0, 273, 273, 273, + 273, 273, 273, 273, 273, 273, 273, 273, 0, 0, + 0, -105, 0, 0, 0, 0, 439, 440, 0, 0, + 0, 0, 0, 0, 274, 274, 274, 274, 274, 274, + 274, 274, 0, 274, 274, 274, 274, 274, 274, 274, + 274, 274, 274, 274, 6, 0, 7, 0, 0, 8, + 0, 0, 0, 459, 9, 0, 0, 0, 0, 10, + 0, 0, 0, 0, 407, 11, 0, 12, 0, 0, + 273, 0, 0, 0, 0, 13, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, + 6, 0, 7, 0, 0, 8, 15, 0, 0, 0, + 9, 483, 264, 0, 0, 10, 274, 0, 0, 0, + 16, 11, 0, 12, 0, 136, 505, 0, 0, 39, + 0, 13, 0, 0, 138, 0, 0, 141, 0, 0, + 273, 273, 14, 273, 40, 145, 146, 147, 148, 149, + 150, 151, 15, 0, 0, 41, 318, 0, 42, 43, + 44, 0, 0, 45, 46, 0, 16, 47, 0, 0, + 224, 48, 0, 0, 49, 0, 274, 274, 0, 274, + 407, 0, 225, 0, 152, 0, 226, 0, 0, 0, + 539, 540, 227, 121, 154, 0, 0, 228, 0, 39, + 130, 6, 131, 7, 543, 0, 8, 0, 132, 544, + 133, 9, 0, 556, 40, 0, 10, 134, 135, 0, + 0, 0, 11, 264, 12, 41, 136, 0, 42, 43, + 44, 137, 13, 45, 46, 138, 139, 140, 141, 142, + 0, 48, 143, 14, 49, 144, 145, 146, 147, 148, + 149, 150, 151, 15, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -199, 107, 0, 0, 16, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 152, 0, 153, 0, 39, + 130, 6, 131, 7, 0, 154, 8, 155, 132, 0, + 133, 9, 0, 0, 40, 0, 10, 134, 135, 0, + 0, 0, 11, 0, 12, 41, 136, 0, 42, 43, + 44, 137, 13, 45, 46, 138, 139, 140, 141, 142, + 0, 48, 143, 14, 49, 144, 145, 146, 147, 148, + 149, 150, 151, 15, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -149, 107, 0, 0, 16, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 152, 0, 153, 0, 39, + 130, 6, 131, 7, 0, 154, 8, 155, 132, 0, + 133, 9, 0, 0, 40, 0, 10, 134, 135, 0, + 0, 0, 11, 0, 12, 41, 136, 0, 42, 43, + 44, 137, 13, 45, 46, 138, 139, 140, 141, 142, + 0, 48, 143, 14, 49, 144, 145, 146, 147, 148, + 149, 150, 151, 15, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -150, 107, 0, 0, 16, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 152, 0, 153, 0, 39, + 130, 6, 131, 7, 0, 154, 8, 155, 132, 0, + 133, 9, 0, 0, 40, 0, 10, 134, 135, 0, + 0, 0, 11, 0, 12, 41, 136, 0, 42, 43, + 44, 137, 13, 45, 46, 474, 139, 140, 475, 142, + 0, 48, 143, 14, 49, 144, 145, 146, 147, 148, + 149, 150, 151, 15, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -149, 107, 0, 0, 16, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 152, 0, 153, 0, 0, + 0, 0, 0, 0, 0, 154, 0, 155, 39, 130, + 6, 131, 7, 0, 0, 8, -72, 132, 0, 133, + 9, 0, 0, 40, 0, 10, 134, 135, 0, 0, + 0, 11, 0, 12, 41, 136, 0, 42, 43, 44, + 137, 13, 45, 46, 138, 139, 140, 141, 142, 0, + 48, 143, 14, 49, 144, 145, 146, 147, 148, 149, + 150, 151, 15, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 107, 0, 0, 16, 0, 0, 0, + 0, 130, 6, 131, 7, 0, 0, 8, 0, 132, + 0, 133, 9, 0, 152, 0, 153, 10, 134, 135, + 0, 0, 0, 11, 154, 12, 155, 136, 0, 0, + 0, 0, 137, 13, 0, 0, 138, 139, 259, 141, + 142, 0, 0, 143, 14, 0, 144, 145, 146, 147, + 148, 149, 150, 151, 15, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 107, 0, 0, 16, 0, + 0, 0, 0, 130, 6, 131, 7, 0, 0, 8, + 0, 132, 0, 133, 9, 0, 152, 0, 153, 10, + 486, 487, 0, 0, 0, 11, 154, 12, 155, 136, + 0, 0, 0, 0, 137, 13, 0, 0, 138, 139, + 259, 141, 142, 0, 0, 143, 14, 0, 488, 145, + 146, 147, 148, 149, 150, 151, 15, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 107, 0, 0, + 16, 6, 0, 7, 0, 0, 8, 0, 0, 0, + 0, 9, 0, 0, 0, 0, 10, 0, 152, 0, + 153, 0, 11, 0, 12, 0, 136, 0, 154, 0, + 155, 0, 13, 0, 0, 138, 0, 0, 141, 0, + 0, 0, 0, 14, 0, 0, 145, 146, 147, 148, + 149, 150, 151, 15, 0, 6, 0, 7, 0, 0, + 8, 0, 0, 0, 404, 9, 0, 16, 0, 0, + 10, 224, 0, 0, 0, 0, 11, 0, 12, 0, + 136, 0, 0, 225, 0, 152, 13, 226, 0, 138, + 0, 0, 141, 227, 0, 154, 0, 14, 228, 0, + 145, 146, 147, 148, 149, 150, 151, 15, 0, 6, + 0, 7, 0, 0, 8, 0, 0, 0, 0, 9, + 0, 16, 0, 0, 10, 224, 0, 0, 0, 0, + 11, 0, 12, 0, 136, 0, 0, 225, 0, 152, + 13, 226, 0, 138, 0, 0, 141, 227, 0, 154, + 0, 14, 228, 0, 145, 146, 147, 148, 149, 150, + 151, 15, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 39, 16, 6, 0, 7, 224, + 0, 8, 0, 0, 0, 0, 9, 0, 0, 40, + 0, 10, 0, 0, 0, 226, 0, 11, 0, 12, + 41, 136, 0, 42, 43, 44, 228, 13, 45, 46, + 138, 0, 47, 141, 0, 0, 48, 0, 14, 49, + 0, 145, 146, 147, 148, 149, 150, 151, 15, 0, + 6, 0, 7, 0, 0, 8, 0, 0, 0, 0, + 9, 0, 16, 0, 0, 10, 0, 0, 0, 0, + 0, 11, 0, 12, 0, 136, 0, 0, 0, 0, + 152, 13, 153, 0, 138, 0, 0, 141, 0, 0, + 154, 0, 14, 0, 0, 145, 146, 147, 148, 149, + 150, 151, 15, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, + 39, 0, 6, 0, 7, 0, 0, 8, 0, 0, + 0, 0, 9, 0, 152, 40, 153, 10, 0, 0, + 0, 39, 0, 11, 154, 12, 41, 0, 0, 42, + 43, 44, 0, 13, 45, 46, 40, 0, 47, 0, + 0, 0, 48, 0, 14, 49, 0, 41, 0, 0, + 42, 43, 44, 0, 15, 45, 46, 0, 0, 47, + -334, 0, 0, 48, -334, 0, 49, 0, 16, 0, + -334, 0, 0, -334, -335, 0, 0, 0, -335, 0, + -334, 0, -334, -334, -335, 0, 0, -335, -334, 0, + 0, 0, 0, -334, -335, -334, -335, -335, -334, 0, + 0, 294, -335, 0, -334, 295, 0, -335, 0, -335, + 0, 296, -335, 0, 297, 0, 0, 0, -335, 0, + 0, 298, 0, 299, 300, 0, 0, 0, 0, 301, + 0, 0, 0, 0, 302, 0, 303, 0, 0, 304, + 0, 0, 0, 0, 0, 305 +}; + +static const yytype_int16 yycheck[] = +{ + 1, 65, 66, 1, 167, 52, 204, 30, 95, 261, + 95, 261, 158, 404, 11, 92, 518, 81, 216, 68, + 107, 62, 63, 100, 442, 70, 107, 11, 29, 70, + 444, 29, 11, 30, 418, 65, 123, 30, 123, 11, + 26, 66, 8, 27, 89, 42, 91, 13, 89, 17, + 91, 411, 101, 107, 152, 23, 154, 80, 399, 24, + 57, 62, 63, 42, 62, 63, 143, 569, 62, 70, + 42, 101, 70, 59, 71, 162, 101, 162, 57, 133, + 167, 104, 68, 69, 25, 57, 167, 80, 89, 449, + 91, 89, 71, 91, 95, 479, 90, 95, 72, 71, + 68, 522, 62, 23, 445, 206, 107, 448, 522, 107, + 211, 104, 72, 167, 96, 162, 457, 91, 100, 510, + 133, 107, 123, 109, 110, 123, 224, 225, 72, 227, + 228, 103, 62, 554, 555, 553, 77, 78, 66, 285, + 554, 555, 69, 84, 85, 131, 132, 133, 68, 570, + 72, 152, 573, 154, 66, 62, 570, 101, 62, 573, + 90, 162, 90, 204, 162, 92, 167, 3, 72, 167, + 511, 512, 158, 101, 261, 216, 103, 44, 90, 101, + 261, 167, 18, 90, 62, 72, 57, 91, 62, 101, + 31, 443, 215, 29, 72, 62, 32, 33, 34, 73, + 71, 37, 38, 204, 91, 41, 204, 261, 107, 45, + 89, 87, 48, 111, 412, 216, 62, 42, 216, 89, + 99, 97, 68, 224, 225, 226, 227, 228, 226, 99, + 284, 67, 57, 320, 133, 320, 0, 89, 336, 337, + 338, 9, 79, 57, 81, 394, 71, 99, 397, 86, + 72, 19, 107, 345, 346, 347, 348, 344, 394, 11, + 261, 397, 17, 261, 107, 101, 518, 519, 167, 519, + 74, 284, 76, 0, 68, 362, 3, 362, 133, 265, + 339, 340, 268, 341, 342, 343, 396, 310, 398, 68, + 133, 18, 349, 350, 66, 101, 282, 72, 284, 285, + 66, 68, 29, 91, 290, 32, 33, 34, 107, 44, + 37, 38, 167, 72, 41, 362, 101, 569, 45, 320, + 101, 48, 320, 101, 167, 101, 413, 313, 91, 91, + 91, 229, 413, 91, 133, 336, 337, 338, 339, 340, + 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, + 351, 352, 353, 354, 355, 72, 72, 91, 65, 413, + 11, 362, 261, 67, 362, 101, 72, 62, 167, 101, + 447, 412, 91, 450, 101, 61, 68, 62, 101, 62, + 478, 58, 63, 59, 94, 284, 101, 101, 411, 443, + 444, 49, 101, 101, 9, 66, 107, 560, 11, 453, + 90, 62, 91, 90, 61, 61, 261, 61, 101, 307, + 308, 412, 413, 66, 412, 413, 90, 418, 261, 66, + 66, 91, 133, 409, 90, 90, 449, 413, 101, 284, + 90, 444, 519, 331, 332, 19, 91, 61, 519, 91, + 453, 284, 91, 66, 508, 107, 90, 90, 65, 91, + 527, 61, 90, 90, 68, 61, 167, 107, 444, 90, + 547, 101, 261, 67, 518, 519, 547, 453, 522, 523, + 66, 133, 62, 560, 67, 101, 65, 478, 479, 560, + 481, 90, 16, 133, 91, 284, 91, 16, 91, 90, + 90, 90, 90, 547, 65, 90, 394, 67, 552, 397, + 554, 555, 90, 90, 101, 167, 560, 101, 90, 522, + 523, 90, 65, 16, 413, 569, 570, 167, 519, 573, + 101, 519, 90, 101, 101, 344, 95, 65, 80, 104, + 313, 104, 409, 57, 110, 547, 522, 523, 62, 552, + 310, 554, 555, 104, 443, 444, 547, 71, 72, 547, + 261, 413, 547, 569, 453, 519, 377, 570, 413, 560, + 573, 547, 560, 308, 351, 89, 552, 91, 554, 555, + 413, 353, 132, 284, 560, 99, 481, 354, 352, -1, + 306, -1, 355, -1, 570, -1, -1, 573, 443, 444, + -1, -1, -1, -1, -1, -1, -1, -1, 453, 261, + 443, 444, -1, -1, -1, 60, -1, 62, -1, 64, + 453, 261, -1, -1, 413, 70, -1, 72, 73, 518, + 519, -1, 284, 522, 523, 80, -1, 82, 83, -1, + -1, -1, -1, 88, 284, -1, 91, -1, 93, -1, + 95, -1, -1, 98, 443, 444, -1, -1, 547, 104, + -1, -1, -1, 552, 453, 554, 555, -1, -1, -1, + -1, 560, -1, 518, 519, -1, -1, 522, 523, -1, + 569, 570, -1, -1, 573, 518, 519, -1, -1, 522, + 523, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 547, -1, -1, -1, -1, 552, -1, 554, + 555, -1, 413, -1, 547, 560, -1, -1, -1, 552, + -1, 554, 555, -1, 569, 570, -1, 560, 573, 518, + 519, -1, -1, 522, 523, -1, 569, 570, -1, -1, + 573, -1, 443, 444, -1, -1, -1, -1, -1, -1, + -1, -1, 453, -1, 5, -1, 7, -1, 547, 10, + 11, 413, -1, 552, 15, 554, 555, -1, -1, 20, + -1, 560, -1, 413, -1, 26, 27, 28, -1, -1, + 569, 570, -1, -1, 573, 36, -1, -1, -1, -1, + -1, 443, 444, -1, -1, -1, 47, -1, -1, -1, + 130, 453, -1, 443, 444, -1, 57, 137, -1, -1, + -1, -1, 142, 453, 152, -1, 154, 518, 519, -1, + 71, 522, 523, 153, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 547, -1, -1, -1, + 152, 552, 154, 554, 555, -1, -1, -1, -1, 560, + -1, -1, -1, -1, -1, -1, 518, 519, 569, 570, + 522, 523, 573, -1, -1, -1, -1, -1, 518, 519, + -1, -1, 522, 523, -1, -1, 224, 225, -1, 227, + 228, -1, -1, -1, -1, 547, 226, -1, -1, -1, + 552, -1, 554, 555, -1, -1, -1, 547, 560, -1, + -1, -1, 552, -1, 554, 555, -1, 569, 570, -1, + 560, 573, 224, 225, -1, 227, 228, -1, -1, 569, + 570, -1, 262, 573, 3, -1, 266, 267, -1, -1, + -1, 271, -1, -1, -1, -1, -1, -1, -1, 18, + -1, 281, -1, -1, -1, -1, -1, -1, -1, -1, + 29, 291, -1, 32, 33, 34, -1, -1, 37, 38, + -1, -1, 41, -1, -1, -1, 45, -1, -1, 48, + -1, -1, -1, -1, -1, -1, 316, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 336, 337, + 338, 339, 340, 341, 342, 343, -1, 345, 346, 347, + 348, 349, 350, 351, 352, 353, 354, 355, -1, -1, + -1, 90, -1, -1, -1, -1, 356, 357, -1, -1, + -1, -1, -1, -1, 336, 337, 338, 339, 340, 341, + 342, 343, -1, 345, 346, 347, 348, 349, 350, 351, + 352, 353, 354, 355, 5, -1, 7, -1, -1, 10, + -1, -1, -1, 393, 15, -1, -1, -1, -1, 20, + -1, -1, -1, -1, 404, 26, -1, 28, -1, -1, + 418, -1, -1, -1, -1, 36, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 47, -1, -1, -1, + 5, -1, 7, -1, -1, 10, 57, -1, -1, -1, + 15, 441, 442, -1, -1, 20, 418, -1, -1, -1, + 71, 26, -1, 28, -1, 30, 456, -1, -1, 3, + -1, 36, -1, -1, 39, -1, -1, 42, -1, -1, + 478, 479, 47, 481, 18, 50, 51, 52, 53, 54, + 55, 56, 57, -1, -1, 29, 61, -1, 32, 33, + 34, -1, -1, 37, 38, -1, 71, 41, -1, -1, + 75, 45, -1, -1, 48, -1, 478, 479, -1, 481, + 510, -1, 87, -1, 89, -1, 91, -1, -1, -1, + 520, 521, 97, 67, 99, -1, -1, 102, -1, 3, + 4, 5, 6, 7, 8, -1, 10, -1, 12, 13, + 14, 15, -1, 543, 18, -1, 20, 21, 22, -1, + -1, -1, 26, 553, 28, 29, 30, -1, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, + -1, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 67, 68, -1, -1, 71, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 89, -1, 91, -1, 3, + 4, 5, 6, 7, -1, 99, 10, 101, 12, -1, + 14, 15, -1, -1, 18, -1, 20, 21, 22, -1, + -1, -1, 26, -1, 28, 29, 30, -1, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, + -1, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 67, 68, -1, -1, 71, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 89, -1, 91, -1, 3, + 4, 5, 6, 7, -1, 99, 10, 101, 12, -1, + 14, 15, -1, -1, 18, -1, 20, 21, 22, -1, + -1, -1, 26, -1, 28, 29, 30, -1, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, + -1, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 67, 68, -1, -1, 71, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 89, -1, 91, -1, 3, + 4, 5, 6, 7, -1, 99, 10, 101, 12, -1, + 14, 15, -1, -1, 18, -1, 20, 21, 22, -1, + -1, -1, 26, -1, 28, 29, 30, -1, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, + -1, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 67, 68, -1, -1, 71, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 89, -1, 91, -1, -1, + -1, -1, -1, -1, -1, 99, -1, 101, 3, 4, + 5, 6, 7, -1, -1, 10, 11, 12, -1, 14, + 15, -1, -1, 18, -1, 20, 21, 22, -1, -1, + -1, 26, -1, 28, 29, 30, -1, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, -1, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 68, -1, -1, 71, -1, -1, -1, + -1, 4, 5, 6, 7, -1, -1, 10, -1, 12, + -1, 14, 15, -1, 89, -1, 91, 20, 21, 22, + -1, -1, -1, 26, 99, 28, 101, 30, -1, -1, + -1, -1, 35, 36, -1, -1, 39, 40, 41, 42, + 43, -1, -1, 46, 47, -1, 49, 50, 51, 52, + 53, 54, 55, 56, 57, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 68, -1, -1, 71, -1, + -1, -1, -1, 4, 5, 6, 7, -1, -1, 10, + -1, 12, -1, 14, 15, -1, 89, -1, 91, 20, + 21, 22, -1, -1, -1, 26, 99, 28, 101, 30, + -1, -1, -1, -1, 35, 36, -1, -1, 39, 40, + 41, 42, 43, -1, -1, 46, 47, -1, 49, 50, + 51, 52, 53, 54, 55, 56, 57, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 68, -1, -1, + 71, 5, -1, 7, -1, -1, 10, -1, -1, -1, + -1, 15, -1, -1, -1, -1, 20, -1, 89, -1, + 91, -1, 26, -1, 28, -1, 30, -1, 99, -1, + 101, -1, 36, -1, -1, 39, -1, -1, 42, -1, + -1, -1, -1, 47, -1, -1, 50, 51, 52, 53, + 54, 55, 56, 57, -1, 5, -1, 7, -1, -1, + 10, -1, -1, -1, 68, 15, -1, 71, -1, -1, + 20, 75, -1, -1, -1, -1, 26, -1, 28, -1, + 30, -1, -1, 87, -1, 89, 36, 91, -1, 39, + -1, -1, 42, 97, -1, 99, -1, 47, 102, -1, + 50, 51, 52, 53, 54, 55, 56, 57, -1, 5, + -1, 7, -1, -1, 10, -1, -1, -1, -1, 15, + -1, 71, -1, -1, 20, 75, -1, -1, -1, -1, + 26, -1, 28, -1, 30, -1, -1, 87, -1, 89, + 36, 91, -1, 39, -1, -1, 42, 97, -1, 99, + -1, 47, 102, -1, 50, 51, 52, 53, 54, 55, + 56, 57, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 3, 71, 5, -1, 7, 75, + -1, 10, -1, -1, -1, -1, 15, -1, -1, 18, + -1, 20, -1, -1, -1, 91, -1, 26, -1, 28, + 29, 30, -1, 32, 33, 34, 102, 36, 37, 38, + 39, -1, 41, 42, -1, -1, 45, -1, 47, 48, + -1, 50, 51, 52, 53, 54, 55, 56, 57, -1, + 5, -1, 7, -1, -1, 10, -1, -1, -1, -1, + 15, -1, 71, -1, -1, 20, -1, -1, -1, -1, + -1, 26, -1, 28, -1, 30, -1, -1, -1, -1, + 89, 36, 91, -1, 39, -1, -1, 42, -1, -1, + 99, -1, 47, -1, -1, 50, 51, 52, 53, 54, + 55, 56, 57, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 71, -1, -1, -1, + 3, -1, 5, -1, 7, -1, -1, 10, -1, -1, + -1, -1, 15, -1, 89, 18, 91, 20, -1, -1, + -1, 3, -1, 26, 99, 28, 29, -1, -1, 32, + 33, 34, -1, 36, 37, 38, 18, -1, 41, -1, + -1, -1, 45, -1, 47, 48, -1, 29, -1, -1, + 32, 33, 34, -1, 57, 37, 38, -1, -1, 41, + 60, -1, -1, 45, 64, -1, 48, -1, 71, -1, + 70, -1, -1, 73, 60, -1, -1, -1, 64, -1, + 80, -1, 82, 83, 70, -1, -1, 73, 88, -1, + -1, -1, -1, 93, 80, 95, 82, 83, 98, -1, + -1, 60, 88, -1, 104, 64, -1, 93, -1, 95, + -1, 70, 98, -1, 73, -1, -1, -1, 104, -1, + -1, 80, -1, 82, 83, -1, -1, -1, -1, 88, + -1, -1, -1, -1, 93, -1, 95, -1, -1, 98, + -1, -1, -1, -1, -1, 104 +}; + + /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ +static const yytype_uint16 yystos[] = +{ + 0, 31, 107, 122, 123, 126, 5, 7, 10, 15, + 20, 26, 28, 36, 47, 57, 71, 111, 117, 118, + 119, 120, 121, 0, 124, 57, 72, 101, 72, 24, + 125, 127, 128, 129, 11, 42, 119, 11, 117, 3, + 18, 29, 32, 33, 34, 37, 38, 41, 45, 48, + 101, 130, 131, 132, 133, 134, 135, 164, 165, 72, + 101, 132, 17, 23, 68, 136, 137, 139, 11, 27, + 17, 166, 167, 103, 113, 114, 117, 113, 115, 138, + 140, 137, 139, 139, 119, 119, 115, 68, 168, 66, + 101, 66, 37, 67, 130, 135, 141, 142, 143, 148, + 149, 158, 159, 139, 169, 115, 115, 68, 177, 47, + 110, 111, 112, 113, 116, 117, 118, 160, 101, 157, + 177, 67, 134, 135, 143, 149, 165, 170, 171, 172, + 4, 6, 12, 14, 21, 22, 30, 35, 39, 40, + 41, 42, 43, 46, 49, 50, 51, 52, 53, 54, + 55, 56, 89, 91, 99, 101, 108, 109, 110, 116, + 117, 119, 131, 134, 135, 177, 178, 179, 180, 181, + 182, 183, 185, 186, 187, 189, 190, 191, 192, 194, + 201, 203, 204, 212, 213, 215, 216, 217, 218, 219, + 224, 225, 226, 230, 235, 236, 237, 238, 239, 240, + 242, 243, 258, 259, 263, 119, 151, 119, 144, 145, + 146, 151, 62, 234, 234, 91, 44, 150, 155, 101, + 101, 101, 173, 101, 75, 87, 91, 97, 102, 111, + 116, 117, 226, 236, 238, 239, 240, 241, 242, 243, + 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, + 254, 255, 256, 257, 258, 261, 119, 214, 214, 41, + 183, 91, 91, 208, 261, 72, 91, 91, 72, 261, + 177, 91, 117, 235, 237, 241, 261, 241, 119, 144, + 72, 62, 72, 91, 65, 110, 67, 180, 101, 101, + 72, 62, 89, 99, 60, 64, 70, 73, 80, 82, + 83, 88, 93, 95, 98, 104, 260, 111, 113, 114, + 91, 62, 150, 66, 101, 62, 73, 150, 61, 62, + 135, 152, 153, 154, 114, 156, 68, 161, 101, 241, + 241, 111, 117, 261, 241, 241, 69, 92, 103, 87, + 97, 79, 81, 86, 25, 77, 78, 84, 85, 74, + 76, 58, 63, 94, 59, 96, 100, 65, 101, 101, + 101, 49, 131, 182, 190, 206, 209, 211, 261, 101, + 119, 261, 261, 119, 101, 9, 220, 221, 222, 261, + 90, 11, 261, 30, 228, 229, 261, 183, 144, 42, + 119, 261, 257, 62, 232, 233, 234, 232, 234, 91, + 152, 61, 145, 61, 68, 147, 174, 261, 61, 110, + 90, 66, 66, 162, 101, 231, 234, 234, 90, 241, + 241, 241, 246, 246, 247, 247, 247, 112, 248, 248, + 248, 248, 249, 249, 250, 251, 252, 253, 254, 261, + 261, 91, 101, 66, 90, 91, 90, 90, 91, 91, + 19, 223, 222, 90, 61, 90, 66, 91, 61, 261, + 231, 233, 234, 174, 231, 174, 228, 90, 147, 175, + 176, 146, 154, 114, 39, 42, 163, 178, 90, 90, + 244, 65, 101, 261, 208, 190, 21, 22, 49, 119, + 183, 184, 185, 188, 193, 202, 207, 228, 68, 195, + 177, 228, 154, 177, 183, 261, 228, 61, 90, 67, + 66, 91, 91, 67, 241, 244, 256, 90, 101, 91, + 91, 91, 65, 16, 90, 197, 90, 90, 90, 139, + 227, 147, 228, 228, 101, 205, 210, 211, 206, 261, + 261, 184, 183, 8, 13, 196, 198, 199, 200, 177, + 90, 90, 90, 101, 90, 90, 261, 262, 65, 67, + 179, 200, 101, 101, 183, 208, 184, 184, 65, 101, + 16, 205, 184, 90, 184 +}; + + /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint16 yyr1[] = +{ + 0, 106, 107, 108, 108, 108, 108, 108, 108, 109, + 109, 110, 110, 111, 111, 111, 111, 111, 111, 111, + 111, 112, 112, 113, 114, 115, 116, 116, 117, 117, + 118, 119, 119, 120, 120, 120, 120, 121, 121, 122, + 123, 123, 124, 124, 125, 125, 126, 127, 127, 128, + 129, 130, 130, 130, 131, 131, 132, 132, 132, 132, + 132, 132, 132, 132, 132, 132, 132, 133, 134, 134, + 134, 134, 135, 135, 136, 137, 138, 138, 139, 140, + 140, 141, 141, 141, 141, 142, 142, 143, 144, 144, + 145, 145, 146, 146, 147, 147, 148, 148, 148, 149, + 149, 150, 150, 151, 151, 152, 152, 153, 153, 154, + 155, 156, 156, 157, 158, 159, 159, 160, 161, 162, + 162, 163, 163, 164, 165, 166, 166, 167, 167, 168, + 169, 169, 170, 170, 170, 170, 170, 170, 171, 172, + 173, 173, 174, 175, 175, 175, 176, 176, 177, 178, + 178, 179, 179, 180, 180, 180, 181, 182, 182, 183, + 183, 183, 183, 183, 183, 184, 184, 184, 184, 184, + 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, + 185, 185, 186, 187, 188, 189, 190, 190, 190, 190, + 190, 190, 190, 191, 192, 193, 194, 195, 196, 196, + 197, 197, 198, 199, 199, 200, 200, 201, 202, 203, + 204, 205, 205, 206, 206, 207, 208, 208, 209, 209, + 210, 211, 211, 212, 212, 213, 214, 214, 215, 216, + 217, 218, 219, 219, 220, 220, 221, 221, 222, 223, + 224, 224, 225, 225, 225, 225, 225, 225, 225, 226, + 227, 227, 228, 228, 229, 229, 230, 230, 230, 230, + 231, 231, 232, 232, 233, 234, 234, 235, 235, 235, + 235, 236, 236, 236, 236, 237, 237, 238, 238, 238, + 238, 238, 239, 240, 241, 241, 241, 241, 241, 242, + 243, 244, 244, 244, 244, 245, 245, 245, 246, 246, + 246, 246, 247, 247, 247, 248, 248, 248, 248, 249, + 249, 249, 249, 249, 249, 250, 250, 250, 251, 251, + 252, 252, 253, 253, 254, 254, 255, 255, 256, 256, + 257, 257, 258, 259, 259, 259, 260, 260, 260, 260, + 260, 260, 260, 260, 260, 260, 260, 260, 261, 262, + 263, 263 +}; + + /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = +{ + 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, + 1, 1, 2, 3, 3, 3, 3, 1, 1, 3, + 0, 1, 0, 2, 0, 2, 3, 1, 1, 3, + 5, 1, 1, 1, 1, 2, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 3, 2, 3, + 3, 4, 0, 1, 2, 2, 1, 3, 3, 0, + 2, 1, 1, 1, 1, 1, 1, 4, 1, 3, + 1, 3, 1, 3, 1, 1, 2, 2, 3, 4, + 4, 0, 1, 4, 3, 0, 1, 1, 3, 3, + 2, 1, 3, 1, 2, 4, 5, 4, 4, 0, + 2, 5, 5, 3, 3, 0, 1, 2, 3, 3, + 0, 2, 1, 1, 1, 2, 1, 2, 1, 2, + 1, 2, 3, 0, 1, 2, 1, 3, 3, 0, + 1, 1, 2, 1, 1, 1, 2, 3, 2, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 3, 3, 2, 1, 1, 1, 1, + 1, 1, 1, 5, 7, 7, 5, 4, 0, 1, + 0, 2, 2, 1, 2, 3, 2, 5, 5, 7, + 9, 0, 1, 0, 1, 9, 0, 1, 1, 1, + 1, 1, 3, 3, 5, 3, 0, 1, 3, 3, + 3, 5, 3, 4, 0, 1, 1, 2, 5, 2, + 1, 1, 1, 1, 3, 1, 1, 1, 1, 6, + 0, 1, 0, 1, 1, 3, 4, 4, 4, 4, + 0, 1, 1, 2, 3, 2, 3, 3, 3, 3, + 3, 4, 6, 6, 6, 4, 4, 1, 1, 3, + 1, 1, 2, 2, 1, 1, 2, 2, 1, 2, + 2, 1, 2, 2, 1, 5, 4, 5, 1, 3, + 3, 3, 1, 3, 3, 1, 3, 3, 3, 1, + 3, 3, 3, 3, 3, 1, 3, 3, 1, 3, + 1, 3, 1, 3, 1, 3, 1, 3, 1, 5, + 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 3 +}; + + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab + + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } \ + else \ + { \ + yyerror (yyscanner, YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ +while (0) + +/* Error token number */ +#define YYTERROR 1 +#define YYERRCODE 256 + + + +/* Enable debugging if requested. */ +#if YYDEBUG + +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) + +/* This macro is provided for backward compatibility. */ +#ifndef YY_LOCATION_PRINT +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +#endif + + +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value, yyscanner); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) + + +/*----------------------------------------. +| Print this symbol's value on YYOUTPUT. | +`----------------------------------------*/ + +static void +yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, yyscan_t yyscanner) +{ + FILE *yyo = yyoutput; + YYUSE (yyo); + YYUSE (yyscanner); + if (!yyvaluep) + return; +# ifdef YYPRINT + if (yytype < YYNTOKENS) + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# endif + YYUSE (yytype); +} + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +static void +yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, yyscan_t yyscanner) +{ + YYFPRINTF (yyoutput, "%s %s (", + yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); + + yy_symbol_value_print (yyoutput, yytype, yyvaluep, yyscanner); + YYFPRINTF (yyoutput, ")"); +} + +/*------------------------------------------------------------------. +| yy_stack_print -- Print the state stack from its BOTTOM up to its | +| TOP (included). | +`------------------------------------------------------------------*/ + +static void +yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) +{ + YYFPRINTF (stderr, "Stack now"); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } + YYFPRINTF (stderr, "\n"); +} + +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (0) + + +/*------------------------------------------------. +| Report that the YYRULE is going to be reduced. | +`------------------------------------------------*/ + +static void +yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule, yyscan_t yyscanner) +{ + unsigned long int yylno = yyrline[yyrule]; + int yynrhs = yyr2[yyrule]; + int yyi; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", + yyrule - 1, yylno); + /* The symbols being reduced. */ + for (yyi = 0; yyi < yynrhs; yyi++) + { + YYFPRINTF (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, + yystos[yyssp[yyi + 1 - yynrhs]], + &(yyvsp[(yyi + 1) - (yynrhs)]) + , yyscanner); + YYFPRINTF (stderr, "\n"); + } +} + +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyssp, yyvsp, Rule, yyscanner); \ +} while (0) + +/* Nonzero means print parse trace. It is left uninitialized so that + multiple parsers can coexist. */ +int yydebug; +#else /* !YYDEBUG */ +# define YYDPRINTF(Args) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) +#endif /* !YYDEBUG */ + + +/* YYINITDEPTH -- initial size of the parser's stacks. */ +#ifndef YYINITDEPTH +# define YYINITDEPTH 200 +#endif + +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only + if the built-in stack extension method is used). + + Do not make this value too large; the results are undefined if + YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) + evaluated with infinite-precision integer arithmetic. */ + +#ifndef YYMAXDEPTH +# define YYMAXDEPTH 10000 +#endif + + +#if YYERROR_VERBOSE + +# ifndef yystrlen +# if defined __GLIBC__ && defined _STRING_H +# define yystrlen strlen +# else +/* Return the length of YYSTR. */ +static YYSIZE_T +yystrlen (const char *yystr) +{ + YYSIZE_T yylen; + for (yylen = 0; yystr[yylen]; yylen++) + continue; + return yylen; +} +# endif +# endif + +# ifndef yystpcpy +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# define yystpcpy stpcpy +# else +/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in + YYDEST. */ +static char * +yystpcpy (char *yydest, const char *yysrc) +{ + char *yyd = yydest; + const char *yys = yysrc; + + while ((*yyd++ = *yys++) != '\0') + continue; + + return yyd - 1; +} +# endif +# endif + +# ifndef yytnamerr +/* Copy to YYRES the contents of YYSTR after stripping away unnecessary + quotes and backslashes, so that it's suitable for yyerror. The + heuristic is that double-quoting is unnecessary unless the string + contains an apostrophe, a comma, or backslash (other than + backslash-backslash). YYSTR is taken from yytname. If YYRES is + null, do not copy; instead, return the length of what the result + would have been. */ +static YYSIZE_T +yytnamerr (char *yyres, const char *yystr) +{ + if (*yystr == '"') + { + YYSIZE_T yyn = 0; + char const *yyp = yystr; + + for (;;) + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } + + if (! yyres) + return yystrlen (yystr); + + return yystpcpy (yyres, yystr) - yyres; +} +# endif + +/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message + about the unexpected token YYTOKEN for the state stack whose top is + YYSSP. + + Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is + not large enough to hold the message. In that case, also set + *YYMSG_ALLOC to the required number of bytes. Return 2 if the + required number of bytes is too large to store. */ +static int +yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, + yytype_int16 *yyssp, int yytoken) +{ + YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); + YYSIZE_T yysize = yysize0; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + /* Internationalized format string. */ + const char *yyformat = YY_NULLPTR; + /* Arguments of yyformat. */ + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + /* Number of reported tokens (one for the "unexpected", one per + "expected"). */ + int yycount = 0; + + /* There are many possibilities here to consider: + - If this state is a consistent state with a default action, then + the only way this function was invoked is if the default action + is an error action. In that case, don't check for expected + tokens because there are none. + - The only way there can be no lookahead present (in yychar) is if + this state is a consistent state with a default action. Thus, + detecting the absence of a lookahead is sufficient to determine + that there is no unexpected or expected token to report. In that + case, just report a simple "syntax error". + - Don't assume there isn't a lookahead just because this state is a + consistent state with a default action. There might have been a + previous inconsistent state, consistent state with a non-default + action, or user semantic action that manipulated yychar. + - Of course, the expected token list depends on states to have + correct lookahead information, and it depends on the parser not + to perform extra reductions after fetching a lookahead from the + scanner and before detecting a syntax error. Thus, state merging + (from LALR or IELR) and default reductions corrupt the expected + token list. However, the list is correct for canonical LR with + one exception: it will still contain any token that will not be + accepted due to an error action in a later state. + */ + if (yytoken != YYEMPTY) + { + int yyn = yypact[*yyssp]; + yyarg[yycount++] = yytname[yytoken]; + if (!yypact_value_is_default (yyn)) + { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR + && !yytable_value_is_error (yytable[yyx + yyn])) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + break; + } + yyarg[yycount++] = yytname[yyx]; + { + YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); + if (! (yysize <= yysize1 + && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } + } + } + } + + switch (yycount) + { +# define YYCASE_(N, S) \ + case N: \ + yyformat = S; \ + break + YYCASE_(0, YY_("syntax error")); + YYCASE_(1, YY_("syntax error, unexpected %s")); + YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); + YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); + YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); + YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); +# undef YYCASE_ + } + + { + YYSIZE_T yysize1 = yysize + yystrlen (yyformat); + if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } + + if (*yymsg_alloc < yysize) + { + *yymsg_alloc = 2 * yysize; + if (! (yysize <= *yymsg_alloc + && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) + *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; + return 1; + } + + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + { + char *yyp = *yymsg; + int yyi = 0; + while ((*yyp = *yyformat) != '\0') + if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyformat += 2; + } + else + { + yyp++; + yyformat++; + } + } + return 0; +} +#endif /* YYERROR_VERBOSE */ + +/*-----------------------------------------------. +| Release the memory associated to this symbol. | +`-----------------------------------------------*/ + +static void +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, yyscan_t yyscanner) +{ + YYUSE (yyvaluep); + YYUSE (yyscanner); + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + YYUSE (yytype); + YY_IGNORE_MAYBE_UNINITIALIZED_END +} + + + + +/*----------. +| yyparse. | +`----------*/ + +int +yyparse (yyscan_t yyscanner) +{ +/* The lookahead symbol. */ +int yychar; + + +/* The semantic value of the lookahead symbol. */ +/* Default value used for initialization, for pacifying older GCCs + or non-GCC compilers. */ +YY_INITIAL_VALUE (static YYSTYPE yyval_default;) +YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); + + /* Number of syntax errors so far. */ + int yynerrs; + + int yystate; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + + /* The stacks and their tools: + 'yyss': related to states. + 'yyvs': related to semantic values. + + Refer to the stacks through separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss; + yytype_int16 *yyssp; + + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs; + YYSTYPE *yyvsp; + + YYSIZE_T yystacksize; + + int yyn; + int yyresult; + /* Lookahead token as an internal (translated) token number. */ + int yytoken = 0; + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; + +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) + + /* The number of symbols on the RHS of the reduced rule. + Keep to zero when no symbol should be popped. */ + int yylen = 0; + + yyssp = yyss = yyssa; + yyvsp = yyvs = yyvsa; + yystacksize = YYINITDEPTH; + + YYDPRINTF ((stderr, "Starting parse\n")); + + yystate = 0; + yyerrstatus = 0; + yynerrs = 0; + yychar = YYEMPTY; /* Cause a token to be read. */ + goto yysetstate; + +/*------------------------------------------------------------. +| yynewstate -- Push a new state, which is found in yystate. | +`------------------------------------------------------------*/ + yynewstate: + /* In all cases, when you get here, the value and location stacks + have just been pushed. So pushing a state here evens the stacks. */ + yyssp++; + + yysetstate: + *yyssp = yystate; + + if (yyss + yystacksize - 1 <= yyssp) + { + /* Get the current used size of the three stacks, in elements. */ + YYSIZE_T yysize = yyssp - yyss + 1; + +#ifdef yyoverflow + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + &yystacksize); + + yyss = yyss1; + yyvs = yyvs1; + } +#else /* no yyoverflow */ +# ifndef YYSTACK_RELOCATE + goto yyexhaustedlab; +# else + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) + goto yyexhaustedlab; + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif +#endif /* no yyoverflow */ + + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + + YYDPRINTF ((stderr, "Stack size increased to %lu\n", + (unsigned long int) yystacksize)); + + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } + + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + + if (yystate == YYFINAL) + YYACCEPT; + + goto yybackup; + +/*-----------. +| yybackup. | +`-----------*/ +yybackup: + + /* Do appropriate processing given the current state. Read a + lookahead token if we need one and don't already have one. */ + + /* First try to decide what to do without reference to lookahead token. */ + yyn = yypact[yystate]; + if (yypact_value_is_default (yyn)) + goto yydefault; + + /* Not known => get a lookahead token if don't already have one. */ + + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + if (yychar == YYEMPTY) + { + YYDPRINTF ((stderr, "Reading a token: ")); + yychar = yylex (&yylval, yyscanner); + } + + if (yychar <= YYEOF) + { + yychar = yytoken = YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); + } + else + { + yytoken = YYTRANSLATE (yychar); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); + } + + /* If the proper action on seeing token YYTOKEN is to reduce or to + detect an error, take that action. */ + yyn += yytoken; + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) + goto yydefault; + yyn = yytable[yyn]; + if (yyn <= 0) + { + if (yytable_value_is_error (yyn)) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } + + /* Count tokens shifted since error; after three, turn off error + status. */ + if (yyerrstatus) + yyerrstatus--; + + /* Shift the lookahead token. */ + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + + /* Discard the shifted token. */ + yychar = YYEMPTY; + + yystate = yyn; + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END + + goto yynewstate; + + +/*-----------------------------------------------------------. +| yydefault -- do the default action for the current state. | +`-----------------------------------------------------------*/ +yydefault: + yyn = yydefact[yystate]; + if (yyn == 0) + goto yyerrlab; + goto yyreduce; + + +/*-----------------------------. +| yyreduce -- Do a reduction. | +`-----------------------------*/ +yyreduce: + /* yyn is the number of a rule to reduce with. */ + yylen = yyr2[yyn]; + + /* If YYLEN is nonzero, implement the default value of the action: + '$$ = $1'. + + Otherwise, the following line sets YYVAL to garbage. + This behavior is undocumented and Bison + users should not rely upon it. Assigning to YYVAL + unconditionally makes the parser a bit smaller, and it avoids a + GCC warning that YYVAL may be used uninitialized. */ + yyval = yyvsp[1-yylen]; + + + YY_REDUCE_PRINT (yyn); + switch (yyn) + { + case 2: +#line 180 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 2293 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 3: +#line 189 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 2304 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 4: +#line 197 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 2315 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 5: +#line 205 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 2326 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 6: +#line 213 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 2337 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 7: +#line 221 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 2348 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 8: +#line 229 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 2359 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 9: +#line 238 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 2370 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 10: +#line 246 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 2381 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 11: +#line 255 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 2392 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 12: +#line 263 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 2403 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 13: +#line 272 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(0); +} +#line 2411 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 14: +#line 277 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(0); +} +#line 2419 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 15: +#line 282 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(0); +} +#line 2427 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 16: +#line 287 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(0); +} +#line 2435 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 17: +#line 292 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(0); +} +#line 2443 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 18: +#line 297 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(0); +} +#line 2451 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 19: +#line 302 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(0); +} +#line 2459 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 20: +#line 307 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(0); +} +#line 2467 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 21: +#line 313 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 2478 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 22: +#line 321 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 2489 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 23: +#line 330 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpStoreClass((yyvsp[0].str)); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 2501 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 24: +#line 340 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 2512 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 25: +#line 349 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 2523 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 26: +#line 358 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(2); + jpCheckEmpty(2); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 2534 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 27: +#line 366 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(2); + jpStoreClass((yyvsp[-1].str)); + jpCheckEmpty(2); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 2546 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 28: +#line 376 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + (yyval.str) = (yyvsp[0].str); +} +#line 2555 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 29: +#line 382 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + (yyval.str) = (yyvsp[0].str); +} +#line 2564 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 30: +#line 389 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + (yyval.str) = (yyvsp[0].str); +} +#line 2573 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 31: +#line 396 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + (yyval.str) = (yyvsp[0].str); +} +#line 2582 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 32: +#line 402 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(2); + (yyval.str) = (yyvsp[0].str); +} +#line 2591 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 33: +#line 409 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + yyGetParser->AddClassFound((yyvsp[-2].str)); + yyGetParser->UpdateCombine((yyvsp[-2].str), (yyvsp[0].str)); + yyGetParser->DeallocateParserType(&((yyvsp[-2].str))); + (yyval.str) = const_cast(yyGetParser->GetCurrentCombine()); +} +#line 2603 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 34: +#line 418 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + jpStoreClass((yyvsp[-2].str)); + jpCheckEmpty(3); + yyGetParser->SetCurrentCombine(""); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 2616 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 35: +#line 428 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + jpStoreClass((yyvsp[-2].str)); + yyGetParser->SetCurrentCombine(""); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 2629 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 36: +#line 438 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 2640 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 37: +#line 447 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 2651 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 38: +#line 455 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 2662 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 39: +#line 464 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 2673 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 40: +#line 472 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(0); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 2683 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 41: +#line 479 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 2694 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 42: +#line 487 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(0); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 2704 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 43: +#line 494 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(2); + jpCheckEmpty(2); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 2715 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 44: +#line 502 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(0); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 2725 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 45: +#line 509 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(2); + jpCheckEmpty(2); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 2736 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 46: +#line 518 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + yyGetParser->SetCurrentPackage((yyvsp[-1].str)); + yyGetParser->DeallocateParserType(&((yyvsp[-1].str))); + yyGetParser->SetCurrentCombine(""); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 2750 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 47: +#line 530 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 2761 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 48: +#line 538 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 2772 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 49: +#line 547 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + yyGetParser->AddPackagesImport((yyvsp[-1].str)); + yyGetParser->DeallocateParserType(&((yyvsp[-1].str))); + yyGetParser->SetCurrentCombine(""); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 2786 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 50: +#line 559 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(5); + std::string str = (yyvsp[-3].str); + str += ".*"; + yyGetParser->AddPackagesImport(str.c_str()); + yyGetParser->DeallocateParserType(&((yyvsp[-3].str))); + yyGetParser->SetCurrentCombine(""); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 2801 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 51: +#line 572 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 2812 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 52: +#line 580 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 2823 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 53: +#line 588 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 2834 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 54: +#line 597 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 2845 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 55: +#line 605 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(2); + jpCheckEmpty(2); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 2856 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 67: +#line 620 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + yyGetParser->StartClass((yyvsp[0].str)); + jpElementStart(3); + yyGetParser->DeallocateParserType(&((yyvsp[0].str))); + jpCheckEmpty(3); +} +#line 2867 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 68: +#line 630 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(2); + jpCheckEmpty(2); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + yyGetParser->EndClass(); +} +#line 2879 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 69: +#line 639 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + jpCheckEmpty(2); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + yyGetParser->EndClass(); +} +#line 2891 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 70: +#line 648 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + yyGetParser->EndClass(); +} +#line 2903 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 71: +#line 657 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(4); + jpCheckEmpty(4); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + yyGetParser->EndClass(); +} +#line 2915 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 72: +#line 666 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(0); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 2925 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 73: +#line 673 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 2936 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 74: +#line 682 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(2); + jpCheckEmpty(2); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 2947 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 75: +#line 691 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(2); + jpCheckEmpty(2); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 2958 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 76: +#line 700 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 2969 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 77: +#line 708 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 2980 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 78: +#line 717 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 2991 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 79: +#line 725 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 3001 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 80: +#line 732 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(2); + jpCheckEmpty(2); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 3012 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 81: +#line 741 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 3023 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 82: +#line 749 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 3034 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 83: +#line 757 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 3045 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 84: +#line 765 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 3056 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 85: +#line 774 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 3067 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 86: +#line 782 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 3078 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 87: +#line 791 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(4); +} +#line 3086 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 88: +#line 797 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 3097 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 89: +#line 805 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 3108 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 90: +#line 814 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 3119 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 91: +#line 822 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 3130 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 92: +#line 831 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + yyGetParser->DeallocateParserType(&((yyvsp[0].str))); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 3142 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 93: +#line 840 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 3153 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 94: +#line 849 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 3164 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 95: +#line 857 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 3175 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 96: +#line 866 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(2); + jpCheckEmpty(2); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 3186 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 97: +#line 874 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(2); + jpCheckEmpty(2); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 3197 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 98: +#line 882 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 3208 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 99: +#line 891 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(4); + jpCheckEmpty(4); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3220 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 100: +#line 900 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(4); + jpCheckEmpty(4); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3232 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 101: +#line 909 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(0); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3243 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 102: +#line 917 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3255 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 103: +#line 927 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(4); + yyGetParser->DeallocateParserType(&((yyvsp[-3].str))); + jpCheckEmpty(4); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3268 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 104: +#line 937 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + +} +#line 3277 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 105: +#line 943 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(0); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3288 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 107: +#line 954 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + +} +#line 3297 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 108: +#line 960 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3309 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 109: +#line 970 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3321 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 110: +#line 980 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(2); + jpCheckEmpty(2); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3333 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 111: +#line 990 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + +} +#line 3342 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 112: +#line 996 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3354 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 113: +#line 1006 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3366 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 114: +#line 1016 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(2); + jpCheckEmpty(2); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3378 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 115: +#line 1026 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(4); + jpCheckEmpty(4); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3390 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 116: +#line 1035 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(5); + jpCheckEmpty(5); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3402 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 117: +#line 1045 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(4); + yyGetParser->DeallocateParserType(&((yyvsp[-3].str))); + jpCheckEmpty(4); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3415 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 118: +#line 1056 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(4); + jpCheckEmpty(4); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3427 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 119: +#line 1065 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(0); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3438 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 120: +#line 1073 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(2); + jpCheckEmpty(2); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3450 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 121: +#line 1083 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(5); + jpCheckEmpty(5); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3462 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 122: +#line 1092 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(5); + jpCheckEmpty(5); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3474 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 123: +#line 1102 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + yyGetParser->StartClass((yyvsp[0].str)); + jpElementStart(3); + yyGetParser->DeallocateParserType(&((yyvsp[0].str))); + jpCheckEmpty(3); +} +#line 3485 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 124: +#line 1111 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(2); + jpCheckEmpty(2); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + yyGetParser->EndClass(); +} +#line 3497 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 125: +#line 1120 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(0); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); +} +#line 3507 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 126: +#line 1127 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3519 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 127: +#line 1137 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(2); + jpCheckEmpty(2); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3531 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 128: +#line 1146 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3543 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 129: +#line 1156 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3555 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 130: +#line 1165 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(0); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3566 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 131: +#line 1173 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(2); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3577 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 132: +#line 1182 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3589 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 133: +#line 1191 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3601 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 134: +#line 1200 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3613 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 135: +#line 1209 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(2); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3624 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 136: +#line 1217 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3636 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 137: +#line 1226 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(2); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3647 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 138: +#line 1235 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3659 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 139: +#line 1245 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(2); + jpCheckEmpty(2); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3671 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 140: +#line 1255 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3683 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 141: +#line 1264 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(2); + jpCheckEmpty(2); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3695 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 142: +#line 1274 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3707 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 143: +#line 1283 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3718 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 144: +#line 1291 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3730 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 145: +#line 1300 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(2); + jpCheckEmpty(2); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3742 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 146: +#line 1310 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3754 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 147: +#line 1319 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3766 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 148: +#line 1329 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(4); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3777 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 149: +#line 1337 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3788 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 150: +#line 1345 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3800 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 151: +#line 1355 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3812 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 152: +#line 1364 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(2); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3824 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 153: +#line 1374 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3836 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 154: +#line 1383 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3848 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 155: +#line 1392 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3860 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 156: +#line 1402 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(2); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3872 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 157: +#line 1412 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3884 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 158: +#line 1421 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(2); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3896 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 159: +#line 1431 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3908 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 160: +#line 1440 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3920 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 161: +#line 1449 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3932 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 162: +#line 1458 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3944 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 163: +#line 1467 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3956 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 164: +#line 1476 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3968 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 165: +#line 1486 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3980 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 166: +#line 1495 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 3992 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 167: +#line 1504 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4004 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 168: +#line 1513 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4016 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 169: +#line 1522 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4028 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 170: +#line 1532 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4040 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 171: +#line 1541 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4052 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 172: +#line 1550 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4064 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 173: +#line 1559 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4076 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 174: +#line 1568 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4088 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 175: +#line 1577 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4100 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 176: +#line 1586 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4112 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 177: +#line 1595 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4124 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 178: +#line 1604 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4136 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 179: +#line 1613 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4148 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 180: +#line 1622 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4160 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 181: +#line 1631 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4172 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 182: +#line 1641 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4184 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 183: +#line 1651 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + yyGetParser->DeallocateParserType(&((yyvsp[-2].str))); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4197 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 184: +#line 1662 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4209 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 185: +#line 1672 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(2); + jpCheckEmpty(2); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4221 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 186: +#line 1682 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4233 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 187: +#line 1691 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4245 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 188: +#line 1700 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4257 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 189: +#line 1709 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4269 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 190: +#line 1718 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4281 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 191: +#line 1727 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4293 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 192: +#line 1736 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4305 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 193: +#line 1746 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(5); + jpCheckEmpty(5); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4317 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 194: +#line 1756 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(7); + jpCheckEmpty(7); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4329 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 195: +#line 1766 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(7); + jpCheckEmpty(7); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4341 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 196: +#line 1776 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(5); + +} +#line 4350 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 197: +#line 1783 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(4); + +} +#line 4359 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 198: +#line 1789 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(0); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4370 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 199: +#line 1797 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4382 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 200: +#line 1806 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(0); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4393 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 201: +#line 1814 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(2); + jpCheckEmpty(2); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4405 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 202: +#line 1824 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(2); + jpCheckEmpty(2); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4417 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 203: +#line 1834 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4429 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 204: +#line 1843 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(2); + jpCheckEmpty(2); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4441 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 205: +#line 1853 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4453 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 206: +#line 1862 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(2); + jpCheckEmpty(2); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4465 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 207: +#line 1872 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(5); + +} +#line 4474 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 208: +#line 1879 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(5); + +} +#line 4483 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 209: +#line 1886 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(7); + +} +#line 4492 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 210: +#line 1894 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(9); + +} +#line 4501 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 211: +#line 1900 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4512 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 212: +#line 1908 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4524 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 213: +#line 1917 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(0); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4535 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 214: +#line 1925 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4547 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 215: +#line 1936 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(9); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4558 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 216: +#line 1944 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(0); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4569 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 217: +#line 1952 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4581 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 218: +#line 1962 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4593 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 219: +#line 1971 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4605 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 220: +#line 1981 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4617 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 221: +#line 1991 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4629 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 222: +#line 2000 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4641 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 223: +#line 2010 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4653 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 224: +#line 2019 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(5); + jpCheckEmpty(5); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4665 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 225: +#line 2029 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + yyGetParser->DeallocateParserType(&((yyvsp[-1].str))); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4678 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 226: +#line 2039 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(0); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4689 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 227: +#line 2047 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + +} +#line 4698 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 228: +#line 2054 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + yyGetParser->DeallocateParserType(&((yyvsp[-1].str))); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4711 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 229: +#line 2065 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4723 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 230: +#line 2075 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4735 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 231: +#line 2085 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(5); + jpCheckEmpty(5); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4747 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 232: +#line 2095 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4759 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 233: +#line 2104 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(4); + jpCheckEmpty(4); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4771 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 234: +#line 2113 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4782 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 235: +#line 2121 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4794 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 236: +#line 2131 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4806 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 237: +#line 2140 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(2); + jpCheckEmpty(2); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4818 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 238: +#line 2150 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(5); + +} +#line 4827 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 239: +#line 2157 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(2); + jpCheckEmpty(2); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4839 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 240: +#line 2167 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4851 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 241: +#line 2176 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4863 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 242: +#line 2186 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4875 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 243: +#line 2195 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + +} +#line 4884 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 244: +#line 2201 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4896 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 245: +#line 2210 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4908 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 246: +#line 2219 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4920 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 247: +#line 2228 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4932 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 248: +#line 2237 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4944 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 249: +#line 2247 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(6); + jpCheckEmpty(6); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4956 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 250: +#line 2256 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(0); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4967 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 251: +#line 2264 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4979 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 252: +#line 2273 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(0); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 4990 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 253: +#line 2281 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5002 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 254: +#line 2291 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5014 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 255: +#line 2300 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5026 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 256: +#line 2310 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(4); + jpCheckEmpty(4); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5038 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 257: +#line 2319 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(4); + jpCheckEmpty(4); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5050 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 258: +#line 2328 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(4); + jpCheckEmpty(4); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5062 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 259: +#line 2337 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(4); + jpCheckEmpty(4); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5074 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 260: +#line 2346 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(0); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5085 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 261: +#line 2354 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5097 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 262: +#line 2364 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5109 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 263: +#line 2373 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(2); + jpCheckEmpty(2); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5121 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 264: +#line 2383 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5133 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 265: +#line 2393 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(2); + +} +#line 5142 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 266: +#line 2399 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + +} +#line 5151 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 267: +#line 2406 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + yyGetParser->DeallocateParserType(&((yyvsp[0].str))); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5164 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 268: +#line 2416 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + yyGetParser->DeallocateParserType(&((yyvsp[0].str))); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5177 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 269: +#line 2426 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + yyGetParser->DeallocateParserType(&((yyvsp[0].str))); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5190 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 270: +#line 2436 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + yyGetParser->DeallocateParserType(&((yyvsp[0].str))); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5203 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 271: +#line 2447 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(4); + yyGetParser->DeallocateParserType(&((yyvsp[-3].str))); + jpCheckEmpty(4); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5216 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 272: +#line 2457 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(6); + yyGetParser->DeallocateParserType(&((yyvsp[-5].str))); + yyGetParser->DeallocateParserType(&((yyvsp[-3].str))); + jpCheckEmpty(6); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5230 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 273: +#line 2468 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(6); + yyGetParser->DeallocateParserType(&((yyvsp[-3].str))); + jpCheckEmpty(6); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5243 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 274: +#line 2478 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(6); + yyGetParser->DeallocateParserType(&((yyvsp[-3].str))); + jpCheckEmpty(6); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5256 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 275: +#line 2489 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(4); + yyGetParser->DeallocateParserType(&((yyvsp[-3].str))); + jpCheckEmpty(4); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5269 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 276: +#line 2499 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(4); + jpCheckEmpty(4); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5281 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 277: +#line 2509 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5293 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 278: +#line 2518 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + yyGetParser->DeallocateParserType(&((yyvsp[0].str))); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5305 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 279: +#line 2527 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5317 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 280: +#line 2536 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5329 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 281: +#line 2545 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5341 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 282: +#line 2555 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(2); + jpCheckEmpty(2); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5353 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 283: +#line 2565 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(2); + jpCheckEmpty(2); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5365 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 284: +#line 2575 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5377 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 285: +#line 2584 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5389 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 286: +#line 2593 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(2); + jpCheckEmpty(2); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5401 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 287: +#line 2602 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(2); + jpCheckEmpty(2); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5413 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 288: +#line 2611 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5425 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 289: +#line 2621 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(2); + jpCheckEmpty(2); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5437 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 290: +#line 2631 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(2); + jpCheckEmpty(2); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5449 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 291: +#line 2641 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5461 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 292: +#line 2650 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(2); + jpCheckEmpty(2); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5473 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 293: +#line 2659 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(2); + jpCheckEmpty(2); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5485 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 294: +#line 2668 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5497 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 295: +#line 2678 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(5); + jpCheckEmpty(5); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5509 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 296: +#line 2687 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(4); + jpCheckEmpty(4); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5521 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 297: +#line 2696 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(5); + +} +#line 5530 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 298: +#line 2703 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5542 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 299: +#line 2712 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5554 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 300: +#line 2721 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5566 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 301: +#line 2730 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5578 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 302: +#line 2740 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5590 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 303: +#line 2749 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5602 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 304: +#line 2758 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5614 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 305: +#line 2768 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5626 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 306: +#line 2777 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5638 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 307: +#line 2786 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5650 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 308: +#line 2795 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5662 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 309: +#line 2805 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5674 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 310: +#line 2814 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5686 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 311: +#line 2823 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5698 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 312: +#line 2832 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5710 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 313: +#line 2841 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5722 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 314: +#line 2850 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5734 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 315: +#line 2860 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5746 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 316: +#line 2869 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5758 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 317: +#line 2878 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5770 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 318: +#line 2888 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5782 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 319: +#line 2897 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5794 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 320: +#line 2907 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5806 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 321: +#line 2916 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5818 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 322: +#line 2926 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5830 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 323: +#line 2935 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5842 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 324: +#line 2945 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5854 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 325: +#line 2954 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5866 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 326: +#line 2964 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5878 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 327: +#line 2973 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5890 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 328: +#line 2983 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5902 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 329: +#line 2992 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(5); + jpCheckEmpty(5); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5914 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 330: +#line 3002 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5926 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 331: +#line 3011 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5938 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 332: +#line 3021 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5950 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 333: +#line 3031 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + yyGetParser->DeallocateParserType(&((yyvsp[0].str))); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5963 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 334: +#line 3041 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5975 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 335: +#line 3050 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5987 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 336: +#line 3060 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 5999 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 337: +#line 3069 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 6011 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 338: +#line 3078 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 6023 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 339: +#line 3087 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 6035 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 340: +#line 3096 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 6047 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 341: +#line 3105 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 6059 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 342: +#line 3114 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 6071 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 343: +#line 3123 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 6083 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 344: +#line 3132 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 6095 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 345: +#line 3141 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 6107 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 346: +#line 3150 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 6119 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 347: +#line 3159 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 6131 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 348: +#line 3169 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 6143 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 349: +#line 3179 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 6155 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 350: +#line 3189 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(1); + jpCheckEmpty(1); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 6167 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + case 351: +#line 3198 "cmDependsJavaParser.y" /* yacc.c:1646 */ + { + jpElementStart(3); + jpStoreClass((yyvsp[-2].str)); + jpCheckEmpty(3); + (yyval.str) = 0; + yyGetParser->SetCurrentCombine(""); + +} +#line 6180 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + break; + + +#line 6184 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ + default: break; + } + /* User semantic actions sometimes alter yychar, and that requires + that yytoken be updated with the new translation. We take the + approach of translating immediately before every use of yytoken. + One alternative is translating here after every semantic action, + but that translation would be missed if the semantic action invokes + YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or + if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an + incorrect destructor might then be invoked immediately. In the + case of YYERROR or YYBACKUP, subsequent parser actions might lead + to an incorrect destructor call or verbose syntax error message + before the lookahead is translated. */ + YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); + + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + + *++yyvsp = yyval; + + /* Now 'shift' the result of the reduction. Determine what state + that goes to, based on the state we popped back to and the rule + number reduced by. */ + + yyn = yyr1[yyn]; + + yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; + if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yytable[yystate]; + else + yystate = yydefgoto[yyn - YYNTOKENS]; + + goto yynewstate; + + +/*--------------------------------------. +| yyerrlab -- here on detecting error. | +`--------------------------------------*/ +yyerrlab: + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); + + /* If not already recovering from an error, report this error. */ + if (!yyerrstatus) + { + ++yynerrs; +#if ! YYERROR_VERBOSE + yyerror (yyscanner, YY_("syntax error")); +#else +# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ + yyssp, yytoken) + { + char const *yymsgp = YY_("syntax error"); + int yysyntax_error_status; + yysyntax_error_status = YYSYNTAX_ERROR; + if (yysyntax_error_status == 0) + yymsgp = yymsg; + else if (yysyntax_error_status == 1) + { + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); + if (!yymsg) + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = 2; + } + else + { + yysyntax_error_status = YYSYNTAX_ERROR; + yymsgp = yymsg; + } + } + yyerror (yyscanner, yymsgp); + if (yysyntax_error_status == 2) + goto yyexhaustedlab; + } +# undef YYSYNTAX_ERROR +#endif + } + + + + if (yyerrstatus == 3) + { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ + + if (yychar <= YYEOF) + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } + else + { + yydestruct ("Error: discarding", + yytoken, &yylval, yyscanner); + yychar = YYEMPTY; + } + } + +#if 0 + /* Else will try to reuse lookahead token after shifting the error + token. */ + goto yyerrlab1; + + +/*---------------------------------------------------. +| yyerrorlab -- error raised explicitly by YYERROR. | +`---------------------------------------------------*/ +yyerrorlab: + + /* Pacify compilers like GCC when the user code never invokes + YYERROR and the label yyerrorlab therefore never appears in user + code. */ + if (/*CONSTCOND*/ 0) + goto yyerrorlab; + + /* Do not reclaim the symbols of the rule whose action triggered + this YYERROR. */ + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + yystate = *yyssp; + goto yyerrlab1; + + +/*-------------------------------------------------------------. +| yyerrlab1 -- common code for both syntax error and YYERROR. | +`-------------------------------------------------------------*/ +yyerrlab1: +#endif + yyerrstatus = 3; /* Each real token shifted decrements this. */ + + for (;;) + { + yyn = yypact[yystate]; + if (!yypact_value_is_default (yyn)) + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } + + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; + + + yydestruct ("Error: popping", + yystos[yystate], yyvsp, yyscanner); + YYPOPSTACK (1); + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); + } + + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END + + + /* Shift the error token. */ + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); + + yystate = yyn; + goto yynewstate; + + +/*-------------------------------------. +| yyacceptlab -- YYACCEPT comes here. | +`-------------------------------------*/ +yyacceptlab: + yyresult = 0; + goto yyreturn; + +/*-----------------------------------. +| yyabortlab -- YYABORT comes here. | +`-----------------------------------*/ +yyabortlab: + yyresult = 1; + goto yyreturn; + +#if !defined yyoverflow || YYERROR_VERBOSE +/*-------------------------------------------------. +| yyexhaustedlab -- memory exhaustion comes here. | +`-------------------------------------------------*/ +yyexhaustedlab: + yyerror (yyscanner, YY_("memory exhausted")); + yyresult = 2; + /* Fall through. */ +#endif + +yyreturn: + if (yychar != YYEMPTY) + { + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = YYTRANSLATE (yychar); + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval, yyscanner); + } + /* Do not reclaim the symbols of the rule whose action triggered + this YYABORT or YYACCEPT. */ + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + yystos[*yyssp], yyvsp, yyscanner); + YYPOPSTACK (1); + } +#ifndef yyoverflow + if (yyss != yyssa) + YYSTACK_FREE (yyss); +#endif +#if YYERROR_VERBOSE + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); +#endif + return yyresult; +} +#line 3207 "cmDependsJavaParser.y" /* yacc.c:1906 */ + +/* End of grammar */ + +/*--------------------------------------------------------------------------*/ +void cmDependsJava_yyerror(yyscan_t yyscanner, const char* message) +{ + yyGetParser->Error(message); +} diff --git a/Source/LexerParser/cmDependsJavaParser.y b/Source/LexerParser/cmDependsJavaParser.y new file mode 100644 index 0000000..f7eb228 --- /dev/null +++ b/Source/LexerParser/cmDependsJavaParser.y @@ -0,0 +1,3214 @@ +%{ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +/* + +This file must be translated to C and modified to build everywhere. + +Run bison like this: + + bison --yacc --name-prefix=cmDependsJava_yy --defines=cmDependsJavaParserTokens.h -ocmDependsJavaParser.cxx cmDependsJavaParser.y + +Modify cmDependsJavaParser.cxx: + - "#if 0" out yyerrorlab block in range ["goto yyerrlab1", "yyerrlab1:"] + +*/ + +#include "cmConfigure.h" // IWYU pragma: keep + +#include +#include +#include + +#define yyGetParser (cmDependsJava_yyget_extra(yyscanner)) + +/*-------------------------------------------------------------------------*/ +#include "cmDependsJavaParserHelper.h" /* Interface to parser object. */ +#include "cmDependsJavaLexer.h" /* Interface to lexer object. */ +#include "cmDependsJavaParserTokens.h" /* Need YYSTYPE for YY_DECL. */ + +/* Forward declare the lexer entry point. */ +YY_DECL; + +/* Helper function to forward error callback from parser. */ +static void cmDependsJava_yyerror(yyscan_t yyscanner, const char* message); + +#define YYMAXDEPTH 1000000 + + +#define jpCheckEmpty(cnt) yyGetParser->CheckEmpty(__LINE__, cnt, yyvsp); +#define jpElementStart(cnt) yyGetParser->PrepareElement(&yyval) +#define jpStoreClass(str) yyGetParser->AddClassFound(str); yyGetParser->DeallocateParserType(&(str)) +/* Disable some warnings in the generated code. */ +#ifdef _MSC_VER +# pragma warning (disable: 4102) /* Unused goto label. */ +# pragma warning (disable: 4065) /* Switch statement contains default but no case. */ +#endif +%} + +/* Generate a reentrant parser object. */ +%define api.pure + +/* Configure the parser to use a lexer object. */ +%lex-param {yyscan_t yyscanner} +%parse-param {yyscan_t yyscanner} + +%define parse.error verbose + +/* +%union { + char* string; +} +*/ + +/*-------------------------------------------------------------------------*/ +/* Tokens */ +%token jp_ABSTRACT +%token jp_ASSERT +%token jp_BOOLEAN_TYPE +%token jp_BREAK +%token jp_BYTE_TYPE +%token jp_CASE +%token jp_CATCH +%token jp_CHAR_TYPE +%token jp_CLASS +%token jp_CONTINUE +%token jp_DEFAULT +%token jp_DO +%token jp_DOUBLE_TYPE +%token jp_ELSE +%token jp_EXTENDS +%token jp_FINAL +%token jp_FINALLY +%token jp_FLOAT_TYPE +%token jp_FOR +%token jp_IF +%token jp_IMPLEMENTS +%token jp_IMPORT +%token jp_INSTANCEOF +%token jp_INT_TYPE +%token jp_INTERFACE +%token jp_LONG_TYPE +%token jp_NATIVE +%token jp_NEW +%token jp_PACKAGE +%token jp_PRIVATE +%token jp_PROTECTED +%token jp_PUBLIC +%token jp_RETURN +%token jp_SHORT_TYPE +%token jp_STATIC +%token jp_STRICTFP +%token jp_SUPER +%token jp_SWITCH +%token jp_SYNCHRONIZED +%token jp_THIS +%token jp_THROW +%token jp_THROWS +%token jp_TRANSIENT +%token jp_TRY +%token jp_VOID +%token jp_VOLATILE +%token jp_WHILE + +%token jp_BOOLEANLITERAL +%token jp_CHARACTERLITERAL +%token jp_DECIMALINTEGERLITERAL +%token jp_FLOATINGPOINTLITERAL +%token jp_HEXINTEGERLITERAL +%token jp_NULLLITERAL +%token jp_STRINGLITERAL + +%token jp_NAME + +%token jp_AND +%token jp_ANDAND +%token jp_ANDEQUALS +%token jp_BRACKETEND +%token jp_BRACKETSTART +%token jp_CARROT +%token jp_CARROTEQUALS +%token jp_COLON +%token jp_COMMA +%token jp_CURLYEND +%token jp_CURLYSTART +%token jp_DIVIDE +%token jp_DIVIDEEQUALS +%token jp_DOLLAR +%token jp_DOT +%token jp_EQUALS +%token jp_EQUALSEQUALS +%token jp_EXCLAMATION +%token jp_EXCLAMATIONEQUALS +%token jp_GREATER +%token jp_GTEQUALS +%token jp_GTGT +%token jp_GTGTEQUALS +%token jp_GTGTGT +%token jp_GTGTGTEQUALS +%token jp_LESLESEQUALS +%token jp_LESSTHAN +%token jp_LTEQUALS +%token jp_LTLT +%token jp_MINUS +%token jp_MINUSEQUALS +%token jp_MINUSMINUS +%token jp_PAREEND +%token jp_PARESTART +%token jp_PERCENT +%token jp_PERCENTEQUALS +%token jp_PIPE +%token jp_PIPEEQUALS +%token jp_PIPEPIPE +%token jp_PLUS +%token jp_PLUSEQUALS +%token jp_PLUSPLUS +%token jp_QUESTION +%token jp_SEMICOL +%token jp_TILDE +%token jp_TIMES +%token jp_TIMESEQUALS + +%token jp_ERROR + +/*-------------------------------------------------------------------------*/ +/* grammar */ +%% + +Goal: +CompilationUnit +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +Literal: +IntegerLiteral +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +jp_FLOATINGPOINTLITERAL +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +jp_BOOLEANLITERAL +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +jp_CHARACTERLITERAL +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +jp_STRINGLITERAL +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +jp_NULLLITERAL +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +IntegerLiteral: +jp_DECIMALINTEGERLITERAL +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +jp_HEXINTEGERLITERAL +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +Type: +PrimitiveType +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +ReferenceType +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +PrimitiveType: +jp_BYTE_TYPE +{ + jpElementStart(0); +} +| +jp_SHORT_TYPE +{ + jpElementStart(0); +} +| +jp_INT_TYPE +{ + jpElementStart(0); +} +| +jp_LONG_TYPE +{ + jpElementStart(0); +} +| +jp_CHAR_TYPE +{ + jpElementStart(0); +} +| +jp_FLOAT_TYPE +{ + jpElementStart(0); +} +| +jp_DOUBLE_TYPE +{ + jpElementStart(0); +} +| +jp_BOOLEAN_TYPE +{ + jpElementStart(0); +} + +ReferenceType: +ClassOrInterfaceType +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +ArrayType +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +ClassOrInterfaceType: +Name +{ + jpElementStart(1); + jpStoreClass($1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +ClassType: +ClassOrInterfaceType +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +InterfaceType: +ClassOrInterfaceType +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +ArrayType: +PrimitiveType Dims +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +Name Dims +{ + jpElementStart(2); + jpStoreClass($1); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +Name: +SimpleName +{ + jpElementStart(1); + $$ = $1; +} +| +QualifiedName +{ + jpElementStart(1); + $$ = $1; +} + +SimpleName: +Identifier +{ + jpElementStart(1); + $$ = $1; +} + +Identifier: +jp_NAME +{ + jpElementStart(1); + $$ = $1; +} +| +jp_DOLLAR jp_NAME +{ + jpElementStart(2); + $$ = $2; +} + +QualifiedName: +Name jp_DOT Identifier +{ + jpElementStart(3); + yyGetParser->AddClassFound($1); + yyGetParser->UpdateCombine($1, $3); + yyGetParser->DeallocateParserType(&($1)); + $$ = const_cast(yyGetParser->GetCurrentCombine()); +} +| +Name jp_DOT jp_CLASS +{ + jpElementStart(3); + jpStoreClass($1); + jpCheckEmpty(3); + yyGetParser->SetCurrentCombine(""); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +Name jp_DOT jp_THIS +{ + jpElementStart(3); + jpStoreClass($1); + yyGetParser->SetCurrentCombine(""); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +SimpleType jp_DOT jp_CLASS +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +SimpleType: +PrimitiveType +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +jp_VOID +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +CompilationUnit: +PackageDeclarationopt ImportDeclarations TypeDeclarations +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +PackageDeclarationopt: +{ + jpElementStart(0); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +PackageDeclaration +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +ImportDeclarations: +{ + jpElementStart(0); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +ImportDeclarations ImportDeclaration +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +TypeDeclarations: +{ + jpElementStart(0); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +TypeDeclarations TypeDeclaration +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +PackageDeclaration: +jp_PACKAGE Name jp_SEMICOL +{ + jpElementStart(3); + yyGetParser->SetCurrentPackage($2); + yyGetParser->DeallocateParserType(&($2)); + yyGetParser->SetCurrentCombine(""); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +ImportDeclaration: +SingleTypeImportDeclaration +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +TypeImportOnDemandDeclaration +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +SingleTypeImportDeclaration: +jp_IMPORT Name jp_SEMICOL +{ + jpElementStart(3); + yyGetParser->AddPackagesImport($2); + yyGetParser->DeallocateParserType(&($2)); + yyGetParser->SetCurrentCombine(""); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +TypeImportOnDemandDeclaration: +jp_IMPORT Name jp_DOT jp_TIMES jp_SEMICOL +{ + jpElementStart(5); + std::string str = $2; + str += ".*"; + yyGetParser->AddPackagesImport(str.c_str()); + yyGetParser->DeallocateParserType(&($2)); + yyGetParser->SetCurrentCombine(""); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +TypeDeclaration: +ClassDeclaration +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +InterfaceDeclaration +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +jp_SEMICOL +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +Modifiers: +Modifier +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +Modifiers Modifier +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +Modifier: +jp_PUBLIC | jp_PROTECTED | jp_PRIVATE | +jp_STATIC | +jp_ABSTRACT | jp_FINAL | jp_NATIVE | jp_SYNCHRONIZED | jp_TRANSIENT | jp_VOLATILE | +jp_STRICTFP + +ClassHeader: +Modifiersopt jp_CLASS Identifier +{ + yyGetParser->StartClass($3); + jpElementStart(3); + yyGetParser->DeallocateParserType(&($3)); + jpCheckEmpty(3); +} + + +ClassDeclaration: +ClassHeader ClassBody +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + yyGetParser->EndClass(); +} +| +ClassHeader Interfaces ClassBody +{ + jpElementStart(3); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + yyGetParser->EndClass(); +} +| +ClassHeader Super ClassBody +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + yyGetParser->EndClass(); +} +| +ClassHeader Super Interfaces ClassBody +{ + jpElementStart(4); + jpCheckEmpty(4); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + yyGetParser->EndClass(); +} + +Modifiersopt: +{ + jpElementStart(0); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +Modifiers +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +Super: +jp_EXTENDS ClassType +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +Interfaces: +jp_IMPLEMENTS InterfaceTypeList +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +InterfaceTypeList: +InterfaceType +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +InterfaceTypeList jp_COMMA InterfaceType +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +ClassBody: +jp_CURLYSTART ClassBodyDeclarations jp_CURLYEND +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +ClassBodyDeclarations: +{ + jpElementStart(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +ClassBodyDeclarations ClassBodyDeclaration +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +ClassBodyDeclaration: +ClassMemberDeclaration +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +StaticInitializer +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +ConstructorDeclaration +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +TypeDeclaration +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +ClassMemberDeclaration: +FieldDeclaration +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +MethodDeclaration +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +FieldDeclaration: +Modifiersopt Type VariableDeclarators jp_SEMICOL +{ + jpElementStart(4); +} + +VariableDeclarators: +VariableDeclarator +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +VariableDeclarators jp_COMMA VariableDeclarator +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +VariableDeclarator: +VariableDeclaratorId +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +VariableDeclaratorId jp_EQUALS VariableInitializer +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +VariableDeclaratorId: +Identifier +{ + jpElementStart(1); + yyGetParser->DeallocateParserType(&($1)); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +VariableDeclaratorId jp_BRACKETSTART jp_BRACKETEND +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +VariableInitializer: +Expression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +ArrayInitializer +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +MethodDeclaration: +MethodHeader jp_SEMICOL +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +MethodHeader MethodBody +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +MethodHeader MethodBody jp_SEMICOL +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +MethodHeader: +Modifiersopt Type MethodDeclarator Throwsopt +{ + jpElementStart(4); + jpCheckEmpty(4); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +Modifiersopt jp_VOID MethodDeclarator Throwsopt +{ + jpElementStart(4); + jpCheckEmpty(4); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +Throwsopt: +{ + jpElementStart(0); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +Throws +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +MethodDeclarator: +Identifier jp_PARESTART FormalParameterListopt jp_PAREEND +{ + jpElementStart(4); + yyGetParser->DeallocateParserType(&($1)); + jpCheckEmpty(4); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +MethodDeclarator jp_BRACKETSTART jp_BRACKETEND +{ + jpElementStart(3); + +} + +FormalParameterListopt: +{ + jpElementStart(0); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +FormalParameterList + +FormalParameterList: +FormalParameter +{ + jpElementStart(1); + +} +| +FormalParameterList jp_COMMA FormalParameter +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +FormalParameter: +Modifiersopt Type VariableDeclaratorId +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +Throws: +jp_THROWS ClassTypeList +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ClassTypeList: +ClassType +{ + jpElementStart(1); + +} +| +ClassTypeList jp_COMMA ClassType +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +MethodBody: +Block +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +StaticInitializer: +jp_STATIC Block +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ConstructorDeclaration: +Modifiersopt ConstructorDeclarator Throwsopt ConstructorBody +{ + jpElementStart(4); + jpCheckEmpty(4); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +Modifiersopt ConstructorDeclarator Throwsopt ConstructorBody jp_SEMICOL +{ + jpElementStart(5); + jpCheckEmpty(5); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ConstructorDeclarator: +SimpleName jp_PARESTART FormalParameterListopt jp_PAREEND +{ + jpElementStart(4); + yyGetParser->DeallocateParserType(&($1)); + jpCheckEmpty(4); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ConstructorBody: +jp_CURLYSTART ExplicitConstructorInvocationopt BlockStatementsopt jp_CURLYEND +{ + jpElementStart(4); + jpCheckEmpty(4); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ExplicitConstructorInvocationopt: +{ + jpElementStart(0); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ExplicitConstructorInvocationopt ExplicitConstructorInvocation +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ExplicitConstructorInvocation: +jp_THIS jp_PARESTART ArgumentListopt jp_PAREEND jp_SEMICOL +{ + jpElementStart(5); + jpCheckEmpty(5); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +jp_SUPER jp_PARESTART ArgumentListopt jp_PAREEND jp_SEMICOL +{ + jpElementStart(5); + jpCheckEmpty(5); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +InterfaceHeader: +Modifiersopt jp_INTERFACE Identifier +{ + yyGetParser->StartClass($3); + jpElementStart(3); + yyGetParser->DeallocateParserType(&($3)); + jpCheckEmpty(3); +} + +InterfaceDeclaration: +InterfaceHeader ExtendsInterfacesopt InterfaceBody +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + yyGetParser->EndClass(); +} + +ExtendsInterfacesopt: +{ + jpElementStart(0); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +ExtendsInterfaces +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ExtendsInterfaces: +jp_EXTENDS InterfaceType +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ExtendsInterfaces jp_COMMA InterfaceType +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +InterfaceBody: +jp_CURLYSTART InterfaceMemberDeclarations jp_CURLYEND +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +InterfaceMemberDeclarations: +{ + jpElementStart(0); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +InterfaceMemberDeclarations InterfaceMemberDeclaration +{ + jpElementStart(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +InterfaceMemberDeclaration: +ConstantDeclaration +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +AbstractMethodDeclaration +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ClassDeclaration +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ClassDeclaration jp_SEMICOL +{ + jpElementStart(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +InterfaceDeclaration +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +InterfaceDeclaration jp_SEMICOL +{ + jpElementStart(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ConstantDeclaration: +FieldDeclaration +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +AbstractMethodDeclaration: +MethodHeader Semicols +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +Semicols: +jp_SEMICOL +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +Semicols jp_SEMICOL +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ArrayInitializer: +jp_CURLYSTART VariableInitializersOptional jp_CURLYEND +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +VariableInitializersOptional: +{ + jpElementStart(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +VariableInitializers +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +VariableInitializers jp_COMMA +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +VariableInitializers: +VariableInitializer +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +VariableInitializers jp_COMMA VariableInitializer +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +Block: +jp_CURLYSTART BlockStatementsopt jp_CURLYEND +{ + jpElementStart(4); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +BlockStatementsopt: +{ + jpElementStart(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +BlockStatements +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +BlockStatements: +BlockStatement +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +BlockStatements BlockStatement +{ + jpElementStart(1); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +BlockStatement: +LocalVariableDeclarationStatement +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +Statement +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ClassDeclaration +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +LocalVariableDeclarationStatement: +LocalVariableDeclaration jp_SEMICOL +{ + jpElementStart(1); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +LocalVariableDeclaration: +Modifiers Type VariableDeclarators +{ + jpElementStart(1); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +Type VariableDeclarators +{ + jpElementStart(1); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +Statement: +StatementWithoutTrailingSubstatement +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +LabeledStatement +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +IfThenStatement +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +IfThenElseStatement +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +WhileStatement +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ForStatement +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +StatementNoShortIf: +StatementWithoutTrailingSubstatement +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +LabeledStatementNoShortIf +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +IfThenElseStatementNoShortIf +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +WhileStatementNoShortIf +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ForStatementNoShortIf +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +StatementWithoutTrailingSubstatement: +Block +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +EmptyStatement +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ExpressionStatement +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +SwitchStatement +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +DoStatement +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +BreakStatement +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ContinueStatement +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ReturnStatement +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +SynchronizedStatement +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ThrowStatement +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +TryStatement +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +AssertStatement +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +EmptyStatement: +jp_SEMICOL +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +LabeledStatement: +Identifier jp_COLON Statement +{ + jpElementStart(3); + yyGetParser->DeallocateParserType(&($1)); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +LabeledStatementNoShortIf: +Identifier jp_COLON StatementNoShortIf +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ExpressionStatement: +StatementExpression jp_SEMICOL +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +StatementExpression: +Assignment +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +PreIncrementExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +PreDecrementExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +PostIncrementExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +PostDecrementExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +MethodInvocation +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ClassInstanceCreationExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +IfThenStatement: +jp_IF jp_PARESTART Expression jp_PAREEND Statement +{ + jpElementStart(5); + jpCheckEmpty(5); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +IfThenElseStatement: +jp_IF jp_PARESTART Expression jp_PAREEND StatementNoShortIf jp_ELSE Statement +{ + jpElementStart(7); + jpCheckEmpty(7); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +IfThenElseStatementNoShortIf: +jp_IF jp_PARESTART Expression jp_PAREEND StatementNoShortIf jp_ELSE StatementNoShortIf +{ + jpElementStart(7); + jpCheckEmpty(7); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +SwitchStatement: +jp_SWITCH jp_PARESTART Expression jp_PAREEND SwitchBlock +{ + jpElementStart(5); + +} + +SwitchBlock: +jp_CURLYSTART SwitchBlockStatementGroups SwitchLabelsopt jp_CURLYEND +{ + jpElementStart(4); + +} + +SwitchLabelsopt: +{ + jpElementStart(0); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +SwitchLabels +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +SwitchBlockStatementGroups: +{ + jpElementStart(0); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +SwitchBlockStatementGroups SwitchBlockStatementGroup +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +SwitchBlockStatementGroup: +SwitchLabels BlockStatements +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +SwitchLabels: +SwitchLabel +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +SwitchLabels SwitchLabel +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +SwitchLabel: +jp_CASE ConstantExpression jp_COLON +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +jp_DEFAULT jp_COLON +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +WhileStatement: +jp_WHILE jp_PARESTART Expression jp_PAREEND Statement +{ + jpElementStart(5); + +} + +WhileStatementNoShortIf: +jp_WHILE jp_PARESTART Expression jp_PAREEND StatementNoShortIf +{ + jpElementStart(5); + +} + +DoStatement: +jp_DO Statement jp_WHILE jp_PARESTART Expression jp_PAREEND jp_SEMICOL +{ + jpElementStart(7); + +} + +ForStatement: +jp_FOR jp_PARESTART ForInitopt jp_SEMICOL Expressionopt jp_SEMICOL ForUpdateopt jp_PAREEND +Statement +{ + jpElementStart(9); + +} + +ForUpdateopt: +{ + jpElementStart(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ForUpdate +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ForInitopt: +{ + jpElementStart(0); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ForInit +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ForStatementNoShortIf: +jp_FOR jp_PARESTART ForInitopt jp_SEMICOL Expressionopt jp_SEMICOL ForUpdateopt jp_PAREEND +StatementNoShortIf +{ + jpElementStart(9); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +Expressionopt: +{ + jpElementStart(0); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +Expression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ForInit: +StatementExpressionList +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +LocalVariableDeclaration +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ForUpdate: +StatementExpressionList +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +StatementExpressionList: +StatementExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +StatementExpressionList jp_COMMA StatementExpression +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +AssertStatement: +jp_ASSERT Expression jp_SEMICOL +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +jp_ASSERT Expression jp_COLON Expression jp_SEMICOL +{ + jpElementStart(5); + jpCheckEmpty(5); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +BreakStatement: +jp_BREAK Identifieropt jp_SEMICOL +{ + jpElementStart(3); + yyGetParser->DeallocateParserType(&($2)); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +Identifieropt: +{ + jpElementStart(0); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +Identifier +{ + jpElementStart(1); + +} + +ContinueStatement: +jp_CONTINUE Identifieropt jp_SEMICOL +{ + jpElementStart(3); + yyGetParser->DeallocateParserType(&($2)); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ReturnStatement: +jp_RETURN Expressionopt jp_SEMICOL +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ThrowStatement: +jp_THROW Expression jp_SEMICOL +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +SynchronizedStatement: +jp_SYNCHRONIZED jp_PARESTART Expression jp_PAREEND Block +{ + jpElementStart(5); + jpCheckEmpty(5); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +TryStatement: +jp_TRY Block Catches +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +jp_TRY Block Catchesopt Finally +{ + jpElementStart(4); + jpCheckEmpty(4); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +Catchesopt: +{ + jpElementStart(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +Catches +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +Catches: +CatchClause +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +Catches CatchClause +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +CatchClause: +jp_CATCH jp_PARESTART FormalParameter jp_PAREEND Block +{ + jpElementStart(5); + +} + +Finally: +jp_FINALLY Block +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +Primary: +PrimaryNoNewArray +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ArrayCreationExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +PrimaryNoNewArray: +Literal +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +jp_THIS +{ + jpElementStart(1); + +} +| +jp_PARESTART Expression jp_PAREEND +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ClassInstanceCreationExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +FieldAccess +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +MethodInvocation +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ArrayAccess +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ClassInstanceCreationExpression: +New ClassType jp_PARESTART ArgumentListopt jp_PAREEND ClassBodyOpt +{ + jpElementStart(6); + jpCheckEmpty(6); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ClassBodyOpt: +{ + jpElementStart(0); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ClassBody +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ArgumentListopt: +{ + jpElementStart(0); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ArgumentList +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ArgumentList: +Expression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ArgumentList jp_COMMA Expression +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ArrayCreationExpression: +New PrimitiveType DimExprs Dimsopt +{ + jpElementStart(4); + jpCheckEmpty(4); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +New ClassOrInterfaceType DimExprs Dimsopt +{ + jpElementStart(4); + jpCheckEmpty(4); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +New PrimitiveType Dims ArrayInitializer +{ + jpElementStart(4); + jpCheckEmpty(4); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +New ClassOrInterfaceType Dims ArrayInitializer +{ + jpElementStart(4); + jpCheckEmpty(4); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +Dimsopt: +{ + jpElementStart(0); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +Dims +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +DimExprs: +DimExpr +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +DimExprs DimExpr +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +DimExpr: +jp_BRACKETSTART Expression jp_BRACKETEND +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +Dims: +jp_BRACKETSTART jp_BRACKETEND +{ + jpElementStart(2); + +} +| +Dims jp_BRACKETSTART jp_BRACKETEND +{ + jpElementStart(3); + +} + +FieldAccess: +Primary jp_DOT Identifier +{ + jpElementStart(3); + yyGetParser->DeallocateParserType(&($3)); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +jp_SUPER jp_DOT Identifier +{ + jpElementStart(3); + yyGetParser->DeallocateParserType(&($3)); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +jp_THIS jp_DOT Identifier +{ + jpElementStart(3); + yyGetParser->DeallocateParserType(&($3)); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +Primary jp_DOT jp_THIS +{ + jpElementStart(3); + yyGetParser->DeallocateParserType(&($3)); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +MethodInvocation: +Name jp_PARESTART ArgumentListopt jp_PAREEND +{ + jpElementStart(4); + yyGetParser->DeallocateParserType(&($1)); + jpCheckEmpty(4); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +Primary jp_DOT Identifier jp_PARESTART ArgumentListopt jp_PAREEND +{ + jpElementStart(6); + yyGetParser->DeallocateParserType(&($1)); + yyGetParser->DeallocateParserType(&($3)); + jpCheckEmpty(6); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +jp_SUPER jp_DOT Identifier jp_PARESTART ArgumentListopt jp_PAREEND +{ + jpElementStart(6); + yyGetParser->DeallocateParserType(&($3)); + jpCheckEmpty(6); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +jp_THIS jp_DOT Identifier jp_PARESTART ArgumentListopt jp_PAREEND +{ + jpElementStart(6); + yyGetParser->DeallocateParserType(&($3)); + jpCheckEmpty(6); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ArrayAccess: +Name jp_BRACKETSTART Expression jp_BRACKETEND +{ + jpElementStart(4); + yyGetParser->DeallocateParserType(&($1)); + jpCheckEmpty(4); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +PrimaryNoNewArray jp_BRACKETSTART Expression jp_BRACKETEND +{ + jpElementStart(4); + jpCheckEmpty(4); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +PostfixExpression: +Primary +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +Name +{ + jpElementStart(1); + yyGetParser->DeallocateParserType(&($1)); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ArrayType jp_DOT jp_CLASS +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +PostIncrementExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +PostDecrementExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +PostIncrementExpression: +PostfixExpression jp_PLUSPLUS +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +PostDecrementExpression: +PostfixExpression jp_MINUSMINUS +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +UnaryExpression: +PreIncrementExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +PreDecrementExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +jp_PLUS UnaryExpression +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +jp_MINUS UnaryExpression +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +UnaryExpressionNotPlusMinus +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +PreIncrementExpression: +jp_PLUSPLUS UnaryExpression +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +PreDecrementExpression: +jp_MINUSMINUS UnaryExpression +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +UnaryExpressionNotPlusMinus: +PostfixExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +jp_TILDE UnaryExpression +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +jp_EXCLAMATION UnaryExpression +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +CastExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +CastExpression: +jp_PARESTART PrimitiveType Dimsopt jp_PAREEND UnaryExpression +{ + jpElementStart(5); + jpCheckEmpty(5); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +jp_PARESTART Expression jp_PAREEND UnaryExpressionNotPlusMinus +{ + jpElementStart(4); + jpCheckEmpty(4); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +jp_PARESTART Name Dims jp_PAREEND UnaryExpressionNotPlusMinus +{ + jpElementStart(5); + +} + +MultiplicativeExpression: +UnaryExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +MultiplicativeExpression jp_TIMES UnaryExpression +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +MultiplicativeExpression jp_DIVIDE UnaryExpression +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +MultiplicativeExpression jp_PERCENT UnaryExpression +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +AdditiveExpression: +MultiplicativeExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +AdditiveExpression jp_PLUS MultiplicativeExpression +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +AdditiveExpression jp_MINUS MultiplicativeExpression +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ShiftExpression: +AdditiveExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ShiftExpression jp_LTLT AdditiveExpression +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ShiftExpression jp_GTGT AdditiveExpression +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ShiftExpression jp_GTGTGT AdditiveExpression +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +RelationalExpression: +ShiftExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +RelationalExpression jp_LESSTHAN ShiftExpression +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +RelationalExpression jp_GREATER ShiftExpression +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +RelationalExpression jp_LTEQUALS ShiftExpression +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +RelationalExpression jp_GTEQUALS ShiftExpression +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +RelationalExpression jp_INSTANCEOF ReferenceType +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +EqualityExpression: +RelationalExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +EqualityExpression jp_EQUALSEQUALS RelationalExpression +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +EqualityExpression jp_EXCLAMATIONEQUALS RelationalExpression +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +AndExpression: +EqualityExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +AndExpression jp_AND EqualityExpression +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ExclusiveOrExpression: +AndExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ExclusiveOrExpression jp_CARROT AndExpression +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +InclusiveOrExpression: +ExclusiveOrExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +InclusiveOrExpression jp_PIPE ExclusiveOrExpression +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ConditionalAndExpression: +InclusiveOrExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ConditionalAndExpression jp_ANDAND InclusiveOrExpression +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ConditionalOrExpression: +ConditionalAndExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ConditionalOrExpression jp_PIPEPIPE ConditionalAndExpression +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ConditionalExpression: +ConditionalOrExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ConditionalOrExpression jp_QUESTION Expression jp_COLON ConditionalExpression +{ + jpElementStart(5); + jpCheckEmpty(5); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +AssignmentExpression: +ConditionalExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +Assignment +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +Assignment: +LeftHandSide AssignmentOperator AssignmentExpression +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +LeftHandSide: +Name +{ + jpElementStart(1); + yyGetParser->DeallocateParserType(&($1)); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +FieldAccess +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ArrayAccess +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +AssignmentOperator: +jp_EQUALS +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +jp_TIMESEQUALS +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +jp_DIVIDEEQUALS +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +jp_PERCENTEQUALS +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +jp_PLUSEQUALS +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +jp_MINUSEQUALS +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +jp_LESLESEQUALS +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +jp_GTGTEQUALS +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +jp_GTGTGTEQUALS +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +jp_ANDEQUALS +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +jp_CARROTEQUALS +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +jp_PIPEEQUALS +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +Expression: +AssignmentExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ConstantExpression: +Expression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +New: +jp_NEW +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +Name jp_DOT jp_NEW +{ + jpElementStart(3); + jpStoreClass($1); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +%% +/* End of grammar */ + +/*--------------------------------------------------------------------------*/ +void cmDependsJava_yyerror(yyscan_t yyscanner, const char* message) +{ + yyGetParser->Error(message); +} diff --git a/Source/LexerParser/cmDependsJavaParserTokens.h b/Source/LexerParser/cmDependsJavaParserTokens.h new file mode 100644 index 0000000..7f18f1d --- /dev/null +++ b/Source/LexerParser/cmDependsJavaParserTokens.h @@ -0,0 +1,264 @@ +/* A Bison parser, made by GNU Bison 3.0.4. */ + +/* Bison interface for Yacc-like parsers in C + + Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +#ifndef YY_CMDEPENDSJAVA_YY_CMDEPENDSJAVAPARSERTOKENS_H_INCLUDED +# define YY_CMDEPENDSJAVA_YY_CMDEPENDSJAVAPARSERTOKENS_H_INCLUDED +/* Debug traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif +#if YYDEBUG +extern int cmDependsJava_yydebug; +#endif + +/* Token type. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + enum yytokentype + { + jp_ABSTRACT = 258, + jp_ASSERT = 259, + jp_BOOLEAN_TYPE = 260, + jp_BREAK = 261, + jp_BYTE_TYPE = 262, + jp_CASE = 263, + jp_CATCH = 264, + jp_CHAR_TYPE = 265, + jp_CLASS = 266, + jp_CONTINUE = 267, + jp_DEFAULT = 268, + jp_DO = 269, + jp_DOUBLE_TYPE = 270, + jp_ELSE = 271, + jp_EXTENDS = 272, + jp_FINAL = 273, + jp_FINALLY = 274, + jp_FLOAT_TYPE = 275, + jp_FOR = 276, + jp_IF = 277, + jp_IMPLEMENTS = 278, + jp_IMPORT = 279, + jp_INSTANCEOF = 280, + jp_INT_TYPE = 281, + jp_INTERFACE = 282, + jp_LONG_TYPE = 283, + jp_NATIVE = 284, + jp_NEW = 285, + jp_PACKAGE = 286, + jp_PRIVATE = 287, + jp_PROTECTED = 288, + jp_PUBLIC = 289, + jp_RETURN = 290, + jp_SHORT_TYPE = 291, + jp_STATIC = 292, + jp_STRICTFP = 293, + jp_SUPER = 294, + jp_SWITCH = 295, + jp_SYNCHRONIZED = 296, + jp_THIS = 297, + jp_THROW = 298, + jp_THROWS = 299, + jp_TRANSIENT = 300, + jp_TRY = 301, + jp_VOID = 302, + jp_VOLATILE = 303, + jp_WHILE = 304, + jp_BOOLEANLITERAL = 305, + jp_CHARACTERLITERAL = 306, + jp_DECIMALINTEGERLITERAL = 307, + jp_FLOATINGPOINTLITERAL = 308, + jp_HEXINTEGERLITERAL = 309, + jp_NULLLITERAL = 310, + jp_STRINGLITERAL = 311, + jp_NAME = 312, + jp_AND = 313, + jp_ANDAND = 314, + jp_ANDEQUALS = 315, + jp_BRACKETEND = 316, + jp_BRACKETSTART = 317, + jp_CARROT = 318, + jp_CARROTEQUALS = 319, + jp_COLON = 320, + jp_COMMA = 321, + jp_CURLYEND = 322, + jp_CURLYSTART = 323, + jp_DIVIDE = 324, + jp_DIVIDEEQUALS = 325, + jp_DOLLAR = 326, + jp_DOT = 327, + jp_EQUALS = 328, + jp_EQUALSEQUALS = 329, + jp_EXCLAMATION = 330, + jp_EXCLAMATIONEQUALS = 331, + jp_GREATER = 332, + jp_GTEQUALS = 333, + jp_GTGT = 334, + jp_GTGTEQUALS = 335, + jp_GTGTGT = 336, + jp_GTGTGTEQUALS = 337, + jp_LESLESEQUALS = 338, + jp_LESSTHAN = 339, + jp_LTEQUALS = 340, + jp_LTLT = 341, + jp_MINUS = 342, + jp_MINUSEQUALS = 343, + jp_MINUSMINUS = 344, + jp_PAREEND = 345, + jp_PARESTART = 346, + jp_PERCENT = 347, + jp_PERCENTEQUALS = 348, + jp_PIPE = 349, + jp_PIPEEQUALS = 350, + jp_PIPEPIPE = 351, + jp_PLUS = 352, + jp_PLUSEQUALS = 353, + jp_PLUSPLUS = 354, + jp_QUESTION = 355, + jp_SEMICOL = 356, + jp_TILDE = 357, + jp_TIMES = 358, + jp_TIMESEQUALS = 359, + jp_ERROR = 360 + }; +#endif +/* Tokens. */ +#define jp_ABSTRACT 258 +#define jp_ASSERT 259 +#define jp_BOOLEAN_TYPE 260 +#define jp_BREAK 261 +#define jp_BYTE_TYPE 262 +#define jp_CASE 263 +#define jp_CATCH 264 +#define jp_CHAR_TYPE 265 +#define jp_CLASS 266 +#define jp_CONTINUE 267 +#define jp_DEFAULT 268 +#define jp_DO 269 +#define jp_DOUBLE_TYPE 270 +#define jp_ELSE 271 +#define jp_EXTENDS 272 +#define jp_FINAL 273 +#define jp_FINALLY 274 +#define jp_FLOAT_TYPE 275 +#define jp_FOR 276 +#define jp_IF 277 +#define jp_IMPLEMENTS 278 +#define jp_IMPORT 279 +#define jp_INSTANCEOF 280 +#define jp_INT_TYPE 281 +#define jp_INTERFACE 282 +#define jp_LONG_TYPE 283 +#define jp_NATIVE 284 +#define jp_NEW 285 +#define jp_PACKAGE 286 +#define jp_PRIVATE 287 +#define jp_PROTECTED 288 +#define jp_PUBLIC 289 +#define jp_RETURN 290 +#define jp_SHORT_TYPE 291 +#define jp_STATIC 292 +#define jp_STRICTFP 293 +#define jp_SUPER 294 +#define jp_SWITCH 295 +#define jp_SYNCHRONIZED 296 +#define jp_THIS 297 +#define jp_THROW 298 +#define jp_THROWS 299 +#define jp_TRANSIENT 300 +#define jp_TRY 301 +#define jp_VOID 302 +#define jp_VOLATILE 303 +#define jp_WHILE 304 +#define jp_BOOLEANLITERAL 305 +#define jp_CHARACTERLITERAL 306 +#define jp_DECIMALINTEGERLITERAL 307 +#define jp_FLOATINGPOINTLITERAL 308 +#define jp_HEXINTEGERLITERAL 309 +#define jp_NULLLITERAL 310 +#define jp_STRINGLITERAL 311 +#define jp_NAME 312 +#define jp_AND 313 +#define jp_ANDAND 314 +#define jp_ANDEQUALS 315 +#define jp_BRACKETEND 316 +#define jp_BRACKETSTART 317 +#define jp_CARROT 318 +#define jp_CARROTEQUALS 319 +#define jp_COLON 320 +#define jp_COMMA 321 +#define jp_CURLYEND 322 +#define jp_CURLYSTART 323 +#define jp_DIVIDE 324 +#define jp_DIVIDEEQUALS 325 +#define jp_DOLLAR 326 +#define jp_DOT 327 +#define jp_EQUALS 328 +#define jp_EQUALSEQUALS 329 +#define jp_EXCLAMATION 330 +#define jp_EXCLAMATIONEQUALS 331 +#define jp_GREATER 332 +#define jp_GTEQUALS 333 +#define jp_GTGT 334 +#define jp_GTGTEQUALS 335 +#define jp_GTGTGT 336 +#define jp_GTGTGTEQUALS 337 +#define jp_LESLESEQUALS 338 +#define jp_LESSTHAN 339 +#define jp_LTEQUALS 340 +#define jp_LTLT 341 +#define jp_MINUS 342 +#define jp_MINUSEQUALS 343 +#define jp_MINUSMINUS 344 +#define jp_PAREEND 345 +#define jp_PARESTART 346 +#define jp_PERCENT 347 +#define jp_PERCENTEQUALS 348 +#define jp_PIPE 349 +#define jp_PIPEEQUALS 350 +#define jp_PIPEPIPE 351 +#define jp_PLUS 352 +#define jp_PLUSEQUALS 353 +#define jp_PLUSPLUS 354 +#define jp_QUESTION 355 +#define jp_SEMICOL 356 +#define jp_TILDE 357 +#define jp_TIMES 358 +#define jp_TIMESEQUALS 359 +#define jp_ERROR 360 + +/* Value type. */ + + + +int cmDependsJava_yyparse (yyscan_t yyscanner); + +#endif /* !YY_CMDEPENDSJAVA_YY_CMDEPENDSJAVAPARSERTOKENS_H_INCLUDED */ diff --git a/Source/LexerParser/cmExprLexer.cxx b/Source/LexerParser/cmExprLexer.cxx new file mode 100644 index 0000000..fb6f0db --- /dev/null +++ b/Source/LexerParser/cmExprLexer.cxx @@ -0,0 +1,2033 @@ +#include "cmStandardLexer.h" +#line 2 "cmExprLexer.cxx" + +#line 4 "cmExprLexer.cxx" + +#define FLEXINT_H 1 +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 6 +#define YY_FLEX_SUBMINOR_VERSION 1 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ +#include +#include +#include +#include + +/* end standard C headers. */ + +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have . Non-C99 systems may or may not. */ + +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 +#endif + +#include +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#endif /* ! C99 */ + +#endif /* ! FLEXINT_H */ + +/* TODO: this is always defined, so inline it */ +#define yyconst const + +#if defined(__GNUC__) && __GNUC__ >= 3 +#define yynoreturn __attribute__((__noreturn__)) +#else +#define yynoreturn +#endif + +/* Returned upon end-of-file. */ +#define YY_NULL 0 + +/* Promotes a possibly negative, possibly signed char to an unsigned + * integer for use as an array index. If the signed char is negative, + * we want to instead treat it as an 8-bit unsigned char, hence the + * double cast. + */ +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) + +/* An opaque pointer. */ +#ifndef YY_TYPEDEF_YY_SCANNER_T +#define YY_TYPEDEF_YY_SCANNER_T +typedef void* yyscan_t; +#endif + +/* For convenience, these vars (plus the bison vars far below) + are macros in the reentrant scanner. */ +#define yyin yyg->yyin_r +#define yyout yyg->yyout_r +#define yyextra yyg->yyextra_r +#define yyleng yyg->yyleng_r +#define yytext yyg->yytext_r +#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) +#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) +#define yy_flex_debug yyg->yy_flex_debug_r + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN yyg->yy_start = 1 + 2 * + +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START ((yyg->yy_start - 1) / 2) +#define YYSTATE YY_START + +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) + +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE cmExpr_yyrestart(yyin ,yyscanner ) + +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#ifndef YY_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k. + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. + * Ditto for the __ia64__ case accordingly. + */ +#define YY_BUF_SIZE 32768 +#else +#define YY_BUF_SIZE 16384 +#endif /* __ia64__ */ +#endif + +/* The state buf must be large enough to hold one state per character in the main buffer. + */ +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE +typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + + #define YY_LESS_LINENO(n) + #define YY_LINENO_REWIND_TO(ptr) + +/* Return all but the first "n" matched characters back to the input stream. */ +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = yyg->yy_hold_char; \ + YY_RESTORE_YY_MORE_OFFSET \ + yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) + +#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) + +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via cmExpr_yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + * + * Returns the top of the stack, or NULL. + */ +#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ + ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ + : NULL) + +/* Same as previous macro, but useful when we know that the buffer stack is not + * NULL or when we need an lvalue. For internal use only. + */ +#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] + +void cmExpr_yyrestart (FILE *input_file ,yyscan_t yyscanner ); +void cmExpr_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); +YY_BUFFER_STATE cmExpr_yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner ); +void cmExpr_yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); +void cmExpr_yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); +void cmExpr_yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); +void cmExpr_yypop_buffer_state (yyscan_t yyscanner ); + +static void cmExpr_yyensure_buffer_stack (yyscan_t yyscanner ); +static void cmExpr_yy_load_buffer_state (yyscan_t yyscanner ); +static void cmExpr_yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner ); + +#define YY_FLUSH_BUFFER cmExpr_yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner) + +YY_BUFFER_STATE cmExpr_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); +YY_BUFFER_STATE cmExpr_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); +YY_BUFFER_STATE cmExpr_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); + +void *cmExpr_yyalloc (yy_size_t ,yyscan_t yyscanner ); +void *cmExpr_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); +void cmExpr_yyfree (void * ,yyscan_t yyscanner ); + +#define yy_new_buffer cmExpr_yy_create_buffer + +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + cmExpr_yyensure_buffer_stack (yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = \ + cmExpr_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } + +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + cmExpr_yyensure_buffer_stack (yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = \ + cmExpr_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } + +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) + +/* Begin user sect3 */ + +#define cmExpr_yywrap(yyscanner) (/*CONSTCOND*/1) +#define YY_SKIP_YYWRAP + +typedef unsigned char YY_CHAR; + +typedef int yy_state_type; + +#define yytext_ptr yytext_r + +static yy_state_type yy_get_previous_state (yyscan_t yyscanner ); +static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner); +static int yy_get_next_buffer (yyscan_t yyscanner ); +static void yynoreturn yy_fatal_error (yyconst char* msg ,yyscan_t yyscanner ); + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up yytext. + */ +#define YY_DO_BEFORE_ACTION \ + yyg->yytext_ptr = yy_bp; \ + yyleng = (int) (yy_cp - yy_bp); \ + yyg->yy_hold_char = *yy_cp; \ + *yy_cp = '\0'; \ + yyg->yy_c_buf_p = yy_cp; + +#define YY_NUM_RULES 15 +#define YY_END_OF_BUFFER 16 +/* This struct is not used in this scanner, + but its presence is necessary. */ +struct yy_trans_info + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static yyconst flex_int16_t yy_accept[23] = + { 0, + 0, 0, 16, 15, 6, 8, 13, 14, 4, 2, + 3, 5, 1, 15, 15, 9, 7, 10, 1, 11, + 12, 0 + } ; + +static yyconst YY_CHAR yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 2, 3, 1, 4, + 5, 6, 7, 1, 8, 1, 9, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 1, 1, 11, + 1, 12, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 13, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 14, 1, 15, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static yyconst YY_CHAR yy_meta[16] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static yyconst flex_uint16_t yy_base[23] = + { 0, + 0, 0, 20, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 9, 7, 5, 21, 21, 21, 6, 21, + 21, 21 + } ; + +static yyconst flex_int16_t yy_def[23] = + { 0, + 22, 1, 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, + 22, 0 + } ; + +static yyconst flex_uint16_t yy_nxt[37] = + { 0, + 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, + 14, 15, 16, 17, 18, 19, 21, 20, 19, 22, + 3, 22, 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22 + } ; + +static yyconst flex_int16_t yy_chk[37] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 19, 15, 14, 13, 3, + 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22 + } ; + +/* The intent behind this definition is that it'll catch + * any uses of REJECT which flex missed. + */ +#define REJECT reject_used_but_not_detected +#define yymore() yymore_used_but_not_detected +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET +#line 1 "cmExprLexer.in.l" +#line 2 "cmExprLexer.in.l" +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +/* + +This file must be translated to C++ and modified to build everywhere. + +Run flex >= 2.6 like this: + + flex --nounistd -DFLEXINT_H --prefix=cmExpr_yy --header-file=cmExprLexer.h -ocmExprLexer.cxx cmExprLexer.in.l + +Modify cmExprLexer.cxx: + - remove trailing whitespace: sed -i 's/\s*$//' cmExprLexer.h cmExprLexer.cxx + - remove blank lines at end of file + - #include "cmStandardLexer.h" at the top + - add cast in cmExpr_yy_scan_bytes for loop condition of _yybytes_len to size_t + +*/ + +/* IWYU pragma: no_forward_declare yyguts_t */ + +#include "cmExprParserHelper.h" + +/* Replace the lexer input function. */ +#undef YY_INPUT +#define YY_INPUT(buf, result, max_size) \ + { result = yyextra->LexInput(buf, max_size); } + +/* Include the set of tokens from the parser. */ +#include "cmExprParserTokens.h" + +/*--------------------------------------------------------------------------*/ +#line 476 "cmExprLexer.cxx" + +#define INITIAL 0 + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +/* Holds the entire state of the reentrant scanner. */ +struct yyguts_t + { + + /* User-defined. Not touched by flex. */ + YY_EXTRA_TYPE yyextra_r; + + /* The rest are the same as the globals declared in the non-reentrant scanner. */ + FILE *yyin_r, *yyout_r; + size_t yy_buffer_stack_top; /**< index of top of stack. */ + size_t yy_buffer_stack_max; /**< capacity of stack. */ + YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ + char yy_hold_char; + int yy_n_chars; + int yyleng_r; + char *yy_c_buf_p; + int yy_init; + int yy_start; + int yy_did_buffer_switch_on_eof; + int yy_start_stack_ptr; + int yy_start_stack_depth; + int *yy_start_stack; + yy_state_type yy_last_accepting_state; + char* yy_last_accepting_cpos; + + int yylineno_r; + int yy_flex_debug_r; + + char *yytext_r; + int yy_more_flag; + int yy_more_len; + + }; /* end struct yyguts_t */ + +static int yy_init_globals (yyscan_t yyscanner ); + +int cmExpr_yylex_init (yyscan_t* scanner); + +int cmExpr_yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); + +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int cmExpr_yylex_destroy (yyscan_t yyscanner ); + +int cmExpr_yyget_debug (yyscan_t yyscanner ); + +void cmExpr_yyset_debug (int debug_flag ,yyscan_t yyscanner ); + +YY_EXTRA_TYPE cmExpr_yyget_extra (yyscan_t yyscanner ); + +void cmExpr_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); + +FILE *cmExpr_yyget_in (yyscan_t yyscanner ); + +void cmExpr_yyset_in (FILE * _in_str ,yyscan_t yyscanner ); + +FILE *cmExpr_yyget_out (yyscan_t yyscanner ); + +void cmExpr_yyset_out (FILE * _out_str ,yyscan_t yyscanner ); + + int cmExpr_yyget_leng (yyscan_t yyscanner ); + +char *cmExpr_yyget_text (yyscan_t yyscanner ); + +int cmExpr_yyget_lineno (yyscan_t yyscanner ); + +void cmExpr_yyset_lineno (int _line_number ,yyscan_t yyscanner ); + +int cmExpr_yyget_column (yyscan_t yyscanner ); + +void cmExpr_yyset_column (int _column_no ,yyscan_t yyscanner ); + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int cmExpr_yywrap (yyscan_t yyscanner ); +#else +extern int cmExpr_yywrap (yyscan_t yyscanner ); +#endif +#endif + +#ifndef YY_NO_UNPUT + + static void yyunput (int c,char *buf_ptr ,yyscan_t yyscanner); + +#endif + +#ifndef yytext_ptr +static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); +#endif + +#ifndef YY_NO_INPUT + +#ifdef __cplusplus +static int yyinput (yyscan_t yyscanner ); +#else +static int input (yyscan_t yyscanner ); +#endif + +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k */ +#define YY_READ_BUF_SIZE 16384 +#else +#define YY_READ_BUF_SIZE 8192 +#endif /* __ia64__ */ +#endif + +/* Copy whatever the last rule matched to the standard output. */ +#ifndef ECHO +/* This used to be an fputs(), but since the string might contain NUL's, + * we now use fwrite(). + */ +#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ + { \ + int c = '*'; \ + size_t n; \ + for ( n = 0; n < max_size && \ + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else \ + { \ + errno=0; \ + while ( (result = (int) fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(yyin); \ + } \ + }\ +\ + +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) +#endif + +/* end tables serialization structures and prototypes */ + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL_IS_OURS 1 + +extern int cmExpr_yylex (yyscan_t yyscanner); + +#define YY_DECL int cmExpr_yylex (yyscan_t yyscanner) +#endif /* !YY_DECL */ + +/* Code executed at the beginning of each rule, after yytext and yyleng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK /*LINTED*/break; +#endif + +#define YY_RULE_SETUP \ + YY_USER_ACTION + +/** The main scanner function which does all the work. + */ +YY_DECL +{ + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if ( !yyg->yy_init ) + { + yyg->yy_init = 1; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + if ( ! yyg->yy_start ) + yyg->yy_start = 1; /* first start state */ + + if ( ! yyin ) + yyin = stdin; + + if ( ! yyout ) + yyout = stdout; + + if ( ! YY_CURRENT_BUFFER ) { + cmExpr_yyensure_buffer_stack (yyscanner); + YY_CURRENT_BUFFER_LVALUE = + cmExpr_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); + } + + cmExpr_yy_load_buffer_state(yyscanner ); + } + + { +#line 39 "cmExprLexer.in.l" + + +#line 732 "cmExprLexer.cxx" + + while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ + { + yy_cp = yyg->yy_c_buf_p; + + /* Support of yytext. */ + *yy_cp = yyg->yy_hold_char; + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = yyg->yy_start; +yy_match: + do + { + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 23 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; + ++yy_cp; + } + while ( yy_base[yy_current_state] != 21 ); + +yy_find_action: + yy_act = yy_accept[yy_current_state]; + if ( yy_act == 0 ) + { /* have to back up */ + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + yy_act = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + +do_action: /* This label is used only to access EOF actions. */ + + switch ( yy_act ) + { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = yyg->yy_hold_char; + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + goto yy_find_action; + +case 1: +YY_RULE_SETUP +#line 41 "cmExprLexer.in.l" +{ yylvalp->Number = atoi(yytext); return exp_NUMBER; } + YY_BREAK +case 2: +YY_RULE_SETUP +#line 43 "cmExprLexer.in.l" +{ return exp_PLUS; } + YY_BREAK +case 3: +YY_RULE_SETUP +#line 44 "cmExprLexer.in.l" +{ return exp_MINUS; } + YY_BREAK +case 4: +YY_RULE_SETUP +#line 45 "cmExprLexer.in.l" +{ return exp_TIMES; } + YY_BREAK +case 5: +YY_RULE_SETUP +#line 46 "cmExprLexer.in.l" +{ return exp_DIVIDE; } + YY_BREAK +case 6: +YY_RULE_SETUP +#line 47 "cmExprLexer.in.l" +{ return exp_MOD; } + YY_BREAK +case 7: +YY_RULE_SETUP +#line 48 "cmExprLexer.in.l" +{ return exp_OR; } + YY_BREAK +case 8: +YY_RULE_SETUP +#line 49 "cmExprLexer.in.l" +{ return exp_AND; } + YY_BREAK +case 9: +YY_RULE_SETUP +#line 50 "cmExprLexer.in.l" +{ return exp_XOR; } + YY_BREAK +case 10: +YY_RULE_SETUP +#line 51 "cmExprLexer.in.l" +{ return exp_NOT; } + YY_BREAK +case 11: +YY_RULE_SETUP +#line 52 "cmExprLexer.in.l" +{ return exp_SHIFTLEFT; } + YY_BREAK +case 12: +YY_RULE_SETUP +#line 53 "cmExprLexer.in.l" +{ return exp_SHIFTRIGHT; } + YY_BREAK +case 13: +YY_RULE_SETUP +#line 54 "cmExprLexer.in.l" +{ return exp_OPENPARENT; } + YY_BREAK +case 14: +YY_RULE_SETUP +#line 55 "cmExprLexer.in.l" +{ return exp_CLOSEPARENT; } + YY_BREAK +case 15: +YY_RULE_SETUP +#line 57 "cmExprLexer.in.l" +ECHO; + YY_BREAK +#line 864 "cmExprLexer.cxx" +case YY_STATE_EOF(INITIAL): + yyterminate(); + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = yyg->yy_hold_char; + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * cmExpr_yylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( yyscanner ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); + + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++yyg->yy_c_buf_p; + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = yyg->yy_c_buf_p; + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( yyscanner ) ) + { + case EOB_ACT_END_OF_FILE: + { + yyg->yy_did_buffer_switch_on_eof = 0; + + if ( cmExpr_yywrap(yyscanner ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! yyg->yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = + yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( yyscanner ); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + yyg->yy_c_buf_p = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; + + yy_current_state = yy_get_previous_state( yyscanner ); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of user's declarations */ +} /* end of cmExpr_yylex */ + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ +static int yy_get_next_buffer (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = yyg->yytext_ptr; + yy_size_t number_to_move, i; + int ret_val; + + if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (yy_size_t) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1; + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; + + else + { + int num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; + + int yy_c_buf_p_offset = + (int) (yyg->yy_c_buf_p - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + cmExpr_yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = NULL; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + yyg->yy_n_chars, num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + if ( yyg->yy_n_chars == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + cmExpr_yyrestart(yyin ,yyscanner); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if ((int) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) cmExpr_yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + } + + yyg->yy_n_chars += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; + + yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; +} + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + + static yy_state_type yy_get_previous_state (yyscan_t yyscanner) +{ + yy_state_type yy_current_state; + char *yy_cp; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + yy_current_state = yyg->yy_start; + + for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) + { + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 23 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; + } + + return yy_current_state; +} + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) +{ + int yy_is_jam; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ + char *yy_cp = yyg->yy_c_buf_p; + + YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 23 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; + yy_is_jam = (yy_current_state == 22); + + (void)yyg; + return yy_is_jam ? 0 : yy_current_state; +} + +#ifndef YY_NO_UNPUT + + static void yyunput (int c, char * yy_bp , yyscan_t yyscanner) +{ + char *yy_cp; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + yy_cp = yyg->yy_c_buf_p; + + /* undo effects of setting up yytext */ + *yy_cp = yyg->yy_hold_char; + + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + { /* need to shift things up to make room */ + /* +2 for EOB chars. */ + int number_to_move = yyg->yy_n_chars + 2; + char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; + char *source = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; + + while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + *--dest = *--source; + + yy_cp += (int) (dest - source); + yy_bp += (int) (dest - source); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = + yyg->yy_n_chars = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size; + + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + YY_FATAL_ERROR( "flex scanner push-back overflow" ); + } + + *--yy_cp = (char) c; + + yyg->yytext_ptr = yy_bp; + yyg->yy_hold_char = *yy_cp; + yyg->yy_c_buf_p = yy_cp; +} + +#endif + +#ifndef YY_NO_INPUT +#ifdef __cplusplus + static int yyinput (yyscan_t yyscanner) +#else + static int input (yyscan_t yyscanner) +#endif + +{ + int c; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + *yyg->yy_c_buf_p = yyg->yy_hold_char; + + if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) + /* This was really a NUL. */ + *yyg->yy_c_buf_p = '\0'; + + else + { /* need more input */ + int offset = yyg->yy_c_buf_p - yyg->yytext_ptr; + ++yyg->yy_c_buf_p; + + switch ( yy_get_next_buffer( yyscanner ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + cmExpr_yyrestart(yyin ,yyscanner); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( cmExpr_yywrap(yyscanner ) ) + return 0; + + if ( ! yyg->yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(yyscanner); +#else + return input(yyscanner); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = yyg->yytext_ptr + offset; + break; + } + } + } + + c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ + *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ + yyg->yy_hold_char = *++yyg->yy_c_buf_p; + + return c; +} +#endif /* ifndef YY_NO_INPUT */ + +/** Immediately switch to a different input stream. + * @param input_file A readable stream. + * @param yyscanner The scanner object. + * @note This function does not reset the start condition to @c INITIAL . + */ + void cmExpr_yyrestart (FILE * input_file , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if ( ! YY_CURRENT_BUFFER ){ + cmExpr_yyensure_buffer_stack (yyscanner); + YY_CURRENT_BUFFER_LVALUE = + cmExpr_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); + } + + cmExpr_yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner); + cmExpr_yy_load_buffer_state(yyscanner ); +} + +/** Switch to a different input buffer. + * @param new_buffer The new input buffer. + * @param yyscanner The scanner object. + */ + void cmExpr_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* TODO. We should be able to replace this entire function body + * with + * cmExpr_yypop_buffer_state(); + * cmExpr_yypush_buffer_state(new_buffer); + */ + cmExpr_yyensure_buffer_stack (yyscanner); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + cmExpr_yy_load_buffer_state(yyscanner ); + + /* We don't actually know whether we did this switch during + * EOF (cmExpr_yywrap()) processing, but the only time this flag + * is looked at is after cmExpr_yywrap() is called, so it's safe + * to go ahead and always set it. + */ + yyg->yy_did_buffer_switch_on_eof = 1; +} + +static void cmExpr_yy_load_buffer_state (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + yyg->yy_hold_char = *yyg->yy_c_buf_p; +} + +/** Allocate and initialize an input buffer state. + * @param file A readable stream. + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. + * @param yyscanner The scanner object. + * @return the allocated buffer state. + */ + YY_BUFFER_STATE cmExpr_yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) +{ + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) cmExpr_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in cmExpr_yy_create_buffer()" ); + + b->yy_buf_size = (yy_size_t)size; + + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) cmExpr_yyalloc(b->yy_buf_size + 2 ,yyscanner ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in cmExpr_yy_create_buffer()" ); + + b->yy_is_our_buffer = 1; + + cmExpr_yy_init_buffer(b,file ,yyscanner); + + return b; +} + +/** Destroy the buffer. + * @param b a buffer created with cmExpr_yy_create_buffer() + * @param yyscanner The scanner object. + */ + void cmExpr_yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if ( ! b ) + return; + + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + cmExpr_yyfree((void *) b->yy_ch_buf ,yyscanner ); + + cmExpr_yyfree((void *) b ,yyscanner ); +} + +/* Initializes or reinitializes a buffer. + * This function is sometimes called more than once on the same buffer, + * such as during a cmExpr_yyrestart() or at EOF. + */ + static void cmExpr_yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) + +{ + int oerrno = errno; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + cmExpr_yy_flush_buffer(b ,yyscanner); + + b->yy_input_file = file; + b->yy_fill_buffer = 1; + + /* If b is the current buffer, then cmExpr_yy_init_buffer was _probably_ + * called from cmExpr_yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } + + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; + + errno = oerrno; +} + +/** Discard all buffered characters. On the next scan, YY_INPUT will be called. + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. + * @param yyscanner The scanner object. + */ + void cmExpr_yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if ( ! b ) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == YY_CURRENT_BUFFER ) + cmExpr_yy_load_buffer_state(yyscanner ); +} + +/** Pushes the new state onto the stack. The new state becomes + * the current state. This function will allocate the stack + * if necessary. + * @param new_buffer The new state. + * @param yyscanner The scanner object. + */ +void cmExpr_yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if (new_buffer == NULL) + return; + + cmExpr_yyensure_buffer_stack(yyscanner); + + /* This block is copied from cmExpr_yy_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + yyg->yy_buffer_stack_top++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from cmExpr_yy_switch_to_buffer. */ + cmExpr_yy_load_buffer_state(yyscanner ); + yyg->yy_did_buffer_switch_on_eof = 1; +} + +/** Removes and deletes the top of the stack, if present. + * The next element becomes the new top. + * @param yyscanner The scanner object. + */ +void cmExpr_yypop_buffer_state (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if (!YY_CURRENT_BUFFER) + return; + + cmExpr_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner); + YY_CURRENT_BUFFER_LVALUE = NULL; + if (yyg->yy_buffer_stack_top > 0) + --yyg->yy_buffer_stack_top; + + if (YY_CURRENT_BUFFER) { + cmExpr_yy_load_buffer_state(yyscanner ); + yyg->yy_did_buffer_switch_on_eof = 1; + } +} + +/* Allocates the stack if it does not exist. + * Guarantees space for at least one push. + */ +static void cmExpr_yyensure_buffer_stack (yyscan_t yyscanner) +{ + int num_to_alloc; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if (!yyg->yy_buffer_stack) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ + yyg->yy_buffer_stack = (struct yy_buffer_state**)cmExpr_yyalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + , yyscanner); + if ( ! yyg->yy_buffer_stack ) + YY_FATAL_ERROR( "out of dynamic memory in cmExpr_yyensure_buffer_stack()" ); + + memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + yyg->yy_buffer_stack_max = num_to_alloc; + yyg->yy_buffer_stack_top = 0; + return; + } + + if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + yy_size_t grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = yyg->yy_buffer_stack_max + grow_size; + yyg->yy_buffer_stack = (struct yy_buffer_state**)cmExpr_yyrealloc + (yyg->yy_buffer_stack, + num_to_alloc * sizeof(struct yy_buffer_state*) + , yyscanner); + if ( ! yyg->yy_buffer_stack ) + YY_FATAL_ERROR( "out of dynamic memory in cmExpr_yyensure_buffer_stack()" ); + + /* zero only the new slots.*/ + memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); + yyg->yy_buffer_stack_max = num_to_alloc; + } +} + +/** Setup the input buffer state to scan directly from a user-specified character buffer. + * @param base the character buffer + * @param size the size in bytes of the character buffer + * @param yyscanner The scanner object. + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE cmExpr_yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) +{ + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return NULL; + + b = (YY_BUFFER_STATE) cmExpr_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in cmExpr_yy_scan_buffer()" ); + + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = NULL; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + cmExpr_yy_switch_to_buffer(b ,yyscanner ); + + return b; +} + +/** Setup the input buffer state to scan a string. The next call to cmExpr_yylex() will + * scan from a @e copy of @a str. + * @param yystr a NUL-terminated string to scan + * @param yyscanner The scanner object. + * @return the newly allocated buffer state object. + * @note If you want to scan bytes that may contain NUL values, then use + * cmExpr_yy_scan_bytes() instead. + */ +YY_BUFFER_STATE cmExpr_yy_scan_string (yyconst char * yystr , yyscan_t yyscanner) +{ + + return cmExpr_yy_scan_bytes(yystr,(int) strlen(yystr) ,yyscanner); +} + +/** Setup the input buffer state to scan the given bytes. The next call to cmExpr_yylex() will + * scan from a @e copy of @a bytes. + * @param yybytes the byte buffer to scan + * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. + * @param yyscanner The scanner object. + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE cmExpr_yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner) +{ + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + yy_size_t i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = (yy_size_t) _yybytes_len + 2; + buf = (char *) cmExpr_yyalloc(n ,yyscanner ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in cmExpr_yy_scan_bytes()" ); + + for ( i = 0; i < (size_t)_yybytes_len; ++i ) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; + + b = cmExpr_yy_scan_buffer(buf,n ,yyscanner); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in cmExpr_yy_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; +} + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +static void yynoreturn yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + (void) fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); +} + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + yytext[yyleng] = yyg->yy_hold_char; \ + yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ + yyg->yy_hold_char = *yyg->yy_c_buf_p; \ + *yyg->yy_c_buf_p = '\0'; \ + yyleng = yyless_macro_arg; \ + } \ + while ( 0 ) + +/* Accessor methods (get/set functions) to struct members. */ + +/** Get the user-defined data for this scanner. + * @param yyscanner The scanner object. + */ +YY_EXTRA_TYPE cmExpr_yyget_extra (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyextra; +} + +/** Get the current line number. + * @param yyscanner The scanner object. + */ +int cmExpr_yyget_lineno (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if (! YY_CURRENT_BUFFER) + return 0; + + return yylineno; +} + +/** Get the current column number. + * @param yyscanner The scanner object. + */ +int cmExpr_yyget_column (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if (! YY_CURRENT_BUFFER) + return 0; + + return yycolumn; +} + +/** Get the input stream. + * @param yyscanner The scanner object. + */ +FILE *cmExpr_yyget_in (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyin; +} + +/** Get the output stream. + * @param yyscanner The scanner object. + */ +FILE *cmExpr_yyget_out (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyout; +} + +/** Get the length of the current token. + * @param yyscanner The scanner object. + */ +int cmExpr_yyget_leng (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyleng; +} + +/** Get the current token. + * @param yyscanner The scanner object. + */ + +char *cmExpr_yyget_text (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yytext; +} + +/** Set the user-defined data. This data is never touched by the scanner. + * @param user_defined The data to be associated with this scanner. + * @param yyscanner The scanner object. + */ +void cmExpr_yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyextra = user_defined ; +} + +/** Set the current line number. + * @param _line_number line number + * @param yyscanner The scanner object. + */ +void cmExpr_yyset_lineno (int _line_number , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* lineno is only valid if an input buffer exists. */ + if (! YY_CURRENT_BUFFER ) + YY_FATAL_ERROR( "cmExpr_yyset_lineno called with no buffer" ); + + yylineno = _line_number; +} + +/** Set the current column. + * @param _column_no column number + * @param yyscanner The scanner object. + */ +void cmExpr_yyset_column (int _column_no , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* column is only valid if an input buffer exists. */ + if (! YY_CURRENT_BUFFER ) + YY_FATAL_ERROR( "cmExpr_yyset_column called with no buffer" ); + + yycolumn = _column_no; +} + +/** Set the input stream. This does not discard the current + * input buffer. + * @param _in_str A readable stream. + * @param yyscanner The scanner object. + * @see cmExpr_yy_switch_to_buffer + */ +void cmExpr_yyset_in (FILE * _in_str , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyin = _in_str ; +} + +void cmExpr_yyset_out (FILE * _out_str , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyout = _out_str ; +} + +int cmExpr_yyget_debug (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yy_flex_debug; +} + +void cmExpr_yyset_debug (int _bdebug , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yy_flex_debug = _bdebug ; +} + +/* Accessor methods for yylval and yylloc */ + +/* User-visible API */ + +/* cmExpr_yylex_init is special because it creates the scanner itself, so it is + * the ONLY reentrant function that doesn't take the scanner as the last argument. + * That's why we explicitly handle the declaration, instead of using our macros. + */ + +int cmExpr_yylex_init(yyscan_t* ptr_yy_globals) + +{ + if (ptr_yy_globals == NULL){ + errno = EINVAL; + return 1; + } + + *ptr_yy_globals = (yyscan_t) cmExpr_yyalloc ( sizeof( struct yyguts_t ), NULL ); + + if (*ptr_yy_globals == NULL){ + errno = ENOMEM; + return 1; + } + + /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); + + return yy_init_globals ( *ptr_yy_globals ); +} + +/* cmExpr_yylex_init_extra has the same functionality as cmExpr_yylex_init, but follows the + * convention of taking the scanner as the last argument. Note however, that + * this is a *pointer* to a scanner, as it will be allocated by this call (and + * is the reason, too, why this function also must handle its own declaration). + * The user defined value in the first argument will be available to cmExpr_yyalloc in + * the yyextra field. + */ + +int cmExpr_yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals ) + +{ + struct yyguts_t dummy_yyguts; + + cmExpr_yyset_extra (yy_user_defined, &dummy_yyguts); + + if (ptr_yy_globals == NULL){ + errno = EINVAL; + return 1; + } + + *ptr_yy_globals = (yyscan_t) cmExpr_yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); + + if (*ptr_yy_globals == NULL){ + errno = ENOMEM; + return 1; + } + + /* By setting to 0xAA, we expose bugs in + yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); + + cmExpr_yyset_extra (yy_user_defined, *ptr_yy_globals); + + return yy_init_globals ( *ptr_yy_globals ); +} + +static int yy_init_globals (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from cmExpr_yylex_destroy(), so don't allocate here. + */ + + yyg->yy_buffer_stack = NULL; + yyg->yy_buffer_stack_top = 0; + yyg->yy_buffer_stack_max = 0; + yyg->yy_c_buf_p = NULL; + yyg->yy_init = 0; + yyg->yy_start = 0; + + yyg->yy_start_stack_ptr = 0; + yyg->yy_start_stack_depth = 0; + yyg->yy_start_stack = NULL; + +/* Defined in main.c */ +#ifdef YY_STDINIT + yyin = stdin; + yyout = stdout; +#else + yyin = NULL; + yyout = NULL; +#endif + + /* For future reference: Set errno on error, since we are called by + * cmExpr_yylex_init() + */ + return 0; +} + +/* cmExpr_yylex_destroy is for both reentrant and non-reentrant scanners. */ +int cmExpr_yylex_destroy (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + cmExpr_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner ); + YY_CURRENT_BUFFER_LVALUE = NULL; + cmExpr_yypop_buffer_state(yyscanner); + } + + /* Destroy the stack itself. */ + cmExpr_yyfree(yyg->yy_buffer_stack ,yyscanner); + yyg->yy_buffer_stack = NULL; + + /* Destroy the start condition stack. */ + cmExpr_yyfree(yyg->yy_start_stack ,yyscanner ); + yyg->yy_start_stack = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * cmExpr_yylex() is called, initialization will occur. */ + yy_init_globals( yyscanner); + + /* Destroy the main struct (reentrant only). */ + cmExpr_yyfree ( yyscanner , yyscanner ); + yyscanner = NULL; + return 0; +} + +/* + * Internal utility routines. + */ + +#ifndef yytext_ptr +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + + int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; +} +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) +{ + int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; +} +#endif + +void *cmExpr_yyalloc (yy_size_t size , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + return malloc(size); +} + +void *cmExpr_yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return realloc(ptr, size); +} + +void cmExpr_yyfree (void * ptr , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + free( (char *) ptr ); /* see cmExpr_yyrealloc() for (char *) cast */ +} + +#define YYTABLES_NAME "yytables" + +#line 57 "cmExprLexer.in.l" diff --git a/Source/LexerParser/cmExprLexer.h b/Source/LexerParser/cmExprLexer.h new file mode 100644 index 0000000..835a7a3 --- /dev/null +++ b/Source/LexerParser/cmExprLexer.h @@ -0,0 +1,334 @@ +#ifndef cmExpr_yyHEADER_H +#define cmExpr_yyHEADER_H 1 +#define cmExpr_yyIN_HEADER 1 + +#line 6 "cmExprLexer.h" + +#line 8 "cmExprLexer.h" + +#define FLEXINT_H 1 +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 6 +#define YY_FLEX_SUBMINOR_VERSION 1 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ +#include +#include +#include +#include + +/* end standard C headers. */ + +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have . Non-C99 systems may or may not. */ + +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 +#endif + +#include +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#endif /* ! C99 */ + +#endif /* ! FLEXINT_H */ + +/* TODO: this is always defined, so inline it */ +#define yyconst const + +#if defined(__GNUC__) && __GNUC__ >= 3 +#define yynoreturn __attribute__((__noreturn__)) +#else +#define yynoreturn +#endif + +/* An opaque pointer. */ +#ifndef YY_TYPEDEF_YY_SCANNER_T +#define YY_TYPEDEF_YY_SCANNER_T +typedef void* yyscan_t; +#endif + +/* For convenience, these vars (plus the bison vars far below) + are macros in the reentrant scanner. */ +#define yyin yyg->yyin_r +#define yyout yyg->yyout_r +#define yyextra yyg->yyextra_r +#define yyleng yyg->yyleng_r +#define yytext yyg->yytext_r +#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) +#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) +#define yy_flex_debug yyg->yy_flex_debug_r + +/* Size of default input buffer. */ +#ifndef YY_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k. + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. + * Ditto for the __ia64__ case accordingly. + */ +#define YY_BUF_SIZE 32768 +#else +#define YY_BUF_SIZE 16384 +#endif /* __ia64__ */ +#endif + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE +typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +void cmExpr_yyrestart (FILE *input_file ,yyscan_t yyscanner ); +void cmExpr_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); +YY_BUFFER_STATE cmExpr_yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner ); +void cmExpr_yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); +void cmExpr_yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); +void cmExpr_yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); +void cmExpr_yypop_buffer_state (yyscan_t yyscanner ); + +YY_BUFFER_STATE cmExpr_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); +YY_BUFFER_STATE cmExpr_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); +YY_BUFFER_STATE cmExpr_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); + +void *cmExpr_yyalloc (yy_size_t ,yyscan_t yyscanner ); +void *cmExpr_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); +void cmExpr_yyfree (void * ,yyscan_t yyscanner ); + +/* Begin user sect3 */ + +#define cmExpr_yywrap(yyscanner) (/*CONSTCOND*/1) +#define YY_SKIP_YYWRAP + +#define yytext_ptr yytext_r + +#ifdef YY_HEADER_EXPORT_START_CONDITIONS +#define INITIAL 0 + +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +int cmExpr_yylex_init (yyscan_t* scanner); + +int cmExpr_yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); + +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int cmExpr_yylex_destroy (yyscan_t yyscanner ); + +int cmExpr_yyget_debug (yyscan_t yyscanner ); + +void cmExpr_yyset_debug (int debug_flag ,yyscan_t yyscanner ); + +YY_EXTRA_TYPE cmExpr_yyget_extra (yyscan_t yyscanner ); + +void cmExpr_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); + +FILE *cmExpr_yyget_in (yyscan_t yyscanner ); + +void cmExpr_yyset_in (FILE * _in_str ,yyscan_t yyscanner ); + +FILE *cmExpr_yyget_out (yyscan_t yyscanner ); + +void cmExpr_yyset_out (FILE * _out_str ,yyscan_t yyscanner ); + + int cmExpr_yyget_leng (yyscan_t yyscanner ); + +char *cmExpr_yyget_text (yyscan_t yyscanner ); + +int cmExpr_yyget_lineno (yyscan_t yyscanner ); + +void cmExpr_yyset_lineno (int _line_number ,yyscan_t yyscanner ); + +int cmExpr_yyget_column (yyscan_t yyscanner ); + +void cmExpr_yyset_column (int _column_no ,yyscan_t yyscanner ); + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int cmExpr_yywrap (yyscan_t yyscanner ); +#else +extern int cmExpr_yywrap (yyscan_t yyscanner ); +#endif +#endif + +#ifndef yytext_ptr +static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); +#endif + +#ifndef YY_NO_INPUT + +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k */ +#define YY_READ_BUF_SIZE 16384 +#else +#define YY_READ_BUF_SIZE 8192 +#endif /* __ia64__ */ +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL_IS_OURS 1 + +extern int cmExpr_yylex (yyscan_t yyscanner); + +#define YY_DECL int cmExpr_yylex (yyscan_t yyscanner) +#endif /* !YY_DECL */ + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + +#undef YY_NEW_FILE +#undef YY_FLUSH_BUFFER +#undef yy_set_bol +#undef yy_new_buffer +#undef yy_set_interactive +#undef YY_DO_BEFORE_ACTION + +#ifdef YY_DECL_IS_OURS +#undef YY_DECL_IS_OURS +#undef YY_DECL +#endif + +#line 57 "cmExprLexer.in.l" + + +#line 333 "cmExprLexer.h" +#undef cmExpr_yyIN_HEADER +#endif /* cmExpr_yyHEADER_H */ diff --git a/Source/LexerParser/cmExprLexer.in.l b/Source/LexerParser/cmExprLexer.in.l new file mode 100644 index 0000000..25ddba4 --- /dev/null +++ b/Source/LexerParser/cmExprLexer.in.l @@ -0,0 +1,57 @@ +%{ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +/* + +This file must be translated to C++ and modified to build everywhere. + +Run flex >= 2.6 like this: + + flex --nounistd -DFLEXINT_H --prefix=cmExpr_yy --header-file=cmExprLexer.h -ocmExprLexer.cxx cmExprLexer.in.l + +Modify cmExprLexer.cxx: + - remove trailing whitespace: sed -i 's/\s*$//' cmExprLexer.h cmExprLexer.cxx + - remove blank lines at end of file + - #include "cmStandardLexer.h" at the top + - add cast in yy_scan_bytes for loop condition of _yybytes_len to size_t + +*/ + +/* IWYU pragma: no_forward_declare yyguts_t */ + +#include "cmExprParserHelper.h" + +/* Replace the lexer input function. */ +#undef YY_INPUT +#define YY_INPUT(buf, result, max_size) \ + { result = yyextra->LexInput(buf, max_size); } + +/* Include the set of tokens from the parser. */ +#include "cmExprParserTokens.h" + +/*--------------------------------------------------------------------------*/ +%} + +%option reentrant +%option noyywrap +%pointer + +%% + +[0-9][0-9]* { yylvalp->Number = atoi(yytext); return exp_NUMBER; } + +"+" { return exp_PLUS; } +"-" { return exp_MINUS; } +"*" { return exp_TIMES; } +"/" { return exp_DIVIDE; } +"%" { return exp_MOD; } +"\|" { return exp_OR; } +"&" { return exp_AND; } +"^" { return exp_XOR; } +"~" { return exp_NOT; } +"<<" { return exp_SHIFTLEFT; } +">>" { return exp_SHIFTRIGHT; } +"(" { return exp_OPENPARENT; } +")" { return exp_CLOSEPARENT; } + +%% diff --git a/Source/LexerParser/cmExprParser.cxx b/Source/LexerParser/cmExprParser.cxx new file mode 100644 index 0000000..67664a5 --- /dev/null +++ b/Source/LexerParser/cmExprParser.cxx @@ -0,0 +1,1698 @@ +/* A Bison parser, made by GNU Bison 3.0.4. */ + +/* Bison implementation for Yacc-like parsers in C + + Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* C LALR(1) parser skeleton written by Richard Stallman, by + simplifying the original so-called "semantic" parser. */ + +/* All symbols defined below should begin with yy or YY, to avoid + infringing on user name space. This should be done even for local + variables, as they might otherwise be expanded by user macros. + There are some unavoidable exceptions within include files to + define necessary library symbols; they are noted "INFRINGES ON + USER NAME SPACE" below. */ + +/* Identify Bison output. */ +#define YYBISON 1 + +/* Bison version. */ +#define YYBISON_VERSION "3.0.4" + +/* Skeleton name. */ +#define YYSKELETON_NAME "yacc.c" + +/* Pure parsers. */ +#define YYPURE 1 + +/* Push parsers. */ +#define YYPUSH 0 + +/* Pull parsers. */ +#define YYPULL 1 + + +/* Substitute the variable and function names. */ +#define yyparse cmExpr_yyparse +#define yylex cmExpr_yylex +#define yyerror cmExpr_yyerror +#define yydebug cmExpr_yydebug +#define yynerrs cmExpr_yynerrs + + +/* Copy the first part of user declarations. */ +#line 1 "cmExprParser.y" /* yacc.c:339 */ + +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +/* + +This file must be translated to C and modified to build everywhere. + +Run bison like this: + + bison --yacc --name-prefix=cmExpr_yy --defines=cmExprParserTokens.h -ocmExprParser.cxx cmExprParser.y + +Modify cmExprParser.cxx: + - "#if 0" out yyerrorlab block in range ["goto yyerrlab1", "yyerrlab1:"] + +*/ + +#include "cmConfigure.h" // IWYU pragma: keep + +#include +#include + +/*-------------------------------------------------------------------------*/ +#define YYDEBUG 1 +#include "cmExprParserHelper.h" /* Interface to parser object. */ +#include "cmExprLexer.h" /* Interface to lexer object. */ +#include "cmExprParserTokens.h" /* Need YYSTYPE for YY_DECL. */ + +/* Forward declare the lexer entry point. */ +YY_DECL; + +/* Helper function to forward error callback from parser. */ +static void cmExpr_yyerror(yyscan_t yyscanner, const char* message); + +/* Disable some warnings in the generated code. */ +#ifdef _MSC_VER +# pragma warning (disable: 4102) /* Unused goto label. */ +# pragma warning (disable: 4065) /* Switch statement contains default but no case. */ +#endif + +#line 112 "cmExprParser.cxx" /* yacc.c:339 */ + +# ifndef YY_NULLPTR +# if defined __cplusplus && 201103L <= __cplusplus +# define YY_NULLPTR nullptr +# else +# define YY_NULLPTR 0 +# endif +# endif + +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 1 +#endif + +/* In a future release of Bison, this section will be replaced + by #include "cmExprParserTokens.h". */ +#ifndef YY_CMEXPR_YY_CMEXPRPARSERTOKENS_H_INCLUDED +# define YY_CMEXPR_YY_CMEXPRPARSERTOKENS_H_INCLUDED +/* Debug traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif +#if YYDEBUG +extern int cmExpr_yydebug; +#endif + +/* Token type. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + enum yytokentype + { + exp_PLUS = 258, + exp_MINUS = 259, + exp_TIMES = 260, + exp_DIVIDE = 261, + exp_MOD = 262, + exp_SHIFTLEFT = 263, + exp_SHIFTRIGHT = 264, + exp_OPENPARENT = 265, + exp_CLOSEPARENT = 266, + exp_OR = 267, + exp_AND = 268, + exp_XOR = 269, + exp_NOT = 270, + exp_NUMBER = 271 + }; +#endif +/* Tokens. */ +#define exp_PLUS 258 +#define exp_MINUS 259 +#define exp_TIMES 260 +#define exp_DIVIDE 261 +#define exp_MOD 262 +#define exp_SHIFTLEFT 263 +#define exp_SHIFTRIGHT 264 +#define exp_OPENPARENT 265 +#define exp_CLOSEPARENT 266 +#define exp_OR 267 +#define exp_AND 268 +#define exp_XOR 269 +#define exp_NOT 270 +#define exp_NUMBER 271 + +/* Value type. */ + + + +int cmExpr_yyparse (yyscan_t yyscanner); + +#endif /* !YY_CMEXPR_YY_CMEXPRPARSERTOKENS_H_INCLUDED */ + +/* Copy the second part of user declarations. */ + +#line 189 "cmExprParser.cxx" /* yacc.c:358 */ + +#ifdef short +# undef short +#endif + +#ifdef YYTYPE_UINT8 +typedef YYTYPE_UINT8 yytype_uint8; +#else +typedef unsigned char yytype_uint8; +#endif + +#ifdef YYTYPE_INT8 +typedef YYTYPE_INT8 yytype_int8; +#else +typedef signed char yytype_int8; +#endif + +#ifdef YYTYPE_UINT16 +typedef YYTYPE_UINT16 yytype_uint16; +#else +typedef unsigned short int yytype_uint16; +#endif + +#ifdef YYTYPE_INT16 +typedef YYTYPE_INT16 yytype_int16; +#else +typedef short int yytype_int16; +#endif + +#ifndef YYSIZE_T +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif ! defined YYSIZE_T +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned int +# endif +#endif + +#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) + +#ifndef YY_ +# if defined YYENABLE_NLS && YYENABLE_NLS +# if ENABLE_NLS +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_(Msgid) dgettext ("bison-runtime", Msgid) +# endif +# endif +# ifndef YY_ +# define YY_(Msgid) Msgid +# endif +#endif + +#ifndef YY_ATTRIBUTE +# if (defined __GNUC__ \ + && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ + || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C +# define YY_ATTRIBUTE(Spec) __attribute__(Spec) +# else +# define YY_ATTRIBUTE(Spec) /* empty */ +# endif +#endif + +#ifndef YY_ATTRIBUTE_PURE +# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) +#endif + +#ifndef YY_ATTRIBUTE_UNUSED +# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) +#endif + +#if !defined _Noreturn \ + && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) +# if defined _MSC_VER && 1200 <= _MSC_VER +# define _Noreturn __declspec (noreturn) +# else +# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) +# endif +#endif + +/* Suppress unused-variable warnings by "using" E. */ +#if ! defined lint || defined __GNUC__ +# define YYUSE(E) ((void) (E)) +#else +# define YYUSE(E) /* empty */ +#endif + +#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ +/* Suppress an incorrect diagnostic about yylval being uninitialized. */ +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") +#else +# define YY_INITIAL_VALUE(Value) Value +#endif +#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END +#endif +#ifndef YY_INITIAL_VALUE +# define YY_INITIAL_VALUE(Value) /* Nothing. */ +#endif + + +#if ! defined yyoverflow || YYERROR_VERBOSE + +/* The parser invokes alloca or malloc; define the necessary symbols. */ + +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# elif defined __BUILTIN_VA_ARG_INCR +# include /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca +# else +# define YYSTACK_ALLOC alloca +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS +# include /* INFRINGES ON USER NAME SPACE */ + /* Use EXIT_SUCCESS as a witness for stdlib.h. */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's 'empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +# endif +# else +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined EXIT_SUCCESS \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined EXIT_SUCCESS +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined EXIT_SUCCESS +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# endif +#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ + + +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + +/* A type that is properly aligned for any stack member. */ +union yyalloc +{ + yytype_int16 yyss_alloc; + YYSTYPE yyvs_alloc; +}; + +/* The size of the maximum gap between one aligned stack and the next. */ +# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) + +/* The size of an array large to enough to hold all stacks, each with + N elements. */ +# define YYSTACK_BYTES(N) \ + ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + + YYSTACK_GAP_MAXIMUM) + +# define YYCOPY_NEEDED 1 + +/* Relocate STACK from its old location to the new one. The + local variables YYSIZE and YYSTACKSIZE give the old and new number of + elements in the stack, and YYPTR gives the new location of the + stack. Advance YYPTR to a properly aligned location for the next + stack. */ +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (0) + +#endif + +#if defined YYCOPY_NEEDED && YYCOPY_NEEDED +/* Copy COUNT objects from SRC to DST. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(Dst, Src, Count) \ + __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) +# else +# define YYCOPY(Dst, Src, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (Dst)[yyi] = (Src)[yyi]; \ + } \ + while (0) +# endif +# endif +#endif /* !YYCOPY_NEEDED */ + +/* YYFINAL -- State number of the termination state. */ +#define YYFINAL 17 +/* YYLAST -- Last index in YYTABLE. */ +#define YYLAST 30 + +/* YYNTOKENS -- Number of terminals. */ +#define YYNTOKENS 17 +/* YYNNTS -- Number of nonterminals. */ +#define YYNNTS 10 +/* YYNRULES -- Number of rules. */ +#define YYNRULES 23 +/* YYNSTATES -- Number of states. */ +#define YYNSTATES 39 + +/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned + by yylex, with out-of-bounds checking. */ +#define YYUNDEFTOK 2 +#define YYMAXUTOK 271 + +#define YYTRANSLATE(YYX) \ + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) + +/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM + as returned by yylex, without out-of-bounds checking. */ +static const yytype_uint8 yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16 +}; + +#if YYDEBUG + /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ +static const yytype_uint8 yyrline[] = +{ + 0, 73, 73, 78, 81, 86, 89, 94, 97, 102, + 105, 108, 113, 116, 119, 124, 127, 130, 133, 138, + 141, 144, 149, 152 +}; +#endif + +#if YYDEBUG || YYERROR_VERBOSE || 1 +/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ +static const char *const yytname[] = +{ + "$end", "error", "$undefined", "exp_PLUS", "exp_MINUS", "exp_TIMES", + "exp_DIVIDE", "exp_MOD", "exp_SHIFTLEFT", "exp_SHIFTRIGHT", + "exp_OPENPARENT", "exp_CLOSEPARENT", "exp_OR", "exp_AND", "exp_XOR", + "exp_NOT", "exp_NUMBER", "$accept", "start", "exp", "bitwiseor", + "bitwisexor", "bitwiseand", "shift", "term", "unary", "factor", YY_NULLPTR +}; +#endif + +# ifdef YYPRINT +/* YYTOKNUM[NUM] -- (External) token number corresponding to the + (internal) symbol number NUM (which must be that of a token). */ +static const yytype_uint16 yytoknum[] = +{ + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271 +}; +# endif + +#define YYPACT_NINF -8 + +#define yypact_value_is_default(Yystate) \ + (!!((Yystate) == (-8))) + +#define YYTABLE_NINF -1 + +#define yytable_value_is_error(Yytable_value) \ + 0 + + /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +static const yytype_int8 yypact[] = +{ + 0, 0, 0, 0, -8, 2, -7, -5, 8, 3, + 10, 1, -8, -8, -8, -8, 6, -8, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, -8, -5, + 8, 3, 10, 10, 1, 1, -8, -8, -8 +}; + + /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE does not specify something else to do. Zero + means the default is an error. */ +static const yytype_uint8 yydefact[] = +{ + 0, 0, 0, 0, 22, 0, 2, 3, 5, 7, + 9, 12, 15, 19, 20, 21, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 23, 4, + 6, 8, 10, 11, 13, 14, 16, 17, 18 +}; + + /* YYPGOTO[NTERM-NUM]. */ +static const yytype_int8 yypgoto[] = +{ + -8, -8, 12, 5, 11, 9, -2, 4, -1, -8 +}; + + /* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int8 yydefgoto[] = +{ + -1, 5, 6, 7, 8, 9, 10, 11, 12, 13 +}; + + /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule whose + number is the opposite. If YYTABLE_NINF, syntax error. */ +static const yytype_uint8 yytable[] = +{ + 14, 15, 17, 1, 2, 18, 25, 26, 27, 19, + 3, 21, 22, 23, 24, 16, 4, 28, 18, 32, + 33, 20, 0, 29, 36, 37, 38, 34, 35, 31, + 30 +}; + +static const yytype_int8 yycheck[] = +{ + 1, 2, 0, 3, 4, 12, 5, 6, 7, 14, + 10, 8, 9, 3, 4, 3, 16, 11, 12, 21, + 22, 13, -1, 18, 25, 26, 27, 23, 24, 20, + 19 +}; + + /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ +static const yytype_uint8 yystos[] = +{ + 0, 3, 4, 10, 16, 18, 19, 20, 21, 22, + 23, 24, 25, 26, 25, 25, 19, 0, 12, 14, + 13, 8, 9, 3, 4, 5, 6, 7, 11, 20, + 21, 22, 23, 23, 24, 24, 25, 25, 25 +}; + + /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint8 yyr1[] = +{ + 0, 17, 18, 19, 19, 20, 20, 21, 21, 22, + 22, 22, 23, 23, 23, 24, 24, 24, 24, 25, + 25, 25, 26, 26 +}; + + /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = +{ + 0, 2, 1, 1, 3, 1, 3, 1, 3, 1, + 3, 3, 1, 3, 3, 1, 3, 3, 3, 1, + 2, 2, 1, 3 +}; + + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab + + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } \ + else \ + { \ + yyerror (yyscanner, YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ +while (0) + +/* Error token number */ +#define YYTERROR 1 +#define YYERRCODE 256 + + + +/* Enable debugging if requested. */ +#if YYDEBUG + +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) + +/* This macro is provided for backward compatibility. */ +#ifndef YY_LOCATION_PRINT +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +#endif + + +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value, yyscanner); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) + + +/*----------------------------------------. +| Print this symbol's value on YYOUTPUT. | +`----------------------------------------*/ + +static void +yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, yyscan_t yyscanner) +{ + FILE *yyo = yyoutput; + YYUSE (yyo); + YYUSE (yyscanner); + if (!yyvaluep) + return; +# ifdef YYPRINT + if (yytype < YYNTOKENS) + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# endif + YYUSE (yytype); +} + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +static void +yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, yyscan_t yyscanner) +{ + YYFPRINTF (yyoutput, "%s %s (", + yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); + + yy_symbol_value_print (yyoutput, yytype, yyvaluep, yyscanner); + YYFPRINTF (yyoutput, ")"); +} + +/*------------------------------------------------------------------. +| yy_stack_print -- Print the state stack from its BOTTOM up to its | +| TOP (included). | +`------------------------------------------------------------------*/ + +static void +yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) +{ + YYFPRINTF (stderr, "Stack now"); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } + YYFPRINTF (stderr, "\n"); +} + +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (0) + + +/*------------------------------------------------. +| Report that the YYRULE is going to be reduced. | +`------------------------------------------------*/ + +static void +yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule, yyscan_t yyscanner) +{ + unsigned long int yylno = yyrline[yyrule]; + int yynrhs = yyr2[yyrule]; + int yyi; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", + yyrule - 1, yylno); + /* The symbols being reduced. */ + for (yyi = 0; yyi < yynrhs; yyi++) + { + YYFPRINTF (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, + yystos[yyssp[yyi + 1 - yynrhs]], + &(yyvsp[(yyi + 1) - (yynrhs)]) + , yyscanner); + YYFPRINTF (stderr, "\n"); + } +} + +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyssp, yyvsp, Rule, yyscanner); \ +} while (0) + +/* Nonzero means print parse trace. It is left uninitialized so that + multiple parsers can coexist. */ +int yydebug; +#else /* !YYDEBUG */ +# define YYDPRINTF(Args) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) +#endif /* !YYDEBUG */ + + +/* YYINITDEPTH -- initial size of the parser's stacks. */ +#ifndef YYINITDEPTH +# define YYINITDEPTH 200 +#endif + +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only + if the built-in stack extension method is used). + + Do not make this value too large; the results are undefined if + YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) + evaluated with infinite-precision integer arithmetic. */ + +#ifndef YYMAXDEPTH +# define YYMAXDEPTH 10000 +#endif + + +#if YYERROR_VERBOSE + +# ifndef yystrlen +# if defined __GLIBC__ && defined _STRING_H +# define yystrlen strlen +# else +/* Return the length of YYSTR. */ +static YYSIZE_T +yystrlen (const char *yystr) +{ + YYSIZE_T yylen; + for (yylen = 0; yystr[yylen]; yylen++) + continue; + return yylen; +} +# endif +# endif + +# ifndef yystpcpy +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# define yystpcpy stpcpy +# else +/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in + YYDEST. */ +static char * +yystpcpy (char *yydest, const char *yysrc) +{ + char *yyd = yydest; + const char *yys = yysrc; + + while ((*yyd++ = *yys++) != '\0') + continue; + + return yyd - 1; +} +# endif +# endif + +# ifndef yytnamerr +/* Copy to YYRES the contents of YYSTR after stripping away unnecessary + quotes and backslashes, so that it's suitable for yyerror. The + heuristic is that double-quoting is unnecessary unless the string + contains an apostrophe, a comma, or backslash (other than + backslash-backslash). YYSTR is taken from yytname. If YYRES is + null, do not copy; instead, return the length of what the result + would have been. */ +static YYSIZE_T +yytnamerr (char *yyres, const char *yystr) +{ + if (*yystr == '"') + { + YYSIZE_T yyn = 0; + char const *yyp = yystr; + + for (;;) + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } + + if (! yyres) + return yystrlen (yystr); + + return yystpcpy (yyres, yystr) - yyres; +} +# endif + +/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message + about the unexpected token YYTOKEN for the state stack whose top is + YYSSP. + + Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is + not large enough to hold the message. In that case, also set + *YYMSG_ALLOC to the required number of bytes. Return 2 if the + required number of bytes is too large to store. */ +static int +yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, + yytype_int16 *yyssp, int yytoken) +{ + YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); + YYSIZE_T yysize = yysize0; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + /* Internationalized format string. */ + const char *yyformat = YY_NULLPTR; + /* Arguments of yyformat. */ + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + /* Number of reported tokens (one for the "unexpected", one per + "expected"). */ + int yycount = 0; + + /* There are many possibilities here to consider: + - If this state is a consistent state with a default action, then + the only way this function was invoked is if the default action + is an error action. In that case, don't check for expected + tokens because there are none. + - The only way there can be no lookahead present (in yychar) is if + this state is a consistent state with a default action. Thus, + detecting the absence of a lookahead is sufficient to determine + that there is no unexpected or expected token to report. In that + case, just report a simple "syntax error". + - Don't assume there isn't a lookahead just because this state is a + consistent state with a default action. There might have been a + previous inconsistent state, consistent state with a non-default + action, or user semantic action that manipulated yychar. + - Of course, the expected token list depends on states to have + correct lookahead information, and it depends on the parser not + to perform extra reductions after fetching a lookahead from the + scanner and before detecting a syntax error. Thus, state merging + (from LALR or IELR) and default reductions corrupt the expected + token list. However, the list is correct for canonical LR with + one exception: it will still contain any token that will not be + accepted due to an error action in a later state. + */ + if (yytoken != YYEMPTY) + { + int yyn = yypact[*yyssp]; + yyarg[yycount++] = yytname[yytoken]; + if (!yypact_value_is_default (yyn)) + { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR + && !yytable_value_is_error (yytable[yyx + yyn])) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + break; + } + yyarg[yycount++] = yytname[yyx]; + { + YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); + if (! (yysize <= yysize1 + && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } + } + } + } + + switch (yycount) + { +# define YYCASE_(N, S) \ + case N: \ + yyformat = S; \ + break + YYCASE_(0, YY_("syntax error")); + YYCASE_(1, YY_("syntax error, unexpected %s")); + YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); + YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); + YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); + YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); +# undef YYCASE_ + } + + { + YYSIZE_T yysize1 = yysize + yystrlen (yyformat); + if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } + + if (*yymsg_alloc < yysize) + { + *yymsg_alloc = 2 * yysize; + if (! (yysize <= *yymsg_alloc + && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) + *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; + return 1; + } + + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + { + char *yyp = *yymsg; + int yyi = 0; + while ((*yyp = *yyformat) != '\0') + if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyformat += 2; + } + else + { + yyp++; + yyformat++; + } + } + return 0; +} +#endif /* YYERROR_VERBOSE */ + +/*-----------------------------------------------. +| Release the memory associated to this symbol. | +`-----------------------------------------------*/ + +static void +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, yyscan_t yyscanner) +{ + YYUSE (yyvaluep); + YYUSE (yyscanner); + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + YYUSE (yytype); + YY_IGNORE_MAYBE_UNINITIALIZED_END +} + + + + +/*----------. +| yyparse. | +`----------*/ + +int +yyparse (yyscan_t yyscanner) +{ +/* The lookahead symbol. */ +int yychar; + + +/* The semantic value of the lookahead symbol. */ +/* Default value used for initialization, for pacifying older GCCs + or non-GCC compilers. */ +YY_INITIAL_VALUE (static YYSTYPE yyval_default;) +YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); + + /* Number of syntax errors so far. */ + int yynerrs; + + int yystate; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + + /* The stacks and their tools: + 'yyss': related to states. + 'yyvs': related to semantic values. + + Refer to the stacks through separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss; + yytype_int16 *yyssp; + + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs; + YYSTYPE *yyvsp; + + YYSIZE_T yystacksize; + + int yyn; + int yyresult; + /* Lookahead token as an internal (translated) token number. */ + int yytoken = 0; + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; + +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) + + /* The number of symbols on the RHS of the reduced rule. + Keep to zero when no symbol should be popped. */ + int yylen = 0; + + yyssp = yyss = yyssa; + yyvsp = yyvs = yyvsa; + yystacksize = YYINITDEPTH; + + YYDPRINTF ((stderr, "Starting parse\n")); + + yystate = 0; + yyerrstatus = 0; + yynerrs = 0; + yychar = YYEMPTY; /* Cause a token to be read. */ + goto yysetstate; + +/*------------------------------------------------------------. +| yynewstate -- Push a new state, which is found in yystate. | +`------------------------------------------------------------*/ + yynewstate: + /* In all cases, when you get here, the value and location stacks + have just been pushed. So pushing a state here evens the stacks. */ + yyssp++; + + yysetstate: + *yyssp = yystate; + + if (yyss + yystacksize - 1 <= yyssp) + { + /* Get the current used size of the three stacks, in elements. */ + YYSIZE_T yysize = yyssp - yyss + 1; + +#ifdef yyoverflow + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + &yystacksize); + + yyss = yyss1; + yyvs = yyvs1; + } +#else /* no yyoverflow */ +# ifndef YYSTACK_RELOCATE + goto yyexhaustedlab; +# else + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) + goto yyexhaustedlab; + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif +#endif /* no yyoverflow */ + + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + + YYDPRINTF ((stderr, "Stack size increased to %lu\n", + (unsigned long int) yystacksize)); + + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } + + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + + if (yystate == YYFINAL) + YYACCEPT; + + goto yybackup; + +/*-----------. +| yybackup. | +`-----------*/ +yybackup: + + /* Do appropriate processing given the current state. Read a + lookahead token if we need one and don't already have one. */ + + /* First try to decide what to do without reference to lookahead token. */ + yyn = yypact[yystate]; + if (yypact_value_is_default (yyn)) + goto yydefault; + + /* Not known => get a lookahead token if don't already have one. */ + + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + if (yychar == YYEMPTY) + { + YYDPRINTF ((stderr, "Reading a token: ")); + yychar = yylex (&yylval, yyscanner); + } + + if (yychar <= YYEOF) + { + yychar = yytoken = YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); + } + else + { + yytoken = YYTRANSLATE (yychar); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); + } + + /* If the proper action on seeing token YYTOKEN is to reduce or to + detect an error, take that action. */ + yyn += yytoken; + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) + goto yydefault; + yyn = yytable[yyn]; + if (yyn <= 0) + { + if (yytable_value_is_error (yyn)) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } + + /* Count tokens shifted since error; after three, turn off error + status. */ + if (yyerrstatus) + yyerrstatus--; + + /* Shift the lookahead token. */ + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + + /* Discard the shifted token. */ + yychar = YYEMPTY; + + yystate = yyn; + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END + + goto yynewstate; + + +/*-----------------------------------------------------------. +| yydefault -- do the default action for the current state. | +`-----------------------------------------------------------*/ +yydefault: + yyn = yydefact[yystate]; + if (yyn == 0) + goto yyerrlab; + goto yyreduce; + + +/*-----------------------------. +| yyreduce -- Do a reduction. | +`-----------------------------*/ +yyreduce: + /* yyn is the number of a rule to reduce with. */ + yylen = yyr2[yyn]; + + /* If YYLEN is nonzero, implement the default value of the action: + '$$ = $1'. + + Otherwise, the following line sets YYVAL to garbage. + This behavior is undocumented and Bison + users should not rely upon it. Assigning to YYVAL + unconditionally makes the parser a bit smaller, and it avoids a + GCC warning that YYVAL may be used uninitialized. */ + yyval = yyvsp[1-yylen]; + + + YY_REDUCE_PRINT (yyn); + switch (yyn) + { + case 2: +#line 73 "cmExprParser.y" /* yacc.c:1646 */ + { + cmExpr_yyget_extra(yyscanner)->SetResult((yyvsp[0].Number)); + } +#line 1289 "cmExprParser.cxx" /* yacc.c:1646 */ + break; + + case 3: +#line 78 "cmExprParser.y" /* yacc.c:1646 */ + { + (yyval.Number) = (yyvsp[0].Number); + } +#line 1297 "cmExprParser.cxx" /* yacc.c:1646 */ + break; + + case 4: +#line 81 "cmExprParser.y" /* yacc.c:1646 */ + { + (yyval.Number) = (yyvsp[-2].Number) | (yyvsp[0].Number); + } +#line 1305 "cmExprParser.cxx" /* yacc.c:1646 */ + break; + + case 5: +#line 86 "cmExprParser.y" /* yacc.c:1646 */ + { + (yyval.Number) = (yyvsp[0].Number); + } +#line 1313 "cmExprParser.cxx" /* yacc.c:1646 */ + break; + + case 6: +#line 89 "cmExprParser.y" /* yacc.c:1646 */ + { + (yyval.Number) = (yyvsp[-2].Number) ^ (yyvsp[0].Number); + } +#line 1321 "cmExprParser.cxx" /* yacc.c:1646 */ + break; + + case 7: +#line 94 "cmExprParser.y" /* yacc.c:1646 */ + { + (yyval.Number) = (yyvsp[0].Number); + } +#line 1329 "cmExprParser.cxx" /* yacc.c:1646 */ + break; + + case 8: +#line 97 "cmExprParser.y" /* yacc.c:1646 */ + { + (yyval.Number) = (yyvsp[-2].Number) & (yyvsp[0].Number); + } +#line 1337 "cmExprParser.cxx" /* yacc.c:1646 */ + break; + + case 9: +#line 102 "cmExprParser.y" /* yacc.c:1646 */ + { + (yyval.Number) = (yyvsp[0].Number); + } +#line 1345 "cmExprParser.cxx" /* yacc.c:1646 */ + break; + + case 10: +#line 105 "cmExprParser.y" /* yacc.c:1646 */ + { + (yyval.Number) = (yyvsp[-2].Number) << (yyvsp[0].Number); + } +#line 1353 "cmExprParser.cxx" /* yacc.c:1646 */ + break; + + case 11: +#line 108 "cmExprParser.y" /* yacc.c:1646 */ + { + (yyval.Number) = (yyvsp[-2].Number) >> (yyvsp[0].Number); + } +#line 1361 "cmExprParser.cxx" /* yacc.c:1646 */ + break; + + case 12: +#line 113 "cmExprParser.y" /* yacc.c:1646 */ + { + (yyval.Number) = (yyvsp[0].Number); + } +#line 1369 "cmExprParser.cxx" /* yacc.c:1646 */ + break; + + case 13: +#line 116 "cmExprParser.y" /* yacc.c:1646 */ + { + (yyval.Number) = (yyvsp[-2].Number) + (yyvsp[0].Number); + } +#line 1377 "cmExprParser.cxx" /* yacc.c:1646 */ + break; + + case 14: +#line 119 "cmExprParser.y" /* yacc.c:1646 */ + { + (yyval.Number) = (yyvsp[-2].Number) - (yyvsp[0].Number); + } +#line 1385 "cmExprParser.cxx" /* yacc.c:1646 */ + break; + + case 15: +#line 124 "cmExprParser.y" /* yacc.c:1646 */ + { + (yyval.Number) = (yyvsp[0].Number); + } +#line 1393 "cmExprParser.cxx" /* yacc.c:1646 */ + break; + + case 16: +#line 127 "cmExprParser.y" /* yacc.c:1646 */ + { + (yyval.Number) = (yyvsp[-2].Number) * (yyvsp[0].Number); + } +#line 1401 "cmExprParser.cxx" /* yacc.c:1646 */ + break; + + case 17: +#line 130 "cmExprParser.y" /* yacc.c:1646 */ + { + (yyval.Number) = (yyvsp[-2].Number) / (yyvsp[0].Number); + } +#line 1409 "cmExprParser.cxx" /* yacc.c:1646 */ + break; + + case 18: +#line 133 "cmExprParser.y" /* yacc.c:1646 */ + { + (yyval.Number) = (yyvsp[-2].Number) % (yyvsp[0].Number); + } +#line 1417 "cmExprParser.cxx" /* yacc.c:1646 */ + break; + + case 19: +#line 138 "cmExprParser.y" /* yacc.c:1646 */ + { + (yyval.Number) = (yyvsp[0].Number); + } +#line 1425 "cmExprParser.cxx" /* yacc.c:1646 */ + break; + + case 20: +#line 141 "cmExprParser.y" /* yacc.c:1646 */ + { + (yyval.Number) = + (yyvsp[0].Number); + } +#line 1433 "cmExprParser.cxx" /* yacc.c:1646 */ + break; + + case 21: +#line 144 "cmExprParser.y" /* yacc.c:1646 */ + { + (yyval.Number) = - (yyvsp[0].Number); + } +#line 1441 "cmExprParser.cxx" /* yacc.c:1646 */ + break; + + case 22: +#line 149 "cmExprParser.y" /* yacc.c:1646 */ + { + (yyval.Number) = (yyvsp[0].Number); + } +#line 1449 "cmExprParser.cxx" /* yacc.c:1646 */ + break; + + case 23: +#line 152 "cmExprParser.y" /* yacc.c:1646 */ + { + (yyval.Number) = (yyvsp[-1].Number); + } +#line 1457 "cmExprParser.cxx" /* yacc.c:1646 */ + break; + + +#line 1461 "cmExprParser.cxx" /* yacc.c:1646 */ + default: break; + } + /* User semantic actions sometimes alter yychar, and that requires + that yytoken be updated with the new translation. We take the + approach of translating immediately before every use of yytoken. + One alternative is translating here after every semantic action, + but that translation would be missed if the semantic action invokes + YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or + if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an + incorrect destructor might then be invoked immediately. In the + case of YYERROR or YYBACKUP, subsequent parser actions might lead + to an incorrect destructor call or verbose syntax error message + before the lookahead is translated. */ + YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); + + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + + *++yyvsp = yyval; + + /* Now 'shift' the result of the reduction. Determine what state + that goes to, based on the state we popped back to and the rule + number reduced by. */ + + yyn = yyr1[yyn]; + + yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; + if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yytable[yystate]; + else + yystate = yydefgoto[yyn - YYNTOKENS]; + + goto yynewstate; + + +/*--------------------------------------. +| yyerrlab -- here on detecting error. | +`--------------------------------------*/ +yyerrlab: + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); + + /* If not already recovering from an error, report this error. */ + if (!yyerrstatus) + { + ++yynerrs; +#if ! YYERROR_VERBOSE + yyerror (yyscanner, YY_("syntax error")); +#else +# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ + yyssp, yytoken) + { + char const *yymsgp = YY_("syntax error"); + int yysyntax_error_status; + yysyntax_error_status = YYSYNTAX_ERROR; + if (yysyntax_error_status == 0) + yymsgp = yymsg; + else if (yysyntax_error_status == 1) + { + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); + if (!yymsg) + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = 2; + } + else + { + yysyntax_error_status = YYSYNTAX_ERROR; + yymsgp = yymsg; + } + } + yyerror (yyscanner, yymsgp); + if (yysyntax_error_status == 2) + goto yyexhaustedlab; + } +# undef YYSYNTAX_ERROR +#endif + } + + + + if (yyerrstatus == 3) + { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ + + if (yychar <= YYEOF) + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } + else + { + yydestruct ("Error: discarding", + yytoken, &yylval, yyscanner); + yychar = YYEMPTY; + } + } + +#if 0 + /* Else will try to reuse lookahead token after shifting the error + token. */ + goto yyerrlab1; + + +/*---------------------------------------------------. +| yyerrorlab -- error raised explicitly by YYERROR. | +`---------------------------------------------------*/ +yyerrorlab: + + /* Pacify compilers like GCC when the user code never invokes + YYERROR and the label yyerrorlab therefore never appears in user + code. */ + if (/*CONSTCOND*/ 0) + goto yyerrorlab; + + /* Do not reclaim the symbols of the rule whose action triggered + this YYERROR. */ + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + yystate = *yyssp; + goto yyerrlab1; + + +/*-------------------------------------------------------------. +| yyerrlab1 -- common code for both syntax error and YYERROR. | +`-------------------------------------------------------------*/ +yyerrlab1: +#endif + yyerrstatus = 3; /* Each real token shifted decrements this. */ + + for (;;) + { + yyn = yypact[yystate]; + if (!yypact_value_is_default (yyn)) + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } + + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; + + + yydestruct ("Error: popping", + yystos[yystate], yyvsp, yyscanner); + YYPOPSTACK (1); + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); + } + + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END + + + /* Shift the error token. */ + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); + + yystate = yyn; + goto yynewstate; + + +/*-------------------------------------. +| yyacceptlab -- YYACCEPT comes here. | +`-------------------------------------*/ +yyacceptlab: + yyresult = 0; + goto yyreturn; + +/*-----------------------------------. +| yyabortlab -- YYABORT comes here. | +`-----------------------------------*/ +yyabortlab: + yyresult = 1; + goto yyreturn; + +#if !defined yyoverflow || YYERROR_VERBOSE +/*-------------------------------------------------. +| yyexhaustedlab -- memory exhaustion comes here. | +`-------------------------------------------------*/ +yyexhaustedlab: + yyerror (yyscanner, YY_("memory exhausted")); + yyresult = 2; + /* Fall through. */ +#endif + +yyreturn: + if (yychar != YYEMPTY) + { + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = YYTRANSLATE (yychar); + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval, yyscanner); + } + /* Do not reclaim the symbols of the rule whose action triggered + this YYABORT or YYACCEPT. */ + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + yystos[*yyssp], yyvsp, yyscanner); + YYPOPSTACK (1); + } +#ifndef yyoverflow + if (yyss != yyssa) + YYSTACK_FREE (yyss); +#endif +#if YYERROR_VERBOSE + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); +#endif + return yyresult; +} +#line 157 "cmExprParser.y" /* yacc.c:1906 */ + +/* End of grammar */ + +/*--------------------------------------------------------------------------*/ +void cmExpr_yyerror(yyscan_t yyscanner, const char* message) +{ + cmExpr_yyget_extra(yyscanner)->Error(message); +} diff --git a/Source/LexerParser/cmExprParser.y b/Source/LexerParser/cmExprParser.y new file mode 100644 index 0000000..d1c3a97 --- /dev/null +++ b/Source/LexerParser/cmExprParser.y @@ -0,0 +1,164 @@ +%{ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +/* + +This file must be translated to C and modified to build everywhere. + +Run bison like this: + + bison --yacc --name-prefix=cmExpr_yy --defines=cmExprParserTokens.h -ocmExprParser.cxx cmExprParser.y + +Modify cmExprParser.cxx: + - "#if 0" out yyerrorlab block in range ["goto yyerrlab1", "yyerrlab1:"] + +*/ + +#include "cmConfigure.h" // IWYU pragma: keep + +#include +#include + +/*-------------------------------------------------------------------------*/ +#define YYDEBUG 1 +#include "cmExprParserHelper.h" /* Interface to parser object. */ +#include "cmExprLexer.h" /* Interface to lexer object. */ +#include "cmExprParserTokens.h" /* Need YYSTYPE for YY_DECL. */ + +/* Forward declare the lexer entry point. */ +YY_DECL; + +/* Helper function to forward error callback from parser. */ +static void cmExpr_yyerror(yyscan_t yyscanner, const char* message); + +/* Disable some warnings in the generated code. */ +#ifdef _MSC_VER +# pragma warning (disable: 4102) /* Unused goto label. */ +# pragma warning (disable: 4065) /* Switch statement contains default but no case. */ +#endif +%} + +/* Generate a reentrant parser object. */ +%define api.pure + +/* Configure the parser to use a lexer object. */ +%lex-param {yyscan_t yyscanner} +%parse-param {yyscan_t yyscanner} + +%define parse.error verbose + +/*-------------------------------------------------------------------------*/ +/* Tokens */ +%token exp_PLUS +%token exp_MINUS +%token exp_TIMES +%token exp_DIVIDE +%token exp_MOD +%token exp_SHIFTLEFT +%token exp_SHIFTRIGHT +%token exp_OPENPARENT +%token exp_CLOSEPARENT +%token exp_OR; +%token exp_AND; +%token exp_XOR; +%token exp_NOT; +%token exp_NUMBER; + +/*-------------------------------------------------------------------------*/ +/* grammar */ +%% + + +start: + exp { + cmExpr_yyget_extra(yyscanner)->SetResult($1); + } + +exp: + bitwiseor { + $$ = $1; + } +| exp exp_OR bitwiseor { + $$ = $1 | $3; + } + +bitwiseor: + bitwisexor { + $$ = $1; + } +| bitwiseor exp_XOR bitwisexor { + $$ = $1 ^ $3; + } + +bitwisexor: + bitwiseand { + $$ = $1; + } +| bitwisexor exp_AND bitwiseand { + $$ = $1 & $3; + } + +bitwiseand: + shift { + $$ = $1; + } +| bitwiseand exp_SHIFTLEFT shift { + $$ = $1 << $3; + } +| bitwiseand exp_SHIFTRIGHT shift { + $$ = $1 >> $3; + } + +shift: + term { + $$ = $1; + } +| shift exp_PLUS term { + $$ = $1 + $3; + } +| shift exp_MINUS term { + $$ = $1 - $3; + } + +term: + unary { + $$ = $1; + } +| term exp_TIMES unary { + $$ = $1 * $3; + } +| term exp_DIVIDE unary { + $$ = $1 / $3; + } +| term exp_MOD unary { + $$ = $1 % $3; + } + +unary: + factor { + $$ = $1; + } +| exp_PLUS unary { + $$ = + $2; + } +| exp_MINUS unary { + $$ = - $2; + } + +factor: + exp_NUMBER { + $$ = $1; + } +| exp_OPENPARENT exp exp_CLOSEPARENT { + $$ = $2; + } +; + +%% +/* End of grammar */ + +/*--------------------------------------------------------------------------*/ +void cmExpr_yyerror(yyscan_t yyscanner, const char* message) +{ + cmExpr_yyget_extra(yyscanner)->Error(message); +} diff --git a/Source/LexerParser/cmExprParserTokens.h b/Source/LexerParser/cmExprParserTokens.h new file mode 100644 index 0000000..84b2bbd --- /dev/null +++ b/Source/LexerParser/cmExprParserTokens.h @@ -0,0 +1,86 @@ +/* A Bison parser, made by GNU Bison 3.0.4. */ + +/* Bison interface for Yacc-like parsers in C + + Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +#ifndef YY_CMEXPR_YY_CMEXPRPARSERTOKENS_H_INCLUDED +# define YY_CMEXPR_YY_CMEXPRPARSERTOKENS_H_INCLUDED +/* Debug traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif +#if YYDEBUG +extern int cmExpr_yydebug; +#endif + +/* Token type. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + enum yytokentype + { + exp_PLUS = 258, + exp_MINUS = 259, + exp_TIMES = 260, + exp_DIVIDE = 261, + exp_MOD = 262, + exp_SHIFTLEFT = 263, + exp_SHIFTRIGHT = 264, + exp_OPENPARENT = 265, + exp_CLOSEPARENT = 266, + exp_OR = 267, + exp_AND = 268, + exp_XOR = 269, + exp_NOT = 270, + exp_NUMBER = 271 + }; +#endif +/* Tokens. */ +#define exp_PLUS 258 +#define exp_MINUS 259 +#define exp_TIMES 260 +#define exp_DIVIDE 261 +#define exp_MOD 262 +#define exp_SHIFTLEFT 263 +#define exp_SHIFTRIGHT 264 +#define exp_OPENPARENT 265 +#define exp_CLOSEPARENT 266 +#define exp_OR 267 +#define exp_AND 268 +#define exp_XOR 269 +#define exp_NOT 270 +#define exp_NUMBER 271 + +/* Value type. */ + + + +int cmExpr_yyparse (yyscan_t yyscanner); + +#endif /* !YY_CMEXPR_YY_CMEXPRPARSERTOKENS_H_INCLUDED */ diff --git a/Source/LexerParser/cmFortranLexer.cxx b/Source/LexerParser/cmFortranLexer.cxx new file mode 100644 index 0000000..01c09ac --- /dev/null +++ b/Source/LexerParser/cmFortranLexer.cxx @@ -0,0 +1,2511 @@ +#include "cmStandardLexer.h" +#line 2 "cmFortranLexer.cxx" + +#line 4 "cmFortranLexer.cxx" + +#define FLEXINT_H 1 +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 6 +#define YY_FLEX_SUBMINOR_VERSION 1 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ +#include +#include +#include +#include + +/* end standard C headers. */ + +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have . Non-C99 systems may or may not. */ + +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 +#endif + +#include +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#endif /* ! C99 */ + +#endif /* ! FLEXINT_H */ + +/* TODO: this is always defined, so inline it */ +#define yyconst const + +#if defined(__GNUC__) && __GNUC__ >= 3 +#define yynoreturn __attribute__((__noreturn__)) +#else +#define yynoreturn +#endif + +/* Returned upon end-of-file. */ +#define YY_NULL 0 + +/* Promotes a possibly negative, possibly signed char to an unsigned + * integer for use as an array index. If the signed char is negative, + * we want to instead treat it as an 8-bit unsigned char, hence the + * double cast. + */ +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) + +/* An opaque pointer. */ +#ifndef YY_TYPEDEF_YY_SCANNER_T +#define YY_TYPEDEF_YY_SCANNER_T +typedef void* yyscan_t; +#endif + +/* For convenience, these vars (plus the bison vars far below) + are macros in the reentrant scanner. */ +#define yyin yyg->yyin_r +#define yyout yyg->yyout_r +#define yyextra yyg->yyextra_r +#define yyleng yyg->yyleng_r +#define yytext yyg->yytext_r +#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) +#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) +#define yy_flex_debug yyg->yy_flex_debug_r + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN yyg->yy_start = 1 + 2 * + +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START ((yyg->yy_start - 1) / 2) +#define YYSTATE YY_START + +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) + +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE cmFortran_yyrestart(yyin ,yyscanner ) + +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#ifndef YY_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k. + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. + * Ditto for the __ia64__ case accordingly. + */ +#define YY_BUF_SIZE 32768 +#else +#define YY_BUF_SIZE 16384 +#endif /* __ia64__ */ +#endif + +/* The state buf must be large enough to hold one state per character in the main buffer. + */ +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE +typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + + #define YY_LESS_LINENO(n) + #define YY_LINENO_REWIND_TO(ptr) + +/* Return all but the first "n" matched characters back to the input stream. */ +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = yyg->yy_hold_char; \ + YY_RESTORE_YY_MORE_OFFSET \ + yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) + +#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) + +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via cmFortran_yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + * + * Returns the top of the stack, or NULL. + */ +#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ + ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ + : NULL) + +/* Same as previous macro, but useful when we know that the buffer stack is not + * NULL or when we need an lvalue. For internal use only. + */ +#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] + +void cmFortran_yyrestart (FILE *input_file ,yyscan_t yyscanner ); +void cmFortran_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); +YY_BUFFER_STATE cmFortran_yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner ); +void cmFortran_yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); +void cmFortran_yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); +void cmFortran_yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); +void cmFortran_yypop_buffer_state (yyscan_t yyscanner ); + +static void cmFortran_yyensure_buffer_stack (yyscan_t yyscanner ); +static void cmFortran_yy_load_buffer_state (yyscan_t yyscanner ); +static void cmFortran_yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner ); + +#define YY_FLUSH_BUFFER cmFortran_yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner) + +YY_BUFFER_STATE cmFortran_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); +YY_BUFFER_STATE cmFortran_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); +YY_BUFFER_STATE cmFortran_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); + +void *cmFortran_yyalloc (yy_size_t ,yyscan_t yyscanner ); +void *cmFortran_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); +void cmFortran_yyfree (void * ,yyscan_t yyscanner ); + +#define yy_new_buffer cmFortran_yy_create_buffer + +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + cmFortran_yyensure_buffer_stack (yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = \ + cmFortran_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } + +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + cmFortran_yyensure_buffer_stack (yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = \ + cmFortran_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } + +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) + +/* Begin user sect3 */ + +#define cmFortran_yywrap(yyscanner) (/*CONSTCOND*/1) +#define YY_SKIP_YYWRAP + +typedef unsigned char YY_CHAR; + +typedef int yy_state_type; + +#define yytext_ptr yytext_r + +static yy_state_type yy_get_previous_state (yyscan_t yyscanner ); +static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner); +static int yy_get_next_buffer (yyscan_t yyscanner ); +static void yynoreturn yy_fatal_error (yyconst char* msg ,yyscan_t yyscanner ); + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up yytext. + */ +#define YY_DO_BEFORE_ACTION \ + yyg->yytext_ptr = yy_bp; \ + yyleng = (int) (yy_cp - yy_bp); \ + yyg->yy_hold_char = *yy_cp; \ + *yy_cp = '\0'; \ + yyg->yy_c_buf_p = yy_cp; + +#define YY_NUM_RULES 54 +#define YY_END_OF_BUFFER 55 +/* This struct is not used in this scanner, + but its presence is necessary. */ +struct yy_trans_info + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static yyconst flex_int16_t yy_accept[210] = + { 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 55, 49, 51, 50, 53, 1, 49, 33, 2, 47, + 48, 35, 37, 50, 39, 49, 46, 46, 46, 46, + 46, 46, 49, 46, 51, 49, 50, 49, 46, 9, + 8, 9, 4, 3, 49, 0, 10, 0, 0, 0, + 0, 0, 33, 33, 34, 36, 39, 49, 46, 46, + 46, 46, 46, 46, 0, 52, 46, 0, 0, 0, + 12, 0, 0, 0, 0, 0, 0, 49, 0, 11, + 46, 0, 0, 5, 0, 0, 0, 29, 0, 0, + 33, 33, 33, 33, 0, 0, 40, 46, 46, 46, + + 46, 45, 12, 12, 0, 0, 0, 23, 0, 0, + 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 46, 46, 46, 46, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 30, 31, 0, 0, 0, 0, 0, 0, 46, 46, + 46, 46, 0, 24, 25, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 32, 27, 0, 0, 20, 0, + 46, 46, 43, 46, 0, 26, 21, 0, 0, 0, + 19, 0, 0, 18, 28, 0, 0, 41, 46, 46, + 17, 22, 0, 7, 38, 7, 15, 0, 46, 46, + + 14, 16, 42, 44, 0, 0, 0, 13, 0 + } ; + +static yyconst YY_CHAR yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 5, 6, 7, 8, 9, 1, 10, 11, 12, + 13, 14, 1, 15, 1, 1, 1, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 17, 18, 19, + 20, 21, 22, 1, 23, 24, 25, 26, 27, 28, + 29, 29, 30, 29, 29, 31, 32, 33, 34, 29, + 29, 35, 36, 37, 38, 29, 29, 29, 29, 29, + 1, 39, 1, 1, 40, 1, 23, 24, 41, 42, + + 43, 44, 29, 29, 45, 29, 29, 46, 32, 47, + 34, 29, 29, 35, 48, 37, 49, 29, 29, 29, + 29, 29, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static yyconst YY_CHAR yy_meta[50] = + { 0, + 1, 2, 2, 3, 4, 3, 3, 1, 1, 3, + 3, 3, 3, 1, 3, 5, 3, 3, 1, 3, + 6, 1, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 1, 5, + 7, 7, 7, 7, 7, 7, 7, 7, 7 + } ; + +static yyconst flex_uint16_t yy_base[219] = + { 0, + 0, 48, 0, 49, 513, 56, 52, 57, 62, 68, + 515, 0, 583, 583, 509, 583, 97, 74, 583, 583, + 583, 583, 491, 583, 423, 421, 0, 19, 40, 392, + 36, 47, 86, 146, 88, 186, 413, 235, 275, 583, + 407, 98, 583, 583, 0, 386, 583, 323, 65, 73, + 81, 74, 127, 146, 583, 583, 583, 108, 0, 89, + 120, 92, 362, 116, 161, 583, 0, 167, 371, 0, + 168, 131, 146, 171, 81, 89, 352, 420, 353, 583, + 0, 349, 178, 196, 175, 197, 188, 208, 196, 197, + 256, 262, 324, 330, 337, 143, 0, 151, 220, 56, + + 305, 0, 336, 139, 225, 315, 305, 322, 318, 163, + 320, 268, 266, 369, 583, 340, 347, 350, 350, 351, + 357, 350, 357, 363, 140, 235, 359, 218, 362, 375, + 379, 380, 381, 385, 384, 404, 405, 243, 235, 213, + 583, 583, 405, 407, 410, 171, 410, 409, 419, 418, + 423, 426, 311, 583, 583, 428, 429, 431, 173, 462, + 435, 166, 145, 438, 583, 583, 441, 444, 583, 433, + 448, 89, 0, 438, 450, 583, 583, 452, 457, 487, + 583, 114, 0, 583, 583, 457, 462, 0, 465, 463, + 583, 583, 468, 583, 583, 583, 583, 470, 471, 474, + + 500, 583, 0, 0, 505, 0, 65, 583, 583, 524, + 531, 537, 540, 547, 554, 561, 568, 575 + } ; + +static yyconst flex_int16_t yy_def[219] = + { 0, + 209, 1, 1, 1, 1, 1, 210, 210, 210, 210, + 209, 211, 209, 209, 212, 209, 211, 209, 209, 209, + 209, 209, 209, 209, 209, 211, 213, 213, 213, 213, + 213, 213, 211, 213, 209, 209, 209, 214, 209, 209, + 209, 209, 209, 209, 211, 212, 209, 209, 209, 209, + 209, 209, 209, 215, 209, 209, 209, 211, 213, 213, + 213, 213, 213, 213, 209, 209, 34, 209, 209, 69, + 211, 209, 209, 209, 209, 209, 209, 214, 214, 209, + 39, 209, 209, 209, 209, 209, 209, 209, 209, 209, + 215, 215, 215, 215, 209, 209, 213, 213, 213, 213, + + 213, 213, 209, 209, 209, 209, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + 209, 209, 209, 209, 213, 213, 213, 213, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, 213, 213, + 213, 213, 209, 209, 209, 209, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + 213, 213, 213, 213, 209, 209, 209, 209, 209, 209, + 209, 216, 217, 209, 209, 209, 209, 213, 213, 213, + 209, 209, 209, 209, 209, 209, 209, 209, 213, 213, + + 209, 209, 213, 213, 209, 218, 218, 209, 0, 209, + 209, 209, 209, 209, 209, 209, 209, 209 + } ; + +static yyconst flex_uint16_t yy_nxt[633] = + { 0, + 12, 13, 14, 13, 13, 15, 16, 12, 17, 18, + 19, 20, 21, 12, 22, 12, 23, 24, 12, 25, + 12, 26, 27, 27, 27, 27, 28, 27, 27, 29, + 27, 30, 27, 27, 27, 31, 27, 32, 33, 34, + 27, 27, 28, 27, 29, 27, 27, 31, 32, 35, + 35, 60, 35, 35, 41, 36, 36, 35, 37, 41, + 35, 42, 43, 36, 41, 60, 42, 43, 44, 38, + 41, 42, 61, 63, 44, 53, 53, 42, 53, 54, + 39, 39, 64, 55, 63, 208, 61, 65, 66, 68, + 65, 85, 68, 127, 64, 69, 39, 39, 48, 83, + + 84, 48, 83, 86, 127, 87, 90, 85, 88, 95, + 110, 189, 95, 89, 97, 195, 195, 100, 86, 87, + 90, 111, 49, 50, 88, 110, 51, 89, 53, 53, + 97, 53, 54, 100, 52, 111, 55, 96, 49, 50, + 104, 51, 102, 104, 98, 52, 45, 92, 53, 183, + 92, 93, 96, 45, 45, 94, 99, 105, 102, 45, + 98, 67, 65, 66, 45, 65, 45, 45, 68, 104, + 182, 68, 104, 105, 69, 124, 106, 149, 107, 83, + 84, 125, 83, 71, 45, 67, 45, 70, 149, 124, + 70, 106, 107, 45, 45, 136, 125, 114, 108, 45, + + 114, 71, 116, 109, 45, 115, 45, 45, 168, 136, + 179, 72, 73, 119, 108, 74, 75, 109, 116, 168, + 122, 179, 123, 76, 45, 45, 117, 72, 73, 119, + 74, 75, 118, 120, 76, 78, 122, 80, 123, 163, + 121, 117, 78, 78, 118, 164, 126, 162, 78, 120, + 78, 152, 129, 78, 121, 78, 78, 92, 53, 164, + 92, 93, 126, 92, 53, 94, 92, 93, 129, 150, + 139, 94, 138, 78, 78, 79, 79, 80, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, + 81, 79, 79, 79, 79, 79, 79, 81, 81, 81, + + 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, + 81, 81, 81, 79, 81, 81, 81, 81, 81, 81, + 81, 81, 81, 81, 48, 92, 53, 48, 92, 93, + 132, 92, 53, 94, 92, 93, 128, 104, 95, 94, + 104, 95, 135, 175, 130, 137, 132, 133, 49, 50, + 131, 103, 51, 113, 134, 80, 112, 175, 135, 130, + 52, 137, 131, 133, 49, 50, 96, 51, 134, 140, + 114, 52, 70, 114, 141, 70, 142, 144, 115, 143, + 146, 96, 145, 147, 140, 101, 103, 148, 47, 151, + 141, 153, 142, 144, 143, 146, 72, 73, 145, 147, + + 74, 75, 154, 148, 151, 155, 153, 157, 76, 156, + 158, 82, 72, 73, 159, 74, 75, 77, 154, 76, + 78, 155, 80, 157, 156, 62, 158, 78, 78, 159, + 160, 161, 165, 78, 166, 78, 167, 169, 78, 170, + 78, 78, 58, 57, 171, 172, 160, 161, 165, 173, + 166, 174, 167, 169, 170, 176, 177, 178, 78, 78, + 171, 172, 181, 180, 184, 173, 180, 174, 185, 186, + 187, 176, 177, 178, 188, 190, 191, 103, 181, 192, + 184, 187, 193, 197, 185, 186, 190, 198, 180, 199, + 188, 180, 191, 200, 201, 192, 202, 203, 193, 197, + + 204, 205, 103, 198, 205, 199, 205, 56, 200, 205, + 201, 47, 202, 203, 209, 37, 204, 209, 206, 209, + 209, 209, 209, 206, 40, 40, 40, 40, 40, 40, + 40, 45, 209, 209, 209, 45, 45, 46, 46, 46, + 46, 46, 46, 46, 59, 209, 59, 79, 79, 79, + 79, 79, 79, 79, 91, 91, 91, 91, 91, 91, + 91, 194, 194, 194, 209, 194, 194, 194, 196, 209, + 196, 209, 196, 196, 196, 207, 207, 207, 207, 207, + 209, 207, 11, 209, 209, 209, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + 209, 209 + } ; + +static yyconst flex_int16_t yy_chk[633] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, + 4, 28, 2, 4, 7, 2, 4, 6, 6, 8, + 6, 7, 7, 6, 9, 28, 8, 8, 9, 6, + 10, 9, 29, 31, 10, 18, 18, 10, 18, 18, + 6, 6, 32, 18, 31, 207, 29, 33, 33, 35, + 33, 49, 35, 100, 32, 35, 6, 6, 17, 42, + + 42, 17, 42, 50, 100, 50, 52, 49, 51, 58, + 75, 172, 58, 51, 60, 182, 182, 62, 50, 50, + 52, 76, 17, 17, 51, 75, 17, 51, 53, 53, + 60, 53, 53, 62, 17, 76, 53, 58, 17, 17, + 104, 17, 64, 104, 61, 17, 34, 54, 54, 163, + 54, 54, 58, 34, 34, 54, 61, 72, 64, 34, + 61, 34, 65, 65, 34, 65, 34, 34, 68, 71, + 162, 68, 71, 72, 68, 96, 73, 125, 73, 83, + 83, 98, 83, 71, 34, 34, 36, 36, 125, 96, + 36, 73, 73, 36, 36, 110, 98, 84, 74, 36, + + 84, 36, 85, 74, 36, 84, 36, 36, 146, 110, + 159, 36, 36, 87, 74, 36, 36, 74, 85, 146, + 89, 159, 90, 36, 36, 36, 86, 36, 36, 87, + 36, 36, 86, 88, 36, 38, 89, 38, 90, 139, + 88, 86, 38, 38, 86, 140, 99, 138, 38, 88, + 38, 128, 105, 38, 88, 38, 38, 91, 91, 140, + 91, 91, 99, 92, 92, 91, 92, 92, 105, 126, + 113, 92, 112, 38, 38, 39, 39, 39, 39, 39, + 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, + 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, + + 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, + 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, + 39, 39, 39, 39, 48, 93, 93, 48, 93, 93, + 107, 94, 94, 93, 94, 94, 101, 103, 95, 94, + 103, 95, 109, 153, 106, 111, 107, 108, 48, 48, + 106, 103, 48, 82, 108, 79, 77, 153, 109, 106, + 48, 111, 106, 108, 48, 48, 95, 48, 108, 116, + 114, 48, 69, 114, 117, 69, 118, 120, 114, 119, + 122, 95, 121, 123, 116, 63, 69, 124, 46, 127, + 117, 129, 118, 120, 119, 122, 69, 69, 121, 123, + + 69, 69, 130, 124, 127, 131, 129, 133, 69, 132, + 134, 41, 69, 69, 135, 69, 69, 37, 130, 69, + 78, 131, 78, 133, 132, 30, 134, 78, 78, 135, + 136, 137, 143, 78, 144, 78, 145, 147, 78, 148, + 78, 78, 26, 25, 149, 150, 136, 137, 143, 151, + 144, 152, 145, 147, 148, 156, 157, 158, 78, 78, + 149, 150, 161, 160, 164, 151, 160, 152, 167, 168, + 170, 156, 157, 158, 171, 174, 175, 160, 161, 178, + 164, 170, 179, 186, 167, 168, 174, 187, 180, 189, + 171, 180, 175, 190, 193, 178, 198, 199, 179, 186, + + 200, 201, 180, 187, 201, 189, 205, 23, 190, 205, + 193, 15, 198, 199, 11, 5, 200, 0, 201, 0, + 0, 0, 0, 205, 210, 210, 210, 210, 210, 210, + 210, 211, 0, 0, 0, 211, 211, 212, 212, 212, + 212, 212, 212, 212, 213, 0, 213, 214, 214, 214, + 214, 214, 214, 214, 215, 215, 215, 215, 215, 215, + 215, 216, 216, 216, 0, 216, 216, 216, 217, 0, + 217, 0, 217, 217, 217, 218, 218, 218, 218, 218, + 0, 218, 209, 209, 209, 209, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + 209, 209 + } ; + +/* The intent behind this definition is that it'll catch + * any uses of REJECT which flex missed. + */ +#define REJECT reject_used_but_not_detected +#define yymore() yymore_used_but_not_detected +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET +#line 1 "cmFortranLexer.in.l" +#line 2 "cmFortranLexer.in.l" +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +/*------------------------------------------------------------------------- + Portions of this source have been derived from makedepf90 version 2.8.8, + + Copyright (C) 2000--2006 Erik Edelmann + + The code was originally distributed under the GPL but permission + from the copyright holder has been obtained to distribute this + derived work under the CMake license. +-------------------------------------------------------------------------*/ + +/* + +This file must be translated to C++ and modified to build everywhere. + +Run flex >= 2.6 like this: + + flex -i --nounistd -DFLEXINT_H --prefix=cmFortran_yy --header-file=cmFortranLexer.h -ocmFortranLexer.cxx cmFortranLexer.in.l + +Modify cmFortranLexer.cxx: + - remove trailing whitespace: sed -i 's/\s*$//' cmFortranLexer.h cmFortranLexer.cxx + - remove blank lines at end of file + - #include "cmStandardLexer.h" at the top + - add cast in cmFortran_yy_scan_bytes for loop condition of _yybytes_len to size_t + +*/ + +/* IWYU pragma: no_forward_declare yyguts_t */ + +#undef YY_NO_UNPUT + +#define cmFortranLexer_cxx +#include "cmFortranParser.h" /* Interface to parser object. */ + +/* Replace the lexer input function. */ +#undef YY_INPUT +#define YY_INPUT(buf, result, max_size) \ + { result = cmFortranParser_Input(yyextra, buf, max_size); } + +/* Include the set of tokens from the parser. */ +#include "cmFortranParserTokens.h" + +/*--------------------------------------------------------------------------*/ + + +#line 688 "cmFortranLexer.cxx" + +#define INITIAL 0 +#define free_fmt 1 +#define fixed_fmt 2 +#define str_sq 3 +#define str_dq 4 + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +/* Holds the entire state of the reentrant scanner. */ +struct yyguts_t + { + + /* User-defined. Not touched by flex. */ + YY_EXTRA_TYPE yyextra_r; + + /* The rest are the same as the globals declared in the non-reentrant scanner. */ + FILE *yyin_r, *yyout_r; + size_t yy_buffer_stack_top; /**< index of top of stack. */ + size_t yy_buffer_stack_max; /**< capacity of stack. */ + YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ + char yy_hold_char; + int yy_n_chars; + int yyleng_r; + char *yy_c_buf_p; + int yy_init; + int yy_start; + int yy_did_buffer_switch_on_eof; + int yy_start_stack_ptr; + int yy_start_stack_depth; + int *yy_start_stack; + yy_state_type yy_last_accepting_state; + char* yy_last_accepting_cpos; + + int yylineno_r; + int yy_flex_debug_r; + + char *yytext_r; + int yy_more_flag; + int yy_more_len; + + }; /* end struct yyguts_t */ + +static int yy_init_globals (yyscan_t yyscanner ); + +int cmFortran_yylex_init (yyscan_t* scanner); + +int cmFortran_yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); + +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int cmFortran_yylex_destroy (yyscan_t yyscanner ); + +int cmFortran_yyget_debug (yyscan_t yyscanner ); + +void cmFortran_yyset_debug (int debug_flag ,yyscan_t yyscanner ); + +YY_EXTRA_TYPE cmFortran_yyget_extra (yyscan_t yyscanner ); + +void cmFortran_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); + +FILE *cmFortran_yyget_in (yyscan_t yyscanner ); + +void cmFortran_yyset_in (FILE * _in_str ,yyscan_t yyscanner ); + +FILE *cmFortran_yyget_out (yyscan_t yyscanner ); + +void cmFortran_yyset_out (FILE * _out_str ,yyscan_t yyscanner ); + + int cmFortran_yyget_leng (yyscan_t yyscanner ); + +char *cmFortran_yyget_text (yyscan_t yyscanner ); + +int cmFortran_yyget_lineno (yyscan_t yyscanner ); + +void cmFortran_yyset_lineno (int _line_number ,yyscan_t yyscanner ); + +int cmFortran_yyget_column (yyscan_t yyscanner ); + +void cmFortran_yyset_column (int _column_no ,yyscan_t yyscanner ); + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int cmFortran_yywrap (yyscan_t yyscanner ); +#else +extern int cmFortran_yywrap (yyscan_t yyscanner ); +#endif +#endif + +#ifndef YY_NO_UNPUT + + static void yyunput (int c,char *buf_ptr ,yyscan_t yyscanner); + +#endif + +#ifndef yytext_ptr +static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); +#endif + +#ifndef YY_NO_INPUT + +#ifdef __cplusplus +static int yyinput (yyscan_t yyscanner ); +#else +static int input (yyscan_t yyscanner ); +#endif + +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k */ +#define YY_READ_BUF_SIZE 16384 +#else +#define YY_READ_BUF_SIZE 8192 +#endif /* __ia64__ */ +#endif + +/* Copy whatever the last rule matched to the standard output. */ +#ifndef ECHO +/* This used to be an fputs(), but since the string might contain NUL's, + * we now use fwrite(). + */ +#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ + { \ + int c = '*'; \ + size_t n; \ + for ( n = 0; n < max_size && \ + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else \ + { \ + errno=0; \ + while ( (result = (int) fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(yyin); \ + } \ + }\ +\ + +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) +#endif + +/* end tables serialization structures and prototypes */ + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL_IS_OURS 1 + +extern int cmFortran_yylex (yyscan_t yyscanner); + +#define YY_DECL int cmFortran_yylex (yyscan_t yyscanner) +#endif /* !YY_DECL */ + +/* Code executed at the beginning of each rule, after yytext and yyleng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK /*LINTED*/break; +#endif + +#define YY_RULE_SETUP \ + if ( yyleng > 0 ) \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ + (yytext[yyleng - 1] == '\n'); \ + YY_USER_ACTION + +/** The main scanner function which does all the work. + */ +YY_DECL +{ + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if ( !yyg->yy_init ) + { + yyg->yy_init = 1; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + if ( ! yyg->yy_start ) + yyg->yy_start = 1; /* first start state */ + + if ( ! yyin ) + yyin = stdin; + + if ( ! yyout ) + yyout = stdout; + + if ( ! YY_CURRENT_BUFFER ) { + cmFortran_yyensure_buffer_stack (yyscanner); + YY_CURRENT_BUFFER_LVALUE = + cmFortran_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); + } + + cmFortran_yy_load_buffer_state(yyscanner ); + } + + { +#line 56 "cmFortranLexer.in.l" + + +#line 951 "cmFortranLexer.cxx" + + while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ + { + yy_cp = yyg->yy_c_buf_p; + + /* Support of yytext. */ + *yy_cp = yyg->yy_hold_char; + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = yyg->yy_start; + yy_current_state += YY_AT_BOL(); +yy_match: + do + { + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 210 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; + ++yy_cp; + } + while ( yy_base[yy_current_state] != 583 ); + +yy_find_action: + yy_act = yy_accept[yy_current_state]; + if ( yy_act == 0 ) + { /* have to back up */ + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + yy_act = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + +do_action: /* This label is used only to access EOF actions. */ + + switch ( yy_act ) + { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = yyg->yy_hold_char; + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + goto yy_find_action; + +case 1: +YY_RULE_SETUP +#line 58 "cmFortranLexer.in.l" +{ + cmFortranParser_StringStart(yyextra); + cmFortranParser_SetOldStartcond(yyextra, YY_START); + BEGIN(str_dq); +} + YY_BREAK +case 2: +YY_RULE_SETUP +#line 64 "cmFortranLexer.in.l" +{ + cmFortranParser_StringStart(yyextra); + cmFortranParser_SetOldStartcond(yyextra, YY_START); + BEGIN(str_sq); +} + YY_BREAK +case 3: +#line 71 "cmFortranLexer.in.l" +case 4: +YY_RULE_SETUP +#line 71 "cmFortranLexer.in.l" +{ + BEGIN(cmFortranParser_GetOldStartcond(yyextra) ); + yylvalp->string = strdup(cmFortranParser_StringEnd(yyextra)); + return STRING; +} + YY_BREAK +case 5: +/* rule 5 can match eol */ +#line 78 "cmFortranLexer.in.l" +case 6: +/* rule 6 can match eol */ +YY_RULE_SETUP +#line 78 "cmFortranLexer.in.l" +/* Ignore (continued strings, free fmt) */ + YY_BREAK +case 7: +/* rule 7 can match eol */ +YY_RULE_SETUP +#line 80 "cmFortranLexer.in.l" +{ + if (cmFortranParser_GetOldStartcond(yyextra) == fixed_fmt) + ; /* Ignore (cont. strings, fixed fmt) */ + else + { + unput(yytext[strlen(yytext)-1]); + } +} + YY_BREAK +case 8: +/* rule 8 can match eol */ +YY_RULE_SETUP +#line 90 "cmFortranLexer.in.l" +{ + unput ('\n'); + BEGIN(INITIAL); + return UNTERMINATED_STRING; +} + YY_BREAK +case 9: +YY_RULE_SETUP +#line 96 "cmFortranLexer.in.l" +{ + cmFortranParser_StringAppend(yyextra, yytext[0]); +} + YY_BREAK +case 10: +/* rule 10 can match eol */ +YY_RULE_SETUP +#line 100 "cmFortranLexer.in.l" +{ return EOSTMT; } /* Treat comments like */ + YY_BREAK +case 11: +/* rule 11 can match eol */ +YY_RULE_SETUP +#line 101 "cmFortranLexer.in.l" +{ return EOSTMT; } /* empty lines */ + YY_BREAK +case 12: +YY_RULE_SETUP +#line 103 "cmFortranLexer.in.l" +{ return CPP_LINE_DIRECTIVE; } + YY_BREAK +case 13: +/* rule 13 can match eol */ +YY_RULE_SETUP +#line 104 "cmFortranLexer.in.l" +{ + yytext[yyleng-1] = 0; + yylvalp->string = strdup(strchr(yytext, '<')+1); + return CPP_INCLUDE_ANGLE; +} + YY_BREAK +case 14: +YY_RULE_SETUP +#line 109 "cmFortranLexer.in.l" +{ return CPP_INCLUDE; } + YY_BREAK +case 15: +YY_RULE_SETUP +#line 110 "cmFortranLexer.in.l" +{ return F90PPR_INCLUDE; } + YY_BREAK +case 16: +YY_RULE_SETUP +#line 111 "cmFortranLexer.in.l" +{ return COCO_INCLUDE; } + YY_BREAK +case 17: +YY_RULE_SETUP +#line 113 "cmFortranLexer.in.l" +{ return CPP_DEFINE; } + YY_BREAK +case 18: +YY_RULE_SETUP +#line 114 "cmFortranLexer.in.l" +{ return F90PPR_DEFINE; } + YY_BREAK +case 19: +YY_RULE_SETUP +#line 116 "cmFortranLexer.in.l" +{ return CPP_UNDEF; } + YY_BREAK +case 20: +YY_RULE_SETUP +#line 117 "cmFortranLexer.in.l" +{ return F90PPR_UNDEF; } + YY_BREAK +case 21: +YY_RULE_SETUP +#line 119 "cmFortranLexer.in.l" +{ return CPP_IFDEF; } + YY_BREAK +case 22: +YY_RULE_SETUP +#line 120 "cmFortranLexer.in.l" +{ return CPP_IFNDEF; } + YY_BREAK +case 23: +YY_RULE_SETUP +#line 121 "cmFortranLexer.in.l" +{ return CPP_IF; } + YY_BREAK +case 24: +YY_RULE_SETUP +#line 122 "cmFortranLexer.in.l" +{ return CPP_ELIF; } + YY_BREAK +case 25: +YY_RULE_SETUP +#line 123 "cmFortranLexer.in.l" +{ return CPP_ELSE; } + YY_BREAK +case 26: +YY_RULE_SETUP +#line 124 "cmFortranLexer.in.l" +{ return CPP_ENDIF; } + YY_BREAK +case 27: +YY_RULE_SETUP +#line 126 "cmFortranLexer.in.l" +{ return F90PPR_IFDEF; } + YY_BREAK +case 28: +YY_RULE_SETUP +#line 127 "cmFortranLexer.in.l" +{ return F90PPR_IFNDEF; } + YY_BREAK +case 29: +YY_RULE_SETUP +#line 128 "cmFortranLexer.in.l" +{ return F90PPR_IF; } + YY_BREAK +case 30: +YY_RULE_SETUP +#line 129 "cmFortranLexer.in.l" +{ return F90PPR_ELIF; } + YY_BREAK +case 31: +YY_RULE_SETUP +#line 130 "cmFortranLexer.in.l" +{ return F90PPR_ELSE; } + YY_BREAK +case 32: +YY_RULE_SETUP +#line 131 "cmFortranLexer.in.l" +{ return F90PPR_ENDIF; } + YY_BREAK +/* Line continuations, possible involving comments. */ +case 33: +/* rule 33 can match eol */ +YY_RULE_SETUP +#line 134 "cmFortranLexer.in.l" + + YY_BREAK +case 34: +/* rule 34 can match eol */ +YY_RULE_SETUP +#line 135 "cmFortranLexer.in.l" + + YY_BREAK +case 35: +YY_RULE_SETUP +#line 137 "cmFortranLexer.in.l" +{ return COMMA; } + YY_BREAK +case 36: +YY_RULE_SETUP +#line 139 "cmFortranLexer.in.l" +{ return DCOLON; } + YY_BREAK +case 37: +YY_RULE_SETUP +#line 140 "cmFortranLexer.in.l" +{ return COLON; } + YY_BREAK +case 38: +/* rule 38 can match eol */ +YY_RULE_SETUP +#line 142 "cmFortranLexer.in.l" +{ return GARBAGE; } + YY_BREAK +case 39: +YY_RULE_SETUP +#line 144 "cmFortranLexer.in.l" +{ return ASSIGNMENT_OP; } + YY_BREAK +case 40: +YY_RULE_SETUP +#line 146 "cmFortranLexer.in.l" +{ return END; } + YY_BREAK +case 41: +YY_RULE_SETUP +#line 147 "cmFortranLexer.in.l" +{ return INCLUDE; } + YY_BREAK +case 42: +YY_RULE_SETUP +#line 148 "cmFortranLexer.in.l" +{ return INTERFACE; } + YY_BREAK +case 43: +YY_RULE_SETUP +#line 149 "cmFortranLexer.in.l" +{ return MODULE; } + YY_BREAK +case 44: +YY_RULE_SETUP +#line 150 "cmFortranLexer.in.l" +{ return SUBMODULE; } + YY_BREAK +case 45: +YY_RULE_SETUP +#line 151 "cmFortranLexer.in.l" +{ return USE; } + YY_BREAK +case 46: +YY_RULE_SETUP +#line 153 "cmFortranLexer.in.l" +{ + yylvalp->string = strdup(yytext); + return WORD; +} + YY_BREAK +case 47: +YY_RULE_SETUP +#line 158 "cmFortranLexer.in.l" +{ return LPAREN; } + YY_BREAK +case 48: +YY_RULE_SETUP +#line 159 "cmFortranLexer.in.l" +{ return RPAREN; } + YY_BREAK +case 49: +YY_RULE_SETUP +#line 161 "cmFortranLexer.in.l" +{ return GARBAGE; } + YY_BREAK +case 50: +/* rule 50 can match eol */ +YY_RULE_SETUP +#line 163 "cmFortranLexer.in.l" +{ return EOSTMT; } + YY_BREAK +case 51: +YY_RULE_SETUP +#line 166 "cmFortranLexer.in.l" +/* Ignore */ + YY_BREAK +case 52: +/* rule 52 can match eol */ +YY_RULE_SETUP +#line 167 "cmFortranLexer.in.l" +/* Ignore line-endings preceded by \ */ + YY_BREAK +case 53: +YY_RULE_SETUP +#line 169 "cmFortranLexer.in.l" +{ return *yytext; } + YY_BREAK +case YY_STATE_EOF(INITIAL): +case YY_STATE_EOF(free_fmt): +case YY_STATE_EOF(fixed_fmt): +case YY_STATE_EOF(str_sq): +case YY_STATE_EOF(str_dq): +#line 171 "cmFortranLexer.in.l" +{ + if(!cmFortranParser_FilePop(yyextra) ) + { + return YY_NULL; + } +} + YY_BREAK +case 54: +YY_RULE_SETUP +#line 178 "cmFortranLexer.in.l" +ECHO; + YY_BREAK +#line 1331 "cmFortranLexer.cxx" + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = yyg->yy_hold_char; + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * cmFortran_yylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( yyscanner ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); + + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++yyg->yy_c_buf_p; + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = yyg->yy_c_buf_p; + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( yyscanner ) ) + { + case EOB_ACT_END_OF_FILE: + { + yyg->yy_did_buffer_switch_on_eof = 0; + + if ( cmFortran_yywrap(yyscanner ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! yyg->yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = + yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( yyscanner ); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + yyg->yy_c_buf_p = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; + + yy_current_state = yy_get_previous_state( yyscanner ); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of user's declarations */ +} /* end of cmFortran_yylex */ + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ +static int yy_get_next_buffer (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = yyg->yytext_ptr; + yy_size_t number_to_move, i; + int ret_val; + + if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (yy_size_t) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1; + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; + + else + { + int num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; + + int yy_c_buf_p_offset = + (int) (yyg->yy_c_buf_p - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + cmFortran_yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = NULL; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + yyg->yy_n_chars, num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + if ( yyg->yy_n_chars == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + cmFortran_yyrestart(yyin ,yyscanner); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if ((int) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) cmFortran_yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + } + + yyg->yy_n_chars += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; + + yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; +} + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + + static yy_state_type yy_get_previous_state (yyscan_t yyscanner) +{ + yy_state_type yy_current_state; + char *yy_cp; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + yy_current_state = yyg->yy_start; + yy_current_state += YY_AT_BOL(); + + for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) + { + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 210 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; + } + + return yy_current_state; +} + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) +{ + int yy_is_jam; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ + char *yy_cp = yyg->yy_c_buf_p; + + YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 210 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; + yy_is_jam = (yy_current_state == 209); + + (void)yyg; + return yy_is_jam ? 0 : yy_current_state; +} + +#ifndef YY_NO_UNPUT + + static void yyunput (int c, char * yy_bp , yyscan_t yyscanner) +{ + char *yy_cp; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + yy_cp = yyg->yy_c_buf_p; + + /* undo effects of setting up yytext */ + *yy_cp = yyg->yy_hold_char; + + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + { /* need to shift things up to make room */ + /* +2 for EOB chars. */ + int number_to_move = yyg->yy_n_chars + 2; + char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; + char *source = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; + + while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + *--dest = *--source; + + yy_cp += (int) (dest - source); + yy_bp += (int) (dest - source); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = + yyg->yy_n_chars = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size; + + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + YY_FATAL_ERROR( "flex scanner push-back overflow" ); + } + + *--yy_cp = (char) c; + + yyg->yytext_ptr = yy_bp; + yyg->yy_hold_char = *yy_cp; + yyg->yy_c_buf_p = yy_cp; +} + +#endif + +#ifndef YY_NO_INPUT +#ifdef __cplusplus + static int yyinput (yyscan_t yyscanner) +#else + static int input (yyscan_t yyscanner) +#endif + +{ + int c; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + *yyg->yy_c_buf_p = yyg->yy_hold_char; + + if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) + /* This was really a NUL. */ + *yyg->yy_c_buf_p = '\0'; + + else + { /* need more input */ + int offset = yyg->yy_c_buf_p - yyg->yytext_ptr; + ++yyg->yy_c_buf_p; + + switch ( yy_get_next_buffer( yyscanner ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + cmFortran_yyrestart(yyin ,yyscanner); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( cmFortran_yywrap(yyscanner ) ) + return 0; + + if ( ! yyg->yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(yyscanner); +#else + return input(yyscanner); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = yyg->yytext_ptr + offset; + break; + } + } + } + + c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ + *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ + yyg->yy_hold_char = *++yyg->yy_c_buf_p; + + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); + + return c; +} +#endif /* ifndef YY_NO_INPUT */ + +/** Immediately switch to a different input stream. + * @param input_file A readable stream. + * @param yyscanner The scanner object. + * @note This function does not reset the start condition to @c INITIAL . + */ + void cmFortran_yyrestart (FILE * input_file , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if ( ! YY_CURRENT_BUFFER ){ + cmFortran_yyensure_buffer_stack (yyscanner); + YY_CURRENT_BUFFER_LVALUE = + cmFortran_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); + } + + cmFortran_yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner); + cmFortran_yy_load_buffer_state(yyscanner ); +} + +/** Switch to a different input buffer. + * @param new_buffer The new input buffer. + * @param yyscanner The scanner object. + */ + void cmFortran_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* TODO. We should be able to replace this entire function body + * with + * cmFortran_yypop_buffer_state(); + * cmFortran_yypush_buffer_state(new_buffer); + */ + cmFortran_yyensure_buffer_stack (yyscanner); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + cmFortran_yy_load_buffer_state(yyscanner ); + + /* We don't actually know whether we did this switch during + * EOF (cmFortran_yywrap()) processing, but the only time this flag + * is looked at is after cmFortran_yywrap() is called, so it's safe + * to go ahead and always set it. + */ + yyg->yy_did_buffer_switch_on_eof = 1; +} + +static void cmFortran_yy_load_buffer_state (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + yyg->yy_hold_char = *yyg->yy_c_buf_p; +} + +/** Allocate and initialize an input buffer state. + * @param file A readable stream. + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. + * @param yyscanner The scanner object. + * @return the allocated buffer state. + */ + YY_BUFFER_STATE cmFortran_yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) +{ + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) cmFortran_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in cmFortran_yy_create_buffer()" ); + + b->yy_buf_size = (yy_size_t)size; + + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) cmFortran_yyalloc(b->yy_buf_size + 2 ,yyscanner ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in cmFortran_yy_create_buffer()" ); + + b->yy_is_our_buffer = 1; + + cmFortran_yy_init_buffer(b,file ,yyscanner); + + return b; +} + +/** Destroy the buffer. + * @param b a buffer created with cmFortran_yy_create_buffer() + * @param yyscanner The scanner object. + */ + void cmFortran_yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if ( ! b ) + return; + + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + cmFortran_yyfree((void *) b->yy_ch_buf ,yyscanner ); + + cmFortran_yyfree((void *) b ,yyscanner ); +} + +/* Initializes or reinitializes a buffer. + * This function is sometimes called more than once on the same buffer, + * such as during a cmFortran_yyrestart() or at EOF. + */ + static void cmFortran_yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) + +{ + int oerrno = errno; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + cmFortran_yy_flush_buffer(b ,yyscanner); + + b->yy_input_file = file; + b->yy_fill_buffer = 1; + + /* If b is the current buffer, then cmFortran_yy_init_buffer was _probably_ + * called from cmFortran_yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } + + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; + + errno = oerrno; +} + +/** Discard all buffered characters. On the next scan, YY_INPUT will be called. + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. + * @param yyscanner The scanner object. + */ + void cmFortran_yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if ( ! b ) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == YY_CURRENT_BUFFER ) + cmFortran_yy_load_buffer_state(yyscanner ); +} + +/** Pushes the new state onto the stack. The new state becomes + * the current state. This function will allocate the stack + * if necessary. + * @param new_buffer The new state. + * @param yyscanner The scanner object. + */ +void cmFortran_yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if (new_buffer == NULL) + return; + + cmFortran_yyensure_buffer_stack(yyscanner); + + /* This block is copied from cmFortran_yy_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + yyg->yy_buffer_stack_top++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from cmFortran_yy_switch_to_buffer. */ + cmFortran_yy_load_buffer_state(yyscanner ); + yyg->yy_did_buffer_switch_on_eof = 1; +} + +/** Removes and deletes the top of the stack, if present. + * The next element becomes the new top. + * @param yyscanner The scanner object. + */ +void cmFortran_yypop_buffer_state (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if (!YY_CURRENT_BUFFER) + return; + + cmFortran_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner); + YY_CURRENT_BUFFER_LVALUE = NULL; + if (yyg->yy_buffer_stack_top > 0) + --yyg->yy_buffer_stack_top; + + if (YY_CURRENT_BUFFER) { + cmFortran_yy_load_buffer_state(yyscanner ); + yyg->yy_did_buffer_switch_on_eof = 1; + } +} + +/* Allocates the stack if it does not exist. + * Guarantees space for at least one push. + */ +static void cmFortran_yyensure_buffer_stack (yyscan_t yyscanner) +{ + int num_to_alloc; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if (!yyg->yy_buffer_stack) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ + yyg->yy_buffer_stack = (struct yy_buffer_state**)cmFortran_yyalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + , yyscanner); + if ( ! yyg->yy_buffer_stack ) + YY_FATAL_ERROR( "out of dynamic memory in cmFortran_yyensure_buffer_stack()" ); + + memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + yyg->yy_buffer_stack_max = num_to_alloc; + yyg->yy_buffer_stack_top = 0; + return; + } + + if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + yy_size_t grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = yyg->yy_buffer_stack_max + grow_size; + yyg->yy_buffer_stack = (struct yy_buffer_state**)cmFortran_yyrealloc + (yyg->yy_buffer_stack, + num_to_alloc * sizeof(struct yy_buffer_state*) + , yyscanner); + if ( ! yyg->yy_buffer_stack ) + YY_FATAL_ERROR( "out of dynamic memory in cmFortran_yyensure_buffer_stack()" ); + + /* zero only the new slots.*/ + memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); + yyg->yy_buffer_stack_max = num_to_alloc; + } +} + +/** Setup the input buffer state to scan directly from a user-specified character buffer. + * @param base the character buffer + * @param size the size in bytes of the character buffer + * @param yyscanner The scanner object. + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE cmFortran_yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) +{ + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return NULL; + + b = (YY_BUFFER_STATE) cmFortran_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in cmFortran_yy_scan_buffer()" ); + + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = NULL; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + cmFortran_yy_switch_to_buffer(b ,yyscanner ); + + return b; +} + +/** Setup the input buffer state to scan a string. The next call to cmFortran_yylex() will + * scan from a @e copy of @a str. + * @param yystr a NUL-terminated string to scan + * @param yyscanner The scanner object. + * @return the newly allocated buffer state object. + * @note If you want to scan bytes that may contain NUL values, then use + * cmFortran_yy_scan_bytes() instead. + */ +YY_BUFFER_STATE cmFortran_yy_scan_string (yyconst char * yystr , yyscan_t yyscanner) +{ + + return cmFortran_yy_scan_bytes(yystr,(int) strlen(yystr) ,yyscanner); +} + +/** Setup the input buffer state to scan the given bytes. The next call to cmFortran_yylex() will + * scan from a @e copy of @a bytes. + * @param yybytes the byte buffer to scan + * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. + * @param yyscanner The scanner object. + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE cmFortran_yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner) +{ + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + yy_size_t i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = (yy_size_t) _yybytes_len + 2; + buf = (char *) cmFortran_yyalloc(n ,yyscanner ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in cmFortran_yy_scan_bytes()" ); + + for ( i = 0; i < (size_t)_yybytes_len; ++i ) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; + + b = cmFortran_yy_scan_buffer(buf,n ,yyscanner); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in cmFortran_yy_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; +} + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +static void yynoreturn yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + (void) fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); +} + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + yytext[yyleng] = yyg->yy_hold_char; \ + yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ + yyg->yy_hold_char = *yyg->yy_c_buf_p; \ + *yyg->yy_c_buf_p = '\0'; \ + yyleng = yyless_macro_arg; \ + } \ + while ( 0 ) + +/* Accessor methods (get/set functions) to struct members. */ + +/** Get the user-defined data for this scanner. + * @param yyscanner The scanner object. + */ +YY_EXTRA_TYPE cmFortran_yyget_extra (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyextra; +} + +/** Get the current line number. + * @param yyscanner The scanner object. + */ +int cmFortran_yyget_lineno (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if (! YY_CURRENT_BUFFER) + return 0; + + return yylineno; +} + +/** Get the current column number. + * @param yyscanner The scanner object. + */ +int cmFortran_yyget_column (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if (! YY_CURRENT_BUFFER) + return 0; + + return yycolumn; +} + +/** Get the input stream. + * @param yyscanner The scanner object. + */ +FILE *cmFortran_yyget_in (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyin; +} + +/** Get the output stream. + * @param yyscanner The scanner object. + */ +FILE *cmFortran_yyget_out (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyout; +} + +/** Get the length of the current token. + * @param yyscanner The scanner object. + */ +int cmFortran_yyget_leng (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyleng; +} + +/** Get the current token. + * @param yyscanner The scanner object. + */ + +char *cmFortran_yyget_text (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yytext; +} + +/** Set the user-defined data. This data is never touched by the scanner. + * @param user_defined The data to be associated with this scanner. + * @param yyscanner The scanner object. + */ +void cmFortran_yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyextra = user_defined ; +} + +/** Set the current line number. + * @param _line_number line number + * @param yyscanner The scanner object. + */ +void cmFortran_yyset_lineno (int _line_number , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* lineno is only valid if an input buffer exists. */ + if (! YY_CURRENT_BUFFER ) + YY_FATAL_ERROR( "cmFortran_yyset_lineno called with no buffer" ); + + yylineno = _line_number; +} + +/** Set the current column. + * @param _column_no column number + * @param yyscanner The scanner object. + */ +void cmFortran_yyset_column (int _column_no , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* column is only valid if an input buffer exists. */ + if (! YY_CURRENT_BUFFER ) + YY_FATAL_ERROR( "cmFortran_yyset_column called with no buffer" ); + + yycolumn = _column_no; +} + +/** Set the input stream. This does not discard the current + * input buffer. + * @param _in_str A readable stream. + * @param yyscanner The scanner object. + * @see cmFortran_yy_switch_to_buffer + */ +void cmFortran_yyset_in (FILE * _in_str , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyin = _in_str ; +} + +void cmFortran_yyset_out (FILE * _out_str , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyout = _out_str ; +} + +int cmFortran_yyget_debug (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yy_flex_debug; +} + +void cmFortran_yyset_debug (int _bdebug , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yy_flex_debug = _bdebug ; +} + +/* Accessor methods for yylval and yylloc */ + +/* User-visible API */ + +/* cmFortran_yylex_init is special because it creates the scanner itself, so it is + * the ONLY reentrant function that doesn't take the scanner as the last argument. + * That's why we explicitly handle the declaration, instead of using our macros. + */ + +int cmFortran_yylex_init(yyscan_t* ptr_yy_globals) + +{ + if (ptr_yy_globals == NULL){ + errno = EINVAL; + return 1; + } + + *ptr_yy_globals = (yyscan_t) cmFortran_yyalloc ( sizeof( struct yyguts_t ), NULL ); + + if (*ptr_yy_globals == NULL){ + errno = ENOMEM; + return 1; + } + + /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); + + return yy_init_globals ( *ptr_yy_globals ); +} + +/* cmFortran_yylex_init_extra has the same functionality as cmFortran_yylex_init, but follows the + * convention of taking the scanner as the last argument. Note however, that + * this is a *pointer* to a scanner, as it will be allocated by this call (and + * is the reason, too, why this function also must handle its own declaration). + * The user defined value in the first argument will be available to cmFortran_yyalloc in + * the yyextra field. + */ + +int cmFortran_yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals ) + +{ + struct yyguts_t dummy_yyguts; + + cmFortran_yyset_extra (yy_user_defined, &dummy_yyguts); + + if (ptr_yy_globals == NULL){ + errno = EINVAL; + return 1; + } + + *ptr_yy_globals = (yyscan_t) cmFortran_yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); + + if (*ptr_yy_globals == NULL){ + errno = ENOMEM; + return 1; + } + + /* By setting to 0xAA, we expose bugs in + yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); + + cmFortran_yyset_extra (yy_user_defined, *ptr_yy_globals); + + return yy_init_globals ( *ptr_yy_globals ); +} + +static int yy_init_globals (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from cmFortran_yylex_destroy(), so don't allocate here. + */ + + yyg->yy_buffer_stack = NULL; + yyg->yy_buffer_stack_top = 0; + yyg->yy_buffer_stack_max = 0; + yyg->yy_c_buf_p = NULL; + yyg->yy_init = 0; + yyg->yy_start = 0; + + yyg->yy_start_stack_ptr = 0; + yyg->yy_start_stack_depth = 0; + yyg->yy_start_stack = NULL; + +/* Defined in main.c */ +#ifdef YY_STDINIT + yyin = stdin; + yyout = stdout; +#else + yyin = NULL; + yyout = NULL; +#endif + + /* For future reference: Set errno on error, since we are called by + * cmFortran_yylex_init() + */ + return 0; +} + +/* cmFortran_yylex_destroy is for both reentrant and non-reentrant scanners. */ +int cmFortran_yylex_destroy (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + cmFortran_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner ); + YY_CURRENT_BUFFER_LVALUE = NULL; + cmFortran_yypop_buffer_state(yyscanner); + } + + /* Destroy the stack itself. */ + cmFortran_yyfree(yyg->yy_buffer_stack ,yyscanner); + yyg->yy_buffer_stack = NULL; + + /* Destroy the start condition stack. */ + cmFortran_yyfree(yyg->yy_start_stack ,yyscanner ); + yyg->yy_start_stack = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * cmFortran_yylex() is called, initialization will occur. */ + yy_init_globals( yyscanner); + + /* Destroy the main struct (reentrant only). */ + cmFortran_yyfree ( yyscanner , yyscanner ); + yyscanner = NULL; + return 0; +} + +/* + * Internal utility routines. + */ + +#ifndef yytext_ptr +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + + int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; +} +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) +{ + int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; +} +#endif + +void *cmFortran_yyalloc (yy_size_t size , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + return malloc(size); +} + +void *cmFortran_yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return realloc(ptr, size); +} + +void cmFortran_yyfree (void * ptr , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + free( (char *) ptr ); /* see cmFortran_yyrealloc() for (char *) cast */ +} + +#define YYTABLES_NAME "yytables" + +#line 178 "cmFortranLexer.in.l" + + + +/*--------------------------------------------------------------------------*/ +YY_BUFFER_STATE cmFortranLexer_GetCurrentBuffer(yyscan_t yyscanner) +{ + /* Hack into the internal flex-generated scanner to get the buffer. */ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return YY_CURRENT_BUFFER; +} diff --git a/Source/LexerParser/cmFortranLexer.h b/Source/LexerParser/cmFortranLexer.h new file mode 100644 index 0000000..ddda919 --- /dev/null +++ b/Source/LexerParser/cmFortranLexer.h @@ -0,0 +1,338 @@ +#ifndef cmFortran_yyHEADER_H +#define cmFortran_yyHEADER_H 1 +#define cmFortran_yyIN_HEADER 1 + +#line 6 "cmFortranLexer.h" + +#line 8 "cmFortranLexer.h" + +#define FLEXINT_H 1 +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 6 +#define YY_FLEX_SUBMINOR_VERSION 1 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ +#include +#include +#include +#include + +/* end standard C headers. */ + +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have . Non-C99 systems may or may not. */ + +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 +#endif + +#include +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#endif /* ! C99 */ + +#endif /* ! FLEXINT_H */ + +/* TODO: this is always defined, so inline it */ +#define yyconst const + +#if defined(__GNUC__) && __GNUC__ >= 3 +#define yynoreturn __attribute__((__noreturn__)) +#else +#define yynoreturn +#endif + +/* An opaque pointer. */ +#ifndef YY_TYPEDEF_YY_SCANNER_T +#define YY_TYPEDEF_YY_SCANNER_T +typedef void* yyscan_t; +#endif + +/* For convenience, these vars (plus the bison vars far below) + are macros in the reentrant scanner. */ +#define yyin yyg->yyin_r +#define yyout yyg->yyout_r +#define yyextra yyg->yyextra_r +#define yyleng yyg->yyleng_r +#define yytext yyg->yytext_r +#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) +#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) +#define yy_flex_debug yyg->yy_flex_debug_r + +/* Size of default input buffer. */ +#ifndef YY_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k. + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. + * Ditto for the __ia64__ case accordingly. + */ +#define YY_BUF_SIZE 32768 +#else +#define YY_BUF_SIZE 16384 +#endif /* __ia64__ */ +#endif + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE +typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +void cmFortran_yyrestart (FILE *input_file ,yyscan_t yyscanner ); +void cmFortran_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); +YY_BUFFER_STATE cmFortran_yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner ); +void cmFortran_yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); +void cmFortran_yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); +void cmFortran_yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); +void cmFortran_yypop_buffer_state (yyscan_t yyscanner ); + +YY_BUFFER_STATE cmFortran_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); +YY_BUFFER_STATE cmFortran_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); +YY_BUFFER_STATE cmFortran_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); + +void *cmFortran_yyalloc (yy_size_t ,yyscan_t yyscanner ); +void *cmFortran_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); +void cmFortran_yyfree (void * ,yyscan_t yyscanner ); + +/* Begin user sect3 */ + +#define cmFortran_yywrap(yyscanner) (/*CONSTCOND*/1) +#define YY_SKIP_YYWRAP + +#define yytext_ptr yytext_r + +#ifdef YY_HEADER_EXPORT_START_CONDITIONS +#define INITIAL 0 +#define free_fmt 1 +#define fixed_fmt 2 +#define str_sq 3 +#define str_dq 4 + +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +int cmFortran_yylex_init (yyscan_t* scanner); + +int cmFortran_yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); + +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int cmFortran_yylex_destroy (yyscan_t yyscanner ); + +int cmFortran_yyget_debug (yyscan_t yyscanner ); + +void cmFortran_yyset_debug (int debug_flag ,yyscan_t yyscanner ); + +YY_EXTRA_TYPE cmFortran_yyget_extra (yyscan_t yyscanner ); + +void cmFortran_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); + +FILE *cmFortran_yyget_in (yyscan_t yyscanner ); + +void cmFortran_yyset_in (FILE * _in_str ,yyscan_t yyscanner ); + +FILE *cmFortran_yyget_out (yyscan_t yyscanner ); + +void cmFortran_yyset_out (FILE * _out_str ,yyscan_t yyscanner ); + + int cmFortran_yyget_leng (yyscan_t yyscanner ); + +char *cmFortran_yyget_text (yyscan_t yyscanner ); + +int cmFortran_yyget_lineno (yyscan_t yyscanner ); + +void cmFortran_yyset_lineno (int _line_number ,yyscan_t yyscanner ); + +int cmFortran_yyget_column (yyscan_t yyscanner ); + +void cmFortran_yyset_column (int _column_no ,yyscan_t yyscanner ); + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int cmFortran_yywrap (yyscan_t yyscanner ); +#else +extern int cmFortran_yywrap (yyscan_t yyscanner ); +#endif +#endif + +#ifndef yytext_ptr +static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); +#endif + +#ifndef YY_NO_INPUT + +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k */ +#define YY_READ_BUF_SIZE 16384 +#else +#define YY_READ_BUF_SIZE 8192 +#endif /* __ia64__ */ +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL_IS_OURS 1 + +extern int cmFortran_yylex (yyscan_t yyscanner); + +#define YY_DECL int cmFortran_yylex (yyscan_t yyscanner) +#endif /* !YY_DECL */ + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + +#undef YY_NEW_FILE +#undef YY_FLUSH_BUFFER +#undef yy_set_bol +#undef yy_new_buffer +#undef yy_set_interactive +#undef YY_DO_BEFORE_ACTION + +#ifdef YY_DECL_IS_OURS +#undef YY_DECL_IS_OURS +#undef YY_DECL +#endif + +#line 178 "cmFortranLexer.in.l" + + +#line 337 "cmFortranLexer.h" +#undef cmFortran_yyIN_HEADER +#endif /* cmFortran_yyHEADER_H */ diff --git a/Source/LexerParser/cmFortranLexer.in.l b/Source/LexerParser/cmFortranLexer.in.l new file mode 100644 index 0000000..1121210 --- /dev/null +++ b/Source/LexerParser/cmFortranLexer.in.l @@ -0,0 +1,186 @@ +%{ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +/*------------------------------------------------------------------------- + Portions of this source have been derived from makedepf90 version 2.8.8, + + Copyright (C) 2000--2006 Erik Edelmann + + The code was originally distributed under the GPL but permission + from the copyright holder has been obtained to distribute this + derived work under the CMake license. +-------------------------------------------------------------------------*/ + +/* + +This file must be translated to C++ and modified to build everywhere. + +Run flex >= 2.6 like this: + + flex -i --nounistd -DFLEXINT_H --prefix=cmFortran_yy --header-file=cmFortranLexer.h -ocmFortranLexer.cxx cmFortranLexer.in.l + +Modify cmFortranLexer.cxx: + - remove trailing whitespace: sed -i 's/\s*$//' cmFortranLexer.h cmFortranLexer.cxx + - remove blank lines at end of file + - #include "cmStandardLexer.h" at the top + - add cast in yy_scan_bytes for loop condition of _yybytes_len to size_t + +*/ + +/* IWYU pragma: no_forward_declare yyguts_t */ + +#undef YY_NO_UNPUT + +#define cmFortranLexer_cxx +#include "cmFortranParser.h" /* Interface to parser object. */ + +/* Replace the lexer input function. */ +#undef YY_INPUT +#define YY_INPUT(buf, result, max_size) \ + { result = cmFortranParser_Input(yyextra, buf, max_size); } + +/* Include the set of tokens from the parser. */ +#include "cmFortranParserTokens.h" + +/*--------------------------------------------------------------------------*/ +%} + + +%option reentrant +%option noyywrap +%pointer + +%s free_fmt fixed_fmt +%x str_sq str_dq + +%% + +\" { + cmFortranParser_StringStart(yyextra); + cmFortranParser_SetOldStartcond(yyextra, YY_START); + BEGIN(str_dq); +} + +' { + cmFortranParser_StringStart(yyextra); + cmFortranParser_SetOldStartcond(yyextra, YY_START); + BEGIN(str_sq); +} + +\" | +' { + BEGIN(cmFortranParser_GetOldStartcond(yyextra) ); + yylvalp->string = strdup(cmFortranParser_StringEnd(yyextra)); + return STRING; +} + +&[ \t]*\n | +&[ \t]*\n[ \t]*& /* Ignore (continued strings, free fmt) */ + +\n[ ]{5}[^ \t\n] { + if (cmFortranParser_GetOldStartcond(yyextra) == fixed_fmt) + ; /* Ignore (cont. strings, fixed fmt) */ + else + { + unput(yytext[strlen(yytext)-1]); + } +} + + +\n { + unput ('\n'); + BEGIN(INITIAL); + return UNTERMINATED_STRING; +} + +. { + cmFortranParser_StringAppend(yyextra, yytext[0]); +} + +!.*\n { return EOSTMT; } /* Treat comments like */ +^[cC*dD].*\n { return EOSTMT; } /* empty lines */ + +^[ \t]*#([ \t]*line)?[ \t]*[0-9]+[ \t]* { return CPP_LINE_DIRECTIVE; } +^[ \t]*#[ \t]*include[ \t]*<[^>]+> { + yytext[yyleng-1] = 0; + yylvalp->string = strdup(strchr(yytext, '<')+1); + return CPP_INCLUDE_ANGLE; +} +^[ \t]*#[ \t]*include { return CPP_INCLUDE; } +\$[ \t]*include { return F90PPR_INCLUDE; } +\?\?[ \t]*include { return COCO_INCLUDE; } + +^[ \t]*#[ \t]*define { return CPP_DEFINE; } +\$[ \t]*DEFINE { return F90PPR_DEFINE; } + +^[ \t]*#[ \t]*undef { return CPP_UNDEF; } +\$[ \t]*UNDEF { return F90PPR_UNDEF; } + +^[ \t]*#[ \t]*ifdef { return CPP_IFDEF; } +^[ \t]*#[ \t]*ifndef { return CPP_IFNDEF; } +^[ \t]*#[ \t]*if { return CPP_IF; } +^[ \t]*#[ \t]*elif { return CPP_ELIF; } +^[ \t]*#[ \t]*else { return CPP_ELSE; } +^[ \t]*#[ \t]*endif { return CPP_ENDIF; } + +$[ \t]*ifdef { return F90PPR_IFDEF; } +$[ \t]*ifndef { return F90PPR_IFNDEF; } +$[ \t]*if { return F90PPR_IF; } +$[ \t]*elif { return F90PPR_ELIF; } +$[ \t]*else { return F90PPR_ELSE; } +$[ \t]*endif { return F90PPR_ENDIF; } + + /* Line continuations, possible involving comments. */ +&([ \t\n]*|!.*)* +&([ \t\n]*|!.*)*& + +, { return COMMA; } + +:: { return DCOLON; } +: { return COLON; } + +\n[ ]{5}[^ ] { return GARBAGE; } + +=|=> { return ASSIGNMENT_OP; } + +[Ee][Nn][Dd] { return END; } +[Ii][Nn][Cc][Ll][Uu][Dd][Ee] { return INCLUDE; } +[Ii][Nn][Tt][Ee][Rr][Ff][Aa][Cc][Ee] { return INTERFACE; } +[Mm][Oo][Dd][Uu][Ll][Ee] { return MODULE; } +[Ss][Uu][bb][Mm][Oo][Dd][Uu][Ll][Ee] { return SUBMODULE; } +[Uu][Ss][Ee] { return USE; } + +[a-zA-Z_][a-zA-Z_0-9]* { + yylvalp->string = strdup(yytext); + return WORD; +} + +\( { return LPAREN; } +\) { return RPAREN; } + +[^ \t\n\r:;,!'"a-zA-Z=&()]+ { return GARBAGE; } + +;|\n { return EOSTMT; } + + +[ \t\r,] /* Ignore */ +\\[ \t]*\n /* Ignore line-endings preceded by \ */ + +. { return *yytext; } + +<> { + if(!cmFortranParser_FilePop(yyextra) ) + { + return YY_NULL; + } +} + +%% + +/*--------------------------------------------------------------------------*/ +YY_BUFFER_STATE cmFortranLexer_GetCurrentBuffer(yyscan_t yyscanner) +{ + /* Hack into the internal flex-generated scanner to get the buffer. */ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return YY_CURRENT_BUFFER; +} diff --git a/Source/LexerParser/cmFortranParser.cxx b/Source/LexerParser/cmFortranParser.cxx new file mode 100644 index 0000000..2b3452f --- /dev/null +++ b/Source/LexerParser/cmFortranParser.cxx @@ -0,0 +1,1988 @@ +/* A Bison parser, made by GNU Bison 3.0.4. */ + +/* Bison implementation for Yacc-like parsers in C + + Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* C LALR(1) parser skeleton written by Richard Stallman, by + simplifying the original so-called "semantic" parser. */ + +/* All symbols defined below should begin with yy or YY, to avoid + infringing on user name space. This should be done even for local + variables, as they might otherwise be expanded by user macros. + There are some unavoidable exceptions within include files to + define necessary library symbols; they are noted "INFRINGES ON + USER NAME SPACE" below. */ + +/* Identify Bison output. */ +#define YYBISON 1 + +/* Bison version. */ +#define YYBISON_VERSION "3.0.4" + +/* Skeleton name. */ +#define YYSKELETON_NAME "yacc.c" + +/* Pure parsers. */ +#define YYPURE 1 + +/* Push parsers. */ +#define YYPUSH 0 + +/* Pull parsers. */ +#define YYPULL 1 + + +/* Substitute the variable and function names. */ +#define yyparse cmFortran_yyparse +#define yylex cmFortran_yylex +#define yyerror cmFortran_yyerror +#define yydebug cmFortran_yydebug +#define yynerrs cmFortran_yynerrs + + +/* Copy the first part of user declarations. */ +#line 1 "cmFortranParser.y" /* yacc.c:339 */ + +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +/*------------------------------------------------------------------------- + Portions of this source have been derived from makedepf90 version 2.8.8, + + Copyright (C) 2000--2006 Erik Edelmann + + The code was originally distributed under the GPL but permission + from the copyright holder has been obtained to distribute this + derived work under the CMake license. +-------------------------------------------------------------------------*/ + +/* + +This file must be translated to C and modified to build everywhere. + +Run bison like this: + + bison --yacc --name-prefix=cmFortran_yy + --defines=cmFortranParserTokens.h + -ocmFortranParser.cxx + cmFortranParser.y + +Modify cmFortranParser.cxx: + - "#if 0" out yyerrorlab block in range ["goto yyerrlab1", "yyerrlab1:"] +*/ + +#include "cmConfigure.h" // IWYU pragma: keep + +#include "cmsys/String.h" +#include +#include + +/*-------------------------------------------------------------------------*/ +#define cmFortranParser_cxx +#include "cmFortranParser.h" /* Interface to parser object. */ +#include "cmFortranParserTokens.h" /* Need YYSTYPE for YY_DECL. */ + +/* Forward declare the lexer entry point. */ +YY_DECL; + +/* Helper function to forward error callback from parser. */ +static void cmFortran_yyerror(yyscan_t yyscanner, const char* message) +{ + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_Error(parser, message); +} + +/* Disable some warnings in the generated code. */ +#ifdef _MSC_VER +# pragma warning (disable: 4102) /* Unused goto label. */ +# pragma warning (disable: 4065) /* Switch contains default but no case. */ +# pragma warning (disable: 4701) /* Local variable may not be initialized. */ +# pragma warning (disable: 4702) /* Unreachable code. */ +# pragma warning (disable: 4127) /* Conditional expression is constant. */ +# pragma warning (disable: 4244) /* Conversion to smaller type, data loss. */ +#endif + +#line 132 "cmFortranParser.cxx" /* yacc.c:339 */ + +# ifndef YY_NULLPTR +# if defined __cplusplus && 201103L <= __cplusplus +# define YY_NULLPTR nullptr +# else +# define YY_NULLPTR 0 +# endif +# endif + +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 1 +#endif + +/* In a future release of Bison, this section will be replaced + by #include "cmFortranParserTokens.h". */ +#ifndef YY_CMFORTRAN_YY_CMFORTRANPARSERTOKENS_H_INCLUDED +# define YY_CMFORTRAN_YY_CMFORTRANPARSERTOKENS_H_INCLUDED +/* Debug traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif +#if YYDEBUG +extern int cmFortran_yydebug; +#endif + +/* Token type. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + enum yytokentype + { + EOSTMT = 258, + ASSIGNMENT_OP = 259, + GARBAGE = 260, + CPP_LINE_DIRECTIVE = 261, + CPP_INCLUDE = 262, + F90PPR_INCLUDE = 263, + COCO_INCLUDE = 264, + F90PPR_DEFINE = 265, + CPP_DEFINE = 266, + F90PPR_UNDEF = 267, + CPP_UNDEF = 268, + CPP_IFDEF = 269, + CPP_IFNDEF = 270, + CPP_IF = 271, + CPP_ELSE = 272, + CPP_ELIF = 273, + CPP_ENDIF = 274, + F90PPR_IFDEF = 275, + F90PPR_IFNDEF = 276, + F90PPR_IF = 277, + F90PPR_ELSE = 278, + F90PPR_ELIF = 279, + F90PPR_ENDIF = 280, + COMMA = 281, + COLON = 282, + DCOLON = 283, + LPAREN = 284, + RPAREN = 285, + UNTERMINATED_STRING = 286, + STRING = 287, + WORD = 288, + CPP_INCLUDE_ANGLE = 289, + END = 290, + INCLUDE = 291, + INTERFACE = 292, + MODULE = 293, + SUBMODULE = 294, + USE = 295 + }; +#endif +/* Tokens. */ +#define EOSTMT 258 +#define ASSIGNMENT_OP 259 +#define GARBAGE 260 +#define CPP_LINE_DIRECTIVE 261 +#define CPP_INCLUDE 262 +#define F90PPR_INCLUDE 263 +#define COCO_INCLUDE 264 +#define F90PPR_DEFINE 265 +#define CPP_DEFINE 266 +#define F90PPR_UNDEF 267 +#define CPP_UNDEF 268 +#define CPP_IFDEF 269 +#define CPP_IFNDEF 270 +#define CPP_IF 271 +#define CPP_ELSE 272 +#define CPP_ELIF 273 +#define CPP_ENDIF 274 +#define F90PPR_IFDEF 275 +#define F90PPR_IFNDEF 276 +#define F90PPR_IF 277 +#define F90PPR_ELSE 278 +#define F90PPR_ELIF 279 +#define F90PPR_ENDIF 280 +#define COMMA 281 +#define COLON 282 +#define DCOLON 283 +#define LPAREN 284 +#define RPAREN 285 +#define UNTERMINATED_STRING 286 +#define STRING 287 +#define WORD 288 +#define CPP_INCLUDE_ANGLE 289 +#define END 290 +#define INCLUDE 291 +#define INTERFACE 292 +#define MODULE 293 +#define SUBMODULE 294 +#define USE 295 + +/* Value type. */ +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED + +union YYSTYPE +{ +#line 70 "cmFortranParser.y" /* yacc.c:355 */ + + char* string; + +#line 256 "cmFortranParser.cxx" /* yacc.c:355 */ +}; + +typedef union YYSTYPE YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 +# define YYSTYPE_IS_DECLARED 1 +#endif + + + +int cmFortran_yyparse (yyscan_t yyscanner); + +#endif /* !YY_CMFORTRAN_YY_CMFORTRANPARSERTOKENS_H_INCLUDED */ + +/* Copy the second part of user declarations. */ + +#line 272 "cmFortranParser.cxx" /* yacc.c:358 */ + +#ifdef short +# undef short +#endif + +#ifdef YYTYPE_UINT8 +typedef YYTYPE_UINT8 yytype_uint8; +#else +typedef unsigned char yytype_uint8; +#endif + +#ifdef YYTYPE_INT8 +typedef YYTYPE_INT8 yytype_int8; +#else +typedef signed char yytype_int8; +#endif + +#ifdef YYTYPE_UINT16 +typedef YYTYPE_UINT16 yytype_uint16; +#else +typedef unsigned short int yytype_uint16; +#endif + +#ifdef YYTYPE_INT16 +typedef YYTYPE_INT16 yytype_int16; +#else +typedef short int yytype_int16; +#endif + +#ifndef YYSIZE_T +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif ! defined YYSIZE_T +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned int +# endif +#endif + +#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) + +#ifndef YY_ +# if defined YYENABLE_NLS && YYENABLE_NLS +# if ENABLE_NLS +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_(Msgid) dgettext ("bison-runtime", Msgid) +# endif +# endif +# ifndef YY_ +# define YY_(Msgid) Msgid +# endif +#endif + +#ifndef YY_ATTRIBUTE +# if (defined __GNUC__ \ + && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ + || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C +# define YY_ATTRIBUTE(Spec) __attribute__(Spec) +# else +# define YY_ATTRIBUTE(Spec) /* empty */ +# endif +#endif + +#ifndef YY_ATTRIBUTE_PURE +# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) +#endif + +#ifndef YY_ATTRIBUTE_UNUSED +# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) +#endif + +#if !defined _Noreturn \ + && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) +# if defined _MSC_VER && 1200 <= _MSC_VER +# define _Noreturn __declspec (noreturn) +# else +# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) +# endif +#endif + +/* Suppress unused-variable warnings by "using" E. */ +#if ! defined lint || defined __GNUC__ +# define YYUSE(E) ((void) (E)) +#else +# define YYUSE(E) /* empty */ +#endif + +#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ +/* Suppress an incorrect diagnostic about yylval being uninitialized. */ +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") +#else +# define YY_INITIAL_VALUE(Value) Value +#endif +#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END +#endif +#ifndef YY_INITIAL_VALUE +# define YY_INITIAL_VALUE(Value) /* Nothing. */ +#endif + + +#if ! defined yyoverflow || YYERROR_VERBOSE + +/* The parser invokes alloca or malloc; define the necessary symbols. */ + +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# elif defined __BUILTIN_VA_ARG_INCR +# include /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca +# else +# define YYSTACK_ALLOC alloca +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS +# include /* INFRINGES ON USER NAME SPACE */ + /* Use EXIT_SUCCESS as a witness for stdlib.h. */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's 'empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +# endif +# else +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined EXIT_SUCCESS \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined EXIT_SUCCESS +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined EXIT_SUCCESS +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# endif +#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ + + +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + +/* A type that is properly aligned for any stack member. */ +union yyalloc +{ + yytype_int16 yyss_alloc; + YYSTYPE yyvs_alloc; +}; + +/* The size of the maximum gap between one aligned stack and the next. */ +# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) + +/* The size of an array large to enough to hold all stacks, each with + N elements. */ +# define YYSTACK_BYTES(N) \ + ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + + YYSTACK_GAP_MAXIMUM) + +# define YYCOPY_NEEDED 1 + +/* Relocate STACK from its old location to the new one. The + local variables YYSIZE and YYSTACKSIZE give the old and new number of + elements in the stack, and YYPTR gives the new location of the + stack. Advance YYPTR to a properly aligned location for the next + stack. */ +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (0) + +#endif + +#if defined YYCOPY_NEEDED && YYCOPY_NEEDED +/* Copy COUNT objects from SRC to DST. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(Dst, Src, Count) \ + __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) +# else +# define YYCOPY(Dst, Src, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (Dst)[yyi] = (Src)[yyi]; \ + } \ + while (0) +# endif +# endif +#endif /* !YYCOPY_NEEDED */ + +/* YYFINAL -- State number of the termination state. */ +#define YYFINAL 2 +/* YYLAST -- Last index in YYTABLE. */ +#define YYLAST 593 + +/* YYNTOKENS -- Number of terminals. */ +#define YYNTOKENS 41 +/* YYNNTS -- Number of nonterminals. */ +#define YYNNTS 14 +/* YYNRULES -- Number of rules. */ +#define YYNRULES 63 +/* YYNSTATES -- Number of states. */ +#define YYNSTATES 126 + +/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned + by yylex, with out-of-bounds checking. */ +#define YYUNDEFTOK 2 +#define YYMAXUTOK 295 + +#define YYTRANSLATE(YYX) \ + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) + +/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM + as returned by yylex, without out-of-bounds checking. */ +static const yytype_uint8 yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40 +}; + +#if YYDEBUG + /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ +static const yytype_uint8 yyrline[] = +{ + 0, 98, 98, 98, 101, 105, 110, 119, 125, 132, + 137, 141, 146, 154, 159, 164, 169, 174, 179, 184, + 189, 194, 198, 202, 206, 210, 211, 216, 216, 216, + 217, 217, 218, 218, 219, 219, 220, 220, 221, 221, + 222, 222, 223, 223, 224, 224, 225, 225, 228, 229, + 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243 +}; +#endif + +#if YYDEBUG || YYERROR_VERBOSE || 1 +/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ +static const char *const yytname[] = +{ + "$end", "error", "$undefined", "EOSTMT", "ASSIGNMENT_OP", "GARBAGE", + "CPP_LINE_DIRECTIVE", "CPP_INCLUDE", "F90PPR_INCLUDE", "COCO_INCLUDE", + "F90PPR_DEFINE", "CPP_DEFINE", "F90PPR_UNDEF", "CPP_UNDEF", "CPP_IFDEF", + "CPP_IFNDEF", "CPP_IF", "CPP_ELSE", "CPP_ELIF", "CPP_ENDIF", + "F90PPR_IFDEF", "F90PPR_IFNDEF", "F90PPR_IF", "F90PPR_ELSE", + "F90PPR_ELIF", "F90PPR_ENDIF", "COMMA", "COLON", "DCOLON", "LPAREN", + "RPAREN", "UNTERMINATED_STRING", "STRING", "WORD", "CPP_INCLUDE_ANGLE", + "END", "INCLUDE", "INTERFACE", "MODULE", "SUBMODULE", "USE", "$accept", + "code", "stmt", "include", "define", "undef", "ifdef", "ifndef", "if", + "elif", "else", "endif", "other", "misc_code", YY_NULLPTR +}; +#endif + +# ifdef YYPRINT +/* YYTOKNUM[NUM] -- (External) token number corresponding to the + (internal) symbol number NUM (which must be that of a token). */ +static const yytype_uint16 yytoknum[] = +{ + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295 +}; +# endif + +#define YYPACT_NINF -39 + +#define yypact_value_is_default(Yystate) \ + (!!((Yystate) == (-39))) + +#define YYTABLE_NINF -1 + +#define yytable_value_is_error(Yytable_value) \ + 0 + + /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +static const yytype_int16 yypact[] = +{ + -39, 21, -39, 1, -39, -20, -39, -39, -39, -39, + -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, + -39, -39, -39, -39, -39, -39, -24, -18, 20, -8, + -3, 39, -39, 15, 16, 18, 19, 33, -39, -39, + -39, -39, -39, -39, 59, -39, -39, -39, -39, -39, + 35, 36, 37, -39, -39, -39, -39, -39, -39, 76, + 114, 129, 167, 182, -39, -39, -39, -39, -39, -39, + -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, + -39, -39, 220, 235, 273, 288, -21, 26, -39, 326, + 341, 379, 394, 432, 447, -39, -39, -39, -39, -39, + -39, -39, -39, -39, 38, 40, 41, 485, -39, -39, + -39, -39, -39, -39, 45, -39, -39, -39, 43, 500, + 538, -39, -39, -39, 553, -39 +}; + + /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE does not specify something else to do. Zero + means the default is an error. */ +static const yytype_uint8 yydefact[] = +{ + 2, 0, 1, 0, 25, 0, 27, 28, 29, 31, + 30, 33, 32, 34, 36, 38, 42, 40, 44, 35, + 37, 39, 43, 41, 45, 46, 0, 0, 0, 0, + 0, 0, 3, 0, 0, 0, 0, 0, 46, 46, + 46, 46, 26, 46, 0, 46, 46, 4, 46, 46, + 0, 0, 0, 46, 46, 46, 46, 46, 46, 0, + 0, 0, 0, 0, 15, 57, 56, 62, 58, 59, + 60, 61, 63, 55, 48, 49, 50, 51, 52, 53, + 54, 47, 0, 0, 0, 0, 0, 0, 46, 0, + 0, 0, 0, 0, 0, 21, 22, 23, 24, 14, + 10, 13, 9, 6, 0, 0, 0, 0, 5, 16, + 17, 18, 19, 20, 0, 46, 46, 11, 0, 0, + 0, 46, 7, 12, 0, 8 +}; + + /* YYPGOTO[NTERM-NUM]. */ +static const yytype_int8 yypgoto[] = +{ + -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, + -39, -39, -38, -39 +}; + + /* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int8 yydefgoto[] = +{ + -1, 1, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 44, 81 +}; + + /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule whose + number is the opposite. If YYTABLE_NINF, syntax error. */ +static const yytype_uint8 yytable[] = +{ + 59, 60, 61, 62, 42, 63, 104, 82, 83, 105, + 84, 85, 43, 45, 46, 89, 90, 91, 92, 93, + 94, 2, 3, 47, 4, 49, 50, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 54, 0, 55, + 107, 56, 57, 48, 106, 25, 26, 27, 28, 29, + 30, 31, 64, 65, 66, 51, 58, 52, 86, 87, + 88, 114, 53, 115, 116, 118, 121, 119, 120, 95, + 65, 66, 0, 124, 0, 67, 68, 69, 70, 71, + 72, 73, 74, 0, 75, 76, 77, 78, 79, 80, + 0, 0, 67, 68, 69, 70, 71, 72, 73, 74, + 0, 75, 76, 77, 78, 79, 80, 96, 65, 66, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 97, 65, 66, 0, 0, 0, 0, 0, + 67, 68, 69, 70, 71, 72, 73, 74, 0, 75, + 76, 77, 78, 79, 80, 67, 68, 69, 70, 71, + 72, 73, 74, 0, 75, 76, 77, 78, 79, 80, + 98, 65, 66, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 99, 65, 66, 0, 0, + 0, 0, 0, 67, 68, 69, 70, 71, 72, 73, + 74, 0, 75, 76, 77, 78, 79, 80, 67, 68, + 69, 70, 71, 72, 73, 74, 0, 75, 76, 77, + 78, 79, 80, 100, 65, 66, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 101, 65, + 66, 0, 0, 0, 0, 0, 67, 68, 69, 70, + 71, 72, 73, 74, 0, 75, 76, 77, 78, 79, + 80, 67, 68, 69, 70, 71, 72, 73, 74, 0, + 75, 76, 77, 78, 79, 80, 102, 65, 66, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 103, 65, 66, 0, 0, 0, 0, 0, 67, + 68, 69, 70, 71, 72, 73, 74, 0, 75, 76, + 77, 78, 79, 80, 67, 68, 69, 70, 71, 72, + 73, 74, 0, 75, 76, 77, 78, 79, 80, 108, + 65, 66, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 109, 65, 66, 0, 0, 0, + 0, 0, 67, 68, 69, 70, 71, 72, 73, 74, + 0, 75, 76, 77, 78, 79, 80, 67, 68, 69, + 70, 71, 72, 73, 74, 0, 75, 76, 77, 78, + 79, 80, 110, 65, 66, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 111, 65, 66, + 0, 0, 0, 0, 0, 67, 68, 69, 70, 71, + 72, 73, 74, 0, 75, 76, 77, 78, 79, 80, + 67, 68, 69, 70, 71, 72, 73, 74, 0, 75, + 76, 77, 78, 79, 80, 112, 65, 66, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 113, 65, 66, 0, 0, 0, 0, 0, 67, 68, + 69, 70, 71, 72, 73, 74, 0, 75, 76, 77, + 78, 79, 80, 67, 68, 69, 70, 71, 72, 73, + 74, 0, 75, 76, 77, 78, 79, 80, 117, 65, + 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 122, 65, 66, 0, 0, 0, 0, + 0, 67, 68, 69, 70, 71, 72, 73, 74, 0, + 75, 76, 77, 78, 79, 80, 67, 68, 69, 70, + 71, 72, 73, 74, 0, 75, 76, 77, 78, 79, + 80, 123, 65, 66, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 125, 65, 66, 0, + 0, 0, 0, 0, 67, 68, 69, 70, 71, 72, + 73, 74, 0, 75, 76, 77, 78, 79, 80, 67, + 68, 69, 70, 71, 72, 73, 74, 0, 75, 76, + 77, 78, 79, 80 +}; + +static const yytype_int8 yycheck[] = +{ + 38, 39, 40, 41, 3, 43, 27, 45, 46, 30, + 48, 49, 32, 37, 32, 53, 54, 55, 56, 57, + 58, 0, 1, 3, 3, 33, 29, 6, 7, 8, + 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 24, 25, 32, -1, 33, + 88, 33, 33, 33, 28, 34, 35, 36, 37, 38, + 39, 40, 3, 4, 5, 26, 33, 28, 33, 33, + 33, 33, 33, 33, 33, 30, 33, 115, 116, 3, + 4, 5, -1, 121, -1, 26, 27, 28, 29, 30, + 31, 32, 33, -1, 35, 36, 37, 38, 39, 40, + -1, -1, 26, 27, 28, 29, 30, 31, 32, 33, + -1, 35, 36, 37, 38, 39, 40, 3, 4, 5, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 3, 4, 5, -1, -1, -1, -1, -1, + 26, 27, 28, 29, 30, 31, 32, 33, -1, 35, + 36, 37, 38, 39, 40, 26, 27, 28, 29, 30, + 31, 32, 33, -1, 35, 36, 37, 38, 39, 40, + 3, 4, 5, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 3, 4, 5, -1, -1, + -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, + 33, -1, 35, 36, 37, 38, 39, 40, 26, 27, + 28, 29, 30, 31, 32, 33, -1, 35, 36, 37, + 38, 39, 40, 3, 4, 5, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 3, 4, + 5, -1, -1, -1, -1, -1, 26, 27, 28, 29, + 30, 31, 32, 33, -1, 35, 36, 37, 38, 39, + 40, 26, 27, 28, 29, 30, 31, 32, 33, -1, + 35, 36, 37, 38, 39, 40, 3, 4, 5, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 3, 4, 5, -1, -1, -1, -1, -1, 26, + 27, 28, 29, 30, 31, 32, 33, -1, 35, 36, + 37, 38, 39, 40, 26, 27, 28, 29, 30, 31, + 32, 33, -1, 35, 36, 37, 38, 39, 40, 3, + 4, 5, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 3, 4, 5, -1, -1, -1, + -1, -1, 26, 27, 28, 29, 30, 31, 32, 33, + -1, 35, 36, 37, 38, 39, 40, 26, 27, 28, + 29, 30, 31, 32, 33, -1, 35, 36, 37, 38, + 39, 40, 3, 4, 5, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 3, 4, 5, + -1, -1, -1, -1, -1, 26, 27, 28, 29, 30, + 31, 32, 33, -1, 35, 36, 37, 38, 39, 40, + 26, 27, 28, 29, 30, 31, 32, 33, -1, 35, + 36, 37, 38, 39, 40, 3, 4, 5, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 3, 4, 5, -1, -1, -1, -1, -1, 26, 27, + 28, 29, 30, 31, 32, 33, -1, 35, 36, 37, + 38, 39, 40, 26, 27, 28, 29, 30, 31, 32, + 33, -1, 35, 36, 37, 38, 39, 40, 3, 4, + 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 3, 4, 5, -1, -1, -1, -1, + -1, 26, 27, 28, 29, 30, 31, 32, 33, -1, + 35, 36, 37, 38, 39, 40, 26, 27, 28, 29, + 30, 31, 32, 33, -1, 35, 36, 37, 38, 39, + 40, 3, 4, 5, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 3, 4, 5, -1, + -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, + 32, 33, -1, 35, 36, 37, 38, 39, 40, 26, + 27, 28, 29, 30, 31, 32, 33, -1, 35, 36, + 37, 38, 39, 40 +}; + + /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ +static const yytype_uint8 yystos[] = +{ + 0, 42, 0, 1, 3, 6, 7, 8, 9, 10, + 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, + 21, 22, 23, 24, 25, 34, 35, 36, 37, 38, + 39, 40, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 3, 32, 53, 37, 32, 3, 33, 33, + 29, 26, 28, 33, 32, 33, 33, 33, 33, 53, + 53, 53, 53, 53, 3, 4, 5, 26, 27, 28, + 29, 30, 31, 32, 33, 35, 36, 37, 38, 39, + 40, 54, 53, 53, 53, 53, 33, 33, 33, 53, + 53, 53, 53, 53, 53, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 27, 30, 28, 53, 3, 3, + 3, 3, 3, 3, 33, 33, 33, 3, 30, 53, + 53, 33, 3, 3, 53, 3 +}; + + /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint8 yyr1[] = +{ + 0, 41, 42, 42, 43, 43, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 44, 44, 44, + 45, 45, 46, 46, 47, 47, 48, 48, 49, 49, + 50, 50, 51, 51, 52, 52, 53, 53, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54 +}; + + /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = +{ + 0, 2, 0, 2, 2, 4, 4, 7, 9, 4, + 4, 5, 7, 4, 4, 3, 4, 4, 4, 4, + 4, 3, 3, 3, 3, 1, 2, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 0, 2, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1 +}; + + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab + + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } \ + else \ + { \ + yyerror (yyscanner, YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ +while (0) + +/* Error token number */ +#define YYTERROR 1 +#define YYERRCODE 256 + + + +/* Enable debugging if requested. */ +#if YYDEBUG + +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) + +/* This macro is provided for backward compatibility. */ +#ifndef YY_LOCATION_PRINT +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +#endif + + +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value, yyscanner); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) + + +/*----------------------------------------. +| Print this symbol's value on YYOUTPUT. | +`----------------------------------------*/ + +static void +yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, yyscan_t yyscanner) +{ + FILE *yyo = yyoutput; + YYUSE (yyo); + YYUSE (yyscanner); + if (!yyvaluep) + return; +# ifdef YYPRINT + if (yytype < YYNTOKENS) + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# endif + YYUSE (yytype); +} + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +static void +yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, yyscan_t yyscanner) +{ + YYFPRINTF (yyoutput, "%s %s (", + yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); + + yy_symbol_value_print (yyoutput, yytype, yyvaluep, yyscanner); + YYFPRINTF (yyoutput, ")"); +} + +/*------------------------------------------------------------------. +| yy_stack_print -- Print the state stack from its BOTTOM up to its | +| TOP (included). | +`------------------------------------------------------------------*/ + +static void +yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) +{ + YYFPRINTF (stderr, "Stack now"); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } + YYFPRINTF (stderr, "\n"); +} + +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (0) + + +/*------------------------------------------------. +| Report that the YYRULE is going to be reduced. | +`------------------------------------------------*/ + +static void +yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule, yyscan_t yyscanner) +{ + unsigned long int yylno = yyrline[yyrule]; + int yynrhs = yyr2[yyrule]; + int yyi; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", + yyrule - 1, yylno); + /* The symbols being reduced. */ + for (yyi = 0; yyi < yynrhs; yyi++) + { + YYFPRINTF (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, + yystos[yyssp[yyi + 1 - yynrhs]], + &(yyvsp[(yyi + 1) - (yynrhs)]) + , yyscanner); + YYFPRINTF (stderr, "\n"); + } +} + +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyssp, yyvsp, Rule, yyscanner); \ +} while (0) + +/* Nonzero means print parse trace. It is left uninitialized so that + multiple parsers can coexist. */ +int yydebug; +#else /* !YYDEBUG */ +# define YYDPRINTF(Args) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) +#endif /* !YYDEBUG */ + + +/* YYINITDEPTH -- initial size of the parser's stacks. */ +#ifndef YYINITDEPTH +# define YYINITDEPTH 200 +#endif + +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only + if the built-in stack extension method is used). + + Do not make this value too large; the results are undefined if + YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) + evaluated with infinite-precision integer arithmetic. */ + +#ifndef YYMAXDEPTH +# define YYMAXDEPTH 10000 +#endif + + +#if YYERROR_VERBOSE + +# ifndef yystrlen +# if defined __GLIBC__ && defined _STRING_H +# define yystrlen strlen +# else +/* Return the length of YYSTR. */ +static YYSIZE_T +yystrlen (const char *yystr) +{ + YYSIZE_T yylen; + for (yylen = 0; yystr[yylen]; yylen++) + continue; + return yylen; +} +# endif +# endif + +# ifndef yystpcpy +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# define yystpcpy stpcpy +# else +/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in + YYDEST. */ +static char * +yystpcpy (char *yydest, const char *yysrc) +{ + char *yyd = yydest; + const char *yys = yysrc; + + while ((*yyd++ = *yys++) != '\0') + continue; + + return yyd - 1; +} +# endif +# endif + +# ifndef yytnamerr +/* Copy to YYRES the contents of YYSTR after stripping away unnecessary + quotes and backslashes, so that it's suitable for yyerror. The + heuristic is that double-quoting is unnecessary unless the string + contains an apostrophe, a comma, or backslash (other than + backslash-backslash). YYSTR is taken from yytname. If YYRES is + null, do not copy; instead, return the length of what the result + would have been. */ +static YYSIZE_T +yytnamerr (char *yyres, const char *yystr) +{ + if (*yystr == '"') + { + YYSIZE_T yyn = 0; + char const *yyp = yystr; + + for (;;) + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } + + if (! yyres) + return yystrlen (yystr); + + return yystpcpy (yyres, yystr) - yyres; +} +# endif + +/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message + about the unexpected token YYTOKEN for the state stack whose top is + YYSSP. + + Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is + not large enough to hold the message. In that case, also set + *YYMSG_ALLOC to the required number of bytes. Return 2 if the + required number of bytes is too large to store. */ +static int +yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, + yytype_int16 *yyssp, int yytoken) +{ + YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); + YYSIZE_T yysize = yysize0; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + /* Internationalized format string. */ + const char *yyformat = YY_NULLPTR; + /* Arguments of yyformat. */ + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + /* Number of reported tokens (one for the "unexpected", one per + "expected"). */ + int yycount = 0; + + /* There are many possibilities here to consider: + - If this state is a consistent state with a default action, then + the only way this function was invoked is if the default action + is an error action. In that case, don't check for expected + tokens because there are none. + - The only way there can be no lookahead present (in yychar) is if + this state is a consistent state with a default action. Thus, + detecting the absence of a lookahead is sufficient to determine + that there is no unexpected or expected token to report. In that + case, just report a simple "syntax error". + - Don't assume there isn't a lookahead just because this state is a + consistent state with a default action. There might have been a + previous inconsistent state, consistent state with a non-default + action, or user semantic action that manipulated yychar. + - Of course, the expected token list depends on states to have + correct lookahead information, and it depends on the parser not + to perform extra reductions after fetching a lookahead from the + scanner and before detecting a syntax error. Thus, state merging + (from LALR or IELR) and default reductions corrupt the expected + token list. However, the list is correct for canonical LR with + one exception: it will still contain any token that will not be + accepted due to an error action in a later state. + */ + if (yytoken != YYEMPTY) + { + int yyn = yypact[*yyssp]; + yyarg[yycount++] = yytname[yytoken]; + if (!yypact_value_is_default (yyn)) + { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR + && !yytable_value_is_error (yytable[yyx + yyn])) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + break; + } + yyarg[yycount++] = yytname[yyx]; + { + YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); + if (! (yysize <= yysize1 + && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } + } + } + } + + switch (yycount) + { +# define YYCASE_(N, S) \ + case N: \ + yyformat = S; \ + break + YYCASE_(0, YY_("syntax error")); + YYCASE_(1, YY_("syntax error, unexpected %s")); + YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); + YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); + YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); + YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); +# undef YYCASE_ + } + + { + YYSIZE_T yysize1 = yysize + yystrlen (yyformat); + if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } + + if (*yymsg_alloc < yysize) + { + *yymsg_alloc = 2 * yysize; + if (! (yysize <= *yymsg_alloc + && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) + *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; + return 1; + } + + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + { + char *yyp = *yymsg; + int yyi = 0; + while ((*yyp = *yyformat) != '\0') + if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyformat += 2; + } + else + { + yyp++; + yyformat++; + } + } + return 0; +} +#endif /* YYERROR_VERBOSE */ + +/*-----------------------------------------------. +| Release the memory associated to this symbol. | +`-----------------------------------------------*/ + +static void +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, yyscan_t yyscanner) +{ + YYUSE (yyvaluep); + YYUSE (yyscanner); + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + YYUSE (yytype); + YY_IGNORE_MAYBE_UNINITIALIZED_END +} + + + + +/*----------. +| yyparse. | +`----------*/ + +int +yyparse (yyscan_t yyscanner) +{ +/* The lookahead symbol. */ +int yychar; + + +/* The semantic value of the lookahead symbol. */ +/* Default value used for initialization, for pacifying older GCCs + or non-GCC compilers. */ +YY_INITIAL_VALUE (static YYSTYPE yyval_default;) +YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); + + /* Number of syntax errors so far. */ + int yynerrs; + + int yystate; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + + /* The stacks and their tools: + 'yyss': related to states. + 'yyvs': related to semantic values. + + Refer to the stacks through separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss; + yytype_int16 *yyssp; + + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs; + YYSTYPE *yyvsp; + + YYSIZE_T yystacksize; + + int yyn; + int yyresult; + /* Lookahead token as an internal (translated) token number. */ + int yytoken = 0; + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; + +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) + + /* The number of symbols on the RHS of the reduced rule. + Keep to zero when no symbol should be popped. */ + int yylen = 0; + + yyssp = yyss = yyssa; + yyvsp = yyvs = yyvsa; + yystacksize = YYINITDEPTH; + + YYDPRINTF ((stderr, "Starting parse\n")); + + yystate = 0; + yyerrstatus = 0; + yynerrs = 0; + yychar = YYEMPTY; /* Cause a token to be read. */ + goto yysetstate; + +/*------------------------------------------------------------. +| yynewstate -- Push a new state, which is found in yystate. | +`------------------------------------------------------------*/ + yynewstate: + /* In all cases, when you get here, the value and location stacks + have just been pushed. So pushing a state here evens the stacks. */ + yyssp++; + + yysetstate: + *yyssp = yystate; + + if (yyss + yystacksize - 1 <= yyssp) + { + /* Get the current used size of the three stacks, in elements. */ + YYSIZE_T yysize = yyssp - yyss + 1; + +#ifdef yyoverflow + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + &yystacksize); + + yyss = yyss1; + yyvs = yyvs1; + } +#else /* no yyoverflow */ +# ifndef YYSTACK_RELOCATE + goto yyexhaustedlab; +# else + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) + goto yyexhaustedlab; + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif +#endif /* no yyoverflow */ + + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + + YYDPRINTF ((stderr, "Stack size increased to %lu\n", + (unsigned long int) yystacksize)); + + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } + + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + + if (yystate == YYFINAL) + YYACCEPT; + + goto yybackup; + +/*-----------. +| yybackup. | +`-----------*/ +yybackup: + + /* Do appropriate processing given the current state. Read a + lookahead token if we need one and don't already have one. */ + + /* First try to decide what to do without reference to lookahead token. */ + yyn = yypact[yystate]; + if (yypact_value_is_default (yyn)) + goto yydefault; + + /* Not known => get a lookahead token if don't already have one. */ + + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + if (yychar == YYEMPTY) + { + YYDPRINTF ((stderr, "Reading a token: ")); + yychar = yylex (&yylval, yyscanner); + } + + if (yychar <= YYEOF) + { + yychar = yytoken = YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); + } + else + { + yytoken = YYTRANSLATE (yychar); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); + } + + /* If the proper action on seeing token YYTOKEN is to reduce or to + detect an error, take that action. */ + yyn += yytoken; + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) + goto yydefault; + yyn = yytable[yyn]; + if (yyn <= 0) + { + if (yytable_value_is_error (yyn)) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } + + /* Count tokens shifted since error; after three, turn off error + status. */ + if (yyerrstatus) + yyerrstatus--; + + /* Shift the lookahead token. */ + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + + /* Discard the shifted token. */ + yychar = YYEMPTY; + + yystate = yyn; + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END + + goto yynewstate; + + +/*-----------------------------------------------------------. +| yydefault -- do the default action for the current state. | +`-----------------------------------------------------------*/ +yydefault: + yyn = yydefact[yystate]; + if (yyn == 0) + goto yyerrlab; + goto yyreduce; + + +/*-----------------------------. +| yyreduce -- Do a reduction. | +`-----------------------------*/ +yyreduce: + /* yyn is the number of a rule to reduce with. */ + yylen = yyr2[yyn]; + + /* If YYLEN is nonzero, implement the default value of the action: + '$$ = $1'. + + Otherwise, the following line sets YYVAL to garbage. + This behavior is undocumented and Bison + users should not rely upon it. Assigning to YYVAL + unconditionally makes the parser a bit smaller, and it avoids a + GCC warning that YYVAL may be used uninitialized. */ + yyval = yyvsp[1-yylen]; + + + YY_REDUCE_PRINT (yyn); + switch (yyn) + { + case 4: +#line 101 "cmFortranParser.y" /* yacc.c:1646 */ + { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_SetInInterface(parser, true); + } +#line 1536 "cmFortranParser.cxx" /* yacc.c:1646 */ + break; + + case 5: +#line 105 "cmFortranParser.y" /* yacc.c:1646 */ + { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_RuleUse(parser, (yyvsp[-2].string)); + free((yyvsp[-2].string)); + } +#line 1546 "cmFortranParser.cxx" /* yacc.c:1646 */ + break; + + case 6: +#line 110 "cmFortranParser.y" /* yacc.c:1646 */ + { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + if (cmsysString_strcasecmp((yyvsp[-2].string), "function") != 0 && + cmsysString_strcasecmp((yyvsp[-2].string), "procedure") != 0 && + cmsysString_strcasecmp((yyvsp[-2].string), "subroutine") != 0) { + cmFortranParser_RuleModule(parser, (yyvsp[-2].string)); + } + free((yyvsp[-2].string)); + } +#line 1560 "cmFortranParser.cxx" /* yacc.c:1646 */ + break; + + case 7: +#line 119 "cmFortranParser.y" /* yacc.c:1646 */ + { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_RuleUse(parser, (yyvsp[-4].string)); + free((yyvsp[-4].string)); + free((yyvsp[-2].string)); + } +#line 1571 "cmFortranParser.cxx" /* yacc.c:1646 */ + break; + + case 8: +#line 125 "cmFortranParser.y" /* yacc.c:1646 */ + { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_RuleUse(parser, (yyvsp[-6].string)); + free((yyvsp[-6].string)); + free((yyvsp[-4].string)); + free((yyvsp[-2].string)); + } +#line 1583 "cmFortranParser.cxx" /* yacc.c:1646 */ + break; + + case 9: +#line 132 "cmFortranParser.y" /* yacc.c:1646 */ + { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_SetInInterface(parser, true); + free((yyvsp[-2].string)); + } +#line 1593 "cmFortranParser.cxx" /* yacc.c:1646 */ + break; + + case 10: +#line 137 "cmFortranParser.y" /* yacc.c:1646 */ + { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_SetInInterface(parser, false); + } +#line 1602 "cmFortranParser.cxx" /* yacc.c:1646 */ + break; + + case 11: +#line 141 "cmFortranParser.y" /* yacc.c:1646 */ + { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_RuleUse(parser, (yyvsp[-2].string)); + free((yyvsp[-2].string)); + } +#line 1612 "cmFortranParser.cxx" /* yacc.c:1646 */ + break; + + case 12: +#line 146 "cmFortranParser.y" /* yacc.c:1646 */ + { + if (cmsysString_strcasecmp((yyvsp[-4].string), "non_intrinsic") == 0) { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_RuleUse(parser, (yyvsp[-2].string)); + } + free((yyvsp[-4].string)); + free((yyvsp[-2].string)); + } +#line 1625 "cmFortranParser.cxx" /* yacc.c:1646 */ + break; + + case 13: +#line 154 "cmFortranParser.y" /* yacc.c:1646 */ + { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_RuleInclude(parser, (yyvsp[-2].string)); + free((yyvsp[-2].string)); + } +#line 1635 "cmFortranParser.cxx" /* yacc.c:1646 */ + break; + + case 14: +#line 159 "cmFortranParser.y" /* yacc.c:1646 */ + { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_RuleLineDirective(parser, (yyvsp[-2].string)); + free((yyvsp[-2].string)); + } +#line 1645 "cmFortranParser.cxx" /* yacc.c:1646 */ + break; + + case 15: +#line 164 "cmFortranParser.y" /* yacc.c:1646 */ + { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_RuleInclude(parser, (yyvsp[-2].string)); + free((yyvsp[-2].string)); + } +#line 1655 "cmFortranParser.cxx" /* yacc.c:1646 */ + break; + + case 16: +#line 169 "cmFortranParser.y" /* yacc.c:1646 */ + { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_RuleInclude(parser, (yyvsp[-2].string)); + free((yyvsp[-2].string)); + } +#line 1665 "cmFortranParser.cxx" /* yacc.c:1646 */ + break; + + case 17: +#line 174 "cmFortranParser.y" /* yacc.c:1646 */ + { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_RuleDefine(parser, (yyvsp[-2].string)); + free((yyvsp[-2].string)); + } +#line 1675 "cmFortranParser.cxx" /* yacc.c:1646 */ + break; + + case 18: +#line 179 "cmFortranParser.y" /* yacc.c:1646 */ + { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_RuleUndef(parser, (yyvsp[-2].string)); + free((yyvsp[-2].string)); + } +#line 1685 "cmFortranParser.cxx" /* yacc.c:1646 */ + break; + + case 19: +#line 184 "cmFortranParser.y" /* yacc.c:1646 */ + { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_RuleIfdef(parser, (yyvsp[-2].string)); + free((yyvsp[-2].string)); + } +#line 1695 "cmFortranParser.cxx" /* yacc.c:1646 */ + break; + + case 20: +#line 189 "cmFortranParser.y" /* yacc.c:1646 */ + { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_RuleIfndef(parser, (yyvsp[-2].string)); + free((yyvsp[-2].string)); + } +#line 1705 "cmFortranParser.cxx" /* yacc.c:1646 */ + break; + + case 21: +#line 194 "cmFortranParser.y" /* yacc.c:1646 */ + { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_RuleIf(parser); + } +#line 1714 "cmFortranParser.cxx" /* yacc.c:1646 */ + break; + + case 22: +#line 198 "cmFortranParser.y" /* yacc.c:1646 */ + { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_RuleElif(parser); + } +#line 1723 "cmFortranParser.cxx" /* yacc.c:1646 */ + break; + + case 23: +#line 202 "cmFortranParser.y" /* yacc.c:1646 */ + { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_RuleElse(parser); + } +#line 1732 "cmFortranParser.cxx" /* yacc.c:1646 */ + break; + + case 24: +#line 206 "cmFortranParser.y" /* yacc.c:1646 */ + { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_RuleEndif(parser); + } +#line 1741 "cmFortranParser.cxx" /* yacc.c:1646 */ + break; + + case 48: +#line 228 "cmFortranParser.y" /* yacc.c:1646 */ + { free ((yyvsp[0].string)); } +#line 1747 "cmFortranParser.cxx" /* yacc.c:1646 */ + break; + + case 55: +#line 235 "cmFortranParser.y" /* yacc.c:1646 */ + { free ((yyvsp[0].string)); } +#line 1753 "cmFortranParser.cxx" /* yacc.c:1646 */ + break; + + +#line 1757 "cmFortranParser.cxx" /* yacc.c:1646 */ + default: break; + } + /* User semantic actions sometimes alter yychar, and that requires + that yytoken be updated with the new translation. We take the + approach of translating immediately before every use of yytoken. + One alternative is translating here after every semantic action, + but that translation would be missed if the semantic action invokes + YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or + if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an + incorrect destructor might then be invoked immediately. In the + case of YYERROR or YYBACKUP, subsequent parser actions might lead + to an incorrect destructor call or verbose syntax error message + before the lookahead is translated. */ + YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); + + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + + *++yyvsp = yyval; + + /* Now 'shift' the result of the reduction. Determine what state + that goes to, based on the state we popped back to and the rule + number reduced by. */ + + yyn = yyr1[yyn]; + + yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; + if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yytable[yystate]; + else + yystate = yydefgoto[yyn - YYNTOKENS]; + + goto yynewstate; + + +/*--------------------------------------. +| yyerrlab -- here on detecting error. | +`--------------------------------------*/ +yyerrlab: + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); + + /* If not already recovering from an error, report this error. */ + if (!yyerrstatus) + { + ++yynerrs; +#if ! YYERROR_VERBOSE + yyerror (yyscanner, YY_("syntax error")); +#else +# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ + yyssp, yytoken) + { + char const *yymsgp = YY_("syntax error"); + int yysyntax_error_status; + yysyntax_error_status = YYSYNTAX_ERROR; + if (yysyntax_error_status == 0) + yymsgp = yymsg; + else if (yysyntax_error_status == 1) + { + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); + if (!yymsg) + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = 2; + } + else + { + yysyntax_error_status = YYSYNTAX_ERROR; + yymsgp = yymsg; + } + } + yyerror (yyscanner, yymsgp); + if (yysyntax_error_status == 2) + goto yyexhaustedlab; + } +# undef YYSYNTAX_ERROR +#endif + } + + + + if (yyerrstatus == 3) + { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ + + if (yychar <= YYEOF) + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } + else + { + yydestruct ("Error: discarding", + yytoken, &yylval, yyscanner); + yychar = YYEMPTY; + } + } + +#if 0 + /* Else will try to reuse lookahead token after shifting the error + token. */ + goto yyerrlab1; + + +/*---------------------------------------------------. +| yyerrorlab -- error raised explicitly by YYERROR. | +`---------------------------------------------------*/ +yyerrorlab: + + /* Pacify compilers like GCC when the user code never invokes + YYERROR and the label yyerrorlab therefore never appears in user + code. */ + if (/*CONSTCOND*/ 0) + goto yyerrorlab; + + /* Do not reclaim the symbols of the rule whose action triggered + this YYERROR. */ + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + yystate = *yyssp; + goto yyerrlab1; + + +/*-------------------------------------------------------------. +| yyerrlab1 -- common code for both syntax error and YYERROR. | +`-------------------------------------------------------------*/ +yyerrlab1: +#endif + yyerrstatus = 3; /* Each real token shifted decrements this. */ + + for (;;) + { + yyn = yypact[yystate]; + if (!yypact_value_is_default (yyn)) + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } + + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; + + + yydestruct ("Error: popping", + yystos[yystate], yyvsp, yyscanner); + YYPOPSTACK (1); + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); + } + + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END + + + /* Shift the error token. */ + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); + + yystate = yyn; + goto yynewstate; + + +/*-------------------------------------. +| yyacceptlab -- YYACCEPT comes here. | +`-------------------------------------*/ +yyacceptlab: + yyresult = 0; + goto yyreturn; + +/*-----------------------------------. +| yyabortlab -- YYABORT comes here. | +`-----------------------------------*/ +yyabortlab: + yyresult = 1; + goto yyreturn; + +#if !defined yyoverflow || YYERROR_VERBOSE +/*-------------------------------------------------. +| yyexhaustedlab -- memory exhaustion comes here. | +`-------------------------------------------------*/ +yyexhaustedlab: + yyerror (yyscanner, YY_("memory exhausted")); + yyresult = 2; + /* Fall through. */ +#endif + +yyreturn: + if (yychar != YYEMPTY) + { + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = YYTRANSLATE (yychar); + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval, yyscanner); + } + /* Do not reclaim the symbols of the rule whose action triggered + this YYABORT or YYACCEPT. */ + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + yystos[*yyssp], yyvsp, yyscanner); + YYPOPSTACK (1); + } +#ifndef yyoverflow + if (yyss != yyssa) + YYSTACK_FREE (yyss); +#endif +#if YYERROR_VERBOSE + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); +#endif + return yyresult; +} +#line 246 "cmFortranParser.y" /* yacc.c:1906 */ + +/* End of grammar */ diff --git a/Source/LexerParser/cmFortranParser.y b/Source/LexerParser/cmFortranParser.y new file mode 100644 index 0000000..acfb40a --- /dev/null +++ b/Source/LexerParser/cmFortranParser.y @@ -0,0 +1,247 @@ +%{ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +/*------------------------------------------------------------------------- + Portions of this source have been derived from makedepf90 version 2.8.8, + + Copyright (C) 2000--2006 Erik Edelmann + + The code was originally distributed under the GPL but permission + from the copyright holder has been obtained to distribute this + derived work under the CMake license. +-------------------------------------------------------------------------*/ + +/* + +This file must be translated to C and modified to build everywhere. + +Run bison like this: + + bison --yacc --name-prefix=cmFortran_yy + --defines=cmFortranParserTokens.h + -ocmFortranParser.cxx + cmFortranParser.y + +Modify cmFortranParser.cxx: + - "#if 0" out yyerrorlab block in range ["goto yyerrlab1", "yyerrlab1:"] +*/ + +#include "cmConfigure.h" // IWYU pragma: keep + +#include "cmsys/String.h" +#include +#include + +/*-------------------------------------------------------------------------*/ +#define cmFortranParser_cxx +#include "cmFortranParser.h" /* Interface to parser object. */ +#include "cmFortranParserTokens.h" /* Need YYSTYPE for YY_DECL. */ + +/* Forward declare the lexer entry point. */ +YY_DECL; + +/* Helper function to forward error callback from parser. */ +static void cmFortran_yyerror(yyscan_t yyscanner, const char* message) +{ + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_Error(parser, message); +} + +/* Disable some warnings in the generated code. */ +#ifdef _MSC_VER +# pragma warning (disable: 4102) /* Unused goto label. */ +# pragma warning (disable: 4065) /* Switch contains default but no case. */ +# pragma warning (disable: 4701) /* Local variable may not be initialized. */ +# pragma warning (disable: 4702) /* Unreachable code. */ +# pragma warning (disable: 4127) /* Conditional expression is constant. */ +# pragma warning (disable: 4244) /* Conversion to smaller type, data loss. */ +#endif +%} + +/* Generate a reentrant parser object. */ +%define api.pure + +/* Configure the parser to use a lexer object. */ +%lex-param {yyscan_t yyscanner} +%parse-param {yyscan_t yyscanner} + +%define parse.error verbose + +%union { + char* string; +} + +/*-------------------------------------------------------------------------*/ +/* Tokens */ +%token EOSTMT ASSIGNMENT_OP GARBAGE +%token CPP_LINE_DIRECTIVE +%token CPP_INCLUDE F90PPR_INCLUDE COCO_INCLUDE +%token F90PPR_DEFINE CPP_DEFINE F90PPR_UNDEF CPP_UNDEF +%token CPP_IFDEF CPP_IFNDEF CPP_IF CPP_ELSE CPP_ELIF CPP_ENDIF +%token F90PPR_IFDEF F90PPR_IFNDEF F90PPR_IF +%token F90PPR_ELSE F90PPR_ELIF F90PPR_ENDIF +%token COMMA COLON DCOLON LPAREN RPAREN +%token UNTERMINATED_STRING +%token STRING WORD +%token CPP_INCLUDE_ANGLE +%token END +%token INCLUDE +%token INTERFACE +%token MODULE +%token SUBMODULE +%token USE + +/*-------------------------------------------------------------------------*/ +/* grammar */ +%% + +code: /* empty */ | code stmt; + +stmt: + INTERFACE EOSTMT { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_SetInInterface(parser, true); + } +| USE WORD other EOSTMT { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_RuleUse(parser, $2); + free($2); + } +| MODULE WORD other EOSTMT { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + if (cmsysString_strcasecmp($2, "function") != 0 && + cmsysString_strcasecmp($2, "procedure") != 0 && + cmsysString_strcasecmp($2, "subroutine") != 0) { + cmFortranParser_RuleModule(parser, $2); + } + free($2); + } +| SUBMODULE LPAREN WORD RPAREN WORD other EOSTMT { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_RuleUse(parser, $3); + free($3); + free($5); + } +| SUBMODULE LPAREN WORD COLON WORD RPAREN WORD other EOSTMT { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_RuleUse(parser, $3); + free($3); + free($5); + free($7); + } +| INTERFACE WORD other EOSTMT { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_SetInInterface(parser, true); + free($2); + } +| END INTERFACE other EOSTMT { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_SetInInterface(parser, false); + } +| USE DCOLON WORD other EOSTMT { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_RuleUse(parser, $3); + free($3); + } +| USE COMMA WORD DCOLON WORD other EOSTMT { + if (cmsysString_strcasecmp($3, "non_intrinsic") == 0) { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_RuleUse(parser, $5); + } + free($3); + free($5); + } +| INCLUDE STRING other EOSTMT { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_RuleInclude(parser, $2); + free($2); + } +| CPP_LINE_DIRECTIVE STRING other EOSTMT { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_RuleLineDirective(parser, $2); + free($2); + } +| CPP_INCLUDE_ANGLE other EOSTMT { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_RuleInclude(parser, $1); + free($1); + } +| include STRING other EOSTMT { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_RuleInclude(parser, $2); + free($2); + } +| define WORD other EOSTMT { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_RuleDefine(parser, $2); + free($2); + } +| undef WORD other EOSTMT { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_RuleUndef(parser, $2); + free($2); + } +| ifdef WORD other EOSTMT { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_RuleIfdef(parser, $2); + free($2); + } +| ifndef WORD other EOSTMT { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_RuleIfndef(parser, $2); + free($2); + } +| if other EOSTMT { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_RuleIf(parser); + } +| elif other EOSTMT { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_RuleElif(parser); + } +| else other EOSTMT { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_RuleElse(parser); + } +| endif other EOSTMT { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_RuleEndif(parser); + } +| EOSTMT +| error EOSTMT /* tolerate unknown statements until their end */ +; + + + +include: CPP_INCLUDE | F90PPR_INCLUDE | COCO_INCLUDE ; +define: CPP_DEFINE | F90PPR_DEFINE; +undef: CPP_UNDEF | F90PPR_UNDEF ; +ifdef: CPP_IFDEF | F90PPR_IFDEF ; +ifndef: CPP_IFNDEF | F90PPR_IFNDEF ; +if: CPP_IF | F90PPR_IF ; +elif: CPP_ELIF | F90PPR_ELIF ; +else: CPP_ELSE | F90PPR_ELSE ; +endif: CPP_ENDIF | F90PPR_ENDIF ; +other: /* empty */ | other misc_code ; + +misc_code: + WORD { free ($1); } +| END +| INCLUDE +| INTERFACE +| MODULE +| SUBMODULE +| USE +| STRING { free ($1); } +| GARBAGE +| ASSIGNMENT_OP +| COLON +| DCOLON +| LPAREN +| RPAREN +| COMMA +| UNTERMINATED_STRING +; + +%% +/* End of grammar */ diff --git a/Source/LexerParser/cmFortranParserTokens.h b/Source/LexerParser/cmFortranParserTokens.h new file mode 100644 index 0000000..8d6a5fe --- /dev/null +++ b/Source/LexerParser/cmFortranParserTokens.h @@ -0,0 +1,149 @@ +/* A Bison parser, made by GNU Bison 3.0.4. */ + +/* Bison interface for Yacc-like parsers in C + + Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +#ifndef YY_CMFORTRAN_YY_CMFORTRANPARSERTOKENS_H_INCLUDED +# define YY_CMFORTRAN_YY_CMFORTRANPARSERTOKENS_H_INCLUDED +/* Debug traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif +#if YYDEBUG +extern int cmFortran_yydebug; +#endif + +/* Token type. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + enum yytokentype + { + EOSTMT = 258, + ASSIGNMENT_OP = 259, + GARBAGE = 260, + CPP_LINE_DIRECTIVE = 261, + CPP_INCLUDE = 262, + F90PPR_INCLUDE = 263, + COCO_INCLUDE = 264, + F90PPR_DEFINE = 265, + CPP_DEFINE = 266, + F90PPR_UNDEF = 267, + CPP_UNDEF = 268, + CPP_IFDEF = 269, + CPP_IFNDEF = 270, + CPP_IF = 271, + CPP_ELSE = 272, + CPP_ELIF = 273, + CPP_ENDIF = 274, + F90PPR_IFDEF = 275, + F90PPR_IFNDEF = 276, + F90PPR_IF = 277, + F90PPR_ELSE = 278, + F90PPR_ELIF = 279, + F90PPR_ENDIF = 280, + COMMA = 281, + COLON = 282, + DCOLON = 283, + LPAREN = 284, + RPAREN = 285, + UNTERMINATED_STRING = 286, + STRING = 287, + WORD = 288, + CPP_INCLUDE_ANGLE = 289, + END = 290, + INCLUDE = 291, + INTERFACE = 292, + MODULE = 293, + SUBMODULE = 294, + USE = 295 + }; +#endif +/* Tokens. */ +#define EOSTMT 258 +#define ASSIGNMENT_OP 259 +#define GARBAGE 260 +#define CPP_LINE_DIRECTIVE 261 +#define CPP_INCLUDE 262 +#define F90PPR_INCLUDE 263 +#define COCO_INCLUDE 264 +#define F90PPR_DEFINE 265 +#define CPP_DEFINE 266 +#define F90PPR_UNDEF 267 +#define CPP_UNDEF 268 +#define CPP_IFDEF 269 +#define CPP_IFNDEF 270 +#define CPP_IF 271 +#define CPP_ELSE 272 +#define CPP_ELIF 273 +#define CPP_ENDIF 274 +#define F90PPR_IFDEF 275 +#define F90PPR_IFNDEF 276 +#define F90PPR_IF 277 +#define F90PPR_ELSE 278 +#define F90PPR_ELIF 279 +#define F90PPR_ENDIF 280 +#define COMMA 281 +#define COLON 282 +#define DCOLON 283 +#define LPAREN 284 +#define RPAREN 285 +#define UNTERMINATED_STRING 286 +#define STRING 287 +#define WORD 288 +#define CPP_INCLUDE_ANGLE 289 +#define END 290 +#define INCLUDE 291 +#define INTERFACE 292 +#define MODULE 293 +#define SUBMODULE 294 +#define USE 295 + +/* Value type. */ +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED + +union YYSTYPE +{ +#line 70 "cmFortranParser.y" /* yacc.c:1909 */ + + char* string; + +#line 138 "cmFortranParserTokens.h" /* yacc.c:1909 */ +}; + +typedef union YYSTYPE YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 +# define YYSTYPE_IS_DECLARED 1 +#endif + + + +int cmFortran_yyparse (yyscan_t yyscanner); + +#endif /* !YY_CMFORTRAN_YY_CMFORTRANPARSERTOKENS_H_INCLUDED */ diff --git a/Source/LexerParser/cmListFileLexer.c b/Source/LexerParser/cmListFileLexer.c new file mode 100644 index 0000000..3dd3b85 --- /dev/null +++ b/Source/LexerParser/cmListFileLexer.c @@ -0,0 +1,2688 @@ +#include "cmStandardLexer.h" +#line 2 "cmListFileLexer.c" + +#line 4 "cmListFileLexer.c" + +#define FLEXINT_H 1 +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 6 +#define YY_FLEX_SUBMINOR_VERSION 1 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ +#include +#include +#include +#include + +/* end standard C headers. */ + +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have . Non-C99 systems may or may not. */ + +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 +#endif + +#include +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#endif /* ! C99 */ + +#endif /* ! FLEXINT_H */ + +/* TODO: this is always defined, so inline it */ +#define yyconst const + +#if defined(__GNUC__) && __GNUC__ >= 3 +#define yynoreturn __attribute__((__noreturn__)) +#else +#define yynoreturn +#endif + +/* Returned upon end-of-file. */ +#define YY_NULL 0 + +/* Promotes a possibly negative, possibly signed char to an unsigned + * integer for use as an array index. If the signed char is negative, + * we want to instead treat it as an 8-bit unsigned char, hence the + * double cast. + */ +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) + +/* An opaque pointer. */ +#ifndef YY_TYPEDEF_YY_SCANNER_T +#define YY_TYPEDEF_YY_SCANNER_T +typedef void* yyscan_t; +#endif + +/* For convenience, these vars (plus the bison vars far below) + are macros in the reentrant scanner. */ +#define yyin yyg->yyin_r +#define yyout yyg->yyout_r +#define yyextra yyg->yyextra_r +#define yyleng yyg->yyleng_r +#define yytext yyg->yytext_r +#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) +#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) +#define yy_flex_debug yyg->yy_flex_debug_r + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN yyg->yy_start = 1 + 2 * + +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START ((yyg->yy_start - 1) / 2) +#define YYSTATE YY_START + +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) + +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE cmListFileLexer_yyrestart(yyin ,yyscanner ) + +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#ifndef YY_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k. + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. + * Ditto for the __ia64__ case accordingly. + */ +#define YY_BUF_SIZE 32768 +#else +#define YY_BUF_SIZE 16384 +#endif /* __ia64__ */ +#endif + +/* The state buf must be large enough to hold one state per character in the main buffer. + */ +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE +typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + + /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires + * access to the local variable yy_act. Since yyless() is a macro, it would break + * existing scanners that call yyless() from OUTSIDE cmListFileLexer_yylex. + * One obvious solution it to make yy_act a global. I tried that, and saw + * a 5% performance hit in a non-yylineno scanner, because yy_act is + * normally declared as a register variable-- so it is not worth it. + */ + #define YY_LESS_LINENO(n) \ + do { \ + int yyl;\ + for ( yyl = n; yyl < yyleng; ++yyl )\ + if ( yytext[yyl] == '\n' )\ + --yylineno;\ + }while(0) + #define YY_LINENO_REWIND_TO(dst) \ + do {\ + const char *p;\ + for ( p = yy_cp-1; p >= (dst); --p)\ + if ( *p == '\n' )\ + --yylineno;\ + }while(0) + +/* Return all but the first "n" matched characters back to the input stream. */ +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = yyg->yy_hold_char; \ + YY_RESTORE_YY_MORE_OFFSET \ + yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) + +#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) + +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via cmListFileLexer_yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + * + * Returns the top of the stack, or NULL. + */ +#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ + ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ + : NULL) + +/* Same as previous macro, but useful when we know that the buffer stack is not + * NULL or when we need an lvalue. For internal use only. + */ +#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] + +void cmListFileLexer_yyrestart (FILE *input_file ,yyscan_t yyscanner ); +void cmListFileLexer_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); +YY_BUFFER_STATE cmListFileLexer_yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner ); +void cmListFileLexer_yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); +void cmListFileLexer_yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); +void cmListFileLexer_yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); +void cmListFileLexer_yypop_buffer_state (yyscan_t yyscanner ); + +static void cmListFileLexer_yyensure_buffer_stack (yyscan_t yyscanner ); +static void cmListFileLexer_yy_load_buffer_state (yyscan_t yyscanner ); +static void cmListFileLexer_yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner ); + +#define YY_FLUSH_BUFFER cmListFileLexer_yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner) + +YY_BUFFER_STATE cmListFileLexer_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); +YY_BUFFER_STATE cmListFileLexer_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); +YY_BUFFER_STATE cmListFileLexer_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); + +void *cmListFileLexer_yyalloc (yy_size_t ,yyscan_t yyscanner ); +void *cmListFileLexer_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); +void cmListFileLexer_yyfree (void * ,yyscan_t yyscanner ); + +#define yy_new_buffer cmListFileLexer_yy_create_buffer + +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + cmListFileLexer_yyensure_buffer_stack (yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = \ + cmListFileLexer_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } + +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + cmListFileLexer_yyensure_buffer_stack (yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = \ + cmListFileLexer_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } + +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) + +/* Begin user sect3 */ + +#define cmListFileLexer_yywrap(yyscanner) (/*CONSTCOND*/1) +#define YY_SKIP_YYWRAP + +typedef unsigned char YY_CHAR; + +typedef int yy_state_type; + +#define yytext_ptr yytext_r + +static yy_state_type yy_get_previous_state (yyscan_t yyscanner ); +static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner); +static int yy_get_next_buffer (yyscan_t yyscanner ); +static void yynoreturn yy_fatal_error (yyconst char* msg ,yyscan_t yyscanner ); + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up yytext. + */ +#define YY_DO_BEFORE_ACTION \ + yyg->yytext_ptr = yy_bp; \ + yyleng = (int) (yy_cp - yy_bp); \ + yyg->yy_hold_char = *yy_cp; \ + *yy_cp = '\0'; \ + yyg->yy_c_buf_p = yy_cp; + +#define YY_NUM_RULES 24 +#define YY_END_OF_BUFFER 25 +/* This struct is not used in this scanner, + but its presence is necessary. */ +struct yy_trans_info + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static yyconst flex_int16_t yy_accept[77] = + { 0, + 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, + 25, 13, 22, 1, 16, 3, 13, 5, 6, 7, + 15, 23, 17, 19, 20, 21, 10, 11, 8, 12, + 9, 4, 13, 0, 13, 0, 22, 0, 0, 7, + 13, 0, 13, 0, 2, 0, 13, 17, 0, 18, + 10, 8, 4, 0, 14, 0, 0, 0, 0, 14, + 0, 0, 14, 0, 0, 0, 2, 14, 0, 0, + 0, 0, 0, 0, 0, 0 + } ; + +static yyconst YY_CHAR yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 1, 5, 6, 7, 1, 1, 1, 8, + 9, 1, 1, 1, 1, 1, 1, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 1, 1, 1, + 11, 1, 1, 1, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 13, 14, 15, 1, 12, 1, 12, 12, 12, 12, + + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static yyconst YY_CHAR yy_meta[16] = + { 0, + 1, 1, 2, 3, 4, 3, 1, 3, 5, 6, + 1, 6, 1, 1, 7 + } ; + +static yyconst flex_uint16_t yy_base[95] = + { 0, + 0, 0, 13, 25, 14, 16, 17, 18, 90, 88, + 88, 39, 20, 237, 237, 74, 78, 237, 237, 13, + 54, 0, 71, 237, 237, 31, 0, 237, 73, 237, + 237, 0, 0, 65, 75, 0, 33, 30, 72, 0, + 0, 75, 70, 0, 74, 0, 0, 62, 70, 237, + 0, 63, 0, 85, 99, 65, 111, 62, 34, 0, + 54, 116, 0, 54, 127, 51, 237, 50, 0, 48, + 47, 39, 33, 29, 17, 237, 136, 143, 150, 157, + 164, 171, 178, 184, 191, 198, 201, 207, 214, 217, + 219, 225, 228, 230 + + } ; + +static yyconst flex_int16_t yy_def[95] = + { 0, + 76, 1, 77, 77, 78, 78, 79, 79, 80, 80, + 76, 76, 76, 76, 76, 76, 12, 76, 76, 12, + 76, 81, 82, 76, 76, 82, 83, 76, 76, 76, + 76, 84, 12, 85, 12, 86, 76, 76, 87, 20, + 12, 88, 12, 21, 76, 89, 12, 82, 82, 76, + 83, 76, 84, 85, 76, 54, 85, 90, 76, 55, + 87, 88, 55, 62, 88, 91, 76, 55, 92, 93, + 90, 94, 91, 93, 94, 0, 76, 76, 76, 76, + 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, + 76, 76, 76, 76 + + } ; + +static yyconst flex_uint16_t yy_nxt[253] = + { 0, + 12, 13, 14, 13, 15, 16, 17, 18, 19, 12, + 12, 20, 21, 22, 12, 24, 28, 25, 28, 28, + 28, 37, 40, 37, 40, 62, 26, 24, 29, 25, + 29, 31, 31, 50, 37, 48, 37, 54, 26, 33, + 59, 63, 45, 34, 59, 35, 45, 62, 33, 33, + 33, 33, 36, 33, 41, 55, 54, 58, 42, 63, + 43, 72, 60, 41, 44, 41, 45, 46, 41, 55, + 55, 56, 70, 52, 48, 49, 67, 66, 57, 63, + 60, 64, 58, 52, 49, 39, 38, 76, 65, 55, + 14, 56, 14, 76, 76, 76, 76, 76, 57, 55, + + 76, 76, 76, 34, 76, 68, 76, 76, 55, 55, + 55, 55, 69, 55, 54, 76, 54, 76, 54, 54, + 63, 76, 64, 76, 76, 76, 76, 76, 76, 65, + 62, 76, 62, 76, 62, 62, 23, 23, 23, 23, + 23, 23, 23, 27, 27, 27, 27, 27, 27, 27, + 30, 30, 30, 30, 30, 30, 30, 32, 32, 32, + 32, 32, 32, 32, 47, 76, 47, 47, 47, 47, + 47, 48, 76, 48, 76, 48, 48, 48, 51, 76, + 51, 51, 51, 51, 53, 76, 53, 53, 53, 53, + 53, 54, 76, 76, 54, 76, 54, 54, 33, 76, + + 33, 33, 33, 33, 33, 61, 61, 62, 76, 76, + 62, 76, 62, 62, 41, 76, 41, 41, 41, 41, + 41, 71, 71, 73, 73, 55, 76, 55, 55, 55, + 55, 55, 74, 74, 75, 75, 11, 76, 76, 76, + 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, + 76, 76 + } ; + +static yyconst flex_int16_t yy_chk[253] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 3, 5, 3, 6, 7, + 8, 13, 20, 13, 20, 75, 3, 4, 5, 4, + 6, 7, 8, 26, 37, 26, 37, 74, 4, 12, + 38, 73, 38, 12, 59, 12, 59, 72, 12, 12, + 12, 12, 12, 12, 21, 71, 70, 68, 21, 66, + 21, 64, 61, 21, 21, 21, 21, 21, 21, 34, + 58, 34, 56, 52, 49, 48, 45, 43, 34, 42, + 39, 42, 35, 29, 23, 17, 16, 11, 42, 54, + 10, 54, 9, 0, 0, 0, 0, 0, 54, 55, + + 0, 0, 0, 55, 0, 55, 0, 0, 55, 55, + 55, 55, 55, 55, 57, 0, 57, 0, 57, 57, + 62, 0, 62, 0, 0, 0, 0, 0, 0, 62, + 65, 0, 65, 0, 65, 65, 77, 77, 77, 77, + 77, 77, 77, 78, 78, 78, 78, 78, 78, 78, + 79, 79, 79, 79, 79, 79, 79, 80, 80, 80, + 80, 80, 80, 80, 81, 0, 81, 81, 81, 81, + 81, 82, 0, 82, 0, 82, 82, 82, 83, 0, + 83, 83, 83, 83, 84, 0, 84, 84, 84, 84, + 84, 85, 0, 0, 85, 0, 85, 85, 86, 0, + + 86, 86, 86, 86, 86, 87, 87, 88, 0, 0, + 88, 0, 88, 88, 89, 0, 89, 89, 89, 89, + 89, 90, 90, 91, 91, 92, 0, 92, 92, 92, + 92, 92, 93, 93, 94, 94, 76, 76, 76, 76, + 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, + 76, 76 + } ; + +/* Table of booleans, true if rule could match eol. */ +static yyconst flex_int32_t yy_rule_can_match_eol[25] = + { 0, +1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, + 0, 0, 0, 0, 0, }; + +/* The intent behind this definition is that it'll catch + * any uses of REJECT which flex missed. + */ +#define REJECT reject_used_but_not_detected +#define yymore() yymore_used_but_not_detected +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET +#line 1 "cmListFileLexer.in.l" +#line 2 "cmListFileLexer.in.l" +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +/* + +This file must be translated to C and modified to build everywhere. + +Run flex >= 2.6 like this: + + flex --nounistd -DFLEXINT_H --prefix=cmListFileLexer_yy -ocmListFileLexer.c cmListFileLexer.in.l + +Modify cmListFileLexer.c: + - remove trailing whitespace: sed -i 's/\s*$//' cmListFileLexer.c + - remove blank lines at end of file + - #include "cmStandardLexer.h" at the top + - add cast in cmListFileLexer_yy_scan_bytes for loop condition of _yybytes_len to size_t + - change type of variable yyl under yy_find_action from yy_size_t to int + +*/ + +/* IWYU pragma: no_forward_declare yyguts_t */ + +#ifdef WIN32 +#include "cmsys/Encoding.h" +#endif + +/* Setup the proper cmListFileLexer_yylex declaration. */ +#define YY_EXTRA_TYPE cmListFileLexer* +#define YY_DECL int cmListFileLexer_yylex (yyscan_t yyscanner, cmListFileLexer* lexer) + +#include "cmListFileLexer.h" + +/*--------------------------------------------------------------------------*/ +struct cmListFileLexer_s +{ + cmListFileLexer_Token token; + int bracket; + int comment; + int line; + int column; + int size; + FILE* file; + size_t cr; + char* string_buffer; + char* string_position; + int string_left; + yyscan_t scanner; +}; + +static void cmListFileLexerSetToken(cmListFileLexer* lexer, const char* text, + int length); +static void cmListFileLexerAppend(cmListFileLexer* lexer, const char* text, + int length); +static int cmListFileLexerInput(cmListFileLexer* lexer, char* buffer, + size_t bufferSize); +static void cmListFileLexerInit(cmListFileLexer* lexer); +static void cmListFileLexerDestroy(cmListFileLexer* lexer); + +/* Replace the lexer input function. */ +#undef YY_INPUT +#define YY_INPUT(buf, result, max_size) \ + { result = cmListFileLexerInput(cmListFileLexer_yyget_extra(yyscanner), buf, max_size); } + +/*--------------------------------------------------------------------------*/ + + + + +#line 606 "cmListFileLexer.c" + +#define INITIAL 0 +#define STRING 1 +#define BRACKET 2 +#define BRACKETEND 3 +#define COMMENT 4 + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +/* Holds the entire state of the reentrant scanner. */ +struct yyguts_t + { + + /* User-defined. Not touched by flex. */ + YY_EXTRA_TYPE yyextra_r; + + /* The rest are the same as the globals declared in the non-reentrant scanner. */ + FILE *yyin_r, *yyout_r; + size_t yy_buffer_stack_top; /**< index of top of stack. */ + size_t yy_buffer_stack_max; /**< capacity of stack. */ + YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ + char yy_hold_char; + int yy_n_chars; + int yyleng_r; + char *yy_c_buf_p; + int yy_init; + int yy_start; + int yy_did_buffer_switch_on_eof; + int yy_start_stack_ptr; + int yy_start_stack_depth; + int *yy_start_stack; + yy_state_type yy_last_accepting_state; + char* yy_last_accepting_cpos; + + int yylineno_r; + int yy_flex_debug_r; + + char *yytext_r; + int yy_more_flag; + int yy_more_len; + + }; /* end struct yyguts_t */ + +static int yy_init_globals (yyscan_t yyscanner ); + +int cmListFileLexer_yylex_init (yyscan_t* scanner); + +int cmListFileLexer_yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); + +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int cmListFileLexer_yylex_destroy (yyscan_t yyscanner ); + +int cmListFileLexer_yyget_debug (yyscan_t yyscanner ); + +void cmListFileLexer_yyset_debug (int debug_flag ,yyscan_t yyscanner ); + +YY_EXTRA_TYPE cmListFileLexer_yyget_extra (yyscan_t yyscanner ); + +void cmListFileLexer_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); + +FILE *cmListFileLexer_yyget_in (yyscan_t yyscanner ); + +void cmListFileLexer_yyset_in (FILE * _in_str ,yyscan_t yyscanner ); + +FILE *cmListFileLexer_yyget_out (yyscan_t yyscanner ); + +void cmListFileLexer_yyset_out (FILE * _out_str ,yyscan_t yyscanner ); + + int cmListFileLexer_yyget_leng (yyscan_t yyscanner ); + +char *cmListFileLexer_yyget_text (yyscan_t yyscanner ); + +int cmListFileLexer_yyget_lineno (yyscan_t yyscanner ); + +void cmListFileLexer_yyset_lineno (int _line_number ,yyscan_t yyscanner ); + +int cmListFileLexer_yyget_column (yyscan_t yyscanner ); + +void cmListFileLexer_yyset_column (int _column_no ,yyscan_t yyscanner ); + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int cmListFileLexer_yywrap (yyscan_t yyscanner ); +#else +extern int cmListFileLexer_yywrap (yyscan_t yyscanner ); +#endif +#endif + +#ifndef YY_NO_UNPUT + + static void yyunput (int c,char *buf_ptr ,yyscan_t yyscanner); + +#endif + +#ifndef yytext_ptr +static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); +#endif + +#ifndef YY_NO_INPUT + +#ifdef __cplusplus +static int yyinput (yyscan_t yyscanner ); +#else +static int input (yyscan_t yyscanner ); +#endif + +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k */ +#define YY_READ_BUF_SIZE 16384 +#else +#define YY_READ_BUF_SIZE 8192 +#endif /* __ia64__ */ +#endif + +/* Copy whatever the last rule matched to the standard output. */ +#ifndef ECHO +/* This used to be an fputs(), but since the string might contain NUL's, + * we now use fwrite(). + */ +#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ + { \ + int c = '*'; \ + size_t n; \ + for ( n = 0; n < max_size && \ + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else \ + { \ + errno=0; \ + while ( (result = (int) fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(yyin); \ + } \ + }\ +\ + +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) +#endif + +/* end tables serialization structures and prototypes */ + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL_IS_OURS 1 + +extern int cmListFileLexer_yylex (yyscan_t yyscanner); + +#define YY_DECL int cmListFileLexer_yylex (yyscan_t yyscanner) +#endif /* !YY_DECL */ + +/* Code executed at the beginning of each rule, after yytext and yyleng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK /*LINTED*/break; +#endif + +#define YY_RULE_SETUP \ + YY_USER_ACTION + +/** The main scanner function which does all the work. + */ +YY_DECL +{ + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if ( !yyg->yy_init ) + { + yyg->yy_init = 1; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + if ( ! yyg->yy_start ) + yyg->yy_start = 1; /* first start state */ + + if ( ! yyin ) + yyin = stdin; + + if ( ! yyout ) + yyout = stdout; + + if ( ! YY_CURRENT_BUFFER ) { + cmListFileLexer_yyensure_buffer_stack (yyscanner); + YY_CURRENT_BUFFER_LVALUE = + cmListFileLexer_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); + } + + cmListFileLexer_yy_load_buffer_state(yyscanner ); + } + + { +#line 80 "cmListFileLexer.in.l" + + +#line 866 "cmListFileLexer.c" + + while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ + { + yy_cp = yyg->yy_c_buf_p; + + /* Support of yytext. */ + *yy_cp = yyg->yy_hold_char; + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = yyg->yy_start; +yy_match: + do + { + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 77 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; + ++yy_cp; + } + while ( yy_base[yy_current_state] != 237 ); + +yy_find_action: + yy_act = yy_accept[yy_current_state]; + if ( yy_act == 0 ) + { /* have to back up */ + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + yy_act = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + + if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] ) + { + int yyl; + for ( yyl = 0; yyl < yyleng; ++yyl ) + if ( yytext[yyl] == '\n' ) + + do{ yylineno++; + yycolumn=0; + }while(0) +; + } + +do_action: /* This label is used only to access EOF actions. */ + + switch ( yy_act ) + { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = yyg->yy_hold_char; + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + goto yy_find_action; + +case 1: +/* rule 1 can match eol */ +YY_RULE_SETUP +#line 82 "cmListFileLexer.in.l" +{ + lexer->token.type = cmListFileLexer_Token_Newline; + cmListFileLexerSetToken(lexer, yytext, yyleng); + ++lexer->line; + lexer->column = 1; + BEGIN(INITIAL); + return 1; +} + YY_BREAK +case 2: +/* rule 2 can match eol */ +YY_RULE_SETUP +#line 91 "cmListFileLexer.in.l" +{ + const char* bracket = yytext; + lexer->comment = yytext[0] == '#'; + if (lexer->comment) { + lexer->token.type = cmListFileLexer_Token_CommentBracket; + bracket += 1; + } else { + lexer->token.type = cmListFileLexer_Token_ArgumentBracket; + } + cmListFileLexerSetToken(lexer, "", 0); + lexer->bracket = strchr(bracket+1, '[') - bracket; + if (yytext[yyleng-1] == '\n') { + ++lexer->line; + lexer->column = 1; + } else { + lexer->column += yyleng; + } + BEGIN(BRACKET); +} + YY_BREAK +case 3: +YY_RULE_SETUP +#line 111 "cmListFileLexer.in.l" +{ + lexer->column += yyleng; + BEGIN(COMMENT); +} + YY_BREAK +case 4: +YY_RULE_SETUP +#line 116 "cmListFileLexer.in.l" +{ + lexer->column += yyleng; +} + YY_BREAK +case 5: +YY_RULE_SETUP +#line 120 "cmListFileLexer.in.l" +{ + lexer->token.type = cmListFileLexer_Token_ParenLeft; + cmListFileLexerSetToken(lexer, yytext, yyleng); + lexer->column += yyleng; + return 1; +} + YY_BREAK +case 6: +YY_RULE_SETUP +#line 127 "cmListFileLexer.in.l" +{ + lexer->token.type = cmListFileLexer_Token_ParenRight; + cmListFileLexerSetToken(lexer, yytext, yyleng); + lexer->column += yyleng; + return 1; +} + YY_BREAK +case 7: +YY_RULE_SETUP +#line 134 "cmListFileLexer.in.l" +{ + lexer->token.type = cmListFileLexer_Token_Identifier; + cmListFileLexerSetToken(lexer, yytext, yyleng); + lexer->column += yyleng; + return 1; +} + YY_BREAK +case 8: +YY_RULE_SETUP +#line 141 "cmListFileLexer.in.l" +{ + /* Handle ]]====]=======]*/ + cmListFileLexerAppend(lexer, yytext, yyleng); + lexer->column += yyleng; + if (yyleng == lexer->bracket) { + BEGIN(BRACKETEND); + } +} + YY_BREAK +case 9: +YY_RULE_SETUP +#line 150 "cmListFileLexer.in.l" +{ + lexer->column += yyleng; + /* Erase the partial bracket from the token. */ + lexer->token.length -= lexer->bracket; + lexer->token.text[lexer->token.length] = 0; + BEGIN(INITIAL); + return 1; +} + YY_BREAK +case 10: +YY_RULE_SETUP +#line 159 "cmListFileLexer.in.l" +{ + cmListFileLexerAppend(lexer, yytext, yyleng); + lexer->column += yyleng; +} + YY_BREAK +case 11: +/* rule 11 can match eol */ +YY_RULE_SETUP +#line 164 "cmListFileLexer.in.l" +{ + cmListFileLexerAppend(lexer, yytext, yyleng); + ++lexer->line; + lexer->column = 1; + BEGIN(BRACKET); +} + YY_BREAK +case 12: +YY_RULE_SETUP +#line 171 "cmListFileLexer.in.l" +{ + cmListFileLexerAppend(lexer, yytext, yyleng); + lexer->column += yyleng; + BEGIN(BRACKET); +} + YY_BREAK +case YY_STATE_EOF(BRACKET): +case YY_STATE_EOF(BRACKETEND): +#line 177 "cmListFileLexer.in.l" +{ + lexer->token.type = cmListFileLexer_Token_BadBracket; + BEGIN(INITIAL); + return 1; +} + YY_BREAK +case 13: +YY_RULE_SETUP +#line 183 "cmListFileLexer.in.l" +{ + lexer->token.type = cmListFileLexer_Token_ArgumentUnquoted; + cmListFileLexerSetToken(lexer, yytext, yyleng); + lexer->column += yyleng; + return 1; +} + YY_BREAK +case 14: +YY_RULE_SETUP +#line 190 "cmListFileLexer.in.l" +{ + lexer->token.type = cmListFileLexer_Token_ArgumentUnquoted; + cmListFileLexerSetToken(lexer, yytext, yyleng); + lexer->column += yyleng; + return 1; +} + YY_BREAK +case 15: +YY_RULE_SETUP +#line 197 "cmListFileLexer.in.l" +{ + lexer->token.type = cmListFileLexer_Token_ArgumentUnquoted; + cmListFileLexerSetToken(lexer, yytext, yyleng); + lexer->column += yyleng; + return 1; +} + YY_BREAK +case 16: +YY_RULE_SETUP +#line 204 "cmListFileLexer.in.l" +{ + lexer->token.type = cmListFileLexer_Token_ArgumentQuoted; + cmListFileLexerSetToken(lexer, "", 0); + lexer->column += yyleng; + BEGIN(STRING); +} + YY_BREAK +case 17: +YY_RULE_SETUP +#line 211 "cmListFileLexer.in.l" +{ + cmListFileLexerAppend(lexer, yytext, yyleng); + lexer->column += yyleng; +} + YY_BREAK +case 18: +/* rule 18 can match eol */ +YY_RULE_SETUP +#line 216 "cmListFileLexer.in.l" +{ + /* Continuation: text is not part of string */ + ++lexer->line; + lexer->column = 1; +} + YY_BREAK +case 19: +/* rule 19 can match eol */ +YY_RULE_SETUP +#line 222 "cmListFileLexer.in.l" +{ + cmListFileLexerAppend(lexer, yytext, yyleng); + ++lexer->line; + lexer->column = 1; +} + YY_BREAK +case 20: +YY_RULE_SETUP +#line 228 "cmListFileLexer.in.l" +{ + lexer->column += yyleng; + BEGIN(INITIAL); + return 1; +} + YY_BREAK +case 21: +YY_RULE_SETUP +#line 234 "cmListFileLexer.in.l" +{ + cmListFileLexerAppend(lexer, yytext, yyleng); + lexer->column += yyleng; +} + YY_BREAK +case YY_STATE_EOF(STRING): +#line 239 "cmListFileLexer.in.l" +{ + lexer->token.type = cmListFileLexer_Token_BadString; + BEGIN(INITIAL); + return 1; +} + YY_BREAK +case 22: +YY_RULE_SETUP +#line 245 "cmListFileLexer.in.l" +{ + lexer->token.type = cmListFileLexer_Token_Space; + cmListFileLexerSetToken(lexer, yytext, yyleng); + lexer->column += yyleng; + return 1; +} + YY_BREAK +case 23: +YY_RULE_SETUP +#line 252 "cmListFileLexer.in.l" +{ + lexer->token.type = cmListFileLexer_Token_BadCharacter; + cmListFileLexerSetToken(lexer, yytext, yyleng); + lexer->column += yyleng; + return 1; +} + YY_BREAK +case YY_STATE_EOF(INITIAL): +case YY_STATE_EOF(COMMENT): +#line 259 "cmListFileLexer.in.l" +{ + lexer->token.type = cmListFileLexer_Token_None; + cmListFileLexerSetToken(lexer, 0, 0); + return 0; +} + YY_BREAK +case 24: +YY_RULE_SETUP +#line 265 "cmListFileLexer.in.l" +ECHO; + YY_BREAK +#line 1205 "cmListFileLexer.c" + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = yyg->yy_hold_char; + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * cmListFileLexer_yylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( yyscanner ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); + + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++yyg->yy_c_buf_p; + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = yyg->yy_c_buf_p; + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( yyscanner ) ) + { + case EOB_ACT_END_OF_FILE: + { + yyg->yy_did_buffer_switch_on_eof = 0; + + if ( cmListFileLexer_yywrap(yyscanner ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! yyg->yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = + yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( yyscanner ); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + yyg->yy_c_buf_p = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; + + yy_current_state = yy_get_previous_state( yyscanner ); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of user's declarations */ +} /* end of cmListFileLexer_yylex */ + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ +static int yy_get_next_buffer (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = yyg->yytext_ptr; + yy_size_t number_to_move, i; + int ret_val; + + if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (yy_size_t) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1; + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; + + else + { + int num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; + + int yy_c_buf_p_offset = + (int) (yyg->yy_c_buf_p - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + cmListFileLexer_yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = NULL; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + yyg->yy_n_chars, num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + if ( yyg->yy_n_chars == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + cmListFileLexer_yyrestart(yyin ,yyscanner); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if ((int) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) cmListFileLexer_yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + } + + yyg->yy_n_chars += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; + + yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; +} + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + + static yy_state_type yy_get_previous_state (yyscan_t yyscanner) +{ + yy_state_type yy_current_state; + char *yy_cp; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + yy_current_state = yyg->yy_start; + + for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) + { + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 77 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; + } + + return yy_current_state; +} + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) +{ + int yy_is_jam; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ + char *yy_cp = yyg->yy_c_buf_p; + + YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 77 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; + yy_is_jam = (yy_current_state == 76); + + (void)yyg; + return yy_is_jam ? 0 : yy_current_state; +} + +#ifndef YY_NO_UNPUT + + static void yyunput (int c, char * yy_bp , yyscan_t yyscanner) +{ + char *yy_cp; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + yy_cp = yyg->yy_c_buf_p; + + /* undo effects of setting up yytext */ + *yy_cp = yyg->yy_hold_char; + + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + { /* need to shift things up to make room */ + /* +2 for EOB chars. */ + int number_to_move = yyg->yy_n_chars + 2; + char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; + char *source = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; + + while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + *--dest = *--source; + + yy_cp += (int) (dest - source); + yy_bp += (int) (dest - source); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = + yyg->yy_n_chars = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size; + + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + YY_FATAL_ERROR( "flex scanner push-back overflow" ); + } + + *--yy_cp = (char) c; + + if ( c == '\n' ){ + --yylineno; + } + + yyg->yytext_ptr = yy_bp; + yyg->yy_hold_char = *yy_cp; + yyg->yy_c_buf_p = yy_cp; +} + +#endif + +#ifndef YY_NO_INPUT +#ifdef __cplusplus + static int yyinput (yyscan_t yyscanner) +#else + static int input (yyscan_t yyscanner) +#endif + +{ + int c; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + *yyg->yy_c_buf_p = yyg->yy_hold_char; + + if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) + /* This was really a NUL. */ + *yyg->yy_c_buf_p = '\0'; + + else + { /* need more input */ + int offset = yyg->yy_c_buf_p - yyg->yytext_ptr; + ++yyg->yy_c_buf_p; + + switch ( yy_get_next_buffer( yyscanner ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + cmListFileLexer_yyrestart(yyin ,yyscanner); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( cmListFileLexer_yywrap(yyscanner ) ) + return 0; + + if ( ! yyg->yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(yyscanner); +#else + return input(yyscanner); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = yyg->yytext_ptr + offset; + break; + } + } + } + + c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ + *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ + yyg->yy_hold_char = *++yyg->yy_c_buf_p; + + if ( c == '\n' ) + + do{ yylineno++; + yycolumn=0; + }while(0) +; + + return c; +} +#endif /* ifndef YY_NO_INPUT */ + +/** Immediately switch to a different input stream. + * @param input_file A readable stream. + * @param yyscanner The scanner object. + * @note This function does not reset the start condition to @c INITIAL . + */ + void cmListFileLexer_yyrestart (FILE * input_file , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if ( ! YY_CURRENT_BUFFER ){ + cmListFileLexer_yyensure_buffer_stack (yyscanner); + YY_CURRENT_BUFFER_LVALUE = + cmListFileLexer_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); + } + + cmListFileLexer_yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner); + cmListFileLexer_yy_load_buffer_state(yyscanner ); +} + +/** Switch to a different input buffer. + * @param new_buffer The new input buffer. + * @param yyscanner The scanner object. + */ + void cmListFileLexer_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* TODO. We should be able to replace this entire function body + * with + * cmListFileLexer_yypop_buffer_state(); + * cmListFileLexer_yypush_buffer_state(new_buffer); + */ + cmListFileLexer_yyensure_buffer_stack (yyscanner); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + cmListFileLexer_yy_load_buffer_state(yyscanner ); + + /* We don't actually know whether we did this switch during + * EOF (cmListFileLexer_yywrap()) processing, but the only time this flag + * is looked at is after cmListFileLexer_yywrap() is called, so it's safe + * to go ahead and always set it. + */ + yyg->yy_did_buffer_switch_on_eof = 1; +} + +static void cmListFileLexer_yy_load_buffer_state (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + yyg->yy_hold_char = *yyg->yy_c_buf_p; +} + +/** Allocate and initialize an input buffer state. + * @param file A readable stream. + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. + * @param yyscanner The scanner object. + * @return the allocated buffer state. + */ + YY_BUFFER_STATE cmListFileLexer_yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) +{ + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) cmListFileLexer_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in cmListFileLexer_yy_create_buffer()" ); + + b->yy_buf_size = (yy_size_t)size; + + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) cmListFileLexer_yyalloc(b->yy_buf_size + 2 ,yyscanner ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in cmListFileLexer_yy_create_buffer()" ); + + b->yy_is_our_buffer = 1; + + cmListFileLexer_yy_init_buffer(b,file ,yyscanner); + + return b; +} + +/** Destroy the buffer. + * @param b a buffer created with cmListFileLexer_yy_create_buffer() + * @param yyscanner The scanner object. + */ + void cmListFileLexer_yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if ( ! b ) + return; + + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + cmListFileLexer_yyfree((void *) b->yy_ch_buf ,yyscanner ); + + cmListFileLexer_yyfree((void *) b ,yyscanner ); +} + +/* Initializes or reinitializes a buffer. + * This function is sometimes called more than once on the same buffer, + * such as during a cmListFileLexer_yyrestart() or at EOF. + */ + static void cmListFileLexer_yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) + +{ + int oerrno = errno; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + cmListFileLexer_yy_flush_buffer(b ,yyscanner); + + b->yy_input_file = file; + b->yy_fill_buffer = 1; + + /* If b is the current buffer, then cmListFileLexer_yy_init_buffer was _probably_ + * called from cmListFileLexer_yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } + + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; + + errno = oerrno; +} + +/** Discard all buffered characters. On the next scan, YY_INPUT will be called. + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. + * @param yyscanner The scanner object. + */ + void cmListFileLexer_yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if ( ! b ) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == YY_CURRENT_BUFFER ) + cmListFileLexer_yy_load_buffer_state(yyscanner ); +} + +/** Pushes the new state onto the stack. The new state becomes + * the current state. This function will allocate the stack + * if necessary. + * @param new_buffer The new state. + * @param yyscanner The scanner object. + */ +void cmListFileLexer_yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if (new_buffer == NULL) + return; + + cmListFileLexer_yyensure_buffer_stack(yyscanner); + + /* This block is copied from cmListFileLexer_yy_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + yyg->yy_buffer_stack_top++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from cmListFileLexer_yy_switch_to_buffer. */ + cmListFileLexer_yy_load_buffer_state(yyscanner ); + yyg->yy_did_buffer_switch_on_eof = 1; +} + +/** Removes and deletes the top of the stack, if present. + * The next element becomes the new top. + * @param yyscanner The scanner object. + */ +void cmListFileLexer_yypop_buffer_state (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if (!YY_CURRENT_BUFFER) + return; + + cmListFileLexer_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner); + YY_CURRENT_BUFFER_LVALUE = NULL; + if (yyg->yy_buffer_stack_top > 0) + --yyg->yy_buffer_stack_top; + + if (YY_CURRENT_BUFFER) { + cmListFileLexer_yy_load_buffer_state(yyscanner ); + yyg->yy_did_buffer_switch_on_eof = 1; + } +} + +/* Allocates the stack if it does not exist. + * Guarantees space for at least one push. + */ +static void cmListFileLexer_yyensure_buffer_stack (yyscan_t yyscanner) +{ + int num_to_alloc; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if (!yyg->yy_buffer_stack) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ + yyg->yy_buffer_stack = (struct yy_buffer_state**)cmListFileLexer_yyalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + , yyscanner); + if ( ! yyg->yy_buffer_stack ) + YY_FATAL_ERROR( "out of dynamic memory in cmListFileLexer_yyensure_buffer_stack()" ); + + memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + yyg->yy_buffer_stack_max = num_to_alloc; + yyg->yy_buffer_stack_top = 0; + return; + } + + if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + yy_size_t grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = yyg->yy_buffer_stack_max + grow_size; + yyg->yy_buffer_stack = (struct yy_buffer_state**)cmListFileLexer_yyrealloc + (yyg->yy_buffer_stack, + num_to_alloc * sizeof(struct yy_buffer_state*) + , yyscanner); + if ( ! yyg->yy_buffer_stack ) + YY_FATAL_ERROR( "out of dynamic memory in cmListFileLexer_yyensure_buffer_stack()" ); + + /* zero only the new slots.*/ + memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); + yyg->yy_buffer_stack_max = num_to_alloc; + } +} + +/** Setup the input buffer state to scan directly from a user-specified character buffer. + * @param base the character buffer + * @param size the size in bytes of the character buffer + * @param yyscanner The scanner object. + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE cmListFileLexer_yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) +{ + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return NULL; + + b = (YY_BUFFER_STATE) cmListFileLexer_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in cmListFileLexer_yy_scan_buffer()" ); + + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = NULL; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + cmListFileLexer_yy_switch_to_buffer(b ,yyscanner ); + + return b; +} + +/** Setup the input buffer state to scan a string. The next call to cmListFileLexer_yylex() will + * scan from a @e copy of @a str. + * @param yystr a NUL-terminated string to scan + * @param yyscanner The scanner object. + * @return the newly allocated buffer state object. + * @note If you want to scan bytes that may contain NUL values, then use + * cmListFileLexer_yy_scan_bytes() instead. + */ +YY_BUFFER_STATE cmListFileLexer_yy_scan_string (yyconst char * yystr , yyscan_t yyscanner) +{ + + return cmListFileLexer_yy_scan_bytes(yystr,(int) strlen(yystr) ,yyscanner); +} + +/** Setup the input buffer state to scan the given bytes. The next call to cmListFileLexer_yylex() will + * scan from a @e copy of @a bytes. + * @param yybytes the byte buffer to scan + * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. + * @param yyscanner The scanner object. + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE cmListFileLexer_yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner) +{ + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + yy_size_t i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = (yy_size_t) _yybytes_len + 2; + buf = (char *) cmListFileLexer_yyalloc(n ,yyscanner ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in cmListFileLexer_yy_scan_bytes()" ); + + for ( i = 0; i < (size_t)_yybytes_len; ++i ) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; + + b = cmListFileLexer_yy_scan_buffer(buf,n ,yyscanner); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in cmListFileLexer_yy_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; +} + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +static void yynoreturn yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + (void) fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); +} + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + yytext[yyleng] = yyg->yy_hold_char; \ + yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ + yyg->yy_hold_char = *yyg->yy_c_buf_p; \ + *yyg->yy_c_buf_p = '\0'; \ + yyleng = yyless_macro_arg; \ + } \ + while ( 0 ) + +/* Accessor methods (get/set functions) to struct members. */ + +/** Get the user-defined data for this scanner. + * @param yyscanner The scanner object. + */ +YY_EXTRA_TYPE cmListFileLexer_yyget_extra (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyextra; +} + +/** Get the current line number. + * @param yyscanner The scanner object. + */ +int cmListFileLexer_yyget_lineno (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if (! YY_CURRENT_BUFFER) + return 0; + + return yylineno; +} + +/** Get the current column number. + * @param yyscanner The scanner object. + */ +int cmListFileLexer_yyget_column (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if (! YY_CURRENT_BUFFER) + return 0; + + return yycolumn; +} + +/** Get the input stream. + * @param yyscanner The scanner object. + */ +FILE *cmListFileLexer_yyget_in (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyin; +} + +/** Get the output stream. + * @param yyscanner The scanner object. + */ +FILE *cmListFileLexer_yyget_out (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyout; +} + +/** Get the length of the current token. + * @param yyscanner The scanner object. + */ +int cmListFileLexer_yyget_leng (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyleng; +} + +/** Get the current token. + * @param yyscanner The scanner object. + */ + +char *cmListFileLexer_yyget_text (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yytext; +} + +/** Set the user-defined data. This data is never touched by the scanner. + * @param user_defined The data to be associated with this scanner. + * @param yyscanner The scanner object. + */ +void cmListFileLexer_yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyextra = user_defined ; +} + +/** Set the current line number. + * @param _line_number line number + * @param yyscanner The scanner object. + */ +void cmListFileLexer_yyset_lineno (int _line_number , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* lineno is only valid if an input buffer exists. */ + if (! YY_CURRENT_BUFFER ) + YY_FATAL_ERROR( "cmListFileLexer_yyset_lineno called with no buffer" ); + + yylineno = _line_number; +} + +/** Set the current column. + * @param _column_no column number + * @param yyscanner The scanner object. + */ +void cmListFileLexer_yyset_column (int _column_no , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* column is only valid if an input buffer exists. */ + if (! YY_CURRENT_BUFFER ) + YY_FATAL_ERROR( "cmListFileLexer_yyset_column called with no buffer" ); + + yycolumn = _column_no; +} + +/** Set the input stream. This does not discard the current + * input buffer. + * @param _in_str A readable stream. + * @param yyscanner The scanner object. + * @see cmListFileLexer_yy_switch_to_buffer + */ +void cmListFileLexer_yyset_in (FILE * _in_str , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyin = _in_str ; +} + +void cmListFileLexer_yyset_out (FILE * _out_str , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyout = _out_str ; +} + +int cmListFileLexer_yyget_debug (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yy_flex_debug; +} + +void cmListFileLexer_yyset_debug (int _bdebug , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yy_flex_debug = _bdebug ; +} + +/* Accessor methods for yylval and yylloc */ + +/* User-visible API */ + +/* cmListFileLexer_yylex_init is special because it creates the scanner itself, so it is + * the ONLY reentrant function that doesn't take the scanner as the last argument. + * That's why we explicitly handle the declaration, instead of using our macros. + */ + +int cmListFileLexer_yylex_init(yyscan_t* ptr_yy_globals) + +{ + if (ptr_yy_globals == NULL){ + errno = EINVAL; + return 1; + } + + *ptr_yy_globals = (yyscan_t) cmListFileLexer_yyalloc ( sizeof( struct yyguts_t ), NULL ); + + if (*ptr_yy_globals == NULL){ + errno = ENOMEM; + return 1; + } + + /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); + + return yy_init_globals ( *ptr_yy_globals ); +} + +/* cmListFileLexer_yylex_init_extra has the same functionality as cmListFileLexer_yylex_init, but follows the + * convention of taking the scanner as the last argument. Note however, that + * this is a *pointer* to a scanner, as it will be allocated by this call (and + * is the reason, too, why this function also must handle its own declaration). + * The user defined value in the first argument will be available to cmListFileLexer_yyalloc in + * the yyextra field. + */ + +int cmListFileLexer_yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals ) + +{ + struct yyguts_t dummy_yyguts; + + cmListFileLexer_yyset_extra (yy_user_defined, &dummy_yyguts); + + if (ptr_yy_globals == NULL){ + errno = EINVAL; + return 1; + } + + *ptr_yy_globals = (yyscan_t) cmListFileLexer_yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); + + if (*ptr_yy_globals == NULL){ + errno = ENOMEM; + return 1; + } + + /* By setting to 0xAA, we expose bugs in + yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); + + cmListFileLexer_yyset_extra (yy_user_defined, *ptr_yy_globals); + + return yy_init_globals ( *ptr_yy_globals ); +} + +static int yy_init_globals (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from cmListFileLexer_yylex_destroy(), so don't allocate here. + */ + + yyg->yy_buffer_stack = NULL; + yyg->yy_buffer_stack_top = 0; + yyg->yy_buffer_stack_max = 0; + yyg->yy_c_buf_p = NULL; + yyg->yy_init = 0; + yyg->yy_start = 0; + + yyg->yy_start_stack_ptr = 0; + yyg->yy_start_stack_depth = 0; + yyg->yy_start_stack = NULL; + +/* Defined in main.c */ +#ifdef YY_STDINIT + yyin = stdin; + yyout = stdout; +#else + yyin = NULL; + yyout = NULL; +#endif + + /* For future reference: Set errno on error, since we are called by + * cmListFileLexer_yylex_init() + */ + return 0; +} + +/* cmListFileLexer_yylex_destroy is for both reentrant and non-reentrant scanners. */ +int cmListFileLexer_yylex_destroy (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + cmListFileLexer_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner ); + YY_CURRENT_BUFFER_LVALUE = NULL; + cmListFileLexer_yypop_buffer_state(yyscanner); + } + + /* Destroy the stack itself. */ + cmListFileLexer_yyfree(yyg->yy_buffer_stack ,yyscanner); + yyg->yy_buffer_stack = NULL; + + /* Destroy the start condition stack. */ + cmListFileLexer_yyfree(yyg->yy_start_stack ,yyscanner ); + yyg->yy_start_stack = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * cmListFileLexer_yylex() is called, initialization will occur. */ + yy_init_globals( yyscanner); + + /* Destroy the main struct (reentrant only). */ + cmListFileLexer_yyfree ( yyscanner , yyscanner ); + yyscanner = NULL; + return 0; +} + +/* + * Internal utility routines. + */ + +#ifndef yytext_ptr +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + + int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; +} +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) +{ + int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; +} +#endif + +void *cmListFileLexer_yyalloc (yy_size_t size , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + return malloc(size); +} + +void *cmListFileLexer_yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return realloc(ptr, size); +} + +void cmListFileLexer_yyfree (void * ptr , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + free( (char *) ptr ); /* see cmListFileLexer_yyrealloc() for (char *) cast */ +} + +#define YYTABLES_NAME "yytables" + +#line 265 "cmListFileLexer.in.l" + + + +/*--------------------------------------------------------------------------*/ +static void cmListFileLexerSetToken(cmListFileLexer* lexer, const char* text, + int length) +{ + /* Set the token line and column number. */ + lexer->token.line = lexer->line; + lexer->token.column = lexer->column; + + /* Use the same buffer if possible. */ + if (lexer->token.text) { + if (text && length < lexer->size) { + strcpy(lexer->token.text, text); + lexer->token.length = length; + return; + } + free(lexer->token.text); + lexer->token.text = 0; + lexer->size = 0; + } + + /* Need to extend the buffer. */ + if (text) { + lexer->token.text = strdup(text); + lexer->token.length = length; + lexer->size = length + 1; + } else { + lexer->token.length = 0; + } +} + +/*--------------------------------------------------------------------------*/ +static void cmListFileLexerAppend(cmListFileLexer* lexer, const char* text, + int length) +{ + char* temp; + int newSize; + + /* If the appended text will fit in the buffer, do not reallocate. */ + newSize = lexer->token.length + length + 1; + if (lexer->token.text && newSize <= lexer->size) { + strcpy(lexer->token.text + lexer->token.length, text); + lexer->token.length += length; + return; + } + + /* We need to extend the buffer. */ + temp = malloc(newSize); + if (lexer->token.text) { + memcpy(temp, lexer->token.text, lexer->token.length); + free(lexer->token.text); + } + memcpy(temp + lexer->token.length, text, length); + temp[lexer->token.length + length] = 0; + lexer->token.text = temp; + lexer->token.length += length; + lexer->size = newSize; +} + +/*--------------------------------------------------------------------------*/ +static int cmListFileLexerInput(cmListFileLexer* lexer, char* buffer, + size_t bufferSize) +{ + if (lexer) { + if (lexer->file) { + /* Convert CRLF -> LF explicitly. The C FILE "t"ext mode + does not convert newlines on all platforms. Move any + trailing CR to the start of the buffer for the next read. */ + size_t cr = lexer->cr; + size_t n; + buffer[0] = '\r'; + n = fread(buffer + cr, 1, bufferSize - cr, lexer->file); + if (n) { + char* o = buffer; + const char* i = buffer; + const char* e; + n += cr; + cr = (buffer[n - 1] == '\r') ? 1 : 0; + e = buffer + n - cr; + while (i != e) { + if (i[0] == '\r' && i[1] == '\n') { + ++i; + } + *o++ = *i++; + } + n = o - buffer; + } else { + n = cr; + cr = 0; + } + lexer->cr = cr; + return n; + } else if (lexer->string_left) { + int length = lexer->string_left; + if ((int)bufferSize < length) { + length = (int)bufferSize; + } + memcpy(buffer, lexer->string_position, length); + lexer->string_position += length; + lexer->string_left -= length; + return length; + } + } + return 0; +} + +/*--------------------------------------------------------------------------*/ +static void cmListFileLexerInit(cmListFileLexer* lexer) +{ + if (lexer->file || lexer->string_buffer) { + cmListFileLexer_yylex_init(&lexer->scanner); + cmListFileLexer_yyset_extra(lexer, lexer->scanner); + } +} + +/*--------------------------------------------------------------------------*/ +static void cmListFileLexerDestroy(cmListFileLexer* lexer) +{ + cmListFileLexerSetToken(lexer, 0, 0); + if (lexer->file || lexer->string_buffer) { + cmListFileLexer_yylex_destroy(lexer->scanner); + if (lexer->file) { + fclose(lexer->file); + lexer->file = 0; + } + if (lexer->string_buffer) { + free(lexer->string_buffer); + lexer->string_buffer = 0; + lexer->string_left = 0; + lexer->string_position = 0; + } + } +} + +/*--------------------------------------------------------------------------*/ +cmListFileLexer* cmListFileLexer_New(void) +{ + cmListFileLexer* lexer = (cmListFileLexer*)malloc(sizeof(cmListFileLexer)); + if (!lexer) { + return 0; + } + memset(lexer, 0, sizeof(*lexer)); + lexer->line = 1; + lexer->column = 1; + return lexer; +} + +/*--------------------------------------------------------------------------*/ +void cmListFileLexer_Delete(cmListFileLexer* lexer) +{ + cmListFileLexer_SetFileName(lexer, 0, 0); + free(lexer); +} + +/*--------------------------------------------------------------------------*/ +static cmListFileLexer_BOM cmListFileLexer_ReadBOM(FILE* f) +{ + unsigned char b[2]; + if (fread(b, 1, 2, f) == 2) { + if (b[0] == 0xEF && b[1] == 0xBB) { + if (fread(b, 1, 1, f) == 1 && b[0] == 0xBF) { + return cmListFileLexer_BOM_UTF8; + } + } else if (b[0] == 0xFE && b[1] == 0xFF) { + /* UTF-16 BE */ + return cmListFileLexer_BOM_UTF16BE; + } else if (b[0] == 0 && b[1] == 0) { + if (fread(b, 1, 2, f) == 2 && b[0] == 0xFE && b[1] == 0xFF) { + return cmListFileLexer_BOM_UTF32BE; + } + } else if (b[0] == 0xFF && b[1] == 0xFE) { + fpos_t p; + fgetpos(f, &p); + if (fread(b, 1, 2, f) == 2 && b[0] == 0 && b[1] == 0) { + return cmListFileLexer_BOM_UTF32LE; + } + if (fsetpos(f, &p) != 0) { + return cmListFileLexer_BOM_Broken; + } + return cmListFileLexer_BOM_UTF16LE; + } + } + if (fseek(f, 0, SEEK_SET) != 0) { + return cmListFileLexer_BOM_Broken; + } + return cmListFileLexer_BOM_None; +} + +/*--------------------------------------------------------------------------*/ +int cmListFileLexer_SetFileName(cmListFileLexer* lexer, const char* name, + cmListFileLexer_BOM* bom) +{ + int result = 1; + cmListFileLexerDestroy(lexer); + if (name) { +#ifdef _WIN32 + wchar_t* wname = cmsysEncoding_DupToWide(name); + lexer->file = _wfopen(wname, L"rb"); + free(wname); +#else + lexer->file = fopen(name, "rb"); +#endif + if (lexer->file) { + if (bom) { + *bom = cmListFileLexer_ReadBOM(lexer->file); + } + } else { + result = 0; + } + } + cmListFileLexerInit(lexer); + return result; +} + +/*--------------------------------------------------------------------------*/ +int cmListFileLexer_SetString(cmListFileLexer* lexer, const char* text) +{ + int result = 1; + cmListFileLexerDestroy(lexer); + if (text) { + int length = (int)strlen(text); + lexer->string_buffer = (char*)malloc(length + 1); + if (lexer->string_buffer) { + strcpy(lexer->string_buffer, text); + lexer->string_position = lexer->string_buffer; + lexer->string_left = length; + } else { + result = 0; + } + } + cmListFileLexerInit(lexer); + return result; +} + +/*--------------------------------------------------------------------------*/ +cmListFileLexer_Token* cmListFileLexer_Scan(cmListFileLexer* lexer) +{ + if (!lexer->file) { + return 0; + } + if (cmListFileLexer_yylex(lexer->scanner, lexer)) { + return &lexer->token; + } else { + cmListFileLexer_SetFileName(lexer, 0, 0); + return 0; + } +} + +/*--------------------------------------------------------------------------*/ +long cmListFileLexer_GetCurrentLine(cmListFileLexer* lexer) +{ + if (lexer->file) { + return lexer->line; + } else { + return 0; + } +} + +/*--------------------------------------------------------------------------*/ +long cmListFileLexer_GetCurrentColumn(cmListFileLexer* lexer) +{ + if (lexer->file) { + return lexer->column; + } else { + return 0; + } +} + +/*--------------------------------------------------------------------------*/ +const char* cmListFileLexer_GetTypeAsString(cmListFileLexer* lexer, + cmListFileLexer_Type type) +{ + (void)lexer; + switch (type) { + case cmListFileLexer_Token_None: + return "nothing"; + case cmListFileLexer_Token_Space: + return "space"; + case cmListFileLexer_Token_Newline: + return "newline"; + case cmListFileLexer_Token_Identifier: + return "identifier"; + case cmListFileLexer_Token_ParenLeft: + return "left paren"; + case cmListFileLexer_Token_ParenRight: + return "right paren"; + case cmListFileLexer_Token_ArgumentUnquoted: + return "unquoted argument"; + case cmListFileLexer_Token_ArgumentQuoted: + return "quoted argument"; + case cmListFileLexer_Token_ArgumentBracket: + return "bracket argument"; + case cmListFileLexer_Token_CommentBracket: + return "bracket comment"; + case cmListFileLexer_Token_BadCharacter: + return "bad character"; + case cmListFileLexer_Token_BadBracket: + return "unterminated bracket"; + case cmListFileLexer_Token_BadString: + return "unterminated string"; + } + return "unknown token"; +} diff --git a/Source/LexerParser/cmListFileLexer.in.l b/Source/LexerParser/cmListFileLexer.in.l new file mode 100644 index 0000000..5152dbf --- /dev/null +++ b/Source/LexerParser/cmListFileLexer.in.l @@ -0,0 +1,564 @@ +%{ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +/* + +This file must be translated to C and modified to build everywhere. + +Run flex >= 2.6 like this: + + flex --nounistd -DFLEXINT_H --prefix=cmListFileLexer_yy -ocmListFileLexer.c cmListFileLexer.in.l + +Modify cmListFileLexer.c: + - remove trailing whitespace: sed -i 's/\s*$//' cmListFileLexer.c + - remove blank lines at end of file + - #include "cmStandardLexer.h" at the top + - add cast in yy_scan_bytes for loop condition of _yybytes_len to size_t + - change type of variable yyl under yy_find_action from yy_size_t to int + +*/ + +/* IWYU pragma: no_forward_declare yyguts_t */ + +#ifdef WIN32 +#include "cmsys/Encoding.h" +#endif + +/* Setup the proper cmListFileLexer_yylex declaration. */ +#define YY_EXTRA_TYPE cmListFileLexer* +#define YY_DECL int cmListFileLexer_yylex (yyscan_t yyscanner, cmListFileLexer* lexer) + +#include "cmListFileLexer.h" + +/*--------------------------------------------------------------------------*/ +struct cmListFileLexer_s +{ + cmListFileLexer_Token token; + int bracket; + int comment; + int line; + int column; + int size; + FILE* file; + size_t cr; + char* string_buffer; + char* string_position; + int string_left; + yyscan_t scanner; +}; + +static void cmListFileLexerSetToken(cmListFileLexer* lexer, const char* text, + int length); +static void cmListFileLexerAppend(cmListFileLexer* lexer, const char* text, + int length); +static int cmListFileLexerInput(cmListFileLexer* lexer, char* buffer, + size_t bufferSize); +static void cmListFileLexerInit(cmListFileLexer* lexer); +static void cmListFileLexerDestroy(cmListFileLexer* lexer); + +/* Replace the lexer input function. */ +#undef YY_INPUT +#define YY_INPUT(buf, result, max_size) \ + { result = cmListFileLexerInput(cmListFileLexer_yyget_extra(yyscanner), buf, max_size); } + +/*--------------------------------------------------------------------------*/ +%} + +%option reentrant +%option yylineno +%option noyywrap +%pointer +%x STRING +%x BRACKET +%x BRACKETEND +%x COMMENT + +MAKEVAR \$\([A-Za-z0-9_]*\) +UNQUOTED ([^ \t\r\n\(\)#\\\"[=]|\\.) +LEGACY {MAKEVAR}|{UNQUOTED}|\"({MAKEVAR}|{UNQUOTED}|[ \t[=])*\" + +%% + +\n { + lexer->token.type = cmListFileLexer_Token_Newline; + cmListFileLexerSetToken(lexer, yytext, yyleng); + ++lexer->line; + lexer->column = 1; + BEGIN(INITIAL); + return 1; +} + +#?\[=*\[\n? { + const char* bracket = yytext; + lexer->comment = yytext[0] == '#'; + if (lexer->comment) { + lexer->token.type = cmListFileLexer_Token_CommentBracket; + bracket += 1; + } else { + lexer->token.type = cmListFileLexer_Token_ArgumentBracket; + } + cmListFileLexerSetToken(lexer, "", 0); + lexer->bracket = strchr(bracket+1, '[') - bracket; + if (yytext[yyleng-1] == '\n') { + ++lexer->line; + lexer->column = 1; + } else { + lexer->column += yyleng; + } + BEGIN(BRACKET); +} + +# { + lexer->column += yyleng; + BEGIN(COMMENT); +} + +.* { + lexer->column += yyleng; +} + +\( { + lexer->token.type = cmListFileLexer_Token_ParenLeft; + cmListFileLexerSetToken(lexer, yytext, yyleng); + lexer->column += yyleng; + return 1; +} + +\) { + lexer->token.type = cmListFileLexer_Token_ParenRight; + cmListFileLexerSetToken(lexer, yytext, yyleng); + lexer->column += yyleng; + return 1; +} + +[A-Za-z_][A-Za-z0-9_]* { + lexer->token.type = cmListFileLexer_Token_Identifier; + cmListFileLexerSetToken(lexer, yytext, yyleng); + lexer->column += yyleng; + return 1; +} + +\]=* { + /* Handle ]]====]=======]*/ + cmListFileLexerAppend(lexer, yytext, yyleng); + lexer->column += yyleng; + if (yyleng == lexer->bracket) { + BEGIN(BRACKETEND); + } +} + +\] { + lexer->column += yyleng; + /* Erase the partial bracket from the token. */ + lexer->token.length -= lexer->bracket; + lexer->token.text[lexer->token.length] = 0; + BEGIN(INITIAL); + return 1; +} + +([^]\n])+ { + cmListFileLexerAppend(lexer, yytext, yyleng); + lexer->column += yyleng; +} + +\n { + cmListFileLexerAppend(lexer, yytext, yyleng); + ++lexer->line; + lexer->column = 1; + BEGIN(BRACKET); +} + +. { + cmListFileLexerAppend(lexer, yytext, yyleng); + lexer->column += yyleng; + BEGIN(BRACKET); +} + +<> { + lexer->token.type = cmListFileLexer_Token_BadBracket; + BEGIN(INITIAL); + return 1; +} + +({UNQUOTED}|=|\[=*{UNQUOTED})({UNQUOTED}|[[=])* { + lexer->token.type = cmListFileLexer_Token_ArgumentUnquoted; + cmListFileLexerSetToken(lexer, yytext, yyleng); + lexer->column += yyleng; + return 1; +} + +({MAKEVAR}|{UNQUOTED}|=|\[=*{LEGACY})({LEGACY}|[[=])* { + lexer->token.type = cmListFileLexer_Token_ArgumentUnquoted; + cmListFileLexerSetToken(lexer, yytext, yyleng); + lexer->column += yyleng; + return 1; +} + +\[ { + lexer->token.type = cmListFileLexer_Token_ArgumentUnquoted; + cmListFileLexerSetToken(lexer, yytext, yyleng); + lexer->column += yyleng; + return 1; +} + +\" { + lexer->token.type = cmListFileLexer_Token_ArgumentQuoted; + cmListFileLexerSetToken(lexer, "", 0); + lexer->column += yyleng; + BEGIN(STRING); +} + +([^\\\n\"]|\\.)+ { + cmListFileLexerAppend(lexer, yytext, yyleng); + lexer->column += yyleng; +} + +\\\n { + /* Continuation: text is not part of string */ + ++lexer->line; + lexer->column = 1; +} + +\n { + cmListFileLexerAppend(lexer, yytext, yyleng); + ++lexer->line; + lexer->column = 1; +} + +\" { + lexer->column += yyleng; + BEGIN(INITIAL); + return 1; +} + +. { + cmListFileLexerAppend(lexer, yytext, yyleng); + lexer->column += yyleng; +} + +<> { + lexer->token.type = cmListFileLexer_Token_BadString; + BEGIN(INITIAL); + return 1; +} + +[ \t\r]+ { + lexer->token.type = cmListFileLexer_Token_Space; + cmListFileLexerSetToken(lexer, yytext, yyleng); + lexer->column += yyleng; + return 1; +} + +. { + lexer->token.type = cmListFileLexer_Token_BadCharacter; + cmListFileLexerSetToken(lexer, yytext, yyleng); + lexer->column += yyleng; + return 1; +} + +<> { + lexer->token.type = cmListFileLexer_Token_None; + cmListFileLexerSetToken(lexer, 0, 0); + return 0; +} + +%% + +/*--------------------------------------------------------------------------*/ +static void cmListFileLexerSetToken(cmListFileLexer* lexer, const char* text, + int length) +{ + /* Set the token line and column number. */ + lexer->token.line = lexer->line; + lexer->token.column = lexer->column; + + /* Use the same buffer if possible. */ + if (lexer->token.text) { + if (text && length < lexer->size) { + strcpy(lexer->token.text, text); + lexer->token.length = length; + return; + } + free(lexer->token.text); + lexer->token.text = 0; + lexer->size = 0; + } + + /* Need to extend the buffer. */ + if (text) { + lexer->token.text = strdup(text); + lexer->token.length = length; + lexer->size = length + 1; + } else { + lexer->token.length = 0; + } +} + +/*--------------------------------------------------------------------------*/ +static void cmListFileLexerAppend(cmListFileLexer* lexer, const char* text, + int length) +{ + char* temp; + int newSize; + + /* If the appended text will fit in the buffer, do not reallocate. */ + newSize = lexer->token.length + length + 1; + if (lexer->token.text && newSize <= lexer->size) { + strcpy(lexer->token.text + lexer->token.length, text); + lexer->token.length += length; + return; + } + + /* We need to extend the buffer. */ + temp = malloc(newSize); + if (lexer->token.text) { + memcpy(temp, lexer->token.text, lexer->token.length); + free(lexer->token.text); + } + memcpy(temp + lexer->token.length, text, length); + temp[lexer->token.length + length] = 0; + lexer->token.text = temp; + lexer->token.length += length; + lexer->size = newSize; +} + +/*--------------------------------------------------------------------------*/ +static int cmListFileLexerInput(cmListFileLexer* lexer, char* buffer, + size_t bufferSize) +{ + if (lexer) { + if (lexer->file) { + /* Convert CRLF -> LF explicitly. The C FILE "t"ext mode + does not convert newlines on all platforms. Move any + trailing CR to the start of the buffer for the next read. */ + size_t cr = lexer->cr; + size_t n; + buffer[0] = '\r'; + n = fread(buffer + cr, 1, bufferSize - cr, lexer->file); + if (n) { + char* o = buffer; + const char* i = buffer; + const char* e; + n += cr; + cr = (buffer[n - 1] == '\r') ? 1 : 0; + e = buffer + n - cr; + while (i != e) { + if (i[0] == '\r' && i[1] == '\n') { + ++i; + } + *o++ = *i++; + } + n = o - buffer; + } else { + n = cr; + cr = 0; + } + lexer->cr = cr; + return n; + } else if (lexer->string_left) { + int length = lexer->string_left; + if ((int)bufferSize < length) { + length = (int)bufferSize; + } + memcpy(buffer, lexer->string_position, length); + lexer->string_position += length; + lexer->string_left -= length; + return length; + } + } + return 0; +} + +/*--------------------------------------------------------------------------*/ +static void cmListFileLexerInit(cmListFileLexer* lexer) +{ + if (lexer->file || lexer->string_buffer) { + cmListFileLexer_yylex_init(&lexer->scanner); + cmListFileLexer_yyset_extra(lexer, lexer->scanner); + } +} + +/*--------------------------------------------------------------------------*/ +static void cmListFileLexerDestroy(cmListFileLexer* lexer) +{ + cmListFileLexerSetToken(lexer, 0, 0); + if (lexer->file || lexer->string_buffer) { + cmListFileLexer_yylex_destroy(lexer->scanner); + if (lexer->file) { + fclose(lexer->file); + lexer->file = 0; + } + if (lexer->string_buffer) { + free(lexer->string_buffer); + lexer->string_buffer = 0; + lexer->string_left = 0; + lexer->string_position = 0; + } + } +} + +/*--------------------------------------------------------------------------*/ +cmListFileLexer* cmListFileLexer_New(void) +{ + cmListFileLexer* lexer = (cmListFileLexer*)malloc(sizeof(cmListFileLexer)); + if (!lexer) { + return 0; + } + memset(lexer, 0, sizeof(*lexer)); + lexer->line = 1; + lexer->column = 1; + return lexer; +} + +/*--------------------------------------------------------------------------*/ +void cmListFileLexer_Delete(cmListFileLexer* lexer) +{ + cmListFileLexer_SetFileName(lexer, 0, 0); + free(lexer); +} + +/*--------------------------------------------------------------------------*/ +static cmListFileLexer_BOM cmListFileLexer_ReadBOM(FILE* f) +{ + unsigned char b[2]; + if (fread(b, 1, 2, f) == 2) { + if (b[0] == 0xEF && b[1] == 0xBB) { + if (fread(b, 1, 1, f) == 1 && b[0] == 0xBF) { + return cmListFileLexer_BOM_UTF8; + } + } else if (b[0] == 0xFE && b[1] == 0xFF) { + /* UTF-16 BE */ + return cmListFileLexer_BOM_UTF16BE; + } else if (b[0] == 0 && b[1] == 0) { + if (fread(b, 1, 2, f) == 2 && b[0] == 0xFE && b[1] == 0xFF) { + return cmListFileLexer_BOM_UTF32BE; + } + } else if (b[0] == 0xFF && b[1] == 0xFE) { + fpos_t p; + fgetpos(f, &p); + if (fread(b, 1, 2, f) == 2 && b[0] == 0 && b[1] == 0) { + return cmListFileLexer_BOM_UTF32LE; + } + fsetpos(f, &p); + return cmListFileLexer_BOM_UTF16LE; + } + } + rewind(f); + return cmListFileLexer_BOM_None; +} + +/*--------------------------------------------------------------------------*/ +int cmListFileLexer_SetFileName(cmListFileLexer* lexer, const char* name, + cmListFileLexer_BOM* bom) +{ + int result = 1; + cmListFileLexerDestroy(lexer); + if (name) { +#ifdef _WIN32 + wchar_t* wname = cmsysEncoding_DupToWide(name); + lexer->file = _wfopen(wname, L"rb"); + free(wname); +#else + lexer->file = fopen(name, "rb"); +#endif + if (lexer->file) { + if (bom) { + *bom = cmListFileLexer_ReadBOM(lexer->file); + } + } else { + result = 0; + } + } + cmListFileLexerInit(lexer); + return result; +} + +/*--------------------------------------------------------------------------*/ +int cmListFileLexer_SetString(cmListFileLexer* lexer, const char* text) +{ + int result = 1; + cmListFileLexerDestroy(lexer); + if (text) { + int length = (int)strlen(text); + lexer->string_buffer = (char*)malloc(length + 1); + if (lexer->string_buffer) { + strcpy(lexer->string_buffer, text); + lexer->string_position = lexer->string_buffer; + lexer->string_left = length; + } else { + result = 0; + } + } + cmListFileLexerInit(lexer); + return result; +} + +/*--------------------------------------------------------------------------*/ +cmListFileLexer_Token* cmListFileLexer_Scan(cmListFileLexer* lexer) +{ + if (!lexer->file) { + return 0; + } + if (cmListFileLexer_yylex(lexer->scanner, lexer)) { + return &lexer->token; + } else { + cmListFileLexer_SetFileName(lexer, 0, 0); + return 0; + } +} + +/*--------------------------------------------------------------------------*/ +long cmListFileLexer_GetCurrentLine(cmListFileLexer* lexer) +{ + if (lexer->file) { + return lexer->line; + } else { + return 0; + } +} + +/*--------------------------------------------------------------------------*/ +long cmListFileLexer_GetCurrentColumn(cmListFileLexer* lexer) +{ + if (lexer->file) { + return lexer->column; + } else { + return 0; + } +} + +/*--------------------------------------------------------------------------*/ +const char* cmListFileLexer_GetTypeAsString(cmListFileLexer* lexer, + cmListFileLexer_Type type) +{ + (void)lexer; + switch (type) { + case cmListFileLexer_Token_None: + return "nothing"; + case cmListFileLexer_Token_Space: + return "space"; + case cmListFileLexer_Token_Newline: + return "newline"; + case cmListFileLexer_Token_Identifier: + return "identifier"; + case cmListFileLexer_Token_ParenLeft: + return "left paren"; + case cmListFileLexer_Token_ParenRight: + return "right paren"; + case cmListFileLexer_Token_ArgumentUnquoted: + return "unquoted argument"; + case cmListFileLexer_Token_ArgumentQuoted: + return "quoted argument"; + case cmListFileLexer_Token_ArgumentBracket: + return "bracket argument"; + case cmListFileLexer_Token_CommentBracket: + return "bracket comment"; + case cmListFileLexer_Token_BadCharacter: + return "bad character"; + case cmListFileLexer_Token_BadBracket: + return "unterminated bracket"; + case cmListFileLexer_Token_BadString: + return "unterminated string"; + } + return "unknown token"; +} diff --git a/Source/cmCommandArgumentLexer.cxx b/Source/cmCommandArgumentLexer.cxx deleted file mode 100644 index 12dce37..0000000 --- a/Source/cmCommandArgumentLexer.cxx +++ /dev/null @@ -1,2072 +0,0 @@ -#include "cmStandardLexer.h" -#line 2 "cmCommandArgumentLexer.cxx" - -#line 4 "cmCommandArgumentLexer.cxx" - -#define FLEXINT_H 1 -#define YY_INT_ALIGNED short int - -/* A lexical scanner generated by flex */ - -#define FLEX_SCANNER -#define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 6 -#define YY_FLEX_SUBMINOR_VERSION 1 -#if YY_FLEX_SUBMINOR_VERSION > 0 -#define FLEX_BETA -#endif - -/* First, we deal with platform-specific or compiler-specific issues. */ - -/* begin standard C headers. */ -#include -#include -#include -#include - -/* end standard C headers. */ - -/* flex integer type definitions */ - -#ifndef FLEXINT_H -#define FLEXINT_H - -/* C99 systems have . Non-C99 systems may or may not. */ - -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - -/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. - */ -#ifndef __STDC_LIMIT_MACROS -#define __STDC_LIMIT_MACROS 1 -#endif - -#include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; -typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; -typedef uint32_t flex_uint32_t; -#else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; -typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; - -/* Limits of integral types. */ -#ifndef INT8_MIN -#define INT8_MIN (-128) -#endif -#ifndef INT16_MIN -#define INT16_MIN (-32767-1) -#endif -#ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) -#endif -#ifndef INT8_MAX -#define INT8_MAX (127) -#endif -#ifndef INT16_MAX -#define INT16_MAX (32767) -#endif -#ifndef INT32_MAX -#define INT32_MAX (2147483647) -#endif -#ifndef UINT8_MAX -#define UINT8_MAX (255U) -#endif -#ifndef UINT16_MAX -#define UINT16_MAX (65535U) -#endif -#ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) -#endif - -#endif /* ! C99 */ - -#endif /* ! FLEXINT_H */ - -/* TODO: this is always defined, so inline it */ -#define yyconst const - -#if defined(__GNUC__) && __GNUC__ >= 3 -#define yynoreturn __attribute__((__noreturn__)) -#else -#define yynoreturn -#endif - -/* Returned upon end-of-file. */ -#define YY_NULL 0 - -/* Promotes a possibly negative, possibly signed char to an unsigned - * integer for use as an array index. If the signed char is negative, - * we want to instead treat it as an 8-bit unsigned char, hence the - * double cast. - */ -#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) - -/* An opaque pointer. */ -#ifndef YY_TYPEDEF_YY_SCANNER_T -#define YY_TYPEDEF_YY_SCANNER_T -typedef void* yyscan_t; -#endif - -/* For convenience, these vars (plus the bison vars far below) - are macros in the reentrant scanner. */ -#define yyin yyg->yyin_r -#define yyout yyg->yyout_r -#define yyextra yyg->yyextra_r -#define yyleng yyg->yyleng_r -#define yytext yyg->yytext_r -#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) -#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) -#define yy_flex_debug yyg->yy_flex_debug_r - -/* Enter a start condition. This macro really ought to take a parameter, - * but we do it the disgusting crufty way forced on us by the ()-less - * definition of BEGIN. - */ -#define BEGIN yyg->yy_start = 1 + 2 * - -/* Translate the current start state into a value that can be later handed - * to BEGIN to return to the state. The YYSTATE alias is for lex - * compatibility. - */ -#define YY_START ((yyg->yy_start - 1) / 2) -#define YYSTATE YY_START - -/* Action number for EOF rule of a given start state. */ -#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) - -/* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE cmCommandArgument_yyrestart(yyin ,yyscanner ) - -#define YY_END_OF_BUFFER_CHAR 0 - -/* Size of default input buffer. */ -#ifndef YY_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k. - * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. - * Ditto for the __ia64__ case accordingly. - */ -#define YY_BUF_SIZE 32768 -#else -#define YY_BUF_SIZE 16384 -#endif /* __ia64__ */ -#endif - -/* The state buf must be large enough to hold one state per character in the main buffer. - */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) - -#ifndef YY_TYPEDEF_YY_BUFFER_STATE -#define YY_TYPEDEF_YY_BUFFER_STATE -typedef struct yy_buffer_state *YY_BUFFER_STATE; -#endif - -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - -#define EOB_ACT_CONTINUE_SCAN 0 -#define EOB_ACT_END_OF_FILE 1 -#define EOB_ACT_LAST_MATCH 2 - - #define YY_LESS_LINENO(n) - #define YY_LINENO_REWIND_TO(ptr) - -/* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - *yy_cp = yyg->yy_hold_char; \ - YY_RESTORE_YY_MORE_OFFSET \ - yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } \ - while ( 0 ) - -#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) - -#ifndef YY_STRUCT_YY_BUFFER_STATE -#define YY_STRUCT_YY_BUFFER_STATE -struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - int yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; - -#define YY_BUFFER_NEW 0 -#define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via cmCommandArgument_yyrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ -#define YY_BUFFER_EOF_PENDING 2 - - }; -#endif /* !YY_STRUCT_YY_BUFFER_STATE */ - -/* We provide macros for accessing buffer states in case in the - * future we want to put the buffer states in a more general - * "scanner state". - * - * Returns the top of the stack, or NULL. - */ -#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ - ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ - : NULL) - -/* Same as previous macro, but useful when we know that the buffer stack is not - * NULL or when we need an lvalue. For internal use only. - */ -#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] - -void cmCommandArgument_yyrestart (FILE *input_file ,yyscan_t yyscanner ); -void cmCommandArgument_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); -YY_BUFFER_STATE cmCommandArgument_yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner ); -void cmCommandArgument_yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); -void cmCommandArgument_yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); -void cmCommandArgument_yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); -void cmCommandArgument_yypop_buffer_state (yyscan_t yyscanner ); - -static void cmCommandArgument_yyensure_buffer_stack (yyscan_t yyscanner ); -static void cmCommandArgument_yy_load_buffer_state (yyscan_t yyscanner ); -static void cmCommandArgument_yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner ); - -#define YY_FLUSH_BUFFER cmCommandArgument_yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner) - -YY_BUFFER_STATE cmCommandArgument_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); -YY_BUFFER_STATE cmCommandArgument_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); -YY_BUFFER_STATE cmCommandArgument_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); - -void *cmCommandArgument_yyalloc (yy_size_t ,yyscan_t yyscanner ); -void *cmCommandArgument_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); -void cmCommandArgument_yyfree (void * ,yyscan_t yyscanner ); - -#define yy_new_buffer cmCommandArgument_yy_create_buffer - -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! YY_CURRENT_BUFFER ){ \ - cmCommandArgument_yyensure_buffer_stack (yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = \ - cmCommandArgument_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } - -#define yy_set_bol(at_bol) \ - { \ - if ( ! YY_CURRENT_BUFFER ){\ - cmCommandArgument_yyensure_buffer_stack (yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = \ - cmCommandArgument_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } - -#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) - -/* Begin user sect3 */ - -#define cmCommandArgument_yywrap(yyscanner) (/*CONSTCOND*/1) -#define YY_SKIP_YYWRAP - -typedef unsigned char YY_CHAR; - -typedef int yy_state_type; - -#define yytext_ptr yytext_r - -static yy_state_type yy_get_previous_state (yyscan_t yyscanner ); -static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner); -static int yy_get_next_buffer (yyscan_t yyscanner ); -static void yynoreturn yy_fatal_error (yyconst char* msg ,yyscan_t yyscanner ); - -/* Done after the current pattern has been matched and before the - * corresponding action - sets up yytext. - */ -#define YY_DO_BEFORE_ACTION \ - yyg->yytext_ptr = yy_bp; \ - yyleng = (int) (yy_cp - yy_bp); \ - yyg->yy_hold_char = *yy_cp; \ - *yy_cp = '\0'; \ - yyg->yy_c_buf_p = yy_cp; - -#define YY_NUM_RULES 14 -#define YY_END_OF_BUFFER 15 -/* This struct is not used in this scanner, - but its presence is necessary. */ -struct yy_trans_info - { - flex_int32_t yy_verify; - flex_int32_t yy_nxt; - }; -static yyconst flex_int16_t yy_accept[30] = - { 0, - 0, 0, 0, 0, 0, 0, 15, 9, 10, 7, - 6, 14, 11, 5, 12, 13, 9, 0, 0, 4, - 7, 0, 8, 2, 0, 3, 0, 1, 0 - } ; - -static yyconst YY_CHAR yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, - 1, 1, 4, 1, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, - 1, 1, 1, 5, 4, 4, 4, 4, 6, 4, - 4, 4, 4, 4, 4, 4, 4, 7, 4, 4, - 4, 4, 4, 4, 4, 8, 4, 4, 4, 4, - 1, 9, 1, 1, 4, 1, 4, 4, 4, 4, - - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 10, 1, 11, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 - } ; - -static yyconst YY_CHAR yy_meta[12] = - { 0, - 1, 2, 3, 4, 3, 4, 4, 4, 3, 5, - 3 - } ; - -static yyconst flex_uint16_t yy_base[35] = - { 0, - 0, 0, 31, 30, 29, 28, 36, 0, 6, 16, - 0, 41, 41, 41, 0, 41, 0, 22, 22, 41, - 18, 18, 41, 41, 7, 41, 4, 41, 41, 20, - 21, 26, 9, 30 - } ; - -static yyconst flex_int16_t yy_def[35] = - { 0, - 29, 1, 1, 1, 1, 1, 29, 30, 31, 32, - 33, 29, 29, 29, 34, 29, 30, 31, 18, 29, - 32, 33, 29, 29, 18, 29, 18, 29, 0, 29, - 29, 29, 29, 29 - } ; - -static yyconst flex_uint16_t yy_nxt[53] = - { 0, - 8, 8, 9, 10, 11, 10, 10, 10, 12, 13, - 14, 19, 22, 28, 27, 20, 17, 17, 17, 17, - 17, 17, 26, 17, 18, 18, 21, 21, 25, 21, - 23, 24, 23, 23, 23, 29, 16, 16, 15, 15, - 7, 29, 29, 29, 29, 29, 29, 29, 29, 29, - 29, 29 - } ; - -static yyconst flex_int16_t yy_chk[53] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 9, 33, 27, 25, 9, 10, 10, 21, 21, - 30, 30, 22, 30, 31, 31, 32, 32, 19, 32, - 34, 18, 34, 34, 34, 7, 6, 5, 4, 3, - 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, - 29, 29 - } ; - -/* The intent behind this definition is that it'll catch - * any uses of REJECT which flex missed. - */ -#define REJECT reject_used_but_not_detected -#define yymore() yymore_used_but_not_detected -#define YY_MORE_ADJ 0 -#define YY_RESTORE_YY_MORE_OFFSET -#line 1 "cmCommandArgumentLexer.in.l" -#line 2 "cmCommandArgumentLexer.in.l" -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ -/* - -This file must be translated to C++ and modified to build everywhere. - -Run flex >= 2.6 like this: - - flex --nounistd -DFLEXINT_H --prefix=cmCommandArgument_yy --header-file=cmCommandArgumentLexer.h -ocmCommandArgumentLexer.cxx cmCommandArgumentLexer.in.l - -Modify cmCommandArgumentLexer.cxx: - - remove trailing whitespace: sed -i 's/\s*$//' cmCommandArgumentLexer.h cmCommandArgumentLexer.cxx - - remove blank lines at end of file - - #include "cmStandardLexer.h" at the top - - add cast in cmCommandArgument_yy_scan_bytes for loop condition of _yybytes_len to size_t - -*/ - -/* IWYU pragma: no_forward_declare yyguts_t */ - -#include "cmCommandArgumentParserHelper.h" - -/* Replace the lexer input function. */ -#undef YY_INPUT -#define YY_INPUT(buf, result, max_size) \ - { result = yyextra->LexInput(buf, max_size); } - -/* Include the set of tokens from the parser. */ -#include "cmCommandArgumentParserTokens.h" - -/*--------------------------------------------------------------------------*/ - - -#line 484 "cmCommandArgumentLexer.cxx" - -#define INITIAL 0 -#define ESCAPES 1 -#define NOESCAPES 2 - -#ifndef YY_EXTRA_TYPE -#define YY_EXTRA_TYPE void * -#endif - -/* Holds the entire state of the reentrant scanner. */ -struct yyguts_t - { - - /* User-defined. Not touched by flex. */ - YY_EXTRA_TYPE yyextra_r; - - /* The rest are the same as the globals declared in the non-reentrant scanner. */ - FILE *yyin_r, *yyout_r; - size_t yy_buffer_stack_top; /**< index of top of stack. */ - size_t yy_buffer_stack_max; /**< capacity of stack. */ - YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ - char yy_hold_char; - int yy_n_chars; - int yyleng_r; - char *yy_c_buf_p; - int yy_init; - int yy_start; - int yy_did_buffer_switch_on_eof; - int yy_start_stack_ptr; - int yy_start_stack_depth; - int *yy_start_stack; - yy_state_type yy_last_accepting_state; - char* yy_last_accepting_cpos; - - int yylineno_r; - int yy_flex_debug_r; - - char *yytext_r; - int yy_more_flag; - int yy_more_len; - - }; /* end struct yyguts_t */ - -static int yy_init_globals (yyscan_t yyscanner ); - -int cmCommandArgument_yylex_init (yyscan_t* scanner); - -int cmCommandArgument_yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); - -/* Accessor methods to globals. - These are made visible to non-reentrant scanners for convenience. */ - -int cmCommandArgument_yylex_destroy (yyscan_t yyscanner ); - -int cmCommandArgument_yyget_debug (yyscan_t yyscanner ); - -void cmCommandArgument_yyset_debug (int debug_flag ,yyscan_t yyscanner ); - -YY_EXTRA_TYPE cmCommandArgument_yyget_extra (yyscan_t yyscanner ); - -void cmCommandArgument_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); - -FILE *cmCommandArgument_yyget_in (yyscan_t yyscanner ); - -void cmCommandArgument_yyset_in (FILE * _in_str ,yyscan_t yyscanner ); - -FILE *cmCommandArgument_yyget_out (yyscan_t yyscanner ); - -void cmCommandArgument_yyset_out (FILE * _out_str ,yyscan_t yyscanner ); - - int cmCommandArgument_yyget_leng (yyscan_t yyscanner ); - -char *cmCommandArgument_yyget_text (yyscan_t yyscanner ); - -int cmCommandArgument_yyget_lineno (yyscan_t yyscanner ); - -void cmCommandArgument_yyset_lineno (int _line_number ,yyscan_t yyscanner ); - -int cmCommandArgument_yyget_column (yyscan_t yyscanner ); - -void cmCommandArgument_yyset_column (int _column_no ,yyscan_t yyscanner ); - -/* Macros after this point can all be overridden by user definitions in - * section 1. - */ - -#ifndef YY_SKIP_YYWRAP -#ifdef __cplusplus -extern "C" int cmCommandArgument_yywrap (yyscan_t yyscanner ); -#else -extern int cmCommandArgument_yywrap (yyscan_t yyscanner ); -#endif -#endif - -#ifndef YY_NO_UNPUT - -#endif - -#ifndef yytext_ptr -static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); -#endif - -#ifndef YY_NO_INPUT - -#ifdef __cplusplus -static int yyinput (yyscan_t yyscanner ); -#else -static int input (yyscan_t yyscanner ); -#endif - -#endif - -/* Amount of stuff to slurp up with each read. */ -#ifndef YY_READ_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k */ -#define YY_READ_BUF_SIZE 16384 -#else -#define YY_READ_BUF_SIZE 8192 -#endif /* __ia64__ */ -#endif - -/* Copy whatever the last rule matched to the standard output. */ -#ifndef ECHO -/* This used to be an fputs(), but since the string might contain NUL's, - * we now use fwrite(). - */ -#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) -#endif - -/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, - * is returned in "result". - */ -#ifndef YY_INPUT -#define YY_INPUT(buf,result,max_size) \ - if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ - { \ - int c = '*'; \ - size_t n; \ - for ( n = 0; n < max_size && \ - (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } \ - else \ - { \ - errno=0; \ - while ( (result = (int) fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ - { \ - if( errno != EINTR) \ - { \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - break; \ - } \ - errno=0; \ - clearerr(yyin); \ - } \ - }\ -\ - -#endif - -/* No semi-colon after return; correct usage is to write "yyterminate();" - - * we don't want an extra ';' after the "return" because that will cause - * some compilers to complain about unreachable statements. - */ -#ifndef yyterminate -#define yyterminate() return YY_NULL -#endif - -/* Number of entries by which start-condition stack grows. */ -#ifndef YY_START_STACK_INCR -#define YY_START_STACK_INCR 25 -#endif - -/* Report a fatal error. */ -#ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) -#endif - -/* end tables serialization structures and prototypes */ - -/* Default declaration of generated scanner - a define so the user can - * easily add parameters. - */ -#ifndef YY_DECL -#define YY_DECL_IS_OURS 1 - -extern int cmCommandArgument_yylex (yyscan_t yyscanner); - -#define YY_DECL int cmCommandArgument_yylex (yyscan_t yyscanner) -#endif /* !YY_DECL */ - -/* Code executed at the beginning of each rule, after yytext and yyleng - * have been set up. - */ -#ifndef YY_USER_ACTION -#define YY_USER_ACTION -#endif - -/* Code executed at the end of each rule. */ -#ifndef YY_BREAK -#define YY_BREAK /*LINTED*/break; -#endif - -#define YY_RULE_SETUP \ - YY_USER_ACTION - -/** The main scanner function which does all the work. - */ -YY_DECL -{ - yy_state_type yy_current_state; - char *yy_cp, *yy_bp; - int yy_act; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if ( !yyg->yy_init ) - { - yyg->yy_init = 1; - -#ifdef YY_USER_INIT - YY_USER_INIT; -#endif - - if ( ! yyg->yy_start ) - yyg->yy_start = 1; /* first start state */ - - if ( ! yyin ) - yyin = stdin; - - if ( ! yyout ) - yyout = stdout; - - if ( ! YY_CURRENT_BUFFER ) { - cmCommandArgument_yyensure_buffer_stack (yyscanner); - YY_CURRENT_BUFFER_LVALUE = - cmCommandArgument_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); - } - - cmCommandArgument_yy_load_buffer_state(yyscanner ); - } - - { -#line 42 "cmCommandArgumentLexer.in.l" - - -#line 740 "cmCommandArgumentLexer.cxx" - - while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ - { - yy_cp = yyg->yy_c_buf_p; - - /* Support of yytext. */ - *yy_cp = yyg->yy_hold_char; - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = yyg->yy_start; -yy_match: - do - { - YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 30 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; - ++yy_cp; - } - while ( yy_base[yy_current_state] != 41 ); - -yy_find_action: - yy_act = yy_accept[yy_current_state]; - if ( yy_act == 0 ) - { /* have to back up */ - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - yy_act = yy_accept[yy_current_state]; - } - - YY_DO_BEFORE_ACTION; - -do_action: /* This label is used only to access EOF actions. */ - - switch ( yy_act ) - { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = yyg->yy_hold_char; - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - goto yy_find_action; - -case 1: -YY_RULE_SETUP -#line 44 "cmCommandArgumentLexer.in.l" -{ - //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; - yyextra->AllocateParserType(yylvalp, yytext+1, strlen(yytext)-2); - return cal_ENVCURLY; -} - YY_BREAK -case 2: -YY_RULE_SETUP -#line 50 "cmCommandArgumentLexer.in.l" -{ - //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; - yyextra->AllocateParserType(yylvalp, yytext+1, strlen(yytext)-2); - return cal_NCURLY; -} - YY_BREAK -case 3: -YY_RULE_SETUP -#line 56 "cmCommandArgumentLexer.in.l" -{ - //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; - yyextra->AllocateParserType(yylvalp, yytext+1, strlen(yytext)-2); - return cal_ATNAME; -} - YY_BREAK -case 4: -YY_RULE_SETUP -#line 62 "cmCommandArgumentLexer.in.l" -{ - //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; - //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); - yylvalp->str = yyextra->DCURLYVariable; - return cal_DCURLY; -} - YY_BREAK -case 5: -YY_RULE_SETUP -#line 69 "cmCommandArgumentLexer.in.l" -{ - //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; - //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); - yylvalp->str = yyextra->RCURLYVariable; - return cal_RCURLY; -} - YY_BREAK -case 6: -YY_RULE_SETUP -#line 76 "cmCommandArgumentLexer.in.l" -{ - //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; - //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); - yylvalp->str = yyextra->ATVariable; - return cal_AT; -} - YY_BREAK -case 7: -YY_RULE_SETUP -#line 83 "cmCommandArgumentLexer.in.l" -{ - //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; - yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); - return cal_NAME; -} - YY_BREAK -case 8: -YY_RULE_SETUP -#line 89 "cmCommandArgumentLexer.in.l" -{ - if ( !yyextra->HandleEscapeSymbol(yylvalp, *(yytext+1)) ) - { - return cal_ERROR; - } - return cal_SYMBOL; -} - YY_BREAK -case 9: -/* rule 9 can match eol */ -YY_RULE_SETUP -#line 97 "cmCommandArgumentLexer.in.l" -{ - //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; - yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); - return cal_SYMBOL; -} - YY_BREAK -case 10: -YY_RULE_SETUP -#line 103 "cmCommandArgumentLexer.in.l" -{ - //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); - yylvalp->str = yyextra->DOLLARVariable; - return cal_DOLLAR; -} - YY_BREAK -case 11: -YY_RULE_SETUP -#line 109 "cmCommandArgumentLexer.in.l" -{ - //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); - yylvalp->str = yyextra->LCURLYVariable; - return cal_LCURLY; -} - YY_BREAK -case 12: -YY_RULE_SETUP -#line 115 "cmCommandArgumentLexer.in.l" -{ - //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); - yylvalp->str = yyextra->BSLASHVariable; - return cal_BSLASH; -} - YY_BREAK -case 13: -YY_RULE_SETUP -#line 121 "cmCommandArgumentLexer.in.l" -{ - //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); - yylvalp->str = yyextra->BSLASHVariable; - return cal_SYMBOL; -} - YY_BREAK -case 14: -YY_RULE_SETUP -#line 127 "cmCommandArgumentLexer.in.l" -ECHO; - YY_BREAK -#line 925 "cmCommandArgumentLexer.cxx" -case YY_STATE_EOF(INITIAL): -case YY_STATE_EOF(ESCAPES): -case YY_STATE_EOF(NOESCAPES): - yyterminate(); - - case YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = yyg->yy_hold_char; - YY_RESTORE_YY_MORE_OFFSET - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * cmCommandArgument_yylex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; - - yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( yyscanner ); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); - - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++yyg->yy_c_buf_p; - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = yyg->yy_c_buf_p; - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer( yyscanner ) ) - { - case EOB_ACT_END_OF_FILE: - { - yyg->yy_did_buffer_switch_on_eof = 0; - - if ( cmCommandArgument_yywrap(yyscanner ) ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else - { - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = - yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( yyscanner ); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - yyg->yy_c_buf_p = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; - - yy_current_state = yy_get_previous_state( yyscanner ); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ - } /* end of user's declarations */ -} /* end of cmCommandArgument_yylex */ - -/* yy_get_next_buffer - try to read in a new buffer - * - * Returns a code representing an action: - * EOB_ACT_LAST_MATCH - - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position - * EOB_ACT_END_OF_FILE - end of file - */ -static int yy_get_next_buffer (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - char *source = yyg->yytext_ptr; - yy_size_t number_to_move, i; - int ret_val; - - if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) - YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) - { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else - { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (yy_size_t) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1; - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; - - else - { - int num_to_read = - YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; - - int yy_c_buf_p_offset = - (int) (yyg->yy_c_buf_p - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) - { - int new_size = b->yy_buf_size * 2; - - if ( new_size <= 0 ) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - cmCommandArgument_yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner ); - } - else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = NULL; - - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); - - yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - - number_to_move - 1; - - } - - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - yyg->yy_n_chars, num_to_read ); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - if ( yyg->yy_n_chars == 0 ) - { - if ( number_to_move == YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - cmCommandArgument_yyrestart(yyin ,yyscanner); - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - if ((int) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) cmCommandArgument_yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner ); - if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); - } - - yyg->yy_n_chars += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; - - yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; -} - -/* yy_get_previous_state - get the state just before the EOB char was reached */ - - static yy_state_type yy_get_previous_state (yyscan_t yyscanner) -{ - yy_state_type yy_current_state; - char *yy_cp; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - yy_current_state = yyg->yy_start; - - for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) - { - YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 30 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; - } - - return yy_current_state; -} - -/* yy_try_NUL_trans - try to make a transition on the NUL character - * - * synopsis - * next_state = yy_try_NUL_trans( current_state ); - */ - static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) -{ - int yy_is_jam; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ - char *yy_cp = yyg->yy_c_buf_p; - - YY_CHAR yy_c = 1; - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 30 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; - yy_is_jam = (yy_current_state == 29); - - (void)yyg; - return yy_is_jam ? 0 : yy_current_state; -} - -#ifndef YY_NO_UNPUT - -#endif - -#ifndef YY_NO_INPUT -#ifdef __cplusplus - static int yyinput (yyscan_t yyscanner) -#else - static int input (yyscan_t yyscanner) -#endif - -{ - int c; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - *yyg->yy_c_buf_p = yyg->yy_hold_char; - - if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) - { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) - /* This was really a NUL. */ - *yyg->yy_c_buf_p = '\0'; - - else - { /* need more input */ - int offset = yyg->yy_c_buf_p - yyg->yytext_ptr; - ++yyg->yy_c_buf_p; - - switch ( yy_get_next_buffer( yyscanner ) ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - cmCommandArgument_yyrestart(yyin ,yyscanner); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: - { - if ( cmCommandArgument_yywrap(yyscanner ) ) - return 0; - - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; -#ifdef __cplusplus - return yyinput(yyscanner); -#else - return input(yyscanner); -#endif - } - - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = yyg->yytext_ptr + offset; - break; - } - } - } - - c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ - *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ - yyg->yy_hold_char = *++yyg->yy_c_buf_p; - - return c; -} -#endif /* ifndef YY_NO_INPUT */ - -/** Immediately switch to a different input stream. - * @param input_file A readable stream. - * @param yyscanner The scanner object. - * @note This function does not reset the start condition to @c INITIAL . - */ - void cmCommandArgument_yyrestart (FILE * input_file , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if ( ! YY_CURRENT_BUFFER ){ - cmCommandArgument_yyensure_buffer_stack (yyscanner); - YY_CURRENT_BUFFER_LVALUE = - cmCommandArgument_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); - } - - cmCommandArgument_yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner); - cmCommandArgument_yy_load_buffer_state(yyscanner ); -} - -/** Switch to a different input buffer. - * @param new_buffer The new input buffer. - * @param yyscanner The scanner object. - */ - void cmCommandArgument_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* TODO. We should be able to replace this entire function body - * with - * cmCommandArgument_yypop_buffer_state(); - * cmCommandArgument_yypush_buffer_state(new_buffer); - */ - cmCommandArgument_yyensure_buffer_stack (yyscanner); - if ( YY_CURRENT_BUFFER == new_buffer ) - return; - - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - cmCommandArgument_yy_load_buffer_state(yyscanner ); - - /* We don't actually know whether we did this switch during - * EOF (cmCommandArgument_yywrap()) processing, but the only time this flag - * is looked at is after cmCommandArgument_yywrap() is called, so it's safe - * to go ahead and always set it. - */ - yyg->yy_did_buffer_switch_on_eof = 1; -} - -static void cmCommandArgument_yy_load_buffer_state (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - yyg->yy_hold_char = *yyg->yy_c_buf_p; -} - -/** Allocate and initialize an input buffer state. - * @param file A readable stream. - * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. - * @param yyscanner The scanner object. - * @return the allocated buffer state. - */ - YY_BUFFER_STATE cmCommandArgument_yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) -{ - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) cmCommandArgument_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in cmCommandArgument_yy_create_buffer()" ); - - b->yy_buf_size = (yy_size_t)size; - - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *) cmCommandArgument_yyalloc(b->yy_buf_size + 2 ,yyscanner ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in cmCommandArgument_yy_create_buffer()" ); - - b->yy_is_our_buffer = 1; - - cmCommandArgument_yy_init_buffer(b,file ,yyscanner); - - return b; -} - -/** Destroy the buffer. - * @param b a buffer created with cmCommandArgument_yy_create_buffer() - * @param yyscanner The scanner object. - */ - void cmCommandArgument_yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if ( ! b ) - return; - - if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; - - if ( b->yy_is_our_buffer ) - cmCommandArgument_yyfree((void *) b->yy_ch_buf ,yyscanner ); - - cmCommandArgument_yyfree((void *) b ,yyscanner ); -} - -/* Initializes or reinitializes a buffer. - * This function is sometimes called more than once on the same buffer, - * such as during a cmCommandArgument_yyrestart() or at EOF. - */ - static void cmCommandArgument_yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) - -{ - int oerrno = errno; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - cmCommandArgument_yy_flush_buffer(b ,yyscanner); - - b->yy_input_file = file; - b->yy_fill_buffer = 1; - - /* If b is the current buffer, then cmCommandArgument_yy_init_buffer was _probably_ - * called from cmCommandArgument_yyrestart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER){ - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } - - b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; - - errno = oerrno; -} - -/** Discard all buffered characters. On the next scan, YY_INPUT will be called. - * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. - * @param yyscanner The scanner object. - */ - void cmCommandArgument_yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if ( ! b ) - return; - - b->yy_n_chars = 0; - - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - - b->yy_buf_pos = &b->yy_ch_buf[0]; - - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; - - if ( b == YY_CURRENT_BUFFER ) - cmCommandArgument_yy_load_buffer_state(yyscanner ); -} - -/** Pushes the new state onto the stack. The new state becomes - * the current state. This function will allocate the stack - * if necessary. - * @param new_buffer The new state. - * @param yyscanner The scanner object. - */ -void cmCommandArgument_yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (new_buffer == NULL) - return; - - cmCommandArgument_yyensure_buffer_stack(yyscanner); - - /* This block is copied from cmCommandArgument_yy_switch_to_buffer. */ - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - yyg->yy_buffer_stack_top++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from cmCommandArgument_yy_switch_to_buffer. */ - cmCommandArgument_yy_load_buffer_state(yyscanner ); - yyg->yy_did_buffer_switch_on_eof = 1; -} - -/** Removes and deletes the top of the stack, if present. - * The next element becomes the new top. - * @param yyscanner The scanner object. - */ -void cmCommandArgument_yypop_buffer_state (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!YY_CURRENT_BUFFER) - return; - - cmCommandArgument_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner); - YY_CURRENT_BUFFER_LVALUE = NULL; - if (yyg->yy_buffer_stack_top > 0) - --yyg->yy_buffer_stack_top; - - if (YY_CURRENT_BUFFER) { - cmCommandArgument_yy_load_buffer_state(yyscanner ); - yyg->yy_did_buffer_switch_on_eof = 1; - } -} - -/* Allocates the stack if it does not exist. - * Guarantees space for at least one push. - */ -static void cmCommandArgument_yyensure_buffer_stack (yyscan_t yyscanner) -{ - int num_to_alloc; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (!yyg->yy_buffer_stack) { - - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ - yyg->yy_buffer_stack = (struct yy_buffer_state**)cmCommandArgument_yyalloc - (num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); - if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in cmCommandArgument_yyensure_buffer_stack()" ); - - memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - - yyg->yy_buffer_stack_max = num_to_alloc; - yyg->yy_buffer_stack_top = 0; - return; - } - - if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ - - /* Increase the buffer to prepare for a possible push. */ - yy_size_t grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = yyg->yy_buffer_stack_max + grow_size; - yyg->yy_buffer_stack = (struct yy_buffer_state**)cmCommandArgument_yyrealloc - (yyg->yy_buffer_stack, - num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); - if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in cmCommandArgument_yyensure_buffer_stack()" ); - - /* zero only the new slots.*/ - memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); - yyg->yy_buffer_stack_max = num_to_alloc; - } -} - -/** Setup the input buffer state to scan directly from a user-specified character buffer. - * @param base the character buffer - * @param size the size in bytes of the character buffer - * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE cmCommandArgument_yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) -{ - YY_BUFFER_STATE b; - - if ( size < 2 || - base[size-2] != YY_END_OF_BUFFER_CHAR || - base[size-1] != YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return NULL; - - b = (YY_BUFFER_STATE) cmCommandArgument_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in cmCommandArgument_yy_scan_buffer()" ); - - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = NULL; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - cmCommandArgument_yy_switch_to_buffer(b ,yyscanner ); - - return b; -} - -/** Setup the input buffer state to scan a string. The next call to cmCommandArgument_yylex() will - * scan from a @e copy of @a str. - * @param yystr a NUL-terminated string to scan - * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. - * @note If you want to scan bytes that may contain NUL values, then use - * cmCommandArgument_yy_scan_bytes() instead. - */ -YY_BUFFER_STATE cmCommandArgument_yy_scan_string (yyconst char * yystr , yyscan_t yyscanner) -{ - - return cmCommandArgument_yy_scan_bytes(yystr,(int) strlen(yystr) ,yyscanner); -} - -/** Setup the input buffer state to scan the given bytes. The next call to cmCommandArgument_yylex() will - * scan from a @e copy of @a bytes. - * @param yybytes the byte buffer to scan - * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. - * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE cmCommandArgument_yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner) -{ - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - yy_size_t i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = (yy_size_t) _yybytes_len + 2; - buf = (char *) cmCommandArgument_yyalloc(n ,yyscanner ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in cmCommandArgument_yy_scan_bytes()" ); - - for ( i = 0; i < (size_t)_yybytes_len; ++i ) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - - b = cmCommandArgument_yy_scan_buffer(buf,n ,yyscanner); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in cmCommandArgument_yy_scan_bytes()" ); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; -} - -#ifndef YY_EXIT_FAILURE -#define YY_EXIT_FAILURE 2 -#endif - -static void yynoreturn yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - (void) fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); -} - -/* Redefine yyless() so it works in section 3 code. */ - -#undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - yytext[yyleng] = yyg->yy_hold_char; \ - yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ - yyg->yy_hold_char = *yyg->yy_c_buf_p; \ - *yyg->yy_c_buf_p = '\0'; \ - yyleng = yyless_macro_arg; \ - } \ - while ( 0 ) - -/* Accessor methods (get/set functions) to struct members. */ - -/** Get the user-defined data for this scanner. - * @param yyscanner The scanner object. - */ -YY_EXTRA_TYPE cmCommandArgument_yyget_extra (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyextra; -} - -/** Get the current line number. - * @param yyscanner The scanner object. - */ -int cmCommandArgument_yyget_lineno (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (! YY_CURRENT_BUFFER) - return 0; - - return yylineno; -} - -/** Get the current column number. - * @param yyscanner The scanner object. - */ -int cmCommandArgument_yyget_column (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (! YY_CURRENT_BUFFER) - return 0; - - return yycolumn; -} - -/** Get the input stream. - * @param yyscanner The scanner object. - */ -FILE *cmCommandArgument_yyget_in (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyin; -} - -/** Get the output stream. - * @param yyscanner The scanner object. - */ -FILE *cmCommandArgument_yyget_out (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyout; -} - -/** Get the length of the current token. - * @param yyscanner The scanner object. - */ -int cmCommandArgument_yyget_leng (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyleng; -} - -/** Get the current token. - * @param yyscanner The scanner object. - */ - -char *cmCommandArgument_yyget_text (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yytext; -} - -/** Set the user-defined data. This data is never touched by the scanner. - * @param user_defined The data to be associated with this scanner. - * @param yyscanner The scanner object. - */ -void cmCommandArgument_yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyextra = user_defined ; -} - -/** Set the current line number. - * @param _line_number line number - * @param yyscanner The scanner object. - */ -void cmCommandArgument_yyset_lineno (int _line_number , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* lineno is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) - YY_FATAL_ERROR( "cmCommandArgument_yyset_lineno called with no buffer" ); - - yylineno = _line_number; -} - -/** Set the current column. - * @param _column_no column number - * @param yyscanner The scanner object. - */ -void cmCommandArgument_yyset_column (int _column_no , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* column is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) - YY_FATAL_ERROR( "cmCommandArgument_yyset_column called with no buffer" ); - - yycolumn = _column_no; -} - -/** Set the input stream. This does not discard the current - * input buffer. - * @param _in_str A readable stream. - * @param yyscanner The scanner object. - * @see cmCommandArgument_yy_switch_to_buffer - */ -void cmCommandArgument_yyset_in (FILE * _in_str , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyin = _in_str ; -} - -void cmCommandArgument_yyset_out (FILE * _out_str , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyout = _out_str ; -} - -int cmCommandArgument_yyget_debug (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yy_flex_debug; -} - -void cmCommandArgument_yyset_debug (int _bdebug , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yy_flex_debug = _bdebug ; -} - -/* Accessor methods for yylval and yylloc */ - -/* User-visible API */ - -/* cmCommandArgument_yylex_init is special because it creates the scanner itself, so it is - * the ONLY reentrant function that doesn't take the scanner as the last argument. - * That's why we explicitly handle the declaration, instead of using our macros. - */ - -int cmCommandArgument_yylex_init(yyscan_t* ptr_yy_globals) - -{ - if (ptr_yy_globals == NULL){ - errno = EINVAL; - return 1; - } - - *ptr_yy_globals = (yyscan_t) cmCommandArgument_yyalloc ( sizeof( struct yyguts_t ), NULL ); - - if (*ptr_yy_globals == NULL){ - errno = ENOMEM; - return 1; - } - - /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - - return yy_init_globals ( *ptr_yy_globals ); -} - -/* cmCommandArgument_yylex_init_extra has the same functionality as cmCommandArgument_yylex_init, but follows the - * convention of taking the scanner as the last argument. Note however, that - * this is a *pointer* to a scanner, as it will be allocated by this call (and - * is the reason, too, why this function also must handle its own declaration). - * The user defined value in the first argument will be available to cmCommandArgument_yyalloc in - * the yyextra field. - */ - -int cmCommandArgument_yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals ) - -{ - struct yyguts_t dummy_yyguts; - - cmCommandArgument_yyset_extra (yy_user_defined, &dummy_yyguts); - - if (ptr_yy_globals == NULL){ - errno = EINVAL; - return 1; - } - - *ptr_yy_globals = (yyscan_t) cmCommandArgument_yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); - - if (*ptr_yy_globals == NULL){ - errno = ENOMEM; - return 1; - } - - /* By setting to 0xAA, we expose bugs in - yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - - cmCommandArgument_yyset_extra (yy_user_defined, *ptr_yy_globals); - - return yy_init_globals ( *ptr_yy_globals ); -} - -static int yy_init_globals (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from cmCommandArgument_yylex_destroy(), so don't allocate here. - */ - - yyg->yy_buffer_stack = NULL; - yyg->yy_buffer_stack_top = 0; - yyg->yy_buffer_stack_max = 0; - yyg->yy_c_buf_p = NULL; - yyg->yy_init = 0; - yyg->yy_start = 0; - - yyg->yy_start_stack_ptr = 0; - yyg->yy_start_stack_depth = 0; - yyg->yy_start_stack = NULL; - -/* Defined in main.c */ -#ifdef YY_STDINIT - yyin = stdin; - yyout = stdout; -#else - yyin = NULL; - yyout = NULL; -#endif - - /* For future reference: Set errno on error, since we are called by - * cmCommandArgument_yylex_init() - */ - return 0; -} - -/* cmCommandArgument_yylex_destroy is for both reentrant and non-reentrant scanners. */ -int cmCommandArgument_yylex_destroy (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* Pop the buffer stack, destroying each element. */ - while(YY_CURRENT_BUFFER){ - cmCommandArgument_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner ); - YY_CURRENT_BUFFER_LVALUE = NULL; - cmCommandArgument_yypop_buffer_state(yyscanner); - } - - /* Destroy the stack itself. */ - cmCommandArgument_yyfree(yyg->yy_buffer_stack ,yyscanner); - yyg->yy_buffer_stack = NULL; - - /* Destroy the start condition stack. */ - cmCommandArgument_yyfree(yyg->yy_start_stack ,yyscanner ); - yyg->yy_start_stack = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner so the next time - * cmCommandArgument_yylex() is called, initialization will occur. */ - yy_init_globals( yyscanner); - - /* Destroy the main struct (reentrant only). */ - cmCommandArgument_yyfree ( yyscanner , yyscanner ); - yyscanner = NULL; - return 0; -} - -/* - * Internal utility routines. - */ - -#ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - - int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; -} -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) -{ - int n; - for ( n = 0; s[n]; ++n ) - ; - - return n; -} -#endif - -void *cmCommandArgument_yyalloc (yy_size_t size , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - return malloc(size); -} - -void *cmCommandArgument_yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return realloc(ptr, size); -} - -void cmCommandArgument_yyfree (void * ptr , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - free( (char *) ptr ); /* see cmCommandArgument_yyrealloc() for (char *) cast */ -} - -#define YYTABLES_NAME "yytables" - -#line 127 "cmCommandArgumentLexer.in.l" - - - -/*--------------------------------------------------------------------------*/ -void cmCommandArgument_SetupEscapes(yyscan_t yyscanner, bool noEscapes) -{ - /* Hack into the internal flex-generated scanner to set the state. */ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if(noEscapes) { - BEGIN(NOESCAPES); - } else { - BEGIN(ESCAPES); - } -} diff --git a/Source/cmCommandArgumentLexer.h b/Source/cmCommandArgumentLexer.h deleted file mode 100644 index 82e87b5..0000000 --- a/Source/cmCommandArgumentLexer.h +++ /dev/null @@ -1,336 +0,0 @@ -#ifndef cmCommandArgument_yyHEADER_H -#define cmCommandArgument_yyHEADER_H 1 -#define cmCommandArgument_yyIN_HEADER 1 - -#line 6 "cmCommandArgumentLexer.h" - -#line 8 "cmCommandArgumentLexer.h" - -#define FLEXINT_H 1 -#define YY_INT_ALIGNED short int - -/* A lexical scanner generated by flex */ - -#define FLEX_SCANNER -#define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 6 -#define YY_FLEX_SUBMINOR_VERSION 1 -#if YY_FLEX_SUBMINOR_VERSION > 0 -#define FLEX_BETA -#endif - -/* First, we deal with platform-specific or compiler-specific issues. */ - -/* begin standard C headers. */ -#include -#include -#include -#include - -/* end standard C headers. */ - -/* flex integer type definitions */ - -#ifndef FLEXINT_H -#define FLEXINT_H - -/* C99 systems have . Non-C99 systems may or may not. */ - -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - -/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. - */ -#ifndef __STDC_LIMIT_MACROS -#define __STDC_LIMIT_MACROS 1 -#endif - -#include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; -typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; -typedef uint32_t flex_uint32_t; -#else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; -typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; - -/* Limits of integral types. */ -#ifndef INT8_MIN -#define INT8_MIN (-128) -#endif -#ifndef INT16_MIN -#define INT16_MIN (-32767-1) -#endif -#ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) -#endif -#ifndef INT8_MAX -#define INT8_MAX (127) -#endif -#ifndef INT16_MAX -#define INT16_MAX (32767) -#endif -#ifndef INT32_MAX -#define INT32_MAX (2147483647) -#endif -#ifndef UINT8_MAX -#define UINT8_MAX (255U) -#endif -#ifndef UINT16_MAX -#define UINT16_MAX (65535U) -#endif -#ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) -#endif - -#endif /* ! C99 */ - -#endif /* ! FLEXINT_H */ - -/* TODO: this is always defined, so inline it */ -#define yyconst const - -#if defined(__GNUC__) && __GNUC__ >= 3 -#define yynoreturn __attribute__((__noreturn__)) -#else -#define yynoreturn -#endif - -/* An opaque pointer. */ -#ifndef YY_TYPEDEF_YY_SCANNER_T -#define YY_TYPEDEF_YY_SCANNER_T -typedef void* yyscan_t; -#endif - -/* For convenience, these vars (plus the bison vars far below) - are macros in the reentrant scanner. */ -#define yyin yyg->yyin_r -#define yyout yyg->yyout_r -#define yyextra yyg->yyextra_r -#define yyleng yyg->yyleng_r -#define yytext yyg->yytext_r -#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) -#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) -#define yy_flex_debug yyg->yy_flex_debug_r - -/* Size of default input buffer. */ -#ifndef YY_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k. - * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. - * Ditto for the __ia64__ case accordingly. - */ -#define YY_BUF_SIZE 32768 -#else -#define YY_BUF_SIZE 16384 -#endif /* __ia64__ */ -#endif - -#ifndef YY_TYPEDEF_YY_BUFFER_STATE -#define YY_TYPEDEF_YY_BUFFER_STATE -typedef struct yy_buffer_state *YY_BUFFER_STATE; -#endif - -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - -#ifndef YY_STRUCT_YY_BUFFER_STATE -#define YY_STRUCT_YY_BUFFER_STATE -struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - int yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; - - }; -#endif /* !YY_STRUCT_YY_BUFFER_STATE */ - -void cmCommandArgument_yyrestart (FILE *input_file ,yyscan_t yyscanner ); -void cmCommandArgument_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); -YY_BUFFER_STATE cmCommandArgument_yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner ); -void cmCommandArgument_yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); -void cmCommandArgument_yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); -void cmCommandArgument_yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); -void cmCommandArgument_yypop_buffer_state (yyscan_t yyscanner ); - -YY_BUFFER_STATE cmCommandArgument_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); -YY_BUFFER_STATE cmCommandArgument_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); -YY_BUFFER_STATE cmCommandArgument_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); - -void *cmCommandArgument_yyalloc (yy_size_t ,yyscan_t yyscanner ); -void *cmCommandArgument_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); -void cmCommandArgument_yyfree (void * ,yyscan_t yyscanner ); - -/* Begin user sect3 */ - -#define cmCommandArgument_yywrap(yyscanner) (/*CONSTCOND*/1) -#define YY_SKIP_YYWRAP - -#define yytext_ptr yytext_r - -#ifdef YY_HEADER_EXPORT_START_CONDITIONS -#define INITIAL 0 -#define ESCAPES 1 -#define NOESCAPES 2 - -#endif - -#ifndef YY_EXTRA_TYPE -#define YY_EXTRA_TYPE void * -#endif - -int cmCommandArgument_yylex_init (yyscan_t* scanner); - -int cmCommandArgument_yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); - -/* Accessor methods to globals. - These are made visible to non-reentrant scanners for convenience. */ - -int cmCommandArgument_yylex_destroy (yyscan_t yyscanner ); - -int cmCommandArgument_yyget_debug (yyscan_t yyscanner ); - -void cmCommandArgument_yyset_debug (int debug_flag ,yyscan_t yyscanner ); - -YY_EXTRA_TYPE cmCommandArgument_yyget_extra (yyscan_t yyscanner ); - -void cmCommandArgument_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); - -FILE *cmCommandArgument_yyget_in (yyscan_t yyscanner ); - -void cmCommandArgument_yyset_in (FILE * _in_str ,yyscan_t yyscanner ); - -FILE *cmCommandArgument_yyget_out (yyscan_t yyscanner ); - -void cmCommandArgument_yyset_out (FILE * _out_str ,yyscan_t yyscanner ); - - int cmCommandArgument_yyget_leng (yyscan_t yyscanner ); - -char *cmCommandArgument_yyget_text (yyscan_t yyscanner ); - -int cmCommandArgument_yyget_lineno (yyscan_t yyscanner ); - -void cmCommandArgument_yyset_lineno (int _line_number ,yyscan_t yyscanner ); - -int cmCommandArgument_yyget_column (yyscan_t yyscanner ); - -void cmCommandArgument_yyset_column (int _column_no ,yyscan_t yyscanner ); - -/* Macros after this point can all be overridden by user definitions in - * section 1. - */ - -#ifndef YY_SKIP_YYWRAP -#ifdef __cplusplus -extern "C" int cmCommandArgument_yywrap (yyscan_t yyscanner ); -#else -extern int cmCommandArgument_yywrap (yyscan_t yyscanner ); -#endif -#endif - -#ifndef yytext_ptr -static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); -#endif - -#ifndef YY_NO_INPUT - -#endif - -/* Amount of stuff to slurp up with each read. */ -#ifndef YY_READ_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k */ -#define YY_READ_BUF_SIZE 16384 -#else -#define YY_READ_BUF_SIZE 8192 -#endif /* __ia64__ */ -#endif - -/* Number of entries by which start-condition stack grows. */ -#ifndef YY_START_STACK_INCR -#define YY_START_STACK_INCR 25 -#endif - -/* Default declaration of generated scanner - a define so the user can - * easily add parameters. - */ -#ifndef YY_DECL -#define YY_DECL_IS_OURS 1 - -extern int cmCommandArgument_yylex (yyscan_t yyscanner); - -#define YY_DECL int cmCommandArgument_yylex (yyscan_t yyscanner) -#endif /* !YY_DECL */ - -/* yy_get_previous_state - get the state just before the EOB char was reached */ - -#undef YY_NEW_FILE -#undef YY_FLUSH_BUFFER -#undef yy_set_bol -#undef yy_new_buffer -#undef yy_set_interactive -#undef YY_DO_BEFORE_ACTION - -#ifdef YY_DECL_IS_OURS -#undef YY_DECL_IS_OURS -#undef YY_DECL -#endif - -#line 127 "cmCommandArgumentLexer.in.l" - - -#line 335 "cmCommandArgumentLexer.h" -#undef cmCommandArgument_yyIN_HEADER -#endif /* cmCommandArgument_yyHEADER_H */ diff --git a/Source/cmCommandArgumentLexer.in.l b/Source/cmCommandArgumentLexer.in.l deleted file mode 100644 index e3a8094..0000000 --- a/Source/cmCommandArgumentLexer.in.l +++ /dev/null @@ -1,139 +0,0 @@ -%{ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ -/* - -This file must be translated to C++ and modified to build everywhere. - -Run flex >= 2.6 like this: - - flex --nounistd -DFLEXINT_H --prefix=cmCommandArgument_yy --header-file=cmCommandArgumentLexer.h -ocmCommandArgumentLexer.cxx cmCommandArgumentLexer.in.l - -Modify cmCommandArgumentLexer.cxx: - - remove trailing whitespace: sed -i 's/\s*$//' cmCommandArgumentLexer.h cmCommandArgumentLexer.cxx - - remove blank lines at end of file - - #include "cmStandardLexer.h" at the top - - add cast in yy_scan_bytes for loop condition of _yybytes_len to size_t - -*/ - -/* IWYU pragma: no_forward_declare yyguts_t */ - -#include "cmCommandArgumentParserHelper.h" - -/* Replace the lexer input function. */ -#undef YY_INPUT -#define YY_INPUT(buf, result, max_size) \ - { result = yyextra->LexInput(buf, max_size); } - -/* Include the set of tokens from the parser. */ -#include "cmCommandArgumentParserTokens.h" - -/*--------------------------------------------------------------------------*/ -%} - -%option reentrant -%option noyywrap -%option nounput -%pointer -%s ESCAPES -%s NOESCAPES - -%% - -\$ENV\{ { - //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; - yyextra->AllocateParserType(yylvalp, yytext+1, strlen(yytext)-2); - return cal_ENVCURLY; -} - -\$[A-Za-z0-9/_.+-]+\{ { - //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; - yyextra->AllocateParserType(yylvalp, yytext+1, strlen(yytext)-2); - return cal_NCURLY; -} - -@[A-Za-z0-9/_.+-]+@ { - //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; - yyextra->AllocateParserType(yylvalp, yytext+1, strlen(yytext)-2); - return cal_ATNAME; -} - -"${" { - //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; - //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); - yylvalp->str = yyextra->DCURLYVariable; - return cal_DCURLY; -} - -"}" { - //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; - //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); - yylvalp->str = yyextra->RCURLYVariable; - return cal_RCURLY; -} - -"@" { - //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; - //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); - yylvalp->str = yyextra->ATVariable; - return cal_AT; -} - -[A-Za-z0-9/_.+-]+ { - //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; - yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); - return cal_NAME; -} - -\\. { - if ( !yyextra->HandleEscapeSymbol(yylvalp, *(yytext+1)) ) - { - return cal_ERROR; - } - return cal_SYMBOL; -} - -[^\${}\\@]+ { - //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; - yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); - return cal_SYMBOL; -} - -"$" { - //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); - yylvalp->str = yyextra->DOLLARVariable; - return cal_DOLLAR; -} - -"{" { - //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); - yylvalp->str = yyextra->LCURLYVariable; - return cal_LCURLY; -} - -"\\" { - //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); - yylvalp->str = yyextra->BSLASHVariable; - return cal_BSLASH; -} - -"\\" { - //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); - yylvalp->str = yyextra->BSLASHVariable; - return cal_SYMBOL; -} - -%% - -/*--------------------------------------------------------------------------*/ -void cmCommandArgument_SetupEscapes(yyscan_t yyscanner, bool noEscapes) -{ - /* Hack into the internal flex-generated scanner to set the state. */ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if(noEscapes) { - BEGIN(NOESCAPES); - } else { - BEGIN(ESCAPES); - } -} diff --git a/Source/cmCommandArgumentParser.cxx b/Source/cmCommandArgumentParser.cxx deleted file mode 100644 index aed0826..0000000 --- a/Source/cmCommandArgumentParser.cxx +++ /dev/null @@ -1,1723 +0,0 @@ -/* A Bison parser, made by GNU Bison 3.0.4. */ - -/* Bison implementation for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - -/* C LALR(1) parser skeleton written by Richard Stallman, by - simplifying the original so-called "semantic" parser. */ - -/* All symbols defined below should begin with yy or YY, to avoid - infringing on user name space. This should be done even for local - variables, as they might otherwise be expanded by user macros. - There are some unavoidable exceptions within include files to - define necessary library symbols; they are noted "INFRINGES ON - USER NAME SPACE" below. */ - -/* Identify Bison output. */ -#define YYBISON 1 - -/* Bison version. */ -#define YYBISON_VERSION "3.0.4" - -/* Skeleton name. */ -#define YYSKELETON_NAME "yacc.c" - -/* Pure parsers. */ -#define YYPURE 1 - -/* Push parsers. */ -#define YYPUSH 0 - -/* Pull parsers. */ -#define YYPULL 1 - - -/* Substitute the variable and function names. */ -#define yyparse cmCommandArgument_yyparse -#define yylex cmCommandArgument_yylex -#define yyerror cmCommandArgument_yyerror -#define yydebug cmCommandArgument_yydebug -#define yynerrs cmCommandArgument_yynerrs - - -/* Copy the first part of user declarations. */ -#line 1 "cmCommandArgumentParser.y" /* yacc.c:339 */ - -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ -/* - -This file must be translated to C and modified to build everywhere. - -Run bison like this: - - bison --yacc --name-prefix=cmCommandArgument_yy --defines=cmCommandArgumentParserTokens.h -ocmCommandArgumentParser.cxx cmCommandArgumentParser.y - -Modify cmCommandArgumentParser.cxx: - - "#if 0" out yyerrorlab block in range ["goto yyerrlab1", "yyerrlab1:"] - -*/ - -#include "cmConfigure.h" // IWYU pragma: keep - -#include - -#define yyGetParser (cmCommandArgument_yyget_extra(yyscanner)) - -/* Make sure malloc and free are available on QNX. */ -#ifdef __QNX__ -# include -#endif - -/* Make sure the parser uses standard memory allocation. The default - generated parser malloc/free declarations do not work on all - platforms. */ -#include -#define YYMALLOC malloc -#define YYFREE free - -/*-------------------------------------------------------------------------*/ -#include "cmCommandArgumentParserHelper.h" /* Interface to parser object. */ -#include "cmCommandArgumentLexer.h" /* Interface to lexer object. */ -#include "cmCommandArgumentParserTokens.h" /* Need YYSTYPE for YY_DECL. */ - -/* Forward declare the lexer entry point. */ -YY_DECL; - -/* Helper function to forward error callback from parser. */ -static void cmCommandArgument_yyerror(yyscan_t yyscanner, const char* message); - -/* Configure the parser to support large input. */ -#define YYMAXDEPTH 100000 -#define YYINITDEPTH 10000 - -/* Disable some warnings in the generated code. */ -#ifdef _MSC_VER -# pragma warning (disable: 4102) /* Unused goto label. */ -# pragma warning (disable: 4065) /* Switch statement contains default but no - case. */ -# pragma warning (disable: 4244) /* loss of precision */ -# pragma warning (disable: 4702) /* unreachable code */ -#endif - -#line 131 "cmCommandArgumentParser.cxx" /* yacc.c:339 */ - -# ifndef YY_NULLPTR -# if defined __cplusplus && 201103L <= __cplusplus -# define YY_NULLPTR nullptr -# else -# define YY_NULLPTR 0 -# endif -# endif - -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE 1 -#endif - -/* In a future release of Bison, this section will be replaced - by #include "cmCommandArgumentParserTokens.h". */ -#ifndef YY_CMCOMMANDARGUMENT_YY_CMCOMMANDARGUMENTPARSERTOKENS_H_INCLUDED -# define YY_CMCOMMANDARGUMENT_YY_CMCOMMANDARGUMENTPARSERTOKENS_H_INCLUDED -/* Debug traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif -#if YYDEBUG -extern int cmCommandArgument_yydebug; -#endif - -/* Token type. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - enum yytokentype - { - cal_ENVCURLY = 258, - cal_NCURLY = 259, - cal_DCURLY = 260, - cal_DOLLAR = 261, - cal_LCURLY = 262, - cal_RCURLY = 263, - cal_NAME = 264, - cal_BSLASH = 265, - cal_SYMBOL = 266, - cal_AT = 267, - cal_ERROR = 268, - cal_ATNAME = 269 - }; -#endif -/* Tokens. */ -#define cal_ENVCURLY 258 -#define cal_NCURLY 259 -#define cal_DCURLY 260 -#define cal_DOLLAR 261 -#define cal_LCURLY 262 -#define cal_RCURLY 263 -#define cal_NAME 264 -#define cal_BSLASH 265 -#define cal_SYMBOL 266 -#define cal_AT 267 -#define cal_ERROR 268 -#define cal_ATNAME 269 - -/* Value type. */ - - - -int cmCommandArgument_yyparse (yyscan_t yyscanner); - -#endif /* !YY_CMCOMMANDARGUMENT_YY_CMCOMMANDARGUMENTPARSERTOKENS_H_INCLUDED */ - -/* Copy the second part of user declarations. */ - -#line 204 "cmCommandArgumentParser.cxx" /* yacc.c:358 */ - -#ifdef short -# undef short -#endif - -#ifdef YYTYPE_UINT8 -typedef YYTYPE_UINT8 yytype_uint8; -#else -typedef unsigned char yytype_uint8; -#endif - -#ifdef YYTYPE_INT8 -typedef YYTYPE_INT8 yytype_int8; -#else -typedef signed char yytype_int8; -#endif - -#ifdef YYTYPE_UINT16 -typedef YYTYPE_UINT16 yytype_uint16; -#else -typedef unsigned short int yytype_uint16; -#endif - -#ifdef YYTYPE_INT16 -typedef YYTYPE_INT16 yytype_int16; -#else -typedef short int yytype_int16; -#endif - -#ifndef YYSIZE_T -# ifdef __SIZE_TYPE__ -# define YYSIZE_T __SIZE_TYPE__ -# elif defined size_t -# define YYSIZE_T size_t -# elif ! defined YYSIZE_T -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# else -# define YYSIZE_T unsigned int -# endif -#endif - -#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) - -#ifndef YY_ -# if defined YYENABLE_NLS && YYENABLE_NLS -# if ENABLE_NLS -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_(Msgid) dgettext ("bison-runtime", Msgid) -# endif -# endif -# ifndef YY_ -# define YY_(Msgid) Msgid -# endif -#endif - -#ifndef YY_ATTRIBUTE -# if (defined __GNUC__ \ - && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ - || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C -# define YY_ATTRIBUTE(Spec) __attribute__(Spec) -# else -# define YY_ATTRIBUTE(Spec) /* empty */ -# endif -#endif - -#ifndef YY_ATTRIBUTE_PURE -# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) -#endif - -#ifndef YY_ATTRIBUTE_UNUSED -# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) -#endif - -#if !defined _Noreturn \ - && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) -# if defined _MSC_VER && 1200 <= _MSC_VER -# define _Noreturn __declspec (noreturn) -# else -# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) -# endif -#endif - -/* Suppress unused-variable warnings by "using" E. */ -#if ! defined lint || defined __GNUC__ -# define YYUSE(E) ((void) (E)) -#else -# define YYUSE(E) /* empty */ -#endif - -#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ -/* Suppress an incorrect diagnostic about yylval being uninitialized. */ -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ - _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ - _Pragma ("GCC diagnostic pop") -#else -# define YY_INITIAL_VALUE(Value) Value -#endif -#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_END -#endif -#ifndef YY_INITIAL_VALUE -# define YY_INITIAL_VALUE(Value) /* Nothing. */ -#endif - - -#if ! defined yyoverflow || YYERROR_VERBOSE - -/* The parser invokes alloca or malloc; define the necessary symbols. */ - -# ifdef YYSTACK_USE_ALLOCA -# if YYSTACK_USE_ALLOCA -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca -# elif defined __BUILTIN_VA_ARG_INCR -# include /* INFRINGES ON USER NAME SPACE */ -# elif defined _AIX -# define YYSTACK_ALLOC __alloca -# elif defined _MSC_VER -# include /* INFRINGES ON USER NAME SPACE */ -# define alloca _alloca -# else -# define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS -# include /* INFRINGES ON USER NAME SPACE */ - /* Use EXIT_SUCCESS as a witness for stdlib.h. */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# endif -# endif -# endif - -# ifdef YYSTACK_ALLOC - /* Pacify GCC's 'empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) -# ifndef YYSTACK_ALLOC_MAXIMUM - /* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -# endif -# else -# define YYSTACK_ALLOC YYMALLOC -# define YYSTACK_FREE YYFREE -# ifndef YYSTACK_ALLOC_MAXIMUM -# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -# endif -# if (defined __cplusplus && ! defined EXIT_SUCCESS \ - && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# ifndef YYMALLOC -# define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS -void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# ifndef YYFREE -# define YYFREE free -# if ! defined free && ! defined EXIT_SUCCESS -void free (void *); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# endif -#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ - - -#if (! defined yyoverflow \ - && (! defined __cplusplus \ - || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) - -/* A type that is properly aligned for any stack member. */ -union yyalloc -{ - yytype_int16 yyss_alloc; - YYSTYPE yyvs_alloc; -}; - -/* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) - -/* The size of an array large to enough to hold all stacks, each with - N elements. */ -# define YYSTACK_BYTES(N) \ - ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ - + YYSTACK_GAP_MAXIMUM) - -# define YYCOPY_NEEDED 1 - -/* Relocate STACK from its old location to the new one. The - local variables YYSIZE and YYSTACKSIZE give the old and new number of - elements in the stack, and YYPTR gives the new location of the - stack. Advance YYPTR to a properly aligned location for the next - stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (0) - -#endif - -#if defined YYCOPY_NEEDED && YYCOPY_NEEDED -/* Copy COUNT objects from SRC to DST. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(Dst, Src, Count) \ - __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) -# else -# define YYCOPY(Dst, Src, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (Dst)[yyi] = (Src)[yyi]; \ - } \ - while (0) -# endif -# endif -#endif /* !YYCOPY_NEEDED */ - -/* YYFINAL -- State number of the termination state. */ -#define YYFINAL 25 -/* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 40 - -/* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 15 -/* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 10 -/* YYNRULES -- Number of rules. */ -#define YYNRULES 24 -/* YYNSTATES -- Number of states. */ -#define YYNSTATES 33 - -/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned - by yylex, with out-of-bounds checking. */ -#define YYUNDEFTOK 2 -#define YYMAXUTOK 269 - -#define YYTRANSLATE(YYX) \ - ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) - -/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM - as returned by yylex, without out-of-bounds checking. */ -static const yytype_uint8 yytranslate[] = -{ - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 -}; - -#if YYDEBUG - /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ -static const yytype_uint8 yyrline[] = -{ - 0, 96, 96, 102, 105, 110, 113, 118, 121, 126, - 129, 132, 135, 138, 141, 146, 149, 152, 155, 160, - 163, 168, 171, 176, 179 -}; -#endif - -#if YYDEBUG || YYERROR_VERBOSE || 1 -/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = -{ - "$end", "error", "$undefined", "cal_ENVCURLY", "cal_NCURLY", - "cal_DCURLY", "\"$\"", "\"{\"", "\"}\"", "cal_NAME", "\"\\\\\"", - "cal_SYMBOL", "\"@\"", "cal_ERROR", "cal_ATNAME", "$accept", "Start", - "GoalWithOptionalBackSlash", "Goal", "String", "OuterText", "Variable", - "EnvVarName", "MultipleIds", "ID", YY_NULLPTR -}; -#endif - -# ifdef YYPRINT -/* YYTOKNUM[NUM] -- (External) token number corresponding to the - (internal) symbol number NUM (which must be that of a token). */ -static const yytype_uint16 yytoknum[] = -{ - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269 -}; -# endif - -#define YYPACT_NINF -3 - -#define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-3))) - -#define YYTABLE_NINF -1 - -#define yytable_value_is_error(Yytable_value) \ - 0 - - /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -static const yytype_int8 yypact[] = -{ - 0, 14, 26, 26, -3, -3, -3, -3, -3, -3, - -3, 10, -3, 3, 0, -3, -3, -3, 14, -3, - 7, -3, 26, 13, 16, -3, -3, -3, -3, -3, - -3, -3, -3 -}; - - /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE does not specify something else to do. Zero - means the default is an error. */ -static const yytype_uint8 yydefact[] = -{ - 5, 21, 21, 21, 11, 12, 13, 9, 14, 10, - 18, 0, 2, 3, 5, 7, 8, 23, 21, 24, - 0, 19, 21, 0, 0, 1, 4, 6, 20, 15, - 22, 16, 17 -}; - - /* YYPGOTO[NTERM-NUM]. */ -static const yytype_int8 yypgoto[] = -{ - -3, -3, -3, 8, -3, -3, 2, 9, -2, -3 -}; - - /* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int8 yydefgoto[] = -{ - -1, 11, 12, 13, 14, 15, 19, 20, 21, 22 -}; - - /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule whose - number is the opposite. If YYTABLE_NINF, syntax error. */ -static const yytype_uint8 yytable[] = -{ - 23, 24, 16, 1, 2, 3, 4, 5, 6, 7, - 25, 8, 9, 26, 10, 29, 16, 1, 2, 3, - 30, 31, 27, 17, 32, 18, 0, 28, 10, 1, - 2, 3, 0, 0, 0, 17, 0, 0, 0, 0, - 10 -}; - -static const yytype_int8 yycheck[] = -{ - 2, 3, 0, 3, 4, 5, 6, 7, 8, 9, - 0, 11, 12, 10, 14, 8, 14, 3, 4, 5, - 22, 8, 14, 9, 8, 11, -1, 18, 14, 3, - 4, 5, -1, -1, -1, 9, -1, -1, -1, -1, - 14 -}; - - /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -static const yytype_uint8 yystos[] = -{ - 0, 3, 4, 5, 6, 7, 8, 9, 11, 12, - 14, 16, 17, 18, 19, 20, 21, 9, 11, 21, - 22, 23, 24, 23, 23, 0, 10, 18, 22, 8, - 23, 8, 8 -}; - - /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = -{ - 0, 15, 16, 17, 17, 18, 18, 19, 19, 20, - 20, 20, 20, 20, 20, 21, 21, 21, 21, 22, - 22, 23, 23, 24, 24 -}; - - /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = -{ - 0, 2, 1, 1, 2, 0, 2, 1, 1, 1, - 1, 1, 1, 1, 1, 3, 3, 3, 1, 1, - 2, 0, 2, 1, 1 -}; - - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab - - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK (yylen); \ - yystate = *yyssp; \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (yyscanner, YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (0) - -/* Error token number */ -#define YYTERROR 1 -#define YYERRCODE 256 - - - -/* Enable debugging if requested. */ -#if YYDEBUG - -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (0) - -/* This macro is provided for backward compatibility. */ -#ifndef YY_LOCATION_PRINT -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -#endif - - -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value, yyscanner); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (0) - - -/*----------------------------------------. -| Print this symbol's value on YYOUTPUT. | -`----------------------------------------*/ - -static void -yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, yyscan_t yyscanner) -{ - FILE *yyo = yyoutput; - YYUSE (yyo); - YYUSE (yyscanner); - if (!yyvaluep) - return; -# ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# endif - YYUSE (yytype); -} - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -static void -yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, yyscan_t yyscanner) -{ - YYFPRINTF (yyoutput, "%s %s (", - yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); - - yy_symbol_value_print (yyoutput, yytype, yyvaluep, yyscanner); - YYFPRINTF (yyoutput, ")"); -} - -/*------------------------------------------------------------------. -| yy_stack_print -- Print the state stack from its BOTTOM up to its | -| TOP (included). | -`------------------------------------------------------------------*/ - -static void -yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) -{ - YYFPRINTF (stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) - { - int yybot = *yybottom; - YYFPRINTF (stderr, " %d", yybot); - } - YYFPRINTF (stderr, "\n"); -} - -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (0) - - -/*------------------------------------------------. -| Report that the YYRULE is going to be reduced. | -`------------------------------------------------*/ - -static void -yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule, yyscan_t yyscanner) -{ - unsigned long int yylno = yyrline[yyrule]; - int yynrhs = yyr2[yyrule]; - int yyi; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); - /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) - { - YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, - yystos[yyssp[yyi + 1 - yynrhs]], - &(yyvsp[(yyi + 1) - (yynrhs)]) - , yyscanner); - YYFPRINTF (stderr, "\n"); - } -} - -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyssp, yyvsp, Rule, yyscanner); \ -} while (0) - -/* Nonzero means print parse trace. It is left uninitialized so that - multiple parsers can coexist. */ -int yydebug; -#else /* !YYDEBUG */ -# define YYDPRINTF(Args) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) -# define YY_STACK_PRINT(Bottom, Top) -# define YY_REDUCE_PRINT(Rule) -#endif /* !YYDEBUG */ - - -/* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH -# define YYINITDEPTH 200 -#endif - -/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only - if the built-in stack extension method is used). - - Do not make this value too large; the results are undefined if - YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) - evaluated with infinite-precision integer arithmetic. */ - -#ifndef YYMAXDEPTH -# define YYMAXDEPTH 10000 -#endif - - -#if YYERROR_VERBOSE - -# ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen strlen -# else -/* Return the length of YYSTR. */ -static YYSIZE_T -yystrlen (const char *yystr) -{ - YYSIZE_T yylen; - for (yylen = 0; yystr[yylen]; yylen++) - continue; - return yylen; -} -# endif -# endif - -# ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ -static char * -yystpcpy (char *yydest, const char *yysrc) -{ - char *yyd = yydest; - const char *yys = yysrc; - - while ((*yyd++ = *yys++) != '\0') - continue; - - return yyd - 1; -} -# endif -# endif - -# ifndef yytnamerr -/* Copy to YYRES the contents of YYSTR after stripping away unnecessary - quotes and backslashes, so that it's suitable for yyerror. The - heuristic is that double-quoting is unnecessary unless the string - contains an apostrophe, a comma, or backslash (other than - backslash-backslash). YYSTR is taken from yytname. If YYRES is - null, do not copy; instead, return the length of what the result - would have been. */ -static YYSIZE_T -yytnamerr (char *yyres, const char *yystr) -{ - if (*yystr == '"') - { - YYSIZE_T yyn = 0; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } - - if (! yyres) - return yystrlen (yystr); - - return yystpcpy (yyres, yystr) - yyres; -} -# endif - -/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message - about the unexpected token YYTOKEN for the state stack whose top is - YYSSP. - - Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is - not large enough to hold the message. In that case, also set - *YYMSG_ALLOC to the required number of bytes. Return 2 if the - required number of bytes is too large to store. */ -static int -yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, - yytype_int16 *yyssp, int yytoken) -{ - YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); - YYSIZE_T yysize = yysize0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - /* Internationalized format string. */ - const char *yyformat = YY_NULLPTR; - /* Arguments of yyformat. */ - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - /* Number of reported tokens (one for the "unexpected", one per - "expected"). */ - int yycount = 0; - - /* There are many possibilities here to consider: - - If this state is a consistent state with a default action, then - the only way this function was invoked is if the default action - is an error action. In that case, don't check for expected - tokens because there are none. - - The only way there can be no lookahead present (in yychar) is if - this state is a consistent state with a default action. Thus, - detecting the absence of a lookahead is sufficient to determine - that there is no unexpected or expected token to report. In that - case, just report a simple "syntax error". - - Don't assume there isn't a lookahead just because this state is a - consistent state with a default action. There might have been a - previous inconsistent state, consistent state with a non-default - action, or user semantic action that manipulated yychar. - - Of course, the expected token list depends on states to have - correct lookahead information, and it depends on the parser not - to perform extra reductions after fetching a lookahead from the - scanner and before detecting a syntax error. Thus, state merging - (from LALR or IELR) and default reductions corrupt the expected - token list. However, the list is correct for canonical LR with - one exception: it will still contain any token that will not be - accepted due to an error action in a later state. - */ - if (yytoken != YYEMPTY) - { - int yyn = yypact[*yyssp]; - yyarg[yycount++] = yytname[yytoken]; - if (!yypact_value_is_default (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR - && !yytable_value_is_error (yytable[yyx + yyn])) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - break; - } - yyarg[yycount++] = yytname[yyx]; - { - YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); - if (! (yysize <= yysize1 - && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } - } - } - } - - switch (yycount) - { -# define YYCASE_(N, S) \ - case N: \ - yyformat = S; \ - break - YYCASE_(0, YY_("syntax error")); - YYCASE_(1, YY_("syntax error, unexpected %s")); - YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); - YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); - YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); - YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); -# undef YYCASE_ - } - - { - YYSIZE_T yysize1 = yysize + yystrlen (yyformat); - if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } - - if (*yymsg_alloc < yysize) - { - *yymsg_alloc = 2 * yysize; - if (! (yysize <= *yymsg_alloc - && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return 1; - } - - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - { - char *yyp = *yymsg; - int yyi = 0; - while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyformat += 2; - } - else - { - yyp++; - yyformat++; - } - } - return 0; -} -#endif /* YYERROR_VERBOSE */ - -/*-----------------------------------------------. -| Release the memory associated to this symbol. | -`-----------------------------------------------*/ - -static void -yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, yyscan_t yyscanner) -{ - YYUSE (yyvaluep); - YYUSE (yyscanner); - if (!yymsg) - yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YYUSE (yytype); - YY_IGNORE_MAYBE_UNINITIALIZED_END -} - - - - -/*----------. -| yyparse. | -`----------*/ - -int -yyparse (yyscan_t yyscanner) -{ -/* The lookahead symbol. */ -int yychar; - - -/* The semantic value of the lookahead symbol. */ -/* Default value used for initialization, for pacifying older GCCs - or non-GCC compilers. */ -YY_INITIAL_VALUE (static YYSTYPE yyval_default;) -YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); - - /* Number of syntax errors so far. */ - int yynerrs; - - int yystate; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - - /* The stacks and their tools: - 'yyss': related to states. - 'yyvs': related to semantic values. - - Refer to the stacks through separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss; - yytype_int16 *yyssp; - - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs; - YYSTYPE *yyvsp; - - YYSIZE_T yystacksize; - - int yyn; - int yyresult; - /* Lookahead token as an internal (translated) token number. */ - int yytoken = 0; - /* The variables used to return semantic value and location from the - action routines. */ - YYSTYPE yyval; - -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif - -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) - - /* The number of symbols on the RHS of the reduced rule. - Keep to zero when no symbol should be popped. */ - int yylen = 0; - - yyssp = yyss = yyssa; - yyvsp = yyvs = yyvsa; - yystacksize = YYINITDEPTH; - - YYDPRINTF ((stderr, "Starting parse\n")); - - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ - goto yysetstate; - -/*------------------------------------------------------------. -| yynewstate -- Push a new state, which is found in yystate. | -`------------------------------------------------------------*/ - yynewstate: - /* In all cases, when you get here, the value and location stacks - have just been pushed. So pushing a state here evens the stacks. */ - yyssp++; - - yysetstate: - *yyssp = yystate; - - if (yyss + yystacksize - 1 <= yyssp) - { - /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = yyssp - yyss + 1; - -#ifdef yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yystacksize); - - yyss = yyss1; - yyvs = yyvs1; - } -#else /* no yyoverflow */ -# ifndef YYSTACK_RELOCATE - goto yyexhaustedlab; -# else - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); -# undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); - } -# endif -#endif /* no yyoverflow */ - - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); - - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } - - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - - if (yystate == YYFINAL) - YYACCEPT; - - goto yybackup; - -/*-----------. -| yybackup. | -`-----------*/ -yybackup: - - /* Do appropriate processing given the current state. Read a - lookahead token if we need one and don't already have one. */ - - /* First try to decide what to do without reference to lookahead token. */ - yyn = yypact[yystate]; - if (yypact_value_is_default (yyn)) - goto yydefault; - - /* Not known => get a lookahead token if don't already have one. */ - - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ - if (yychar == YYEMPTY) - { - YYDPRINTF ((stderr, "Reading a token: ")); - yychar = yylex (&yylval, yyscanner); - } - - if (yychar <= YYEOF) - { - yychar = yytoken = YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); - } - else - { - yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); - } - - /* If the proper action on seeing token YYTOKEN is to reduce or to - detect an error, take that action. */ - yyn += yytoken; - if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) - goto yydefault; - yyn = yytable[yyn]; - if (yyn <= 0) - { - if (yytable_value_is_error (yyn)) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } - - /* Count tokens shifted since error; after three, turn off error - status. */ - if (yyerrstatus) - yyerrstatus--; - - /* Shift the lookahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - - /* Discard the shifted token. */ - yychar = YYEMPTY; - - yystate = yyn; - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - *++yyvsp = yylval; - YY_IGNORE_MAYBE_UNINITIALIZED_END - - goto yynewstate; - - -/*-----------------------------------------------------------. -| yydefault -- do the default action for the current state. | -`-----------------------------------------------------------*/ -yydefault: - yyn = yydefact[yystate]; - if (yyn == 0) - goto yyerrlab; - goto yyreduce; - - -/*-----------------------------. -| yyreduce -- Do a reduction. | -`-----------------------------*/ -yyreduce: - /* yyn is the number of a rule to reduce with. */ - yylen = yyr2[yyn]; - - /* If YYLEN is nonzero, implement the default value of the action: - '$$ = $1'. - - Otherwise, the following line sets YYVAL to garbage. - This behavior is undocumented and Bison - users should not rely upon it. Assigning to YYVAL - unconditionally makes the parser a bit smaller, and it avoids a - GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1-yylen]; - - - YY_REDUCE_PRINT (yyn); - switch (yyn) - { - case 2: -#line 96 "cmCommandArgumentParser.y" /* yacc.c:1646 */ - { - (yyval.str) = 0; - yyGetParser->SetResult((yyvsp[0].str)); - } -#line 1306 "cmCommandArgumentParser.cxx" /* yacc.c:1646 */ - break; - - case 3: -#line 102 "cmCommandArgumentParser.y" /* yacc.c:1646 */ - { - (yyval.str) = (yyvsp[0].str); - } -#line 1314 "cmCommandArgumentParser.cxx" /* yacc.c:1646 */ - break; - - case 4: -#line 105 "cmCommandArgumentParser.y" /* yacc.c:1646 */ - { - (yyval.str) = yyGetParser->CombineUnions((yyvsp[-1].str), (yyvsp[0].str)); - } -#line 1322 "cmCommandArgumentParser.cxx" /* yacc.c:1646 */ - break; - - case 5: -#line 110 "cmCommandArgumentParser.y" /* yacc.c:1646 */ - { - (yyval.str) = 0; - } -#line 1330 "cmCommandArgumentParser.cxx" /* yacc.c:1646 */ - break; - - case 6: -#line 113 "cmCommandArgumentParser.y" /* yacc.c:1646 */ - { - (yyval.str) = yyGetParser->CombineUnions((yyvsp[-1].str), (yyvsp[0].str)); - } -#line 1338 "cmCommandArgumentParser.cxx" /* yacc.c:1646 */ - break; - - case 7: -#line 118 "cmCommandArgumentParser.y" /* yacc.c:1646 */ - { - (yyval.str) = (yyvsp[0].str); - } -#line 1346 "cmCommandArgumentParser.cxx" /* yacc.c:1646 */ - break; - - case 8: -#line 121 "cmCommandArgumentParser.y" /* yacc.c:1646 */ - { - (yyval.str) = (yyvsp[0].str); - } -#line 1354 "cmCommandArgumentParser.cxx" /* yacc.c:1646 */ - break; - - case 9: -#line 126 "cmCommandArgumentParser.y" /* yacc.c:1646 */ - { - (yyval.str) = (yyvsp[0].str); - } -#line 1362 "cmCommandArgumentParser.cxx" /* yacc.c:1646 */ - break; - - case 10: -#line 129 "cmCommandArgumentParser.y" /* yacc.c:1646 */ - { - (yyval.str) = (yyvsp[0].str); - } -#line 1370 "cmCommandArgumentParser.cxx" /* yacc.c:1646 */ - break; - - case 11: -#line 132 "cmCommandArgumentParser.y" /* yacc.c:1646 */ - { - (yyval.str) = (yyvsp[0].str); - } -#line 1378 "cmCommandArgumentParser.cxx" /* yacc.c:1646 */ - break; - - case 12: -#line 135 "cmCommandArgumentParser.y" /* yacc.c:1646 */ - { - (yyval.str) = (yyvsp[0].str); - } -#line 1386 "cmCommandArgumentParser.cxx" /* yacc.c:1646 */ - break; - - case 13: -#line 138 "cmCommandArgumentParser.y" /* yacc.c:1646 */ - { - (yyval.str) = (yyvsp[0].str); - } -#line 1394 "cmCommandArgumentParser.cxx" /* yacc.c:1646 */ - break; - - case 14: -#line 141 "cmCommandArgumentParser.y" /* yacc.c:1646 */ - { - (yyval.str) = (yyvsp[0].str); - } -#line 1402 "cmCommandArgumentParser.cxx" /* yacc.c:1646 */ - break; - - case 15: -#line 146 "cmCommandArgumentParser.y" /* yacc.c:1646 */ - { - (yyval.str) = yyGetParser->ExpandSpecialVariable((yyvsp[-2].str), (yyvsp[-1].str)); - } -#line 1410 "cmCommandArgumentParser.cxx" /* yacc.c:1646 */ - break; - - case 16: -#line 149 "cmCommandArgumentParser.y" /* yacc.c:1646 */ - { - (yyval.str) = yyGetParser->ExpandSpecialVariable((yyvsp[-2].str), (yyvsp[-1].str)); - } -#line 1418 "cmCommandArgumentParser.cxx" /* yacc.c:1646 */ - break; - - case 17: -#line 152 "cmCommandArgumentParser.y" /* yacc.c:1646 */ - { - (yyval.str) = yyGetParser->ExpandVariable((yyvsp[-1].str)); - } -#line 1426 "cmCommandArgumentParser.cxx" /* yacc.c:1646 */ - break; - - case 18: -#line 155 "cmCommandArgumentParser.y" /* yacc.c:1646 */ - { - (yyval.str) = yyGetParser->ExpandVariableForAt((yyvsp[0].str)); - } -#line 1434 "cmCommandArgumentParser.cxx" /* yacc.c:1646 */ - break; - - case 19: -#line 160 "cmCommandArgumentParser.y" /* yacc.c:1646 */ - { - (yyval.str) = (yyvsp[0].str); - } -#line 1442 "cmCommandArgumentParser.cxx" /* yacc.c:1646 */ - break; - - case 20: -#line 163 "cmCommandArgumentParser.y" /* yacc.c:1646 */ - { - (yyval.str) = (yyvsp[-1].str); - } -#line 1450 "cmCommandArgumentParser.cxx" /* yacc.c:1646 */ - break; - - case 21: -#line 168 "cmCommandArgumentParser.y" /* yacc.c:1646 */ - { - (yyval.str) = 0; - } -#line 1458 "cmCommandArgumentParser.cxx" /* yacc.c:1646 */ - break; - - case 22: -#line 171 "cmCommandArgumentParser.y" /* yacc.c:1646 */ - { - (yyval.str) = yyGetParser->CombineUnions((yyvsp[-1].str), (yyvsp[0].str)); - } -#line 1466 "cmCommandArgumentParser.cxx" /* yacc.c:1646 */ - break; - - case 23: -#line 176 "cmCommandArgumentParser.y" /* yacc.c:1646 */ - { - (yyval.str) = (yyvsp[0].str); - } -#line 1474 "cmCommandArgumentParser.cxx" /* yacc.c:1646 */ - break; - - case 24: -#line 179 "cmCommandArgumentParser.y" /* yacc.c:1646 */ - { - (yyval.str) = (yyvsp[0].str); - } -#line 1482 "cmCommandArgumentParser.cxx" /* yacc.c:1646 */ - break; - - -#line 1486 "cmCommandArgumentParser.cxx" /* yacc.c:1646 */ - default: break; - } - /* User semantic actions sometimes alter yychar, and that requires - that yytoken be updated with the new translation. We take the - approach of translating immediately before every use of yytoken. - One alternative is translating here after every semantic action, - but that translation would be missed if the semantic action invokes - YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or - if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an - incorrect destructor might then be invoked immediately. In the - case of YYERROR or YYBACKUP, subsequent parser actions might lead - to an incorrect destructor call or verbose syntax error message - before the lookahead is translated. */ - YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); - - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - - *++yyvsp = yyval; - - /* Now 'shift' the result of the reduction. Determine what state - that goes to, based on the state we popped back to and the rule - number reduced by. */ - - yyn = yyr1[yyn]; - - yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; - if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTOKENS]; - - goto yynewstate; - - -/*--------------------------------------. -| yyerrlab -- here on detecting error. | -`--------------------------------------*/ -yyerrlab: - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); - - /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) - { - ++yynerrs; -#if ! YYERROR_VERBOSE - yyerror (yyscanner, YY_("syntax error")); -#else -# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ - yyssp, yytoken) - { - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = YYSYNTAX_ERROR; - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == 1) - { - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); - if (!yymsg) - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = 2; - } - else - { - yysyntax_error_status = YYSYNTAX_ERROR; - yymsgp = yymsg; - } - } - yyerror (yyscanner, yymsgp); - if (yysyntax_error_status == 2) - goto yyexhaustedlab; - } -# undef YYSYNTAX_ERROR -#endif - } - - - - if (yyerrstatus == 3) - { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ - - if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } - else - { - yydestruct ("Error: discarding", - yytoken, &yylval, yyscanner); - yychar = YYEMPTY; - } - } - -#if 0 - /* Else will try to reuse lookahead token after shifting the error - token. */ - goto yyerrlab1; - - -/*---------------------------------------------------. -| yyerrorlab -- error raised explicitly by YYERROR. | -`---------------------------------------------------*/ -yyerrorlab: - - /* Pacify compilers like GCC when the user code never invokes - YYERROR and the label yyerrorlab therefore never appears in user - code. */ - if (/*CONSTCOND*/ 0) - goto yyerrorlab; - - /* Do not reclaim the symbols of the rule whose action triggered - this YYERROR. */ - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - yystate = *yyssp; - goto yyerrlab1; - - -/*-------------------------------------------------------------. -| yyerrlab1 -- common code for both syntax error and YYERROR. | -`-------------------------------------------------------------*/ -yyerrlab1: -#endif - yyerrstatus = 3; /* Each real token shifted decrements this. */ - - for (;;) - { - yyn = yypact[yystate]; - if (!yypact_value_is_default (yyn)) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } - - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; - - - yydestruct ("Error: popping", - yystos[yystate], yyvsp, yyscanner); - YYPOPSTACK (1); - yystate = *yyssp; - YY_STACK_PRINT (yyss, yyssp); - } - - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - *++yyvsp = yylval; - YY_IGNORE_MAYBE_UNINITIALIZED_END - - - /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); - - yystate = yyn; - goto yynewstate; - - -/*-------------------------------------. -| yyacceptlab -- YYACCEPT comes here. | -`-------------------------------------*/ -yyacceptlab: - yyresult = 0; - goto yyreturn; - -/*-----------------------------------. -| yyabortlab -- YYABORT comes here. | -`-----------------------------------*/ -yyabortlab: - yyresult = 1; - goto yyreturn; - -#if !defined yyoverflow || YYERROR_VERBOSE -/*-------------------------------------------------. -| yyexhaustedlab -- memory exhaustion comes here. | -`-------------------------------------------------*/ -yyexhaustedlab: - yyerror (yyscanner, YY_("memory exhausted")); - yyresult = 2; - /* Fall through. */ -#endif - -yyreturn: - if (yychar != YYEMPTY) - { - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = YYTRANSLATE (yychar); - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval, yyscanner); - } - /* Do not reclaim the symbols of the rule whose action triggered - this YYABORT or YYACCEPT. */ - YYPOPSTACK (yylen); - YY_STACK_PRINT (yyss, yyssp); - while (yyssp != yyss) - { - yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp, yyscanner); - YYPOPSTACK (1); - } -#ifndef yyoverflow - if (yyss != yyssa) - YYSTACK_FREE (yyss); -#endif -#if YYERROR_VERBOSE - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); -#endif - return yyresult; -} -#line 184 "cmCommandArgumentParser.y" /* yacc.c:1906 */ - -/* End of grammar */ - -/*--------------------------------------------------------------------------*/ -void cmCommandArgument_yyerror(yyscan_t yyscanner, const char* message) -{ - yyGetParser->Error(message); -} diff --git a/Source/cmCommandArgumentParser.y b/Source/cmCommandArgumentParser.y deleted file mode 100644 index d6c8312..0000000 --- a/Source/cmCommandArgumentParser.y +++ /dev/null @@ -1,192 +0,0 @@ -%{ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ -/* - -This file must be translated to C and modified to build everywhere. - -Run bison like this: - - bison --yacc --name-prefix=cmCommandArgument_yy --defines=cmCommandArgumentParserTokens.h -ocmCommandArgumentParser.cxx cmCommandArgumentParser.y - -Modify cmCommandArgumentParser.cxx: - - "#if 0" out yyerrorlab block in range ["goto yyerrlab1", "yyerrlab1:"] - -*/ - -#include "cmConfigure.h" // IWYU pragma: keep - -#include - -#define yyGetParser (cmCommandArgument_yyget_extra(yyscanner)) - -/* Make sure malloc and free are available on QNX. */ -#ifdef __QNX__ -# include -#endif - -/* Make sure the parser uses standard memory allocation. The default - generated parser malloc/free declarations do not work on all - platforms. */ -#include -#define YYMALLOC malloc -#define YYFREE free - -/*-------------------------------------------------------------------------*/ -#include "cmCommandArgumentParserHelper.h" /* Interface to parser object. */ -#include "cmCommandArgumentLexer.h" /* Interface to lexer object. */ -#include "cmCommandArgumentParserTokens.h" /* Need YYSTYPE for YY_DECL. */ - -/* Forward declare the lexer entry point. */ -YY_DECL; - -/* Helper function to forward error callback from parser. */ -static void cmCommandArgument_yyerror(yyscan_t yyscanner, const char* message); - -/* Configure the parser to support large input. */ -#define YYMAXDEPTH 100000 -#define YYINITDEPTH 10000 - -/* Disable some warnings in the generated code. */ -#ifdef _MSC_VER -# pragma warning (disable: 4102) /* Unused goto label. */ -# pragma warning (disable: 4065) /* Switch statement contains default but no - case. */ -# pragma warning (disable: 4244) /* loss of precision */ -# pragma warning (disable: 4702) /* unreachable code */ -#endif -%} - -/* Generate a reentrant parser object. */ -%define api.pure - -/* Configure the parser to use a lexer object. */ -%lex-param {yyscan_t yyscanner} -%parse-param {yyscan_t yyscanner} - -%define parse.error verbose - -/* -%union { - char* string; -} -*/ - -/*-------------------------------------------------------------------------*/ -/* Tokens */ -%token cal_ENVCURLY -%token cal_NCURLY -%token cal_DCURLY -%token cal_DOLLAR "$" -%token cal_LCURLY "{" -%token cal_RCURLY "}" -%token cal_NAME -%token cal_BSLASH "\\" -%token cal_SYMBOL -%token cal_AT "@" -%token cal_ERROR -%token cal_ATNAME - -/*-------------------------------------------------------------------------*/ -/* grammar */ -%% - - -Start: - GoalWithOptionalBackSlash { - $$ = 0; - yyGetParser->SetResult($1); - } - -GoalWithOptionalBackSlash: - Goal { - $$ = $1; - } -| Goal cal_BSLASH { - $$ = yyGetParser->CombineUnions($1, $2); - } - -Goal: - { - $$ = 0; - } -| String Goal { - $$ = yyGetParser->CombineUnions($1, $2); - } - -String: - OuterText { - $$ = $1; - } -| Variable { - $$ = $1; - } - -OuterText: - cal_NAME { - $$ = $1; - } -| cal_AT { - $$ = $1; - } -| cal_DOLLAR { - $$ = $1; - } -| cal_LCURLY { - $$ = $1; - } -| cal_RCURLY { - $$ = $1; - } -| cal_SYMBOL { - $$ = $1; - } - -Variable: - cal_ENVCURLY EnvVarName cal_RCURLY { - $$ = yyGetParser->ExpandSpecialVariable($1, $2); - } -| cal_NCURLY MultipleIds cal_RCURLY { - $$ = yyGetParser->ExpandSpecialVariable($1, $2); - } -| cal_DCURLY MultipleIds cal_RCURLY { - $$ = yyGetParser->ExpandVariable($2); - } -| cal_ATNAME { - $$ = yyGetParser->ExpandVariableForAt($1); - } - -EnvVarName: - MultipleIds { - $$ = $1; - } -| cal_SYMBOL EnvVarName { - $$ = $1; - } - -MultipleIds: - { - $$ = 0; - } -| ID MultipleIds { - $$ = yyGetParser->CombineUnions($1, $2); - } - -ID: - cal_NAME { - $$ = $1; - } -| Variable { - $$ = $1; - } -; - -%% -/* End of grammar */ - -/*--------------------------------------------------------------------------*/ -void cmCommandArgument_yyerror(yyscan_t yyscanner, const char* message) -{ - yyGetParser->Error(message); -} - diff --git a/Source/cmCommandArgumentParserTokens.h b/Source/cmCommandArgumentParserTokens.h deleted file mode 100644 index 3172182..0000000 --- a/Source/cmCommandArgumentParserTokens.h +++ /dev/null @@ -1,82 +0,0 @@ -/* A Bison parser, made by GNU Bison 3.0.4. */ - -/* Bison interface for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - -#ifndef YY_CMCOMMANDARGUMENT_YY_CMCOMMANDARGUMENTPARSERTOKENS_H_INCLUDED -# define YY_CMCOMMANDARGUMENT_YY_CMCOMMANDARGUMENTPARSERTOKENS_H_INCLUDED -/* Debug traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif -#if YYDEBUG -extern int cmCommandArgument_yydebug; -#endif - -/* Token type. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - enum yytokentype - { - cal_ENVCURLY = 258, - cal_NCURLY = 259, - cal_DCURLY = 260, - cal_DOLLAR = 261, - cal_LCURLY = 262, - cal_RCURLY = 263, - cal_NAME = 264, - cal_BSLASH = 265, - cal_SYMBOL = 266, - cal_AT = 267, - cal_ERROR = 268, - cal_ATNAME = 269 - }; -#endif -/* Tokens. */ -#define cal_ENVCURLY 258 -#define cal_NCURLY 259 -#define cal_DCURLY 260 -#define cal_DOLLAR 261 -#define cal_LCURLY 262 -#define cal_RCURLY 263 -#define cal_NAME 264 -#define cal_BSLASH 265 -#define cal_SYMBOL 266 -#define cal_AT 267 -#define cal_ERROR 268 -#define cal_ATNAME 269 - -/* Value type. */ - - - -int cmCommandArgument_yyparse (yyscan_t yyscanner); - -#endif /* !YY_CMCOMMANDARGUMENT_YY_CMCOMMANDARGUMENTPARSERTOKENS_H_INCLUDED */ diff --git a/Source/cmDependsJavaLexer.cxx b/Source/cmDependsJavaLexer.cxx deleted file mode 100644 index 8159f47..0000000 --- a/Source/cmDependsJavaLexer.cxx +++ /dev/null @@ -1,2738 +0,0 @@ -#include "cmStandardLexer.h" -#line 2 "cmDependsJavaLexer.cxx" - -#line 4 "cmDependsJavaLexer.cxx" - -#define FLEXINT_H 1 -#define YY_INT_ALIGNED short int - -/* A lexical scanner generated by flex */ - -#define FLEX_SCANNER -#define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 6 -#define YY_FLEX_SUBMINOR_VERSION 1 -#if YY_FLEX_SUBMINOR_VERSION > 0 -#define FLEX_BETA -#endif - -/* First, we deal with platform-specific or compiler-specific issues. */ - -/* begin standard C headers. */ -#include -#include -#include -#include - -/* end standard C headers. */ - -/* flex integer type definitions */ - -#ifndef FLEXINT_H -#define FLEXINT_H - -/* C99 systems have . Non-C99 systems may or may not. */ - -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - -/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. - */ -#ifndef __STDC_LIMIT_MACROS -#define __STDC_LIMIT_MACROS 1 -#endif - -#include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; -typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; -typedef uint32_t flex_uint32_t; -#else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; -typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; - -/* Limits of integral types. */ -#ifndef INT8_MIN -#define INT8_MIN (-128) -#endif -#ifndef INT16_MIN -#define INT16_MIN (-32767-1) -#endif -#ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) -#endif -#ifndef INT8_MAX -#define INT8_MAX (127) -#endif -#ifndef INT16_MAX -#define INT16_MAX (32767) -#endif -#ifndef INT32_MAX -#define INT32_MAX (2147483647) -#endif -#ifndef UINT8_MAX -#define UINT8_MAX (255U) -#endif -#ifndef UINT16_MAX -#define UINT16_MAX (65535U) -#endif -#ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) -#endif - -#endif /* ! C99 */ - -#endif /* ! FLEXINT_H */ - -/* TODO: this is always defined, so inline it */ -#define yyconst const - -#if defined(__GNUC__) && __GNUC__ >= 3 -#define yynoreturn __attribute__((__noreturn__)) -#else -#define yynoreturn -#endif - -/* Returned upon end-of-file. */ -#define YY_NULL 0 - -/* Promotes a possibly negative, possibly signed char to an unsigned - * integer for use as an array index. If the signed char is negative, - * we want to instead treat it as an 8-bit unsigned char, hence the - * double cast. - */ -#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) - -/* An opaque pointer. */ -#ifndef YY_TYPEDEF_YY_SCANNER_T -#define YY_TYPEDEF_YY_SCANNER_T -typedef void* yyscan_t; -#endif - -/* For convenience, these vars (plus the bison vars far below) - are macros in the reentrant scanner. */ -#define yyin yyg->yyin_r -#define yyout yyg->yyout_r -#define yyextra yyg->yyextra_r -#define yyleng yyg->yyleng_r -#define yytext yyg->yytext_r -#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) -#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) -#define yy_flex_debug yyg->yy_flex_debug_r - -/* Enter a start condition. This macro really ought to take a parameter, - * but we do it the disgusting crufty way forced on us by the ()-less - * definition of BEGIN. - */ -#define BEGIN yyg->yy_start = 1 + 2 * - -/* Translate the current start state into a value that can be later handed - * to BEGIN to return to the state. The YYSTATE alias is for lex - * compatibility. - */ -#define YY_START ((yyg->yy_start - 1) / 2) -#define YYSTATE YY_START - -/* Action number for EOF rule of a given start state. */ -#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) - -/* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE cmDependsJava_yyrestart(yyin ,yyscanner ) - -#define YY_END_OF_BUFFER_CHAR 0 - -/* Size of default input buffer. */ -#ifndef YY_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k. - * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. - * Ditto for the __ia64__ case accordingly. - */ -#define YY_BUF_SIZE 32768 -#else -#define YY_BUF_SIZE 16384 -#endif /* __ia64__ */ -#endif - -/* The state buf must be large enough to hold one state per character in the main buffer. - */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) - -#ifndef YY_TYPEDEF_YY_BUFFER_STATE -#define YY_TYPEDEF_YY_BUFFER_STATE -typedef struct yy_buffer_state *YY_BUFFER_STATE; -#endif - -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - -#define EOB_ACT_CONTINUE_SCAN 0 -#define EOB_ACT_END_OF_FILE 1 -#define EOB_ACT_LAST_MATCH 2 - - #define YY_LESS_LINENO(n) - #define YY_LINENO_REWIND_TO(ptr) - -/* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - *yy_cp = yyg->yy_hold_char; \ - YY_RESTORE_YY_MORE_OFFSET \ - yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } \ - while ( 0 ) - -#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) - -#ifndef YY_STRUCT_YY_BUFFER_STATE -#define YY_STRUCT_YY_BUFFER_STATE -struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - int yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; - -#define YY_BUFFER_NEW 0 -#define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via cmDependsJava_yyrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ -#define YY_BUFFER_EOF_PENDING 2 - - }; -#endif /* !YY_STRUCT_YY_BUFFER_STATE */ - -/* We provide macros for accessing buffer states in case in the - * future we want to put the buffer states in a more general - * "scanner state". - * - * Returns the top of the stack, or NULL. - */ -#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ - ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ - : NULL) - -/* Same as previous macro, but useful when we know that the buffer stack is not - * NULL or when we need an lvalue. For internal use only. - */ -#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] - -void cmDependsJava_yyrestart (FILE *input_file ,yyscan_t yyscanner ); -void cmDependsJava_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); -YY_BUFFER_STATE cmDependsJava_yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner ); -void cmDependsJava_yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); -void cmDependsJava_yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); -void cmDependsJava_yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); -void cmDependsJava_yypop_buffer_state (yyscan_t yyscanner ); - -static void cmDependsJava_yyensure_buffer_stack (yyscan_t yyscanner ); -static void cmDependsJava_yy_load_buffer_state (yyscan_t yyscanner ); -static void cmDependsJava_yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner ); - -#define YY_FLUSH_BUFFER cmDependsJava_yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner) - -YY_BUFFER_STATE cmDependsJava_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); -YY_BUFFER_STATE cmDependsJava_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); -YY_BUFFER_STATE cmDependsJava_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); - -void *cmDependsJava_yyalloc (yy_size_t ,yyscan_t yyscanner ); -void *cmDependsJava_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); -void cmDependsJava_yyfree (void * ,yyscan_t yyscanner ); - -#define yy_new_buffer cmDependsJava_yy_create_buffer - -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! YY_CURRENT_BUFFER ){ \ - cmDependsJava_yyensure_buffer_stack (yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = \ - cmDependsJava_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } - -#define yy_set_bol(at_bol) \ - { \ - if ( ! YY_CURRENT_BUFFER ){\ - cmDependsJava_yyensure_buffer_stack (yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = \ - cmDependsJava_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } - -#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) - -/* Begin user sect3 */ - -#define cmDependsJava_yywrap(yyscanner) (/*CONSTCOND*/1) -#define YY_SKIP_YYWRAP - -typedef unsigned char YY_CHAR; - -typedef int yy_state_type; - -#define yytext_ptr yytext_r - -static yy_state_type yy_get_previous_state (yyscan_t yyscanner ); -static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner); -static int yy_get_next_buffer (yyscan_t yyscanner ); -static void yynoreturn yy_fatal_error (yyconst char* msg ,yyscan_t yyscanner ); - -/* Done after the current pattern has been matched and before the - * corresponding action - sets up yytext. - */ -#define YY_DO_BEFORE_ACTION \ - yyg->yytext_ptr = yy_bp; \ - yyleng = (int) (yy_cp - yy_bp); \ - yyg->yy_hold_char = *yy_cp; \ - *yy_cp = '\0'; \ - yyg->yy_c_buf_p = yy_cp; - -#define YY_NUM_RULES 111 -#define YY_END_OF_BUFFER 112 -/* This struct is not used in this scanner, - but its presence is necessary. */ -struct yy_trans_info - { - flex_int32_t yy_verify; - flex_int32_t yy_nxt; - }; -static yyconst flex_int16_t yy_accept[327] = - { 0, - 0, 0, 0, 0, 0, 0, 112, 110, 109, 109, - 77, 4, 73, 94, 60, 110, 93, 92, 105, 99, - 68, 89, 74, 71, 56, 56, 67, 103, 86, 75, - 79, 102, 107, 64, 63, 65, 107, 107, 107, 107, - 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, - 107, 70, 96, 69, 104, 3, 3, 6, 111, 5, - 78, 95, 61, 62, 0, 0, 106, 101, 100, 91, - 90, 57, 1, 0, 72, 57, 56, 57, 0, 56, - 0, 88, 87, 76, 80, 81, 107, 66, 107, 107, - 107, 107, 107, 107, 107, 107, 107, 107, 18, 107, - - 107, 107, 107, 107, 107, 26, 107, 107, 107, 107, - 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, - 107, 107, 107, 107, 107, 97, 98, 2, 55, 55, - 0, 0, 0, 108, 57, 0, 57, 58, 85, 82, - 83, 107, 107, 107, 107, 107, 107, 107, 107, 107, - 107, 107, 107, 107, 107, 107, 107, 107, 25, 107, - 107, 30, 107, 107, 34, 107, 107, 107, 107, 107, - 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, - 107, 50, 107, 107, 107, 0, 0, 58, 84, 107, - 107, 107, 107, 11, 12, 107, 14, 107, 107, 107, - - 107, 20, 107, 107, 107, 107, 107, 107, 107, 107, - 32, 107, 59, 107, 107, 107, 107, 107, 107, 107, - 107, 107, 107, 107, 46, 107, 107, 54, 51, 107, - 107, 107, 107, 107, 10, 13, 15, 107, 107, 107, - 107, 22, 24, 107, 107, 107, 107, 107, 107, 107, - 107, 107, 107, 40, 107, 107, 43, 107, 107, 47, - 107, 107, 53, 107, 8, 107, 107, 107, 19, 107, - 107, 107, 28, 107, 107, 33, 107, 107, 107, 38, - 39, 41, 107, 44, 107, 48, 107, 107, 107, 9, - 107, 17, 21, 23, 107, 107, 107, 35, 36, 107, - - 107, 107, 107, 107, 7, 16, 107, 107, 107, 107, - 42, 107, 107, 52, 107, 107, 31, 37, 107, 49, - 27, 29, 107, 107, 45, 0 - } ; - -static yyconst YY_CHAR yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, - 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 4, 5, 1, 6, 7, 8, 9, 10, - 11, 12, 13, 14, 15, 16, 17, 18, 19, 19, - 19, 19, 19, 19, 19, 20, 20, 21, 22, 23, - 24, 25, 26, 1, 27, 27, 27, 28, 29, 28, - 30, 30, 30, 30, 30, 31, 30, 30, 30, 30, - 30, 30, 30, 30, 30, 30, 30, 32, 30, 30, - 33, 34, 35, 36, 30, 1, 37, 38, 39, 40, - - 41, 42, 43, 44, 45, 30, 46, 47, 48, 49, - 50, 51, 30, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 62, 63, 64, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 - } ; - -static yyconst YY_CHAR yy_meta[65] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, - 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, - 1, 1, 1, 1, 1, 1, 3, 3, 3, 4, - 4, 4, 1, 1, 1, 1, 3, 3, 3, 3, - 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 1, 1, 1, 1 - } ; - -static yyconst flex_uint16_t yy_base[334] = - { 0, - 0, 0, 401, 400, 62, 63, 411, 414, 414, 414, - 386, 414, 414, 385, 61, 374, 414, 414, 383, 57, - 414, 56, 54, 65, 74, 43, 414, 414, 55, 382, - 59, 414, 0, 414, 414, 381, 38, 36, 60, 46, - 51, 75, 69, 354, 82, 76, 362, 85, 56, 352, - 357, 414, 100, 414, 414, 414, 383, 414, 414, 414, - 414, 414, 414, 414, 390, 127, 414, 414, 414, 414, - 414, 129, 414, 395, 414, 132, 95, 414, 165, 414, - 0, 373, 414, 414, 414, 109, 0, 414, 343, 342, - 344, 352, 338, 101, 354, 353, 340, 346, 332, 333, - - 331, 337, 334, 332, 329, 0, 329, 110, 330, 324, - 320, 329, 336, 93, 336, 319, 322, 89, 320, 325, - 320, 114, 131, 120, 323, 414, 414, 414, 414, 358, - 170, 357, 362, 414, 173, 157, 176, 150, 414, 414, - 340, 309, 321, 314, 323, 318, 317, 318, 304, 302, - 300, 316, 314, 310, 309, 296, 311, 310, 0, 153, - 292, 304, 301, 298, 0, 295, 295, 284, 285, 291, - 282, 284, 281, 289, 292, 278, 292, 277, 279, 279, - 286, 0, 286, 288, 277, 189, 314, 414, 414, 270, - 269, 279, 273, 0, 0, 274, 0, 264, 271, 260, - - 267, 0, 264, 271, 264, 256, 268, 256, 270, 254, - 0, 249, 0, 267, 266, 261, 256, 248, 245, 253, - 258, 244, 256, 250, 0, 236, 239, 0, 0, 237, - 249, 252, 234, 250, 0, 0, 0, 237, 238, 243, - 243, 235, 0, 233, 226, 230, 236, 236, 233, 221, - 235, 234, 223, 0, 232, 216, 0, 225, 216, 214, - 221, 220, 0, 225, 0, 214, 207, 207, 0, 207, - 200, 217, 0, 218, 219, 0, 214, 213, 199, 0, - 0, 0, 210, 0, 201, 0, 209, 202, 194, 0, - 206, 0, 0, 0, 197, 204, 205, 0, 0, 202, - - 191, 192, 191, 198, 0, 0, 163, 162, 170, 170, - 0, 164, 152, 0, 152, 157, 0, 0, 127, 0, - 0, 0, 115, 95, 0, 414, 218, 222, 226, 228, - 232, 96, 235 - } ; - -static yyconst flex_int16_t yy_def[334] = - { 0, - 326, 1, 327, 327, 328, 328, 326, 326, 326, 326, - 326, 326, 326, 326, 326, 329, 326, 326, 326, 326, - 326, 326, 326, 326, 326, 25, 326, 326, 326, 326, - 326, 326, 330, 326, 326, 326, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, - 330, 326, 326, 326, 326, 326, 326, 326, 326, 326, - 326, 326, 326, 326, 326, 329, 326, 326, 326, 326, - 326, 326, 326, 331, 326, 326, 25, 326, 326, 326, - 332, 326, 326, 326, 326, 326, 330, 326, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, - - 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 326, 326, 326, 326, 326, - 326, 333, 331, 326, 326, 326, 326, 332, 326, 326, - 326, 330, 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 326, 333, 326, 326, 330, - 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, - - 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, - - 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 0, 326, 326, 326, 326, - 326, 326, 326 - } ; - -static yyconst flex_uint16_t yy_nxt[479] = - { 0, - 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, - 18, 19, 20, 21, 22, 23, 24, 25, 26, 26, - 27, 28, 29, 30, 31, 32, 33, 33, 33, 33, - 33, 33, 34, 8, 35, 36, 37, 38, 39, 40, - 41, 42, 33, 33, 43, 33, 44, 33, 45, 33, - 46, 47, 48, 49, 33, 50, 51, 33, 33, 33, - 52, 53, 54, 55, 59, 59, 60, 60, 63, 68, - 70, 72, 72, 72, 326, 89, 73, 82, 83, 71, - 69, 74, 85, 86, 64, 91, 98, 92, 75, 76, - 90, 77, 77, 77, 93, 99, 94, 100, 138, 122, - - 326, 78, 79, 95, 80, 81, 96, 123, 101, 97, - 106, 102, 113, 78, 79, 78, 107, 108, 110, 103, - 80, 104, 111, 126, 105, 173, 326, 114, 117, 326, - 115, 81, 140, 141, 325, 130, 112, 168, 118, 119, - 174, 120, 169, 121, 131, 131, 72, 72, 72, 135, - 135, 135, 326, 147, 148, 324, 78, 79, 178, 78, - 79, 127, 161, 162, 183, 179, 184, 180, 78, 79, - 78, 78, 79, 78, 137, 137, 137, 136, 129, 136, - 188, 132, 137, 137, 137, 181, 323, 186, 186, 182, - 135, 135, 135, 137, 137, 137, 188, 129, 322, 207, - - 78, 79, 208, 78, 321, 320, 186, 186, 319, 318, - 317, 316, 78, 79, 78, 78, 315, 78, 56, 56, - 56, 56, 58, 58, 58, 58, 65, 65, 65, 65, - 87, 87, 133, 133, 133, 133, 187, 187, 314, 313, - 312, 311, 310, 309, 308, 307, 306, 305, 304, 303, - 302, 301, 300, 299, 298, 297, 296, 295, 294, 293, - 292, 291, 290, 289, 288, 287, 286, 285, 284, 283, - 282, 281, 280, 279, 278, 277, 276, 275, 274, 273, - 272, 271, 270, 269, 268, 267, 266, 265, 264, 263, - 262, 261, 260, 259, 258, 257, 256, 255, 254, 253, - - 252, 251, 250, 249, 248, 247, 246, 245, 244, 243, - 242, 228, 241, 240, 239, 238, 237, 236, 235, 234, - 233, 232, 129, 231, 230, 229, 228, 227, 226, 225, - 224, 223, 222, 221, 220, 219, 218, 217, 216, 215, - 214, 213, 212, 211, 210, 209, 206, 205, 204, 203, - 202, 201, 200, 199, 198, 197, 196, 195, 194, 193, - 192, 191, 190, 189, 134, 129, 129, 185, 177, 176, - 175, 172, 171, 170, 167, 166, 165, 164, 163, 160, - 159, 158, 157, 156, 155, 154, 153, 152, 151, 150, - 149, 146, 145, 144, 143, 142, 139, 134, 129, 128, - - 125, 124, 116, 109, 88, 84, 67, 66, 62, 61, - 326, 57, 57, 7, 326, 326, 326, 326, 326, 326, - 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, - 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, - 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, - 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, - 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, - 326, 326, 326, 326, 326, 326, 326, 326 - } ; - -static yyconst flex_int16_t yy_chk[479] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 5, 6, 5, 6, 15, 20, - 22, 23, 23, 23, 26, 37, 24, 29, 29, 22, - 20, 24, 31, 31, 15, 38, 40, 38, 24, 25, - 37, 25, 25, 25, 38, 40, 39, 41, 332, 49, - - 26, 25, 25, 39, 25, 25, 39, 49, 41, 39, - 43, 42, 46, 25, 25, 25, 43, 43, 45, 42, - 25, 42, 45, 53, 42, 118, 77, 46, 48, 66, - 46, 25, 86, 86, 324, 66, 45, 114, 48, 48, - 118, 48, 114, 48, 66, 66, 72, 72, 72, 76, - 76, 76, 77, 94, 94, 323, 72, 72, 122, 76, - 76, 53, 108, 108, 124, 122, 124, 123, 72, 72, - 72, 76, 76, 76, 136, 136, 136, 79, 131, 79, - 138, 66, 79, 79, 79, 123, 319, 131, 131, 123, - 135, 135, 135, 137, 137, 137, 138, 186, 316, 160, - - 135, 135, 160, 137, 315, 313, 186, 186, 312, 310, - 309, 308, 135, 135, 135, 137, 307, 137, 327, 327, - 327, 327, 328, 328, 328, 328, 329, 329, 329, 329, - 330, 330, 331, 331, 331, 331, 333, 333, 304, 303, - 302, 301, 300, 297, 296, 295, 291, 289, 288, 287, - 285, 283, 279, 278, 277, 275, 274, 272, 271, 270, - 268, 267, 266, 264, 262, 261, 260, 259, 258, 256, - 255, 253, 252, 251, 250, 249, 248, 247, 246, 245, - 244, 242, 241, 240, 239, 238, 234, 233, 232, 231, - 230, 227, 226, 224, 223, 222, 221, 220, 219, 218, - - 217, 216, 215, 214, 212, 210, 209, 208, 207, 206, - 205, 204, 203, 201, 200, 199, 198, 196, 193, 192, - 191, 190, 187, 185, 184, 183, 181, 180, 179, 178, - 177, 176, 175, 174, 173, 172, 171, 170, 169, 168, - 167, 166, 164, 163, 162, 161, 158, 157, 156, 155, - 154, 153, 152, 151, 150, 149, 148, 147, 146, 145, - 144, 143, 142, 141, 133, 132, 130, 125, 121, 120, - 119, 117, 116, 115, 113, 112, 111, 110, 109, 107, - 105, 104, 103, 102, 101, 100, 99, 98, 97, 96, - 95, 93, 92, 91, 90, 89, 82, 74, 65, 57, - - 51, 50, 47, 44, 36, 30, 19, 16, 14, 11, - 7, 4, 3, 326, 326, 326, 326, 326, 326, 326, - 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, - 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, - 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, - 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, - 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, - 326, 326, 326, 326, 326, 326, 326, 326 - } ; - -/* The intent behind this definition is that it'll catch - * any uses of REJECT which flex missed. - */ -#define REJECT reject_used_but_not_detected -#define yymore() yymore_used_but_not_detected -#define YY_MORE_ADJ 0 -#define YY_RESTORE_YY_MORE_OFFSET -#line 1 "cmDependsJavaLexer.in.l" -#line 2 "cmDependsJavaLexer.in.l" -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ -/* - -This file must be translated to C++ and modified to build everywhere. - -Run flex >= 2.6 like this: - - flex --nounistd -DFLEXINT_H --prefix=cmDependsJava_yy --header-file=cmDependsJavaLexer.h -ocmDependsJavaLexer.cxx cmDependsJavaLexer.in.l - -Modify cmDependsJavaLexer.cxx: - - remove trailing whitespace: sed -i 's/\s*$//' cmDependsJavaLexer.h cmDependsJavaLexer.cxx - - remove blank lines at end of file - - #include "cmStandardLexer.h" at the top - - add cast in cmDependsJava_yy_scan_bytes for loop condition of _yybytes_len to size_t - -*/ - -/* IWYU pragma: no_forward_declare yyguts_t */ - -#include - -#include "cmDependsJavaParserHelper.h" - -/* Replace the lexer input function. */ -#undef YY_INPUT -#define YY_INPUT(buf, result, max_size) \ - { result = yyextra->LexInput(buf, max_size); } - -/* Include the set of tokens from the parser. */ -#include "cmDependsJavaParserTokens.h" - -#define KEYWORD yylvalp->str = 0 -#define SYMBOL yylvalp->str = 0 -#define PRIMITIVE yylvalp->str = 0 - -/*--------------------------------------------------------------------------*/ - - -#line 686 "cmDependsJavaLexer.cxx" - -#define INITIAL 0 -#define comment 1 -#define string 2 - -#ifndef YY_EXTRA_TYPE -#define YY_EXTRA_TYPE void * -#endif - -/* Holds the entire state of the reentrant scanner. */ -struct yyguts_t - { - - /* User-defined. Not touched by flex. */ - YY_EXTRA_TYPE yyextra_r; - - /* The rest are the same as the globals declared in the non-reentrant scanner. */ - FILE *yyin_r, *yyout_r; - size_t yy_buffer_stack_top; /**< index of top of stack. */ - size_t yy_buffer_stack_max; /**< capacity of stack. */ - YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ - char yy_hold_char; - int yy_n_chars; - int yyleng_r; - char *yy_c_buf_p; - int yy_init; - int yy_start; - int yy_did_buffer_switch_on_eof; - int yy_start_stack_ptr; - int yy_start_stack_depth; - int *yy_start_stack; - yy_state_type yy_last_accepting_state; - char* yy_last_accepting_cpos; - - int yylineno_r; - int yy_flex_debug_r; - - char *yytext_r; - int yy_more_flag; - int yy_more_len; - - }; /* end struct yyguts_t */ - -static int yy_init_globals (yyscan_t yyscanner ); - -int cmDependsJava_yylex_init (yyscan_t* scanner); - -int cmDependsJava_yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); - -/* Accessor methods to globals. - These are made visible to non-reentrant scanners for convenience. */ - -int cmDependsJava_yylex_destroy (yyscan_t yyscanner ); - -int cmDependsJava_yyget_debug (yyscan_t yyscanner ); - -void cmDependsJava_yyset_debug (int debug_flag ,yyscan_t yyscanner ); - -YY_EXTRA_TYPE cmDependsJava_yyget_extra (yyscan_t yyscanner ); - -void cmDependsJava_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); - -FILE *cmDependsJava_yyget_in (yyscan_t yyscanner ); - -void cmDependsJava_yyset_in (FILE * _in_str ,yyscan_t yyscanner ); - -FILE *cmDependsJava_yyget_out (yyscan_t yyscanner ); - -void cmDependsJava_yyset_out (FILE * _out_str ,yyscan_t yyscanner ); - - int cmDependsJava_yyget_leng (yyscan_t yyscanner ); - -char *cmDependsJava_yyget_text (yyscan_t yyscanner ); - -int cmDependsJava_yyget_lineno (yyscan_t yyscanner ); - -void cmDependsJava_yyset_lineno (int _line_number ,yyscan_t yyscanner ); - -int cmDependsJava_yyget_column (yyscan_t yyscanner ); - -void cmDependsJava_yyset_column (int _column_no ,yyscan_t yyscanner ); - -/* Macros after this point can all be overridden by user definitions in - * section 1. - */ - -#ifndef YY_SKIP_YYWRAP -#ifdef __cplusplus -extern "C" int cmDependsJava_yywrap (yyscan_t yyscanner ); -#else -extern int cmDependsJava_yywrap (yyscan_t yyscanner ); -#endif -#endif - -#ifndef YY_NO_UNPUT - - static void yyunput (int c,char *buf_ptr ,yyscan_t yyscanner); - -#endif - -#ifndef yytext_ptr -static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); -#endif - -#ifndef YY_NO_INPUT - -#ifdef __cplusplus -static int yyinput (yyscan_t yyscanner ); -#else -static int input (yyscan_t yyscanner ); -#endif - -#endif - -/* Amount of stuff to slurp up with each read. */ -#ifndef YY_READ_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k */ -#define YY_READ_BUF_SIZE 16384 -#else -#define YY_READ_BUF_SIZE 8192 -#endif /* __ia64__ */ -#endif - -/* Copy whatever the last rule matched to the standard output. */ -#ifndef ECHO -/* This used to be an fputs(), but since the string might contain NUL's, - * we now use fwrite(). - */ -#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) -#endif - -/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, - * is returned in "result". - */ -#ifndef YY_INPUT -#define YY_INPUT(buf,result,max_size) \ - if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ - { \ - int c = '*'; \ - size_t n; \ - for ( n = 0; n < max_size && \ - (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } \ - else \ - { \ - errno=0; \ - while ( (result = (int) fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ - { \ - if( errno != EINTR) \ - { \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - break; \ - } \ - errno=0; \ - clearerr(yyin); \ - } \ - }\ -\ - -#endif - -/* No semi-colon after return; correct usage is to write "yyterminate();" - - * we don't want an extra ';' after the "return" because that will cause - * some compilers to complain about unreachable statements. - */ -#ifndef yyterminate -#define yyterminate() return YY_NULL -#endif - -/* Number of entries by which start-condition stack grows. */ -#ifndef YY_START_STACK_INCR -#define YY_START_STACK_INCR 25 -#endif - -/* Report a fatal error. */ -#ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) -#endif - -/* end tables serialization structures and prototypes */ - -/* Default declaration of generated scanner - a define so the user can - * easily add parameters. - */ -#ifndef YY_DECL -#define YY_DECL_IS_OURS 1 - -extern int cmDependsJava_yylex (yyscan_t yyscanner); - -#define YY_DECL int cmDependsJava_yylex (yyscan_t yyscanner) -#endif /* !YY_DECL */ - -/* Code executed at the beginning of each rule, after yytext and yyleng - * have been set up. - */ -#ifndef YY_USER_ACTION -#define YY_USER_ACTION -#endif - -/* Code executed at the end of each rule. */ -#ifndef YY_BREAK -#define YY_BREAK /*LINTED*/break; -#endif - -#define YY_RULE_SETUP \ - YY_USER_ACTION - -/** The main scanner function which does all the work. - */ -YY_DECL -{ - yy_state_type yy_current_state; - char *yy_cp, *yy_bp; - int yy_act; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if ( !yyg->yy_init ) - { - yyg->yy_init = 1; - -#ifdef YY_USER_INIT - YY_USER_INIT; -#endif - - if ( ! yyg->yy_start ) - yyg->yy_start = 1; /* first start state */ - - if ( ! yyin ) - yyin = stdin; - - if ( ! yyout ) - yyout = stdout; - - if ( ! YY_CURRENT_BUFFER ) { - cmDependsJava_yyensure_buffer_stack (yyscanner); - YY_CURRENT_BUFFER_LVALUE = - cmDependsJava_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); - } - - cmDependsJava_yy_load_buffer_state(yyscanner ); - } - - { -#line 48 "cmDependsJavaLexer.in.l" - -#line 943 "cmDependsJavaLexer.cxx" - - while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ - { - yy_cp = yyg->yy_c_buf_p; - - /* Support of yytext. */ - *yy_cp = yyg->yy_hold_char; - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = yyg->yy_start; -yy_match: - do - { - YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 327 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; - ++yy_cp; - } - while ( yy_base[yy_current_state] != 414 ); - -yy_find_action: - yy_act = yy_accept[yy_current_state]; - if ( yy_act == 0 ) - { /* have to back up */ - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - yy_act = yy_accept[yy_current_state]; - } - - YY_DO_BEFORE_ACTION; - -do_action: /* This label is used only to access EOF actions. */ - - switch ( yy_act ) - { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = yyg->yy_hold_char; - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - goto yy_find_action; - -case 1: -YY_RULE_SETUP -#line 49 "cmDependsJavaLexer.in.l" -{ BEGIN(comment); } - YY_BREAK -case 2: -YY_RULE_SETUP -#line 50 "cmDependsJavaLexer.in.l" -{ BEGIN(INITIAL); } - YY_BREAK -case 3: -/* rule 3 can match eol */ -YY_RULE_SETUP -#line 51 "cmDependsJavaLexer.in.l" -{} - YY_BREAK -case 4: -YY_RULE_SETUP -#line 53 "cmDependsJavaLexer.in.l" -{ BEGIN(string); } - YY_BREAK -case 5: -YY_RULE_SETUP -#line 54 "cmDependsJavaLexer.in.l" -{ BEGIN(INITIAL); return jp_STRINGLITERAL; } - YY_BREAK -case 6: -YY_RULE_SETUP -#line 55 "cmDependsJavaLexer.in.l" -{} - YY_BREAK -case 7: -YY_RULE_SETUP -#line 57 "cmDependsJavaLexer.in.l" -{ KEYWORD; return jp_ABSTRACT; } - YY_BREAK -case 8: -YY_RULE_SETUP -#line 58 "cmDependsJavaLexer.in.l" -{ KEYWORD; return jp_ASSERT; } - YY_BREAK -case 9: -YY_RULE_SETUP -#line 59 "cmDependsJavaLexer.in.l" -{ KEYWORD; return jp_BOOLEAN_TYPE; } - YY_BREAK -case 10: -YY_RULE_SETUP -#line 60 "cmDependsJavaLexer.in.l" -{ KEYWORD; return jp_BREAK; } - YY_BREAK -case 11: -YY_RULE_SETUP -#line 61 "cmDependsJavaLexer.in.l" -{ KEYWORD; return jp_BYTE_TYPE; } - YY_BREAK -case 12: -YY_RULE_SETUP -#line 62 "cmDependsJavaLexer.in.l" -{ KEYWORD; return jp_CASE; } - YY_BREAK -case 13: -YY_RULE_SETUP -#line 63 "cmDependsJavaLexer.in.l" -{ KEYWORD; return jp_CATCH; } - YY_BREAK -case 14: -YY_RULE_SETUP -#line 64 "cmDependsJavaLexer.in.l" -{ KEYWORD; return jp_CHAR_TYPE; } - YY_BREAK -case 15: -YY_RULE_SETUP -#line 65 "cmDependsJavaLexer.in.l" -{ KEYWORD; return jp_CLASS; } - YY_BREAK -case 16: -YY_RULE_SETUP -#line 66 "cmDependsJavaLexer.in.l" -{ KEYWORD; return jp_CONTINUE; } - YY_BREAK -case 17: -YY_RULE_SETUP -#line 67 "cmDependsJavaLexer.in.l" -{ KEYWORD; return jp_DEFAULT; } - YY_BREAK -case 18: -YY_RULE_SETUP -#line 68 "cmDependsJavaLexer.in.l" -{ KEYWORD; return jp_DO; } - YY_BREAK -case 19: -YY_RULE_SETUP -#line 69 "cmDependsJavaLexer.in.l" -{ KEYWORD; return jp_DOUBLE_TYPE; } - YY_BREAK -case 20: -YY_RULE_SETUP -#line 70 "cmDependsJavaLexer.in.l" -{ KEYWORD; return jp_ELSE; } - YY_BREAK -case 21: -YY_RULE_SETUP -#line 71 "cmDependsJavaLexer.in.l" -{ KEYWORD; return jp_EXTENDS; } - YY_BREAK -case 22: -YY_RULE_SETUP -#line 72 "cmDependsJavaLexer.in.l" -{ KEYWORD; return jp_FINAL; } - YY_BREAK -case 23: -YY_RULE_SETUP -#line 73 "cmDependsJavaLexer.in.l" -{ KEYWORD; return jp_FINALLY; } - YY_BREAK -case 24: -YY_RULE_SETUP -#line 74 "cmDependsJavaLexer.in.l" -{ KEYWORD; return jp_FLOAT_TYPE; } - YY_BREAK -case 25: -YY_RULE_SETUP -#line 75 "cmDependsJavaLexer.in.l" -{ KEYWORD; return jp_FOR; } - YY_BREAK -case 26: -YY_RULE_SETUP -#line 76 "cmDependsJavaLexer.in.l" -{ KEYWORD; return jp_IF; } - YY_BREAK -case 27: -YY_RULE_SETUP -#line 77 "cmDependsJavaLexer.in.l" -{ KEYWORD; return jp_IMPLEMENTS; } - YY_BREAK -case 28: -YY_RULE_SETUP -#line 78 "cmDependsJavaLexer.in.l" -{ KEYWORD; return jp_IMPORT; } - YY_BREAK -case 29: -YY_RULE_SETUP -#line 79 "cmDependsJavaLexer.in.l" -{ KEYWORD; return jp_INSTANCEOF; } - YY_BREAK -case 30: -YY_RULE_SETUP -#line 80 "cmDependsJavaLexer.in.l" -{ KEYWORD; return jp_INT_TYPE; } - YY_BREAK -case 31: -YY_RULE_SETUP -#line 81 "cmDependsJavaLexer.in.l" -{ KEYWORD; return jp_INTERFACE; } - YY_BREAK -case 32: -YY_RULE_SETUP -#line 82 "cmDependsJavaLexer.in.l" -{ KEYWORD; return jp_LONG_TYPE; } - YY_BREAK -case 33: -YY_RULE_SETUP -#line 83 "cmDependsJavaLexer.in.l" -{ KEYWORD; return jp_NATIVE; } - YY_BREAK -case 34: -YY_RULE_SETUP -#line 84 "cmDependsJavaLexer.in.l" -{ KEYWORD; return jp_NEW; } - YY_BREAK -case 35: -YY_RULE_SETUP -#line 85 "cmDependsJavaLexer.in.l" -{ KEYWORD; return jp_PACKAGE; } - YY_BREAK -case 36: -YY_RULE_SETUP -#line 86 "cmDependsJavaLexer.in.l" -{ KEYWORD; return jp_PRIVATE; } - YY_BREAK -case 37: -YY_RULE_SETUP -#line 87 "cmDependsJavaLexer.in.l" -{ KEYWORD; return jp_PROTECTED; } - YY_BREAK -case 38: -YY_RULE_SETUP -#line 88 "cmDependsJavaLexer.in.l" -{ KEYWORD; return jp_PUBLIC; } - YY_BREAK -case 39: -YY_RULE_SETUP -#line 89 "cmDependsJavaLexer.in.l" -{ KEYWORD; return jp_RETURN; } - YY_BREAK -case 40: -YY_RULE_SETUP -#line 90 "cmDependsJavaLexer.in.l" -{ KEYWORD; return jp_SHORT_TYPE; } - YY_BREAK -case 41: -YY_RULE_SETUP -#line 91 "cmDependsJavaLexer.in.l" -{ KEYWORD; return jp_STATIC; } - YY_BREAK -case 42: -YY_RULE_SETUP -#line 92 "cmDependsJavaLexer.in.l" -{ KEYWORD; return jp_STRICTFP; } - YY_BREAK -case 43: -YY_RULE_SETUP -#line 93 "cmDependsJavaLexer.in.l" -{ KEYWORD; return jp_SUPER; } - YY_BREAK -case 44: -YY_RULE_SETUP -#line 94 "cmDependsJavaLexer.in.l" -{ KEYWORD; return jp_SWITCH; } - YY_BREAK -case 45: -YY_RULE_SETUP -#line 95 "cmDependsJavaLexer.in.l" -{ KEYWORD; return jp_SYNCHRONIZED; } - YY_BREAK -case 46: -YY_RULE_SETUP -#line 96 "cmDependsJavaLexer.in.l" -{ KEYWORD; return jp_THIS; } - YY_BREAK -case 47: -YY_RULE_SETUP -#line 97 "cmDependsJavaLexer.in.l" -{ KEYWORD; return jp_THROW; } - YY_BREAK -case 48: -YY_RULE_SETUP -#line 98 "cmDependsJavaLexer.in.l" -{ KEYWORD; return jp_THROWS; } - YY_BREAK -case 49: -YY_RULE_SETUP -#line 99 "cmDependsJavaLexer.in.l" -{ KEYWORD; return jp_TRANSIENT; } - YY_BREAK -case 50: -YY_RULE_SETUP -#line 100 "cmDependsJavaLexer.in.l" -{ KEYWORD; return jp_TRY; } - YY_BREAK -case 51: -YY_RULE_SETUP -#line 101 "cmDependsJavaLexer.in.l" -{ KEYWORD; return jp_VOID; } - YY_BREAK -case 52: -YY_RULE_SETUP -#line 102 "cmDependsJavaLexer.in.l" -{ KEYWORD; return jp_VOLATILE; } - YY_BREAK -case 53: -YY_RULE_SETUP -#line 103 "cmDependsJavaLexer.in.l" -{ KEYWORD; return jp_WHILE; } - YY_BREAK -case 54: -YY_RULE_SETUP -#line 105 "cmDependsJavaLexer.in.l" -{ PRIMITIVE; return jp_BOOLEANLITERAL; } - YY_BREAK -case 55: -/* rule 55 can match eol */ -YY_RULE_SETUP -#line 106 "cmDependsJavaLexer.in.l" -{ PRIMITIVE; return jp_CHARACTERLITERAL; } - YY_BREAK -case 56: -YY_RULE_SETUP -#line 107 "cmDependsJavaLexer.in.l" -{ PRIMITIVE; return jp_DECIMALINTEGERLITERAL; } - YY_BREAK -case 57: -YY_RULE_SETUP -#line 108 "cmDependsJavaLexer.in.l" -{ PRIMITIVE; return jp_FLOATINGPOINTLITERAL; } - YY_BREAK -case 58: -YY_RULE_SETUP -#line 109 "cmDependsJavaLexer.in.l" -{ PRIMITIVE; return jp_HEXINTEGERLITERAL; } - YY_BREAK -case 59: -YY_RULE_SETUP -#line 110 "cmDependsJavaLexer.in.l" -{ PRIMITIVE; return jp_NULLLITERAL; } - YY_BREAK -case 60: -YY_RULE_SETUP -#line 112 "cmDependsJavaLexer.in.l" -{ SYMBOL; return jp_AND; } - YY_BREAK -case 61: -YY_RULE_SETUP -#line 113 "cmDependsJavaLexer.in.l" -{ SYMBOL; return jp_ANDAND; } - YY_BREAK -case 62: -YY_RULE_SETUP -#line 114 "cmDependsJavaLexer.in.l" -{ SYMBOL; return jp_ANDEQUALS; } - YY_BREAK -case 63: -YY_RULE_SETUP -#line 115 "cmDependsJavaLexer.in.l" -{ SYMBOL; return jp_BRACKETEND; } - YY_BREAK -case 64: -YY_RULE_SETUP -#line 116 "cmDependsJavaLexer.in.l" -{ SYMBOL; return jp_BRACKETSTART; } - YY_BREAK -case 65: -YY_RULE_SETUP -#line 117 "cmDependsJavaLexer.in.l" -{ SYMBOL; return jp_CARROT; } - YY_BREAK -case 66: -YY_RULE_SETUP -#line 118 "cmDependsJavaLexer.in.l" -{ SYMBOL; return jp_CARROTEQUALS; } - YY_BREAK -case 67: -YY_RULE_SETUP -#line 119 "cmDependsJavaLexer.in.l" -{ SYMBOL; return jp_COLON; } - YY_BREAK -case 68: -YY_RULE_SETUP -#line 120 "cmDependsJavaLexer.in.l" -{ SYMBOL; return jp_COMMA; } - YY_BREAK -case 69: -YY_RULE_SETUP -#line 121 "cmDependsJavaLexer.in.l" -{ SYMBOL; return jp_CURLYEND; } - YY_BREAK -case 70: -YY_RULE_SETUP -#line 122 "cmDependsJavaLexer.in.l" -{ SYMBOL; return jp_CURLYSTART; } - YY_BREAK -case 71: -YY_RULE_SETUP -#line 123 "cmDependsJavaLexer.in.l" -{ SYMBOL; return jp_DIVIDE; } - YY_BREAK -case 72: -YY_RULE_SETUP -#line 124 "cmDependsJavaLexer.in.l" -{ SYMBOL; return jp_DIVIDEEQUALS; } - YY_BREAK -case 73: -YY_RULE_SETUP -#line 125 "cmDependsJavaLexer.in.l" -{ SYMBOL; return jp_DOLLAR; } - YY_BREAK -case 74: -YY_RULE_SETUP -#line 126 "cmDependsJavaLexer.in.l" -{ SYMBOL; return jp_DOT; } - YY_BREAK -case 75: -YY_RULE_SETUP -#line 127 "cmDependsJavaLexer.in.l" -{ SYMBOL; return jp_EQUALS; } - YY_BREAK -case 76: -YY_RULE_SETUP -#line 128 "cmDependsJavaLexer.in.l" -{ SYMBOL; return jp_EQUALSEQUALS; } - YY_BREAK -case 77: -YY_RULE_SETUP -#line 129 "cmDependsJavaLexer.in.l" -{ SYMBOL; return jp_EXCLAMATION; } - YY_BREAK -case 78: -YY_RULE_SETUP -#line 130 "cmDependsJavaLexer.in.l" -{ SYMBOL; return jp_EXCLAMATIONEQUALS; } - YY_BREAK -case 79: -YY_RULE_SETUP -#line 131 "cmDependsJavaLexer.in.l" -{ SYMBOL; return jp_GREATER; } - YY_BREAK -case 80: -YY_RULE_SETUP -#line 132 "cmDependsJavaLexer.in.l" -{ SYMBOL; return jp_GTEQUALS; } - YY_BREAK -case 81: -YY_RULE_SETUP -#line 133 "cmDependsJavaLexer.in.l" -{ SYMBOL; return jp_GTGT; } - YY_BREAK -case 82: -YY_RULE_SETUP -#line 134 "cmDependsJavaLexer.in.l" -{ SYMBOL; return jp_GTGTEQUALS; } - YY_BREAK -case 83: -YY_RULE_SETUP -#line 135 "cmDependsJavaLexer.in.l" -{ SYMBOL; return jp_GTGTGT; } - YY_BREAK -case 84: -YY_RULE_SETUP -#line 136 "cmDependsJavaLexer.in.l" -{ SYMBOL; return jp_GTGTGTEQUALS; } - YY_BREAK -case 85: -YY_RULE_SETUP -#line 137 "cmDependsJavaLexer.in.l" -{ SYMBOL; return jp_LESLESEQUALS; } - YY_BREAK -case 86: -YY_RULE_SETUP -#line 138 "cmDependsJavaLexer.in.l" -{ SYMBOL; return jp_LESSTHAN; } - YY_BREAK -case 87: -YY_RULE_SETUP -#line 139 "cmDependsJavaLexer.in.l" -{ SYMBOL; return jp_LTEQUALS; } - YY_BREAK -case 88: -YY_RULE_SETUP -#line 140 "cmDependsJavaLexer.in.l" -{ SYMBOL; return jp_LTLT; } - YY_BREAK -case 89: -YY_RULE_SETUP -#line 141 "cmDependsJavaLexer.in.l" -{ SYMBOL; return jp_MINUS; } - YY_BREAK -case 90: -YY_RULE_SETUP -#line 142 "cmDependsJavaLexer.in.l" -{ SYMBOL; return jp_MINUSEQUALS; } - YY_BREAK -case 91: -YY_RULE_SETUP -#line 143 "cmDependsJavaLexer.in.l" -{ SYMBOL; return jp_MINUSMINUS; } - YY_BREAK -case 92: -YY_RULE_SETUP -#line 144 "cmDependsJavaLexer.in.l" -{ SYMBOL; return jp_PAREEND; } - YY_BREAK -case 93: -YY_RULE_SETUP -#line 145 "cmDependsJavaLexer.in.l" -{ SYMBOL; return jp_PARESTART; } - YY_BREAK -case 94: -YY_RULE_SETUP -#line 146 "cmDependsJavaLexer.in.l" -{ SYMBOL; return jp_PERCENT; } - YY_BREAK -case 95: -YY_RULE_SETUP -#line 147 "cmDependsJavaLexer.in.l" -{ SYMBOL; return jp_PERCENTEQUALS; } - YY_BREAK -case 96: -YY_RULE_SETUP -#line 148 "cmDependsJavaLexer.in.l" -{ SYMBOL; return jp_PIPE; } - YY_BREAK -case 97: -YY_RULE_SETUP -#line 149 "cmDependsJavaLexer.in.l" -{ SYMBOL; return jp_PIPEEQUALS; } - YY_BREAK -case 98: -YY_RULE_SETUP -#line 150 "cmDependsJavaLexer.in.l" -{ SYMBOL; return jp_PIPEPIPE; } - YY_BREAK -case 99: -YY_RULE_SETUP -#line 151 "cmDependsJavaLexer.in.l" -{ SYMBOL; return jp_PLUS; } - YY_BREAK -case 100: -YY_RULE_SETUP -#line 152 "cmDependsJavaLexer.in.l" -{ SYMBOL; return jp_PLUSEQUALS; } - YY_BREAK -case 101: -YY_RULE_SETUP -#line 153 "cmDependsJavaLexer.in.l" -{ SYMBOL; return jp_PLUSPLUS; } - YY_BREAK -case 102: -YY_RULE_SETUP -#line 154 "cmDependsJavaLexer.in.l" -{ SYMBOL; return jp_QUESTION; } - YY_BREAK -case 103: -YY_RULE_SETUP -#line 155 "cmDependsJavaLexer.in.l" -{ SYMBOL; return jp_SEMICOL; } - YY_BREAK -case 104: -YY_RULE_SETUP -#line 156 "cmDependsJavaLexer.in.l" -{ SYMBOL; return jp_TILDE; } - YY_BREAK -case 105: -YY_RULE_SETUP -#line 157 "cmDependsJavaLexer.in.l" -{ SYMBOL; return jp_TIMES; } - YY_BREAK -case 106: -YY_RULE_SETUP -#line 158 "cmDependsJavaLexer.in.l" -{ SYMBOL; return jp_TIMESEQUALS; } - YY_BREAK -case 107: -YY_RULE_SETUP -#line 160 "cmDependsJavaLexer.in.l" -{ - yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); - return jp_NAME; -} - YY_BREAK -case 108: -/* rule 108 can match eol */ -YY_RULE_SETUP -#line 165 "cmDependsJavaLexer.in.l" -{ } - YY_BREAK -case 109: -/* rule 109 can match eol */ -YY_RULE_SETUP -#line 166 "cmDependsJavaLexer.in.l" -{ } - YY_BREAK -case 110: -YY_RULE_SETUP -#line 167 "cmDependsJavaLexer.in.l" -{ - std::cerr << "Unknown character: " << yytext[0] - << " (" << (int)yytext[0] << ")" << std::endl; - yyextra->Error("Unknown character"); - return jp_ERROR; -} - YY_BREAK -case 111: -YY_RULE_SETUP -#line 174 "cmDependsJavaLexer.in.l" -ECHO; - YY_BREAK -#line 1567 "cmDependsJavaLexer.cxx" -case YY_STATE_EOF(INITIAL): -case YY_STATE_EOF(comment): -case YY_STATE_EOF(string): - yyterminate(); - - case YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = yyg->yy_hold_char; - YY_RESTORE_YY_MORE_OFFSET - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * cmDependsJava_yylex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; - - yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( yyscanner ); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); - - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++yyg->yy_c_buf_p; - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = yyg->yy_c_buf_p; - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer( yyscanner ) ) - { - case EOB_ACT_END_OF_FILE: - { - yyg->yy_did_buffer_switch_on_eof = 0; - - if ( cmDependsJava_yywrap(yyscanner ) ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else - { - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = - yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( yyscanner ); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - yyg->yy_c_buf_p = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; - - yy_current_state = yy_get_previous_state( yyscanner ); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ - } /* end of user's declarations */ -} /* end of cmDependsJava_yylex */ - -/* yy_get_next_buffer - try to read in a new buffer - * - * Returns a code representing an action: - * EOB_ACT_LAST_MATCH - - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position - * EOB_ACT_END_OF_FILE - end of file - */ -static int yy_get_next_buffer (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - char *source = yyg->yytext_ptr; - yy_size_t number_to_move, i; - int ret_val; - - if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) - YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) - { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else - { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (yy_size_t) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1; - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; - - else - { - int num_to_read = - YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; - - int yy_c_buf_p_offset = - (int) (yyg->yy_c_buf_p - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) - { - int new_size = b->yy_buf_size * 2; - - if ( new_size <= 0 ) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - cmDependsJava_yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner ); - } - else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = NULL; - - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); - - yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - - number_to_move - 1; - - } - - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - yyg->yy_n_chars, num_to_read ); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - if ( yyg->yy_n_chars == 0 ) - { - if ( number_to_move == YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - cmDependsJava_yyrestart(yyin ,yyscanner); - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - if ((int) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) cmDependsJava_yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner ); - if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); - } - - yyg->yy_n_chars += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; - - yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; -} - -/* yy_get_previous_state - get the state just before the EOB char was reached */ - - static yy_state_type yy_get_previous_state (yyscan_t yyscanner) -{ - yy_state_type yy_current_state; - char *yy_cp; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - yy_current_state = yyg->yy_start; - - for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) - { - YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 327 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; - } - - return yy_current_state; -} - -/* yy_try_NUL_trans - try to make a transition on the NUL character - * - * synopsis - * next_state = yy_try_NUL_trans( current_state ); - */ - static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) -{ - int yy_is_jam; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ - char *yy_cp = yyg->yy_c_buf_p; - - YY_CHAR yy_c = 1; - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 327 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; - yy_is_jam = (yy_current_state == 326); - - (void)yyg; - return yy_is_jam ? 0 : yy_current_state; -} - -#ifndef YY_NO_UNPUT - - static void yyunput (int c, char * yy_bp , yyscan_t yyscanner) -{ - char *yy_cp; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - yy_cp = yyg->yy_c_buf_p; - - /* undo effects of setting up yytext */ - *yy_cp = yyg->yy_hold_char; - - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) - { /* need to shift things up to make room */ - /* +2 for EOB chars. */ - int number_to_move = yyg->yy_n_chars + 2; - char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; - char *source = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; - - while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - *--dest = *--source; - - yy_cp += (int) (dest - source); - yy_bp += (int) (dest - source); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = - yyg->yy_n_chars = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size; - - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) - YY_FATAL_ERROR( "flex scanner push-back overflow" ); - } - - *--yy_cp = (char) c; - - yyg->yytext_ptr = yy_bp; - yyg->yy_hold_char = *yy_cp; - yyg->yy_c_buf_p = yy_cp; -} - -#endif - -#ifndef YY_NO_INPUT -#ifdef __cplusplus - static int yyinput (yyscan_t yyscanner) -#else - static int input (yyscan_t yyscanner) -#endif - -{ - int c; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - *yyg->yy_c_buf_p = yyg->yy_hold_char; - - if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) - { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) - /* This was really a NUL. */ - *yyg->yy_c_buf_p = '\0'; - - else - { /* need more input */ - int offset = yyg->yy_c_buf_p - yyg->yytext_ptr; - ++yyg->yy_c_buf_p; - - switch ( yy_get_next_buffer( yyscanner ) ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - cmDependsJava_yyrestart(yyin ,yyscanner); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: - { - if ( cmDependsJava_yywrap(yyscanner ) ) - return 0; - - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; -#ifdef __cplusplus - return yyinput(yyscanner); -#else - return input(yyscanner); -#endif - } - - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = yyg->yytext_ptr + offset; - break; - } - } - } - - c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ - *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ - yyg->yy_hold_char = *++yyg->yy_c_buf_p; - - return c; -} -#endif /* ifndef YY_NO_INPUT */ - -/** Immediately switch to a different input stream. - * @param input_file A readable stream. - * @param yyscanner The scanner object. - * @note This function does not reset the start condition to @c INITIAL . - */ - void cmDependsJava_yyrestart (FILE * input_file , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if ( ! YY_CURRENT_BUFFER ){ - cmDependsJava_yyensure_buffer_stack (yyscanner); - YY_CURRENT_BUFFER_LVALUE = - cmDependsJava_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); - } - - cmDependsJava_yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner); - cmDependsJava_yy_load_buffer_state(yyscanner ); -} - -/** Switch to a different input buffer. - * @param new_buffer The new input buffer. - * @param yyscanner The scanner object. - */ - void cmDependsJava_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* TODO. We should be able to replace this entire function body - * with - * cmDependsJava_yypop_buffer_state(); - * cmDependsJava_yypush_buffer_state(new_buffer); - */ - cmDependsJava_yyensure_buffer_stack (yyscanner); - if ( YY_CURRENT_BUFFER == new_buffer ) - return; - - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - cmDependsJava_yy_load_buffer_state(yyscanner ); - - /* We don't actually know whether we did this switch during - * EOF (cmDependsJava_yywrap()) processing, but the only time this flag - * is looked at is after cmDependsJava_yywrap() is called, so it's safe - * to go ahead and always set it. - */ - yyg->yy_did_buffer_switch_on_eof = 1; -} - -static void cmDependsJava_yy_load_buffer_state (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - yyg->yy_hold_char = *yyg->yy_c_buf_p; -} - -/** Allocate and initialize an input buffer state. - * @param file A readable stream. - * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. - * @param yyscanner The scanner object. - * @return the allocated buffer state. - */ - YY_BUFFER_STATE cmDependsJava_yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) -{ - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) cmDependsJava_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in cmDependsJava_yy_create_buffer()" ); - - b->yy_buf_size = (yy_size_t)size; - - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *) cmDependsJava_yyalloc(b->yy_buf_size + 2 ,yyscanner ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in cmDependsJava_yy_create_buffer()" ); - - b->yy_is_our_buffer = 1; - - cmDependsJava_yy_init_buffer(b,file ,yyscanner); - - return b; -} - -/** Destroy the buffer. - * @param b a buffer created with cmDependsJava_yy_create_buffer() - * @param yyscanner The scanner object. - */ - void cmDependsJava_yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if ( ! b ) - return; - - if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; - - if ( b->yy_is_our_buffer ) - cmDependsJava_yyfree((void *) b->yy_ch_buf ,yyscanner ); - - cmDependsJava_yyfree((void *) b ,yyscanner ); -} - -/* Initializes or reinitializes a buffer. - * This function is sometimes called more than once on the same buffer, - * such as during a cmDependsJava_yyrestart() or at EOF. - */ - static void cmDependsJava_yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) - -{ - int oerrno = errno; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - cmDependsJava_yy_flush_buffer(b ,yyscanner); - - b->yy_input_file = file; - b->yy_fill_buffer = 1; - - /* If b is the current buffer, then cmDependsJava_yy_init_buffer was _probably_ - * called from cmDependsJava_yyrestart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER){ - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } - - b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; - - errno = oerrno; -} - -/** Discard all buffered characters. On the next scan, YY_INPUT will be called. - * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. - * @param yyscanner The scanner object. - */ - void cmDependsJava_yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if ( ! b ) - return; - - b->yy_n_chars = 0; - - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - - b->yy_buf_pos = &b->yy_ch_buf[0]; - - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; - - if ( b == YY_CURRENT_BUFFER ) - cmDependsJava_yy_load_buffer_state(yyscanner ); -} - -/** Pushes the new state onto the stack. The new state becomes - * the current state. This function will allocate the stack - * if necessary. - * @param new_buffer The new state. - * @param yyscanner The scanner object. - */ -void cmDependsJava_yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (new_buffer == NULL) - return; - - cmDependsJava_yyensure_buffer_stack(yyscanner); - - /* This block is copied from cmDependsJava_yy_switch_to_buffer. */ - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - yyg->yy_buffer_stack_top++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from cmDependsJava_yy_switch_to_buffer. */ - cmDependsJava_yy_load_buffer_state(yyscanner ); - yyg->yy_did_buffer_switch_on_eof = 1; -} - -/** Removes and deletes the top of the stack, if present. - * The next element becomes the new top. - * @param yyscanner The scanner object. - */ -void cmDependsJava_yypop_buffer_state (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!YY_CURRENT_BUFFER) - return; - - cmDependsJava_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner); - YY_CURRENT_BUFFER_LVALUE = NULL; - if (yyg->yy_buffer_stack_top > 0) - --yyg->yy_buffer_stack_top; - - if (YY_CURRENT_BUFFER) { - cmDependsJava_yy_load_buffer_state(yyscanner ); - yyg->yy_did_buffer_switch_on_eof = 1; - } -} - -/* Allocates the stack if it does not exist. - * Guarantees space for at least one push. - */ -static void cmDependsJava_yyensure_buffer_stack (yyscan_t yyscanner) -{ - int num_to_alloc; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (!yyg->yy_buffer_stack) { - - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ - yyg->yy_buffer_stack = (struct yy_buffer_state**)cmDependsJava_yyalloc - (num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); - if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in cmDependsJava_yyensure_buffer_stack()" ); - - memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - - yyg->yy_buffer_stack_max = num_to_alloc; - yyg->yy_buffer_stack_top = 0; - return; - } - - if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ - - /* Increase the buffer to prepare for a possible push. */ - yy_size_t grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = yyg->yy_buffer_stack_max + grow_size; - yyg->yy_buffer_stack = (struct yy_buffer_state**)cmDependsJava_yyrealloc - (yyg->yy_buffer_stack, - num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); - if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in cmDependsJava_yyensure_buffer_stack()" ); - - /* zero only the new slots.*/ - memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); - yyg->yy_buffer_stack_max = num_to_alloc; - } -} - -/** Setup the input buffer state to scan directly from a user-specified character buffer. - * @param base the character buffer - * @param size the size in bytes of the character buffer - * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE cmDependsJava_yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) -{ - YY_BUFFER_STATE b; - - if ( size < 2 || - base[size-2] != YY_END_OF_BUFFER_CHAR || - base[size-1] != YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return NULL; - - b = (YY_BUFFER_STATE) cmDependsJava_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in cmDependsJava_yy_scan_buffer()" ); - - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = NULL; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - cmDependsJava_yy_switch_to_buffer(b ,yyscanner ); - - return b; -} - -/** Setup the input buffer state to scan a string. The next call to cmDependsJava_yylex() will - * scan from a @e copy of @a str. - * @param yystr a NUL-terminated string to scan - * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. - * @note If you want to scan bytes that may contain NUL values, then use - * cmDependsJava_yy_scan_bytes() instead. - */ -YY_BUFFER_STATE cmDependsJava_yy_scan_string (yyconst char * yystr , yyscan_t yyscanner) -{ - - return cmDependsJava_yy_scan_bytes(yystr,(int) strlen(yystr) ,yyscanner); -} - -/** Setup the input buffer state to scan the given bytes. The next call to cmDependsJava_yylex() will - * scan from a @e copy of @a bytes. - * @param yybytes the byte buffer to scan - * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. - * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE cmDependsJava_yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner) -{ - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - yy_size_t i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = (yy_size_t) _yybytes_len + 2; - buf = (char *) cmDependsJava_yyalloc(n ,yyscanner ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in cmDependsJava_yy_scan_bytes()" ); - - for ( i = 0; i < (size_t)_yybytes_len; ++i ) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - - b = cmDependsJava_yy_scan_buffer(buf,n ,yyscanner); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in cmDependsJava_yy_scan_bytes()" ); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; -} - -#ifndef YY_EXIT_FAILURE -#define YY_EXIT_FAILURE 2 -#endif - -static void yynoreturn yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - (void) fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); -} - -/* Redefine yyless() so it works in section 3 code. */ - -#undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - yytext[yyleng] = yyg->yy_hold_char; \ - yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ - yyg->yy_hold_char = *yyg->yy_c_buf_p; \ - *yyg->yy_c_buf_p = '\0'; \ - yyleng = yyless_macro_arg; \ - } \ - while ( 0 ) - -/* Accessor methods (get/set functions) to struct members. */ - -/** Get the user-defined data for this scanner. - * @param yyscanner The scanner object. - */ -YY_EXTRA_TYPE cmDependsJava_yyget_extra (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyextra; -} - -/** Get the current line number. - * @param yyscanner The scanner object. - */ -int cmDependsJava_yyget_lineno (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (! YY_CURRENT_BUFFER) - return 0; - - return yylineno; -} - -/** Get the current column number. - * @param yyscanner The scanner object. - */ -int cmDependsJava_yyget_column (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (! YY_CURRENT_BUFFER) - return 0; - - return yycolumn; -} - -/** Get the input stream. - * @param yyscanner The scanner object. - */ -FILE *cmDependsJava_yyget_in (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyin; -} - -/** Get the output stream. - * @param yyscanner The scanner object. - */ -FILE *cmDependsJava_yyget_out (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyout; -} - -/** Get the length of the current token. - * @param yyscanner The scanner object. - */ -int cmDependsJava_yyget_leng (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyleng; -} - -/** Get the current token. - * @param yyscanner The scanner object. - */ - -char *cmDependsJava_yyget_text (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yytext; -} - -/** Set the user-defined data. This data is never touched by the scanner. - * @param user_defined The data to be associated with this scanner. - * @param yyscanner The scanner object. - */ -void cmDependsJava_yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyextra = user_defined ; -} - -/** Set the current line number. - * @param _line_number line number - * @param yyscanner The scanner object. - */ -void cmDependsJava_yyset_lineno (int _line_number , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* lineno is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) - YY_FATAL_ERROR( "cmDependsJava_yyset_lineno called with no buffer" ); - - yylineno = _line_number; -} - -/** Set the current column. - * @param _column_no column number - * @param yyscanner The scanner object. - */ -void cmDependsJava_yyset_column (int _column_no , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* column is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) - YY_FATAL_ERROR( "cmDependsJava_yyset_column called with no buffer" ); - - yycolumn = _column_no; -} - -/** Set the input stream. This does not discard the current - * input buffer. - * @param _in_str A readable stream. - * @param yyscanner The scanner object. - * @see cmDependsJava_yy_switch_to_buffer - */ -void cmDependsJava_yyset_in (FILE * _in_str , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyin = _in_str ; -} - -void cmDependsJava_yyset_out (FILE * _out_str , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyout = _out_str ; -} - -int cmDependsJava_yyget_debug (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yy_flex_debug; -} - -void cmDependsJava_yyset_debug (int _bdebug , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yy_flex_debug = _bdebug ; -} - -/* Accessor methods for yylval and yylloc */ - -/* User-visible API */ - -/* cmDependsJava_yylex_init is special because it creates the scanner itself, so it is - * the ONLY reentrant function that doesn't take the scanner as the last argument. - * That's why we explicitly handle the declaration, instead of using our macros. - */ - -int cmDependsJava_yylex_init(yyscan_t* ptr_yy_globals) - -{ - if (ptr_yy_globals == NULL){ - errno = EINVAL; - return 1; - } - - *ptr_yy_globals = (yyscan_t) cmDependsJava_yyalloc ( sizeof( struct yyguts_t ), NULL ); - - if (*ptr_yy_globals == NULL){ - errno = ENOMEM; - return 1; - } - - /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - - return yy_init_globals ( *ptr_yy_globals ); -} - -/* cmDependsJava_yylex_init_extra has the same functionality as cmDependsJava_yylex_init, but follows the - * convention of taking the scanner as the last argument. Note however, that - * this is a *pointer* to a scanner, as it will be allocated by this call (and - * is the reason, too, why this function also must handle its own declaration). - * The user defined value in the first argument will be available to cmDependsJava_yyalloc in - * the yyextra field. - */ - -int cmDependsJava_yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals ) - -{ - struct yyguts_t dummy_yyguts; - - cmDependsJava_yyset_extra (yy_user_defined, &dummy_yyguts); - - if (ptr_yy_globals == NULL){ - errno = EINVAL; - return 1; - } - - *ptr_yy_globals = (yyscan_t) cmDependsJava_yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); - - if (*ptr_yy_globals == NULL){ - errno = ENOMEM; - return 1; - } - - /* By setting to 0xAA, we expose bugs in - yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - - cmDependsJava_yyset_extra (yy_user_defined, *ptr_yy_globals); - - return yy_init_globals ( *ptr_yy_globals ); -} - -static int yy_init_globals (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from cmDependsJava_yylex_destroy(), so don't allocate here. - */ - - yyg->yy_buffer_stack = NULL; - yyg->yy_buffer_stack_top = 0; - yyg->yy_buffer_stack_max = 0; - yyg->yy_c_buf_p = NULL; - yyg->yy_init = 0; - yyg->yy_start = 0; - - yyg->yy_start_stack_ptr = 0; - yyg->yy_start_stack_depth = 0; - yyg->yy_start_stack = NULL; - -/* Defined in main.c */ -#ifdef YY_STDINIT - yyin = stdin; - yyout = stdout; -#else - yyin = NULL; - yyout = NULL; -#endif - - /* For future reference: Set errno on error, since we are called by - * cmDependsJava_yylex_init() - */ - return 0; -} - -/* cmDependsJava_yylex_destroy is for both reentrant and non-reentrant scanners. */ -int cmDependsJava_yylex_destroy (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* Pop the buffer stack, destroying each element. */ - while(YY_CURRENT_BUFFER){ - cmDependsJava_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner ); - YY_CURRENT_BUFFER_LVALUE = NULL; - cmDependsJava_yypop_buffer_state(yyscanner); - } - - /* Destroy the stack itself. */ - cmDependsJava_yyfree(yyg->yy_buffer_stack ,yyscanner); - yyg->yy_buffer_stack = NULL; - - /* Destroy the start condition stack. */ - cmDependsJava_yyfree(yyg->yy_start_stack ,yyscanner ); - yyg->yy_start_stack = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner so the next time - * cmDependsJava_yylex() is called, initialization will occur. */ - yy_init_globals( yyscanner); - - /* Destroy the main struct (reentrant only). */ - cmDependsJava_yyfree ( yyscanner , yyscanner ); - yyscanner = NULL; - return 0; -} - -/* - * Internal utility routines. - */ - -#ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - - int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; -} -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) -{ - int n; - for ( n = 0; s[n]; ++n ) - ; - - return n; -} -#endif - -void *cmDependsJava_yyalloc (yy_size_t size , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - return malloc(size); -} - -void *cmDependsJava_yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return realloc(ptr, size); -} - -void cmDependsJava_yyfree (void * ptr , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - free( (char *) ptr ); /* see cmDependsJava_yyrealloc() for (char *) cast */ -} - -#define YYTABLES_NAME "yytables" - -#line 174 "cmDependsJavaLexer.in.l" diff --git a/Source/cmDependsJavaLexer.h b/Source/cmDependsJavaLexer.h deleted file mode 100644 index ccadd70..0000000 --- a/Source/cmDependsJavaLexer.h +++ /dev/null @@ -1,336 +0,0 @@ -#ifndef cmDependsJava_yyHEADER_H -#define cmDependsJava_yyHEADER_H 1 -#define cmDependsJava_yyIN_HEADER 1 - -#line 6 "cmDependsJavaLexer.h" - -#line 8 "cmDependsJavaLexer.h" - -#define FLEXINT_H 1 -#define YY_INT_ALIGNED short int - -/* A lexical scanner generated by flex */ - -#define FLEX_SCANNER -#define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 6 -#define YY_FLEX_SUBMINOR_VERSION 1 -#if YY_FLEX_SUBMINOR_VERSION > 0 -#define FLEX_BETA -#endif - -/* First, we deal with platform-specific or compiler-specific issues. */ - -/* begin standard C headers. */ -#include -#include -#include -#include - -/* end standard C headers. */ - -/* flex integer type definitions */ - -#ifndef FLEXINT_H -#define FLEXINT_H - -/* C99 systems have . Non-C99 systems may or may not. */ - -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - -/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. - */ -#ifndef __STDC_LIMIT_MACROS -#define __STDC_LIMIT_MACROS 1 -#endif - -#include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; -typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; -typedef uint32_t flex_uint32_t; -#else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; -typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; - -/* Limits of integral types. */ -#ifndef INT8_MIN -#define INT8_MIN (-128) -#endif -#ifndef INT16_MIN -#define INT16_MIN (-32767-1) -#endif -#ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) -#endif -#ifndef INT8_MAX -#define INT8_MAX (127) -#endif -#ifndef INT16_MAX -#define INT16_MAX (32767) -#endif -#ifndef INT32_MAX -#define INT32_MAX (2147483647) -#endif -#ifndef UINT8_MAX -#define UINT8_MAX (255U) -#endif -#ifndef UINT16_MAX -#define UINT16_MAX (65535U) -#endif -#ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) -#endif - -#endif /* ! C99 */ - -#endif /* ! FLEXINT_H */ - -/* TODO: this is always defined, so inline it */ -#define yyconst const - -#if defined(__GNUC__) && __GNUC__ >= 3 -#define yynoreturn __attribute__((__noreturn__)) -#else -#define yynoreturn -#endif - -/* An opaque pointer. */ -#ifndef YY_TYPEDEF_YY_SCANNER_T -#define YY_TYPEDEF_YY_SCANNER_T -typedef void* yyscan_t; -#endif - -/* For convenience, these vars (plus the bison vars far below) - are macros in the reentrant scanner. */ -#define yyin yyg->yyin_r -#define yyout yyg->yyout_r -#define yyextra yyg->yyextra_r -#define yyleng yyg->yyleng_r -#define yytext yyg->yytext_r -#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) -#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) -#define yy_flex_debug yyg->yy_flex_debug_r - -/* Size of default input buffer. */ -#ifndef YY_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k. - * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. - * Ditto for the __ia64__ case accordingly. - */ -#define YY_BUF_SIZE 32768 -#else -#define YY_BUF_SIZE 16384 -#endif /* __ia64__ */ -#endif - -#ifndef YY_TYPEDEF_YY_BUFFER_STATE -#define YY_TYPEDEF_YY_BUFFER_STATE -typedef struct yy_buffer_state *YY_BUFFER_STATE; -#endif - -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - -#ifndef YY_STRUCT_YY_BUFFER_STATE -#define YY_STRUCT_YY_BUFFER_STATE -struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - int yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; - - }; -#endif /* !YY_STRUCT_YY_BUFFER_STATE */ - -void cmDependsJava_yyrestart (FILE *input_file ,yyscan_t yyscanner ); -void cmDependsJava_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); -YY_BUFFER_STATE cmDependsJava_yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner ); -void cmDependsJava_yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); -void cmDependsJava_yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); -void cmDependsJava_yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); -void cmDependsJava_yypop_buffer_state (yyscan_t yyscanner ); - -YY_BUFFER_STATE cmDependsJava_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); -YY_BUFFER_STATE cmDependsJava_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); -YY_BUFFER_STATE cmDependsJava_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); - -void *cmDependsJava_yyalloc (yy_size_t ,yyscan_t yyscanner ); -void *cmDependsJava_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); -void cmDependsJava_yyfree (void * ,yyscan_t yyscanner ); - -/* Begin user sect3 */ - -#define cmDependsJava_yywrap(yyscanner) (/*CONSTCOND*/1) -#define YY_SKIP_YYWRAP - -#define yytext_ptr yytext_r - -#ifdef YY_HEADER_EXPORT_START_CONDITIONS -#define INITIAL 0 -#define comment 1 -#define string 2 - -#endif - -#ifndef YY_EXTRA_TYPE -#define YY_EXTRA_TYPE void * -#endif - -int cmDependsJava_yylex_init (yyscan_t* scanner); - -int cmDependsJava_yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); - -/* Accessor methods to globals. - These are made visible to non-reentrant scanners for convenience. */ - -int cmDependsJava_yylex_destroy (yyscan_t yyscanner ); - -int cmDependsJava_yyget_debug (yyscan_t yyscanner ); - -void cmDependsJava_yyset_debug (int debug_flag ,yyscan_t yyscanner ); - -YY_EXTRA_TYPE cmDependsJava_yyget_extra (yyscan_t yyscanner ); - -void cmDependsJava_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); - -FILE *cmDependsJava_yyget_in (yyscan_t yyscanner ); - -void cmDependsJava_yyset_in (FILE * _in_str ,yyscan_t yyscanner ); - -FILE *cmDependsJava_yyget_out (yyscan_t yyscanner ); - -void cmDependsJava_yyset_out (FILE * _out_str ,yyscan_t yyscanner ); - - int cmDependsJava_yyget_leng (yyscan_t yyscanner ); - -char *cmDependsJava_yyget_text (yyscan_t yyscanner ); - -int cmDependsJava_yyget_lineno (yyscan_t yyscanner ); - -void cmDependsJava_yyset_lineno (int _line_number ,yyscan_t yyscanner ); - -int cmDependsJava_yyget_column (yyscan_t yyscanner ); - -void cmDependsJava_yyset_column (int _column_no ,yyscan_t yyscanner ); - -/* Macros after this point can all be overridden by user definitions in - * section 1. - */ - -#ifndef YY_SKIP_YYWRAP -#ifdef __cplusplus -extern "C" int cmDependsJava_yywrap (yyscan_t yyscanner ); -#else -extern int cmDependsJava_yywrap (yyscan_t yyscanner ); -#endif -#endif - -#ifndef yytext_ptr -static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); -#endif - -#ifndef YY_NO_INPUT - -#endif - -/* Amount of stuff to slurp up with each read. */ -#ifndef YY_READ_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k */ -#define YY_READ_BUF_SIZE 16384 -#else -#define YY_READ_BUF_SIZE 8192 -#endif /* __ia64__ */ -#endif - -/* Number of entries by which start-condition stack grows. */ -#ifndef YY_START_STACK_INCR -#define YY_START_STACK_INCR 25 -#endif - -/* Default declaration of generated scanner - a define so the user can - * easily add parameters. - */ -#ifndef YY_DECL -#define YY_DECL_IS_OURS 1 - -extern int cmDependsJava_yylex (yyscan_t yyscanner); - -#define YY_DECL int cmDependsJava_yylex (yyscan_t yyscanner) -#endif /* !YY_DECL */ - -/* yy_get_previous_state - get the state just before the EOB char was reached */ - -#undef YY_NEW_FILE -#undef YY_FLUSH_BUFFER -#undef yy_set_bol -#undef yy_new_buffer -#undef yy_set_interactive -#undef YY_DO_BEFORE_ACTION - -#ifdef YY_DECL_IS_OURS -#undef YY_DECL_IS_OURS -#undef YY_DECL -#endif - -#line 174 "cmDependsJavaLexer.in.l" - - -#line 335 "cmDependsJavaLexer.h" -#undef cmDependsJava_yyIN_HEADER -#endif /* cmDependsJava_yyHEADER_H */ diff --git a/Source/cmDependsJavaLexer.in.l b/Source/cmDependsJavaLexer.in.l deleted file mode 100644 index 8cb42b1..0000000 --- a/Source/cmDependsJavaLexer.in.l +++ /dev/null @@ -1,174 +0,0 @@ -%{ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ -/* - -This file must be translated to C++ and modified to build everywhere. - -Run flex >= 2.6 like this: - - flex --nounistd -DFLEXINT_H --prefix=cmDependsJava_yy --header-file=cmDependsJavaLexer.h -ocmDependsJavaLexer.cxx cmDependsJavaLexer.in.l - -Modify cmDependsJavaLexer.cxx: - - remove trailing whitespace: sed -i 's/\s*$//' cmDependsJavaLexer.h cmDependsJavaLexer.cxx - - remove blank lines at end of file - - #include "cmStandardLexer.h" at the top - - add cast in yy_scan_bytes for loop condition of _yybytes_len to size_t - -*/ - -/* IWYU pragma: no_forward_declare yyguts_t */ - -#include - -#include "cmDependsJavaParserHelper.h" - -/* Replace the lexer input function. */ -#undef YY_INPUT -#define YY_INPUT(buf, result, max_size) \ - { result = yyextra->LexInput(buf, max_size); } - -/* Include the set of tokens from the parser. */ -#include "cmDependsJavaParserTokens.h" - -#define KEYWORD yylvalp->str = 0 -#define SYMBOL yylvalp->str = 0 -#define PRIMITIVE yylvalp->str = 0 - -/*--------------------------------------------------------------------------*/ -%} - -%option reentrant -%option noyywrap -%pointer - -%x comment -%x string - -%% -"/*" { BEGIN(comment); } -"*/" { BEGIN(INITIAL); } -.|\n {} - -\" { BEGIN(string); } -\" { BEGIN(INITIAL); return jp_STRINGLITERAL; } -. {} - -abstract { KEYWORD; return jp_ABSTRACT; } -assert { KEYWORD; return jp_ASSERT; } -boolean { KEYWORD; return jp_BOOLEAN_TYPE; } -break { KEYWORD; return jp_BREAK; } -byte { KEYWORD; return jp_BYTE_TYPE; } -case { KEYWORD; return jp_CASE; } -catch { KEYWORD; return jp_CATCH; } -char { KEYWORD; return jp_CHAR_TYPE; } -class { KEYWORD; return jp_CLASS; } -continue { KEYWORD; return jp_CONTINUE; } -default { KEYWORD; return jp_DEFAULT; } -do { KEYWORD; return jp_DO; } -double { KEYWORD; return jp_DOUBLE_TYPE; } -else { KEYWORD; return jp_ELSE; } -extends { KEYWORD; return jp_EXTENDS; } -final { KEYWORD; return jp_FINAL; } -finally { KEYWORD; return jp_FINALLY; } -float { KEYWORD; return jp_FLOAT_TYPE; } -for { KEYWORD; return jp_FOR; } -if { KEYWORD; return jp_IF; } -implements { KEYWORD; return jp_IMPLEMENTS; } -import { KEYWORD; return jp_IMPORT; } -instanceof { KEYWORD; return jp_INSTANCEOF; } -int { KEYWORD; return jp_INT_TYPE; } -interface { KEYWORD; return jp_INTERFACE; } -long { KEYWORD; return jp_LONG_TYPE; } -native { KEYWORD; return jp_NATIVE; } -new { KEYWORD; return jp_NEW; } -package { KEYWORD; return jp_PACKAGE; } -private { KEYWORD; return jp_PRIVATE; } -protected { KEYWORD; return jp_PROTECTED; } -public { KEYWORD; return jp_PUBLIC; } -return { KEYWORD; return jp_RETURN; } -short { KEYWORD; return jp_SHORT_TYPE; } -static { KEYWORD; return jp_STATIC; } -strictfp { KEYWORD; return jp_STRICTFP; } -super { KEYWORD; return jp_SUPER; } -switch { KEYWORD; return jp_SWITCH; } -synchronized { KEYWORD; return jp_SYNCHRONIZED; } -this { KEYWORD; return jp_THIS; } -throw { KEYWORD; return jp_THROW; } -throws { KEYWORD; return jp_THROWS; } -transient { KEYWORD; return jp_TRANSIENT; } -try { KEYWORD; return jp_TRY; } -void { KEYWORD; return jp_VOID; } -volatile { KEYWORD; return jp_VOLATILE; } -while { KEYWORD; return jp_WHILE; } - -(true|false) { PRIMITIVE; return jp_BOOLEANLITERAL; } -\'([^\\]|\\.|\\u[0-9a-fA-F]*|\\[0-7]*)\' { PRIMITIVE; return jp_CHARACTERLITERAL; } -(0|[0-9]+)[lL]? { PRIMITIVE; return jp_DECIMALINTEGERLITERAL; } -([0-9]+\.[0-9]*|\.[0-9]+|[0-9]+)([eE][+\-]?[0-9]+)?[fFdD]? { PRIMITIVE; return jp_FLOATINGPOINTLITERAL; } -0[xX][0-9a-fA-F]+[lL]? { PRIMITIVE; return jp_HEXINTEGERLITERAL; } -null { PRIMITIVE; return jp_NULLLITERAL; } - -"&" { SYMBOL; return jp_AND; } -"&&" { SYMBOL; return jp_ANDAND; } -"&=" { SYMBOL; return jp_ANDEQUALS; } -"\]" { SYMBOL; return jp_BRACKETEND; } -"\[" { SYMBOL; return jp_BRACKETSTART; } -"\^" { SYMBOL; return jp_CARROT; } -"\^=" { SYMBOL; return jp_CARROTEQUALS; } -":" { SYMBOL; return jp_COLON; } -"," { SYMBOL; return jp_COMMA; } -"}" { SYMBOL; return jp_CURLYEND; } -"{" { SYMBOL; return jp_CURLYSTART; } -"/" { SYMBOL; return jp_DIVIDE; } -"/=" { SYMBOL; return jp_DIVIDEEQUALS; } -"\$" { SYMBOL; return jp_DOLLAR; } -"\." { SYMBOL; return jp_DOT; } -"=" { SYMBOL; return jp_EQUALS; } -"==" { SYMBOL; return jp_EQUALSEQUALS; } -"\!" { SYMBOL; return jp_EXCLAMATION; } -"\!=" { SYMBOL; return jp_EXCLAMATIONEQUALS; } -">" { SYMBOL; return jp_GREATER; } -">=" { SYMBOL; return jp_GTEQUALS; } -">>" { SYMBOL; return jp_GTGT; } -">>=" { SYMBOL; return jp_GTGTEQUALS; } -">>>" { SYMBOL; return jp_GTGTGT; } -">>>=" { SYMBOL; return jp_GTGTGTEQUALS; } -"<<=" { SYMBOL; return jp_LESLESEQUALS; } -"<" { SYMBOL; return jp_LESSTHAN; } -"<=" { SYMBOL; return jp_LTEQUALS; } -"<<" { SYMBOL; return jp_LTLT; } -"-" { SYMBOL; return jp_MINUS; } -"-=" { SYMBOL; return jp_MINUSEQUALS; } -"--" { SYMBOL; return jp_MINUSMINUS; } -"\)" { SYMBOL; return jp_PAREEND; } -"\(" { SYMBOL; return jp_PARESTART; } -"%" { SYMBOL; return jp_PERCENT; } -"%=" { SYMBOL; return jp_PERCENTEQUALS; } -"\|" { SYMBOL; return jp_PIPE; } -"\|=" { SYMBOL; return jp_PIPEEQUALS; } -"\|\|" { SYMBOL; return jp_PIPEPIPE; } -"\+" { SYMBOL; return jp_PLUS; } -"\+=" { SYMBOL; return jp_PLUSEQUALS; } -"\+\+" { SYMBOL; return jp_PLUSPLUS; } -"\?" { SYMBOL; return jp_QUESTION; } -";" { SYMBOL; return jp_SEMICOL; } -"\~" { SYMBOL; return jp_TILDE; } -"\*" { SYMBOL; return jp_TIMES; } -"\*=" { SYMBOL; return jp_TIMESEQUALS; } - -[a-z_A-Z][a-z_0-9A-Z]* { - yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); - return jp_NAME; -} - -\/\/.*\n { } -[ \f\t\n\r] { } -. { - std::cerr << "Unknown character: " << yytext[0] - << " (" << (int)yytext[0] << ")" << std::endl; - yyextra->Error("Unknown character"); - return jp_ERROR; -} - -%% diff --git a/Source/cmDependsJavaParser.cxx b/Source/cmDependsJavaParser.cxx deleted file mode 100644 index bc45d45..0000000 --- a/Source/cmDependsJavaParser.cxx +++ /dev/null @@ -1,6421 +0,0 @@ -/* A Bison parser, made by GNU Bison 3.0.4. */ - -/* Bison implementation for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - -/* C LALR(1) parser skeleton written by Richard Stallman, by - simplifying the original so-called "semantic" parser. */ - -/* All symbols defined below should begin with yy or YY, to avoid - infringing on user name space. This should be done even for local - variables, as they might otherwise be expanded by user macros. - There are some unavoidable exceptions within include files to - define necessary library symbols; they are noted "INFRINGES ON - USER NAME SPACE" below. */ - -/* Identify Bison output. */ -#define YYBISON 1 - -/* Bison version. */ -#define YYBISON_VERSION "3.0.4" - -/* Skeleton name. */ -#define YYSKELETON_NAME "yacc.c" - -/* Pure parsers. */ -#define YYPURE 1 - -/* Push parsers. */ -#define YYPUSH 0 - -/* Pull parsers. */ -#define YYPULL 1 - - -/* Substitute the variable and function names. */ -#define yyparse cmDependsJava_yyparse -#define yylex cmDependsJava_yylex -#define yyerror cmDependsJava_yyerror -#define yydebug cmDependsJava_yydebug -#define yynerrs cmDependsJava_yynerrs - - -/* Copy the first part of user declarations. */ -#line 1 "cmDependsJavaParser.y" /* yacc.c:339 */ - -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ -/* - -This file must be translated to C and modified to build everywhere. - -Run bison like this: - - bison --yacc --name-prefix=cmDependsJava_yy --defines=cmDependsJavaParserTokens.h -ocmDependsJavaParser.cxx cmDependsJavaParser.y - -Modify cmDependsJavaParser.cxx: - - "#if 0" out yyerrorlab block in range ["goto yyerrlab1", "yyerrlab1:"] - -*/ - -#include "cmConfigure.h" // IWYU pragma: keep - -#include -#include -#include - -#define yyGetParser (cmDependsJava_yyget_extra(yyscanner)) - -/*-------------------------------------------------------------------------*/ -#include "cmDependsJavaParserHelper.h" /* Interface to parser object. */ -#include "cmDependsJavaLexer.h" /* Interface to lexer object. */ -#include "cmDependsJavaParserTokens.h" /* Need YYSTYPE for YY_DECL. */ - -/* Forward declare the lexer entry point. */ -YY_DECL; - -/* Helper function to forward error callback from parser. */ -static void cmDependsJava_yyerror(yyscan_t yyscanner, const char* message); - -#define YYMAXDEPTH 1000000 - - -#define jpCheckEmpty(cnt) yyGetParser->CheckEmpty(__LINE__, cnt, yyvsp); -#define jpElementStart(cnt) yyGetParser->PrepareElement(&yyval) -#define jpStoreClass(str) yyGetParser->AddClassFound(str); yyGetParser->DeallocateParserType(&(str)) -/* Disable some warnings in the generated code. */ -#ifdef _MSC_VER -# pragma warning (disable: 4102) /* Unused goto label. */ -# pragma warning (disable: 4065) /* Switch statement contains default but no case. */ -#endif - -#line 120 "cmDependsJavaParser.cxx" /* yacc.c:339 */ - -# ifndef YY_NULLPTR -# if defined __cplusplus && 201103L <= __cplusplus -# define YY_NULLPTR nullptr -# else -# define YY_NULLPTR 0 -# endif -# endif - -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE 1 -#endif - -/* In a future release of Bison, this section will be replaced - by #include "cmDependsJavaParserTokens.h". */ -#ifndef YY_CMDEPENDSJAVA_YY_CMDEPENDSJAVAPARSERTOKENS_H_INCLUDED -# define YY_CMDEPENDSJAVA_YY_CMDEPENDSJAVAPARSERTOKENS_H_INCLUDED -/* Debug traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif -#if YYDEBUG -extern int cmDependsJava_yydebug; -#endif - -/* Token type. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - enum yytokentype - { - jp_ABSTRACT = 258, - jp_ASSERT = 259, - jp_BOOLEAN_TYPE = 260, - jp_BREAK = 261, - jp_BYTE_TYPE = 262, - jp_CASE = 263, - jp_CATCH = 264, - jp_CHAR_TYPE = 265, - jp_CLASS = 266, - jp_CONTINUE = 267, - jp_DEFAULT = 268, - jp_DO = 269, - jp_DOUBLE_TYPE = 270, - jp_ELSE = 271, - jp_EXTENDS = 272, - jp_FINAL = 273, - jp_FINALLY = 274, - jp_FLOAT_TYPE = 275, - jp_FOR = 276, - jp_IF = 277, - jp_IMPLEMENTS = 278, - jp_IMPORT = 279, - jp_INSTANCEOF = 280, - jp_INT_TYPE = 281, - jp_INTERFACE = 282, - jp_LONG_TYPE = 283, - jp_NATIVE = 284, - jp_NEW = 285, - jp_PACKAGE = 286, - jp_PRIVATE = 287, - jp_PROTECTED = 288, - jp_PUBLIC = 289, - jp_RETURN = 290, - jp_SHORT_TYPE = 291, - jp_STATIC = 292, - jp_STRICTFP = 293, - jp_SUPER = 294, - jp_SWITCH = 295, - jp_SYNCHRONIZED = 296, - jp_THIS = 297, - jp_THROW = 298, - jp_THROWS = 299, - jp_TRANSIENT = 300, - jp_TRY = 301, - jp_VOID = 302, - jp_VOLATILE = 303, - jp_WHILE = 304, - jp_BOOLEANLITERAL = 305, - jp_CHARACTERLITERAL = 306, - jp_DECIMALINTEGERLITERAL = 307, - jp_FLOATINGPOINTLITERAL = 308, - jp_HEXINTEGERLITERAL = 309, - jp_NULLLITERAL = 310, - jp_STRINGLITERAL = 311, - jp_NAME = 312, - jp_AND = 313, - jp_ANDAND = 314, - jp_ANDEQUALS = 315, - jp_BRACKETEND = 316, - jp_BRACKETSTART = 317, - jp_CARROT = 318, - jp_CARROTEQUALS = 319, - jp_COLON = 320, - jp_COMMA = 321, - jp_CURLYEND = 322, - jp_CURLYSTART = 323, - jp_DIVIDE = 324, - jp_DIVIDEEQUALS = 325, - jp_DOLLAR = 326, - jp_DOT = 327, - jp_EQUALS = 328, - jp_EQUALSEQUALS = 329, - jp_EXCLAMATION = 330, - jp_EXCLAMATIONEQUALS = 331, - jp_GREATER = 332, - jp_GTEQUALS = 333, - jp_GTGT = 334, - jp_GTGTEQUALS = 335, - jp_GTGTGT = 336, - jp_GTGTGTEQUALS = 337, - jp_LESLESEQUALS = 338, - jp_LESSTHAN = 339, - jp_LTEQUALS = 340, - jp_LTLT = 341, - jp_MINUS = 342, - jp_MINUSEQUALS = 343, - jp_MINUSMINUS = 344, - jp_PAREEND = 345, - jp_PARESTART = 346, - jp_PERCENT = 347, - jp_PERCENTEQUALS = 348, - jp_PIPE = 349, - jp_PIPEEQUALS = 350, - jp_PIPEPIPE = 351, - jp_PLUS = 352, - jp_PLUSEQUALS = 353, - jp_PLUSPLUS = 354, - jp_QUESTION = 355, - jp_SEMICOL = 356, - jp_TILDE = 357, - jp_TIMES = 358, - jp_TIMESEQUALS = 359, - jp_ERROR = 360 - }; -#endif -/* Tokens. */ -#define jp_ABSTRACT 258 -#define jp_ASSERT 259 -#define jp_BOOLEAN_TYPE 260 -#define jp_BREAK 261 -#define jp_BYTE_TYPE 262 -#define jp_CASE 263 -#define jp_CATCH 264 -#define jp_CHAR_TYPE 265 -#define jp_CLASS 266 -#define jp_CONTINUE 267 -#define jp_DEFAULT 268 -#define jp_DO 269 -#define jp_DOUBLE_TYPE 270 -#define jp_ELSE 271 -#define jp_EXTENDS 272 -#define jp_FINAL 273 -#define jp_FINALLY 274 -#define jp_FLOAT_TYPE 275 -#define jp_FOR 276 -#define jp_IF 277 -#define jp_IMPLEMENTS 278 -#define jp_IMPORT 279 -#define jp_INSTANCEOF 280 -#define jp_INT_TYPE 281 -#define jp_INTERFACE 282 -#define jp_LONG_TYPE 283 -#define jp_NATIVE 284 -#define jp_NEW 285 -#define jp_PACKAGE 286 -#define jp_PRIVATE 287 -#define jp_PROTECTED 288 -#define jp_PUBLIC 289 -#define jp_RETURN 290 -#define jp_SHORT_TYPE 291 -#define jp_STATIC 292 -#define jp_STRICTFP 293 -#define jp_SUPER 294 -#define jp_SWITCH 295 -#define jp_SYNCHRONIZED 296 -#define jp_THIS 297 -#define jp_THROW 298 -#define jp_THROWS 299 -#define jp_TRANSIENT 300 -#define jp_TRY 301 -#define jp_VOID 302 -#define jp_VOLATILE 303 -#define jp_WHILE 304 -#define jp_BOOLEANLITERAL 305 -#define jp_CHARACTERLITERAL 306 -#define jp_DECIMALINTEGERLITERAL 307 -#define jp_FLOATINGPOINTLITERAL 308 -#define jp_HEXINTEGERLITERAL 309 -#define jp_NULLLITERAL 310 -#define jp_STRINGLITERAL 311 -#define jp_NAME 312 -#define jp_AND 313 -#define jp_ANDAND 314 -#define jp_ANDEQUALS 315 -#define jp_BRACKETEND 316 -#define jp_BRACKETSTART 317 -#define jp_CARROT 318 -#define jp_CARROTEQUALS 319 -#define jp_COLON 320 -#define jp_COMMA 321 -#define jp_CURLYEND 322 -#define jp_CURLYSTART 323 -#define jp_DIVIDE 324 -#define jp_DIVIDEEQUALS 325 -#define jp_DOLLAR 326 -#define jp_DOT 327 -#define jp_EQUALS 328 -#define jp_EQUALSEQUALS 329 -#define jp_EXCLAMATION 330 -#define jp_EXCLAMATIONEQUALS 331 -#define jp_GREATER 332 -#define jp_GTEQUALS 333 -#define jp_GTGT 334 -#define jp_GTGTEQUALS 335 -#define jp_GTGTGT 336 -#define jp_GTGTGTEQUALS 337 -#define jp_LESLESEQUALS 338 -#define jp_LESSTHAN 339 -#define jp_LTEQUALS 340 -#define jp_LTLT 341 -#define jp_MINUS 342 -#define jp_MINUSEQUALS 343 -#define jp_MINUSMINUS 344 -#define jp_PAREEND 345 -#define jp_PARESTART 346 -#define jp_PERCENT 347 -#define jp_PERCENTEQUALS 348 -#define jp_PIPE 349 -#define jp_PIPEEQUALS 350 -#define jp_PIPEPIPE 351 -#define jp_PLUS 352 -#define jp_PLUSEQUALS 353 -#define jp_PLUSPLUS 354 -#define jp_QUESTION 355 -#define jp_SEMICOL 356 -#define jp_TILDE 357 -#define jp_TIMES 358 -#define jp_TIMESEQUALS 359 -#define jp_ERROR 360 - -/* Value type. */ - - - -int cmDependsJava_yyparse (yyscan_t yyscanner); - -#endif /* !YY_CMDEPENDSJAVA_YY_CMDEPENDSJAVAPARSERTOKENS_H_INCLUDED */ - -/* Copy the second part of user declarations. */ - -#line 375 "cmDependsJavaParser.cxx" /* yacc.c:358 */ - -#ifdef short -# undef short -#endif - -#ifdef YYTYPE_UINT8 -typedef YYTYPE_UINT8 yytype_uint8; -#else -typedef unsigned char yytype_uint8; -#endif - -#ifdef YYTYPE_INT8 -typedef YYTYPE_INT8 yytype_int8; -#else -typedef signed char yytype_int8; -#endif - -#ifdef YYTYPE_UINT16 -typedef YYTYPE_UINT16 yytype_uint16; -#else -typedef unsigned short int yytype_uint16; -#endif - -#ifdef YYTYPE_INT16 -typedef YYTYPE_INT16 yytype_int16; -#else -typedef short int yytype_int16; -#endif - -#ifndef YYSIZE_T -# ifdef __SIZE_TYPE__ -# define YYSIZE_T __SIZE_TYPE__ -# elif defined size_t -# define YYSIZE_T size_t -# elif ! defined YYSIZE_T -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# else -# define YYSIZE_T unsigned int -# endif -#endif - -#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) - -#ifndef YY_ -# if defined YYENABLE_NLS && YYENABLE_NLS -# if ENABLE_NLS -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_(Msgid) dgettext ("bison-runtime", Msgid) -# endif -# endif -# ifndef YY_ -# define YY_(Msgid) Msgid -# endif -#endif - -#ifndef YY_ATTRIBUTE -# if (defined __GNUC__ \ - && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ - || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C -# define YY_ATTRIBUTE(Spec) __attribute__(Spec) -# else -# define YY_ATTRIBUTE(Spec) /* empty */ -# endif -#endif - -#ifndef YY_ATTRIBUTE_PURE -# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) -#endif - -#ifndef YY_ATTRIBUTE_UNUSED -# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) -#endif - -#if !defined _Noreturn \ - && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) -# if defined _MSC_VER && 1200 <= _MSC_VER -# define _Noreturn __declspec (noreturn) -# else -# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) -# endif -#endif - -/* Suppress unused-variable warnings by "using" E. */ -#if ! defined lint || defined __GNUC__ -# define YYUSE(E) ((void) (E)) -#else -# define YYUSE(E) /* empty */ -#endif - -#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ -/* Suppress an incorrect diagnostic about yylval being uninitialized. */ -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ - _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ - _Pragma ("GCC diagnostic pop") -#else -# define YY_INITIAL_VALUE(Value) Value -#endif -#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_END -#endif -#ifndef YY_INITIAL_VALUE -# define YY_INITIAL_VALUE(Value) /* Nothing. */ -#endif - - -#if ! defined yyoverflow || YYERROR_VERBOSE - -/* The parser invokes alloca or malloc; define the necessary symbols. */ - -# ifdef YYSTACK_USE_ALLOCA -# if YYSTACK_USE_ALLOCA -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca -# elif defined __BUILTIN_VA_ARG_INCR -# include /* INFRINGES ON USER NAME SPACE */ -# elif defined _AIX -# define YYSTACK_ALLOC __alloca -# elif defined _MSC_VER -# include /* INFRINGES ON USER NAME SPACE */ -# define alloca _alloca -# else -# define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS -# include /* INFRINGES ON USER NAME SPACE */ - /* Use EXIT_SUCCESS as a witness for stdlib.h. */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# endif -# endif -# endif - -# ifdef YYSTACK_ALLOC - /* Pacify GCC's 'empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) -# ifndef YYSTACK_ALLOC_MAXIMUM - /* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -# endif -# else -# define YYSTACK_ALLOC YYMALLOC -# define YYSTACK_FREE YYFREE -# ifndef YYSTACK_ALLOC_MAXIMUM -# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -# endif -# if (defined __cplusplus && ! defined EXIT_SUCCESS \ - && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# ifndef YYMALLOC -# define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS -void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# ifndef YYFREE -# define YYFREE free -# if ! defined free && ! defined EXIT_SUCCESS -void free (void *); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# endif -#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ - - -#if (! defined yyoverflow \ - && (! defined __cplusplus \ - || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) - -/* A type that is properly aligned for any stack member. */ -union yyalloc -{ - yytype_int16 yyss_alloc; - YYSTYPE yyvs_alloc; -}; - -/* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) - -/* The size of an array large to enough to hold all stacks, each with - N elements. */ -# define YYSTACK_BYTES(N) \ - ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ - + YYSTACK_GAP_MAXIMUM) - -# define YYCOPY_NEEDED 1 - -/* Relocate STACK from its old location to the new one. The - local variables YYSIZE and YYSTACKSIZE give the old and new number of - elements in the stack, and YYPTR gives the new location of the - stack. Advance YYPTR to a properly aligned location for the next - stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (0) - -#endif - -#if defined YYCOPY_NEEDED && YYCOPY_NEEDED -/* Copy COUNT objects from SRC to DST. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(Dst, Src, Count) \ - __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) -# else -# define YYCOPY(Dst, Src, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (Dst)[yyi] = (Src)[yyi]; \ - } \ - while (0) -# endif -# endif -#endif /* !YYCOPY_NEEDED */ - -/* YYFINAL -- State number of the termination state. */ -#define YYFINAL 23 -/* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 2215 - -/* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 106 -/* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 158 -/* YYNRULES -- Number of rules. */ -#define YYNRULES 351 -/* YYNSTATES -- Number of states. */ -#define YYNSTATES 575 - -/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned - by yylex, with out-of-bounds checking. */ -#define YYUNDEFTOK 2 -#define YYMAXUTOK 360 - -#define YYTRANSLATE(YYX) \ - ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) - -/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM - as returned by yylex, without out-of-bounds checking. */ -static const yytype_uint8 yytranslate[] = -{ - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, - 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, - 105 -}; - -#if YYDEBUG - /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ -static const yytype_uint16 yyrline[] = -{ - 0, 179, 179, 188, 196, 204, 212, 220, 228, 237, - 245, 254, 262, 271, 276, 281, 286, 291, 296, 301, - 306, 312, 320, 329, 339, 348, 357, 365, 375, 381, - 388, 395, 401, 408, 417, 427, 437, 446, 454, 463, - 472, 478, 487, 493, 502, 508, 517, 529, 537, 546, - 558, 571, 579, 587, 596, 604, 613, 613, 613, 614, - 615, 615, 615, 615, 615, 615, 616, 619, 629, 638, - 647, 656, 666, 672, 681, 690, 699, 707, 716, 725, - 731, 740, 748, 756, 764, 773, 781, 790, 796, 804, - 813, 821, 830, 839, 848, 856, 865, 873, 881, 890, - 899, 909, 916, 926, 936, 943, 950, 953, 959, 969, - 979, 989, 995, 1005, 1015, 1025, 1034, 1044, 1055, 1065, - 1072, 1082, 1091, 1101, 1110, 1120, 1126, 1136, 1145, 1155, - 1165, 1172, 1181, 1190, 1199, 1208, 1216, 1225, 1234, 1244, - 1254, 1263, 1273, 1283, 1290, 1299, 1309, 1318, 1328, 1337, - 1344, 1354, 1363, 1373, 1382, 1391, 1401, 1411, 1420, 1430, - 1439, 1448, 1457, 1466, 1475, 1485, 1494, 1503, 1512, 1521, - 1531, 1540, 1549, 1558, 1567, 1576, 1585, 1594, 1603, 1612, - 1621, 1630, 1640, 1650, 1661, 1671, 1681, 1690, 1699, 1708, - 1717, 1726, 1735, 1745, 1755, 1765, 1775, 1782, 1789, 1796, - 1806, 1813, 1823, 1833, 1842, 1852, 1861, 1871, 1878, 1885, - 1892, 1900, 1907, 1917, 1924, 1934, 1944, 1951, 1961, 1970, - 1980, 1990, 1999, 2009, 2018, 2028, 2039, 2046, 2053, 2064, - 2074, 2084, 2094, 2103, 2113, 2120, 2130, 2139, 2149, 2156, - 2166, 2175, 2185, 2194, 2200, 2209, 2218, 2227, 2236, 2246, - 2256, 2263, 2273, 2280, 2290, 2299, 2309, 2318, 2327, 2336, - 2346, 2353, 2363, 2372, 2382, 2392, 2398, 2405, 2415, 2425, - 2435, 2446, 2456, 2467, 2477, 2488, 2498, 2508, 2517, 2526, - 2535, 2544, 2554, 2564, 2574, 2583, 2592, 2601, 2610, 2620, - 2630, 2640, 2649, 2658, 2667, 2677, 2686, 2695, 2702, 2711, - 2720, 2729, 2739, 2748, 2757, 2767, 2776, 2785, 2794, 2804, - 2813, 2822, 2831, 2840, 2849, 2859, 2868, 2877, 2887, 2896, - 2906, 2915, 2925, 2934, 2944, 2953, 2963, 2972, 2982, 2991, - 3001, 3010, 3020, 3030, 3040, 3049, 3059, 3068, 3077, 3086, - 3095, 3104, 3113, 3122, 3131, 3140, 3149, 3158, 3168, 3178, - 3188, 3197 -}; -#endif - -#if YYDEBUG || YYERROR_VERBOSE || 1 -/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = -{ - "$end", "error", "$undefined", "jp_ABSTRACT", "jp_ASSERT", - "jp_BOOLEAN_TYPE", "jp_BREAK", "jp_BYTE_TYPE", "jp_CASE", "jp_CATCH", - "jp_CHAR_TYPE", "jp_CLASS", "jp_CONTINUE", "jp_DEFAULT", "jp_DO", - "jp_DOUBLE_TYPE", "jp_ELSE", "jp_EXTENDS", "jp_FINAL", "jp_FINALLY", - "jp_FLOAT_TYPE", "jp_FOR", "jp_IF", "jp_IMPLEMENTS", "jp_IMPORT", - "jp_INSTANCEOF", "jp_INT_TYPE", "jp_INTERFACE", "jp_LONG_TYPE", - "jp_NATIVE", "jp_NEW", "jp_PACKAGE", "jp_PRIVATE", "jp_PROTECTED", - "jp_PUBLIC", "jp_RETURN", "jp_SHORT_TYPE", "jp_STATIC", "jp_STRICTFP", - "jp_SUPER", "jp_SWITCH", "jp_SYNCHRONIZED", "jp_THIS", "jp_THROW", - "jp_THROWS", "jp_TRANSIENT", "jp_TRY", "jp_VOID", "jp_VOLATILE", - "jp_WHILE", "jp_BOOLEANLITERAL", "jp_CHARACTERLITERAL", - "jp_DECIMALINTEGERLITERAL", "jp_FLOATINGPOINTLITERAL", - "jp_HEXINTEGERLITERAL", "jp_NULLLITERAL", "jp_STRINGLITERAL", "jp_NAME", - "jp_AND", "jp_ANDAND", "jp_ANDEQUALS", "jp_BRACKETEND", - "jp_BRACKETSTART", "jp_CARROT", "jp_CARROTEQUALS", "jp_COLON", - "jp_COMMA", "jp_CURLYEND", "jp_CURLYSTART", "jp_DIVIDE", - "jp_DIVIDEEQUALS", "jp_DOLLAR", "jp_DOT", "jp_EQUALS", "jp_EQUALSEQUALS", - "jp_EXCLAMATION", "jp_EXCLAMATIONEQUALS", "jp_GREATER", "jp_GTEQUALS", - "jp_GTGT", "jp_GTGTEQUALS", "jp_GTGTGT", "jp_GTGTGTEQUALS", - "jp_LESLESEQUALS", "jp_LESSTHAN", "jp_LTEQUALS", "jp_LTLT", "jp_MINUS", - "jp_MINUSEQUALS", "jp_MINUSMINUS", "jp_PAREEND", "jp_PARESTART", - "jp_PERCENT", "jp_PERCENTEQUALS", "jp_PIPE", "jp_PIPEEQUALS", - "jp_PIPEPIPE", "jp_PLUS", "jp_PLUSEQUALS", "jp_PLUSPLUS", "jp_QUESTION", - "jp_SEMICOL", "jp_TILDE", "jp_TIMES", "jp_TIMESEQUALS", "jp_ERROR", - "$accept", "Goal", "Literal", "IntegerLiteral", "Type", "PrimitiveType", - "ReferenceType", "ClassOrInterfaceType", "ClassType", "InterfaceType", - "ArrayType", "Name", "SimpleName", "Identifier", "QualifiedName", - "SimpleType", "CompilationUnit", "PackageDeclarationopt", - "ImportDeclarations", "TypeDeclarations", "PackageDeclaration", - "ImportDeclaration", "SingleTypeImportDeclaration", - "TypeImportOnDemandDeclaration", "TypeDeclaration", "Modifiers", - "Modifier", "ClassHeader", "ClassDeclaration", "Modifiersopt", "Super", - "Interfaces", "InterfaceTypeList", "ClassBody", "ClassBodyDeclarations", - "ClassBodyDeclaration", "ClassMemberDeclaration", "FieldDeclaration", - "VariableDeclarators", "VariableDeclarator", "VariableDeclaratorId", - "VariableInitializer", "MethodDeclaration", "MethodHeader", "Throwsopt", - "MethodDeclarator", "FormalParameterListopt", "FormalParameterList", - "FormalParameter", "Throws", "ClassTypeList", "MethodBody", - "StaticInitializer", "ConstructorDeclaration", "ConstructorDeclarator", - "ConstructorBody", "ExplicitConstructorInvocationopt", - "ExplicitConstructorInvocation", "InterfaceHeader", - "InterfaceDeclaration", "ExtendsInterfacesopt", "ExtendsInterfaces", - "InterfaceBody", "InterfaceMemberDeclarations", - "InterfaceMemberDeclaration", "ConstantDeclaration", - "AbstractMethodDeclaration", "Semicols", "ArrayInitializer", - "VariableInitializersOptional", "VariableInitializers", "Block", - "BlockStatementsopt", "BlockStatements", "BlockStatement", - "LocalVariableDeclarationStatement", "LocalVariableDeclaration", - "Statement", "StatementNoShortIf", - "StatementWithoutTrailingSubstatement", "EmptyStatement", - "LabeledStatement", "LabeledStatementNoShortIf", "ExpressionStatement", - "StatementExpression", "IfThenStatement", "IfThenElseStatement", - "IfThenElseStatementNoShortIf", "SwitchStatement", "SwitchBlock", - "SwitchLabelsopt", "SwitchBlockStatementGroups", - "SwitchBlockStatementGroup", "SwitchLabels", "SwitchLabel", - "WhileStatement", "WhileStatementNoShortIf", "DoStatement", - "ForStatement", "ForUpdateopt", "ForInitopt", "ForStatementNoShortIf", - "Expressionopt", "ForInit", "ForUpdate", "StatementExpressionList", - "AssertStatement", "BreakStatement", "Identifieropt", - "ContinueStatement", "ReturnStatement", "ThrowStatement", - "SynchronizedStatement", "TryStatement", "Catchesopt", "Catches", - "CatchClause", "Finally", "Primary", "PrimaryNoNewArray", - "ClassInstanceCreationExpression", "ClassBodyOpt", "ArgumentListopt", - "ArgumentList", "ArrayCreationExpression", "Dimsopt", "DimExprs", - "DimExpr", "Dims", "FieldAccess", "MethodInvocation", "ArrayAccess", - "PostfixExpression", "PostIncrementExpression", - "PostDecrementExpression", "UnaryExpression", "PreIncrementExpression", - "PreDecrementExpression", "UnaryExpressionNotPlusMinus", - "CastExpression", "MultiplicativeExpression", "AdditiveExpression", - "ShiftExpression", "RelationalExpression", "EqualityExpression", - "AndExpression", "ExclusiveOrExpression", "InclusiveOrExpression", - "ConditionalAndExpression", "ConditionalOrExpression", - "ConditionalExpression", "AssignmentExpression", "Assignment", - "LeftHandSide", "AssignmentOperator", "Expression", "ConstantExpression", - "New", YY_NULLPTR -}; -#endif - -# ifdef YYPRINT -/* YYTOKNUM[NUM] -- (External) token number corresponding to the - (internal) symbol number NUM (which must be that of a token). */ -static const yytype_uint16 yytoknum[] = -{ - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, - 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, - 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, - 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, - 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, - 355, 356, 357, 358, 359, 360 -}; -# endif - -#define YYPACT_NINF -503 - -#define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-503))) - -#define YYTABLE_NINF -336 - -#define yytable_value_is_error(Yytable_value) \ - 0 - - /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -static const yytype_int16 yypact[] = -{ - 159, 1039, 236, -503, -503, -503, -503, -503, -503, -503, - -503, -503, -503, -503, -503, -503, 186, -503, 56, -503, - -503, -503, 178, -503, 35, -503, 21, -503, 248, 1039, - 273, -503, -503, -503, -503, -503, -503, -503, 78, -503, - -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, - -503, -503, 2088, -503, 32, -503, 16, 245, -503, 28, - -503, -503, 1039, 1039, -503, 80, 206, -503, 129, 129, - 1039, 221, 228, 194, -503, -503, 225, -503, -503, 234, - 164, 206, -503, -503, -503, -503, -503, -503, -503, 1039, - -503, 1039, 233, -503, -503, 739, -503, -503, -503, -503, - -49, -503, -503, -503, 1116, -503, -503, 1276, -503, 129, - 129, 40, -503, -503, -503, 122, 212, 265, -503, 215, - -503, -503, 219, 739, -503, 222, 224, -503, -503, -503, - 1820, 129, 129, 1627, 237, 238, -503, 1820, 241, 239, - 242, 283, 1820, 233, 266, -503, -503, -503, -503, -503, - -503, -503, 1820, 1820, 1820, -503, -503, -503, 129, 284, - 476, 293, 2067, -503, 349, -503, 296, 1366, -503, -503, - 264, -503, -503, -503, -503, -503, 268, -503, -503, -503, - -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, - 294, 305, 72, -503, 2070, 88, 2084, 121, 130, 148, - -503, -503, -503, 2111, 1039, 281, 133, 281, -25, -503, - 126, 133, 314, 315, 315, 921, 1039, 308, -503, -503, - -503, -503, 277, -503, 1820, 1820, 1820, 1820, 1820, 317, - 284, 545, -503, -503, 121, -503, -503, -503, -503, -503, - -503, -503, 73, 124, 163, 59, 196, 323, 319, 290, - 324, 18, -503, -503, -503, -30, -503, 285, 286, 242, - 342, 1941, 1820, 291, -503, 129, 1820, 1820, 129, 292, - 385, 1820, 96, -503, -503, -503, 310, -503, -503, 329, - 387, 1085, 3, 1820, 1627, 129, -503, -503, -503, -503, - 175, 1820, -503, -503, -503, -503, -503, -503, -503, -503, - -503, -503, -503, -503, -503, -503, 1820, 339, 339, 311, - 921, 343, -503, 129, -503, 344, 1766, -503, -503, 346, - 1039, 313, 347, -503, -503, 353, -503, 307, -503, -503, - -503, 6, 545, 326, -503, -503, 1820, 1820, 1820, 1820, - 1820, 1820, 1820, 1820, 1039, 1820, 1820, 1820, 1820, 1820, - 1820, 1820, 1820, 1820, 1820, 1820, 1820, 1820, -503, -503, - -503, 330, 2067, -503, -503, 327, -503, 354, 334, -503, - 345, 335, 340, 348, -503, 351, 416, 232, -503, 356, - -503, -503, 376, -503, 357, 377, -503, -503, 329, -503, - 358, 390, -503, 1085, 339, -503, 154, 339, 154, 1820, - 362, -503, -503, -503, 1766, -503, -503, -503, -503, 129, - -503, 2088, 1039, 1456, -503, 363, 70, 93, 1874, -503, - -503, -503, 73, 73, 124, 124, 124, -503, 163, 163, - 163, 163, 59, 59, 196, 323, 319, 290, 324, 383, - 360, 1820, 1820, 1995, 1699, 1820, 386, 233, 1820, 2088, - 233, -503, -503, 1627, -503, -503, 1820, 1820, -503, 394, - -503, -503, 315, -503, -503, -503, 369, -503, -503, 396, - 404, 410, -503, -503, 26, 113, -503, 407, 1820, 1874, - -503, 1820, -503, 391, 374, -503, 393, 395, 397, 411, - -503, 466, 471, -503, -503, -503, -503, 399, -503, -503, - -503, 400, 401, -503, -503, -503, 402, -503, 206, -503, - 1766, 1820, 1820, -503, -503, -503, -503, 403, 1995, 1941, - 1820, 1820, 1699, 1627, -503, 34, -503, 233, -503, -503, - -503, -503, 405, 412, -503, 413, -503, 354, 406, 418, - 421, -503, -503, 1820, 429, 430, -503, 1186, -503, -503, - 419, 422, 1627, 1820, 1699, 1699, -503, 447, -503, -503, - 1555, -503, -503, -503, -503, 423, 497, -503, -503, 1995, - 1699, 432, -503, 1699, -503 -}; - - /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE does not specify something else to do. Zero - means the default is an error. */ -static const yytype_uint16 yydefact[] = -{ - 40, 0, 0, 2, 42, 41, 20, 13, 17, 19, - 18, 15, 16, 14, 38, 31, 0, 37, 0, 28, - 30, 29, 0, 1, 44, 32, 0, 46, 0, 0, - 72, 43, 47, 48, 34, 35, 33, 36, 0, 60, - 61, 62, 58, 57, 56, 59, 66, 63, 64, 65, - 53, 45, 73, 54, 0, 51, 0, 125, 52, 0, - 49, 55, 0, 0, 79, 0, 0, 68, 0, 0, - 0, 0, 126, 0, 24, 74, 23, 25, 76, 75, - 72, 0, 70, 69, 67, 123, 127, 130, 124, 0, - 50, 0, 59, 78, 84, 0, 80, 81, 85, 86, - 0, 82, 83, 71, 72, 128, 77, 72, 114, 38, - 0, 11, 12, 21, 22, 23, 28, 101, 96, 97, - 113, 129, 134, 0, 138, 0, 136, 131, 132, 133, - 0, 226, 226, 0, 0, 0, 350, 216, 0, 0, - 63, 243, 0, 0, 0, 5, 6, 9, 4, 10, - 8, 7, 0, 0, 0, 182, 242, 3, 0, 22, - 333, 30, 73, 155, 0, 170, 0, 72, 151, 153, - 0, 154, 159, 171, 160, 172, 0, 161, 162, 173, - 163, 174, 164, 181, 175, 176, 177, 179, 178, 180, - 277, 240, 245, 241, 246, 247, 248, 0, 189, 190, - 187, 188, 186, 0, 0, 0, 101, 92, 0, 88, - 90, 101, 0, 26, 27, 72, 0, 0, 102, 98, - 135, 140, 139, 137, 0, 0, 0, 0, 0, 37, - 0, 278, 245, 247, 291, 280, 281, 298, 284, 285, - 288, 294, 302, 305, 309, 315, 318, 320, 322, 324, - 326, 328, 330, 348, 331, 0, 227, 0, 0, 0, - 0, 213, 0, 0, 217, 0, 0, 0, 0, 0, - 234, 0, 278, 246, 248, 290, 0, 289, 92, 158, - 0, 0, 0, 252, 0, 0, 148, 152, 156, 185, - 0, 0, 283, 282, 345, 346, 338, 336, 343, 344, - 342, 341, 339, 347, 340, 337, 0, 37, 24, 0, - 72, 0, 100, 0, 87, 0, 0, 99, 265, 0, - 0, 0, 106, 107, 111, 110, 119, 115, 141, 293, - 287, 37, 278, 0, 286, 292, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 223, 225, - 228, 0, 0, 219, 221, 0, 214, 218, 0, 229, - 268, 0, 0, 269, 230, 0, 0, 232, 236, 0, - 244, 279, 0, 351, 0, 253, 254, 183, 157, 270, - 267, 0, 332, 0, 260, 262, 0, 260, 0, 252, - 0, 104, 89, 93, 143, 91, 95, 94, 266, 0, - 117, 72, 0, 72, 116, 0, 26, 27, 244, 300, - 301, 299, 304, 303, 307, 308, 306, 314, 311, 313, - 310, 312, 316, 317, 319, 321, 323, 325, 327, 0, - 0, 0, 216, 0, 0, 252, 0, 0, 252, 72, - 0, 233, 237, 0, 275, 271, 0, 252, 276, 0, - 256, 263, 261, 258, 257, 259, 0, 103, 146, 0, - 144, 109, 108, 112, 0, 243, 120, 0, 0, 0, - 296, 0, 224, 0, 0, 222, 0, 0, 0, 30, - 193, 0, 159, 166, 167, 168, 169, 0, 200, 196, - 231, 0, 0, 239, 207, 255, 0, 264, 250, 142, - 145, 252, 252, 118, 295, 297, 329, 0, 211, 213, - 0, 0, 0, 0, 273, 198, 274, 0, 272, 251, - 249, 147, 0, 0, 209, 0, 212, 220, 0, 0, - 0, 184, 194, 0, 0, 0, 201, 72, 203, 238, - 0, 0, 0, 216, 0, 0, 349, 0, 206, 197, - 202, 204, 122, 121, 210, 0, 0, 208, 205, 211, - 0, 0, 195, 0, 215 -}; - - /* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = -{ - -503, -503, -503, -503, -85, 2, 181, -41, -198, -45, - -87, -1, 431, 14, -503, -503, -503, -503, -503, -503, - -503, -503, -503, -503, 448, -81, -47, -503, 7, -23, - -503, 462, -503, -64, -503, -503, -503, 425, -146, 217, - 123, -391, -503, 427, -101, 424, 230, -503, -360, -503, - -503, -503, -503, -503, -503, -503, -503, -503, -503, 439, - -503, -503, -503, -503, -503, -503, -503, -503, -110, -503, - -503, -77, 138, -12, -163, -503, -250, -13, -421, -414, - -503, -503, -503, -503, -252, -503, -503, -503, -503, -503, - -503, -503, -503, -503, 5, -503, -503, -503, -503, -16, - 36, -503, -418, -503, -503, -502, -503, -503, 440, -503, - -503, -503, -503, -503, -503, -503, 179, -503, -503, -503, - -54, -503, -341, -503, -503, -149, 255, -136, 102, 652, - 101, 688, 145, 157, 201, -98, 289, 338, -384, -503, - -59, -58, -92, -57, 213, 226, 218, 223, 227, -503, - 95, 274, 350, -503, -503, 660, -503, -503 -}; - - /* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int16 yydefgoto[] = -{ - -1, 2, 156, 157, 158, 229, 112, 113, 75, 78, - 230, 231, 19, 20, 21, 22, 3, 4, 24, 30, - 5, 31, 32, 33, 51, 52, 53, 54, 163, 164, - 65, 66, 79, 67, 80, 96, 97, 98, 208, 209, - 210, 405, 99, 100, 217, 206, 321, 322, 323, 218, - 325, 119, 101, 102, 117, 327, 413, 476, 57, 58, - 71, 72, 88, 104, 127, 128, 129, 222, 406, 469, - 470, 165, 166, 167, 168, 169, 170, 171, 491, 172, - 173, 174, 493, 175, 176, 177, 178, 494, 179, 499, - 545, 525, 546, 547, 548, 180, 495, 181, 182, 535, - 365, 496, 263, 366, 536, 367, 183, 184, 257, 185, - 186, 187, 188, 189, 376, 377, 378, 451, 190, 191, - 232, 530, 384, 385, 193, 415, 394, 395, 214, 194, - 233, 196, 234, 235, 236, 237, 238, 239, 240, 241, - 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, - 252, 253, 254, 203, 306, 386, 557, 204 -}; - - /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule whose - number is the opposite. If YYTABLE_NINF, syntax error. */ -static const yytype_int16 yytable[] = -{ - 18, 82, 83, 17, 287, 61, 309, 56, 114, 364, - 110, 363, 279, 468, 34, 108, 537, 103, 324, 107, - 159, 74, 77, 120, 484, 86, 162, 68, 38, 77, - 492, 17, 34, 383, 480, 357, 114, 55, 110, 34, - 36, 313, 543, 69, 105, 35, 106, 544, 77, 62, - 77, 472, 118, 192, 275, 63, 277, 95, 466, 29, - 15, 76, 76, 35, 17, 17, 270, 537, 212, 76, - 35, 358, 17, 36, 16, 114, 314, 285, 15, 192, - 159, 123, 84, 85, 344, 15, 162, 55, 76, 502, - 76, 17, 16, 17, 115, 515, -260, 111, 265, 16, - 64, 541, 212, 63, 497, 312, 160, 501, 492, 111, - 317, 122, -37, 192, 355, 61, 506, 511, 356, 531, - 260, 161, 115, 205, 207, 111, 329, 330, 26, 334, - 335, 73, 319, 566, 567, 565, 345, 346, -192, 388, - 492, 492, 336, 347, 348, 256, 256, 161, 64, 572, - 59, 272, 574, 272, -191, 319, 492, 27, 281, 492, - -261, 115, -192, 308, 111, 337, 160, 39, 282, 111, - 532, 533, 278, -192, 159, 74, 338, 216, -191, 60, - 362, 161, 40, 479, 212, 268, 15, 283, 315, -191, - 1, 485, 320, 41, 26, 311, 42, 43, 44, 316, - 16, 92, 46, 76, 512, 47, 307, 192, 195, 48, - 292, 339, 49, 213, 473, 76, 319, 389, 17, -280, - 293, 340, 404, 272, 272, 332, 272, 272, 331, -280, - 192, 93, 15, 114, 195, 409, 23, -281, 419, 420, - 421, 375, 341, 25, 342, 460, 16, -281, 464, 343, - 28, -235, 197, 428, 429, 430, 431, 114, 461, 37, - 160, 461, 70, 111, 198, 50, 364, 364, 195, 363, - 349, 387, 350, -39, 64, 114, 39, 285, 197, 370, - 422, 423, 373, 424, 425, 426, 463, 320, 465, 87, - 198, 40, 432, 433, 89, 90, 36, 26, 161, 278, - 91, 107, 41, 215, 390, 42, 43, 44, 199, 216, - 45, 46, 197, 265, 47, 61, 219, 364, 48, 115, - 220, 49, 111, 221, 198, 223, 159, 278, 261, 262, - 266, 213, 162, 267, 199, 272, 272, 272, 272, 272, - 272, 272, 272, 115, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 268, 280, 271, 284, 192, - 68, 115, 195, 286, 111, 288, 290, 291, 199, 289, - 500, 74, 310, 503, 50, 318, 326, 319, 328, 212, - 514, 351, 352, 354, 353, 195, 359, 360, 320, 192, - 192, 361, 369, 374, 375, 313, 200, 287, 381, 192, - 380, 393, 399, 410, 401, 403, 197, 408, 414, 396, - 398, 76, 160, 411, 17, 111, 418, 272, 198, 412, - 443, 441, 200, 278, 444, 446, 320, 161, 442, 197, - 447, 490, 159, 416, 417, 450, 445, 454, 362, 448, - 504, 198, 449, 456, 529, 201, 453, 455, 481, 457, - 549, 458, 467, 478, 498, 507, 200, 202, 489, 508, - 159, 482, 199, 509, 192, 192, 162, 161, 192, 192, - 510, 201, 315, 159, 513, 518, 522, 272, 272, 162, - 272, 517, 523, 202, 519, 199, 520, -165, 521, 524, - 526, 527, 528, 192, 558, 550, 462, 559, 192, 462, - 192, 192, 551, 552, 534, 201, 192, 553, 554, 387, - 542, 555, 568, 570, 195, 192, 192, 202, 160, 192, - 562, 111, 573, 563, 569, 427, 116, 81, 94, 124, - 402, 125, 471, -23, 211, 560, 489, 161, 281, 564, - 400, 490, 504, 126, 195, 195, 160, -23, 282, 111, - 200, 477, 561, 571, 195, 538, 452, 542, 197, 160, - 564, 161, 111, 397, 434, -278, 161, 283, 489, 489, - 198, 436, 258, 200, 161, -278, 516, 437, 435, 0, - 392, 0, 438, 0, 489, 0, 0, 489, 197, 197, - 0, 0, 0, 0, 0, 0, 0, 0, 197, 201, - 198, 198, 0, 0, 0, -333, 0, 281, 0, -333, - 198, 202, 0, 0, 199, -333, 0, 282, -333, 195, - 195, 0, 201, 195, 195, -333, 0, -333, -333, 0, - 0, 0, 0, -333, 202, 0, 283, 0, -333, 0, - -333, 0, 0, -333, 199, 199, 0, 0, 195, -333, - 0, 0, 0, 195, 199, 195, 195, 0, 0, 0, - 0, 195, 0, 197, 197, 0, 0, 197, 197, 0, - 195, 195, 0, 0, 195, 198, 198, 0, 0, 198, - 198, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 197, 0, 0, 0, 0, 197, 0, 197, - 197, 0, 200, 0, 198, 197, 0, 0, 0, 198, - 0, 198, 198, 0, 197, 197, 0, 198, 197, 199, - 199, 0, 0, 199, 199, 0, 198, 198, 0, 0, - 198, 0, 200, 200, 0, 0, 0, 0, 0, 0, - 0, 0, 200, 0, 6, 0, 7, 0, 199, 8, - 68, 201, 0, 199, 9, 199, 199, 0, 0, 10, - 0, 199, 0, 202, 0, 11, 69, 12, 0, 0, - 199, 199, 0, 0, 199, 13, 0, 0, 0, 0, - 0, 201, 201, 0, 0, 0, 109, 0, 0, 0, - 255, 201, 0, 202, 202, 0, 15, 264, 0, 0, - 0, 0, 269, 202, 273, 0, 273, 200, 200, 0, - 16, 200, 200, 276, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 200, 0, 0, 0, - 274, 200, 274, 200, 200, 0, 0, 0, 0, 200, - 0, 0, 0, 0, 0, 0, 201, 201, 200, 200, - 201, 201, 200, 0, 0, 0, 0, 0, 202, 202, - 0, 0, 202, 202, 0, 0, 273, 273, 0, 273, - 273, 0, 0, 0, 0, 201, 333, 0, 0, 0, - 201, 0, 201, 201, 0, 0, 0, 202, 201, 0, - 0, 0, 202, 0, 202, 202, 0, 201, 201, 0, - 202, 201, 274, 274, 0, 274, 274, 0, 0, 202, - 202, 0, 368, 202, 39, 0, 371, 372, 0, 0, - 0, 379, 0, 0, 0, 0, 0, 0, 0, 40, - 0, 382, 0, 0, 0, 0, 0, 0, 0, 0, - 41, 391, 0, 42, 43, 44, 0, 0, 45, 46, - 0, 0, 47, 0, 0, 0, 48, 0, 0, 49, - 0, 0, 0, 0, 0, 0, 407, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 273, 273, - 273, 273, 273, 273, 273, 273, 0, 273, 273, 273, - 273, 273, 273, 273, 273, 273, 273, 273, 0, 0, - 0, -105, 0, 0, 0, 0, 439, 440, 0, 0, - 0, 0, 0, 0, 274, 274, 274, 274, 274, 274, - 274, 274, 0, 274, 274, 274, 274, 274, 274, 274, - 274, 274, 274, 274, 6, 0, 7, 0, 0, 8, - 0, 0, 0, 459, 9, 0, 0, 0, 0, 10, - 0, 0, 0, 0, 407, 11, 0, 12, 0, 0, - 273, 0, 0, 0, 0, 13, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, - 6, 0, 7, 0, 0, 8, 15, 0, 0, 0, - 9, 483, 264, 0, 0, 10, 274, 0, 0, 0, - 16, 11, 0, 12, 0, 136, 505, 0, 0, 39, - 0, 13, 0, 0, 138, 0, 0, 141, 0, 0, - 273, 273, 14, 273, 40, 145, 146, 147, 148, 149, - 150, 151, 15, 0, 0, 41, 318, 0, 42, 43, - 44, 0, 0, 45, 46, 0, 16, 47, 0, 0, - 224, 48, 0, 0, 49, 0, 274, 274, 0, 274, - 407, 0, 225, 0, 152, 0, 226, 0, 0, 0, - 539, 540, 227, 121, 154, 0, 0, 228, 0, 39, - 130, 6, 131, 7, 543, 0, 8, 0, 132, 544, - 133, 9, 0, 556, 40, 0, 10, 134, 135, 0, - 0, 0, 11, 264, 12, 41, 136, 0, 42, 43, - 44, 137, 13, 45, 46, 138, 139, 140, 141, 142, - 0, 48, 143, 14, 49, 144, 145, 146, 147, 148, - 149, 150, 151, 15, 0, 0, 0, 0, 0, 0, - 0, 0, 0, -199, 107, 0, 0, 16, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 152, 0, 153, 0, 39, - 130, 6, 131, 7, 0, 154, 8, 155, 132, 0, - 133, 9, 0, 0, 40, 0, 10, 134, 135, 0, - 0, 0, 11, 0, 12, 41, 136, 0, 42, 43, - 44, 137, 13, 45, 46, 138, 139, 140, 141, 142, - 0, 48, 143, 14, 49, 144, 145, 146, 147, 148, - 149, 150, 151, 15, 0, 0, 0, 0, 0, 0, - 0, 0, 0, -149, 107, 0, 0, 16, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 152, 0, 153, 0, 39, - 130, 6, 131, 7, 0, 154, 8, 155, 132, 0, - 133, 9, 0, 0, 40, 0, 10, 134, 135, 0, - 0, 0, 11, 0, 12, 41, 136, 0, 42, 43, - 44, 137, 13, 45, 46, 138, 139, 140, 141, 142, - 0, 48, 143, 14, 49, 144, 145, 146, 147, 148, - 149, 150, 151, 15, 0, 0, 0, 0, 0, 0, - 0, 0, 0, -150, 107, 0, 0, 16, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 152, 0, 153, 0, 39, - 130, 6, 131, 7, 0, 154, 8, 155, 132, 0, - 133, 9, 0, 0, 40, 0, 10, 134, 135, 0, - 0, 0, 11, 0, 12, 41, 136, 0, 42, 43, - 44, 137, 13, 45, 46, 474, 139, 140, 475, 142, - 0, 48, 143, 14, 49, 144, 145, 146, 147, 148, - 149, 150, 151, 15, 0, 0, 0, 0, 0, 0, - 0, 0, 0, -149, 107, 0, 0, 16, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 152, 0, 153, 0, 0, - 0, 0, 0, 0, 0, 154, 0, 155, 39, 130, - 6, 131, 7, 0, 0, 8, -72, 132, 0, 133, - 9, 0, 0, 40, 0, 10, 134, 135, 0, 0, - 0, 11, 0, 12, 41, 136, 0, 42, 43, 44, - 137, 13, 45, 46, 138, 139, 140, 141, 142, 0, - 48, 143, 14, 49, 144, 145, 146, 147, 148, 149, - 150, 151, 15, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 107, 0, 0, 16, 0, 0, 0, - 0, 130, 6, 131, 7, 0, 0, 8, 0, 132, - 0, 133, 9, 0, 152, 0, 153, 10, 134, 135, - 0, 0, 0, 11, 154, 12, 155, 136, 0, 0, - 0, 0, 137, 13, 0, 0, 138, 139, 259, 141, - 142, 0, 0, 143, 14, 0, 144, 145, 146, 147, - 148, 149, 150, 151, 15, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 107, 0, 0, 16, 0, - 0, 0, 0, 130, 6, 131, 7, 0, 0, 8, - 0, 132, 0, 133, 9, 0, 152, 0, 153, 10, - 486, 487, 0, 0, 0, 11, 154, 12, 155, 136, - 0, 0, 0, 0, 137, 13, 0, 0, 138, 139, - 259, 141, 142, 0, 0, 143, 14, 0, 488, 145, - 146, 147, 148, 149, 150, 151, 15, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 107, 0, 0, - 16, 6, 0, 7, 0, 0, 8, 0, 0, 0, - 0, 9, 0, 0, 0, 0, 10, 0, 152, 0, - 153, 0, 11, 0, 12, 0, 136, 0, 154, 0, - 155, 0, 13, 0, 0, 138, 0, 0, 141, 0, - 0, 0, 0, 14, 0, 0, 145, 146, 147, 148, - 149, 150, 151, 15, 0, 6, 0, 7, 0, 0, - 8, 0, 0, 0, 404, 9, 0, 16, 0, 0, - 10, 224, 0, 0, 0, 0, 11, 0, 12, 0, - 136, 0, 0, 225, 0, 152, 13, 226, 0, 138, - 0, 0, 141, 227, 0, 154, 0, 14, 228, 0, - 145, 146, 147, 148, 149, 150, 151, 15, 0, 6, - 0, 7, 0, 0, 8, 0, 0, 0, 0, 9, - 0, 16, 0, 0, 10, 224, 0, 0, 0, 0, - 11, 0, 12, 0, 136, 0, 0, 225, 0, 152, - 13, 226, 0, 138, 0, 0, 141, 227, 0, 154, - 0, 14, 228, 0, 145, 146, 147, 148, 149, 150, - 151, 15, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 39, 16, 6, 0, 7, 224, - 0, 8, 0, 0, 0, 0, 9, 0, 0, 40, - 0, 10, 0, 0, 0, 226, 0, 11, 0, 12, - 41, 136, 0, 42, 43, 44, 228, 13, 45, 46, - 138, 0, 47, 141, 0, 0, 48, 0, 14, 49, - 0, 145, 146, 147, 148, 149, 150, 151, 15, 0, - 6, 0, 7, 0, 0, 8, 0, 0, 0, 0, - 9, 0, 16, 0, 0, 10, 0, 0, 0, 0, - 0, 11, 0, 12, 0, 136, 0, 0, 0, 0, - 152, 13, 153, 0, 138, 0, 0, 141, 0, 0, - 154, 0, 14, 0, 0, 145, 146, 147, 148, 149, - 150, 151, 15, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, - 39, 0, 6, 0, 7, 0, 0, 8, 0, 0, - 0, 0, 9, 0, 152, 40, 153, 10, 0, 0, - 0, 39, 0, 11, 154, 12, 41, 0, 0, 42, - 43, 44, 0, 13, 45, 46, 40, 0, 47, 0, - 0, 0, 48, 0, 14, 49, 0, 41, 0, 0, - 42, 43, 44, 0, 15, 45, 46, 0, 0, 47, - -334, 0, 0, 48, -334, 0, 49, 0, 16, 0, - -334, 0, 0, -334, -335, 0, 0, 0, -335, 0, - -334, 0, -334, -334, -335, 0, 0, -335, -334, 0, - 0, 0, 0, -334, -335, -334, -335, -335, -334, 0, - 0, 294, -335, 0, -334, 295, 0, -335, 0, -335, - 0, 296, -335, 0, 297, 0, 0, 0, -335, 0, - 0, 298, 0, 299, 300, 0, 0, 0, 0, 301, - 0, 0, 0, 0, 302, 0, 303, 0, 0, 304, - 0, 0, 0, 0, 0, 305 -}; - -static const yytype_int16 yycheck[] = -{ - 1, 65, 66, 1, 167, 52, 204, 30, 95, 261, - 95, 261, 158, 404, 11, 92, 518, 81, 216, 68, - 107, 62, 63, 100, 442, 70, 107, 11, 29, 70, - 444, 29, 11, 30, 418, 65, 123, 30, 123, 11, - 26, 66, 8, 27, 89, 42, 91, 13, 89, 17, - 91, 411, 101, 107, 152, 23, 154, 80, 399, 24, - 57, 62, 63, 42, 62, 63, 143, 569, 62, 70, - 42, 101, 70, 59, 71, 162, 101, 162, 57, 133, - 167, 104, 68, 69, 25, 57, 167, 80, 89, 449, - 91, 89, 71, 91, 95, 479, 90, 95, 72, 71, - 68, 522, 62, 23, 445, 206, 107, 448, 522, 107, - 211, 104, 72, 167, 96, 162, 457, 91, 100, 510, - 133, 107, 123, 109, 110, 123, 224, 225, 72, 227, - 228, 103, 62, 554, 555, 553, 77, 78, 66, 285, - 554, 555, 69, 84, 85, 131, 132, 133, 68, 570, - 72, 152, 573, 154, 66, 62, 570, 101, 62, 573, - 90, 162, 90, 204, 162, 92, 167, 3, 72, 167, - 511, 512, 158, 101, 261, 216, 103, 44, 90, 101, - 261, 167, 18, 90, 62, 72, 57, 91, 62, 101, - 31, 443, 215, 29, 72, 62, 32, 33, 34, 73, - 71, 37, 38, 204, 91, 41, 204, 261, 107, 45, - 89, 87, 48, 111, 412, 216, 62, 42, 216, 89, - 99, 97, 68, 224, 225, 226, 227, 228, 226, 99, - 284, 67, 57, 320, 133, 320, 0, 89, 336, 337, - 338, 9, 79, 57, 81, 394, 71, 99, 397, 86, - 72, 19, 107, 345, 346, 347, 348, 344, 394, 11, - 261, 397, 17, 261, 107, 101, 518, 519, 167, 519, - 74, 284, 76, 0, 68, 362, 3, 362, 133, 265, - 339, 340, 268, 341, 342, 343, 396, 310, 398, 68, - 133, 18, 349, 350, 66, 101, 282, 72, 284, 285, - 66, 68, 29, 91, 290, 32, 33, 34, 107, 44, - 37, 38, 167, 72, 41, 362, 101, 569, 45, 320, - 101, 48, 320, 101, 167, 101, 413, 313, 91, 91, - 91, 229, 413, 91, 133, 336, 337, 338, 339, 340, - 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, - 351, 352, 353, 354, 355, 72, 72, 91, 65, 413, - 11, 362, 261, 67, 362, 101, 72, 62, 167, 101, - 447, 412, 91, 450, 101, 61, 68, 62, 101, 62, - 478, 58, 63, 59, 94, 284, 101, 101, 411, 443, - 444, 49, 101, 101, 9, 66, 107, 560, 11, 453, - 90, 62, 91, 90, 61, 61, 261, 61, 101, 307, - 308, 412, 413, 66, 412, 413, 90, 418, 261, 66, - 66, 91, 133, 409, 90, 90, 449, 413, 101, 284, - 90, 444, 519, 331, 332, 19, 91, 61, 519, 91, - 453, 284, 91, 66, 508, 107, 90, 90, 65, 91, - 527, 61, 90, 90, 68, 61, 167, 107, 444, 90, - 547, 101, 261, 67, 518, 519, 547, 453, 522, 523, - 66, 133, 62, 560, 67, 101, 65, 478, 479, 560, - 481, 90, 16, 133, 91, 284, 91, 16, 91, 90, - 90, 90, 90, 547, 65, 90, 394, 67, 552, 397, - 554, 555, 90, 90, 101, 167, 560, 101, 90, 522, - 523, 90, 65, 16, 413, 569, 570, 167, 519, 573, - 101, 519, 90, 101, 101, 344, 95, 65, 80, 104, - 313, 104, 409, 57, 110, 547, 522, 523, 62, 552, - 310, 554, 555, 104, 443, 444, 547, 71, 72, 547, - 261, 413, 547, 569, 453, 519, 377, 570, 413, 560, - 573, 547, 560, 308, 351, 89, 552, 91, 554, 555, - 413, 353, 132, 284, 560, 99, 481, 354, 352, -1, - 306, -1, 355, -1, 570, -1, -1, 573, 443, 444, - -1, -1, -1, -1, -1, -1, -1, -1, 453, 261, - 443, 444, -1, -1, -1, 60, -1, 62, -1, 64, - 453, 261, -1, -1, 413, 70, -1, 72, 73, 518, - 519, -1, 284, 522, 523, 80, -1, 82, 83, -1, - -1, -1, -1, 88, 284, -1, 91, -1, 93, -1, - 95, -1, -1, 98, 443, 444, -1, -1, 547, 104, - -1, -1, -1, 552, 453, 554, 555, -1, -1, -1, - -1, 560, -1, 518, 519, -1, -1, 522, 523, -1, - 569, 570, -1, -1, 573, 518, 519, -1, -1, 522, - 523, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 547, -1, -1, -1, -1, 552, -1, 554, - 555, -1, 413, -1, 547, 560, -1, -1, -1, 552, - -1, 554, 555, -1, 569, 570, -1, 560, 573, 518, - 519, -1, -1, 522, 523, -1, 569, 570, -1, -1, - 573, -1, 443, 444, -1, -1, -1, -1, -1, -1, - -1, -1, 453, -1, 5, -1, 7, -1, 547, 10, - 11, 413, -1, 552, 15, 554, 555, -1, -1, 20, - -1, 560, -1, 413, -1, 26, 27, 28, -1, -1, - 569, 570, -1, -1, 573, 36, -1, -1, -1, -1, - -1, 443, 444, -1, -1, -1, 47, -1, -1, -1, - 130, 453, -1, 443, 444, -1, 57, 137, -1, -1, - -1, -1, 142, 453, 152, -1, 154, 518, 519, -1, - 71, 522, 523, 153, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 547, -1, -1, -1, - 152, 552, 154, 554, 555, -1, -1, -1, -1, 560, - -1, -1, -1, -1, -1, -1, 518, 519, 569, 570, - 522, 523, 573, -1, -1, -1, -1, -1, 518, 519, - -1, -1, 522, 523, -1, -1, 224, 225, -1, 227, - 228, -1, -1, -1, -1, 547, 226, -1, -1, -1, - 552, -1, 554, 555, -1, -1, -1, 547, 560, -1, - -1, -1, 552, -1, 554, 555, -1, 569, 570, -1, - 560, 573, 224, 225, -1, 227, 228, -1, -1, 569, - 570, -1, 262, 573, 3, -1, 266, 267, -1, -1, - -1, 271, -1, -1, -1, -1, -1, -1, -1, 18, - -1, 281, -1, -1, -1, -1, -1, -1, -1, -1, - 29, 291, -1, 32, 33, 34, -1, -1, 37, 38, - -1, -1, 41, -1, -1, -1, 45, -1, -1, 48, - -1, -1, -1, -1, -1, -1, 316, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 336, 337, - 338, 339, 340, 341, 342, 343, -1, 345, 346, 347, - 348, 349, 350, 351, 352, 353, 354, 355, -1, -1, - -1, 90, -1, -1, -1, -1, 356, 357, -1, -1, - -1, -1, -1, -1, 336, 337, 338, 339, 340, 341, - 342, 343, -1, 345, 346, 347, 348, 349, 350, 351, - 352, 353, 354, 355, 5, -1, 7, -1, -1, 10, - -1, -1, -1, 393, 15, -1, -1, -1, -1, 20, - -1, -1, -1, -1, 404, 26, -1, 28, -1, -1, - 418, -1, -1, -1, -1, 36, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 47, -1, -1, -1, - 5, -1, 7, -1, -1, 10, 57, -1, -1, -1, - 15, 441, 442, -1, -1, 20, 418, -1, -1, -1, - 71, 26, -1, 28, -1, 30, 456, -1, -1, 3, - -1, 36, -1, -1, 39, -1, -1, 42, -1, -1, - 478, 479, 47, 481, 18, 50, 51, 52, 53, 54, - 55, 56, 57, -1, -1, 29, 61, -1, 32, 33, - 34, -1, -1, 37, 38, -1, 71, 41, -1, -1, - 75, 45, -1, -1, 48, -1, 478, 479, -1, 481, - 510, -1, 87, -1, 89, -1, 91, -1, -1, -1, - 520, 521, 97, 67, 99, -1, -1, 102, -1, 3, - 4, 5, 6, 7, 8, -1, 10, -1, 12, 13, - 14, 15, -1, 543, 18, -1, 20, 21, 22, -1, - -1, -1, 26, 553, 28, 29, 30, -1, 32, 33, - 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, - -1, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 67, 68, -1, -1, 71, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 89, -1, 91, -1, 3, - 4, 5, 6, 7, -1, 99, 10, 101, 12, -1, - 14, 15, -1, -1, 18, -1, 20, 21, 22, -1, - -1, -1, 26, -1, 28, 29, 30, -1, 32, 33, - 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, - -1, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 67, 68, -1, -1, 71, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 89, -1, 91, -1, 3, - 4, 5, 6, 7, -1, 99, 10, 101, 12, -1, - 14, 15, -1, -1, 18, -1, 20, 21, 22, -1, - -1, -1, 26, -1, 28, 29, 30, -1, 32, 33, - 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, - -1, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 67, 68, -1, -1, 71, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 89, -1, 91, -1, 3, - 4, 5, 6, 7, -1, 99, 10, 101, 12, -1, - 14, 15, -1, -1, 18, -1, 20, 21, 22, -1, - -1, -1, 26, -1, 28, 29, 30, -1, 32, 33, - 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, - -1, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 67, 68, -1, -1, 71, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 89, -1, 91, -1, -1, - -1, -1, -1, -1, -1, 99, -1, 101, 3, 4, - 5, 6, 7, -1, -1, 10, 11, 12, -1, 14, - 15, -1, -1, 18, -1, 20, 21, 22, -1, -1, - -1, 26, -1, 28, 29, 30, -1, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, -1, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 68, -1, -1, 71, -1, -1, -1, - -1, 4, 5, 6, 7, -1, -1, 10, -1, 12, - -1, 14, 15, -1, 89, -1, 91, 20, 21, 22, - -1, -1, -1, 26, 99, 28, 101, 30, -1, -1, - -1, -1, 35, 36, -1, -1, 39, 40, 41, 42, - 43, -1, -1, 46, 47, -1, 49, 50, 51, 52, - 53, 54, 55, 56, 57, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 68, -1, -1, 71, -1, - -1, -1, -1, 4, 5, 6, 7, -1, -1, 10, - -1, 12, -1, 14, 15, -1, 89, -1, 91, 20, - 21, 22, -1, -1, -1, 26, 99, 28, 101, 30, - -1, -1, -1, -1, 35, 36, -1, -1, 39, 40, - 41, 42, 43, -1, -1, 46, 47, -1, 49, 50, - 51, 52, 53, 54, 55, 56, 57, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 68, -1, -1, - 71, 5, -1, 7, -1, -1, 10, -1, -1, -1, - -1, 15, -1, -1, -1, -1, 20, -1, 89, -1, - 91, -1, 26, -1, 28, -1, 30, -1, 99, -1, - 101, -1, 36, -1, -1, 39, -1, -1, 42, -1, - -1, -1, -1, 47, -1, -1, 50, 51, 52, 53, - 54, 55, 56, 57, -1, 5, -1, 7, -1, -1, - 10, -1, -1, -1, 68, 15, -1, 71, -1, -1, - 20, 75, -1, -1, -1, -1, 26, -1, 28, -1, - 30, -1, -1, 87, -1, 89, 36, 91, -1, 39, - -1, -1, 42, 97, -1, 99, -1, 47, 102, -1, - 50, 51, 52, 53, 54, 55, 56, 57, -1, 5, - -1, 7, -1, -1, 10, -1, -1, -1, -1, 15, - -1, 71, -1, -1, 20, 75, -1, -1, -1, -1, - 26, -1, 28, -1, 30, -1, -1, 87, -1, 89, - 36, 91, -1, 39, -1, -1, 42, 97, -1, 99, - -1, 47, 102, -1, 50, 51, 52, 53, 54, 55, - 56, 57, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 3, 71, 5, -1, 7, 75, - -1, 10, -1, -1, -1, -1, 15, -1, -1, 18, - -1, 20, -1, -1, -1, 91, -1, 26, -1, 28, - 29, 30, -1, 32, 33, 34, 102, 36, 37, 38, - 39, -1, 41, 42, -1, -1, 45, -1, 47, 48, - -1, 50, 51, 52, 53, 54, 55, 56, 57, -1, - 5, -1, 7, -1, -1, 10, -1, -1, -1, -1, - 15, -1, 71, -1, -1, 20, -1, -1, -1, -1, - -1, 26, -1, 28, -1, 30, -1, -1, -1, -1, - 89, 36, 91, -1, 39, -1, -1, 42, -1, -1, - 99, -1, 47, -1, -1, 50, 51, 52, 53, 54, - 55, 56, 57, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 71, -1, -1, -1, - 3, -1, 5, -1, 7, -1, -1, 10, -1, -1, - -1, -1, 15, -1, 89, 18, 91, 20, -1, -1, - -1, 3, -1, 26, 99, 28, 29, -1, -1, 32, - 33, 34, -1, 36, 37, 38, 18, -1, 41, -1, - -1, -1, 45, -1, 47, 48, -1, 29, -1, -1, - 32, 33, 34, -1, 57, 37, 38, -1, -1, 41, - 60, -1, -1, 45, 64, -1, 48, -1, 71, -1, - 70, -1, -1, 73, 60, -1, -1, -1, 64, -1, - 80, -1, 82, 83, 70, -1, -1, 73, 88, -1, - -1, -1, -1, 93, 80, 95, 82, 83, 98, -1, - -1, 60, 88, -1, 104, 64, -1, 93, -1, 95, - -1, 70, 98, -1, 73, -1, -1, -1, 104, -1, - -1, 80, -1, 82, 83, -1, -1, -1, -1, 88, - -1, -1, -1, -1, 93, -1, 95, -1, -1, 98, - -1, -1, -1, -1, -1, 104 -}; - - /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -static const yytype_uint16 yystos[] = -{ - 0, 31, 107, 122, 123, 126, 5, 7, 10, 15, - 20, 26, 28, 36, 47, 57, 71, 111, 117, 118, - 119, 120, 121, 0, 124, 57, 72, 101, 72, 24, - 125, 127, 128, 129, 11, 42, 119, 11, 117, 3, - 18, 29, 32, 33, 34, 37, 38, 41, 45, 48, - 101, 130, 131, 132, 133, 134, 135, 164, 165, 72, - 101, 132, 17, 23, 68, 136, 137, 139, 11, 27, - 17, 166, 167, 103, 113, 114, 117, 113, 115, 138, - 140, 137, 139, 139, 119, 119, 115, 68, 168, 66, - 101, 66, 37, 67, 130, 135, 141, 142, 143, 148, - 149, 158, 159, 139, 169, 115, 115, 68, 177, 47, - 110, 111, 112, 113, 116, 117, 118, 160, 101, 157, - 177, 67, 134, 135, 143, 149, 165, 170, 171, 172, - 4, 6, 12, 14, 21, 22, 30, 35, 39, 40, - 41, 42, 43, 46, 49, 50, 51, 52, 53, 54, - 55, 56, 89, 91, 99, 101, 108, 109, 110, 116, - 117, 119, 131, 134, 135, 177, 178, 179, 180, 181, - 182, 183, 185, 186, 187, 189, 190, 191, 192, 194, - 201, 203, 204, 212, 213, 215, 216, 217, 218, 219, - 224, 225, 226, 230, 235, 236, 237, 238, 239, 240, - 242, 243, 258, 259, 263, 119, 151, 119, 144, 145, - 146, 151, 62, 234, 234, 91, 44, 150, 155, 101, - 101, 101, 173, 101, 75, 87, 91, 97, 102, 111, - 116, 117, 226, 236, 238, 239, 240, 241, 242, 243, - 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, - 254, 255, 256, 257, 258, 261, 119, 214, 214, 41, - 183, 91, 91, 208, 261, 72, 91, 91, 72, 261, - 177, 91, 117, 235, 237, 241, 261, 241, 119, 144, - 72, 62, 72, 91, 65, 110, 67, 180, 101, 101, - 72, 62, 89, 99, 60, 64, 70, 73, 80, 82, - 83, 88, 93, 95, 98, 104, 260, 111, 113, 114, - 91, 62, 150, 66, 101, 62, 73, 150, 61, 62, - 135, 152, 153, 154, 114, 156, 68, 161, 101, 241, - 241, 111, 117, 261, 241, 241, 69, 92, 103, 87, - 97, 79, 81, 86, 25, 77, 78, 84, 85, 74, - 76, 58, 63, 94, 59, 96, 100, 65, 101, 101, - 101, 49, 131, 182, 190, 206, 209, 211, 261, 101, - 119, 261, 261, 119, 101, 9, 220, 221, 222, 261, - 90, 11, 261, 30, 228, 229, 261, 183, 144, 42, - 119, 261, 257, 62, 232, 233, 234, 232, 234, 91, - 152, 61, 145, 61, 68, 147, 174, 261, 61, 110, - 90, 66, 66, 162, 101, 231, 234, 234, 90, 241, - 241, 241, 246, 246, 247, 247, 247, 112, 248, 248, - 248, 248, 249, 249, 250, 251, 252, 253, 254, 261, - 261, 91, 101, 66, 90, 91, 90, 90, 91, 91, - 19, 223, 222, 90, 61, 90, 66, 91, 61, 261, - 231, 233, 234, 174, 231, 174, 228, 90, 147, 175, - 176, 146, 154, 114, 39, 42, 163, 178, 90, 90, - 244, 65, 101, 261, 208, 190, 21, 22, 49, 119, - 183, 184, 185, 188, 193, 202, 207, 228, 68, 195, - 177, 228, 154, 177, 183, 261, 228, 61, 90, 67, - 66, 91, 91, 67, 241, 244, 256, 90, 101, 91, - 91, 91, 65, 16, 90, 197, 90, 90, 90, 139, - 227, 147, 228, 228, 101, 205, 210, 211, 206, 261, - 261, 184, 183, 8, 13, 196, 198, 199, 200, 177, - 90, 90, 90, 101, 90, 90, 261, 262, 65, 67, - 179, 200, 101, 101, 183, 208, 184, 184, 65, 101, - 16, 205, 184, 90, 184 -}; - - /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint16 yyr1[] = -{ - 0, 106, 107, 108, 108, 108, 108, 108, 108, 109, - 109, 110, 110, 111, 111, 111, 111, 111, 111, 111, - 111, 112, 112, 113, 114, 115, 116, 116, 117, 117, - 118, 119, 119, 120, 120, 120, 120, 121, 121, 122, - 123, 123, 124, 124, 125, 125, 126, 127, 127, 128, - 129, 130, 130, 130, 131, 131, 132, 132, 132, 132, - 132, 132, 132, 132, 132, 132, 132, 133, 134, 134, - 134, 134, 135, 135, 136, 137, 138, 138, 139, 140, - 140, 141, 141, 141, 141, 142, 142, 143, 144, 144, - 145, 145, 146, 146, 147, 147, 148, 148, 148, 149, - 149, 150, 150, 151, 151, 152, 152, 153, 153, 154, - 155, 156, 156, 157, 158, 159, 159, 160, 161, 162, - 162, 163, 163, 164, 165, 166, 166, 167, 167, 168, - 169, 169, 170, 170, 170, 170, 170, 170, 171, 172, - 173, 173, 174, 175, 175, 175, 176, 176, 177, 178, - 178, 179, 179, 180, 180, 180, 181, 182, 182, 183, - 183, 183, 183, 183, 183, 184, 184, 184, 184, 184, - 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, - 185, 185, 186, 187, 188, 189, 190, 190, 190, 190, - 190, 190, 190, 191, 192, 193, 194, 195, 196, 196, - 197, 197, 198, 199, 199, 200, 200, 201, 202, 203, - 204, 205, 205, 206, 206, 207, 208, 208, 209, 209, - 210, 211, 211, 212, 212, 213, 214, 214, 215, 216, - 217, 218, 219, 219, 220, 220, 221, 221, 222, 223, - 224, 224, 225, 225, 225, 225, 225, 225, 225, 226, - 227, 227, 228, 228, 229, 229, 230, 230, 230, 230, - 231, 231, 232, 232, 233, 234, 234, 235, 235, 235, - 235, 236, 236, 236, 236, 237, 237, 238, 238, 238, - 238, 238, 239, 240, 241, 241, 241, 241, 241, 242, - 243, 244, 244, 244, 244, 245, 245, 245, 246, 246, - 246, 246, 247, 247, 247, 248, 248, 248, 248, 249, - 249, 249, 249, 249, 249, 250, 250, 250, 251, 251, - 252, 252, 253, 253, 254, 254, 255, 255, 256, 256, - 257, 257, 258, 259, 259, 259, 260, 260, 260, 260, - 260, 260, 260, 260, 260, 260, 260, 260, 261, 262, - 263, 263 -}; - - /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = -{ - 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, - 1, 1, 2, 3, 3, 3, 3, 1, 1, 3, - 0, 1, 0, 2, 0, 2, 3, 1, 1, 3, - 5, 1, 1, 1, 1, 2, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 3, 2, 3, - 3, 4, 0, 1, 2, 2, 1, 3, 3, 0, - 2, 1, 1, 1, 1, 1, 1, 4, 1, 3, - 1, 3, 1, 3, 1, 1, 2, 2, 3, 4, - 4, 0, 1, 4, 3, 0, 1, 1, 3, 3, - 2, 1, 3, 1, 2, 4, 5, 4, 4, 0, - 2, 5, 5, 3, 3, 0, 1, 2, 3, 3, - 0, 2, 1, 1, 1, 2, 1, 2, 1, 2, - 1, 2, 3, 0, 1, 2, 1, 3, 3, 0, - 1, 1, 2, 1, 1, 1, 2, 3, 2, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 3, 3, 2, 1, 1, 1, 1, - 1, 1, 1, 5, 7, 7, 5, 4, 0, 1, - 0, 2, 2, 1, 2, 3, 2, 5, 5, 7, - 9, 0, 1, 0, 1, 9, 0, 1, 1, 1, - 1, 1, 3, 3, 5, 3, 0, 1, 3, 3, - 3, 5, 3, 4, 0, 1, 1, 2, 5, 2, - 1, 1, 1, 1, 3, 1, 1, 1, 1, 6, - 0, 1, 0, 1, 1, 3, 4, 4, 4, 4, - 0, 1, 1, 2, 3, 2, 3, 3, 3, 3, - 3, 4, 6, 6, 6, 4, 4, 1, 1, 3, - 1, 1, 2, 2, 1, 1, 2, 2, 1, 2, - 2, 1, 2, 2, 1, 5, 4, 5, 1, 3, - 3, 3, 1, 3, 3, 1, 3, 3, 3, 1, - 3, 3, 3, 3, 3, 1, 3, 3, 1, 3, - 1, 3, 1, 3, 1, 3, 1, 3, 1, 5, - 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 3 -}; - - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab - - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK (yylen); \ - yystate = *yyssp; \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (yyscanner, YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (0) - -/* Error token number */ -#define YYTERROR 1 -#define YYERRCODE 256 - - - -/* Enable debugging if requested. */ -#if YYDEBUG - -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (0) - -/* This macro is provided for backward compatibility. */ -#ifndef YY_LOCATION_PRINT -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -#endif - - -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value, yyscanner); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (0) - - -/*----------------------------------------. -| Print this symbol's value on YYOUTPUT. | -`----------------------------------------*/ - -static void -yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, yyscan_t yyscanner) -{ - FILE *yyo = yyoutput; - YYUSE (yyo); - YYUSE (yyscanner); - if (!yyvaluep) - return; -# ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# endif - YYUSE (yytype); -} - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -static void -yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, yyscan_t yyscanner) -{ - YYFPRINTF (yyoutput, "%s %s (", - yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); - - yy_symbol_value_print (yyoutput, yytype, yyvaluep, yyscanner); - YYFPRINTF (yyoutput, ")"); -} - -/*------------------------------------------------------------------. -| yy_stack_print -- Print the state stack from its BOTTOM up to its | -| TOP (included). | -`------------------------------------------------------------------*/ - -static void -yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) -{ - YYFPRINTF (stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) - { - int yybot = *yybottom; - YYFPRINTF (stderr, " %d", yybot); - } - YYFPRINTF (stderr, "\n"); -} - -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (0) - - -/*------------------------------------------------. -| Report that the YYRULE is going to be reduced. | -`------------------------------------------------*/ - -static void -yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule, yyscan_t yyscanner) -{ - unsigned long int yylno = yyrline[yyrule]; - int yynrhs = yyr2[yyrule]; - int yyi; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); - /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) - { - YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, - yystos[yyssp[yyi + 1 - yynrhs]], - &(yyvsp[(yyi + 1) - (yynrhs)]) - , yyscanner); - YYFPRINTF (stderr, "\n"); - } -} - -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyssp, yyvsp, Rule, yyscanner); \ -} while (0) - -/* Nonzero means print parse trace. It is left uninitialized so that - multiple parsers can coexist. */ -int yydebug; -#else /* !YYDEBUG */ -# define YYDPRINTF(Args) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) -# define YY_STACK_PRINT(Bottom, Top) -# define YY_REDUCE_PRINT(Rule) -#endif /* !YYDEBUG */ - - -/* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH -# define YYINITDEPTH 200 -#endif - -/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only - if the built-in stack extension method is used). - - Do not make this value too large; the results are undefined if - YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) - evaluated with infinite-precision integer arithmetic. */ - -#ifndef YYMAXDEPTH -# define YYMAXDEPTH 10000 -#endif - - -#if YYERROR_VERBOSE - -# ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen strlen -# else -/* Return the length of YYSTR. */ -static YYSIZE_T -yystrlen (const char *yystr) -{ - YYSIZE_T yylen; - for (yylen = 0; yystr[yylen]; yylen++) - continue; - return yylen; -} -# endif -# endif - -# ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ -static char * -yystpcpy (char *yydest, const char *yysrc) -{ - char *yyd = yydest; - const char *yys = yysrc; - - while ((*yyd++ = *yys++) != '\0') - continue; - - return yyd - 1; -} -# endif -# endif - -# ifndef yytnamerr -/* Copy to YYRES the contents of YYSTR after stripping away unnecessary - quotes and backslashes, so that it's suitable for yyerror. The - heuristic is that double-quoting is unnecessary unless the string - contains an apostrophe, a comma, or backslash (other than - backslash-backslash). YYSTR is taken from yytname. If YYRES is - null, do not copy; instead, return the length of what the result - would have been. */ -static YYSIZE_T -yytnamerr (char *yyres, const char *yystr) -{ - if (*yystr == '"') - { - YYSIZE_T yyn = 0; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } - - if (! yyres) - return yystrlen (yystr); - - return yystpcpy (yyres, yystr) - yyres; -} -# endif - -/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message - about the unexpected token YYTOKEN for the state stack whose top is - YYSSP. - - Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is - not large enough to hold the message. In that case, also set - *YYMSG_ALLOC to the required number of bytes. Return 2 if the - required number of bytes is too large to store. */ -static int -yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, - yytype_int16 *yyssp, int yytoken) -{ - YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); - YYSIZE_T yysize = yysize0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - /* Internationalized format string. */ - const char *yyformat = YY_NULLPTR; - /* Arguments of yyformat. */ - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - /* Number of reported tokens (one for the "unexpected", one per - "expected"). */ - int yycount = 0; - - /* There are many possibilities here to consider: - - If this state is a consistent state with a default action, then - the only way this function was invoked is if the default action - is an error action. In that case, don't check for expected - tokens because there are none. - - The only way there can be no lookahead present (in yychar) is if - this state is a consistent state with a default action. Thus, - detecting the absence of a lookahead is sufficient to determine - that there is no unexpected or expected token to report. In that - case, just report a simple "syntax error". - - Don't assume there isn't a lookahead just because this state is a - consistent state with a default action. There might have been a - previous inconsistent state, consistent state with a non-default - action, or user semantic action that manipulated yychar. - - Of course, the expected token list depends on states to have - correct lookahead information, and it depends on the parser not - to perform extra reductions after fetching a lookahead from the - scanner and before detecting a syntax error. Thus, state merging - (from LALR or IELR) and default reductions corrupt the expected - token list. However, the list is correct for canonical LR with - one exception: it will still contain any token that will not be - accepted due to an error action in a later state. - */ - if (yytoken != YYEMPTY) - { - int yyn = yypact[*yyssp]; - yyarg[yycount++] = yytname[yytoken]; - if (!yypact_value_is_default (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR - && !yytable_value_is_error (yytable[yyx + yyn])) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - break; - } - yyarg[yycount++] = yytname[yyx]; - { - YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); - if (! (yysize <= yysize1 - && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } - } - } - } - - switch (yycount) - { -# define YYCASE_(N, S) \ - case N: \ - yyformat = S; \ - break - YYCASE_(0, YY_("syntax error")); - YYCASE_(1, YY_("syntax error, unexpected %s")); - YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); - YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); - YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); - YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); -# undef YYCASE_ - } - - { - YYSIZE_T yysize1 = yysize + yystrlen (yyformat); - if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } - - if (*yymsg_alloc < yysize) - { - *yymsg_alloc = 2 * yysize; - if (! (yysize <= *yymsg_alloc - && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return 1; - } - - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - { - char *yyp = *yymsg; - int yyi = 0; - while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyformat += 2; - } - else - { - yyp++; - yyformat++; - } - } - return 0; -} -#endif /* YYERROR_VERBOSE */ - -/*-----------------------------------------------. -| Release the memory associated to this symbol. | -`-----------------------------------------------*/ - -static void -yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, yyscan_t yyscanner) -{ - YYUSE (yyvaluep); - YYUSE (yyscanner); - if (!yymsg) - yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YYUSE (yytype); - YY_IGNORE_MAYBE_UNINITIALIZED_END -} - - - - -/*----------. -| yyparse. | -`----------*/ - -int -yyparse (yyscan_t yyscanner) -{ -/* The lookahead symbol. */ -int yychar; - - -/* The semantic value of the lookahead symbol. */ -/* Default value used for initialization, for pacifying older GCCs - or non-GCC compilers. */ -YY_INITIAL_VALUE (static YYSTYPE yyval_default;) -YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); - - /* Number of syntax errors so far. */ - int yynerrs; - - int yystate; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - - /* The stacks and their tools: - 'yyss': related to states. - 'yyvs': related to semantic values. - - Refer to the stacks through separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss; - yytype_int16 *yyssp; - - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs; - YYSTYPE *yyvsp; - - YYSIZE_T yystacksize; - - int yyn; - int yyresult; - /* Lookahead token as an internal (translated) token number. */ - int yytoken = 0; - /* The variables used to return semantic value and location from the - action routines. */ - YYSTYPE yyval; - -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif - -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) - - /* The number of symbols on the RHS of the reduced rule. - Keep to zero when no symbol should be popped. */ - int yylen = 0; - - yyssp = yyss = yyssa; - yyvsp = yyvs = yyvsa; - yystacksize = YYINITDEPTH; - - YYDPRINTF ((stderr, "Starting parse\n")); - - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ - goto yysetstate; - -/*------------------------------------------------------------. -| yynewstate -- Push a new state, which is found in yystate. | -`------------------------------------------------------------*/ - yynewstate: - /* In all cases, when you get here, the value and location stacks - have just been pushed. So pushing a state here evens the stacks. */ - yyssp++; - - yysetstate: - *yyssp = yystate; - - if (yyss + yystacksize - 1 <= yyssp) - { - /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = yyssp - yyss + 1; - -#ifdef yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yystacksize); - - yyss = yyss1; - yyvs = yyvs1; - } -#else /* no yyoverflow */ -# ifndef YYSTACK_RELOCATE - goto yyexhaustedlab; -# else - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); -# undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); - } -# endif -#endif /* no yyoverflow */ - - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); - - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } - - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - - if (yystate == YYFINAL) - YYACCEPT; - - goto yybackup; - -/*-----------. -| yybackup. | -`-----------*/ -yybackup: - - /* Do appropriate processing given the current state. Read a - lookahead token if we need one and don't already have one. */ - - /* First try to decide what to do without reference to lookahead token. */ - yyn = yypact[yystate]; - if (yypact_value_is_default (yyn)) - goto yydefault; - - /* Not known => get a lookahead token if don't already have one. */ - - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ - if (yychar == YYEMPTY) - { - YYDPRINTF ((stderr, "Reading a token: ")); - yychar = yylex (&yylval, yyscanner); - } - - if (yychar <= YYEOF) - { - yychar = yytoken = YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); - } - else - { - yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); - } - - /* If the proper action on seeing token YYTOKEN is to reduce or to - detect an error, take that action. */ - yyn += yytoken; - if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) - goto yydefault; - yyn = yytable[yyn]; - if (yyn <= 0) - { - if (yytable_value_is_error (yyn)) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } - - /* Count tokens shifted since error; after three, turn off error - status. */ - if (yyerrstatus) - yyerrstatus--; - - /* Shift the lookahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - - /* Discard the shifted token. */ - yychar = YYEMPTY; - - yystate = yyn; - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - *++yyvsp = yylval; - YY_IGNORE_MAYBE_UNINITIALIZED_END - - goto yynewstate; - - -/*-----------------------------------------------------------. -| yydefault -- do the default action for the current state. | -`-----------------------------------------------------------*/ -yydefault: - yyn = yydefact[yystate]; - if (yyn == 0) - goto yyerrlab; - goto yyreduce; - - -/*-----------------------------. -| yyreduce -- Do a reduction. | -`-----------------------------*/ -yyreduce: - /* yyn is the number of a rule to reduce with. */ - yylen = yyr2[yyn]; - - /* If YYLEN is nonzero, implement the default value of the action: - '$$ = $1'. - - Otherwise, the following line sets YYVAL to garbage. - This behavior is undocumented and Bison - users should not rely upon it. Assigning to YYVAL - unconditionally makes the parser a bit smaller, and it avoids a - GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1-yylen]; - - - YY_REDUCE_PRINT (yyn); - switch (yyn) - { - case 2: -#line 180 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 2293 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 3: -#line 189 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 2304 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 4: -#line 197 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 2315 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 5: -#line 205 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 2326 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 6: -#line 213 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 2337 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 7: -#line 221 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 2348 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 8: -#line 229 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 2359 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 9: -#line 238 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 2370 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 10: -#line 246 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 2381 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 11: -#line 255 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 2392 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 12: -#line 263 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 2403 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 13: -#line 272 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(0); -} -#line 2411 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 14: -#line 277 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(0); -} -#line 2419 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 15: -#line 282 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(0); -} -#line 2427 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 16: -#line 287 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(0); -} -#line 2435 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 17: -#line 292 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(0); -} -#line 2443 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 18: -#line 297 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(0); -} -#line 2451 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 19: -#line 302 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(0); -} -#line 2459 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 20: -#line 307 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(0); -} -#line 2467 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 21: -#line 313 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 2478 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 22: -#line 321 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 2489 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 23: -#line 330 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpStoreClass((yyvsp[0].str)); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 2501 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 24: -#line 340 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 2512 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 25: -#line 349 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 2523 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 26: -#line 358 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(2); - jpCheckEmpty(2); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 2534 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 27: -#line 366 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(2); - jpStoreClass((yyvsp[-1].str)); - jpCheckEmpty(2); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 2546 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 28: -#line 376 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - (yyval.str) = (yyvsp[0].str); -} -#line 2555 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 29: -#line 382 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - (yyval.str) = (yyvsp[0].str); -} -#line 2564 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 30: -#line 389 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - (yyval.str) = (yyvsp[0].str); -} -#line 2573 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 31: -#line 396 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - (yyval.str) = (yyvsp[0].str); -} -#line 2582 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 32: -#line 402 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(2); - (yyval.str) = (yyvsp[0].str); -} -#line 2591 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 33: -#line 409 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - yyGetParser->AddClassFound((yyvsp[-2].str)); - yyGetParser->UpdateCombine((yyvsp[-2].str), (yyvsp[0].str)); - yyGetParser->DeallocateParserType(&((yyvsp[-2].str))); - (yyval.str) = const_cast(yyGetParser->GetCurrentCombine()); -} -#line 2603 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 34: -#line 418 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - jpStoreClass((yyvsp[-2].str)); - jpCheckEmpty(3); - yyGetParser->SetCurrentCombine(""); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 2616 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 35: -#line 428 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - jpStoreClass((yyvsp[-2].str)); - yyGetParser->SetCurrentCombine(""); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 2629 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 36: -#line 438 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 2640 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 37: -#line 447 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 2651 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 38: -#line 455 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 2662 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 39: -#line 464 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 2673 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 40: -#line 472 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(0); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 2683 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 41: -#line 479 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 2694 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 42: -#line 487 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(0); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 2704 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 43: -#line 494 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(2); - jpCheckEmpty(2); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 2715 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 44: -#line 502 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(0); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 2725 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 45: -#line 509 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(2); - jpCheckEmpty(2); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 2736 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 46: -#line 518 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - yyGetParser->SetCurrentPackage((yyvsp[-1].str)); - yyGetParser->DeallocateParserType(&((yyvsp[-1].str))); - yyGetParser->SetCurrentCombine(""); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 2750 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 47: -#line 530 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 2761 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 48: -#line 538 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 2772 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 49: -#line 547 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - yyGetParser->AddPackagesImport((yyvsp[-1].str)); - yyGetParser->DeallocateParserType(&((yyvsp[-1].str))); - yyGetParser->SetCurrentCombine(""); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 2786 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 50: -#line 559 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(5); - std::string str = (yyvsp[-3].str); - str += ".*"; - yyGetParser->AddPackagesImport(str.c_str()); - yyGetParser->DeallocateParserType(&((yyvsp[-3].str))); - yyGetParser->SetCurrentCombine(""); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 2801 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 51: -#line 572 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 2812 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 52: -#line 580 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 2823 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 53: -#line 588 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 2834 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 54: -#line 597 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 2845 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 55: -#line 605 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(2); - jpCheckEmpty(2); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 2856 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 67: -#line 620 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - yyGetParser->StartClass((yyvsp[0].str)); - jpElementStart(3); - yyGetParser->DeallocateParserType(&((yyvsp[0].str))); - jpCheckEmpty(3); -} -#line 2867 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 68: -#line 630 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(2); - jpCheckEmpty(2); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - yyGetParser->EndClass(); -} -#line 2879 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 69: -#line 639 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - jpCheckEmpty(2); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - yyGetParser->EndClass(); -} -#line 2891 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 70: -#line 648 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - yyGetParser->EndClass(); -} -#line 2903 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 71: -#line 657 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(4); - jpCheckEmpty(4); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - yyGetParser->EndClass(); -} -#line 2915 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 72: -#line 666 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(0); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 2925 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 73: -#line 673 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 2936 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 74: -#line 682 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(2); - jpCheckEmpty(2); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 2947 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 75: -#line 691 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(2); - jpCheckEmpty(2); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 2958 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 76: -#line 700 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 2969 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 77: -#line 708 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 2980 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 78: -#line 717 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 2991 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 79: -#line 725 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 3001 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 80: -#line 732 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(2); - jpCheckEmpty(2); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 3012 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 81: -#line 741 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 3023 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 82: -#line 749 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 3034 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 83: -#line 757 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 3045 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 84: -#line 765 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 3056 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 85: -#line 774 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 3067 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 86: -#line 782 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 3078 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 87: -#line 791 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(4); -} -#line 3086 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 88: -#line 797 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 3097 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 89: -#line 805 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 3108 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 90: -#line 814 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 3119 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 91: -#line 822 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 3130 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 92: -#line 831 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - yyGetParser->DeallocateParserType(&((yyvsp[0].str))); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 3142 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 93: -#line 840 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 3153 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 94: -#line 849 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 3164 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 95: -#line 857 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 3175 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 96: -#line 866 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(2); - jpCheckEmpty(2); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 3186 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 97: -#line 874 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(2); - jpCheckEmpty(2); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 3197 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 98: -#line 882 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 3208 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 99: -#line 891 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(4); - jpCheckEmpty(4); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3220 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 100: -#line 900 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(4); - jpCheckEmpty(4); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3232 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 101: -#line 909 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(0); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3243 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 102: -#line 917 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3255 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 103: -#line 927 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(4); - yyGetParser->DeallocateParserType(&((yyvsp[-3].str))); - jpCheckEmpty(4); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3268 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 104: -#line 937 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - -} -#line 3277 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 105: -#line 943 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(0); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3288 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 107: -#line 954 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - -} -#line 3297 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 108: -#line 960 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3309 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 109: -#line 970 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3321 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 110: -#line 980 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(2); - jpCheckEmpty(2); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3333 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 111: -#line 990 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - -} -#line 3342 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 112: -#line 996 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3354 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 113: -#line 1006 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3366 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 114: -#line 1016 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(2); - jpCheckEmpty(2); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3378 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 115: -#line 1026 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(4); - jpCheckEmpty(4); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3390 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 116: -#line 1035 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(5); - jpCheckEmpty(5); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3402 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 117: -#line 1045 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(4); - yyGetParser->DeallocateParserType(&((yyvsp[-3].str))); - jpCheckEmpty(4); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3415 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 118: -#line 1056 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(4); - jpCheckEmpty(4); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3427 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 119: -#line 1065 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(0); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3438 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 120: -#line 1073 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(2); - jpCheckEmpty(2); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3450 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 121: -#line 1083 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(5); - jpCheckEmpty(5); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3462 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 122: -#line 1092 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(5); - jpCheckEmpty(5); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3474 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 123: -#line 1102 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - yyGetParser->StartClass((yyvsp[0].str)); - jpElementStart(3); - yyGetParser->DeallocateParserType(&((yyvsp[0].str))); - jpCheckEmpty(3); -} -#line 3485 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 124: -#line 1111 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(2); - jpCheckEmpty(2); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - yyGetParser->EndClass(); -} -#line 3497 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 125: -#line 1120 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(0); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); -} -#line 3507 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 126: -#line 1127 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3519 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 127: -#line 1137 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(2); - jpCheckEmpty(2); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3531 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 128: -#line 1146 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3543 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 129: -#line 1156 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3555 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 130: -#line 1165 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(0); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3566 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 131: -#line 1173 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(2); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3577 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 132: -#line 1182 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3589 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 133: -#line 1191 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3601 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 134: -#line 1200 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3613 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 135: -#line 1209 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(2); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3624 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 136: -#line 1217 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3636 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 137: -#line 1226 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(2); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3647 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 138: -#line 1235 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3659 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 139: -#line 1245 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(2); - jpCheckEmpty(2); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3671 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 140: -#line 1255 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3683 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 141: -#line 1264 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(2); - jpCheckEmpty(2); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3695 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 142: -#line 1274 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3707 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 143: -#line 1283 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3718 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 144: -#line 1291 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3730 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 145: -#line 1300 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(2); - jpCheckEmpty(2); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3742 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 146: -#line 1310 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3754 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 147: -#line 1319 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3766 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 148: -#line 1329 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(4); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3777 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 149: -#line 1337 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3788 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 150: -#line 1345 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3800 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 151: -#line 1355 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3812 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 152: -#line 1364 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(2); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3824 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 153: -#line 1374 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3836 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 154: -#line 1383 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3848 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 155: -#line 1392 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3860 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 156: -#line 1402 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(2); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3872 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 157: -#line 1412 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3884 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 158: -#line 1421 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(2); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3896 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 159: -#line 1431 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3908 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 160: -#line 1440 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3920 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 161: -#line 1449 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3932 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 162: -#line 1458 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3944 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 163: -#line 1467 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3956 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 164: -#line 1476 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3968 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 165: -#line 1486 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3980 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 166: -#line 1495 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 3992 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 167: -#line 1504 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4004 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 168: -#line 1513 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4016 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 169: -#line 1522 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4028 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 170: -#line 1532 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4040 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 171: -#line 1541 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4052 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 172: -#line 1550 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4064 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 173: -#line 1559 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4076 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 174: -#line 1568 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4088 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 175: -#line 1577 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4100 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 176: -#line 1586 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4112 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 177: -#line 1595 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4124 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 178: -#line 1604 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4136 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 179: -#line 1613 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4148 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 180: -#line 1622 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4160 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 181: -#line 1631 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4172 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 182: -#line 1641 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4184 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 183: -#line 1651 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - yyGetParser->DeallocateParserType(&((yyvsp[-2].str))); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4197 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 184: -#line 1662 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4209 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 185: -#line 1672 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(2); - jpCheckEmpty(2); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4221 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 186: -#line 1682 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4233 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 187: -#line 1691 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4245 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 188: -#line 1700 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4257 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 189: -#line 1709 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4269 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 190: -#line 1718 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4281 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 191: -#line 1727 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4293 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 192: -#line 1736 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4305 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 193: -#line 1746 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(5); - jpCheckEmpty(5); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4317 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 194: -#line 1756 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(7); - jpCheckEmpty(7); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4329 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 195: -#line 1766 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(7); - jpCheckEmpty(7); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4341 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 196: -#line 1776 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(5); - -} -#line 4350 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 197: -#line 1783 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(4); - -} -#line 4359 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 198: -#line 1789 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(0); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4370 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 199: -#line 1797 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4382 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 200: -#line 1806 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(0); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4393 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 201: -#line 1814 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(2); - jpCheckEmpty(2); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4405 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 202: -#line 1824 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(2); - jpCheckEmpty(2); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4417 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 203: -#line 1834 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4429 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 204: -#line 1843 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(2); - jpCheckEmpty(2); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4441 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 205: -#line 1853 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4453 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 206: -#line 1862 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(2); - jpCheckEmpty(2); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4465 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 207: -#line 1872 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(5); - -} -#line 4474 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 208: -#line 1879 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(5); - -} -#line 4483 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 209: -#line 1886 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(7); - -} -#line 4492 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 210: -#line 1894 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(9); - -} -#line 4501 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 211: -#line 1900 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4512 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 212: -#line 1908 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4524 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 213: -#line 1917 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(0); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4535 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 214: -#line 1925 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4547 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 215: -#line 1936 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(9); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4558 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 216: -#line 1944 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(0); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4569 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 217: -#line 1952 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4581 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 218: -#line 1962 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4593 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 219: -#line 1971 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4605 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 220: -#line 1981 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4617 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 221: -#line 1991 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4629 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 222: -#line 2000 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4641 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 223: -#line 2010 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4653 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 224: -#line 2019 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(5); - jpCheckEmpty(5); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4665 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 225: -#line 2029 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - yyGetParser->DeallocateParserType(&((yyvsp[-1].str))); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4678 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 226: -#line 2039 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(0); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4689 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 227: -#line 2047 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - -} -#line 4698 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 228: -#line 2054 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - yyGetParser->DeallocateParserType(&((yyvsp[-1].str))); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4711 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 229: -#line 2065 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4723 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 230: -#line 2075 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4735 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 231: -#line 2085 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(5); - jpCheckEmpty(5); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4747 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 232: -#line 2095 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4759 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 233: -#line 2104 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(4); - jpCheckEmpty(4); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4771 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 234: -#line 2113 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4782 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 235: -#line 2121 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4794 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 236: -#line 2131 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4806 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 237: -#line 2140 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(2); - jpCheckEmpty(2); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4818 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 238: -#line 2150 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(5); - -} -#line 4827 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 239: -#line 2157 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(2); - jpCheckEmpty(2); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4839 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 240: -#line 2167 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4851 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 241: -#line 2176 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4863 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 242: -#line 2186 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4875 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 243: -#line 2195 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - -} -#line 4884 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 244: -#line 2201 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4896 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 245: -#line 2210 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4908 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 246: -#line 2219 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4920 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 247: -#line 2228 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4932 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 248: -#line 2237 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4944 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 249: -#line 2247 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(6); - jpCheckEmpty(6); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4956 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 250: -#line 2256 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(0); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4967 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 251: -#line 2264 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4979 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 252: -#line 2273 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(0); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 4990 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 253: -#line 2281 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5002 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 254: -#line 2291 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5014 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 255: -#line 2300 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5026 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 256: -#line 2310 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(4); - jpCheckEmpty(4); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5038 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 257: -#line 2319 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(4); - jpCheckEmpty(4); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5050 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 258: -#line 2328 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(4); - jpCheckEmpty(4); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5062 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 259: -#line 2337 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(4); - jpCheckEmpty(4); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5074 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 260: -#line 2346 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(0); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5085 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 261: -#line 2354 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5097 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 262: -#line 2364 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5109 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 263: -#line 2373 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(2); - jpCheckEmpty(2); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5121 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 264: -#line 2383 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5133 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 265: -#line 2393 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(2); - -} -#line 5142 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 266: -#line 2399 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - -} -#line 5151 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 267: -#line 2406 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - yyGetParser->DeallocateParserType(&((yyvsp[0].str))); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5164 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 268: -#line 2416 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - yyGetParser->DeallocateParserType(&((yyvsp[0].str))); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5177 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 269: -#line 2426 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - yyGetParser->DeallocateParserType(&((yyvsp[0].str))); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5190 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 270: -#line 2436 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - yyGetParser->DeallocateParserType(&((yyvsp[0].str))); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5203 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 271: -#line 2447 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(4); - yyGetParser->DeallocateParserType(&((yyvsp[-3].str))); - jpCheckEmpty(4); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5216 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 272: -#line 2457 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(6); - yyGetParser->DeallocateParserType(&((yyvsp[-5].str))); - yyGetParser->DeallocateParserType(&((yyvsp[-3].str))); - jpCheckEmpty(6); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5230 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 273: -#line 2468 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(6); - yyGetParser->DeallocateParserType(&((yyvsp[-3].str))); - jpCheckEmpty(6); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5243 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 274: -#line 2478 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(6); - yyGetParser->DeallocateParserType(&((yyvsp[-3].str))); - jpCheckEmpty(6); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5256 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 275: -#line 2489 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(4); - yyGetParser->DeallocateParserType(&((yyvsp[-3].str))); - jpCheckEmpty(4); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5269 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 276: -#line 2499 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(4); - jpCheckEmpty(4); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5281 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 277: -#line 2509 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5293 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 278: -#line 2518 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - yyGetParser->DeallocateParserType(&((yyvsp[0].str))); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5305 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 279: -#line 2527 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5317 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 280: -#line 2536 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5329 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 281: -#line 2545 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5341 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 282: -#line 2555 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(2); - jpCheckEmpty(2); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5353 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 283: -#line 2565 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(2); - jpCheckEmpty(2); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5365 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 284: -#line 2575 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5377 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 285: -#line 2584 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5389 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 286: -#line 2593 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(2); - jpCheckEmpty(2); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5401 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 287: -#line 2602 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(2); - jpCheckEmpty(2); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5413 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 288: -#line 2611 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5425 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 289: -#line 2621 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(2); - jpCheckEmpty(2); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5437 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 290: -#line 2631 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(2); - jpCheckEmpty(2); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5449 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 291: -#line 2641 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5461 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 292: -#line 2650 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(2); - jpCheckEmpty(2); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5473 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 293: -#line 2659 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(2); - jpCheckEmpty(2); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5485 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 294: -#line 2668 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5497 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 295: -#line 2678 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(5); - jpCheckEmpty(5); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5509 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 296: -#line 2687 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(4); - jpCheckEmpty(4); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5521 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 297: -#line 2696 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(5); - -} -#line 5530 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 298: -#line 2703 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5542 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 299: -#line 2712 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5554 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 300: -#line 2721 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5566 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 301: -#line 2730 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5578 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 302: -#line 2740 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5590 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 303: -#line 2749 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5602 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 304: -#line 2758 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5614 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 305: -#line 2768 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5626 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 306: -#line 2777 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5638 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 307: -#line 2786 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5650 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 308: -#line 2795 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5662 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 309: -#line 2805 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5674 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 310: -#line 2814 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5686 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 311: -#line 2823 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5698 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 312: -#line 2832 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5710 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 313: -#line 2841 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5722 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 314: -#line 2850 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5734 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 315: -#line 2860 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5746 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 316: -#line 2869 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5758 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 317: -#line 2878 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5770 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 318: -#line 2888 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5782 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 319: -#line 2897 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5794 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 320: -#line 2907 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5806 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 321: -#line 2916 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5818 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 322: -#line 2926 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5830 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 323: -#line 2935 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5842 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 324: -#line 2945 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5854 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 325: -#line 2954 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5866 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 326: -#line 2964 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5878 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 327: -#line 2973 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5890 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 328: -#line 2983 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5902 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 329: -#line 2992 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(5); - jpCheckEmpty(5); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5914 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 330: -#line 3002 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5926 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 331: -#line 3011 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5938 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 332: -#line 3021 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5950 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 333: -#line 3031 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - yyGetParser->DeallocateParserType(&((yyvsp[0].str))); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5963 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 334: -#line 3041 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5975 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 335: -#line 3050 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5987 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 336: -#line 3060 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 5999 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 337: -#line 3069 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 6011 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 338: -#line 3078 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 6023 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 339: -#line 3087 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 6035 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 340: -#line 3096 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 6047 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 341: -#line 3105 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 6059 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 342: -#line 3114 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 6071 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 343: -#line 3123 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 6083 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 344: -#line 3132 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 6095 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 345: -#line 3141 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 6107 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 346: -#line 3150 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 6119 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 347: -#line 3159 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 6131 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 348: -#line 3169 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 6143 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 349: -#line 3179 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 6155 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 350: -#line 3189 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(1); - jpCheckEmpty(1); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 6167 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - case 351: -#line 3198 "cmDependsJavaParser.y" /* yacc.c:1646 */ - { - jpElementStart(3); - jpStoreClass((yyvsp[-2].str)); - jpCheckEmpty(3); - (yyval.str) = 0; - yyGetParser->SetCurrentCombine(""); - -} -#line 6180 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - break; - - -#line 6184 "cmDependsJavaParser.cxx" /* yacc.c:1646 */ - default: break; - } - /* User semantic actions sometimes alter yychar, and that requires - that yytoken be updated with the new translation. We take the - approach of translating immediately before every use of yytoken. - One alternative is translating here after every semantic action, - but that translation would be missed if the semantic action invokes - YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or - if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an - incorrect destructor might then be invoked immediately. In the - case of YYERROR or YYBACKUP, subsequent parser actions might lead - to an incorrect destructor call or verbose syntax error message - before the lookahead is translated. */ - YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); - - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - - *++yyvsp = yyval; - - /* Now 'shift' the result of the reduction. Determine what state - that goes to, based on the state we popped back to and the rule - number reduced by. */ - - yyn = yyr1[yyn]; - - yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; - if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTOKENS]; - - goto yynewstate; - - -/*--------------------------------------. -| yyerrlab -- here on detecting error. | -`--------------------------------------*/ -yyerrlab: - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); - - /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) - { - ++yynerrs; -#if ! YYERROR_VERBOSE - yyerror (yyscanner, YY_("syntax error")); -#else -# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ - yyssp, yytoken) - { - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = YYSYNTAX_ERROR; - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == 1) - { - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); - if (!yymsg) - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = 2; - } - else - { - yysyntax_error_status = YYSYNTAX_ERROR; - yymsgp = yymsg; - } - } - yyerror (yyscanner, yymsgp); - if (yysyntax_error_status == 2) - goto yyexhaustedlab; - } -# undef YYSYNTAX_ERROR -#endif - } - - - - if (yyerrstatus == 3) - { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ - - if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } - else - { - yydestruct ("Error: discarding", - yytoken, &yylval, yyscanner); - yychar = YYEMPTY; - } - } - -#if 0 - /* Else will try to reuse lookahead token after shifting the error - token. */ - goto yyerrlab1; - - -/*---------------------------------------------------. -| yyerrorlab -- error raised explicitly by YYERROR. | -`---------------------------------------------------*/ -yyerrorlab: - - /* Pacify compilers like GCC when the user code never invokes - YYERROR and the label yyerrorlab therefore never appears in user - code. */ - if (/*CONSTCOND*/ 0) - goto yyerrorlab; - - /* Do not reclaim the symbols of the rule whose action triggered - this YYERROR. */ - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - yystate = *yyssp; - goto yyerrlab1; - - -/*-------------------------------------------------------------. -| yyerrlab1 -- common code for both syntax error and YYERROR. | -`-------------------------------------------------------------*/ -yyerrlab1: -#endif - yyerrstatus = 3; /* Each real token shifted decrements this. */ - - for (;;) - { - yyn = yypact[yystate]; - if (!yypact_value_is_default (yyn)) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } - - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; - - - yydestruct ("Error: popping", - yystos[yystate], yyvsp, yyscanner); - YYPOPSTACK (1); - yystate = *yyssp; - YY_STACK_PRINT (yyss, yyssp); - } - - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - *++yyvsp = yylval; - YY_IGNORE_MAYBE_UNINITIALIZED_END - - - /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); - - yystate = yyn; - goto yynewstate; - - -/*-------------------------------------. -| yyacceptlab -- YYACCEPT comes here. | -`-------------------------------------*/ -yyacceptlab: - yyresult = 0; - goto yyreturn; - -/*-----------------------------------. -| yyabortlab -- YYABORT comes here. | -`-----------------------------------*/ -yyabortlab: - yyresult = 1; - goto yyreturn; - -#if !defined yyoverflow || YYERROR_VERBOSE -/*-------------------------------------------------. -| yyexhaustedlab -- memory exhaustion comes here. | -`-------------------------------------------------*/ -yyexhaustedlab: - yyerror (yyscanner, YY_("memory exhausted")); - yyresult = 2; - /* Fall through. */ -#endif - -yyreturn: - if (yychar != YYEMPTY) - { - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = YYTRANSLATE (yychar); - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval, yyscanner); - } - /* Do not reclaim the symbols of the rule whose action triggered - this YYABORT or YYACCEPT. */ - YYPOPSTACK (yylen); - YY_STACK_PRINT (yyss, yyssp); - while (yyssp != yyss) - { - yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp, yyscanner); - YYPOPSTACK (1); - } -#ifndef yyoverflow - if (yyss != yyssa) - YYSTACK_FREE (yyss); -#endif -#if YYERROR_VERBOSE - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); -#endif - return yyresult; -} -#line 3207 "cmDependsJavaParser.y" /* yacc.c:1906 */ - -/* End of grammar */ - -/*--------------------------------------------------------------------------*/ -void cmDependsJava_yyerror(yyscan_t yyscanner, const char* message) -{ - yyGetParser->Error(message); -} diff --git a/Source/cmDependsJavaParser.y b/Source/cmDependsJavaParser.y deleted file mode 100644 index 1137f39..0000000 --- a/Source/cmDependsJavaParser.y +++ /dev/null @@ -1,3215 +0,0 @@ -%{ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ -/* - -This file must be translated to C and modified to build everywhere. - -Run bison like this: - - bison --yacc --name-prefix=cmDependsJava_yy --defines=cmDependsJavaParserTokens.h -ocmDependsJavaParser.cxx cmDependsJavaParser.y - -Modify cmDependsJavaParser.cxx: - - "#if 0" out yyerrorlab block in range ["goto yyerrlab1", "yyerrlab1:"] - -*/ - -#include "cmConfigure.h" // IWYU pragma: keep - -#include -#include -#include - -#define yyGetParser (cmDependsJava_yyget_extra(yyscanner)) - -/*-------------------------------------------------------------------------*/ -#include "cmDependsJavaParserHelper.h" /* Interface to parser object. */ -#include "cmDependsJavaLexer.h" /* Interface to lexer object. */ -#include "cmDependsJavaParserTokens.h" /* Need YYSTYPE for YY_DECL. */ - -/* Forward declare the lexer entry point. */ -YY_DECL; - -/* Helper function to forward error callback from parser. */ -static void cmDependsJava_yyerror(yyscan_t yyscanner, const char* message); - -#define YYMAXDEPTH 1000000 - - -#define jpCheckEmpty(cnt) yyGetParser->CheckEmpty(__LINE__, cnt, yyvsp); -#define jpElementStart(cnt) yyGetParser->PrepareElement(&yyval) -#define jpStoreClass(str) yyGetParser->AddClassFound(str); yyGetParser->DeallocateParserType(&(str)) -/* Disable some warnings in the generated code. */ -#ifdef _MSC_VER -# pragma warning (disable: 4102) /* Unused goto label. */ -# pragma warning (disable: 4065) /* Switch statement contains default but no case. */ -#endif -%} - -/* Generate a reentrant parser object. */ -%define api.pure - -/* Configure the parser to use a lexer object. */ -%lex-param {yyscan_t yyscanner} -%parse-param {yyscan_t yyscanner} - -%define parse.error verbose - -/* -%union { - char* string; -} -*/ - -/*-------------------------------------------------------------------------*/ -/* Tokens */ -%token jp_ABSTRACT -%token jp_ASSERT -%token jp_BOOLEAN_TYPE -%token jp_BREAK -%token jp_BYTE_TYPE -%token jp_CASE -%token jp_CATCH -%token jp_CHAR_TYPE -%token jp_CLASS -%token jp_CONTINUE -%token jp_DEFAULT -%token jp_DO -%token jp_DOUBLE_TYPE -%token jp_ELSE -%token jp_EXTENDS -%token jp_FINAL -%token jp_FINALLY -%token jp_FLOAT_TYPE -%token jp_FOR -%token jp_IF -%token jp_IMPLEMENTS -%token jp_IMPORT -%token jp_INSTANCEOF -%token jp_INT_TYPE -%token jp_INTERFACE -%token jp_LONG_TYPE -%token jp_NATIVE -%token jp_NEW -%token jp_PACKAGE -%token jp_PRIVATE -%token jp_PROTECTED -%token jp_PUBLIC -%token jp_RETURN -%token jp_SHORT_TYPE -%token jp_STATIC -%token jp_STRICTFP -%token jp_SUPER -%token jp_SWITCH -%token jp_SYNCHRONIZED -%token jp_THIS -%token jp_THROW -%token jp_THROWS -%token jp_TRANSIENT -%token jp_TRY -%token jp_VOID -%token jp_VOLATILE -%token jp_WHILE - -%token jp_BOOLEANLITERAL -%token jp_CHARACTERLITERAL -%token jp_DECIMALINTEGERLITERAL -%token jp_FLOATINGPOINTLITERAL -%token jp_HEXINTEGERLITERAL -%token jp_NULLLITERAL -%token jp_STRINGLITERAL - -%token jp_NAME - -%token jp_AND -%token jp_ANDAND -%token jp_ANDEQUALS -%token jp_BRACKETEND -%token jp_BRACKETSTART -%token jp_CARROT -%token jp_CARROTEQUALS -%token jp_COLON -%token jp_COMMA -%token jp_CURLYEND -%token jp_CURLYSTART -%token jp_DIVIDE -%token jp_DIVIDEEQUALS -%token jp_DOLLAR -%token jp_DOT -%token jp_EQUALS -%token jp_EQUALSEQUALS -%token jp_EXCLAMATION -%token jp_EXCLAMATIONEQUALS -%token jp_GREATER -%token jp_GTEQUALS -%token jp_GTGT -%token jp_GTGTEQUALS -%token jp_GTGTGT -%token jp_GTGTGTEQUALS -%token jp_LESLESEQUALS -%token jp_LESSTHAN -%token jp_LTEQUALS -%token jp_LTLT -%token jp_MINUS -%token jp_MINUSEQUALS -%token jp_MINUSMINUS -%token jp_PAREEND -%token jp_PARESTART -%token jp_PERCENT -%token jp_PERCENTEQUALS -%token jp_PIPE -%token jp_PIPEEQUALS -%token jp_PIPEPIPE -%token jp_PLUS -%token jp_PLUSEQUALS -%token jp_PLUSPLUS -%token jp_QUESTION -%token jp_SEMICOL -%token jp_TILDE -%token jp_TIMES -%token jp_TIMESEQUALS - -%token jp_ERROR - -/*-------------------------------------------------------------------------*/ -/* grammar */ -%% - -Goal: -CompilationUnit -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} - -Literal: -IntegerLiteral -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} -| -jp_FLOATINGPOINTLITERAL -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} -| -jp_BOOLEANLITERAL -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} -| -jp_CHARACTERLITERAL -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} -| -jp_STRINGLITERAL -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} -| -jp_NULLLITERAL -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} - -IntegerLiteral: -jp_DECIMALINTEGERLITERAL -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} -| -jp_HEXINTEGERLITERAL -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} - -Type: -PrimitiveType -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} -| -ReferenceType -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} - -PrimitiveType: -jp_BYTE_TYPE -{ - jpElementStart(0); -} -| -jp_SHORT_TYPE -{ - jpElementStart(0); -} -| -jp_INT_TYPE -{ - jpElementStart(0); -} -| -jp_LONG_TYPE -{ - jpElementStart(0); -} -| -jp_CHAR_TYPE -{ - jpElementStart(0); -} -| -jp_FLOAT_TYPE -{ - jpElementStart(0); -} -| -jp_DOUBLE_TYPE -{ - jpElementStart(0); -} -| -jp_BOOLEAN_TYPE -{ - jpElementStart(0); -} - -ReferenceType: -ClassOrInterfaceType -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} -| -ArrayType -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} - -ClassOrInterfaceType: -Name -{ - jpElementStart(1); - jpStoreClass($1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} - -ClassType: -ClassOrInterfaceType -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} - -InterfaceType: -ClassOrInterfaceType -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} - -ArrayType: -PrimitiveType Dims -{ - jpElementStart(2); - jpCheckEmpty(2); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} -| -Name Dims -{ - jpElementStart(2); - jpStoreClass($1); - jpCheckEmpty(2); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} - -Name: -SimpleName -{ - jpElementStart(1); - $$ = $1; -} -| -QualifiedName -{ - jpElementStart(1); - $$ = $1; -} - -SimpleName: -Identifier -{ - jpElementStart(1); - $$ = $1; -} - -Identifier: -jp_NAME -{ - jpElementStart(1); - $$ = $1; -} -| -jp_DOLLAR jp_NAME -{ - jpElementStart(2); - $$ = $2; -} - -QualifiedName: -Name jp_DOT Identifier -{ - jpElementStart(3); - yyGetParser->AddClassFound($1); - yyGetParser->UpdateCombine($1, $3); - yyGetParser->DeallocateParserType(&($1)); - $$ = const_cast(yyGetParser->GetCurrentCombine()); -} -| -Name jp_DOT jp_CLASS -{ - jpElementStart(3); - jpStoreClass($1); - jpCheckEmpty(3); - yyGetParser->SetCurrentCombine(""); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} -| -Name jp_DOT jp_THIS -{ - jpElementStart(3); - jpStoreClass($1); - yyGetParser->SetCurrentCombine(""); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} -| -SimpleType jp_DOT jp_CLASS -{ - jpElementStart(3); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} - -SimpleType: -PrimitiveType -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} -| -jp_VOID -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} - -CompilationUnit: -PackageDeclarationopt ImportDeclarations TypeDeclarations -{ - jpElementStart(3); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} - -PackageDeclarationopt: -{ - jpElementStart(0); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} -| -PackageDeclaration -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} - -ImportDeclarations: -{ - jpElementStart(0); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} -| -ImportDeclarations ImportDeclaration -{ - jpElementStart(2); - jpCheckEmpty(2); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} - -TypeDeclarations: -{ - jpElementStart(0); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} -| -TypeDeclarations TypeDeclaration -{ - jpElementStart(2); - jpCheckEmpty(2); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} - -PackageDeclaration: -jp_PACKAGE Name jp_SEMICOL -{ - jpElementStart(3); - yyGetParser->SetCurrentPackage($2); - yyGetParser->DeallocateParserType(&($2)); - yyGetParser->SetCurrentCombine(""); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} - -ImportDeclaration: -SingleTypeImportDeclaration -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} -| -TypeImportOnDemandDeclaration -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} - -SingleTypeImportDeclaration: -jp_IMPORT Name jp_SEMICOL -{ - jpElementStart(3); - yyGetParser->AddPackagesImport($2); - yyGetParser->DeallocateParserType(&($2)); - yyGetParser->SetCurrentCombine(""); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} - -TypeImportOnDemandDeclaration: -jp_IMPORT Name jp_DOT jp_TIMES jp_SEMICOL -{ - jpElementStart(5); - std::string str = $2; - str += ".*"; - yyGetParser->AddPackagesImport(str.c_str()); - yyGetParser->DeallocateParserType(&($2)); - yyGetParser->SetCurrentCombine(""); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} - -TypeDeclaration: -ClassDeclaration -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} -| -InterfaceDeclaration -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} -| -jp_SEMICOL -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} - -Modifiers: -Modifier -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} -| -Modifiers Modifier -{ - jpElementStart(2); - jpCheckEmpty(2); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} - -Modifier: -jp_PUBLIC | jp_PROTECTED | jp_PRIVATE | -jp_STATIC | -jp_ABSTRACT | jp_FINAL | jp_NATIVE | jp_SYNCHRONIZED | jp_TRANSIENT | jp_VOLATILE | -jp_STRICTFP - -ClassHeader: -Modifiersopt jp_CLASS Identifier -{ - yyGetParser->StartClass($3); - jpElementStart(3); - yyGetParser->DeallocateParserType(&($3)); - jpCheckEmpty(3); -} - - -ClassDeclaration: -ClassHeader ClassBody -{ - jpElementStart(2); - jpCheckEmpty(2); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - yyGetParser->EndClass(); -} -| -ClassHeader Interfaces ClassBody -{ - jpElementStart(3); - jpCheckEmpty(2); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - yyGetParser->EndClass(); -} -| -ClassHeader Super ClassBody -{ - jpElementStart(3); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - yyGetParser->EndClass(); -} -| -ClassHeader Super Interfaces ClassBody -{ - jpElementStart(4); - jpCheckEmpty(4); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - yyGetParser->EndClass(); -} - -Modifiersopt: -{ - jpElementStart(0); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} -| -Modifiers -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} - -Super: -jp_EXTENDS ClassType -{ - jpElementStart(2); - jpCheckEmpty(2); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} - -Interfaces: -jp_IMPLEMENTS InterfaceTypeList -{ - jpElementStart(2); - jpCheckEmpty(2); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} - -InterfaceTypeList: -InterfaceType -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} -| -InterfaceTypeList jp_COMMA InterfaceType -{ - jpElementStart(3); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} - -ClassBody: -jp_CURLYSTART ClassBodyDeclarations jp_CURLYEND -{ - jpElementStart(3); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} - -ClassBodyDeclarations: -{ - jpElementStart(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} -| -ClassBodyDeclarations ClassBodyDeclaration -{ - jpElementStart(2); - jpCheckEmpty(2); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} - -ClassBodyDeclaration: -ClassMemberDeclaration -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} -| -StaticInitializer -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} -| -ConstructorDeclaration -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} -| -TypeDeclaration -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} - -ClassMemberDeclaration: -FieldDeclaration -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} -| -MethodDeclaration -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} - -FieldDeclaration: -Modifiersopt Type VariableDeclarators jp_SEMICOL -{ - jpElementStart(4); -} - -VariableDeclarators: -VariableDeclarator -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} -| -VariableDeclarators jp_COMMA VariableDeclarator -{ - jpElementStart(3); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} - -VariableDeclarator: -VariableDeclaratorId -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} -| -VariableDeclaratorId jp_EQUALS VariableInitializer -{ - jpElementStart(3); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} - -VariableDeclaratorId: -Identifier -{ - jpElementStart(1); - yyGetParser->DeallocateParserType(&($1)); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} -| -VariableDeclaratorId jp_BRACKETSTART jp_BRACKETEND -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} - -VariableInitializer: -Expression -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} -| -ArrayInitializer -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} - -MethodDeclaration: -MethodHeader jp_SEMICOL -{ - jpElementStart(2); - jpCheckEmpty(2); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} -| -MethodHeader MethodBody -{ - jpElementStart(2); - jpCheckEmpty(2); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} -| -MethodHeader MethodBody jp_SEMICOL -{ - jpElementStart(3); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} - -MethodHeader: -Modifiersopt Type MethodDeclarator Throwsopt -{ - jpElementStart(4); - jpCheckEmpty(4); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -Modifiersopt jp_VOID MethodDeclarator Throwsopt -{ - jpElementStart(4); - jpCheckEmpty(4); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -Throwsopt: -{ - jpElementStart(0); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -Throws -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -MethodDeclarator: -Identifier jp_PARESTART FormalParameterListopt jp_PAREEND -{ - jpElementStart(4); - yyGetParser->DeallocateParserType(&($1)); - jpCheckEmpty(4); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -MethodDeclarator jp_BRACKETSTART jp_BRACKETEND -{ - jpElementStart(3); - -} - -FormalParameterListopt: -{ - jpElementStart(0); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -FormalParameterList - -FormalParameterList: -FormalParameter -{ - jpElementStart(1); - -} -| -FormalParameterList jp_COMMA FormalParameter -{ - jpElementStart(3); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -FormalParameter: -Modifiersopt Type VariableDeclaratorId -{ - jpElementStart(3); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -Throws: -jp_THROWS ClassTypeList -{ - jpElementStart(2); - jpCheckEmpty(2); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -ClassTypeList: -ClassType -{ - jpElementStart(1); - -} -| -ClassTypeList jp_COMMA ClassType -{ - jpElementStart(3); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -MethodBody: -Block -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -StaticInitializer: -jp_STATIC Block -{ - jpElementStart(2); - jpCheckEmpty(2); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -ConstructorDeclaration: -Modifiersopt ConstructorDeclarator Throwsopt ConstructorBody -{ - jpElementStart(4); - jpCheckEmpty(4); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -Modifiersopt ConstructorDeclarator Throwsopt ConstructorBody jp_SEMICOL -{ - jpElementStart(5); - jpCheckEmpty(5); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -ConstructorDeclarator: -SimpleName jp_PARESTART FormalParameterListopt jp_PAREEND -{ - jpElementStart(4); - yyGetParser->DeallocateParserType(&($1)); - jpCheckEmpty(4); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -ConstructorBody: -jp_CURLYSTART ExplicitConstructorInvocationopt BlockStatementsopt jp_CURLYEND -{ - jpElementStart(4); - jpCheckEmpty(4); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -ExplicitConstructorInvocationopt: -{ - jpElementStart(0); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -ExplicitConstructorInvocationopt ExplicitConstructorInvocation -{ - jpElementStart(2); - jpCheckEmpty(2); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -ExplicitConstructorInvocation: -jp_THIS jp_PARESTART ArgumentListopt jp_PAREEND jp_SEMICOL -{ - jpElementStart(5); - jpCheckEmpty(5); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -jp_SUPER jp_PARESTART ArgumentListopt jp_PAREEND jp_SEMICOL -{ - jpElementStart(5); - jpCheckEmpty(5); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -InterfaceHeader: -Modifiersopt jp_INTERFACE Identifier -{ - yyGetParser->StartClass($3); - jpElementStart(3); - yyGetParser->DeallocateParserType(&($3)); - jpCheckEmpty(3); -} - -InterfaceDeclaration: -InterfaceHeader ExtendsInterfacesopt InterfaceBody -{ - jpElementStart(2); - jpCheckEmpty(2); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - yyGetParser->EndClass(); -} - -ExtendsInterfacesopt: -{ - jpElementStart(0); - $$ = 0; - yyGetParser->SetCurrentCombine(""); -} -| -ExtendsInterfaces -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -ExtendsInterfaces: -jp_EXTENDS InterfaceType -{ - jpElementStart(2); - jpCheckEmpty(2); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -ExtendsInterfaces jp_COMMA InterfaceType -{ - jpElementStart(3); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -InterfaceBody: -jp_CURLYSTART InterfaceMemberDeclarations jp_CURLYEND -{ - jpElementStart(3); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -InterfaceMemberDeclarations: -{ - jpElementStart(0); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -InterfaceMemberDeclarations InterfaceMemberDeclaration -{ - jpElementStart(2); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -InterfaceMemberDeclaration: -ConstantDeclaration -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -AbstractMethodDeclaration -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -ClassDeclaration -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -ClassDeclaration jp_SEMICOL -{ - jpElementStart(2); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -InterfaceDeclaration -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -InterfaceDeclaration jp_SEMICOL -{ - jpElementStart(2); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -ConstantDeclaration: -FieldDeclaration -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -AbstractMethodDeclaration: -MethodHeader Semicols -{ - jpElementStart(2); - jpCheckEmpty(2); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -Semicols: -jp_SEMICOL -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -Semicols jp_SEMICOL -{ - jpElementStart(2); - jpCheckEmpty(2); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -ArrayInitializer: -jp_CURLYSTART VariableInitializersOptional jp_CURLYEND -{ - jpElementStart(3); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -VariableInitializersOptional: -{ - jpElementStart(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -VariableInitializers -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -VariableInitializers jp_COMMA -{ - jpElementStart(2); - jpCheckEmpty(2); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -VariableInitializers: -VariableInitializer -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -VariableInitializers jp_COMMA VariableInitializer -{ - jpElementStart(3); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -Block: -jp_CURLYSTART BlockStatementsopt jp_CURLYEND -{ - jpElementStart(4); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -BlockStatementsopt: -{ - jpElementStart(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -BlockStatements -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -BlockStatements: -BlockStatement -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -BlockStatements BlockStatement -{ - jpElementStart(1); - jpCheckEmpty(2); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -BlockStatement: -LocalVariableDeclarationStatement -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -Statement -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -ClassDeclaration -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -LocalVariableDeclarationStatement: -LocalVariableDeclaration jp_SEMICOL -{ - jpElementStart(1); - jpCheckEmpty(2); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -LocalVariableDeclaration: -Modifiers Type VariableDeclarators -{ - jpElementStart(1); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -Type VariableDeclarators -{ - jpElementStart(1); - jpCheckEmpty(2); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -Statement: -StatementWithoutTrailingSubstatement -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -LabeledStatement -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -IfThenStatement -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -IfThenElseStatement -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -WhileStatement -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -ForStatement -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -StatementNoShortIf: -StatementWithoutTrailingSubstatement -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -LabeledStatementNoShortIf -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -IfThenElseStatementNoShortIf -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -WhileStatementNoShortIf -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -ForStatementNoShortIf -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -StatementWithoutTrailingSubstatement: -Block -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -EmptyStatement -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -ExpressionStatement -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -SwitchStatement -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -DoStatement -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -BreakStatement -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -ContinueStatement -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -ReturnStatement -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -SynchronizedStatement -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -ThrowStatement -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -TryStatement -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -AssertStatement -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -EmptyStatement: -jp_SEMICOL -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -LabeledStatement: -Identifier jp_COLON Statement -{ - jpElementStart(3); - yyGetParser->DeallocateParserType(&($1)); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -LabeledStatementNoShortIf: -Identifier jp_COLON StatementNoShortIf -{ - jpElementStart(3); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -ExpressionStatement: -StatementExpression jp_SEMICOL -{ - jpElementStart(2); - jpCheckEmpty(2); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -StatementExpression: -Assignment -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -PreIncrementExpression -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -PreDecrementExpression -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -PostIncrementExpression -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -PostDecrementExpression -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -MethodInvocation -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -ClassInstanceCreationExpression -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -IfThenStatement: -jp_IF jp_PARESTART Expression jp_PAREEND Statement -{ - jpElementStart(5); - jpCheckEmpty(5); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -IfThenElseStatement: -jp_IF jp_PARESTART Expression jp_PAREEND StatementNoShortIf jp_ELSE Statement -{ - jpElementStart(7); - jpCheckEmpty(7); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -IfThenElseStatementNoShortIf: -jp_IF jp_PARESTART Expression jp_PAREEND StatementNoShortIf jp_ELSE StatementNoShortIf -{ - jpElementStart(7); - jpCheckEmpty(7); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -SwitchStatement: -jp_SWITCH jp_PARESTART Expression jp_PAREEND SwitchBlock -{ - jpElementStart(5); - -} - -SwitchBlock: -jp_CURLYSTART SwitchBlockStatementGroups SwitchLabelsopt jp_CURLYEND -{ - jpElementStart(4); - -} - -SwitchLabelsopt: -{ - jpElementStart(0); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -SwitchLabels -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -SwitchBlockStatementGroups: -{ - jpElementStart(0); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -SwitchBlockStatementGroups SwitchBlockStatementGroup -{ - jpElementStart(2); - jpCheckEmpty(2); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -SwitchBlockStatementGroup: -SwitchLabels BlockStatements -{ - jpElementStart(2); - jpCheckEmpty(2); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -SwitchLabels: -SwitchLabel -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -SwitchLabels SwitchLabel -{ - jpElementStart(2); - jpCheckEmpty(2); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -SwitchLabel: -jp_CASE ConstantExpression jp_COLON -{ - jpElementStart(3); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -jp_DEFAULT jp_COLON -{ - jpElementStart(2); - jpCheckEmpty(2); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -WhileStatement: -jp_WHILE jp_PARESTART Expression jp_PAREEND Statement -{ - jpElementStart(5); - -} - -WhileStatementNoShortIf: -jp_WHILE jp_PARESTART Expression jp_PAREEND StatementNoShortIf -{ - jpElementStart(5); - -} - -DoStatement: -jp_DO Statement jp_WHILE jp_PARESTART Expression jp_PAREEND jp_SEMICOL -{ - jpElementStart(7); - -} - -ForStatement: -jp_FOR jp_PARESTART ForInitopt jp_SEMICOL Expressionopt jp_SEMICOL ForUpdateopt jp_PAREEND -Statement -{ - jpElementStart(9); - -} - -ForUpdateopt: -{ - jpElementStart(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -ForUpdate -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -ForInitopt: -{ - jpElementStart(0); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -ForInit -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -ForStatementNoShortIf: -jp_FOR jp_PARESTART ForInitopt jp_SEMICOL Expressionopt jp_SEMICOL ForUpdateopt jp_PAREEND -StatementNoShortIf -{ - jpElementStart(9); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -Expressionopt: -{ - jpElementStart(0); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -Expression -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -ForInit: -StatementExpressionList -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -LocalVariableDeclaration -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -ForUpdate: -StatementExpressionList -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -StatementExpressionList: -StatementExpression -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -StatementExpressionList jp_COMMA StatementExpression -{ - jpElementStart(3); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -AssertStatement: -jp_ASSERT Expression jp_SEMICOL -{ - jpElementStart(3); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -jp_ASSERT Expression jp_COLON Expression jp_SEMICOL -{ - jpElementStart(5); - jpCheckEmpty(5); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -BreakStatement: -jp_BREAK Identifieropt jp_SEMICOL -{ - jpElementStart(3); - yyGetParser->DeallocateParserType(&($2)); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -Identifieropt: -{ - jpElementStart(0); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -Identifier -{ - jpElementStart(1); - -} - -ContinueStatement: -jp_CONTINUE Identifieropt jp_SEMICOL -{ - jpElementStart(3); - yyGetParser->DeallocateParserType(&($2)); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -ReturnStatement: -jp_RETURN Expressionopt jp_SEMICOL -{ - jpElementStart(3); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -ThrowStatement: -jp_THROW Expression jp_SEMICOL -{ - jpElementStart(3); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -SynchronizedStatement: -jp_SYNCHRONIZED jp_PARESTART Expression jp_PAREEND Block -{ - jpElementStart(5); - jpCheckEmpty(5); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -TryStatement: -jp_TRY Block Catches -{ - jpElementStart(3); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -jp_TRY Block Catchesopt Finally -{ - jpElementStart(4); - jpCheckEmpty(4); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -Catchesopt: -{ - jpElementStart(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -Catches -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -Catches: -CatchClause -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -Catches CatchClause -{ - jpElementStart(2); - jpCheckEmpty(2); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -CatchClause: -jp_CATCH jp_PARESTART FormalParameter jp_PAREEND Block -{ - jpElementStart(5); - -} - -Finally: -jp_FINALLY Block -{ - jpElementStart(2); - jpCheckEmpty(2); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -Primary: -PrimaryNoNewArray -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -ArrayCreationExpression -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -PrimaryNoNewArray: -Literal -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -jp_THIS -{ - jpElementStart(1); - -} -| -jp_PARESTART Expression jp_PAREEND -{ - jpElementStart(3); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -ClassInstanceCreationExpression -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -FieldAccess -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -MethodInvocation -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -ArrayAccess -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -ClassInstanceCreationExpression: -New ClassType jp_PARESTART ArgumentListopt jp_PAREEND ClassBodyOpt -{ - jpElementStart(6); - jpCheckEmpty(6); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -ClassBodyOpt: -{ - jpElementStart(0); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -ClassBody -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -ArgumentListopt: -{ - jpElementStart(0); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -ArgumentList -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -ArgumentList: -Expression -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -ArgumentList jp_COMMA Expression -{ - jpElementStart(3); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -ArrayCreationExpression: -New PrimitiveType DimExprs Dimsopt -{ - jpElementStart(4); - jpCheckEmpty(4); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -New ClassOrInterfaceType DimExprs Dimsopt -{ - jpElementStart(4); - jpCheckEmpty(4); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -New PrimitiveType Dims ArrayInitializer -{ - jpElementStart(4); - jpCheckEmpty(4); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -New ClassOrInterfaceType Dims ArrayInitializer -{ - jpElementStart(4); - jpCheckEmpty(4); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -Dimsopt: -{ - jpElementStart(0); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -Dims -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -DimExprs: -DimExpr -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -DimExprs DimExpr -{ - jpElementStart(2); - jpCheckEmpty(2); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -DimExpr: -jp_BRACKETSTART Expression jp_BRACKETEND -{ - jpElementStart(3); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -Dims: -jp_BRACKETSTART jp_BRACKETEND -{ - jpElementStart(2); - -} -| -Dims jp_BRACKETSTART jp_BRACKETEND -{ - jpElementStart(3); - -} - -FieldAccess: -Primary jp_DOT Identifier -{ - jpElementStart(3); - yyGetParser->DeallocateParserType(&($3)); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -jp_SUPER jp_DOT Identifier -{ - jpElementStart(3); - yyGetParser->DeallocateParserType(&($3)); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -jp_THIS jp_DOT Identifier -{ - jpElementStart(3); - yyGetParser->DeallocateParserType(&($3)); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -Primary jp_DOT jp_THIS -{ - jpElementStart(3); - yyGetParser->DeallocateParserType(&($3)); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -MethodInvocation: -Name jp_PARESTART ArgumentListopt jp_PAREEND -{ - jpElementStart(4); - yyGetParser->DeallocateParserType(&($1)); - jpCheckEmpty(4); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -Primary jp_DOT Identifier jp_PARESTART ArgumentListopt jp_PAREEND -{ - jpElementStart(6); - yyGetParser->DeallocateParserType(&($1)); - yyGetParser->DeallocateParserType(&($3)); - jpCheckEmpty(6); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -jp_SUPER jp_DOT Identifier jp_PARESTART ArgumentListopt jp_PAREEND -{ - jpElementStart(6); - yyGetParser->DeallocateParserType(&($3)); - jpCheckEmpty(6); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -jp_THIS jp_DOT Identifier jp_PARESTART ArgumentListopt jp_PAREEND -{ - jpElementStart(6); - yyGetParser->DeallocateParserType(&($3)); - jpCheckEmpty(6); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -ArrayAccess: -Name jp_BRACKETSTART Expression jp_BRACKETEND -{ - jpElementStart(4); - yyGetParser->DeallocateParserType(&($1)); - jpCheckEmpty(4); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -PrimaryNoNewArray jp_BRACKETSTART Expression jp_BRACKETEND -{ - jpElementStart(4); - jpCheckEmpty(4); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -PostfixExpression: -Primary -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -Name -{ - jpElementStart(1); - yyGetParser->DeallocateParserType(&($1)); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -ArrayType jp_DOT jp_CLASS -{ - jpElementStart(3); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -PostIncrementExpression -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -PostDecrementExpression -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -PostIncrementExpression: -PostfixExpression jp_PLUSPLUS -{ - jpElementStart(2); - jpCheckEmpty(2); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -PostDecrementExpression: -PostfixExpression jp_MINUSMINUS -{ - jpElementStart(2); - jpCheckEmpty(2); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -UnaryExpression: -PreIncrementExpression -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -PreDecrementExpression -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -jp_PLUS UnaryExpression -{ - jpElementStart(2); - jpCheckEmpty(2); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -jp_MINUS UnaryExpression -{ - jpElementStart(2); - jpCheckEmpty(2); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -UnaryExpressionNotPlusMinus -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -PreIncrementExpression: -jp_PLUSPLUS UnaryExpression -{ - jpElementStart(2); - jpCheckEmpty(2); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -PreDecrementExpression: -jp_MINUSMINUS UnaryExpression -{ - jpElementStart(2); - jpCheckEmpty(2); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -UnaryExpressionNotPlusMinus: -PostfixExpression -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -jp_TILDE UnaryExpression -{ - jpElementStart(2); - jpCheckEmpty(2); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -jp_EXCLAMATION UnaryExpression -{ - jpElementStart(2); - jpCheckEmpty(2); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -CastExpression -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -CastExpression: -jp_PARESTART PrimitiveType Dimsopt jp_PAREEND UnaryExpression -{ - jpElementStart(5); - jpCheckEmpty(5); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -jp_PARESTART Expression jp_PAREEND UnaryExpressionNotPlusMinus -{ - jpElementStart(4); - jpCheckEmpty(4); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -jp_PARESTART Name Dims jp_PAREEND UnaryExpressionNotPlusMinus -{ - jpElementStart(5); - -} - -MultiplicativeExpression: -UnaryExpression -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -MultiplicativeExpression jp_TIMES UnaryExpression -{ - jpElementStart(3); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -MultiplicativeExpression jp_DIVIDE UnaryExpression -{ - jpElementStart(3); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -MultiplicativeExpression jp_PERCENT UnaryExpression -{ - jpElementStart(3); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -AdditiveExpression: -MultiplicativeExpression -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -AdditiveExpression jp_PLUS MultiplicativeExpression -{ - jpElementStart(3); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -AdditiveExpression jp_MINUS MultiplicativeExpression -{ - jpElementStart(3); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -ShiftExpression: -AdditiveExpression -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -ShiftExpression jp_LTLT AdditiveExpression -{ - jpElementStart(3); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -ShiftExpression jp_GTGT AdditiveExpression -{ - jpElementStart(3); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -ShiftExpression jp_GTGTGT AdditiveExpression -{ - jpElementStart(3); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -RelationalExpression: -ShiftExpression -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -RelationalExpression jp_LESSTHAN ShiftExpression -{ - jpElementStart(3); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -RelationalExpression jp_GREATER ShiftExpression -{ - jpElementStart(3); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -RelationalExpression jp_LTEQUALS ShiftExpression -{ - jpElementStart(3); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -RelationalExpression jp_GTEQUALS ShiftExpression -{ - jpElementStart(3); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -RelationalExpression jp_INSTANCEOF ReferenceType -{ - jpElementStart(3); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -EqualityExpression: -RelationalExpression -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -EqualityExpression jp_EQUALSEQUALS RelationalExpression -{ - jpElementStart(3); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -EqualityExpression jp_EXCLAMATIONEQUALS RelationalExpression -{ - jpElementStart(3); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -AndExpression: -EqualityExpression -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -AndExpression jp_AND EqualityExpression -{ - jpElementStart(3); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -ExclusiveOrExpression: -AndExpression -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -ExclusiveOrExpression jp_CARROT AndExpression -{ - jpElementStart(3); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -InclusiveOrExpression: -ExclusiveOrExpression -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -InclusiveOrExpression jp_PIPE ExclusiveOrExpression -{ - jpElementStart(3); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -ConditionalAndExpression: -InclusiveOrExpression -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -ConditionalAndExpression jp_ANDAND InclusiveOrExpression -{ - jpElementStart(3); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -ConditionalOrExpression: -ConditionalAndExpression -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -ConditionalOrExpression jp_PIPEPIPE ConditionalAndExpression -{ - jpElementStart(3); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -ConditionalExpression: -ConditionalOrExpression -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -ConditionalOrExpression jp_QUESTION Expression jp_COLON ConditionalExpression -{ - jpElementStart(5); - jpCheckEmpty(5); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -AssignmentExpression: -ConditionalExpression -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -Assignment -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -Assignment: -LeftHandSide AssignmentOperator AssignmentExpression -{ - jpElementStart(3); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -LeftHandSide: -Name -{ - jpElementStart(1); - yyGetParser->DeallocateParserType(&($1)); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -FieldAccess -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -ArrayAccess -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -AssignmentOperator: -jp_EQUALS -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -jp_TIMESEQUALS -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -jp_DIVIDEEQUALS -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -jp_PERCENTEQUALS -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -jp_PLUSEQUALS -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -jp_MINUSEQUALS -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -jp_LESLESEQUALS -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -jp_GTGTEQUALS -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -jp_GTGTGTEQUALS -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -jp_ANDEQUALS -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -jp_CARROTEQUALS -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -jp_PIPEEQUALS -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -Expression: -AssignmentExpression -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -ConstantExpression: -Expression -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -New: -jp_NEW -{ - jpElementStart(1); - jpCheckEmpty(1); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} -| -Name jp_DOT jp_NEW -{ - jpElementStart(3); - jpStoreClass($1); - jpCheckEmpty(3); - $$ = 0; - yyGetParser->SetCurrentCombine(""); - -} - -%% -/* End of grammar */ - -/*--------------------------------------------------------------------------*/ -void cmDependsJava_yyerror(yyscan_t yyscanner, const char* message) -{ - yyGetParser->Error(message); -} - diff --git a/Source/cmDependsJavaParserTokens.h b/Source/cmDependsJavaParserTokens.h deleted file mode 100644 index 7f18f1d..0000000 --- a/Source/cmDependsJavaParserTokens.h +++ /dev/null @@ -1,264 +0,0 @@ -/* A Bison parser, made by GNU Bison 3.0.4. */ - -/* Bison interface for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - -#ifndef YY_CMDEPENDSJAVA_YY_CMDEPENDSJAVAPARSERTOKENS_H_INCLUDED -# define YY_CMDEPENDSJAVA_YY_CMDEPENDSJAVAPARSERTOKENS_H_INCLUDED -/* Debug traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif -#if YYDEBUG -extern int cmDependsJava_yydebug; -#endif - -/* Token type. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - enum yytokentype - { - jp_ABSTRACT = 258, - jp_ASSERT = 259, - jp_BOOLEAN_TYPE = 260, - jp_BREAK = 261, - jp_BYTE_TYPE = 262, - jp_CASE = 263, - jp_CATCH = 264, - jp_CHAR_TYPE = 265, - jp_CLASS = 266, - jp_CONTINUE = 267, - jp_DEFAULT = 268, - jp_DO = 269, - jp_DOUBLE_TYPE = 270, - jp_ELSE = 271, - jp_EXTENDS = 272, - jp_FINAL = 273, - jp_FINALLY = 274, - jp_FLOAT_TYPE = 275, - jp_FOR = 276, - jp_IF = 277, - jp_IMPLEMENTS = 278, - jp_IMPORT = 279, - jp_INSTANCEOF = 280, - jp_INT_TYPE = 281, - jp_INTERFACE = 282, - jp_LONG_TYPE = 283, - jp_NATIVE = 284, - jp_NEW = 285, - jp_PACKAGE = 286, - jp_PRIVATE = 287, - jp_PROTECTED = 288, - jp_PUBLIC = 289, - jp_RETURN = 290, - jp_SHORT_TYPE = 291, - jp_STATIC = 292, - jp_STRICTFP = 293, - jp_SUPER = 294, - jp_SWITCH = 295, - jp_SYNCHRONIZED = 296, - jp_THIS = 297, - jp_THROW = 298, - jp_THROWS = 299, - jp_TRANSIENT = 300, - jp_TRY = 301, - jp_VOID = 302, - jp_VOLATILE = 303, - jp_WHILE = 304, - jp_BOOLEANLITERAL = 305, - jp_CHARACTERLITERAL = 306, - jp_DECIMALINTEGERLITERAL = 307, - jp_FLOATINGPOINTLITERAL = 308, - jp_HEXINTEGERLITERAL = 309, - jp_NULLLITERAL = 310, - jp_STRINGLITERAL = 311, - jp_NAME = 312, - jp_AND = 313, - jp_ANDAND = 314, - jp_ANDEQUALS = 315, - jp_BRACKETEND = 316, - jp_BRACKETSTART = 317, - jp_CARROT = 318, - jp_CARROTEQUALS = 319, - jp_COLON = 320, - jp_COMMA = 321, - jp_CURLYEND = 322, - jp_CURLYSTART = 323, - jp_DIVIDE = 324, - jp_DIVIDEEQUALS = 325, - jp_DOLLAR = 326, - jp_DOT = 327, - jp_EQUALS = 328, - jp_EQUALSEQUALS = 329, - jp_EXCLAMATION = 330, - jp_EXCLAMATIONEQUALS = 331, - jp_GREATER = 332, - jp_GTEQUALS = 333, - jp_GTGT = 334, - jp_GTGTEQUALS = 335, - jp_GTGTGT = 336, - jp_GTGTGTEQUALS = 337, - jp_LESLESEQUALS = 338, - jp_LESSTHAN = 339, - jp_LTEQUALS = 340, - jp_LTLT = 341, - jp_MINUS = 342, - jp_MINUSEQUALS = 343, - jp_MINUSMINUS = 344, - jp_PAREEND = 345, - jp_PARESTART = 346, - jp_PERCENT = 347, - jp_PERCENTEQUALS = 348, - jp_PIPE = 349, - jp_PIPEEQUALS = 350, - jp_PIPEPIPE = 351, - jp_PLUS = 352, - jp_PLUSEQUALS = 353, - jp_PLUSPLUS = 354, - jp_QUESTION = 355, - jp_SEMICOL = 356, - jp_TILDE = 357, - jp_TIMES = 358, - jp_TIMESEQUALS = 359, - jp_ERROR = 360 - }; -#endif -/* Tokens. */ -#define jp_ABSTRACT 258 -#define jp_ASSERT 259 -#define jp_BOOLEAN_TYPE 260 -#define jp_BREAK 261 -#define jp_BYTE_TYPE 262 -#define jp_CASE 263 -#define jp_CATCH 264 -#define jp_CHAR_TYPE 265 -#define jp_CLASS 266 -#define jp_CONTINUE 267 -#define jp_DEFAULT 268 -#define jp_DO 269 -#define jp_DOUBLE_TYPE 270 -#define jp_ELSE 271 -#define jp_EXTENDS 272 -#define jp_FINAL 273 -#define jp_FINALLY 274 -#define jp_FLOAT_TYPE 275 -#define jp_FOR 276 -#define jp_IF 277 -#define jp_IMPLEMENTS 278 -#define jp_IMPORT 279 -#define jp_INSTANCEOF 280 -#define jp_INT_TYPE 281 -#define jp_INTERFACE 282 -#define jp_LONG_TYPE 283 -#define jp_NATIVE 284 -#define jp_NEW 285 -#define jp_PACKAGE 286 -#define jp_PRIVATE 287 -#define jp_PROTECTED 288 -#define jp_PUBLIC 289 -#define jp_RETURN 290 -#define jp_SHORT_TYPE 291 -#define jp_STATIC 292 -#define jp_STRICTFP 293 -#define jp_SUPER 294 -#define jp_SWITCH 295 -#define jp_SYNCHRONIZED 296 -#define jp_THIS 297 -#define jp_THROW 298 -#define jp_THROWS 299 -#define jp_TRANSIENT 300 -#define jp_TRY 301 -#define jp_VOID 302 -#define jp_VOLATILE 303 -#define jp_WHILE 304 -#define jp_BOOLEANLITERAL 305 -#define jp_CHARACTERLITERAL 306 -#define jp_DECIMALINTEGERLITERAL 307 -#define jp_FLOATINGPOINTLITERAL 308 -#define jp_HEXINTEGERLITERAL 309 -#define jp_NULLLITERAL 310 -#define jp_STRINGLITERAL 311 -#define jp_NAME 312 -#define jp_AND 313 -#define jp_ANDAND 314 -#define jp_ANDEQUALS 315 -#define jp_BRACKETEND 316 -#define jp_BRACKETSTART 317 -#define jp_CARROT 318 -#define jp_CARROTEQUALS 319 -#define jp_COLON 320 -#define jp_COMMA 321 -#define jp_CURLYEND 322 -#define jp_CURLYSTART 323 -#define jp_DIVIDE 324 -#define jp_DIVIDEEQUALS 325 -#define jp_DOLLAR 326 -#define jp_DOT 327 -#define jp_EQUALS 328 -#define jp_EQUALSEQUALS 329 -#define jp_EXCLAMATION 330 -#define jp_EXCLAMATIONEQUALS 331 -#define jp_GREATER 332 -#define jp_GTEQUALS 333 -#define jp_GTGT 334 -#define jp_GTGTEQUALS 335 -#define jp_GTGTGT 336 -#define jp_GTGTGTEQUALS 337 -#define jp_LESLESEQUALS 338 -#define jp_LESSTHAN 339 -#define jp_LTEQUALS 340 -#define jp_LTLT 341 -#define jp_MINUS 342 -#define jp_MINUSEQUALS 343 -#define jp_MINUSMINUS 344 -#define jp_PAREEND 345 -#define jp_PARESTART 346 -#define jp_PERCENT 347 -#define jp_PERCENTEQUALS 348 -#define jp_PIPE 349 -#define jp_PIPEEQUALS 350 -#define jp_PIPEPIPE 351 -#define jp_PLUS 352 -#define jp_PLUSEQUALS 353 -#define jp_PLUSPLUS 354 -#define jp_QUESTION 355 -#define jp_SEMICOL 356 -#define jp_TILDE 357 -#define jp_TIMES 358 -#define jp_TIMESEQUALS 359 -#define jp_ERROR 360 - -/* Value type. */ - - - -int cmDependsJava_yyparse (yyscan_t yyscanner); - -#endif /* !YY_CMDEPENDSJAVA_YY_CMDEPENDSJAVAPARSERTOKENS_H_INCLUDED */ diff --git a/Source/cmExprLexer.cxx b/Source/cmExprLexer.cxx deleted file mode 100644 index fb6f0db..0000000 --- a/Source/cmExprLexer.cxx +++ /dev/null @@ -1,2033 +0,0 @@ -#include "cmStandardLexer.h" -#line 2 "cmExprLexer.cxx" - -#line 4 "cmExprLexer.cxx" - -#define FLEXINT_H 1 -#define YY_INT_ALIGNED short int - -/* A lexical scanner generated by flex */ - -#define FLEX_SCANNER -#define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 6 -#define YY_FLEX_SUBMINOR_VERSION 1 -#if YY_FLEX_SUBMINOR_VERSION > 0 -#define FLEX_BETA -#endif - -/* First, we deal with platform-specific or compiler-specific issues. */ - -/* begin standard C headers. */ -#include -#include -#include -#include - -/* end standard C headers. */ - -/* flex integer type definitions */ - -#ifndef FLEXINT_H -#define FLEXINT_H - -/* C99 systems have . Non-C99 systems may or may not. */ - -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - -/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. - */ -#ifndef __STDC_LIMIT_MACROS -#define __STDC_LIMIT_MACROS 1 -#endif - -#include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; -typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; -typedef uint32_t flex_uint32_t; -#else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; -typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; - -/* Limits of integral types. */ -#ifndef INT8_MIN -#define INT8_MIN (-128) -#endif -#ifndef INT16_MIN -#define INT16_MIN (-32767-1) -#endif -#ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) -#endif -#ifndef INT8_MAX -#define INT8_MAX (127) -#endif -#ifndef INT16_MAX -#define INT16_MAX (32767) -#endif -#ifndef INT32_MAX -#define INT32_MAX (2147483647) -#endif -#ifndef UINT8_MAX -#define UINT8_MAX (255U) -#endif -#ifndef UINT16_MAX -#define UINT16_MAX (65535U) -#endif -#ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) -#endif - -#endif /* ! C99 */ - -#endif /* ! FLEXINT_H */ - -/* TODO: this is always defined, so inline it */ -#define yyconst const - -#if defined(__GNUC__) && __GNUC__ >= 3 -#define yynoreturn __attribute__((__noreturn__)) -#else -#define yynoreturn -#endif - -/* Returned upon end-of-file. */ -#define YY_NULL 0 - -/* Promotes a possibly negative, possibly signed char to an unsigned - * integer for use as an array index. If the signed char is negative, - * we want to instead treat it as an 8-bit unsigned char, hence the - * double cast. - */ -#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) - -/* An opaque pointer. */ -#ifndef YY_TYPEDEF_YY_SCANNER_T -#define YY_TYPEDEF_YY_SCANNER_T -typedef void* yyscan_t; -#endif - -/* For convenience, these vars (plus the bison vars far below) - are macros in the reentrant scanner. */ -#define yyin yyg->yyin_r -#define yyout yyg->yyout_r -#define yyextra yyg->yyextra_r -#define yyleng yyg->yyleng_r -#define yytext yyg->yytext_r -#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) -#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) -#define yy_flex_debug yyg->yy_flex_debug_r - -/* Enter a start condition. This macro really ought to take a parameter, - * but we do it the disgusting crufty way forced on us by the ()-less - * definition of BEGIN. - */ -#define BEGIN yyg->yy_start = 1 + 2 * - -/* Translate the current start state into a value that can be later handed - * to BEGIN to return to the state. The YYSTATE alias is for lex - * compatibility. - */ -#define YY_START ((yyg->yy_start - 1) / 2) -#define YYSTATE YY_START - -/* Action number for EOF rule of a given start state. */ -#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) - -/* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE cmExpr_yyrestart(yyin ,yyscanner ) - -#define YY_END_OF_BUFFER_CHAR 0 - -/* Size of default input buffer. */ -#ifndef YY_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k. - * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. - * Ditto for the __ia64__ case accordingly. - */ -#define YY_BUF_SIZE 32768 -#else -#define YY_BUF_SIZE 16384 -#endif /* __ia64__ */ -#endif - -/* The state buf must be large enough to hold one state per character in the main buffer. - */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) - -#ifndef YY_TYPEDEF_YY_BUFFER_STATE -#define YY_TYPEDEF_YY_BUFFER_STATE -typedef struct yy_buffer_state *YY_BUFFER_STATE; -#endif - -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - -#define EOB_ACT_CONTINUE_SCAN 0 -#define EOB_ACT_END_OF_FILE 1 -#define EOB_ACT_LAST_MATCH 2 - - #define YY_LESS_LINENO(n) - #define YY_LINENO_REWIND_TO(ptr) - -/* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - *yy_cp = yyg->yy_hold_char; \ - YY_RESTORE_YY_MORE_OFFSET \ - yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } \ - while ( 0 ) - -#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) - -#ifndef YY_STRUCT_YY_BUFFER_STATE -#define YY_STRUCT_YY_BUFFER_STATE -struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - int yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; - -#define YY_BUFFER_NEW 0 -#define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via cmExpr_yyrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ -#define YY_BUFFER_EOF_PENDING 2 - - }; -#endif /* !YY_STRUCT_YY_BUFFER_STATE */ - -/* We provide macros for accessing buffer states in case in the - * future we want to put the buffer states in a more general - * "scanner state". - * - * Returns the top of the stack, or NULL. - */ -#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ - ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ - : NULL) - -/* Same as previous macro, but useful when we know that the buffer stack is not - * NULL or when we need an lvalue. For internal use only. - */ -#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] - -void cmExpr_yyrestart (FILE *input_file ,yyscan_t yyscanner ); -void cmExpr_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); -YY_BUFFER_STATE cmExpr_yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner ); -void cmExpr_yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); -void cmExpr_yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); -void cmExpr_yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); -void cmExpr_yypop_buffer_state (yyscan_t yyscanner ); - -static void cmExpr_yyensure_buffer_stack (yyscan_t yyscanner ); -static void cmExpr_yy_load_buffer_state (yyscan_t yyscanner ); -static void cmExpr_yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner ); - -#define YY_FLUSH_BUFFER cmExpr_yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner) - -YY_BUFFER_STATE cmExpr_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); -YY_BUFFER_STATE cmExpr_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); -YY_BUFFER_STATE cmExpr_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); - -void *cmExpr_yyalloc (yy_size_t ,yyscan_t yyscanner ); -void *cmExpr_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); -void cmExpr_yyfree (void * ,yyscan_t yyscanner ); - -#define yy_new_buffer cmExpr_yy_create_buffer - -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! YY_CURRENT_BUFFER ){ \ - cmExpr_yyensure_buffer_stack (yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = \ - cmExpr_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } - -#define yy_set_bol(at_bol) \ - { \ - if ( ! YY_CURRENT_BUFFER ){\ - cmExpr_yyensure_buffer_stack (yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = \ - cmExpr_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } - -#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) - -/* Begin user sect3 */ - -#define cmExpr_yywrap(yyscanner) (/*CONSTCOND*/1) -#define YY_SKIP_YYWRAP - -typedef unsigned char YY_CHAR; - -typedef int yy_state_type; - -#define yytext_ptr yytext_r - -static yy_state_type yy_get_previous_state (yyscan_t yyscanner ); -static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner); -static int yy_get_next_buffer (yyscan_t yyscanner ); -static void yynoreturn yy_fatal_error (yyconst char* msg ,yyscan_t yyscanner ); - -/* Done after the current pattern has been matched and before the - * corresponding action - sets up yytext. - */ -#define YY_DO_BEFORE_ACTION \ - yyg->yytext_ptr = yy_bp; \ - yyleng = (int) (yy_cp - yy_bp); \ - yyg->yy_hold_char = *yy_cp; \ - *yy_cp = '\0'; \ - yyg->yy_c_buf_p = yy_cp; - -#define YY_NUM_RULES 15 -#define YY_END_OF_BUFFER 16 -/* This struct is not used in this scanner, - but its presence is necessary. */ -struct yy_trans_info - { - flex_int32_t yy_verify; - flex_int32_t yy_nxt; - }; -static yyconst flex_int16_t yy_accept[23] = - { 0, - 0, 0, 16, 15, 6, 8, 13, 14, 4, 2, - 3, 5, 1, 15, 15, 9, 7, 10, 1, 11, - 12, 0 - } ; - -static yyconst YY_CHAR yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 2, 3, 1, 4, - 5, 6, 7, 1, 8, 1, 9, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 1, 1, 11, - 1, 12, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 13, 1, 1, 1, 1, 1, 1, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 14, 1, 15, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 - } ; - -static yyconst YY_CHAR yy_meta[16] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 - } ; - -static yyconst flex_uint16_t yy_base[23] = - { 0, - 0, 0, 20, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 9, 7, 5, 21, 21, 21, 6, 21, - 21, 21 - } ; - -static yyconst flex_int16_t yy_def[23] = - { 0, - 22, 1, 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, - 22, 0 - } ; - -static yyconst flex_uint16_t yy_nxt[37] = - { 0, - 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, - 14, 15, 16, 17, 18, 19, 21, 20, 19, 22, - 3, 22, 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22 - } ; - -static yyconst flex_int16_t yy_chk[37] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 19, 15, 14, 13, 3, - 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22 - } ; - -/* The intent behind this definition is that it'll catch - * any uses of REJECT which flex missed. - */ -#define REJECT reject_used_but_not_detected -#define yymore() yymore_used_but_not_detected -#define YY_MORE_ADJ 0 -#define YY_RESTORE_YY_MORE_OFFSET -#line 1 "cmExprLexer.in.l" -#line 2 "cmExprLexer.in.l" -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ -/* - -This file must be translated to C++ and modified to build everywhere. - -Run flex >= 2.6 like this: - - flex --nounistd -DFLEXINT_H --prefix=cmExpr_yy --header-file=cmExprLexer.h -ocmExprLexer.cxx cmExprLexer.in.l - -Modify cmExprLexer.cxx: - - remove trailing whitespace: sed -i 's/\s*$//' cmExprLexer.h cmExprLexer.cxx - - remove blank lines at end of file - - #include "cmStandardLexer.h" at the top - - add cast in cmExpr_yy_scan_bytes for loop condition of _yybytes_len to size_t - -*/ - -/* IWYU pragma: no_forward_declare yyguts_t */ - -#include "cmExprParserHelper.h" - -/* Replace the lexer input function. */ -#undef YY_INPUT -#define YY_INPUT(buf, result, max_size) \ - { result = yyextra->LexInput(buf, max_size); } - -/* Include the set of tokens from the parser. */ -#include "cmExprParserTokens.h" - -/*--------------------------------------------------------------------------*/ -#line 476 "cmExprLexer.cxx" - -#define INITIAL 0 - -#ifndef YY_EXTRA_TYPE -#define YY_EXTRA_TYPE void * -#endif - -/* Holds the entire state of the reentrant scanner. */ -struct yyguts_t - { - - /* User-defined. Not touched by flex. */ - YY_EXTRA_TYPE yyextra_r; - - /* The rest are the same as the globals declared in the non-reentrant scanner. */ - FILE *yyin_r, *yyout_r; - size_t yy_buffer_stack_top; /**< index of top of stack. */ - size_t yy_buffer_stack_max; /**< capacity of stack. */ - YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ - char yy_hold_char; - int yy_n_chars; - int yyleng_r; - char *yy_c_buf_p; - int yy_init; - int yy_start; - int yy_did_buffer_switch_on_eof; - int yy_start_stack_ptr; - int yy_start_stack_depth; - int *yy_start_stack; - yy_state_type yy_last_accepting_state; - char* yy_last_accepting_cpos; - - int yylineno_r; - int yy_flex_debug_r; - - char *yytext_r; - int yy_more_flag; - int yy_more_len; - - }; /* end struct yyguts_t */ - -static int yy_init_globals (yyscan_t yyscanner ); - -int cmExpr_yylex_init (yyscan_t* scanner); - -int cmExpr_yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); - -/* Accessor methods to globals. - These are made visible to non-reentrant scanners for convenience. */ - -int cmExpr_yylex_destroy (yyscan_t yyscanner ); - -int cmExpr_yyget_debug (yyscan_t yyscanner ); - -void cmExpr_yyset_debug (int debug_flag ,yyscan_t yyscanner ); - -YY_EXTRA_TYPE cmExpr_yyget_extra (yyscan_t yyscanner ); - -void cmExpr_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); - -FILE *cmExpr_yyget_in (yyscan_t yyscanner ); - -void cmExpr_yyset_in (FILE * _in_str ,yyscan_t yyscanner ); - -FILE *cmExpr_yyget_out (yyscan_t yyscanner ); - -void cmExpr_yyset_out (FILE * _out_str ,yyscan_t yyscanner ); - - int cmExpr_yyget_leng (yyscan_t yyscanner ); - -char *cmExpr_yyget_text (yyscan_t yyscanner ); - -int cmExpr_yyget_lineno (yyscan_t yyscanner ); - -void cmExpr_yyset_lineno (int _line_number ,yyscan_t yyscanner ); - -int cmExpr_yyget_column (yyscan_t yyscanner ); - -void cmExpr_yyset_column (int _column_no ,yyscan_t yyscanner ); - -/* Macros after this point can all be overridden by user definitions in - * section 1. - */ - -#ifndef YY_SKIP_YYWRAP -#ifdef __cplusplus -extern "C" int cmExpr_yywrap (yyscan_t yyscanner ); -#else -extern int cmExpr_yywrap (yyscan_t yyscanner ); -#endif -#endif - -#ifndef YY_NO_UNPUT - - static void yyunput (int c,char *buf_ptr ,yyscan_t yyscanner); - -#endif - -#ifndef yytext_ptr -static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); -#endif - -#ifndef YY_NO_INPUT - -#ifdef __cplusplus -static int yyinput (yyscan_t yyscanner ); -#else -static int input (yyscan_t yyscanner ); -#endif - -#endif - -/* Amount of stuff to slurp up with each read. */ -#ifndef YY_READ_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k */ -#define YY_READ_BUF_SIZE 16384 -#else -#define YY_READ_BUF_SIZE 8192 -#endif /* __ia64__ */ -#endif - -/* Copy whatever the last rule matched to the standard output. */ -#ifndef ECHO -/* This used to be an fputs(), but since the string might contain NUL's, - * we now use fwrite(). - */ -#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) -#endif - -/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, - * is returned in "result". - */ -#ifndef YY_INPUT -#define YY_INPUT(buf,result,max_size) \ - if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ - { \ - int c = '*'; \ - size_t n; \ - for ( n = 0; n < max_size && \ - (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } \ - else \ - { \ - errno=0; \ - while ( (result = (int) fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ - { \ - if( errno != EINTR) \ - { \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - break; \ - } \ - errno=0; \ - clearerr(yyin); \ - } \ - }\ -\ - -#endif - -/* No semi-colon after return; correct usage is to write "yyterminate();" - - * we don't want an extra ';' after the "return" because that will cause - * some compilers to complain about unreachable statements. - */ -#ifndef yyterminate -#define yyterminate() return YY_NULL -#endif - -/* Number of entries by which start-condition stack grows. */ -#ifndef YY_START_STACK_INCR -#define YY_START_STACK_INCR 25 -#endif - -/* Report a fatal error. */ -#ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) -#endif - -/* end tables serialization structures and prototypes */ - -/* Default declaration of generated scanner - a define so the user can - * easily add parameters. - */ -#ifndef YY_DECL -#define YY_DECL_IS_OURS 1 - -extern int cmExpr_yylex (yyscan_t yyscanner); - -#define YY_DECL int cmExpr_yylex (yyscan_t yyscanner) -#endif /* !YY_DECL */ - -/* Code executed at the beginning of each rule, after yytext and yyleng - * have been set up. - */ -#ifndef YY_USER_ACTION -#define YY_USER_ACTION -#endif - -/* Code executed at the end of each rule. */ -#ifndef YY_BREAK -#define YY_BREAK /*LINTED*/break; -#endif - -#define YY_RULE_SETUP \ - YY_USER_ACTION - -/** The main scanner function which does all the work. - */ -YY_DECL -{ - yy_state_type yy_current_state; - char *yy_cp, *yy_bp; - int yy_act; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if ( !yyg->yy_init ) - { - yyg->yy_init = 1; - -#ifdef YY_USER_INIT - YY_USER_INIT; -#endif - - if ( ! yyg->yy_start ) - yyg->yy_start = 1; /* first start state */ - - if ( ! yyin ) - yyin = stdin; - - if ( ! yyout ) - yyout = stdout; - - if ( ! YY_CURRENT_BUFFER ) { - cmExpr_yyensure_buffer_stack (yyscanner); - YY_CURRENT_BUFFER_LVALUE = - cmExpr_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); - } - - cmExpr_yy_load_buffer_state(yyscanner ); - } - - { -#line 39 "cmExprLexer.in.l" - - -#line 732 "cmExprLexer.cxx" - - while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ - { - yy_cp = yyg->yy_c_buf_p; - - /* Support of yytext. */ - *yy_cp = yyg->yy_hold_char; - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = yyg->yy_start; -yy_match: - do - { - YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 23 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; - ++yy_cp; - } - while ( yy_base[yy_current_state] != 21 ); - -yy_find_action: - yy_act = yy_accept[yy_current_state]; - if ( yy_act == 0 ) - { /* have to back up */ - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - yy_act = yy_accept[yy_current_state]; - } - - YY_DO_BEFORE_ACTION; - -do_action: /* This label is used only to access EOF actions. */ - - switch ( yy_act ) - { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = yyg->yy_hold_char; - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - goto yy_find_action; - -case 1: -YY_RULE_SETUP -#line 41 "cmExprLexer.in.l" -{ yylvalp->Number = atoi(yytext); return exp_NUMBER; } - YY_BREAK -case 2: -YY_RULE_SETUP -#line 43 "cmExprLexer.in.l" -{ return exp_PLUS; } - YY_BREAK -case 3: -YY_RULE_SETUP -#line 44 "cmExprLexer.in.l" -{ return exp_MINUS; } - YY_BREAK -case 4: -YY_RULE_SETUP -#line 45 "cmExprLexer.in.l" -{ return exp_TIMES; } - YY_BREAK -case 5: -YY_RULE_SETUP -#line 46 "cmExprLexer.in.l" -{ return exp_DIVIDE; } - YY_BREAK -case 6: -YY_RULE_SETUP -#line 47 "cmExprLexer.in.l" -{ return exp_MOD; } - YY_BREAK -case 7: -YY_RULE_SETUP -#line 48 "cmExprLexer.in.l" -{ return exp_OR; } - YY_BREAK -case 8: -YY_RULE_SETUP -#line 49 "cmExprLexer.in.l" -{ return exp_AND; } - YY_BREAK -case 9: -YY_RULE_SETUP -#line 50 "cmExprLexer.in.l" -{ return exp_XOR; } - YY_BREAK -case 10: -YY_RULE_SETUP -#line 51 "cmExprLexer.in.l" -{ return exp_NOT; } - YY_BREAK -case 11: -YY_RULE_SETUP -#line 52 "cmExprLexer.in.l" -{ return exp_SHIFTLEFT; } - YY_BREAK -case 12: -YY_RULE_SETUP -#line 53 "cmExprLexer.in.l" -{ return exp_SHIFTRIGHT; } - YY_BREAK -case 13: -YY_RULE_SETUP -#line 54 "cmExprLexer.in.l" -{ return exp_OPENPARENT; } - YY_BREAK -case 14: -YY_RULE_SETUP -#line 55 "cmExprLexer.in.l" -{ return exp_CLOSEPARENT; } - YY_BREAK -case 15: -YY_RULE_SETUP -#line 57 "cmExprLexer.in.l" -ECHO; - YY_BREAK -#line 864 "cmExprLexer.cxx" -case YY_STATE_EOF(INITIAL): - yyterminate(); - - case YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = yyg->yy_hold_char; - YY_RESTORE_YY_MORE_OFFSET - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * cmExpr_yylex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; - - yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( yyscanner ); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); - - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++yyg->yy_c_buf_p; - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = yyg->yy_c_buf_p; - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer( yyscanner ) ) - { - case EOB_ACT_END_OF_FILE: - { - yyg->yy_did_buffer_switch_on_eof = 0; - - if ( cmExpr_yywrap(yyscanner ) ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else - { - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = - yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( yyscanner ); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - yyg->yy_c_buf_p = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; - - yy_current_state = yy_get_previous_state( yyscanner ); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ - } /* end of user's declarations */ -} /* end of cmExpr_yylex */ - -/* yy_get_next_buffer - try to read in a new buffer - * - * Returns a code representing an action: - * EOB_ACT_LAST_MATCH - - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position - * EOB_ACT_END_OF_FILE - end of file - */ -static int yy_get_next_buffer (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - char *source = yyg->yytext_ptr; - yy_size_t number_to_move, i; - int ret_val; - - if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) - YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) - { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else - { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (yy_size_t) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1; - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; - - else - { - int num_to_read = - YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; - - int yy_c_buf_p_offset = - (int) (yyg->yy_c_buf_p - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) - { - int new_size = b->yy_buf_size * 2; - - if ( new_size <= 0 ) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - cmExpr_yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner ); - } - else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = NULL; - - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); - - yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - - number_to_move - 1; - - } - - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - yyg->yy_n_chars, num_to_read ); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - if ( yyg->yy_n_chars == 0 ) - { - if ( number_to_move == YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - cmExpr_yyrestart(yyin ,yyscanner); - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - if ((int) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) cmExpr_yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner ); - if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); - } - - yyg->yy_n_chars += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; - - yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; -} - -/* yy_get_previous_state - get the state just before the EOB char was reached */ - - static yy_state_type yy_get_previous_state (yyscan_t yyscanner) -{ - yy_state_type yy_current_state; - char *yy_cp; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - yy_current_state = yyg->yy_start; - - for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) - { - YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 23 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; - } - - return yy_current_state; -} - -/* yy_try_NUL_trans - try to make a transition on the NUL character - * - * synopsis - * next_state = yy_try_NUL_trans( current_state ); - */ - static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) -{ - int yy_is_jam; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ - char *yy_cp = yyg->yy_c_buf_p; - - YY_CHAR yy_c = 1; - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 23 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; - yy_is_jam = (yy_current_state == 22); - - (void)yyg; - return yy_is_jam ? 0 : yy_current_state; -} - -#ifndef YY_NO_UNPUT - - static void yyunput (int c, char * yy_bp , yyscan_t yyscanner) -{ - char *yy_cp; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - yy_cp = yyg->yy_c_buf_p; - - /* undo effects of setting up yytext */ - *yy_cp = yyg->yy_hold_char; - - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) - { /* need to shift things up to make room */ - /* +2 for EOB chars. */ - int number_to_move = yyg->yy_n_chars + 2; - char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; - char *source = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; - - while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - *--dest = *--source; - - yy_cp += (int) (dest - source); - yy_bp += (int) (dest - source); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = - yyg->yy_n_chars = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size; - - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) - YY_FATAL_ERROR( "flex scanner push-back overflow" ); - } - - *--yy_cp = (char) c; - - yyg->yytext_ptr = yy_bp; - yyg->yy_hold_char = *yy_cp; - yyg->yy_c_buf_p = yy_cp; -} - -#endif - -#ifndef YY_NO_INPUT -#ifdef __cplusplus - static int yyinput (yyscan_t yyscanner) -#else - static int input (yyscan_t yyscanner) -#endif - -{ - int c; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - *yyg->yy_c_buf_p = yyg->yy_hold_char; - - if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) - { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) - /* This was really a NUL. */ - *yyg->yy_c_buf_p = '\0'; - - else - { /* need more input */ - int offset = yyg->yy_c_buf_p - yyg->yytext_ptr; - ++yyg->yy_c_buf_p; - - switch ( yy_get_next_buffer( yyscanner ) ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - cmExpr_yyrestart(yyin ,yyscanner); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: - { - if ( cmExpr_yywrap(yyscanner ) ) - return 0; - - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; -#ifdef __cplusplus - return yyinput(yyscanner); -#else - return input(yyscanner); -#endif - } - - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = yyg->yytext_ptr + offset; - break; - } - } - } - - c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ - *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ - yyg->yy_hold_char = *++yyg->yy_c_buf_p; - - return c; -} -#endif /* ifndef YY_NO_INPUT */ - -/** Immediately switch to a different input stream. - * @param input_file A readable stream. - * @param yyscanner The scanner object. - * @note This function does not reset the start condition to @c INITIAL . - */ - void cmExpr_yyrestart (FILE * input_file , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if ( ! YY_CURRENT_BUFFER ){ - cmExpr_yyensure_buffer_stack (yyscanner); - YY_CURRENT_BUFFER_LVALUE = - cmExpr_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); - } - - cmExpr_yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner); - cmExpr_yy_load_buffer_state(yyscanner ); -} - -/** Switch to a different input buffer. - * @param new_buffer The new input buffer. - * @param yyscanner The scanner object. - */ - void cmExpr_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* TODO. We should be able to replace this entire function body - * with - * cmExpr_yypop_buffer_state(); - * cmExpr_yypush_buffer_state(new_buffer); - */ - cmExpr_yyensure_buffer_stack (yyscanner); - if ( YY_CURRENT_BUFFER == new_buffer ) - return; - - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - cmExpr_yy_load_buffer_state(yyscanner ); - - /* We don't actually know whether we did this switch during - * EOF (cmExpr_yywrap()) processing, but the only time this flag - * is looked at is after cmExpr_yywrap() is called, so it's safe - * to go ahead and always set it. - */ - yyg->yy_did_buffer_switch_on_eof = 1; -} - -static void cmExpr_yy_load_buffer_state (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - yyg->yy_hold_char = *yyg->yy_c_buf_p; -} - -/** Allocate and initialize an input buffer state. - * @param file A readable stream. - * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. - * @param yyscanner The scanner object. - * @return the allocated buffer state. - */ - YY_BUFFER_STATE cmExpr_yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) -{ - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) cmExpr_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in cmExpr_yy_create_buffer()" ); - - b->yy_buf_size = (yy_size_t)size; - - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *) cmExpr_yyalloc(b->yy_buf_size + 2 ,yyscanner ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in cmExpr_yy_create_buffer()" ); - - b->yy_is_our_buffer = 1; - - cmExpr_yy_init_buffer(b,file ,yyscanner); - - return b; -} - -/** Destroy the buffer. - * @param b a buffer created with cmExpr_yy_create_buffer() - * @param yyscanner The scanner object. - */ - void cmExpr_yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if ( ! b ) - return; - - if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; - - if ( b->yy_is_our_buffer ) - cmExpr_yyfree((void *) b->yy_ch_buf ,yyscanner ); - - cmExpr_yyfree((void *) b ,yyscanner ); -} - -/* Initializes or reinitializes a buffer. - * This function is sometimes called more than once on the same buffer, - * such as during a cmExpr_yyrestart() or at EOF. - */ - static void cmExpr_yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) - -{ - int oerrno = errno; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - cmExpr_yy_flush_buffer(b ,yyscanner); - - b->yy_input_file = file; - b->yy_fill_buffer = 1; - - /* If b is the current buffer, then cmExpr_yy_init_buffer was _probably_ - * called from cmExpr_yyrestart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER){ - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } - - b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; - - errno = oerrno; -} - -/** Discard all buffered characters. On the next scan, YY_INPUT will be called. - * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. - * @param yyscanner The scanner object. - */ - void cmExpr_yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if ( ! b ) - return; - - b->yy_n_chars = 0; - - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - - b->yy_buf_pos = &b->yy_ch_buf[0]; - - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; - - if ( b == YY_CURRENT_BUFFER ) - cmExpr_yy_load_buffer_state(yyscanner ); -} - -/** Pushes the new state onto the stack. The new state becomes - * the current state. This function will allocate the stack - * if necessary. - * @param new_buffer The new state. - * @param yyscanner The scanner object. - */ -void cmExpr_yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (new_buffer == NULL) - return; - - cmExpr_yyensure_buffer_stack(yyscanner); - - /* This block is copied from cmExpr_yy_switch_to_buffer. */ - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - yyg->yy_buffer_stack_top++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from cmExpr_yy_switch_to_buffer. */ - cmExpr_yy_load_buffer_state(yyscanner ); - yyg->yy_did_buffer_switch_on_eof = 1; -} - -/** Removes and deletes the top of the stack, if present. - * The next element becomes the new top. - * @param yyscanner The scanner object. - */ -void cmExpr_yypop_buffer_state (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!YY_CURRENT_BUFFER) - return; - - cmExpr_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner); - YY_CURRENT_BUFFER_LVALUE = NULL; - if (yyg->yy_buffer_stack_top > 0) - --yyg->yy_buffer_stack_top; - - if (YY_CURRENT_BUFFER) { - cmExpr_yy_load_buffer_state(yyscanner ); - yyg->yy_did_buffer_switch_on_eof = 1; - } -} - -/* Allocates the stack if it does not exist. - * Guarantees space for at least one push. - */ -static void cmExpr_yyensure_buffer_stack (yyscan_t yyscanner) -{ - int num_to_alloc; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (!yyg->yy_buffer_stack) { - - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ - yyg->yy_buffer_stack = (struct yy_buffer_state**)cmExpr_yyalloc - (num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); - if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in cmExpr_yyensure_buffer_stack()" ); - - memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - - yyg->yy_buffer_stack_max = num_to_alloc; - yyg->yy_buffer_stack_top = 0; - return; - } - - if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ - - /* Increase the buffer to prepare for a possible push. */ - yy_size_t grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = yyg->yy_buffer_stack_max + grow_size; - yyg->yy_buffer_stack = (struct yy_buffer_state**)cmExpr_yyrealloc - (yyg->yy_buffer_stack, - num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); - if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in cmExpr_yyensure_buffer_stack()" ); - - /* zero only the new slots.*/ - memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); - yyg->yy_buffer_stack_max = num_to_alloc; - } -} - -/** Setup the input buffer state to scan directly from a user-specified character buffer. - * @param base the character buffer - * @param size the size in bytes of the character buffer - * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE cmExpr_yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) -{ - YY_BUFFER_STATE b; - - if ( size < 2 || - base[size-2] != YY_END_OF_BUFFER_CHAR || - base[size-1] != YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return NULL; - - b = (YY_BUFFER_STATE) cmExpr_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in cmExpr_yy_scan_buffer()" ); - - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = NULL; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - cmExpr_yy_switch_to_buffer(b ,yyscanner ); - - return b; -} - -/** Setup the input buffer state to scan a string. The next call to cmExpr_yylex() will - * scan from a @e copy of @a str. - * @param yystr a NUL-terminated string to scan - * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. - * @note If you want to scan bytes that may contain NUL values, then use - * cmExpr_yy_scan_bytes() instead. - */ -YY_BUFFER_STATE cmExpr_yy_scan_string (yyconst char * yystr , yyscan_t yyscanner) -{ - - return cmExpr_yy_scan_bytes(yystr,(int) strlen(yystr) ,yyscanner); -} - -/** Setup the input buffer state to scan the given bytes. The next call to cmExpr_yylex() will - * scan from a @e copy of @a bytes. - * @param yybytes the byte buffer to scan - * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. - * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE cmExpr_yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner) -{ - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - yy_size_t i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = (yy_size_t) _yybytes_len + 2; - buf = (char *) cmExpr_yyalloc(n ,yyscanner ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in cmExpr_yy_scan_bytes()" ); - - for ( i = 0; i < (size_t)_yybytes_len; ++i ) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - - b = cmExpr_yy_scan_buffer(buf,n ,yyscanner); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in cmExpr_yy_scan_bytes()" ); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; -} - -#ifndef YY_EXIT_FAILURE -#define YY_EXIT_FAILURE 2 -#endif - -static void yynoreturn yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - (void) fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); -} - -/* Redefine yyless() so it works in section 3 code. */ - -#undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - yytext[yyleng] = yyg->yy_hold_char; \ - yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ - yyg->yy_hold_char = *yyg->yy_c_buf_p; \ - *yyg->yy_c_buf_p = '\0'; \ - yyleng = yyless_macro_arg; \ - } \ - while ( 0 ) - -/* Accessor methods (get/set functions) to struct members. */ - -/** Get the user-defined data for this scanner. - * @param yyscanner The scanner object. - */ -YY_EXTRA_TYPE cmExpr_yyget_extra (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyextra; -} - -/** Get the current line number. - * @param yyscanner The scanner object. - */ -int cmExpr_yyget_lineno (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (! YY_CURRENT_BUFFER) - return 0; - - return yylineno; -} - -/** Get the current column number. - * @param yyscanner The scanner object. - */ -int cmExpr_yyget_column (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (! YY_CURRENT_BUFFER) - return 0; - - return yycolumn; -} - -/** Get the input stream. - * @param yyscanner The scanner object. - */ -FILE *cmExpr_yyget_in (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyin; -} - -/** Get the output stream. - * @param yyscanner The scanner object. - */ -FILE *cmExpr_yyget_out (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyout; -} - -/** Get the length of the current token. - * @param yyscanner The scanner object. - */ -int cmExpr_yyget_leng (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyleng; -} - -/** Get the current token. - * @param yyscanner The scanner object. - */ - -char *cmExpr_yyget_text (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yytext; -} - -/** Set the user-defined data. This data is never touched by the scanner. - * @param user_defined The data to be associated with this scanner. - * @param yyscanner The scanner object. - */ -void cmExpr_yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyextra = user_defined ; -} - -/** Set the current line number. - * @param _line_number line number - * @param yyscanner The scanner object. - */ -void cmExpr_yyset_lineno (int _line_number , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* lineno is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) - YY_FATAL_ERROR( "cmExpr_yyset_lineno called with no buffer" ); - - yylineno = _line_number; -} - -/** Set the current column. - * @param _column_no column number - * @param yyscanner The scanner object. - */ -void cmExpr_yyset_column (int _column_no , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* column is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) - YY_FATAL_ERROR( "cmExpr_yyset_column called with no buffer" ); - - yycolumn = _column_no; -} - -/** Set the input stream. This does not discard the current - * input buffer. - * @param _in_str A readable stream. - * @param yyscanner The scanner object. - * @see cmExpr_yy_switch_to_buffer - */ -void cmExpr_yyset_in (FILE * _in_str , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyin = _in_str ; -} - -void cmExpr_yyset_out (FILE * _out_str , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyout = _out_str ; -} - -int cmExpr_yyget_debug (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yy_flex_debug; -} - -void cmExpr_yyset_debug (int _bdebug , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yy_flex_debug = _bdebug ; -} - -/* Accessor methods for yylval and yylloc */ - -/* User-visible API */ - -/* cmExpr_yylex_init is special because it creates the scanner itself, so it is - * the ONLY reentrant function that doesn't take the scanner as the last argument. - * That's why we explicitly handle the declaration, instead of using our macros. - */ - -int cmExpr_yylex_init(yyscan_t* ptr_yy_globals) - -{ - if (ptr_yy_globals == NULL){ - errno = EINVAL; - return 1; - } - - *ptr_yy_globals = (yyscan_t) cmExpr_yyalloc ( sizeof( struct yyguts_t ), NULL ); - - if (*ptr_yy_globals == NULL){ - errno = ENOMEM; - return 1; - } - - /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - - return yy_init_globals ( *ptr_yy_globals ); -} - -/* cmExpr_yylex_init_extra has the same functionality as cmExpr_yylex_init, but follows the - * convention of taking the scanner as the last argument. Note however, that - * this is a *pointer* to a scanner, as it will be allocated by this call (and - * is the reason, too, why this function also must handle its own declaration). - * The user defined value in the first argument will be available to cmExpr_yyalloc in - * the yyextra field. - */ - -int cmExpr_yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals ) - -{ - struct yyguts_t dummy_yyguts; - - cmExpr_yyset_extra (yy_user_defined, &dummy_yyguts); - - if (ptr_yy_globals == NULL){ - errno = EINVAL; - return 1; - } - - *ptr_yy_globals = (yyscan_t) cmExpr_yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); - - if (*ptr_yy_globals == NULL){ - errno = ENOMEM; - return 1; - } - - /* By setting to 0xAA, we expose bugs in - yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - - cmExpr_yyset_extra (yy_user_defined, *ptr_yy_globals); - - return yy_init_globals ( *ptr_yy_globals ); -} - -static int yy_init_globals (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from cmExpr_yylex_destroy(), so don't allocate here. - */ - - yyg->yy_buffer_stack = NULL; - yyg->yy_buffer_stack_top = 0; - yyg->yy_buffer_stack_max = 0; - yyg->yy_c_buf_p = NULL; - yyg->yy_init = 0; - yyg->yy_start = 0; - - yyg->yy_start_stack_ptr = 0; - yyg->yy_start_stack_depth = 0; - yyg->yy_start_stack = NULL; - -/* Defined in main.c */ -#ifdef YY_STDINIT - yyin = stdin; - yyout = stdout; -#else - yyin = NULL; - yyout = NULL; -#endif - - /* For future reference: Set errno on error, since we are called by - * cmExpr_yylex_init() - */ - return 0; -} - -/* cmExpr_yylex_destroy is for both reentrant and non-reentrant scanners. */ -int cmExpr_yylex_destroy (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* Pop the buffer stack, destroying each element. */ - while(YY_CURRENT_BUFFER){ - cmExpr_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner ); - YY_CURRENT_BUFFER_LVALUE = NULL; - cmExpr_yypop_buffer_state(yyscanner); - } - - /* Destroy the stack itself. */ - cmExpr_yyfree(yyg->yy_buffer_stack ,yyscanner); - yyg->yy_buffer_stack = NULL; - - /* Destroy the start condition stack. */ - cmExpr_yyfree(yyg->yy_start_stack ,yyscanner ); - yyg->yy_start_stack = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner so the next time - * cmExpr_yylex() is called, initialization will occur. */ - yy_init_globals( yyscanner); - - /* Destroy the main struct (reentrant only). */ - cmExpr_yyfree ( yyscanner , yyscanner ); - yyscanner = NULL; - return 0; -} - -/* - * Internal utility routines. - */ - -#ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - - int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; -} -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) -{ - int n; - for ( n = 0; s[n]; ++n ) - ; - - return n; -} -#endif - -void *cmExpr_yyalloc (yy_size_t size , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - return malloc(size); -} - -void *cmExpr_yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return realloc(ptr, size); -} - -void cmExpr_yyfree (void * ptr , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - free( (char *) ptr ); /* see cmExpr_yyrealloc() for (char *) cast */ -} - -#define YYTABLES_NAME "yytables" - -#line 57 "cmExprLexer.in.l" diff --git a/Source/cmExprLexer.h b/Source/cmExprLexer.h deleted file mode 100644 index 835a7a3..0000000 --- a/Source/cmExprLexer.h +++ /dev/null @@ -1,334 +0,0 @@ -#ifndef cmExpr_yyHEADER_H -#define cmExpr_yyHEADER_H 1 -#define cmExpr_yyIN_HEADER 1 - -#line 6 "cmExprLexer.h" - -#line 8 "cmExprLexer.h" - -#define FLEXINT_H 1 -#define YY_INT_ALIGNED short int - -/* A lexical scanner generated by flex */ - -#define FLEX_SCANNER -#define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 6 -#define YY_FLEX_SUBMINOR_VERSION 1 -#if YY_FLEX_SUBMINOR_VERSION > 0 -#define FLEX_BETA -#endif - -/* First, we deal with platform-specific or compiler-specific issues. */ - -/* begin standard C headers. */ -#include -#include -#include -#include - -/* end standard C headers. */ - -/* flex integer type definitions */ - -#ifndef FLEXINT_H -#define FLEXINT_H - -/* C99 systems have . Non-C99 systems may or may not. */ - -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - -/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. - */ -#ifndef __STDC_LIMIT_MACROS -#define __STDC_LIMIT_MACROS 1 -#endif - -#include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; -typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; -typedef uint32_t flex_uint32_t; -#else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; -typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; - -/* Limits of integral types. */ -#ifndef INT8_MIN -#define INT8_MIN (-128) -#endif -#ifndef INT16_MIN -#define INT16_MIN (-32767-1) -#endif -#ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) -#endif -#ifndef INT8_MAX -#define INT8_MAX (127) -#endif -#ifndef INT16_MAX -#define INT16_MAX (32767) -#endif -#ifndef INT32_MAX -#define INT32_MAX (2147483647) -#endif -#ifndef UINT8_MAX -#define UINT8_MAX (255U) -#endif -#ifndef UINT16_MAX -#define UINT16_MAX (65535U) -#endif -#ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) -#endif - -#endif /* ! C99 */ - -#endif /* ! FLEXINT_H */ - -/* TODO: this is always defined, so inline it */ -#define yyconst const - -#if defined(__GNUC__) && __GNUC__ >= 3 -#define yynoreturn __attribute__((__noreturn__)) -#else -#define yynoreturn -#endif - -/* An opaque pointer. */ -#ifndef YY_TYPEDEF_YY_SCANNER_T -#define YY_TYPEDEF_YY_SCANNER_T -typedef void* yyscan_t; -#endif - -/* For convenience, these vars (plus the bison vars far below) - are macros in the reentrant scanner. */ -#define yyin yyg->yyin_r -#define yyout yyg->yyout_r -#define yyextra yyg->yyextra_r -#define yyleng yyg->yyleng_r -#define yytext yyg->yytext_r -#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) -#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) -#define yy_flex_debug yyg->yy_flex_debug_r - -/* Size of default input buffer. */ -#ifndef YY_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k. - * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. - * Ditto for the __ia64__ case accordingly. - */ -#define YY_BUF_SIZE 32768 -#else -#define YY_BUF_SIZE 16384 -#endif /* __ia64__ */ -#endif - -#ifndef YY_TYPEDEF_YY_BUFFER_STATE -#define YY_TYPEDEF_YY_BUFFER_STATE -typedef struct yy_buffer_state *YY_BUFFER_STATE; -#endif - -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - -#ifndef YY_STRUCT_YY_BUFFER_STATE -#define YY_STRUCT_YY_BUFFER_STATE -struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - int yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; - - }; -#endif /* !YY_STRUCT_YY_BUFFER_STATE */ - -void cmExpr_yyrestart (FILE *input_file ,yyscan_t yyscanner ); -void cmExpr_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); -YY_BUFFER_STATE cmExpr_yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner ); -void cmExpr_yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); -void cmExpr_yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); -void cmExpr_yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); -void cmExpr_yypop_buffer_state (yyscan_t yyscanner ); - -YY_BUFFER_STATE cmExpr_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); -YY_BUFFER_STATE cmExpr_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); -YY_BUFFER_STATE cmExpr_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); - -void *cmExpr_yyalloc (yy_size_t ,yyscan_t yyscanner ); -void *cmExpr_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); -void cmExpr_yyfree (void * ,yyscan_t yyscanner ); - -/* Begin user sect3 */ - -#define cmExpr_yywrap(yyscanner) (/*CONSTCOND*/1) -#define YY_SKIP_YYWRAP - -#define yytext_ptr yytext_r - -#ifdef YY_HEADER_EXPORT_START_CONDITIONS -#define INITIAL 0 - -#endif - -#ifndef YY_EXTRA_TYPE -#define YY_EXTRA_TYPE void * -#endif - -int cmExpr_yylex_init (yyscan_t* scanner); - -int cmExpr_yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); - -/* Accessor methods to globals. - These are made visible to non-reentrant scanners for convenience. */ - -int cmExpr_yylex_destroy (yyscan_t yyscanner ); - -int cmExpr_yyget_debug (yyscan_t yyscanner ); - -void cmExpr_yyset_debug (int debug_flag ,yyscan_t yyscanner ); - -YY_EXTRA_TYPE cmExpr_yyget_extra (yyscan_t yyscanner ); - -void cmExpr_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); - -FILE *cmExpr_yyget_in (yyscan_t yyscanner ); - -void cmExpr_yyset_in (FILE * _in_str ,yyscan_t yyscanner ); - -FILE *cmExpr_yyget_out (yyscan_t yyscanner ); - -void cmExpr_yyset_out (FILE * _out_str ,yyscan_t yyscanner ); - - int cmExpr_yyget_leng (yyscan_t yyscanner ); - -char *cmExpr_yyget_text (yyscan_t yyscanner ); - -int cmExpr_yyget_lineno (yyscan_t yyscanner ); - -void cmExpr_yyset_lineno (int _line_number ,yyscan_t yyscanner ); - -int cmExpr_yyget_column (yyscan_t yyscanner ); - -void cmExpr_yyset_column (int _column_no ,yyscan_t yyscanner ); - -/* Macros after this point can all be overridden by user definitions in - * section 1. - */ - -#ifndef YY_SKIP_YYWRAP -#ifdef __cplusplus -extern "C" int cmExpr_yywrap (yyscan_t yyscanner ); -#else -extern int cmExpr_yywrap (yyscan_t yyscanner ); -#endif -#endif - -#ifndef yytext_ptr -static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); -#endif - -#ifndef YY_NO_INPUT - -#endif - -/* Amount of stuff to slurp up with each read. */ -#ifndef YY_READ_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k */ -#define YY_READ_BUF_SIZE 16384 -#else -#define YY_READ_BUF_SIZE 8192 -#endif /* __ia64__ */ -#endif - -/* Number of entries by which start-condition stack grows. */ -#ifndef YY_START_STACK_INCR -#define YY_START_STACK_INCR 25 -#endif - -/* Default declaration of generated scanner - a define so the user can - * easily add parameters. - */ -#ifndef YY_DECL -#define YY_DECL_IS_OURS 1 - -extern int cmExpr_yylex (yyscan_t yyscanner); - -#define YY_DECL int cmExpr_yylex (yyscan_t yyscanner) -#endif /* !YY_DECL */ - -/* yy_get_previous_state - get the state just before the EOB char was reached */ - -#undef YY_NEW_FILE -#undef YY_FLUSH_BUFFER -#undef yy_set_bol -#undef yy_new_buffer -#undef yy_set_interactive -#undef YY_DO_BEFORE_ACTION - -#ifdef YY_DECL_IS_OURS -#undef YY_DECL_IS_OURS -#undef YY_DECL -#endif - -#line 57 "cmExprLexer.in.l" - - -#line 333 "cmExprLexer.h" -#undef cmExpr_yyIN_HEADER -#endif /* cmExpr_yyHEADER_H */ diff --git a/Source/cmExprLexer.in.l b/Source/cmExprLexer.in.l deleted file mode 100644 index 25ddba4..0000000 --- a/Source/cmExprLexer.in.l +++ /dev/null @@ -1,57 +0,0 @@ -%{ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ -/* - -This file must be translated to C++ and modified to build everywhere. - -Run flex >= 2.6 like this: - - flex --nounistd -DFLEXINT_H --prefix=cmExpr_yy --header-file=cmExprLexer.h -ocmExprLexer.cxx cmExprLexer.in.l - -Modify cmExprLexer.cxx: - - remove trailing whitespace: sed -i 's/\s*$//' cmExprLexer.h cmExprLexer.cxx - - remove blank lines at end of file - - #include "cmStandardLexer.h" at the top - - add cast in yy_scan_bytes for loop condition of _yybytes_len to size_t - -*/ - -/* IWYU pragma: no_forward_declare yyguts_t */ - -#include "cmExprParserHelper.h" - -/* Replace the lexer input function. */ -#undef YY_INPUT -#define YY_INPUT(buf, result, max_size) \ - { result = yyextra->LexInput(buf, max_size); } - -/* Include the set of tokens from the parser. */ -#include "cmExprParserTokens.h" - -/*--------------------------------------------------------------------------*/ -%} - -%option reentrant -%option noyywrap -%pointer - -%% - -[0-9][0-9]* { yylvalp->Number = atoi(yytext); return exp_NUMBER; } - -"+" { return exp_PLUS; } -"-" { return exp_MINUS; } -"*" { return exp_TIMES; } -"/" { return exp_DIVIDE; } -"%" { return exp_MOD; } -"\|" { return exp_OR; } -"&" { return exp_AND; } -"^" { return exp_XOR; } -"~" { return exp_NOT; } -"<<" { return exp_SHIFTLEFT; } -">>" { return exp_SHIFTRIGHT; } -"(" { return exp_OPENPARENT; } -")" { return exp_CLOSEPARENT; } - -%% diff --git a/Source/cmExprParser.cxx b/Source/cmExprParser.cxx deleted file mode 100644 index 19efca1..0000000 --- a/Source/cmExprParser.cxx +++ /dev/null @@ -1,1699 +0,0 @@ -/* A Bison parser, made by GNU Bison 3.0.4. */ - -/* Bison implementation for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - -/* C LALR(1) parser skeleton written by Richard Stallman, by - simplifying the original so-called "semantic" parser. */ - -/* All symbols defined below should begin with yy or YY, to avoid - infringing on user name space. This should be done even for local - variables, as they might otherwise be expanded by user macros. - There are some unavoidable exceptions within include files to - define necessary library symbols; they are noted "INFRINGES ON - USER NAME SPACE" below. */ - -/* Identify Bison output. */ -#define YYBISON 1 - -/* Bison version. */ -#define YYBISON_VERSION "3.0.4" - -/* Skeleton name. */ -#define YYSKELETON_NAME "yacc.c" - -/* Pure parsers. */ -#define YYPURE 1 - -/* Push parsers. */ -#define YYPUSH 0 - -/* Pull parsers. */ -#define YYPULL 1 - - -/* Substitute the variable and function names. */ -#define yyparse cmExpr_yyparse -#define yylex cmExpr_yylex -#define yyerror cmExpr_yyerror -#define yydebug cmExpr_yydebug -#define yynerrs cmExpr_yynerrs - - -/* Copy the first part of user declarations. */ -#line 1 "cmExprParser.y" /* yacc.c:339 */ - -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ -/* - -This file must be translated to C and modified to build everywhere. - -Run bison like this: - - bison --yacc --name-prefix=cmExpr_yy --defines=cmExprParserTokens.h -ocmExprParser.cxx cmExprParser.y - -Modify cmExprParser.cxx: - - "#if 0" out yyerrorlab block in range ["goto yyerrlab1", "yyerrlab1:"] - -*/ - -#include "cmConfigure.h" // IWYU pragma: keep - -#include -#include - -/*-------------------------------------------------------------------------*/ -#define YYDEBUG 1 -#include "cmExprParserHelper.h" /* Interface to parser object. */ -#include "cmExprLexer.h" /* Interface to lexer object. */ -#include "cmExprParserTokens.h" /* Need YYSTYPE for YY_DECL. */ - -/* Forward declare the lexer entry point. */ -YY_DECL; - -/* Helper function to forward error callback from parser. */ -static void cmExpr_yyerror(yyscan_t yyscanner, const char* message); - -/* Disable some warnings in the generated code. */ -#ifdef _MSC_VER -# pragma warning (disable: 4102) /* Unused goto label. */ -# pragma warning (disable: 4065) /* Switch statement contains default but no case. */ -#endif - -#line 112 "cmExprParser.cxx" /* yacc.c:339 */ - -# ifndef YY_NULLPTR -# if defined __cplusplus && 201103L <= __cplusplus -# define YY_NULLPTR nullptr -# else -# define YY_NULLPTR 0 -# endif -# endif - -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE 1 -#endif - -/* In a future release of Bison, this section will be replaced - by #include "cmExprParserTokens.h". */ -#ifndef YY_CMEXPR_YY_CMEXPRPARSERTOKENS_H_INCLUDED -# define YY_CMEXPR_YY_CMEXPRPARSERTOKENS_H_INCLUDED -/* Debug traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif -#if YYDEBUG -extern int cmExpr_yydebug; -#endif - -/* Token type. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - enum yytokentype - { - exp_PLUS = 258, - exp_MINUS = 259, - exp_TIMES = 260, - exp_DIVIDE = 261, - exp_MOD = 262, - exp_SHIFTLEFT = 263, - exp_SHIFTRIGHT = 264, - exp_OPENPARENT = 265, - exp_CLOSEPARENT = 266, - exp_OR = 267, - exp_AND = 268, - exp_XOR = 269, - exp_NOT = 270, - exp_NUMBER = 271 - }; -#endif -/* Tokens. */ -#define exp_PLUS 258 -#define exp_MINUS 259 -#define exp_TIMES 260 -#define exp_DIVIDE 261 -#define exp_MOD 262 -#define exp_SHIFTLEFT 263 -#define exp_SHIFTRIGHT 264 -#define exp_OPENPARENT 265 -#define exp_CLOSEPARENT 266 -#define exp_OR 267 -#define exp_AND 268 -#define exp_XOR 269 -#define exp_NOT 270 -#define exp_NUMBER 271 - -/* Value type. */ - - - -int cmExpr_yyparse (yyscan_t yyscanner); - -#endif /* !YY_CMEXPR_YY_CMEXPRPARSERTOKENS_H_INCLUDED */ - -/* Copy the second part of user declarations. */ - -#line 189 "cmExprParser.cxx" /* yacc.c:358 */ - -#ifdef short -# undef short -#endif - -#ifdef YYTYPE_UINT8 -typedef YYTYPE_UINT8 yytype_uint8; -#else -typedef unsigned char yytype_uint8; -#endif - -#ifdef YYTYPE_INT8 -typedef YYTYPE_INT8 yytype_int8; -#else -typedef signed char yytype_int8; -#endif - -#ifdef YYTYPE_UINT16 -typedef YYTYPE_UINT16 yytype_uint16; -#else -typedef unsigned short int yytype_uint16; -#endif - -#ifdef YYTYPE_INT16 -typedef YYTYPE_INT16 yytype_int16; -#else -typedef short int yytype_int16; -#endif - -#ifndef YYSIZE_T -# ifdef __SIZE_TYPE__ -# define YYSIZE_T __SIZE_TYPE__ -# elif defined size_t -# define YYSIZE_T size_t -# elif ! defined YYSIZE_T -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# else -# define YYSIZE_T unsigned int -# endif -#endif - -#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) - -#ifndef YY_ -# if defined YYENABLE_NLS && YYENABLE_NLS -# if ENABLE_NLS -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_(Msgid) dgettext ("bison-runtime", Msgid) -# endif -# endif -# ifndef YY_ -# define YY_(Msgid) Msgid -# endif -#endif - -#ifndef YY_ATTRIBUTE -# if (defined __GNUC__ \ - && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ - || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C -# define YY_ATTRIBUTE(Spec) __attribute__(Spec) -# else -# define YY_ATTRIBUTE(Spec) /* empty */ -# endif -#endif - -#ifndef YY_ATTRIBUTE_PURE -# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) -#endif - -#ifndef YY_ATTRIBUTE_UNUSED -# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) -#endif - -#if !defined _Noreturn \ - && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) -# if defined _MSC_VER && 1200 <= _MSC_VER -# define _Noreturn __declspec (noreturn) -# else -# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) -# endif -#endif - -/* Suppress unused-variable warnings by "using" E. */ -#if ! defined lint || defined __GNUC__ -# define YYUSE(E) ((void) (E)) -#else -# define YYUSE(E) /* empty */ -#endif - -#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ -/* Suppress an incorrect diagnostic about yylval being uninitialized. */ -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ - _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ - _Pragma ("GCC diagnostic pop") -#else -# define YY_INITIAL_VALUE(Value) Value -#endif -#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_END -#endif -#ifndef YY_INITIAL_VALUE -# define YY_INITIAL_VALUE(Value) /* Nothing. */ -#endif - - -#if ! defined yyoverflow || YYERROR_VERBOSE - -/* The parser invokes alloca or malloc; define the necessary symbols. */ - -# ifdef YYSTACK_USE_ALLOCA -# if YYSTACK_USE_ALLOCA -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca -# elif defined __BUILTIN_VA_ARG_INCR -# include /* INFRINGES ON USER NAME SPACE */ -# elif defined _AIX -# define YYSTACK_ALLOC __alloca -# elif defined _MSC_VER -# include /* INFRINGES ON USER NAME SPACE */ -# define alloca _alloca -# else -# define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS -# include /* INFRINGES ON USER NAME SPACE */ - /* Use EXIT_SUCCESS as a witness for stdlib.h. */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# endif -# endif -# endif - -# ifdef YYSTACK_ALLOC - /* Pacify GCC's 'empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) -# ifndef YYSTACK_ALLOC_MAXIMUM - /* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -# endif -# else -# define YYSTACK_ALLOC YYMALLOC -# define YYSTACK_FREE YYFREE -# ifndef YYSTACK_ALLOC_MAXIMUM -# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -# endif -# if (defined __cplusplus && ! defined EXIT_SUCCESS \ - && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# ifndef YYMALLOC -# define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS -void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# ifndef YYFREE -# define YYFREE free -# if ! defined free && ! defined EXIT_SUCCESS -void free (void *); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# endif -#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ - - -#if (! defined yyoverflow \ - && (! defined __cplusplus \ - || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) - -/* A type that is properly aligned for any stack member. */ -union yyalloc -{ - yytype_int16 yyss_alloc; - YYSTYPE yyvs_alloc; -}; - -/* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) - -/* The size of an array large to enough to hold all stacks, each with - N elements. */ -# define YYSTACK_BYTES(N) \ - ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ - + YYSTACK_GAP_MAXIMUM) - -# define YYCOPY_NEEDED 1 - -/* Relocate STACK from its old location to the new one. The - local variables YYSIZE and YYSTACKSIZE give the old and new number of - elements in the stack, and YYPTR gives the new location of the - stack. Advance YYPTR to a properly aligned location for the next - stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (0) - -#endif - -#if defined YYCOPY_NEEDED && YYCOPY_NEEDED -/* Copy COUNT objects from SRC to DST. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(Dst, Src, Count) \ - __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) -# else -# define YYCOPY(Dst, Src, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (Dst)[yyi] = (Src)[yyi]; \ - } \ - while (0) -# endif -# endif -#endif /* !YYCOPY_NEEDED */ - -/* YYFINAL -- State number of the termination state. */ -#define YYFINAL 17 -/* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 30 - -/* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 17 -/* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 10 -/* YYNRULES -- Number of rules. */ -#define YYNRULES 23 -/* YYNSTATES -- Number of states. */ -#define YYNSTATES 39 - -/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned - by yylex, with out-of-bounds checking. */ -#define YYUNDEFTOK 2 -#define YYMAXUTOK 271 - -#define YYTRANSLATE(YYX) \ - ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) - -/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM - as returned by yylex, without out-of-bounds checking. */ -static const yytype_uint8 yytranslate[] = -{ - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16 -}; - -#if YYDEBUG - /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ -static const yytype_uint8 yyrline[] = -{ - 0, 73, 73, 78, 81, 86, 89, 94, 97, 102, - 105, 108, 113, 116, 119, 124, 127, 130, 133, 138, - 141, 144, 149, 152 -}; -#endif - -#if YYDEBUG || YYERROR_VERBOSE || 1 -/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = -{ - "$end", "error", "$undefined", "exp_PLUS", "exp_MINUS", "exp_TIMES", - "exp_DIVIDE", "exp_MOD", "exp_SHIFTLEFT", "exp_SHIFTRIGHT", - "exp_OPENPARENT", "exp_CLOSEPARENT", "exp_OR", "exp_AND", "exp_XOR", - "exp_NOT", "exp_NUMBER", "$accept", "start", "exp", "bitwiseor", - "bitwisexor", "bitwiseand", "shift", "term", "unary", "factor", YY_NULLPTR -}; -#endif - -# ifdef YYPRINT -/* YYTOKNUM[NUM] -- (External) token number corresponding to the - (internal) symbol number NUM (which must be that of a token). */ -static const yytype_uint16 yytoknum[] = -{ - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271 -}; -# endif - -#define YYPACT_NINF -8 - -#define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-8))) - -#define YYTABLE_NINF -1 - -#define yytable_value_is_error(Yytable_value) \ - 0 - - /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -static const yytype_int8 yypact[] = -{ - 0, 0, 0, 0, -8, 2, -7, -5, 8, 3, - 10, 1, -8, -8, -8, -8, 6, -8, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -8, -5, - 8, 3, 10, 10, 1, 1, -8, -8, -8 -}; - - /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE does not specify something else to do. Zero - means the default is an error. */ -static const yytype_uint8 yydefact[] = -{ - 0, 0, 0, 0, 22, 0, 2, 3, 5, 7, - 9, 12, 15, 19, 20, 21, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 23, 4, - 6, 8, 10, 11, 13, 14, 16, 17, 18 -}; - - /* YYPGOTO[NTERM-NUM]. */ -static const yytype_int8 yypgoto[] = -{ - -8, -8, 12, 5, 11, 9, -2, 4, -1, -8 -}; - - /* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int8 yydefgoto[] = -{ - -1, 5, 6, 7, 8, 9, 10, 11, 12, 13 -}; - - /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule whose - number is the opposite. If YYTABLE_NINF, syntax error. */ -static const yytype_uint8 yytable[] = -{ - 14, 15, 17, 1, 2, 18, 25, 26, 27, 19, - 3, 21, 22, 23, 24, 16, 4, 28, 18, 32, - 33, 20, 0, 29, 36, 37, 38, 34, 35, 31, - 30 -}; - -static const yytype_int8 yycheck[] = -{ - 1, 2, 0, 3, 4, 12, 5, 6, 7, 14, - 10, 8, 9, 3, 4, 3, 16, 11, 12, 21, - 22, 13, -1, 18, 25, 26, 27, 23, 24, 20, - 19 -}; - - /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -static const yytype_uint8 yystos[] = -{ - 0, 3, 4, 10, 16, 18, 19, 20, 21, 22, - 23, 24, 25, 26, 25, 25, 19, 0, 12, 14, - 13, 8, 9, 3, 4, 5, 6, 7, 11, 20, - 21, 22, 23, 23, 24, 24, 25, 25, 25 -}; - - /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = -{ - 0, 17, 18, 19, 19, 20, 20, 21, 21, 22, - 22, 22, 23, 23, 23, 24, 24, 24, 24, 25, - 25, 25, 26, 26 -}; - - /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = -{ - 0, 2, 1, 1, 3, 1, 3, 1, 3, 1, - 3, 3, 1, 3, 3, 1, 3, 3, 3, 1, - 2, 2, 1, 3 -}; - - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab - - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK (yylen); \ - yystate = *yyssp; \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (yyscanner, YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (0) - -/* Error token number */ -#define YYTERROR 1 -#define YYERRCODE 256 - - - -/* Enable debugging if requested. */ -#if YYDEBUG - -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (0) - -/* This macro is provided for backward compatibility. */ -#ifndef YY_LOCATION_PRINT -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -#endif - - -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value, yyscanner); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (0) - - -/*----------------------------------------. -| Print this symbol's value on YYOUTPUT. | -`----------------------------------------*/ - -static void -yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, yyscan_t yyscanner) -{ - FILE *yyo = yyoutput; - YYUSE (yyo); - YYUSE (yyscanner); - if (!yyvaluep) - return; -# ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# endif - YYUSE (yytype); -} - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -static void -yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, yyscan_t yyscanner) -{ - YYFPRINTF (yyoutput, "%s %s (", - yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); - - yy_symbol_value_print (yyoutput, yytype, yyvaluep, yyscanner); - YYFPRINTF (yyoutput, ")"); -} - -/*------------------------------------------------------------------. -| yy_stack_print -- Print the state stack from its BOTTOM up to its | -| TOP (included). | -`------------------------------------------------------------------*/ - -static void -yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) -{ - YYFPRINTF (stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) - { - int yybot = *yybottom; - YYFPRINTF (stderr, " %d", yybot); - } - YYFPRINTF (stderr, "\n"); -} - -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (0) - - -/*------------------------------------------------. -| Report that the YYRULE is going to be reduced. | -`------------------------------------------------*/ - -static void -yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule, yyscan_t yyscanner) -{ - unsigned long int yylno = yyrline[yyrule]; - int yynrhs = yyr2[yyrule]; - int yyi; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); - /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) - { - YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, - yystos[yyssp[yyi + 1 - yynrhs]], - &(yyvsp[(yyi + 1) - (yynrhs)]) - , yyscanner); - YYFPRINTF (stderr, "\n"); - } -} - -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyssp, yyvsp, Rule, yyscanner); \ -} while (0) - -/* Nonzero means print parse trace. It is left uninitialized so that - multiple parsers can coexist. */ -int yydebug; -#else /* !YYDEBUG */ -# define YYDPRINTF(Args) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) -# define YY_STACK_PRINT(Bottom, Top) -# define YY_REDUCE_PRINT(Rule) -#endif /* !YYDEBUG */ - - -/* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH -# define YYINITDEPTH 200 -#endif - -/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only - if the built-in stack extension method is used). - - Do not make this value too large; the results are undefined if - YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) - evaluated with infinite-precision integer arithmetic. */ - -#ifndef YYMAXDEPTH -# define YYMAXDEPTH 10000 -#endif - - -#if YYERROR_VERBOSE - -# ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen strlen -# else -/* Return the length of YYSTR. */ -static YYSIZE_T -yystrlen (const char *yystr) -{ - YYSIZE_T yylen; - for (yylen = 0; yystr[yylen]; yylen++) - continue; - return yylen; -} -# endif -# endif - -# ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ -static char * -yystpcpy (char *yydest, const char *yysrc) -{ - char *yyd = yydest; - const char *yys = yysrc; - - while ((*yyd++ = *yys++) != '\0') - continue; - - return yyd - 1; -} -# endif -# endif - -# ifndef yytnamerr -/* Copy to YYRES the contents of YYSTR after stripping away unnecessary - quotes and backslashes, so that it's suitable for yyerror. The - heuristic is that double-quoting is unnecessary unless the string - contains an apostrophe, a comma, or backslash (other than - backslash-backslash). YYSTR is taken from yytname. If YYRES is - null, do not copy; instead, return the length of what the result - would have been. */ -static YYSIZE_T -yytnamerr (char *yyres, const char *yystr) -{ - if (*yystr == '"') - { - YYSIZE_T yyn = 0; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } - - if (! yyres) - return yystrlen (yystr); - - return yystpcpy (yyres, yystr) - yyres; -} -# endif - -/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message - about the unexpected token YYTOKEN for the state stack whose top is - YYSSP. - - Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is - not large enough to hold the message. In that case, also set - *YYMSG_ALLOC to the required number of bytes. Return 2 if the - required number of bytes is too large to store. */ -static int -yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, - yytype_int16 *yyssp, int yytoken) -{ - YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); - YYSIZE_T yysize = yysize0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - /* Internationalized format string. */ - const char *yyformat = YY_NULLPTR; - /* Arguments of yyformat. */ - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - /* Number of reported tokens (one for the "unexpected", one per - "expected"). */ - int yycount = 0; - - /* There are many possibilities here to consider: - - If this state is a consistent state with a default action, then - the only way this function was invoked is if the default action - is an error action. In that case, don't check for expected - tokens because there are none. - - The only way there can be no lookahead present (in yychar) is if - this state is a consistent state with a default action. Thus, - detecting the absence of a lookahead is sufficient to determine - that there is no unexpected or expected token to report. In that - case, just report a simple "syntax error". - - Don't assume there isn't a lookahead just because this state is a - consistent state with a default action. There might have been a - previous inconsistent state, consistent state with a non-default - action, or user semantic action that manipulated yychar. - - Of course, the expected token list depends on states to have - correct lookahead information, and it depends on the parser not - to perform extra reductions after fetching a lookahead from the - scanner and before detecting a syntax error. Thus, state merging - (from LALR or IELR) and default reductions corrupt the expected - token list. However, the list is correct for canonical LR with - one exception: it will still contain any token that will not be - accepted due to an error action in a later state. - */ - if (yytoken != YYEMPTY) - { - int yyn = yypact[*yyssp]; - yyarg[yycount++] = yytname[yytoken]; - if (!yypact_value_is_default (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR - && !yytable_value_is_error (yytable[yyx + yyn])) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - break; - } - yyarg[yycount++] = yytname[yyx]; - { - YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); - if (! (yysize <= yysize1 - && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } - } - } - } - - switch (yycount) - { -# define YYCASE_(N, S) \ - case N: \ - yyformat = S; \ - break - YYCASE_(0, YY_("syntax error")); - YYCASE_(1, YY_("syntax error, unexpected %s")); - YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); - YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); - YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); - YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); -# undef YYCASE_ - } - - { - YYSIZE_T yysize1 = yysize + yystrlen (yyformat); - if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } - - if (*yymsg_alloc < yysize) - { - *yymsg_alloc = 2 * yysize; - if (! (yysize <= *yymsg_alloc - && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return 1; - } - - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - { - char *yyp = *yymsg; - int yyi = 0; - while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyformat += 2; - } - else - { - yyp++; - yyformat++; - } - } - return 0; -} -#endif /* YYERROR_VERBOSE */ - -/*-----------------------------------------------. -| Release the memory associated to this symbol. | -`-----------------------------------------------*/ - -static void -yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, yyscan_t yyscanner) -{ - YYUSE (yyvaluep); - YYUSE (yyscanner); - if (!yymsg) - yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YYUSE (yytype); - YY_IGNORE_MAYBE_UNINITIALIZED_END -} - - - - -/*----------. -| yyparse. | -`----------*/ - -int -yyparse (yyscan_t yyscanner) -{ -/* The lookahead symbol. */ -int yychar; - - -/* The semantic value of the lookahead symbol. */ -/* Default value used for initialization, for pacifying older GCCs - or non-GCC compilers. */ -YY_INITIAL_VALUE (static YYSTYPE yyval_default;) -YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); - - /* Number of syntax errors so far. */ - int yynerrs; - - int yystate; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - - /* The stacks and their tools: - 'yyss': related to states. - 'yyvs': related to semantic values. - - Refer to the stacks through separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss; - yytype_int16 *yyssp; - - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs; - YYSTYPE *yyvsp; - - YYSIZE_T yystacksize; - - int yyn; - int yyresult; - /* Lookahead token as an internal (translated) token number. */ - int yytoken = 0; - /* The variables used to return semantic value and location from the - action routines. */ - YYSTYPE yyval; - -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif - -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) - - /* The number of symbols on the RHS of the reduced rule. - Keep to zero when no symbol should be popped. */ - int yylen = 0; - - yyssp = yyss = yyssa; - yyvsp = yyvs = yyvsa; - yystacksize = YYINITDEPTH; - - YYDPRINTF ((stderr, "Starting parse\n")); - - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ - goto yysetstate; - -/*------------------------------------------------------------. -| yynewstate -- Push a new state, which is found in yystate. | -`------------------------------------------------------------*/ - yynewstate: - /* In all cases, when you get here, the value and location stacks - have just been pushed. So pushing a state here evens the stacks. */ - yyssp++; - - yysetstate: - *yyssp = yystate; - - if (yyss + yystacksize - 1 <= yyssp) - { - /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = yyssp - yyss + 1; - -#ifdef yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yystacksize); - - yyss = yyss1; - yyvs = yyvs1; - } -#else /* no yyoverflow */ -# ifndef YYSTACK_RELOCATE - goto yyexhaustedlab; -# else - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); -# undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); - } -# endif -#endif /* no yyoverflow */ - - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); - - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } - - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - - if (yystate == YYFINAL) - YYACCEPT; - - goto yybackup; - -/*-----------. -| yybackup. | -`-----------*/ -yybackup: - - /* Do appropriate processing given the current state. Read a - lookahead token if we need one and don't already have one. */ - - /* First try to decide what to do without reference to lookahead token. */ - yyn = yypact[yystate]; - if (yypact_value_is_default (yyn)) - goto yydefault; - - /* Not known => get a lookahead token if don't already have one. */ - - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ - if (yychar == YYEMPTY) - { - YYDPRINTF ((stderr, "Reading a token: ")); - yychar = yylex (&yylval, yyscanner); - } - - if (yychar <= YYEOF) - { - yychar = yytoken = YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); - } - else - { - yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); - } - - /* If the proper action on seeing token YYTOKEN is to reduce or to - detect an error, take that action. */ - yyn += yytoken; - if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) - goto yydefault; - yyn = yytable[yyn]; - if (yyn <= 0) - { - if (yytable_value_is_error (yyn)) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } - - /* Count tokens shifted since error; after three, turn off error - status. */ - if (yyerrstatus) - yyerrstatus--; - - /* Shift the lookahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - - /* Discard the shifted token. */ - yychar = YYEMPTY; - - yystate = yyn; - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - *++yyvsp = yylval; - YY_IGNORE_MAYBE_UNINITIALIZED_END - - goto yynewstate; - - -/*-----------------------------------------------------------. -| yydefault -- do the default action for the current state. | -`-----------------------------------------------------------*/ -yydefault: - yyn = yydefact[yystate]; - if (yyn == 0) - goto yyerrlab; - goto yyreduce; - - -/*-----------------------------. -| yyreduce -- Do a reduction. | -`-----------------------------*/ -yyreduce: - /* yyn is the number of a rule to reduce with. */ - yylen = yyr2[yyn]; - - /* If YYLEN is nonzero, implement the default value of the action: - '$$ = $1'. - - Otherwise, the following line sets YYVAL to garbage. - This behavior is undocumented and Bison - users should not rely upon it. Assigning to YYVAL - unconditionally makes the parser a bit smaller, and it avoids a - GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1-yylen]; - - - YY_REDUCE_PRINT (yyn); - switch (yyn) - { - case 2: -#line 73 "cmExprParser.y" /* yacc.c:1646 */ - { - cmExpr_yyget_extra(yyscanner)->SetResult((yyvsp[0].Number)); - } -#line 1289 "cmExprParser.cxx" /* yacc.c:1646 */ - break; - - case 3: -#line 78 "cmExprParser.y" /* yacc.c:1646 */ - { - (yyval.Number) = (yyvsp[0].Number); - } -#line 1297 "cmExprParser.cxx" /* yacc.c:1646 */ - break; - - case 4: -#line 81 "cmExprParser.y" /* yacc.c:1646 */ - { - (yyval.Number) = (yyvsp[-2].Number) | (yyvsp[0].Number); - } -#line 1305 "cmExprParser.cxx" /* yacc.c:1646 */ - break; - - case 5: -#line 86 "cmExprParser.y" /* yacc.c:1646 */ - { - (yyval.Number) = (yyvsp[0].Number); - } -#line 1313 "cmExprParser.cxx" /* yacc.c:1646 */ - break; - - case 6: -#line 89 "cmExprParser.y" /* yacc.c:1646 */ - { - (yyval.Number) = (yyvsp[-2].Number) ^ (yyvsp[0].Number); - } -#line 1321 "cmExprParser.cxx" /* yacc.c:1646 */ - break; - - case 7: -#line 94 "cmExprParser.y" /* yacc.c:1646 */ - { - (yyval.Number) = (yyvsp[0].Number); - } -#line 1329 "cmExprParser.cxx" /* yacc.c:1646 */ - break; - - case 8: -#line 97 "cmExprParser.y" /* yacc.c:1646 */ - { - (yyval.Number) = (yyvsp[-2].Number) & (yyvsp[0].Number); - } -#line 1337 "cmExprParser.cxx" /* yacc.c:1646 */ - break; - - case 9: -#line 102 "cmExprParser.y" /* yacc.c:1646 */ - { - (yyval.Number) = (yyvsp[0].Number); - } -#line 1345 "cmExprParser.cxx" /* yacc.c:1646 */ - break; - - case 10: -#line 105 "cmExprParser.y" /* yacc.c:1646 */ - { - (yyval.Number) = (yyvsp[-2].Number) << (yyvsp[0].Number); - } -#line 1353 "cmExprParser.cxx" /* yacc.c:1646 */ - break; - - case 11: -#line 108 "cmExprParser.y" /* yacc.c:1646 */ - { - (yyval.Number) = (yyvsp[-2].Number) >> (yyvsp[0].Number); - } -#line 1361 "cmExprParser.cxx" /* yacc.c:1646 */ - break; - - case 12: -#line 113 "cmExprParser.y" /* yacc.c:1646 */ - { - (yyval.Number) = (yyvsp[0].Number); - } -#line 1369 "cmExprParser.cxx" /* yacc.c:1646 */ - break; - - case 13: -#line 116 "cmExprParser.y" /* yacc.c:1646 */ - { - (yyval.Number) = (yyvsp[-2].Number) + (yyvsp[0].Number); - } -#line 1377 "cmExprParser.cxx" /* yacc.c:1646 */ - break; - - case 14: -#line 119 "cmExprParser.y" /* yacc.c:1646 */ - { - (yyval.Number) = (yyvsp[-2].Number) - (yyvsp[0].Number); - } -#line 1385 "cmExprParser.cxx" /* yacc.c:1646 */ - break; - - case 15: -#line 124 "cmExprParser.y" /* yacc.c:1646 */ - { - (yyval.Number) = (yyvsp[0].Number); - } -#line 1393 "cmExprParser.cxx" /* yacc.c:1646 */ - break; - - case 16: -#line 127 "cmExprParser.y" /* yacc.c:1646 */ - { - (yyval.Number) = (yyvsp[-2].Number) * (yyvsp[0].Number); - } -#line 1401 "cmExprParser.cxx" /* yacc.c:1646 */ - break; - - case 17: -#line 130 "cmExprParser.y" /* yacc.c:1646 */ - { - (yyval.Number) = (yyvsp[-2].Number) / (yyvsp[0].Number); - } -#line 1409 "cmExprParser.cxx" /* yacc.c:1646 */ - break; - - case 18: -#line 133 "cmExprParser.y" /* yacc.c:1646 */ - { - (yyval.Number) = (yyvsp[-2].Number) % (yyvsp[0].Number); - } -#line 1417 "cmExprParser.cxx" /* yacc.c:1646 */ - break; - - case 19: -#line 138 "cmExprParser.y" /* yacc.c:1646 */ - { - (yyval.Number) = (yyvsp[0].Number); - } -#line 1425 "cmExprParser.cxx" /* yacc.c:1646 */ - break; - - case 20: -#line 141 "cmExprParser.y" /* yacc.c:1646 */ - { - (yyval.Number) = + (yyvsp[0].Number); - } -#line 1433 "cmExprParser.cxx" /* yacc.c:1646 */ - break; - - case 21: -#line 144 "cmExprParser.y" /* yacc.c:1646 */ - { - (yyval.Number) = - (yyvsp[0].Number); - } -#line 1441 "cmExprParser.cxx" /* yacc.c:1646 */ - break; - - case 22: -#line 149 "cmExprParser.y" /* yacc.c:1646 */ - { - (yyval.Number) = (yyvsp[0].Number); - } -#line 1449 "cmExprParser.cxx" /* yacc.c:1646 */ - break; - - case 23: -#line 152 "cmExprParser.y" /* yacc.c:1646 */ - { - (yyval.Number) = (yyvsp[-1].Number); - } -#line 1457 "cmExprParser.cxx" /* yacc.c:1646 */ - break; - - -#line 1461 "cmExprParser.cxx" /* yacc.c:1646 */ - default: break; - } - /* User semantic actions sometimes alter yychar, and that requires - that yytoken be updated with the new translation. We take the - approach of translating immediately before every use of yytoken. - One alternative is translating here after every semantic action, - but that translation would be missed if the semantic action invokes - YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or - if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an - incorrect destructor might then be invoked immediately. In the - case of YYERROR or YYBACKUP, subsequent parser actions might lead - to an incorrect destructor call or verbose syntax error message - before the lookahead is translated. */ - YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); - - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - - *++yyvsp = yyval; - - /* Now 'shift' the result of the reduction. Determine what state - that goes to, based on the state we popped back to and the rule - number reduced by. */ - - yyn = yyr1[yyn]; - - yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; - if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTOKENS]; - - goto yynewstate; - - -/*--------------------------------------. -| yyerrlab -- here on detecting error. | -`--------------------------------------*/ -yyerrlab: - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); - - /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) - { - ++yynerrs; -#if ! YYERROR_VERBOSE - yyerror (yyscanner, YY_("syntax error")); -#else -# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ - yyssp, yytoken) - { - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = YYSYNTAX_ERROR; - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == 1) - { - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); - if (!yymsg) - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = 2; - } - else - { - yysyntax_error_status = YYSYNTAX_ERROR; - yymsgp = yymsg; - } - } - yyerror (yyscanner, yymsgp); - if (yysyntax_error_status == 2) - goto yyexhaustedlab; - } -# undef YYSYNTAX_ERROR -#endif - } - - - - if (yyerrstatus == 3) - { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ - - if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } - else - { - yydestruct ("Error: discarding", - yytoken, &yylval, yyscanner); - yychar = YYEMPTY; - } - } - -#if 0 - /* Else will try to reuse lookahead token after shifting the error - token. */ - goto yyerrlab1; - - -/*---------------------------------------------------. -| yyerrorlab -- error raised explicitly by YYERROR. | -`---------------------------------------------------*/ -yyerrorlab: - - /* Pacify compilers like GCC when the user code never invokes - YYERROR and the label yyerrorlab therefore never appears in user - code. */ - if (/*CONSTCOND*/ 0) - goto yyerrorlab; - - /* Do not reclaim the symbols of the rule whose action triggered - this YYERROR. */ - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - yystate = *yyssp; - goto yyerrlab1; - - -/*-------------------------------------------------------------. -| yyerrlab1 -- common code for both syntax error and YYERROR. | -`-------------------------------------------------------------*/ -yyerrlab1: -#endif - yyerrstatus = 3; /* Each real token shifted decrements this. */ - - for (;;) - { - yyn = yypact[yystate]; - if (!yypact_value_is_default (yyn)) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } - - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; - - - yydestruct ("Error: popping", - yystos[yystate], yyvsp, yyscanner); - YYPOPSTACK (1); - yystate = *yyssp; - YY_STACK_PRINT (yyss, yyssp); - } - - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - *++yyvsp = yylval; - YY_IGNORE_MAYBE_UNINITIALIZED_END - - - /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); - - yystate = yyn; - goto yynewstate; - - -/*-------------------------------------. -| yyacceptlab -- YYACCEPT comes here. | -`-------------------------------------*/ -yyacceptlab: - yyresult = 0; - goto yyreturn; - -/*-----------------------------------. -| yyabortlab -- YYABORT comes here. | -`-----------------------------------*/ -yyabortlab: - yyresult = 1; - goto yyreturn; - -#if !defined yyoverflow || YYERROR_VERBOSE -/*-------------------------------------------------. -| yyexhaustedlab -- memory exhaustion comes here. | -`-------------------------------------------------*/ -yyexhaustedlab: - yyerror (yyscanner, YY_("memory exhausted")); - yyresult = 2; - /* Fall through. */ -#endif - -yyreturn: - if (yychar != YYEMPTY) - { - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = YYTRANSLATE (yychar); - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval, yyscanner); - } - /* Do not reclaim the symbols of the rule whose action triggered - this YYABORT or YYACCEPT. */ - YYPOPSTACK (yylen); - YY_STACK_PRINT (yyss, yyssp); - while (yyssp != yyss) - { - yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp, yyscanner); - YYPOPSTACK (1); - } -#ifndef yyoverflow - if (yyss != yyssa) - YYSTACK_FREE (yyss); -#endif -#if YYERROR_VERBOSE - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); -#endif - return yyresult; -} -#line 157 "cmExprParser.y" /* yacc.c:1906 */ - -/* End of grammar */ - -/*--------------------------------------------------------------------------*/ -void cmExpr_yyerror(yyscan_t yyscanner, const char* message) -{ - cmExpr_yyget_extra(yyscanner)->Error(message); -} - diff --git a/Source/cmExprParser.y b/Source/cmExprParser.y deleted file mode 100644 index 220f7c8..0000000 --- a/Source/cmExprParser.y +++ /dev/null @@ -1,165 +0,0 @@ -%{ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ -/* - -This file must be translated to C and modified to build everywhere. - -Run bison like this: - - bison --yacc --name-prefix=cmExpr_yy --defines=cmExprParserTokens.h -ocmExprParser.cxx cmExprParser.y - -Modify cmExprParser.cxx: - - "#if 0" out yyerrorlab block in range ["goto yyerrlab1", "yyerrlab1:"] - -*/ - -#include "cmConfigure.h" // IWYU pragma: keep - -#include -#include - -/*-------------------------------------------------------------------------*/ -#define YYDEBUG 1 -#include "cmExprParserHelper.h" /* Interface to parser object. */ -#include "cmExprLexer.h" /* Interface to lexer object. */ -#include "cmExprParserTokens.h" /* Need YYSTYPE for YY_DECL. */ - -/* Forward declare the lexer entry point. */ -YY_DECL; - -/* Helper function to forward error callback from parser. */ -static void cmExpr_yyerror(yyscan_t yyscanner, const char* message); - -/* Disable some warnings in the generated code. */ -#ifdef _MSC_VER -# pragma warning (disable: 4102) /* Unused goto label. */ -# pragma warning (disable: 4065) /* Switch statement contains default but no case. */ -#endif -%} - -/* Generate a reentrant parser object. */ -%define api.pure - -/* Configure the parser to use a lexer object. */ -%lex-param {yyscan_t yyscanner} -%parse-param {yyscan_t yyscanner} - -%define parse.error verbose - -/*-------------------------------------------------------------------------*/ -/* Tokens */ -%token exp_PLUS -%token exp_MINUS -%token exp_TIMES -%token exp_DIVIDE -%token exp_MOD -%token exp_SHIFTLEFT -%token exp_SHIFTRIGHT -%token exp_OPENPARENT -%token exp_CLOSEPARENT -%token exp_OR; -%token exp_AND; -%token exp_XOR; -%token exp_NOT; -%token exp_NUMBER; - -/*-------------------------------------------------------------------------*/ -/* grammar */ -%% - - -start: - exp { - cmExpr_yyget_extra(yyscanner)->SetResult($1); - } - -exp: - bitwiseor { - $$ = $1; - } -| exp exp_OR bitwiseor { - $$ = $1 | $3; - } - -bitwiseor: - bitwisexor { - $$ = $1; - } -| bitwiseor exp_XOR bitwisexor { - $$ = $1 ^ $3; - } - -bitwisexor: - bitwiseand { - $$ = $1; - } -| bitwisexor exp_AND bitwiseand { - $$ = $1 & $3; - } - -bitwiseand: - shift { - $$ = $1; - } -| bitwiseand exp_SHIFTLEFT shift { - $$ = $1 << $3; - } -| bitwiseand exp_SHIFTRIGHT shift { - $$ = $1 >> $3; - } - -shift: - term { - $$ = $1; - } -| shift exp_PLUS term { - $$ = $1 + $3; - } -| shift exp_MINUS term { - $$ = $1 - $3; - } - -term: - unary { - $$ = $1; - } -| term exp_TIMES unary { - $$ = $1 * $3; - } -| term exp_DIVIDE unary { - $$ = $1 / $3; - } -| term exp_MOD unary { - $$ = $1 % $3; - } - -unary: - factor { - $$ = $1; - } -| exp_PLUS unary { - $$ = + $2; - } -| exp_MINUS unary { - $$ = - $2; - } - -factor: - exp_NUMBER { - $$ = $1; - } -| exp_OPENPARENT exp exp_CLOSEPARENT { - $$ = $2; - } -; - -%% -/* End of grammar */ - -/*--------------------------------------------------------------------------*/ -void cmExpr_yyerror(yyscan_t yyscanner, const char* message) -{ - cmExpr_yyget_extra(yyscanner)->Error(message); -} - diff --git a/Source/cmExprParserTokens.h b/Source/cmExprParserTokens.h deleted file mode 100644 index 84b2bbd..0000000 --- a/Source/cmExprParserTokens.h +++ /dev/null @@ -1,86 +0,0 @@ -/* A Bison parser, made by GNU Bison 3.0.4. */ - -/* Bison interface for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - -#ifndef YY_CMEXPR_YY_CMEXPRPARSERTOKENS_H_INCLUDED -# define YY_CMEXPR_YY_CMEXPRPARSERTOKENS_H_INCLUDED -/* Debug traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif -#if YYDEBUG -extern int cmExpr_yydebug; -#endif - -/* Token type. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - enum yytokentype - { - exp_PLUS = 258, - exp_MINUS = 259, - exp_TIMES = 260, - exp_DIVIDE = 261, - exp_MOD = 262, - exp_SHIFTLEFT = 263, - exp_SHIFTRIGHT = 264, - exp_OPENPARENT = 265, - exp_CLOSEPARENT = 266, - exp_OR = 267, - exp_AND = 268, - exp_XOR = 269, - exp_NOT = 270, - exp_NUMBER = 271 - }; -#endif -/* Tokens. */ -#define exp_PLUS 258 -#define exp_MINUS 259 -#define exp_TIMES 260 -#define exp_DIVIDE 261 -#define exp_MOD 262 -#define exp_SHIFTLEFT 263 -#define exp_SHIFTRIGHT 264 -#define exp_OPENPARENT 265 -#define exp_CLOSEPARENT 266 -#define exp_OR 267 -#define exp_AND 268 -#define exp_XOR 269 -#define exp_NOT 270 -#define exp_NUMBER 271 - -/* Value type. */ - - - -int cmExpr_yyparse (yyscan_t yyscanner); - -#endif /* !YY_CMEXPR_YY_CMEXPRPARSERTOKENS_H_INCLUDED */ diff --git a/Source/cmFortranLexer.cxx b/Source/cmFortranLexer.cxx deleted file mode 100644 index 01c09ac..0000000 --- a/Source/cmFortranLexer.cxx +++ /dev/null @@ -1,2511 +0,0 @@ -#include "cmStandardLexer.h" -#line 2 "cmFortranLexer.cxx" - -#line 4 "cmFortranLexer.cxx" - -#define FLEXINT_H 1 -#define YY_INT_ALIGNED short int - -/* A lexical scanner generated by flex */ - -#define FLEX_SCANNER -#define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 6 -#define YY_FLEX_SUBMINOR_VERSION 1 -#if YY_FLEX_SUBMINOR_VERSION > 0 -#define FLEX_BETA -#endif - -/* First, we deal with platform-specific or compiler-specific issues. */ - -/* begin standard C headers. */ -#include -#include -#include -#include - -/* end standard C headers. */ - -/* flex integer type definitions */ - -#ifndef FLEXINT_H -#define FLEXINT_H - -/* C99 systems have . Non-C99 systems may or may not. */ - -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - -/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. - */ -#ifndef __STDC_LIMIT_MACROS -#define __STDC_LIMIT_MACROS 1 -#endif - -#include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; -typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; -typedef uint32_t flex_uint32_t; -#else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; -typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; - -/* Limits of integral types. */ -#ifndef INT8_MIN -#define INT8_MIN (-128) -#endif -#ifndef INT16_MIN -#define INT16_MIN (-32767-1) -#endif -#ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) -#endif -#ifndef INT8_MAX -#define INT8_MAX (127) -#endif -#ifndef INT16_MAX -#define INT16_MAX (32767) -#endif -#ifndef INT32_MAX -#define INT32_MAX (2147483647) -#endif -#ifndef UINT8_MAX -#define UINT8_MAX (255U) -#endif -#ifndef UINT16_MAX -#define UINT16_MAX (65535U) -#endif -#ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) -#endif - -#endif /* ! C99 */ - -#endif /* ! FLEXINT_H */ - -/* TODO: this is always defined, so inline it */ -#define yyconst const - -#if defined(__GNUC__) && __GNUC__ >= 3 -#define yynoreturn __attribute__((__noreturn__)) -#else -#define yynoreturn -#endif - -/* Returned upon end-of-file. */ -#define YY_NULL 0 - -/* Promotes a possibly negative, possibly signed char to an unsigned - * integer for use as an array index. If the signed char is negative, - * we want to instead treat it as an 8-bit unsigned char, hence the - * double cast. - */ -#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) - -/* An opaque pointer. */ -#ifndef YY_TYPEDEF_YY_SCANNER_T -#define YY_TYPEDEF_YY_SCANNER_T -typedef void* yyscan_t; -#endif - -/* For convenience, these vars (plus the bison vars far below) - are macros in the reentrant scanner. */ -#define yyin yyg->yyin_r -#define yyout yyg->yyout_r -#define yyextra yyg->yyextra_r -#define yyleng yyg->yyleng_r -#define yytext yyg->yytext_r -#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) -#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) -#define yy_flex_debug yyg->yy_flex_debug_r - -/* Enter a start condition. This macro really ought to take a parameter, - * but we do it the disgusting crufty way forced on us by the ()-less - * definition of BEGIN. - */ -#define BEGIN yyg->yy_start = 1 + 2 * - -/* Translate the current start state into a value that can be later handed - * to BEGIN to return to the state. The YYSTATE alias is for lex - * compatibility. - */ -#define YY_START ((yyg->yy_start - 1) / 2) -#define YYSTATE YY_START - -/* Action number for EOF rule of a given start state. */ -#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) - -/* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE cmFortran_yyrestart(yyin ,yyscanner ) - -#define YY_END_OF_BUFFER_CHAR 0 - -/* Size of default input buffer. */ -#ifndef YY_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k. - * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. - * Ditto for the __ia64__ case accordingly. - */ -#define YY_BUF_SIZE 32768 -#else -#define YY_BUF_SIZE 16384 -#endif /* __ia64__ */ -#endif - -/* The state buf must be large enough to hold one state per character in the main buffer. - */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) - -#ifndef YY_TYPEDEF_YY_BUFFER_STATE -#define YY_TYPEDEF_YY_BUFFER_STATE -typedef struct yy_buffer_state *YY_BUFFER_STATE; -#endif - -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - -#define EOB_ACT_CONTINUE_SCAN 0 -#define EOB_ACT_END_OF_FILE 1 -#define EOB_ACT_LAST_MATCH 2 - - #define YY_LESS_LINENO(n) - #define YY_LINENO_REWIND_TO(ptr) - -/* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - *yy_cp = yyg->yy_hold_char; \ - YY_RESTORE_YY_MORE_OFFSET \ - yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } \ - while ( 0 ) - -#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) - -#ifndef YY_STRUCT_YY_BUFFER_STATE -#define YY_STRUCT_YY_BUFFER_STATE -struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - int yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; - -#define YY_BUFFER_NEW 0 -#define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via cmFortran_yyrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ -#define YY_BUFFER_EOF_PENDING 2 - - }; -#endif /* !YY_STRUCT_YY_BUFFER_STATE */ - -/* We provide macros for accessing buffer states in case in the - * future we want to put the buffer states in a more general - * "scanner state". - * - * Returns the top of the stack, or NULL. - */ -#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ - ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ - : NULL) - -/* Same as previous macro, but useful when we know that the buffer stack is not - * NULL or when we need an lvalue. For internal use only. - */ -#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] - -void cmFortran_yyrestart (FILE *input_file ,yyscan_t yyscanner ); -void cmFortran_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); -YY_BUFFER_STATE cmFortran_yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner ); -void cmFortran_yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); -void cmFortran_yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); -void cmFortran_yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); -void cmFortran_yypop_buffer_state (yyscan_t yyscanner ); - -static void cmFortran_yyensure_buffer_stack (yyscan_t yyscanner ); -static void cmFortran_yy_load_buffer_state (yyscan_t yyscanner ); -static void cmFortran_yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner ); - -#define YY_FLUSH_BUFFER cmFortran_yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner) - -YY_BUFFER_STATE cmFortran_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); -YY_BUFFER_STATE cmFortran_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); -YY_BUFFER_STATE cmFortran_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); - -void *cmFortran_yyalloc (yy_size_t ,yyscan_t yyscanner ); -void *cmFortran_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); -void cmFortran_yyfree (void * ,yyscan_t yyscanner ); - -#define yy_new_buffer cmFortran_yy_create_buffer - -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! YY_CURRENT_BUFFER ){ \ - cmFortran_yyensure_buffer_stack (yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = \ - cmFortran_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } - -#define yy_set_bol(at_bol) \ - { \ - if ( ! YY_CURRENT_BUFFER ){\ - cmFortran_yyensure_buffer_stack (yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = \ - cmFortran_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } - -#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) - -/* Begin user sect3 */ - -#define cmFortran_yywrap(yyscanner) (/*CONSTCOND*/1) -#define YY_SKIP_YYWRAP - -typedef unsigned char YY_CHAR; - -typedef int yy_state_type; - -#define yytext_ptr yytext_r - -static yy_state_type yy_get_previous_state (yyscan_t yyscanner ); -static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner); -static int yy_get_next_buffer (yyscan_t yyscanner ); -static void yynoreturn yy_fatal_error (yyconst char* msg ,yyscan_t yyscanner ); - -/* Done after the current pattern has been matched and before the - * corresponding action - sets up yytext. - */ -#define YY_DO_BEFORE_ACTION \ - yyg->yytext_ptr = yy_bp; \ - yyleng = (int) (yy_cp - yy_bp); \ - yyg->yy_hold_char = *yy_cp; \ - *yy_cp = '\0'; \ - yyg->yy_c_buf_p = yy_cp; - -#define YY_NUM_RULES 54 -#define YY_END_OF_BUFFER 55 -/* This struct is not used in this scanner, - but its presence is necessary. */ -struct yy_trans_info - { - flex_int32_t yy_verify; - flex_int32_t yy_nxt; - }; -static yyconst flex_int16_t yy_accept[210] = - { 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 55, 49, 51, 50, 53, 1, 49, 33, 2, 47, - 48, 35, 37, 50, 39, 49, 46, 46, 46, 46, - 46, 46, 49, 46, 51, 49, 50, 49, 46, 9, - 8, 9, 4, 3, 49, 0, 10, 0, 0, 0, - 0, 0, 33, 33, 34, 36, 39, 49, 46, 46, - 46, 46, 46, 46, 0, 52, 46, 0, 0, 0, - 12, 0, 0, 0, 0, 0, 0, 49, 0, 11, - 46, 0, 0, 5, 0, 0, 0, 29, 0, 0, - 33, 33, 33, 33, 0, 0, 40, 46, 46, 46, - - 46, 45, 12, 12, 0, 0, 0, 23, 0, 0, - 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 46, 46, 46, 46, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 30, 31, 0, 0, 0, 0, 0, 0, 46, 46, - 46, 46, 0, 24, 25, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 32, 27, 0, 0, 20, 0, - 46, 46, 43, 46, 0, 26, 21, 0, 0, 0, - 19, 0, 0, 18, 28, 0, 0, 41, 46, 46, - 17, 22, 0, 7, 38, 7, 15, 0, 46, 46, - - 14, 16, 42, 44, 0, 0, 0, 13, 0 - } ; - -static yyconst YY_CHAR yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, - 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 5, 6, 7, 8, 9, 1, 10, 11, 12, - 13, 14, 1, 15, 1, 1, 1, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 17, 18, 19, - 20, 21, 22, 1, 23, 24, 25, 26, 27, 28, - 29, 29, 30, 29, 29, 31, 32, 33, 34, 29, - 29, 35, 36, 37, 38, 29, 29, 29, 29, 29, - 1, 39, 1, 1, 40, 1, 23, 24, 41, 42, - - 43, 44, 29, 29, 45, 29, 29, 46, 32, 47, - 34, 29, 29, 35, 48, 37, 49, 29, 29, 29, - 29, 29, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 - } ; - -static yyconst YY_CHAR yy_meta[50] = - { 0, - 1, 2, 2, 3, 4, 3, 3, 1, 1, 3, - 3, 3, 3, 1, 3, 5, 3, 3, 1, 3, - 6, 1, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 1, 5, - 7, 7, 7, 7, 7, 7, 7, 7, 7 - } ; - -static yyconst flex_uint16_t yy_base[219] = - { 0, - 0, 48, 0, 49, 513, 56, 52, 57, 62, 68, - 515, 0, 583, 583, 509, 583, 97, 74, 583, 583, - 583, 583, 491, 583, 423, 421, 0, 19, 40, 392, - 36, 47, 86, 146, 88, 186, 413, 235, 275, 583, - 407, 98, 583, 583, 0, 386, 583, 323, 65, 73, - 81, 74, 127, 146, 583, 583, 583, 108, 0, 89, - 120, 92, 362, 116, 161, 583, 0, 167, 371, 0, - 168, 131, 146, 171, 81, 89, 352, 420, 353, 583, - 0, 349, 178, 196, 175, 197, 188, 208, 196, 197, - 256, 262, 324, 330, 337, 143, 0, 151, 220, 56, - - 305, 0, 336, 139, 225, 315, 305, 322, 318, 163, - 320, 268, 266, 369, 583, 340, 347, 350, 350, 351, - 357, 350, 357, 363, 140, 235, 359, 218, 362, 375, - 379, 380, 381, 385, 384, 404, 405, 243, 235, 213, - 583, 583, 405, 407, 410, 171, 410, 409, 419, 418, - 423, 426, 311, 583, 583, 428, 429, 431, 173, 462, - 435, 166, 145, 438, 583, 583, 441, 444, 583, 433, - 448, 89, 0, 438, 450, 583, 583, 452, 457, 487, - 583, 114, 0, 583, 583, 457, 462, 0, 465, 463, - 583, 583, 468, 583, 583, 583, 583, 470, 471, 474, - - 500, 583, 0, 0, 505, 0, 65, 583, 583, 524, - 531, 537, 540, 547, 554, 561, 568, 575 - } ; - -static yyconst flex_int16_t yy_def[219] = - { 0, - 209, 1, 1, 1, 1, 1, 210, 210, 210, 210, - 209, 211, 209, 209, 212, 209, 211, 209, 209, 209, - 209, 209, 209, 209, 209, 211, 213, 213, 213, 213, - 213, 213, 211, 213, 209, 209, 209, 214, 209, 209, - 209, 209, 209, 209, 211, 212, 209, 209, 209, 209, - 209, 209, 209, 215, 209, 209, 209, 211, 213, 213, - 213, 213, 213, 213, 209, 209, 34, 209, 209, 69, - 211, 209, 209, 209, 209, 209, 209, 214, 214, 209, - 39, 209, 209, 209, 209, 209, 209, 209, 209, 209, - 215, 215, 215, 215, 209, 209, 213, 213, 213, 213, - - 213, 213, 209, 209, 209, 209, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - 209, 209, 209, 209, 213, 213, 213, 213, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 213, 213, - 213, 213, 209, 209, 209, 209, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - 213, 213, 213, 213, 209, 209, 209, 209, 209, 209, - 209, 216, 217, 209, 209, 209, 209, 213, 213, 213, - 209, 209, 209, 209, 209, 209, 209, 209, 213, 213, - - 209, 209, 213, 213, 209, 218, 218, 209, 0, 209, - 209, 209, 209, 209, 209, 209, 209, 209 - } ; - -static yyconst flex_uint16_t yy_nxt[633] = - { 0, - 12, 13, 14, 13, 13, 15, 16, 12, 17, 18, - 19, 20, 21, 12, 22, 12, 23, 24, 12, 25, - 12, 26, 27, 27, 27, 27, 28, 27, 27, 29, - 27, 30, 27, 27, 27, 31, 27, 32, 33, 34, - 27, 27, 28, 27, 29, 27, 27, 31, 32, 35, - 35, 60, 35, 35, 41, 36, 36, 35, 37, 41, - 35, 42, 43, 36, 41, 60, 42, 43, 44, 38, - 41, 42, 61, 63, 44, 53, 53, 42, 53, 54, - 39, 39, 64, 55, 63, 208, 61, 65, 66, 68, - 65, 85, 68, 127, 64, 69, 39, 39, 48, 83, - - 84, 48, 83, 86, 127, 87, 90, 85, 88, 95, - 110, 189, 95, 89, 97, 195, 195, 100, 86, 87, - 90, 111, 49, 50, 88, 110, 51, 89, 53, 53, - 97, 53, 54, 100, 52, 111, 55, 96, 49, 50, - 104, 51, 102, 104, 98, 52, 45, 92, 53, 183, - 92, 93, 96, 45, 45, 94, 99, 105, 102, 45, - 98, 67, 65, 66, 45, 65, 45, 45, 68, 104, - 182, 68, 104, 105, 69, 124, 106, 149, 107, 83, - 84, 125, 83, 71, 45, 67, 45, 70, 149, 124, - 70, 106, 107, 45, 45, 136, 125, 114, 108, 45, - - 114, 71, 116, 109, 45, 115, 45, 45, 168, 136, - 179, 72, 73, 119, 108, 74, 75, 109, 116, 168, - 122, 179, 123, 76, 45, 45, 117, 72, 73, 119, - 74, 75, 118, 120, 76, 78, 122, 80, 123, 163, - 121, 117, 78, 78, 118, 164, 126, 162, 78, 120, - 78, 152, 129, 78, 121, 78, 78, 92, 53, 164, - 92, 93, 126, 92, 53, 94, 92, 93, 129, 150, - 139, 94, 138, 78, 78, 79, 79, 80, 79, 79, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 81, 79, 79, 79, 79, 79, 79, 81, 81, 81, - - 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, - 81, 81, 81, 79, 81, 81, 81, 81, 81, 81, - 81, 81, 81, 81, 48, 92, 53, 48, 92, 93, - 132, 92, 53, 94, 92, 93, 128, 104, 95, 94, - 104, 95, 135, 175, 130, 137, 132, 133, 49, 50, - 131, 103, 51, 113, 134, 80, 112, 175, 135, 130, - 52, 137, 131, 133, 49, 50, 96, 51, 134, 140, - 114, 52, 70, 114, 141, 70, 142, 144, 115, 143, - 146, 96, 145, 147, 140, 101, 103, 148, 47, 151, - 141, 153, 142, 144, 143, 146, 72, 73, 145, 147, - - 74, 75, 154, 148, 151, 155, 153, 157, 76, 156, - 158, 82, 72, 73, 159, 74, 75, 77, 154, 76, - 78, 155, 80, 157, 156, 62, 158, 78, 78, 159, - 160, 161, 165, 78, 166, 78, 167, 169, 78, 170, - 78, 78, 58, 57, 171, 172, 160, 161, 165, 173, - 166, 174, 167, 169, 170, 176, 177, 178, 78, 78, - 171, 172, 181, 180, 184, 173, 180, 174, 185, 186, - 187, 176, 177, 178, 188, 190, 191, 103, 181, 192, - 184, 187, 193, 197, 185, 186, 190, 198, 180, 199, - 188, 180, 191, 200, 201, 192, 202, 203, 193, 197, - - 204, 205, 103, 198, 205, 199, 205, 56, 200, 205, - 201, 47, 202, 203, 209, 37, 204, 209, 206, 209, - 209, 209, 209, 206, 40, 40, 40, 40, 40, 40, - 40, 45, 209, 209, 209, 45, 45, 46, 46, 46, - 46, 46, 46, 46, 59, 209, 59, 79, 79, 79, - 79, 79, 79, 79, 91, 91, 91, 91, 91, 91, - 91, 194, 194, 194, 209, 194, 194, 194, 196, 209, - 196, 209, 196, 196, 196, 207, 207, 207, 207, 207, - 209, 207, 11, 209, 209, 209, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - 209, 209 - } ; - -static yyconst flex_int16_t yy_chk[633] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 4, 28, 2, 4, 7, 2, 4, 6, 6, 8, - 6, 7, 7, 6, 9, 28, 8, 8, 9, 6, - 10, 9, 29, 31, 10, 18, 18, 10, 18, 18, - 6, 6, 32, 18, 31, 207, 29, 33, 33, 35, - 33, 49, 35, 100, 32, 35, 6, 6, 17, 42, - - 42, 17, 42, 50, 100, 50, 52, 49, 51, 58, - 75, 172, 58, 51, 60, 182, 182, 62, 50, 50, - 52, 76, 17, 17, 51, 75, 17, 51, 53, 53, - 60, 53, 53, 62, 17, 76, 53, 58, 17, 17, - 104, 17, 64, 104, 61, 17, 34, 54, 54, 163, - 54, 54, 58, 34, 34, 54, 61, 72, 64, 34, - 61, 34, 65, 65, 34, 65, 34, 34, 68, 71, - 162, 68, 71, 72, 68, 96, 73, 125, 73, 83, - 83, 98, 83, 71, 34, 34, 36, 36, 125, 96, - 36, 73, 73, 36, 36, 110, 98, 84, 74, 36, - - 84, 36, 85, 74, 36, 84, 36, 36, 146, 110, - 159, 36, 36, 87, 74, 36, 36, 74, 85, 146, - 89, 159, 90, 36, 36, 36, 86, 36, 36, 87, - 36, 36, 86, 88, 36, 38, 89, 38, 90, 139, - 88, 86, 38, 38, 86, 140, 99, 138, 38, 88, - 38, 128, 105, 38, 88, 38, 38, 91, 91, 140, - 91, 91, 99, 92, 92, 91, 92, 92, 105, 126, - 113, 92, 112, 38, 38, 39, 39, 39, 39, 39, - 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, - 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, - - 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, - 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, - 39, 39, 39, 39, 48, 93, 93, 48, 93, 93, - 107, 94, 94, 93, 94, 94, 101, 103, 95, 94, - 103, 95, 109, 153, 106, 111, 107, 108, 48, 48, - 106, 103, 48, 82, 108, 79, 77, 153, 109, 106, - 48, 111, 106, 108, 48, 48, 95, 48, 108, 116, - 114, 48, 69, 114, 117, 69, 118, 120, 114, 119, - 122, 95, 121, 123, 116, 63, 69, 124, 46, 127, - 117, 129, 118, 120, 119, 122, 69, 69, 121, 123, - - 69, 69, 130, 124, 127, 131, 129, 133, 69, 132, - 134, 41, 69, 69, 135, 69, 69, 37, 130, 69, - 78, 131, 78, 133, 132, 30, 134, 78, 78, 135, - 136, 137, 143, 78, 144, 78, 145, 147, 78, 148, - 78, 78, 26, 25, 149, 150, 136, 137, 143, 151, - 144, 152, 145, 147, 148, 156, 157, 158, 78, 78, - 149, 150, 161, 160, 164, 151, 160, 152, 167, 168, - 170, 156, 157, 158, 171, 174, 175, 160, 161, 178, - 164, 170, 179, 186, 167, 168, 174, 187, 180, 189, - 171, 180, 175, 190, 193, 178, 198, 199, 179, 186, - - 200, 201, 180, 187, 201, 189, 205, 23, 190, 205, - 193, 15, 198, 199, 11, 5, 200, 0, 201, 0, - 0, 0, 0, 205, 210, 210, 210, 210, 210, 210, - 210, 211, 0, 0, 0, 211, 211, 212, 212, 212, - 212, 212, 212, 212, 213, 0, 213, 214, 214, 214, - 214, 214, 214, 214, 215, 215, 215, 215, 215, 215, - 215, 216, 216, 216, 0, 216, 216, 216, 217, 0, - 217, 0, 217, 217, 217, 218, 218, 218, 218, 218, - 0, 218, 209, 209, 209, 209, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - 209, 209 - } ; - -/* The intent behind this definition is that it'll catch - * any uses of REJECT which flex missed. - */ -#define REJECT reject_used_but_not_detected -#define yymore() yymore_used_but_not_detected -#define YY_MORE_ADJ 0 -#define YY_RESTORE_YY_MORE_OFFSET -#line 1 "cmFortranLexer.in.l" -#line 2 "cmFortranLexer.in.l" -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ -/*------------------------------------------------------------------------- - Portions of this source have been derived from makedepf90 version 2.8.8, - - Copyright (C) 2000--2006 Erik Edelmann - - The code was originally distributed under the GPL but permission - from the copyright holder has been obtained to distribute this - derived work under the CMake license. --------------------------------------------------------------------------*/ - -/* - -This file must be translated to C++ and modified to build everywhere. - -Run flex >= 2.6 like this: - - flex -i --nounistd -DFLEXINT_H --prefix=cmFortran_yy --header-file=cmFortranLexer.h -ocmFortranLexer.cxx cmFortranLexer.in.l - -Modify cmFortranLexer.cxx: - - remove trailing whitespace: sed -i 's/\s*$//' cmFortranLexer.h cmFortranLexer.cxx - - remove blank lines at end of file - - #include "cmStandardLexer.h" at the top - - add cast in cmFortran_yy_scan_bytes for loop condition of _yybytes_len to size_t - -*/ - -/* IWYU pragma: no_forward_declare yyguts_t */ - -#undef YY_NO_UNPUT - -#define cmFortranLexer_cxx -#include "cmFortranParser.h" /* Interface to parser object. */ - -/* Replace the lexer input function. */ -#undef YY_INPUT -#define YY_INPUT(buf, result, max_size) \ - { result = cmFortranParser_Input(yyextra, buf, max_size); } - -/* Include the set of tokens from the parser. */ -#include "cmFortranParserTokens.h" - -/*--------------------------------------------------------------------------*/ - - -#line 688 "cmFortranLexer.cxx" - -#define INITIAL 0 -#define free_fmt 1 -#define fixed_fmt 2 -#define str_sq 3 -#define str_dq 4 - -#ifndef YY_EXTRA_TYPE -#define YY_EXTRA_TYPE void * -#endif - -/* Holds the entire state of the reentrant scanner. */ -struct yyguts_t - { - - /* User-defined. Not touched by flex. */ - YY_EXTRA_TYPE yyextra_r; - - /* The rest are the same as the globals declared in the non-reentrant scanner. */ - FILE *yyin_r, *yyout_r; - size_t yy_buffer_stack_top; /**< index of top of stack. */ - size_t yy_buffer_stack_max; /**< capacity of stack. */ - YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ - char yy_hold_char; - int yy_n_chars; - int yyleng_r; - char *yy_c_buf_p; - int yy_init; - int yy_start; - int yy_did_buffer_switch_on_eof; - int yy_start_stack_ptr; - int yy_start_stack_depth; - int *yy_start_stack; - yy_state_type yy_last_accepting_state; - char* yy_last_accepting_cpos; - - int yylineno_r; - int yy_flex_debug_r; - - char *yytext_r; - int yy_more_flag; - int yy_more_len; - - }; /* end struct yyguts_t */ - -static int yy_init_globals (yyscan_t yyscanner ); - -int cmFortran_yylex_init (yyscan_t* scanner); - -int cmFortran_yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); - -/* Accessor methods to globals. - These are made visible to non-reentrant scanners for convenience. */ - -int cmFortran_yylex_destroy (yyscan_t yyscanner ); - -int cmFortran_yyget_debug (yyscan_t yyscanner ); - -void cmFortran_yyset_debug (int debug_flag ,yyscan_t yyscanner ); - -YY_EXTRA_TYPE cmFortran_yyget_extra (yyscan_t yyscanner ); - -void cmFortran_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); - -FILE *cmFortran_yyget_in (yyscan_t yyscanner ); - -void cmFortran_yyset_in (FILE * _in_str ,yyscan_t yyscanner ); - -FILE *cmFortran_yyget_out (yyscan_t yyscanner ); - -void cmFortran_yyset_out (FILE * _out_str ,yyscan_t yyscanner ); - - int cmFortran_yyget_leng (yyscan_t yyscanner ); - -char *cmFortran_yyget_text (yyscan_t yyscanner ); - -int cmFortran_yyget_lineno (yyscan_t yyscanner ); - -void cmFortran_yyset_lineno (int _line_number ,yyscan_t yyscanner ); - -int cmFortran_yyget_column (yyscan_t yyscanner ); - -void cmFortran_yyset_column (int _column_no ,yyscan_t yyscanner ); - -/* Macros after this point can all be overridden by user definitions in - * section 1. - */ - -#ifndef YY_SKIP_YYWRAP -#ifdef __cplusplus -extern "C" int cmFortran_yywrap (yyscan_t yyscanner ); -#else -extern int cmFortran_yywrap (yyscan_t yyscanner ); -#endif -#endif - -#ifndef YY_NO_UNPUT - - static void yyunput (int c,char *buf_ptr ,yyscan_t yyscanner); - -#endif - -#ifndef yytext_ptr -static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); -#endif - -#ifndef YY_NO_INPUT - -#ifdef __cplusplus -static int yyinput (yyscan_t yyscanner ); -#else -static int input (yyscan_t yyscanner ); -#endif - -#endif - -/* Amount of stuff to slurp up with each read. */ -#ifndef YY_READ_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k */ -#define YY_READ_BUF_SIZE 16384 -#else -#define YY_READ_BUF_SIZE 8192 -#endif /* __ia64__ */ -#endif - -/* Copy whatever the last rule matched to the standard output. */ -#ifndef ECHO -/* This used to be an fputs(), but since the string might contain NUL's, - * we now use fwrite(). - */ -#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) -#endif - -/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, - * is returned in "result". - */ -#ifndef YY_INPUT -#define YY_INPUT(buf,result,max_size) \ - if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ - { \ - int c = '*'; \ - size_t n; \ - for ( n = 0; n < max_size && \ - (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } \ - else \ - { \ - errno=0; \ - while ( (result = (int) fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ - { \ - if( errno != EINTR) \ - { \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - break; \ - } \ - errno=0; \ - clearerr(yyin); \ - } \ - }\ -\ - -#endif - -/* No semi-colon after return; correct usage is to write "yyterminate();" - - * we don't want an extra ';' after the "return" because that will cause - * some compilers to complain about unreachable statements. - */ -#ifndef yyterminate -#define yyterminate() return YY_NULL -#endif - -/* Number of entries by which start-condition stack grows. */ -#ifndef YY_START_STACK_INCR -#define YY_START_STACK_INCR 25 -#endif - -/* Report a fatal error. */ -#ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) -#endif - -/* end tables serialization structures and prototypes */ - -/* Default declaration of generated scanner - a define so the user can - * easily add parameters. - */ -#ifndef YY_DECL -#define YY_DECL_IS_OURS 1 - -extern int cmFortran_yylex (yyscan_t yyscanner); - -#define YY_DECL int cmFortran_yylex (yyscan_t yyscanner) -#endif /* !YY_DECL */ - -/* Code executed at the beginning of each rule, after yytext and yyleng - * have been set up. - */ -#ifndef YY_USER_ACTION -#define YY_USER_ACTION -#endif - -/* Code executed at the end of each rule. */ -#ifndef YY_BREAK -#define YY_BREAK /*LINTED*/break; -#endif - -#define YY_RULE_SETUP \ - if ( yyleng > 0 ) \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ - (yytext[yyleng - 1] == '\n'); \ - YY_USER_ACTION - -/** The main scanner function which does all the work. - */ -YY_DECL -{ - yy_state_type yy_current_state; - char *yy_cp, *yy_bp; - int yy_act; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if ( !yyg->yy_init ) - { - yyg->yy_init = 1; - -#ifdef YY_USER_INIT - YY_USER_INIT; -#endif - - if ( ! yyg->yy_start ) - yyg->yy_start = 1; /* first start state */ - - if ( ! yyin ) - yyin = stdin; - - if ( ! yyout ) - yyout = stdout; - - if ( ! YY_CURRENT_BUFFER ) { - cmFortran_yyensure_buffer_stack (yyscanner); - YY_CURRENT_BUFFER_LVALUE = - cmFortran_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); - } - - cmFortran_yy_load_buffer_state(yyscanner ); - } - - { -#line 56 "cmFortranLexer.in.l" - - -#line 951 "cmFortranLexer.cxx" - - while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ - { - yy_cp = yyg->yy_c_buf_p; - - /* Support of yytext. */ - *yy_cp = yyg->yy_hold_char; - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = yyg->yy_start; - yy_current_state += YY_AT_BOL(); -yy_match: - do - { - YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 210 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; - ++yy_cp; - } - while ( yy_base[yy_current_state] != 583 ); - -yy_find_action: - yy_act = yy_accept[yy_current_state]; - if ( yy_act == 0 ) - { /* have to back up */ - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - yy_act = yy_accept[yy_current_state]; - } - - YY_DO_BEFORE_ACTION; - -do_action: /* This label is used only to access EOF actions. */ - - switch ( yy_act ) - { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = yyg->yy_hold_char; - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - goto yy_find_action; - -case 1: -YY_RULE_SETUP -#line 58 "cmFortranLexer.in.l" -{ - cmFortranParser_StringStart(yyextra); - cmFortranParser_SetOldStartcond(yyextra, YY_START); - BEGIN(str_dq); -} - YY_BREAK -case 2: -YY_RULE_SETUP -#line 64 "cmFortranLexer.in.l" -{ - cmFortranParser_StringStart(yyextra); - cmFortranParser_SetOldStartcond(yyextra, YY_START); - BEGIN(str_sq); -} - YY_BREAK -case 3: -#line 71 "cmFortranLexer.in.l" -case 4: -YY_RULE_SETUP -#line 71 "cmFortranLexer.in.l" -{ - BEGIN(cmFortranParser_GetOldStartcond(yyextra) ); - yylvalp->string = strdup(cmFortranParser_StringEnd(yyextra)); - return STRING; -} - YY_BREAK -case 5: -/* rule 5 can match eol */ -#line 78 "cmFortranLexer.in.l" -case 6: -/* rule 6 can match eol */ -YY_RULE_SETUP -#line 78 "cmFortranLexer.in.l" -/* Ignore (continued strings, free fmt) */ - YY_BREAK -case 7: -/* rule 7 can match eol */ -YY_RULE_SETUP -#line 80 "cmFortranLexer.in.l" -{ - if (cmFortranParser_GetOldStartcond(yyextra) == fixed_fmt) - ; /* Ignore (cont. strings, fixed fmt) */ - else - { - unput(yytext[strlen(yytext)-1]); - } -} - YY_BREAK -case 8: -/* rule 8 can match eol */ -YY_RULE_SETUP -#line 90 "cmFortranLexer.in.l" -{ - unput ('\n'); - BEGIN(INITIAL); - return UNTERMINATED_STRING; -} - YY_BREAK -case 9: -YY_RULE_SETUP -#line 96 "cmFortranLexer.in.l" -{ - cmFortranParser_StringAppend(yyextra, yytext[0]); -} - YY_BREAK -case 10: -/* rule 10 can match eol */ -YY_RULE_SETUP -#line 100 "cmFortranLexer.in.l" -{ return EOSTMT; } /* Treat comments like */ - YY_BREAK -case 11: -/* rule 11 can match eol */ -YY_RULE_SETUP -#line 101 "cmFortranLexer.in.l" -{ return EOSTMT; } /* empty lines */ - YY_BREAK -case 12: -YY_RULE_SETUP -#line 103 "cmFortranLexer.in.l" -{ return CPP_LINE_DIRECTIVE; } - YY_BREAK -case 13: -/* rule 13 can match eol */ -YY_RULE_SETUP -#line 104 "cmFortranLexer.in.l" -{ - yytext[yyleng-1] = 0; - yylvalp->string = strdup(strchr(yytext, '<')+1); - return CPP_INCLUDE_ANGLE; -} - YY_BREAK -case 14: -YY_RULE_SETUP -#line 109 "cmFortranLexer.in.l" -{ return CPP_INCLUDE; } - YY_BREAK -case 15: -YY_RULE_SETUP -#line 110 "cmFortranLexer.in.l" -{ return F90PPR_INCLUDE; } - YY_BREAK -case 16: -YY_RULE_SETUP -#line 111 "cmFortranLexer.in.l" -{ return COCO_INCLUDE; } - YY_BREAK -case 17: -YY_RULE_SETUP -#line 113 "cmFortranLexer.in.l" -{ return CPP_DEFINE; } - YY_BREAK -case 18: -YY_RULE_SETUP -#line 114 "cmFortranLexer.in.l" -{ return F90PPR_DEFINE; } - YY_BREAK -case 19: -YY_RULE_SETUP -#line 116 "cmFortranLexer.in.l" -{ return CPP_UNDEF; } - YY_BREAK -case 20: -YY_RULE_SETUP -#line 117 "cmFortranLexer.in.l" -{ return F90PPR_UNDEF; } - YY_BREAK -case 21: -YY_RULE_SETUP -#line 119 "cmFortranLexer.in.l" -{ return CPP_IFDEF; } - YY_BREAK -case 22: -YY_RULE_SETUP -#line 120 "cmFortranLexer.in.l" -{ return CPP_IFNDEF; } - YY_BREAK -case 23: -YY_RULE_SETUP -#line 121 "cmFortranLexer.in.l" -{ return CPP_IF; } - YY_BREAK -case 24: -YY_RULE_SETUP -#line 122 "cmFortranLexer.in.l" -{ return CPP_ELIF; } - YY_BREAK -case 25: -YY_RULE_SETUP -#line 123 "cmFortranLexer.in.l" -{ return CPP_ELSE; } - YY_BREAK -case 26: -YY_RULE_SETUP -#line 124 "cmFortranLexer.in.l" -{ return CPP_ENDIF; } - YY_BREAK -case 27: -YY_RULE_SETUP -#line 126 "cmFortranLexer.in.l" -{ return F90PPR_IFDEF; } - YY_BREAK -case 28: -YY_RULE_SETUP -#line 127 "cmFortranLexer.in.l" -{ return F90PPR_IFNDEF; } - YY_BREAK -case 29: -YY_RULE_SETUP -#line 128 "cmFortranLexer.in.l" -{ return F90PPR_IF; } - YY_BREAK -case 30: -YY_RULE_SETUP -#line 129 "cmFortranLexer.in.l" -{ return F90PPR_ELIF; } - YY_BREAK -case 31: -YY_RULE_SETUP -#line 130 "cmFortranLexer.in.l" -{ return F90PPR_ELSE; } - YY_BREAK -case 32: -YY_RULE_SETUP -#line 131 "cmFortranLexer.in.l" -{ return F90PPR_ENDIF; } - YY_BREAK -/* Line continuations, possible involving comments. */ -case 33: -/* rule 33 can match eol */ -YY_RULE_SETUP -#line 134 "cmFortranLexer.in.l" - - YY_BREAK -case 34: -/* rule 34 can match eol */ -YY_RULE_SETUP -#line 135 "cmFortranLexer.in.l" - - YY_BREAK -case 35: -YY_RULE_SETUP -#line 137 "cmFortranLexer.in.l" -{ return COMMA; } - YY_BREAK -case 36: -YY_RULE_SETUP -#line 139 "cmFortranLexer.in.l" -{ return DCOLON; } - YY_BREAK -case 37: -YY_RULE_SETUP -#line 140 "cmFortranLexer.in.l" -{ return COLON; } - YY_BREAK -case 38: -/* rule 38 can match eol */ -YY_RULE_SETUP -#line 142 "cmFortranLexer.in.l" -{ return GARBAGE; } - YY_BREAK -case 39: -YY_RULE_SETUP -#line 144 "cmFortranLexer.in.l" -{ return ASSIGNMENT_OP; } - YY_BREAK -case 40: -YY_RULE_SETUP -#line 146 "cmFortranLexer.in.l" -{ return END; } - YY_BREAK -case 41: -YY_RULE_SETUP -#line 147 "cmFortranLexer.in.l" -{ return INCLUDE; } - YY_BREAK -case 42: -YY_RULE_SETUP -#line 148 "cmFortranLexer.in.l" -{ return INTERFACE; } - YY_BREAK -case 43: -YY_RULE_SETUP -#line 149 "cmFortranLexer.in.l" -{ return MODULE; } - YY_BREAK -case 44: -YY_RULE_SETUP -#line 150 "cmFortranLexer.in.l" -{ return SUBMODULE; } - YY_BREAK -case 45: -YY_RULE_SETUP -#line 151 "cmFortranLexer.in.l" -{ return USE; } - YY_BREAK -case 46: -YY_RULE_SETUP -#line 153 "cmFortranLexer.in.l" -{ - yylvalp->string = strdup(yytext); - return WORD; -} - YY_BREAK -case 47: -YY_RULE_SETUP -#line 158 "cmFortranLexer.in.l" -{ return LPAREN; } - YY_BREAK -case 48: -YY_RULE_SETUP -#line 159 "cmFortranLexer.in.l" -{ return RPAREN; } - YY_BREAK -case 49: -YY_RULE_SETUP -#line 161 "cmFortranLexer.in.l" -{ return GARBAGE; } - YY_BREAK -case 50: -/* rule 50 can match eol */ -YY_RULE_SETUP -#line 163 "cmFortranLexer.in.l" -{ return EOSTMT; } - YY_BREAK -case 51: -YY_RULE_SETUP -#line 166 "cmFortranLexer.in.l" -/* Ignore */ - YY_BREAK -case 52: -/* rule 52 can match eol */ -YY_RULE_SETUP -#line 167 "cmFortranLexer.in.l" -/* Ignore line-endings preceded by \ */ - YY_BREAK -case 53: -YY_RULE_SETUP -#line 169 "cmFortranLexer.in.l" -{ return *yytext; } - YY_BREAK -case YY_STATE_EOF(INITIAL): -case YY_STATE_EOF(free_fmt): -case YY_STATE_EOF(fixed_fmt): -case YY_STATE_EOF(str_sq): -case YY_STATE_EOF(str_dq): -#line 171 "cmFortranLexer.in.l" -{ - if(!cmFortranParser_FilePop(yyextra) ) - { - return YY_NULL; - } -} - YY_BREAK -case 54: -YY_RULE_SETUP -#line 178 "cmFortranLexer.in.l" -ECHO; - YY_BREAK -#line 1331 "cmFortranLexer.cxx" - - case YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = yyg->yy_hold_char; - YY_RESTORE_YY_MORE_OFFSET - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * cmFortran_yylex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; - - yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( yyscanner ); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); - - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++yyg->yy_c_buf_p; - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = yyg->yy_c_buf_p; - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer( yyscanner ) ) - { - case EOB_ACT_END_OF_FILE: - { - yyg->yy_did_buffer_switch_on_eof = 0; - - if ( cmFortran_yywrap(yyscanner ) ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else - { - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = - yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( yyscanner ); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - yyg->yy_c_buf_p = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; - - yy_current_state = yy_get_previous_state( yyscanner ); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ - } /* end of user's declarations */ -} /* end of cmFortran_yylex */ - -/* yy_get_next_buffer - try to read in a new buffer - * - * Returns a code representing an action: - * EOB_ACT_LAST_MATCH - - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position - * EOB_ACT_END_OF_FILE - end of file - */ -static int yy_get_next_buffer (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - char *source = yyg->yytext_ptr; - yy_size_t number_to_move, i; - int ret_val; - - if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) - YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) - { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else - { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (yy_size_t) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1; - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; - - else - { - int num_to_read = - YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; - - int yy_c_buf_p_offset = - (int) (yyg->yy_c_buf_p - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) - { - int new_size = b->yy_buf_size * 2; - - if ( new_size <= 0 ) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - cmFortran_yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner ); - } - else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = NULL; - - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); - - yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - - number_to_move - 1; - - } - - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - yyg->yy_n_chars, num_to_read ); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - if ( yyg->yy_n_chars == 0 ) - { - if ( number_to_move == YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - cmFortran_yyrestart(yyin ,yyscanner); - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - if ((int) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) cmFortran_yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner ); - if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); - } - - yyg->yy_n_chars += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; - - yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; -} - -/* yy_get_previous_state - get the state just before the EOB char was reached */ - - static yy_state_type yy_get_previous_state (yyscan_t yyscanner) -{ - yy_state_type yy_current_state; - char *yy_cp; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - yy_current_state = yyg->yy_start; - yy_current_state += YY_AT_BOL(); - - for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) - { - YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 210 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; - } - - return yy_current_state; -} - -/* yy_try_NUL_trans - try to make a transition on the NUL character - * - * synopsis - * next_state = yy_try_NUL_trans( current_state ); - */ - static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) -{ - int yy_is_jam; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ - char *yy_cp = yyg->yy_c_buf_p; - - YY_CHAR yy_c = 1; - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 210 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; - yy_is_jam = (yy_current_state == 209); - - (void)yyg; - return yy_is_jam ? 0 : yy_current_state; -} - -#ifndef YY_NO_UNPUT - - static void yyunput (int c, char * yy_bp , yyscan_t yyscanner) -{ - char *yy_cp; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - yy_cp = yyg->yy_c_buf_p; - - /* undo effects of setting up yytext */ - *yy_cp = yyg->yy_hold_char; - - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) - { /* need to shift things up to make room */ - /* +2 for EOB chars. */ - int number_to_move = yyg->yy_n_chars + 2; - char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; - char *source = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; - - while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - *--dest = *--source; - - yy_cp += (int) (dest - source); - yy_bp += (int) (dest - source); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = - yyg->yy_n_chars = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size; - - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) - YY_FATAL_ERROR( "flex scanner push-back overflow" ); - } - - *--yy_cp = (char) c; - - yyg->yytext_ptr = yy_bp; - yyg->yy_hold_char = *yy_cp; - yyg->yy_c_buf_p = yy_cp; -} - -#endif - -#ifndef YY_NO_INPUT -#ifdef __cplusplus - static int yyinput (yyscan_t yyscanner) -#else - static int input (yyscan_t yyscanner) -#endif - -{ - int c; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - *yyg->yy_c_buf_p = yyg->yy_hold_char; - - if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) - { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) - /* This was really a NUL. */ - *yyg->yy_c_buf_p = '\0'; - - else - { /* need more input */ - int offset = yyg->yy_c_buf_p - yyg->yytext_ptr; - ++yyg->yy_c_buf_p; - - switch ( yy_get_next_buffer( yyscanner ) ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - cmFortran_yyrestart(yyin ,yyscanner); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: - { - if ( cmFortran_yywrap(yyscanner ) ) - return 0; - - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; -#ifdef __cplusplus - return yyinput(yyscanner); -#else - return input(yyscanner); -#endif - } - - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = yyg->yytext_ptr + offset; - break; - } - } - } - - c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ - *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ - yyg->yy_hold_char = *++yyg->yy_c_buf_p; - - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); - - return c; -} -#endif /* ifndef YY_NO_INPUT */ - -/** Immediately switch to a different input stream. - * @param input_file A readable stream. - * @param yyscanner The scanner object. - * @note This function does not reset the start condition to @c INITIAL . - */ - void cmFortran_yyrestart (FILE * input_file , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if ( ! YY_CURRENT_BUFFER ){ - cmFortran_yyensure_buffer_stack (yyscanner); - YY_CURRENT_BUFFER_LVALUE = - cmFortran_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); - } - - cmFortran_yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner); - cmFortran_yy_load_buffer_state(yyscanner ); -} - -/** Switch to a different input buffer. - * @param new_buffer The new input buffer. - * @param yyscanner The scanner object. - */ - void cmFortran_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* TODO. We should be able to replace this entire function body - * with - * cmFortran_yypop_buffer_state(); - * cmFortran_yypush_buffer_state(new_buffer); - */ - cmFortran_yyensure_buffer_stack (yyscanner); - if ( YY_CURRENT_BUFFER == new_buffer ) - return; - - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - cmFortran_yy_load_buffer_state(yyscanner ); - - /* We don't actually know whether we did this switch during - * EOF (cmFortran_yywrap()) processing, but the only time this flag - * is looked at is after cmFortran_yywrap() is called, so it's safe - * to go ahead and always set it. - */ - yyg->yy_did_buffer_switch_on_eof = 1; -} - -static void cmFortran_yy_load_buffer_state (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - yyg->yy_hold_char = *yyg->yy_c_buf_p; -} - -/** Allocate and initialize an input buffer state. - * @param file A readable stream. - * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. - * @param yyscanner The scanner object. - * @return the allocated buffer state. - */ - YY_BUFFER_STATE cmFortran_yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) -{ - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) cmFortran_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in cmFortran_yy_create_buffer()" ); - - b->yy_buf_size = (yy_size_t)size; - - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *) cmFortran_yyalloc(b->yy_buf_size + 2 ,yyscanner ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in cmFortran_yy_create_buffer()" ); - - b->yy_is_our_buffer = 1; - - cmFortran_yy_init_buffer(b,file ,yyscanner); - - return b; -} - -/** Destroy the buffer. - * @param b a buffer created with cmFortran_yy_create_buffer() - * @param yyscanner The scanner object. - */ - void cmFortran_yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if ( ! b ) - return; - - if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; - - if ( b->yy_is_our_buffer ) - cmFortran_yyfree((void *) b->yy_ch_buf ,yyscanner ); - - cmFortran_yyfree((void *) b ,yyscanner ); -} - -/* Initializes or reinitializes a buffer. - * This function is sometimes called more than once on the same buffer, - * such as during a cmFortran_yyrestart() or at EOF. - */ - static void cmFortran_yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) - -{ - int oerrno = errno; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - cmFortran_yy_flush_buffer(b ,yyscanner); - - b->yy_input_file = file; - b->yy_fill_buffer = 1; - - /* If b is the current buffer, then cmFortran_yy_init_buffer was _probably_ - * called from cmFortran_yyrestart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER){ - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } - - b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; - - errno = oerrno; -} - -/** Discard all buffered characters. On the next scan, YY_INPUT will be called. - * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. - * @param yyscanner The scanner object. - */ - void cmFortran_yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if ( ! b ) - return; - - b->yy_n_chars = 0; - - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - - b->yy_buf_pos = &b->yy_ch_buf[0]; - - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; - - if ( b == YY_CURRENT_BUFFER ) - cmFortran_yy_load_buffer_state(yyscanner ); -} - -/** Pushes the new state onto the stack. The new state becomes - * the current state. This function will allocate the stack - * if necessary. - * @param new_buffer The new state. - * @param yyscanner The scanner object. - */ -void cmFortran_yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (new_buffer == NULL) - return; - - cmFortran_yyensure_buffer_stack(yyscanner); - - /* This block is copied from cmFortran_yy_switch_to_buffer. */ - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - yyg->yy_buffer_stack_top++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from cmFortran_yy_switch_to_buffer. */ - cmFortran_yy_load_buffer_state(yyscanner ); - yyg->yy_did_buffer_switch_on_eof = 1; -} - -/** Removes and deletes the top of the stack, if present. - * The next element becomes the new top. - * @param yyscanner The scanner object. - */ -void cmFortran_yypop_buffer_state (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!YY_CURRENT_BUFFER) - return; - - cmFortran_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner); - YY_CURRENT_BUFFER_LVALUE = NULL; - if (yyg->yy_buffer_stack_top > 0) - --yyg->yy_buffer_stack_top; - - if (YY_CURRENT_BUFFER) { - cmFortran_yy_load_buffer_state(yyscanner ); - yyg->yy_did_buffer_switch_on_eof = 1; - } -} - -/* Allocates the stack if it does not exist. - * Guarantees space for at least one push. - */ -static void cmFortran_yyensure_buffer_stack (yyscan_t yyscanner) -{ - int num_to_alloc; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (!yyg->yy_buffer_stack) { - - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ - yyg->yy_buffer_stack = (struct yy_buffer_state**)cmFortran_yyalloc - (num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); - if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in cmFortran_yyensure_buffer_stack()" ); - - memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - - yyg->yy_buffer_stack_max = num_to_alloc; - yyg->yy_buffer_stack_top = 0; - return; - } - - if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ - - /* Increase the buffer to prepare for a possible push. */ - yy_size_t grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = yyg->yy_buffer_stack_max + grow_size; - yyg->yy_buffer_stack = (struct yy_buffer_state**)cmFortran_yyrealloc - (yyg->yy_buffer_stack, - num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); - if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in cmFortran_yyensure_buffer_stack()" ); - - /* zero only the new slots.*/ - memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); - yyg->yy_buffer_stack_max = num_to_alloc; - } -} - -/** Setup the input buffer state to scan directly from a user-specified character buffer. - * @param base the character buffer - * @param size the size in bytes of the character buffer - * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE cmFortran_yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) -{ - YY_BUFFER_STATE b; - - if ( size < 2 || - base[size-2] != YY_END_OF_BUFFER_CHAR || - base[size-1] != YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return NULL; - - b = (YY_BUFFER_STATE) cmFortran_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in cmFortran_yy_scan_buffer()" ); - - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = NULL; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - cmFortran_yy_switch_to_buffer(b ,yyscanner ); - - return b; -} - -/** Setup the input buffer state to scan a string. The next call to cmFortran_yylex() will - * scan from a @e copy of @a str. - * @param yystr a NUL-terminated string to scan - * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. - * @note If you want to scan bytes that may contain NUL values, then use - * cmFortran_yy_scan_bytes() instead. - */ -YY_BUFFER_STATE cmFortran_yy_scan_string (yyconst char * yystr , yyscan_t yyscanner) -{ - - return cmFortran_yy_scan_bytes(yystr,(int) strlen(yystr) ,yyscanner); -} - -/** Setup the input buffer state to scan the given bytes. The next call to cmFortran_yylex() will - * scan from a @e copy of @a bytes. - * @param yybytes the byte buffer to scan - * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. - * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE cmFortran_yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner) -{ - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - yy_size_t i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = (yy_size_t) _yybytes_len + 2; - buf = (char *) cmFortran_yyalloc(n ,yyscanner ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in cmFortran_yy_scan_bytes()" ); - - for ( i = 0; i < (size_t)_yybytes_len; ++i ) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - - b = cmFortran_yy_scan_buffer(buf,n ,yyscanner); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in cmFortran_yy_scan_bytes()" ); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; -} - -#ifndef YY_EXIT_FAILURE -#define YY_EXIT_FAILURE 2 -#endif - -static void yynoreturn yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - (void) fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); -} - -/* Redefine yyless() so it works in section 3 code. */ - -#undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - yytext[yyleng] = yyg->yy_hold_char; \ - yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ - yyg->yy_hold_char = *yyg->yy_c_buf_p; \ - *yyg->yy_c_buf_p = '\0'; \ - yyleng = yyless_macro_arg; \ - } \ - while ( 0 ) - -/* Accessor methods (get/set functions) to struct members. */ - -/** Get the user-defined data for this scanner. - * @param yyscanner The scanner object. - */ -YY_EXTRA_TYPE cmFortran_yyget_extra (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyextra; -} - -/** Get the current line number. - * @param yyscanner The scanner object. - */ -int cmFortran_yyget_lineno (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (! YY_CURRENT_BUFFER) - return 0; - - return yylineno; -} - -/** Get the current column number. - * @param yyscanner The scanner object. - */ -int cmFortran_yyget_column (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (! YY_CURRENT_BUFFER) - return 0; - - return yycolumn; -} - -/** Get the input stream. - * @param yyscanner The scanner object. - */ -FILE *cmFortran_yyget_in (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyin; -} - -/** Get the output stream. - * @param yyscanner The scanner object. - */ -FILE *cmFortran_yyget_out (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyout; -} - -/** Get the length of the current token. - * @param yyscanner The scanner object. - */ -int cmFortran_yyget_leng (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyleng; -} - -/** Get the current token. - * @param yyscanner The scanner object. - */ - -char *cmFortran_yyget_text (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yytext; -} - -/** Set the user-defined data. This data is never touched by the scanner. - * @param user_defined The data to be associated with this scanner. - * @param yyscanner The scanner object. - */ -void cmFortran_yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyextra = user_defined ; -} - -/** Set the current line number. - * @param _line_number line number - * @param yyscanner The scanner object. - */ -void cmFortran_yyset_lineno (int _line_number , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* lineno is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) - YY_FATAL_ERROR( "cmFortran_yyset_lineno called with no buffer" ); - - yylineno = _line_number; -} - -/** Set the current column. - * @param _column_no column number - * @param yyscanner The scanner object. - */ -void cmFortran_yyset_column (int _column_no , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* column is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) - YY_FATAL_ERROR( "cmFortran_yyset_column called with no buffer" ); - - yycolumn = _column_no; -} - -/** Set the input stream. This does not discard the current - * input buffer. - * @param _in_str A readable stream. - * @param yyscanner The scanner object. - * @see cmFortran_yy_switch_to_buffer - */ -void cmFortran_yyset_in (FILE * _in_str , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyin = _in_str ; -} - -void cmFortran_yyset_out (FILE * _out_str , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyout = _out_str ; -} - -int cmFortran_yyget_debug (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yy_flex_debug; -} - -void cmFortran_yyset_debug (int _bdebug , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yy_flex_debug = _bdebug ; -} - -/* Accessor methods for yylval and yylloc */ - -/* User-visible API */ - -/* cmFortran_yylex_init is special because it creates the scanner itself, so it is - * the ONLY reentrant function that doesn't take the scanner as the last argument. - * That's why we explicitly handle the declaration, instead of using our macros. - */ - -int cmFortran_yylex_init(yyscan_t* ptr_yy_globals) - -{ - if (ptr_yy_globals == NULL){ - errno = EINVAL; - return 1; - } - - *ptr_yy_globals = (yyscan_t) cmFortran_yyalloc ( sizeof( struct yyguts_t ), NULL ); - - if (*ptr_yy_globals == NULL){ - errno = ENOMEM; - return 1; - } - - /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - - return yy_init_globals ( *ptr_yy_globals ); -} - -/* cmFortran_yylex_init_extra has the same functionality as cmFortran_yylex_init, but follows the - * convention of taking the scanner as the last argument. Note however, that - * this is a *pointer* to a scanner, as it will be allocated by this call (and - * is the reason, too, why this function also must handle its own declaration). - * The user defined value in the first argument will be available to cmFortran_yyalloc in - * the yyextra field. - */ - -int cmFortran_yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals ) - -{ - struct yyguts_t dummy_yyguts; - - cmFortran_yyset_extra (yy_user_defined, &dummy_yyguts); - - if (ptr_yy_globals == NULL){ - errno = EINVAL; - return 1; - } - - *ptr_yy_globals = (yyscan_t) cmFortran_yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); - - if (*ptr_yy_globals == NULL){ - errno = ENOMEM; - return 1; - } - - /* By setting to 0xAA, we expose bugs in - yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - - cmFortran_yyset_extra (yy_user_defined, *ptr_yy_globals); - - return yy_init_globals ( *ptr_yy_globals ); -} - -static int yy_init_globals (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from cmFortran_yylex_destroy(), so don't allocate here. - */ - - yyg->yy_buffer_stack = NULL; - yyg->yy_buffer_stack_top = 0; - yyg->yy_buffer_stack_max = 0; - yyg->yy_c_buf_p = NULL; - yyg->yy_init = 0; - yyg->yy_start = 0; - - yyg->yy_start_stack_ptr = 0; - yyg->yy_start_stack_depth = 0; - yyg->yy_start_stack = NULL; - -/* Defined in main.c */ -#ifdef YY_STDINIT - yyin = stdin; - yyout = stdout; -#else - yyin = NULL; - yyout = NULL; -#endif - - /* For future reference: Set errno on error, since we are called by - * cmFortran_yylex_init() - */ - return 0; -} - -/* cmFortran_yylex_destroy is for both reentrant and non-reentrant scanners. */ -int cmFortran_yylex_destroy (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* Pop the buffer stack, destroying each element. */ - while(YY_CURRENT_BUFFER){ - cmFortran_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner ); - YY_CURRENT_BUFFER_LVALUE = NULL; - cmFortran_yypop_buffer_state(yyscanner); - } - - /* Destroy the stack itself. */ - cmFortran_yyfree(yyg->yy_buffer_stack ,yyscanner); - yyg->yy_buffer_stack = NULL; - - /* Destroy the start condition stack. */ - cmFortran_yyfree(yyg->yy_start_stack ,yyscanner ); - yyg->yy_start_stack = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner so the next time - * cmFortran_yylex() is called, initialization will occur. */ - yy_init_globals( yyscanner); - - /* Destroy the main struct (reentrant only). */ - cmFortran_yyfree ( yyscanner , yyscanner ); - yyscanner = NULL; - return 0; -} - -/* - * Internal utility routines. - */ - -#ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - - int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; -} -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) -{ - int n; - for ( n = 0; s[n]; ++n ) - ; - - return n; -} -#endif - -void *cmFortran_yyalloc (yy_size_t size , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - return malloc(size); -} - -void *cmFortran_yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return realloc(ptr, size); -} - -void cmFortran_yyfree (void * ptr , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - free( (char *) ptr ); /* see cmFortran_yyrealloc() for (char *) cast */ -} - -#define YYTABLES_NAME "yytables" - -#line 178 "cmFortranLexer.in.l" - - - -/*--------------------------------------------------------------------------*/ -YY_BUFFER_STATE cmFortranLexer_GetCurrentBuffer(yyscan_t yyscanner) -{ - /* Hack into the internal flex-generated scanner to get the buffer. */ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return YY_CURRENT_BUFFER; -} diff --git a/Source/cmFortranLexer.h b/Source/cmFortranLexer.h deleted file mode 100644 index ddda919..0000000 --- a/Source/cmFortranLexer.h +++ /dev/null @@ -1,338 +0,0 @@ -#ifndef cmFortran_yyHEADER_H -#define cmFortran_yyHEADER_H 1 -#define cmFortran_yyIN_HEADER 1 - -#line 6 "cmFortranLexer.h" - -#line 8 "cmFortranLexer.h" - -#define FLEXINT_H 1 -#define YY_INT_ALIGNED short int - -/* A lexical scanner generated by flex */ - -#define FLEX_SCANNER -#define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 6 -#define YY_FLEX_SUBMINOR_VERSION 1 -#if YY_FLEX_SUBMINOR_VERSION > 0 -#define FLEX_BETA -#endif - -/* First, we deal with platform-specific or compiler-specific issues. */ - -/* begin standard C headers. */ -#include -#include -#include -#include - -/* end standard C headers. */ - -/* flex integer type definitions */ - -#ifndef FLEXINT_H -#define FLEXINT_H - -/* C99 systems have . Non-C99 systems may or may not. */ - -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - -/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. - */ -#ifndef __STDC_LIMIT_MACROS -#define __STDC_LIMIT_MACROS 1 -#endif - -#include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; -typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; -typedef uint32_t flex_uint32_t; -#else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; -typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; - -/* Limits of integral types. */ -#ifndef INT8_MIN -#define INT8_MIN (-128) -#endif -#ifndef INT16_MIN -#define INT16_MIN (-32767-1) -#endif -#ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) -#endif -#ifndef INT8_MAX -#define INT8_MAX (127) -#endif -#ifndef INT16_MAX -#define INT16_MAX (32767) -#endif -#ifndef INT32_MAX -#define INT32_MAX (2147483647) -#endif -#ifndef UINT8_MAX -#define UINT8_MAX (255U) -#endif -#ifndef UINT16_MAX -#define UINT16_MAX (65535U) -#endif -#ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) -#endif - -#endif /* ! C99 */ - -#endif /* ! FLEXINT_H */ - -/* TODO: this is always defined, so inline it */ -#define yyconst const - -#if defined(__GNUC__) && __GNUC__ >= 3 -#define yynoreturn __attribute__((__noreturn__)) -#else -#define yynoreturn -#endif - -/* An opaque pointer. */ -#ifndef YY_TYPEDEF_YY_SCANNER_T -#define YY_TYPEDEF_YY_SCANNER_T -typedef void* yyscan_t; -#endif - -/* For convenience, these vars (plus the bison vars far below) - are macros in the reentrant scanner. */ -#define yyin yyg->yyin_r -#define yyout yyg->yyout_r -#define yyextra yyg->yyextra_r -#define yyleng yyg->yyleng_r -#define yytext yyg->yytext_r -#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) -#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) -#define yy_flex_debug yyg->yy_flex_debug_r - -/* Size of default input buffer. */ -#ifndef YY_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k. - * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. - * Ditto for the __ia64__ case accordingly. - */ -#define YY_BUF_SIZE 32768 -#else -#define YY_BUF_SIZE 16384 -#endif /* __ia64__ */ -#endif - -#ifndef YY_TYPEDEF_YY_BUFFER_STATE -#define YY_TYPEDEF_YY_BUFFER_STATE -typedef struct yy_buffer_state *YY_BUFFER_STATE; -#endif - -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - -#ifndef YY_STRUCT_YY_BUFFER_STATE -#define YY_STRUCT_YY_BUFFER_STATE -struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - int yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; - - }; -#endif /* !YY_STRUCT_YY_BUFFER_STATE */ - -void cmFortran_yyrestart (FILE *input_file ,yyscan_t yyscanner ); -void cmFortran_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); -YY_BUFFER_STATE cmFortran_yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner ); -void cmFortran_yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); -void cmFortran_yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); -void cmFortran_yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); -void cmFortran_yypop_buffer_state (yyscan_t yyscanner ); - -YY_BUFFER_STATE cmFortran_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); -YY_BUFFER_STATE cmFortran_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); -YY_BUFFER_STATE cmFortran_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); - -void *cmFortran_yyalloc (yy_size_t ,yyscan_t yyscanner ); -void *cmFortran_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); -void cmFortran_yyfree (void * ,yyscan_t yyscanner ); - -/* Begin user sect3 */ - -#define cmFortran_yywrap(yyscanner) (/*CONSTCOND*/1) -#define YY_SKIP_YYWRAP - -#define yytext_ptr yytext_r - -#ifdef YY_HEADER_EXPORT_START_CONDITIONS -#define INITIAL 0 -#define free_fmt 1 -#define fixed_fmt 2 -#define str_sq 3 -#define str_dq 4 - -#endif - -#ifndef YY_EXTRA_TYPE -#define YY_EXTRA_TYPE void * -#endif - -int cmFortran_yylex_init (yyscan_t* scanner); - -int cmFortran_yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); - -/* Accessor methods to globals. - These are made visible to non-reentrant scanners for convenience. */ - -int cmFortran_yylex_destroy (yyscan_t yyscanner ); - -int cmFortran_yyget_debug (yyscan_t yyscanner ); - -void cmFortran_yyset_debug (int debug_flag ,yyscan_t yyscanner ); - -YY_EXTRA_TYPE cmFortran_yyget_extra (yyscan_t yyscanner ); - -void cmFortran_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); - -FILE *cmFortran_yyget_in (yyscan_t yyscanner ); - -void cmFortran_yyset_in (FILE * _in_str ,yyscan_t yyscanner ); - -FILE *cmFortran_yyget_out (yyscan_t yyscanner ); - -void cmFortran_yyset_out (FILE * _out_str ,yyscan_t yyscanner ); - - int cmFortran_yyget_leng (yyscan_t yyscanner ); - -char *cmFortran_yyget_text (yyscan_t yyscanner ); - -int cmFortran_yyget_lineno (yyscan_t yyscanner ); - -void cmFortran_yyset_lineno (int _line_number ,yyscan_t yyscanner ); - -int cmFortran_yyget_column (yyscan_t yyscanner ); - -void cmFortran_yyset_column (int _column_no ,yyscan_t yyscanner ); - -/* Macros after this point can all be overridden by user definitions in - * section 1. - */ - -#ifndef YY_SKIP_YYWRAP -#ifdef __cplusplus -extern "C" int cmFortran_yywrap (yyscan_t yyscanner ); -#else -extern int cmFortran_yywrap (yyscan_t yyscanner ); -#endif -#endif - -#ifndef yytext_ptr -static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); -#endif - -#ifndef YY_NO_INPUT - -#endif - -/* Amount of stuff to slurp up with each read. */ -#ifndef YY_READ_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k */ -#define YY_READ_BUF_SIZE 16384 -#else -#define YY_READ_BUF_SIZE 8192 -#endif /* __ia64__ */ -#endif - -/* Number of entries by which start-condition stack grows. */ -#ifndef YY_START_STACK_INCR -#define YY_START_STACK_INCR 25 -#endif - -/* Default declaration of generated scanner - a define so the user can - * easily add parameters. - */ -#ifndef YY_DECL -#define YY_DECL_IS_OURS 1 - -extern int cmFortran_yylex (yyscan_t yyscanner); - -#define YY_DECL int cmFortran_yylex (yyscan_t yyscanner) -#endif /* !YY_DECL */ - -/* yy_get_previous_state - get the state just before the EOB char was reached */ - -#undef YY_NEW_FILE -#undef YY_FLUSH_BUFFER -#undef yy_set_bol -#undef yy_new_buffer -#undef yy_set_interactive -#undef YY_DO_BEFORE_ACTION - -#ifdef YY_DECL_IS_OURS -#undef YY_DECL_IS_OURS -#undef YY_DECL -#endif - -#line 178 "cmFortranLexer.in.l" - - -#line 337 "cmFortranLexer.h" -#undef cmFortran_yyIN_HEADER -#endif /* cmFortran_yyHEADER_H */ diff --git a/Source/cmFortranLexer.in.l b/Source/cmFortranLexer.in.l deleted file mode 100644 index 1121210..0000000 --- a/Source/cmFortranLexer.in.l +++ /dev/null @@ -1,186 +0,0 @@ -%{ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ -/*------------------------------------------------------------------------- - Portions of this source have been derived from makedepf90 version 2.8.8, - - Copyright (C) 2000--2006 Erik Edelmann - - The code was originally distributed under the GPL but permission - from the copyright holder has been obtained to distribute this - derived work under the CMake license. --------------------------------------------------------------------------*/ - -/* - -This file must be translated to C++ and modified to build everywhere. - -Run flex >= 2.6 like this: - - flex -i --nounistd -DFLEXINT_H --prefix=cmFortran_yy --header-file=cmFortranLexer.h -ocmFortranLexer.cxx cmFortranLexer.in.l - -Modify cmFortranLexer.cxx: - - remove trailing whitespace: sed -i 's/\s*$//' cmFortranLexer.h cmFortranLexer.cxx - - remove blank lines at end of file - - #include "cmStandardLexer.h" at the top - - add cast in yy_scan_bytes for loop condition of _yybytes_len to size_t - -*/ - -/* IWYU pragma: no_forward_declare yyguts_t */ - -#undef YY_NO_UNPUT - -#define cmFortranLexer_cxx -#include "cmFortranParser.h" /* Interface to parser object. */ - -/* Replace the lexer input function. */ -#undef YY_INPUT -#define YY_INPUT(buf, result, max_size) \ - { result = cmFortranParser_Input(yyextra, buf, max_size); } - -/* Include the set of tokens from the parser. */ -#include "cmFortranParserTokens.h" - -/*--------------------------------------------------------------------------*/ -%} - - -%option reentrant -%option noyywrap -%pointer - -%s free_fmt fixed_fmt -%x str_sq str_dq - -%% - -\" { - cmFortranParser_StringStart(yyextra); - cmFortranParser_SetOldStartcond(yyextra, YY_START); - BEGIN(str_dq); -} - -' { - cmFortranParser_StringStart(yyextra); - cmFortranParser_SetOldStartcond(yyextra, YY_START); - BEGIN(str_sq); -} - -\" | -' { - BEGIN(cmFortranParser_GetOldStartcond(yyextra) ); - yylvalp->string = strdup(cmFortranParser_StringEnd(yyextra)); - return STRING; -} - -&[ \t]*\n | -&[ \t]*\n[ \t]*& /* Ignore (continued strings, free fmt) */ - -\n[ ]{5}[^ \t\n] { - if (cmFortranParser_GetOldStartcond(yyextra) == fixed_fmt) - ; /* Ignore (cont. strings, fixed fmt) */ - else - { - unput(yytext[strlen(yytext)-1]); - } -} - - -\n { - unput ('\n'); - BEGIN(INITIAL); - return UNTERMINATED_STRING; -} - -. { - cmFortranParser_StringAppend(yyextra, yytext[0]); -} - -!.*\n { return EOSTMT; } /* Treat comments like */ -^[cC*dD].*\n { return EOSTMT; } /* empty lines */ - -^[ \t]*#([ \t]*line)?[ \t]*[0-9]+[ \t]* { return CPP_LINE_DIRECTIVE; } -^[ \t]*#[ \t]*include[ \t]*<[^>]+> { - yytext[yyleng-1] = 0; - yylvalp->string = strdup(strchr(yytext, '<')+1); - return CPP_INCLUDE_ANGLE; -} -^[ \t]*#[ \t]*include { return CPP_INCLUDE; } -\$[ \t]*include { return F90PPR_INCLUDE; } -\?\?[ \t]*include { return COCO_INCLUDE; } - -^[ \t]*#[ \t]*define { return CPP_DEFINE; } -\$[ \t]*DEFINE { return F90PPR_DEFINE; } - -^[ \t]*#[ \t]*undef { return CPP_UNDEF; } -\$[ \t]*UNDEF { return F90PPR_UNDEF; } - -^[ \t]*#[ \t]*ifdef { return CPP_IFDEF; } -^[ \t]*#[ \t]*ifndef { return CPP_IFNDEF; } -^[ \t]*#[ \t]*if { return CPP_IF; } -^[ \t]*#[ \t]*elif { return CPP_ELIF; } -^[ \t]*#[ \t]*else { return CPP_ELSE; } -^[ \t]*#[ \t]*endif { return CPP_ENDIF; } - -$[ \t]*ifdef { return F90PPR_IFDEF; } -$[ \t]*ifndef { return F90PPR_IFNDEF; } -$[ \t]*if { return F90PPR_IF; } -$[ \t]*elif { return F90PPR_ELIF; } -$[ \t]*else { return F90PPR_ELSE; } -$[ \t]*endif { return F90PPR_ENDIF; } - - /* Line continuations, possible involving comments. */ -&([ \t\n]*|!.*)* -&([ \t\n]*|!.*)*& - -, { return COMMA; } - -:: { return DCOLON; } -: { return COLON; } - -\n[ ]{5}[^ ] { return GARBAGE; } - -=|=> { return ASSIGNMENT_OP; } - -[Ee][Nn][Dd] { return END; } -[Ii][Nn][Cc][Ll][Uu][Dd][Ee] { return INCLUDE; } -[Ii][Nn][Tt][Ee][Rr][Ff][Aa][Cc][Ee] { return INTERFACE; } -[Mm][Oo][Dd][Uu][Ll][Ee] { return MODULE; } -[Ss][Uu][bb][Mm][Oo][Dd][Uu][Ll][Ee] { return SUBMODULE; } -[Uu][Ss][Ee] { return USE; } - -[a-zA-Z_][a-zA-Z_0-9]* { - yylvalp->string = strdup(yytext); - return WORD; -} - -\( { return LPAREN; } -\) { return RPAREN; } - -[^ \t\n\r:;,!'"a-zA-Z=&()]+ { return GARBAGE; } - -;|\n { return EOSTMT; } - - -[ \t\r,] /* Ignore */ -\\[ \t]*\n /* Ignore line-endings preceded by \ */ - -. { return *yytext; } - -<> { - if(!cmFortranParser_FilePop(yyextra) ) - { - return YY_NULL; - } -} - -%% - -/*--------------------------------------------------------------------------*/ -YY_BUFFER_STATE cmFortranLexer_GetCurrentBuffer(yyscan_t yyscanner) -{ - /* Hack into the internal flex-generated scanner to get the buffer. */ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return YY_CURRENT_BUFFER; -} diff --git a/Source/cmFortranParser.cxx b/Source/cmFortranParser.cxx deleted file mode 100644 index 2b3452f..0000000 --- a/Source/cmFortranParser.cxx +++ /dev/null @@ -1,1988 +0,0 @@ -/* A Bison parser, made by GNU Bison 3.0.4. */ - -/* Bison implementation for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - -/* C LALR(1) parser skeleton written by Richard Stallman, by - simplifying the original so-called "semantic" parser. */ - -/* All symbols defined below should begin with yy or YY, to avoid - infringing on user name space. This should be done even for local - variables, as they might otherwise be expanded by user macros. - There are some unavoidable exceptions within include files to - define necessary library symbols; they are noted "INFRINGES ON - USER NAME SPACE" below. */ - -/* Identify Bison output. */ -#define YYBISON 1 - -/* Bison version. */ -#define YYBISON_VERSION "3.0.4" - -/* Skeleton name. */ -#define YYSKELETON_NAME "yacc.c" - -/* Pure parsers. */ -#define YYPURE 1 - -/* Push parsers. */ -#define YYPUSH 0 - -/* Pull parsers. */ -#define YYPULL 1 - - -/* Substitute the variable and function names. */ -#define yyparse cmFortran_yyparse -#define yylex cmFortran_yylex -#define yyerror cmFortran_yyerror -#define yydebug cmFortran_yydebug -#define yynerrs cmFortran_yynerrs - - -/* Copy the first part of user declarations. */ -#line 1 "cmFortranParser.y" /* yacc.c:339 */ - -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ -/*------------------------------------------------------------------------- - Portions of this source have been derived from makedepf90 version 2.8.8, - - Copyright (C) 2000--2006 Erik Edelmann - - The code was originally distributed under the GPL but permission - from the copyright holder has been obtained to distribute this - derived work under the CMake license. --------------------------------------------------------------------------*/ - -/* - -This file must be translated to C and modified to build everywhere. - -Run bison like this: - - bison --yacc --name-prefix=cmFortran_yy - --defines=cmFortranParserTokens.h - -ocmFortranParser.cxx - cmFortranParser.y - -Modify cmFortranParser.cxx: - - "#if 0" out yyerrorlab block in range ["goto yyerrlab1", "yyerrlab1:"] -*/ - -#include "cmConfigure.h" // IWYU pragma: keep - -#include "cmsys/String.h" -#include -#include - -/*-------------------------------------------------------------------------*/ -#define cmFortranParser_cxx -#include "cmFortranParser.h" /* Interface to parser object. */ -#include "cmFortranParserTokens.h" /* Need YYSTYPE for YY_DECL. */ - -/* Forward declare the lexer entry point. */ -YY_DECL; - -/* Helper function to forward error callback from parser. */ -static void cmFortran_yyerror(yyscan_t yyscanner, const char* message) -{ - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_Error(parser, message); -} - -/* Disable some warnings in the generated code. */ -#ifdef _MSC_VER -# pragma warning (disable: 4102) /* Unused goto label. */ -# pragma warning (disable: 4065) /* Switch contains default but no case. */ -# pragma warning (disable: 4701) /* Local variable may not be initialized. */ -# pragma warning (disable: 4702) /* Unreachable code. */ -# pragma warning (disable: 4127) /* Conditional expression is constant. */ -# pragma warning (disable: 4244) /* Conversion to smaller type, data loss. */ -#endif - -#line 132 "cmFortranParser.cxx" /* yacc.c:339 */ - -# ifndef YY_NULLPTR -# if defined __cplusplus && 201103L <= __cplusplus -# define YY_NULLPTR nullptr -# else -# define YY_NULLPTR 0 -# endif -# endif - -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE 1 -#endif - -/* In a future release of Bison, this section will be replaced - by #include "cmFortranParserTokens.h". */ -#ifndef YY_CMFORTRAN_YY_CMFORTRANPARSERTOKENS_H_INCLUDED -# define YY_CMFORTRAN_YY_CMFORTRANPARSERTOKENS_H_INCLUDED -/* Debug traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif -#if YYDEBUG -extern int cmFortran_yydebug; -#endif - -/* Token type. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - enum yytokentype - { - EOSTMT = 258, - ASSIGNMENT_OP = 259, - GARBAGE = 260, - CPP_LINE_DIRECTIVE = 261, - CPP_INCLUDE = 262, - F90PPR_INCLUDE = 263, - COCO_INCLUDE = 264, - F90PPR_DEFINE = 265, - CPP_DEFINE = 266, - F90PPR_UNDEF = 267, - CPP_UNDEF = 268, - CPP_IFDEF = 269, - CPP_IFNDEF = 270, - CPP_IF = 271, - CPP_ELSE = 272, - CPP_ELIF = 273, - CPP_ENDIF = 274, - F90PPR_IFDEF = 275, - F90PPR_IFNDEF = 276, - F90PPR_IF = 277, - F90PPR_ELSE = 278, - F90PPR_ELIF = 279, - F90PPR_ENDIF = 280, - COMMA = 281, - COLON = 282, - DCOLON = 283, - LPAREN = 284, - RPAREN = 285, - UNTERMINATED_STRING = 286, - STRING = 287, - WORD = 288, - CPP_INCLUDE_ANGLE = 289, - END = 290, - INCLUDE = 291, - INTERFACE = 292, - MODULE = 293, - SUBMODULE = 294, - USE = 295 - }; -#endif -/* Tokens. */ -#define EOSTMT 258 -#define ASSIGNMENT_OP 259 -#define GARBAGE 260 -#define CPP_LINE_DIRECTIVE 261 -#define CPP_INCLUDE 262 -#define F90PPR_INCLUDE 263 -#define COCO_INCLUDE 264 -#define F90PPR_DEFINE 265 -#define CPP_DEFINE 266 -#define F90PPR_UNDEF 267 -#define CPP_UNDEF 268 -#define CPP_IFDEF 269 -#define CPP_IFNDEF 270 -#define CPP_IF 271 -#define CPP_ELSE 272 -#define CPP_ELIF 273 -#define CPP_ENDIF 274 -#define F90PPR_IFDEF 275 -#define F90PPR_IFNDEF 276 -#define F90PPR_IF 277 -#define F90PPR_ELSE 278 -#define F90PPR_ELIF 279 -#define F90PPR_ENDIF 280 -#define COMMA 281 -#define COLON 282 -#define DCOLON 283 -#define LPAREN 284 -#define RPAREN 285 -#define UNTERMINATED_STRING 286 -#define STRING 287 -#define WORD 288 -#define CPP_INCLUDE_ANGLE 289 -#define END 290 -#define INCLUDE 291 -#define INTERFACE 292 -#define MODULE 293 -#define SUBMODULE 294 -#define USE 295 - -/* Value type. */ -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED - -union YYSTYPE -{ -#line 70 "cmFortranParser.y" /* yacc.c:355 */ - - char* string; - -#line 256 "cmFortranParser.cxx" /* yacc.c:355 */ -}; - -typedef union YYSTYPE YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 -# define YYSTYPE_IS_DECLARED 1 -#endif - - - -int cmFortran_yyparse (yyscan_t yyscanner); - -#endif /* !YY_CMFORTRAN_YY_CMFORTRANPARSERTOKENS_H_INCLUDED */ - -/* Copy the second part of user declarations. */ - -#line 272 "cmFortranParser.cxx" /* yacc.c:358 */ - -#ifdef short -# undef short -#endif - -#ifdef YYTYPE_UINT8 -typedef YYTYPE_UINT8 yytype_uint8; -#else -typedef unsigned char yytype_uint8; -#endif - -#ifdef YYTYPE_INT8 -typedef YYTYPE_INT8 yytype_int8; -#else -typedef signed char yytype_int8; -#endif - -#ifdef YYTYPE_UINT16 -typedef YYTYPE_UINT16 yytype_uint16; -#else -typedef unsigned short int yytype_uint16; -#endif - -#ifdef YYTYPE_INT16 -typedef YYTYPE_INT16 yytype_int16; -#else -typedef short int yytype_int16; -#endif - -#ifndef YYSIZE_T -# ifdef __SIZE_TYPE__ -# define YYSIZE_T __SIZE_TYPE__ -# elif defined size_t -# define YYSIZE_T size_t -# elif ! defined YYSIZE_T -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# else -# define YYSIZE_T unsigned int -# endif -#endif - -#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) - -#ifndef YY_ -# if defined YYENABLE_NLS && YYENABLE_NLS -# if ENABLE_NLS -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_(Msgid) dgettext ("bison-runtime", Msgid) -# endif -# endif -# ifndef YY_ -# define YY_(Msgid) Msgid -# endif -#endif - -#ifndef YY_ATTRIBUTE -# if (defined __GNUC__ \ - && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ - || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C -# define YY_ATTRIBUTE(Spec) __attribute__(Spec) -# else -# define YY_ATTRIBUTE(Spec) /* empty */ -# endif -#endif - -#ifndef YY_ATTRIBUTE_PURE -# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) -#endif - -#ifndef YY_ATTRIBUTE_UNUSED -# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) -#endif - -#if !defined _Noreturn \ - && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) -# if defined _MSC_VER && 1200 <= _MSC_VER -# define _Noreturn __declspec (noreturn) -# else -# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) -# endif -#endif - -/* Suppress unused-variable warnings by "using" E. */ -#if ! defined lint || defined __GNUC__ -# define YYUSE(E) ((void) (E)) -#else -# define YYUSE(E) /* empty */ -#endif - -#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ -/* Suppress an incorrect diagnostic about yylval being uninitialized. */ -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ - _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ - _Pragma ("GCC diagnostic pop") -#else -# define YY_INITIAL_VALUE(Value) Value -#endif -#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_END -#endif -#ifndef YY_INITIAL_VALUE -# define YY_INITIAL_VALUE(Value) /* Nothing. */ -#endif - - -#if ! defined yyoverflow || YYERROR_VERBOSE - -/* The parser invokes alloca or malloc; define the necessary symbols. */ - -# ifdef YYSTACK_USE_ALLOCA -# if YYSTACK_USE_ALLOCA -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca -# elif defined __BUILTIN_VA_ARG_INCR -# include /* INFRINGES ON USER NAME SPACE */ -# elif defined _AIX -# define YYSTACK_ALLOC __alloca -# elif defined _MSC_VER -# include /* INFRINGES ON USER NAME SPACE */ -# define alloca _alloca -# else -# define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS -# include /* INFRINGES ON USER NAME SPACE */ - /* Use EXIT_SUCCESS as a witness for stdlib.h. */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# endif -# endif -# endif - -# ifdef YYSTACK_ALLOC - /* Pacify GCC's 'empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) -# ifndef YYSTACK_ALLOC_MAXIMUM - /* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -# endif -# else -# define YYSTACK_ALLOC YYMALLOC -# define YYSTACK_FREE YYFREE -# ifndef YYSTACK_ALLOC_MAXIMUM -# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -# endif -# if (defined __cplusplus && ! defined EXIT_SUCCESS \ - && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# ifndef YYMALLOC -# define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS -void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# ifndef YYFREE -# define YYFREE free -# if ! defined free && ! defined EXIT_SUCCESS -void free (void *); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# endif -#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ - - -#if (! defined yyoverflow \ - && (! defined __cplusplus \ - || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) - -/* A type that is properly aligned for any stack member. */ -union yyalloc -{ - yytype_int16 yyss_alloc; - YYSTYPE yyvs_alloc; -}; - -/* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) - -/* The size of an array large to enough to hold all stacks, each with - N elements. */ -# define YYSTACK_BYTES(N) \ - ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ - + YYSTACK_GAP_MAXIMUM) - -# define YYCOPY_NEEDED 1 - -/* Relocate STACK from its old location to the new one. The - local variables YYSIZE and YYSTACKSIZE give the old and new number of - elements in the stack, and YYPTR gives the new location of the - stack. Advance YYPTR to a properly aligned location for the next - stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (0) - -#endif - -#if defined YYCOPY_NEEDED && YYCOPY_NEEDED -/* Copy COUNT objects from SRC to DST. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(Dst, Src, Count) \ - __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) -# else -# define YYCOPY(Dst, Src, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (Dst)[yyi] = (Src)[yyi]; \ - } \ - while (0) -# endif -# endif -#endif /* !YYCOPY_NEEDED */ - -/* YYFINAL -- State number of the termination state. */ -#define YYFINAL 2 -/* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 593 - -/* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 41 -/* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 14 -/* YYNRULES -- Number of rules. */ -#define YYNRULES 63 -/* YYNSTATES -- Number of states. */ -#define YYNSTATES 126 - -/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned - by yylex, with out-of-bounds checking. */ -#define YYUNDEFTOK 2 -#define YYMAXUTOK 295 - -#define YYTRANSLATE(YYX) \ - ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) - -/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM - as returned by yylex, without out-of-bounds checking. */ -static const yytype_uint8 yytranslate[] = -{ - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40 -}; - -#if YYDEBUG - /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ -static const yytype_uint8 yyrline[] = -{ - 0, 98, 98, 98, 101, 105, 110, 119, 125, 132, - 137, 141, 146, 154, 159, 164, 169, 174, 179, 184, - 189, 194, 198, 202, 206, 210, 211, 216, 216, 216, - 217, 217, 218, 218, 219, 219, 220, 220, 221, 221, - 222, 222, 223, 223, 224, 224, 225, 225, 228, 229, - 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, - 240, 241, 242, 243 -}; -#endif - -#if YYDEBUG || YYERROR_VERBOSE || 1 -/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = -{ - "$end", "error", "$undefined", "EOSTMT", "ASSIGNMENT_OP", "GARBAGE", - "CPP_LINE_DIRECTIVE", "CPP_INCLUDE", "F90PPR_INCLUDE", "COCO_INCLUDE", - "F90PPR_DEFINE", "CPP_DEFINE", "F90PPR_UNDEF", "CPP_UNDEF", "CPP_IFDEF", - "CPP_IFNDEF", "CPP_IF", "CPP_ELSE", "CPP_ELIF", "CPP_ENDIF", - "F90PPR_IFDEF", "F90PPR_IFNDEF", "F90PPR_IF", "F90PPR_ELSE", - "F90PPR_ELIF", "F90PPR_ENDIF", "COMMA", "COLON", "DCOLON", "LPAREN", - "RPAREN", "UNTERMINATED_STRING", "STRING", "WORD", "CPP_INCLUDE_ANGLE", - "END", "INCLUDE", "INTERFACE", "MODULE", "SUBMODULE", "USE", "$accept", - "code", "stmt", "include", "define", "undef", "ifdef", "ifndef", "if", - "elif", "else", "endif", "other", "misc_code", YY_NULLPTR -}; -#endif - -# ifdef YYPRINT -/* YYTOKNUM[NUM] -- (External) token number corresponding to the - (internal) symbol number NUM (which must be that of a token). */ -static const yytype_uint16 yytoknum[] = -{ - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, - 295 -}; -# endif - -#define YYPACT_NINF -39 - -#define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-39))) - -#define YYTABLE_NINF -1 - -#define yytable_value_is_error(Yytable_value) \ - 0 - - /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -static const yytype_int16 yypact[] = -{ - -39, 21, -39, 1, -39, -20, -39, -39, -39, -39, - -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, - -39, -39, -39, -39, -39, -39, -24, -18, 20, -8, - -3, 39, -39, 15, 16, 18, 19, 33, -39, -39, - -39, -39, -39, -39, 59, -39, -39, -39, -39, -39, - 35, 36, 37, -39, -39, -39, -39, -39, -39, 76, - 114, 129, 167, 182, -39, -39, -39, -39, -39, -39, - -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, - -39, -39, 220, 235, 273, 288, -21, 26, -39, 326, - 341, 379, 394, 432, 447, -39, -39, -39, -39, -39, - -39, -39, -39, -39, 38, 40, 41, 485, -39, -39, - -39, -39, -39, -39, 45, -39, -39, -39, 43, 500, - 538, -39, -39, -39, 553, -39 -}; - - /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE does not specify something else to do. Zero - means the default is an error. */ -static const yytype_uint8 yydefact[] = -{ - 2, 0, 1, 0, 25, 0, 27, 28, 29, 31, - 30, 33, 32, 34, 36, 38, 42, 40, 44, 35, - 37, 39, 43, 41, 45, 46, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, 0, 0, 46, 46, - 46, 46, 26, 46, 0, 46, 46, 4, 46, 46, - 0, 0, 0, 46, 46, 46, 46, 46, 46, 0, - 0, 0, 0, 0, 15, 57, 56, 62, 58, 59, - 60, 61, 63, 55, 48, 49, 50, 51, 52, 53, - 54, 47, 0, 0, 0, 0, 0, 0, 46, 0, - 0, 0, 0, 0, 0, 21, 22, 23, 24, 14, - 10, 13, 9, 6, 0, 0, 0, 0, 5, 16, - 17, 18, 19, 20, 0, 46, 46, 11, 0, 0, - 0, 46, 7, 12, 0, 8 -}; - - /* YYPGOTO[NTERM-NUM]. */ -static const yytype_int8 yypgoto[] = -{ - -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, - -39, -39, -38, -39 -}; - - /* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int8 yydefgoto[] = -{ - -1, 1, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 44, 81 -}; - - /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule whose - number is the opposite. If YYTABLE_NINF, syntax error. */ -static const yytype_uint8 yytable[] = -{ - 59, 60, 61, 62, 42, 63, 104, 82, 83, 105, - 84, 85, 43, 45, 46, 89, 90, 91, 92, 93, - 94, 2, 3, 47, 4, 49, 50, 5, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, - 18, 19, 20, 21, 22, 23, 24, 54, 0, 55, - 107, 56, 57, 48, 106, 25, 26, 27, 28, 29, - 30, 31, 64, 65, 66, 51, 58, 52, 86, 87, - 88, 114, 53, 115, 116, 118, 121, 119, 120, 95, - 65, 66, 0, 124, 0, 67, 68, 69, 70, 71, - 72, 73, 74, 0, 75, 76, 77, 78, 79, 80, - 0, 0, 67, 68, 69, 70, 71, 72, 73, 74, - 0, 75, 76, 77, 78, 79, 80, 96, 65, 66, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 97, 65, 66, 0, 0, 0, 0, 0, - 67, 68, 69, 70, 71, 72, 73, 74, 0, 75, - 76, 77, 78, 79, 80, 67, 68, 69, 70, 71, - 72, 73, 74, 0, 75, 76, 77, 78, 79, 80, - 98, 65, 66, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 99, 65, 66, 0, 0, - 0, 0, 0, 67, 68, 69, 70, 71, 72, 73, - 74, 0, 75, 76, 77, 78, 79, 80, 67, 68, - 69, 70, 71, 72, 73, 74, 0, 75, 76, 77, - 78, 79, 80, 100, 65, 66, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 101, 65, - 66, 0, 0, 0, 0, 0, 67, 68, 69, 70, - 71, 72, 73, 74, 0, 75, 76, 77, 78, 79, - 80, 67, 68, 69, 70, 71, 72, 73, 74, 0, - 75, 76, 77, 78, 79, 80, 102, 65, 66, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 103, 65, 66, 0, 0, 0, 0, 0, 67, - 68, 69, 70, 71, 72, 73, 74, 0, 75, 76, - 77, 78, 79, 80, 67, 68, 69, 70, 71, 72, - 73, 74, 0, 75, 76, 77, 78, 79, 80, 108, - 65, 66, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 109, 65, 66, 0, 0, 0, - 0, 0, 67, 68, 69, 70, 71, 72, 73, 74, - 0, 75, 76, 77, 78, 79, 80, 67, 68, 69, - 70, 71, 72, 73, 74, 0, 75, 76, 77, 78, - 79, 80, 110, 65, 66, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 111, 65, 66, - 0, 0, 0, 0, 0, 67, 68, 69, 70, 71, - 72, 73, 74, 0, 75, 76, 77, 78, 79, 80, - 67, 68, 69, 70, 71, 72, 73, 74, 0, 75, - 76, 77, 78, 79, 80, 112, 65, 66, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 113, 65, 66, 0, 0, 0, 0, 0, 67, 68, - 69, 70, 71, 72, 73, 74, 0, 75, 76, 77, - 78, 79, 80, 67, 68, 69, 70, 71, 72, 73, - 74, 0, 75, 76, 77, 78, 79, 80, 117, 65, - 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 122, 65, 66, 0, 0, 0, 0, - 0, 67, 68, 69, 70, 71, 72, 73, 74, 0, - 75, 76, 77, 78, 79, 80, 67, 68, 69, 70, - 71, 72, 73, 74, 0, 75, 76, 77, 78, 79, - 80, 123, 65, 66, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 125, 65, 66, 0, - 0, 0, 0, 0, 67, 68, 69, 70, 71, 72, - 73, 74, 0, 75, 76, 77, 78, 79, 80, 67, - 68, 69, 70, 71, 72, 73, 74, 0, 75, 76, - 77, 78, 79, 80 -}; - -static const yytype_int8 yycheck[] = -{ - 38, 39, 40, 41, 3, 43, 27, 45, 46, 30, - 48, 49, 32, 37, 32, 53, 54, 55, 56, 57, - 58, 0, 1, 3, 3, 33, 29, 6, 7, 8, - 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, - 19, 20, 21, 22, 23, 24, 25, 32, -1, 33, - 88, 33, 33, 33, 28, 34, 35, 36, 37, 38, - 39, 40, 3, 4, 5, 26, 33, 28, 33, 33, - 33, 33, 33, 33, 33, 30, 33, 115, 116, 3, - 4, 5, -1, 121, -1, 26, 27, 28, 29, 30, - 31, 32, 33, -1, 35, 36, 37, 38, 39, 40, - -1, -1, 26, 27, 28, 29, 30, 31, 32, 33, - -1, 35, 36, 37, 38, 39, 40, 3, 4, 5, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 3, 4, 5, -1, -1, -1, -1, -1, - 26, 27, 28, 29, 30, 31, 32, 33, -1, 35, - 36, 37, 38, 39, 40, 26, 27, 28, 29, 30, - 31, 32, 33, -1, 35, 36, 37, 38, 39, 40, - 3, 4, 5, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 3, 4, 5, -1, -1, - -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, - 33, -1, 35, 36, 37, 38, 39, 40, 26, 27, - 28, 29, 30, 31, 32, 33, -1, 35, 36, 37, - 38, 39, 40, 3, 4, 5, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 3, 4, - 5, -1, -1, -1, -1, -1, 26, 27, 28, 29, - 30, 31, 32, 33, -1, 35, 36, 37, 38, 39, - 40, 26, 27, 28, 29, 30, 31, 32, 33, -1, - 35, 36, 37, 38, 39, 40, 3, 4, 5, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 3, 4, 5, -1, -1, -1, -1, -1, 26, - 27, 28, 29, 30, 31, 32, 33, -1, 35, 36, - 37, 38, 39, 40, 26, 27, 28, 29, 30, 31, - 32, 33, -1, 35, 36, 37, 38, 39, 40, 3, - 4, 5, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 3, 4, 5, -1, -1, -1, - -1, -1, 26, 27, 28, 29, 30, 31, 32, 33, - -1, 35, 36, 37, 38, 39, 40, 26, 27, 28, - 29, 30, 31, 32, 33, -1, 35, 36, 37, 38, - 39, 40, 3, 4, 5, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 3, 4, 5, - -1, -1, -1, -1, -1, 26, 27, 28, 29, 30, - 31, 32, 33, -1, 35, 36, 37, 38, 39, 40, - 26, 27, 28, 29, 30, 31, 32, 33, -1, 35, - 36, 37, 38, 39, 40, 3, 4, 5, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 3, 4, 5, -1, -1, -1, -1, -1, 26, 27, - 28, 29, 30, 31, 32, 33, -1, 35, 36, 37, - 38, 39, 40, 26, 27, 28, 29, 30, 31, 32, - 33, -1, 35, 36, 37, 38, 39, 40, 3, 4, - 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 3, 4, 5, -1, -1, -1, -1, - -1, 26, 27, 28, 29, 30, 31, 32, 33, -1, - 35, 36, 37, 38, 39, 40, 26, 27, 28, 29, - 30, 31, 32, 33, -1, 35, 36, 37, 38, 39, - 40, 3, 4, 5, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 3, 4, 5, -1, - -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, - 32, 33, -1, 35, 36, 37, 38, 39, 40, 26, - 27, 28, 29, 30, 31, 32, 33, -1, 35, 36, - 37, 38, 39, 40 -}; - - /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -static const yytype_uint8 yystos[] = -{ - 0, 42, 0, 1, 3, 6, 7, 8, 9, 10, - 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, - 21, 22, 23, 24, 25, 34, 35, 36, 37, 38, - 39, 40, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 3, 32, 53, 37, 32, 3, 33, 33, - 29, 26, 28, 33, 32, 33, 33, 33, 33, 53, - 53, 53, 53, 53, 3, 4, 5, 26, 27, 28, - 29, 30, 31, 32, 33, 35, 36, 37, 38, 39, - 40, 54, 53, 53, 53, 53, 33, 33, 33, 53, - 53, 53, 53, 53, 53, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 27, 30, 28, 53, 3, 3, - 3, 3, 3, 3, 33, 33, 33, 3, 30, 53, - 53, 33, 3, 3, 53, 3 -}; - - /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = -{ - 0, 41, 42, 42, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 44, 44, 44, - 45, 45, 46, 46, 47, 47, 48, 48, 49, 49, - 50, 50, 51, 51, 52, 52, 53, 53, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54 -}; - - /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = -{ - 0, 2, 0, 2, 2, 4, 4, 7, 9, 4, - 4, 5, 7, 4, 4, 3, 4, 4, 4, 4, - 4, 3, 3, 3, 3, 1, 2, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 0, 2, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1 -}; - - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab - - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK (yylen); \ - yystate = *yyssp; \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (yyscanner, YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (0) - -/* Error token number */ -#define YYTERROR 1 -#define YYERRCODE 256 - - - -/* Enable debugging if requested. */ -#if YYDEBUG - -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (0) - -/* This macro is provided for backward compatibility. */ -#ifndef YY_LOCATION_PRINT -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -#endif - - -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value, yyscanner); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (0) - - -/*----------------------------------------. -| Print this symbol's value on YYOUTPUT. | -`----------------------------------------*/ - -static void -yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, yyscan_t yyscanner) -{ - FILE *yyo = yyoutput; - YYUSE (yyo); - YYUSE (yyscanner); - if (!yyvaluep) - return; -# ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# endif - YYUSE (yytype); -} - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -static void -yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, yyscan_t yyscanner) -{ - YYFPRINTF (yyoutput, "%s %s (", - yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); - - yy_symbol_value_print (yyoutput, yytype, yyvaluep, yyscanner); - YYFPRINTF (yyoutput, ")"); -} - -/*------------------------------------------------------------------. -| yy_stack_print -- Print the state stack from its BOTTOM up to its | -| TOP (included). | -`------------------------------------------------------------------*/ - -static void -yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) -{ - YYFPRINTF (stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) - { - int yybot = *yybottom; - YYFPRINTF (stderr, " %d", yybot); - } - YYFPRINTF (stderr, "\n"); -} - -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (0) - - -/*------------------------------------------------. -| Report that the YYRULE is going to be reduced. | -`------------------------------------------------*/ - -static void -yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule, yyscan_t yyscanner) -{ - unsigned long int yylno = yyrline[yyrule]; - int yynrhs = yyr2[yyrule]; - int yyi; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); - /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) - { - YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, - yystos[yyssp[yyi + 1 - yynrhs]], - &(yyvsp[(yyi + 1) - (yynrhs)]) - , yyscanner); - YYFPRINTF (stderr, "\n"); - } -} - -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyssp, yyvsp, Rule, yyscanner); \ -} while (0) - -/* Nonzero means print parse trace. It is left uninitialized so that - multiple parsers can coexist. */ -int yydebug; -#else /* !YYDEBUG */ -# define YYDPRINTF(Args) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) -# define YY_STACK_PRINT(Bottom, Top) -# define YY_REDUCE_PRINT(Rule) -#endif /* !YYDEBUG */ - - -/* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH -# define YYINITDEPTH 200 -#endif - -/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only - if the built-in stack extension method is used). - - Do not make this value too large; the results are undefined if - YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) - evaluated with infinite-precision integer arithmetic. */ - -#ifndef YYMAXDEPTH -# define YYMAXDEPTH 10000 -#endif - - -#if YYERROR_VERBOSE - -# ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen strlen -# else -/* Return the length of YYSTR. */ -static YYSIZE_T -yystrlen (const char *yystr) -{ - YYSIZE_T yylen; - for (yylen = 0; yystr[yylen]; yylen++) - continue; - return yylen; -} -# endif -# endif - -# ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ -static char * -yystpcpy (char *yydest, const char *yysrc) -{ - char *yyd = yydest; - const char *yys = yysrc; - - while ((*yyd++ = *yys++) != '\0') - continue; - - return yyd - 1; -} -# endif -# endif - -# ifndef yytnamerr -/* Copy to YYRES the contents of YYSTR after stripping away unnecessary - quotes and backslashes, so that it's suitable for yyerror. The - heuristic is that double-quoting is unnecessary unless the string - contains an apostrophe, a comma, or backslash (other than - backslash-backslash). YYSTR is taken from yytname. If YYRES is - null, do not copy; instead, return the length of what the result - would have been. */ -static YYSIZE_T -yytnamerr (char *yyres, const char *yystr) -{ - if (*yystr == '"') - { - YYSIZE_T yyn = 0; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } - - if (! yyres) - return yystrlen (yystr); - - return yystpcpy (yyres, yystr) - yyres; -} -# endif - -/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message - about the unexpected token YYTOKEN for the state stack whose top is - YYSSP. - - Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is - not large enough to hold the message. In that case, also set - *YYMSG_ALLOC to the required number of bytes. Return 2 if the - required number of bytes is too large to store. */ -static int -yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, - yytype_int16 *yyssp, int yytoken) -{ - YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); - YYSIZE_T yysize = yysize0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - /* Internationalized format string. */ - const char *yyformat = YY_NULLPTR; - /* Arguments of yyformat. */ - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - /* Number of reported tokens (one for the "unexpected", one per - "expected"). */ - int yycount = 0; - - /* There are many possibilities here to consider: - - If this state is a consistent state with a default action, then - the only way this function was invoked is if the default action - is an error action. In that case, don't check for expected - tokens because there are none. - - The only way there can be no lookahead present (in yychar) is if - this state is a consistent state with a default action. Thus, - detecting the absence of a lookahead is sufficient to determine - that there is no unexpected or expected token to report. In that - case, just report a simple "syntax error". - - Don't assume there isn't a lookahead just because this state is a - consistent state with a default action. There might have been a - previous inconsistent state, consistent state with a non-default - action, or user semantic action that manipulated yychar. - - Of course, the expected token list depends on states to have - correct lookahead information, and it depends on the parser not - to perform extra reductions after fetching a lookahead from the - scanner and before detecting a syntax error. Thus, state merging - (from LALR or IELR) and default reductions corrupt the expected - token list. However, the list is correct for canonical LR with - one exception: it will still contain any token that will not be - accepted due to an error action in a later state. - */ - if (yytoken != YYEMPTY) - { - int yyn = yypact[*yyssp]; - yyarg[yycount++] = yytname[yytoken]; - if (!yypact_value_is_default (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR - && !yytable_value_is_error (yytable[yyx + yyn])) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - break; - } - yyarg[yycount++] = yytname[yyx]; - { - YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); - if (! (yysize <= yysize1 - && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } - } - } - } - - switch (yycount) - { -# define YYCASE_(N, S) \ - case N: \ - yyformat = S; \ - break - YYCASE_(0, YY_("syntax error")); - YYCASE_(1, YY_("syntax error, unexpected %s")); - YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); - YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); - YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); - YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); -# undef YYCASE_ - } - - { - YYSIZE_T yysize1 = yysize + yystrlen (yyformat); - if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } - - if (*yymsg_alloc < yysize) - { - *yymsg_alloc = 2 * yysize; - if (! (yysize <= *yymsg_alloc - && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return 1; - } - - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - { - char *yyp = *yymsg; - int yyi = 0; - while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyformat += 2; - } - else - { - yyp++; - yyformat++; - } - } - return 0; -} -#endif /* YYERROR_VERBOSE */ - -/*-----------------------------------------------. -| Release the memory associated to this symbol. | -`-----------------------------------------------*/ - -static void -yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, yyscan_t yyscanner) -{ - YYUSE (yyvaluep); - YYUSE (yyscanner); - if (!yymsg) - yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YYUSE (yytype); - YY_IGNORE_MAYBE_UNINITIALIZED_END -} - - - - -/*----------. -| yyparse. | -`----------*/ - -int -yyparse (yyscan_t yyscanner) -{ -/* The lookahead symbol. */ -int yychar; - - -/* The semantic value of the lookahead symbol. */ -/* Default value used for initialization, for pacifying older GCCs - or non-GCC compilers. */ -YY_INITIAL_VALUE (static YYSTYPE yyval_default;) -YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); - - /* Number of syntax errors so far. */ - int yynerrs; - - int yystate; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - - /* The stacks and their tools: - 'yyss': related to states. - 'yyvs': related to semantic values. - - Refer to the stacks through separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss; - yytype_int16 *yyssp; - - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs; - YYSTYPE *yyvsp; - - YYSIZE_T yystacksize; - - int yyn; - int yyresult; - /* Lookahead token as an internal (translated) token number. */ - int yytoken = 0; - /* The variables used to return semantic value and location from the - action routines. */ - YYSTYPE yyval; - -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif - -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) - - /* The number of symbols on the RHS of the reduced rule. - Keep to zero when no symbol should be popped. */ - int yylen = 0; - - yyssp = yyss = yyssa; - yyvsp = yyvs = yyvsa; - yystacksize = YYINITDEPTH; - - YYDPRINTF ((stderr, "Starting parse\n")); - - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ - goto yysetstate; - -/*------------------------------------------------------------. -| yynewstate -- Push a new state, which is found in yystate. | -`------------------------------------------------------------*/ - yynewstate: - /* In all cases, when you get here, the value and location stacks - have just been pushed. So pushing a state here evens the stacks. */ - yyssp++; - - yysetstate: - *yyssp = yystate; - - if (yyss + yystacksize - 1 <= yyssp) - { - /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = yyssp - yyss + 1; - -#ifdef yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yystacksize); - - yyss = yyss1; - yyvs = yyvs1; - } -#else /* no yyoverflow */ -# ifndef YYSTACK_RELOCATE - goto yyexhaustedlab; -# else - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); -# undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); - } -# endif -#endif /* no yyoverflow */ - - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); - - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } - - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - - if (yystate == YYFINAL) - YYACCEPT; - - goto yybackup; - -/*-----------. -| yybackup. | -`-----------*/ -yybackup: - - /* Do appropriate processing given the current state. Read a - lookahead token if we need one and don't already have one. */ - - /* First try to decide what to do without reference to lookahead token. */ - yyn = yypact[yystate]; - if (yypact_value_is_default (yyn)) - goto yydefault; - - /* Not known => get a lookahead token if don't already have one. */ - - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ - if (yychar == YYEMPTY) - { - YYDPRINTF ((stderr, "Reading a token: ")); - yychar = yylex (&yylval, yyscanner); - } - - if (yychar <= YYEOF) - { - yychar = yytoken = YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); - } - else - { - yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); - } - - /* If the proper action on seeing token YYTOKEN is to reduce or to - detect an error, take that action. */ - yyn += yytoken; - if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) - goto yydefault; - yyn = yytable[yyn]; - if (yyn <= 0) - { - if (yytable_value_is_error (yyn)) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } - - /* Count tokens shifted since error; after three, turn off error - status. */ - if (yyerrstatus) - yyerrstatus--; - - /* Shift the lookahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - - /* Discard the shifted token. */ - yychar = YYEMPTY; - - yystate = yyn; - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - *++yyvsp = yylval; - YY_IGNORE_MAYBE_UNINITIALIZED_END - - goto yynewstate; - - -/*-----------------------------------------------------------. -| yydefault -- do the default action for the current state. | -`-----------------------------------------------------------*/ -yydefault: - yyn = yydefact[yystate]; - if (yyn == 0) - goto yyerrlab; - goto yyreduce; - - -/*-----------------------------. -| yyreduce -- Do a reduction. | -`-----------------------------*/ -yyreduce: - /* yyn is the number of a rule to reduce with. */ - yylen = yyr2[yyn]; - - /* If YYLEN is nonzero, implement the default value of the action: - '$$ = $1'. - - Otherwise, the following line sets YYVAL to garbage. - This behavior is undocumented and Bison - users should not rely upon it. Assigning to YYVAL - unconditionally makes the parser a bit smaller, and it avoids a - GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1-yylen]; - - - YY_REDUCE_PRINT (yyn); - switch (yyn) - { - case 4: -#line 101 "cmFortranParser.y" /* yacc.c:1646 */ - { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_SetInInterface(parser, true); - } -#line 1536 "cmFortranParser.cxx" /* yacc.c:1646 */ - break; - - case 5: -#line 105 "cmFortranParser.y" /* yacc.c:1646 */ - { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_RuleUse(parser, (yyvsp[-2].string)); - free((yyvsp[-2].string)); - } -#line 1546 "cmFortranParser.cxx" /* yacc.c:1646 */ - break; - - case 6: -#line 110 "cmFortranParser.y" /* yacc.c:1646 */ - { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - if (cmsysString_strcasecmp((yyvsp[-2].string), "function") != 0 && - cmsysString_strcasecmp((yyvsp[-2].string), "procedure") != 0 && - cmsysString_strcasecmp((yyvsp[-2].string), "subroutine") != 0) { - cmFortranParser_RuleModule(parser, (yyvsp[-2].string)); - } - free((yyvsp[-2].string)); - } -#line 1560 "cmFortranParser.cxx" /* yacc.c:1646 */ - break; - - case 7: -#line 119 "cmFortranParser.y" /* yacc.c:1646 */ - { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_RuleUse(parser, (yyvsp[-4].string)); - free((yyvsp[-4].string)); - free((yyvsp[-2].string)); - } -#line 1571 "cmFortranParser.cxx" /* yacc.c:1646 */ - break; - - case 8: -#line 125 "cmFortranParser.y" /* yacc.c:1646 */ - { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_RuleUse(parser, (yyvsp[-6].string)); - free((yyvsp[-6].string)); - free((yyvsp[-4].string)); - free((yyvsp[-2].string)); - } -#line 1583 "cmFortranParser.cxx" /* yacc.c:1646 */ - break; - - case 9: -#line 132 "cmFortranParser.y" /* yacc.c:1646 */ - { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_SetInInterface(parser, true); - free((yyvsp[-2].string)); - } -#line 1593 "cmFortranParser.cxx" /* yacc.c:1646 */ - break; - - case 10: -#line 137 "cmFortranParser.y" /* yacc.c:1646 */ - { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_SetInInterface(parser, false); - } -#line 1602 "cmFortranParser.cxx" /* yacc.c:1646 */ - break; - - case 11: -#line 141 "cmFortranParser.y" /* yacc.c:1646 */ - { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_RuleUse(parser, (yyvsp[-2].string)); - free((yyvsp[-2].string)); - } -#line 1612 "cmFortranParser.cxx" /* yacc.c:1646 */ - break; - - case 12: -#line 146 "cmFortranParser.y" /* yacc.c:1646 */ - { - if (cmsysString_strcasecmp((yyvsp[-4].string), "non_intrinsic") == 0) { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_RuleUse(parser, (yyvsp[-2].string)); - } - free((yyvsp[-4].string)); - free((yyvsp[-2].string)); - } -#line 1625 "cmFortranParser.cxx" /* yacc.c:1646 */ - break; - - case 13: -#line 154 "cmFortranParser.y" /* yacc.c:1646 */ - { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_RuleInclude(parser, (yyvsp[-2].string)); - free((yyvsp[-2].string)); - } -#line 1635 "cmFortranParser.cxx" /* yacc.c:1646 */ - break; - - case 14: -#line 159 "cmFortranParser.y" /* yacc.c:1646 */ - { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_RuleLineDirective(parser, (yyvsp[-2].string)); - free((yyvsp[-2].string)); - } -#line 1645 "cmFortranParser.cxx" /* yacc.c:1646 */ - break; - - case 15: -#line 164 "cmFortranParser.y" /* yacc.c:1646 */ - { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_RuleInclude(parser, (yyvsp[-2].string)); - free((yyvsp[-2].string)); - } -#line 1655 "cmFortranParser.cxx" /* yacc.c:1646 */ - break; - - case 16: -#line 169 "cmFortranParser.y" /* yacc.c:1646 */ - { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_RuleInclude(parser, (yyvsp[-2].string)); - free((yyvsp[-2].string)); - } -#line 1665 "cmFortranParser.cxx" /* yacc.c:1646 */ - break; - - case 17: -#line 174 "cmFortranParser.y" /* yacc.c:1646 */ - { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_RuleDefine(parser, (yyvsp[-2].string)); - free((yyvsp[-2].string)); - } -#line 1675 "cmFortranParser.cxx" /* yacc.c:1646 */ - break; - - case 18: -#line 179 "cmFortranParser.y" /* yacc.c:1646 */ - { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_RuleUndef(parser, (yyvsp[-2].string)); - free((yyvsp[-2].string)); - } -#line 1685 "cmFortranParser.cxx" /* yacc.c:1646 */ - break; - - case 19: -#line 184 "cmFortranParser.y" /* yacc.c:1646 */ - { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_RuleIfdef(parser, (yyvsp[-2].string)); - free((yyvsp[-2].string)); - } -#line 1695 "cmFortranParser.cxx" /* yacc.c:1646 */ - break; - - case 20: -#line 189 "cmFortranParser.y" /* yacc.c:1646 */ - { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_RuleIfndef(parser, (yyvsp[-2].string)); - free((yyvsp[-2].string)); - } -#line 1705 "cmFortranParser.cxx" /* yacc.c:1646 */ - break; - - case 21: -#line 194 "cmFortranParser.y" /* yacc.c:1646 */ - { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_RuleIf(parser); - } -#line 1714 "cmFortranParser.cxx" /* yacc.c:1646 */ - break; - - case 22: -#line 198 "cmFortranParser.y" /* yacc.c:1646 */ - { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_RuleElif(parser); - } -#line 1723 "cmFortranParser.cxx" /* yacc.c:1646 */ - break; - - case 23: -#line 202 "cmFortranParser.y" /* yacc.c:1646 */ - { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_RuleElse(parser); - } -#line 1732 "cmFortranParser.cxx" /* yacc.c:1646 */ - break; - - case 24: -#line 206 "cmFortranParser.y" /* yacc.c:1646 */ - { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_RuleEndif(parser); - } -#line 1741 "cmFortranParser.cxx" /* yacc.c:1646 */ - break; - - case 48: -#line 228 "cmFortranParser.y" /* yacc.c:1646 */ - { free ((yyvsp[0].string)); } -#line 1747 "cmFortranParser.cxx" /* yacc.c:1646 */ - break; - - case 55: -#line 235 "cmFortranParser.y" /* yacc.c:1646 */ - { free ((yyvsp[0].string)); } -#line 1753 "cmFortranParser.cxx" /* yacc.c:1646 */ - break; - - -#line 1757 "cmFortranParser.cxx" /* yacc.c:1646 */ - default: break; - } - /* User semantic actions sometimes alter yychar, and that requires - that yytoken be updated with the new translation. We take the - approach of translating immediately before every use of yytoken. - One alternative is translating here after every semantic action, - but that translation would be missed if the semantic action invokes - YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or - if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an - incorrect destructor might then be invoked immediately. In the - case of YYERROR or YYBACKUP, subsequent parser actions might lead - to an incorrect destructor call or verbose syntax error message - before the lookahead is translated. */ - YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); - - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - - *++yyvsp = yyval; - - /* Now 'shift' the result of the reduction. Determine what state - that goes to, based on the state we popped back to and the rule - number reduced by. */ - - yyn = yyr1[yyn]; - - yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; - if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTOKENS]; - - goto yynewstate; - - -/*--------------------------------------. -| yyerrlab -- here on detecting error. | -`--------------------------------------*/ -yyerrlab: - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); - - /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) - { - ++yynerrs; -#if ! YYERROR_VERBOSE - yyerror (yyscanner, YY_("syntax error")); -#else -# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ - yyssp, yytoken) - { - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = YYSYNTAX_ERROR; - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == 1) - { - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); - if (!yymsg) - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = 2; - } - else - { - yysyntax_error_status = YYSYNTAX_ERROR; - yymsgp = yymsg; - } - } - yyerror (yyscanner, yymsgp); - if (yysyntax_error_status == 2) - goto yyexhaustedlab; - } -# undef YYSYNTAX_ERROR -#endif - } - - - - if (yyerrstatus == 3) - { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ - - if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } - else - { - yydestruct ("Error: discarding", - yytoken, &yylval, yyscanner); - yychar = YYEMPTY; - } - } - -#if 0 - /* Else will try to reuse lookahead token after shifting the error - token. */ - goto yyerrlab1; - - -/*---------------------------------------------------. -| yyerrorlab -- error raised explicitly by YYERROR. | -`---------------------------------------------------*/ -yyerrorlab: - - /* Pacify compilers like GCC when the user code never invokes - YYERROR and the label yyerrorlab therefore never appears in user - code. */ - if (/*CONSTCOND*/ 0) - goto yyerrorlab; - - /* Do not reclaim the symbols of the rule whose action triggered - this YYERROR. */ - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - yystate = *yyssp; - goto yyerrlab1; - - -/*-------------------------------------------------------------. -| yyerrlab1 -- common code for both syntax error and YYERROR. | -`-------------------------------------------------------------*/ -yyerrlab1: -#endif - yyerrstatus = 3; /* Each real token shifted decrements this. */ - - for (;;) - { - yyn = yypact[yystate]; - if (!yypact_value_is_default (yyn)) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } - - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; - - - yydestruct ("Error: popping", - yystos[yystate], yyvsp, yyscanner); - YYPOPSTACK (1); - yystate = *yyssp; - YY_STACK_PRINT (yyss, yyssp); - } - - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - *++yyvsp = yylval; - YY_IGNORE_MAYBE_UNINITIALIZED_END - - - /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); - - yystate = yyn; - goto yynewstate; - - -/*-------------------------------------. -| yyacceptlab -- YYACCEPT comes here. | -`-------------------------------------*/ -yyacceptlab: - yyresult = 0; - goto yyreturn; - -/*-----------------------------------. -| yyabortlab -- YYABORT comes here. | -`-----------------------------------*/ -yyabortlab: - yyresult = 1; - goto yyreturn; - -#if !defined yyoverflow || YYERROR_VERBOSE -/*-------------------------------------------------. -| yyexhaustedlab -- memory exhaustion comes here. | -`-------------------------------------------------*/ -yyexhaustedlab: - yyerror (yyscanner, YY_("memory exhausted")); - yyresult = 2; - /* Fall through. */ -#endif - -yyreturn: - if (yychar != YYEMPTY) - { - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = YYTRANSLATE (yychar); - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval, yyscanner); - } - /* Do not reclaim the symbols of the rule whose action triggered - this YYABORT or YYACCEPT. */ - YYPOPSTACK (yylen); - YY_STACK_PRINT (yyss, yyssp); - while (yyssp != yyss) - { - yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp, yyscanner); - YYPOPSTACK (1); - } -#ifndef yyoverflow - if (yyss != yyssa) - YYSTACK_FREE (yyss); -#endif -#if YYERROR_VERBOSE - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); -#endif - return yyresult; -} -#line 246 "cmFortranParser.y" /* yacc.c:1906 */ - -/* End of grammar */ diff --git a/Source/cmFortranParser.y b/Source/cmFortranParser.y deleted file mode 100644 index acfb40a..0000000 --- a/Source/cmFortranParser.y +++ /dev/null @@ -1,247 +0,0 @@ -%{ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ -/*------------------------------------------------------------------------- - Portions of this source have been derived from makedepf90 version 2.8.8, - - Copyright (C) 2000--2006 Erik Edelmann - - The code was originally distributed under the GPL but permission - from the copyright holder has been obtained to distribute this - derived work under the CMake license. --------------------------------------------------------------------------*/ - -/* - -This file must be translated to C and modified to build everywhere. - -Run bison like this: - - bison --yacc --name-prefix=cmFortran_yy - --defines=cmFortranParserTokens.h - -ocmFortranParser.cxx - cmFortranParser.y - -Modify cmFortranParser.cxx: - - "#if 0" out yyerrorlab block in range ["goto yyerrlab1", "yyerrlab1:"] -*/ - -#include "cmConfigure.h" // IWYU pragma: keep - -#include "cmsys/String.h" -#include -#include - -/*-------------------------------------------------------------------------*/ -#define cmFortranParser_cxx -#include "cmFortranParser.h" /* Interface to parser object. */ -#include "cmFortranParserTokens.h" /* Need YYSTYPE for YY_DECL. */ - -/* Forward declare the lexer entry point. */ -YY_DECL; - -/* Helper function to forward error callback from parser. */ -static void cmFortran_yyerror(yyscan_t yyscanner, const char* message) -{ - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_Error(parser, message); -} - -/* Disable some warnings in the generated code. */ -#ifdef _MSC_VER -# pragma warning (disable: 4102) /* Unused goto label. */ -# pragma warning (disable: 4065) /* Switch contains default but no case. */ -# pragma warning (disable: 4701) /* Local variable may not be initialized. */ -# pragma warning (disable: 4702) /* Unreachable code. */ -# pragma warning (disable: 4127) /* Conditional expression is constant. */ -# pragma warning (disable: 4244) /* Conversion to smaller type, data loss. */ -#endif -%} - -/* Generate a reentrant parser object. */ -%define api.pure - -/* Configure the parser to use a lexer object. */ -%lex-param {yyscan_t yyscanner} -%parse-param {yyscan_t yyscanner} - -%define parse.error verbose - -%union { - char* string; -} - -/*-------------------------------------------------------------------------*/ -/* Tokens */ -%token EOSTMT ASSIGNMENT_OP GARBAGE -%token CPP_LINE_DIRECTIVE -%token CPP_INCLUDE F90PPR_INCLUDE COCO_INCLUDE -%token F90PPR_DEFINE CPP_DEFINE F90PPR_UNDEF CPP_UNDEF -%token CPP_IFDEF CPP_IFNDEF CPP_IF CPP_ELSE CPP_ELIF CPP_ENDIF -%token F90PPR_IFDEF F90PPR_IFNDEF F90PPR_IF -%token F90PPR_ELSE F90PPR_ELIF F90PPR_ENDIF -%token COMMA COLON DCOLON LPAREN RPAREN -%token UNTERMINATED_STRING -%token STRING WORD -%token CPP_INCLUDE_ANGLE -%token END -%token INCLUDE -%token INTERFACE -%token MODULE -%token SUBMODULE -%token USE - -/*-------------------------------------------------------------------------*/ -/* grammar */ -%% - -code: /* empty */ | code stmt; - -stmt: - INTERFACE EOSTMT { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_SetInInterface(parser, true); - } -| USE WORD other EOSTMT { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_RuleUse(parser, $2); - free($2); - } -| MODULE WORD other EOSTMT { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - if (cmsysString_strcasecmp($2, "function") != 0 && - cmsysString_strcasecmp($2, "procedure") != 0 && - cmsysString_strcasecmp($2, "subroutine") != 0) { - cmFortranParser_RuleModule(parser, $2); - } - free($2); - } -| SUBMODULE LPAREN WORD RPAREN WORD other EOSTMT { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_RuleUse(parser, $3); - free($3); - free($5); - } -| SUBMODULE LPAREN WORD COLON WORD RPAREN WORD other EOSTMT { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_RuleUse(parser, $3); - free($3); - free($5); - free($7); - } -| INTERFACE WORD other EOSTMT { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_SetInInterface(parser, true); - free($2); - } -| END INTERFACE other EOSTMT { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_SetInInterface(parser, false); - } -| USE DCOLON WORD other EOSTMT { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_RuleUse(parser, $3); - free($3); - } -| USE COMMA WORD DCOLON WORD other EOSTMT { - if (cmsysString_strcasecmp($3, "non_intrinsic") == 0) { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_RuleUse(parser, $5); - } - free($3); - free($5); - } -| INCLUDE STRING other EOSTMT { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_RuleInclude(parser, $2); - free($2); - } -| CPP_LINE_DIRECTIVE STRING other EOSTMT { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_RuleLineDirective(parser, $2); - free($2); - } -| CPP_INCLUDE_ANGLE other EOSTMT { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_RuleInclude(parser, $1); - free($1); - } -| include STRING other EOSTMT { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_RuleInclude(parser, $2); - free($2); - } -| define WORD other EOSTMT { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_RuleDefine(parser, $2); - free($2); - } -| undef WORD other EOSTMT { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_RuleUndef(parser, $2); - free($2); - } -| ifdef WORD other EOSTMT { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_RuleIfdef(parser, $2); - free($2); - } -| ifndef WORD other EOSTMT { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_RuleIfndef(parser, $2); - free($2); - } -| if other EOSTMT { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_RuleIf(parser); - } -| elif other EOSTMT { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_RuleElif(parser); - } -| else other EOSTMT { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_RuleElse(parser); - } -| endif other EOSTMT { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_RuleEndif(parser); - } -| EOSTMT -| error EOSTMT /* tolerate unknown statements until their end */ -; - - - -include: CPP_INCLUDE | F90PPR_INCLUDE | COCO_INCLUDE ; -define: CPP_DEFINE | F90PPR_DEFINE; -undef: CPP_UNDEF | F90PPR_UNDEF ; -ifdef: CPP_IFDEF | F90PPR_IFDEF ; -ifndef: CPP_IFNDEF | F90PPR_IFNDEF ; -if: CPP_IF | F90PPR_IF ; -elif: CPP_ELIF | F90PPR_ELIF ; -else: CPP_ELSE | F90PPR_ELSE ; -endif: CPP_ENDIF | F90PPR_ENDIF ; -other: /* empty */ | other misc_code ; - -misc_code: - WORD { free ($1); } -| END -| INCLUDE -| INTERFACE -| MODULE -| SUBMODULE -| USE -| STRING { free ($1); } -| GARBAGE -| ASSIGNMENT_OP -| COLON -| DCOLON -| LPAREN -| RPAREN -| COMMA -| UNTERMINATED_STRING -; - -%% -/* End of grammar */ diff --git a/Source/cmFortranParserTokens.h b/Source/cmFortranParserTokens.h deleted file mode 100644 index 8d6a5fe..0000000 --- a/Source/cmFortranParserTokens.h +++ /dev/null @@ -1,149 +0,0 @@ -/* A Bison parser, made by GNU Bison 3.0.4. */ - -/* Bison interface for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - -#ifndef YY_CMFORTRAN_YY_CMFORTRANPARSERTOKENS_H_INCLUDED -# define YY_CMFORTRAN_YY_CMFORTRANPARSERTOKENS_H_INCLUDED -/* Debug traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif -#if YYDEBUG -extern int cmFortran_yydebug; -#endif - -/* Token type. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - enum yytokentype - { - EOSTMT = 258, - ASSIGNMENT_OP = 259, - GARBAGE = 260, - CPP_LINE_DIRECTIVE = 261, - CPP_INCLUDE = 262, - F90PPR_INCLUDE = 263, - COCO_INCLUDE = 264, - F90PPR_DEFINE = 265, - CPP_DEFINE = 266, - F90PPR_UNDEF = 267, - CPP_UNDEF = 268, - CPP_IFDEF = 269, - CPP_IFNDEF = 270, - CPP_IF = 271, - CPP_ELSE = 272, - CPP_ELIF = 273, - CPP_ENDIF = 274, - F90PPR_IFDEF = 275, - F90PPR_IFNDEF = 276, - F90PPR_IF = 277, - F90PPR_ELSE = 278, - F90PPR_ELIF = 279, - F90PPR_ENDIF = 280, - COMMA = 281, - COLON = 282, - DCOLON = 283, - LPAREN = 284, - RPAREN = 285, - UNTERMINATED_STRING = 286, - STRING = 287, - WORD = 288, - CPP_INCLUDE_ANGLE = 289, - END = 290, - INCLUDE = 291, - INTERFACE = 292, - MODULE = 293, - SUBMODULE = 294, - USE = 295 - }; -#endif -/* Tokens. */ -#define EOSTMT 258 -#define ASSIGNMENT_OP 259 -#define GARBAGE 260 -#define CPP_LINE_DIRECTIVE 261 -#define CPP_INCLUDE 262 -#define F90PPR_INCLUDE 263 -#define COCO_INCLUDE 264 -#define F90PPR_DEFINE 265 -#define CPP_DEFINE 266 -#define F90PPR_UNDEF 267 -#define CPP_UNDEF 268 -#define CPP_IFDEF 269 -#define CPP_IFNDEF 270 -#define CPP_IF 271 -#define CPP_ELSE 272 -#define CPP_ELIF 273 -#define CPP_ENDIF 274 -#define F90PPR_IFDEF 275 -#define F90PPR_IFNDEF 276 -#define F90PPR_IF 277 -#define F90PPR_ELSE 278 -#define F90PPR_ELIF 279 -#define F90PPR_ENDIF 280 -#define COMMA 281 -#define COLON 282 -#define DCOLON 283 -#define LPAREN 284 -#define RPAREN 285 -#define UNTERMINATED_STRING 286 -#define STRING 287 -#define WORD 288 -#define CPP_INCLUDE_ANGLE 289 -#define END 290 -#define INCLUDE 291 -#define INTERFACE 292 -#define MODULE 293 -#define SUBMODULE 294 -#define USE 295 - -/* Value type. */ -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED - -union YYSTYPE -{ -#line 70 "cmFortranParser.y" /* yacc.c:1909 */ - - char* string; - -#line 138 "cmFortranParserTokens.h" /* yacc.c:1909 */ -}; - -typedef union YYSTYPE YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 -# define YYSTYPE_IS_DECLARED 1 -#endif - - - -int cmFortran_yyparse (yyscan_t yyscanner); - -#endif /* !YY_CMFORTRAN_YY_CMFORTRANPARSERTOKENS_H_INCLUDED */ diff --git a/Source/cmListFileLexer.c b/Source/cmListFileLexer.c deleted file mode 100644 index 3dd3b85..0000000 --- a/Source/cmListFileLexer.c +++ /dev/null @@ -1,2688 +0,0 @@ -#include "cmStandardLexer.h" -#line 2 "cmListFileLexer.c" - -#line 4 "cmListFileLexer.c" - -#define FLEXINT_H 1 -#define YY_INT_ALIGNED short int - -/* A lexical scanner generated by flex */ - -#define FLEX_SCANNER -#define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 6 -#define YY_FLEX_SUBMINOR_VERSION 1 -#if YY_FLEX_SUBMINOR_VERSION > 0 -#define FLEX_BETA -#endif - -/* First, we deal with platform-specific or compiler-specific issues. */ - -/* begin standard C headers. */ -#include -#include -#include -#include - -/* end standard C headers. */ - -/* flex integer type definitions */ - -#ifndef FLEXINT_H -#define FLEXINT_H - -/* C99 systems have . Non-C99 systems may or may not. */ - -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - -/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. - */ -#ifndef __STDC_LIMIT_MACROS -#define __STDC_LIMIT_MACROS 1 -#endif - -#include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; -typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; -typedef uint32_t flex_uint32_t; -#else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; -typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; - -/* Limits of integral types. */ -#ifndef INT8_MIN -#define INT8_MIN (-128) -#endif -#ifndef INT16_MIN -#define INT16_MIN (-32767-1) -#endif -#ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) -#endif -#ifndef INT8_MAX -#define INT8_MAX (127) -#endif -#ifndef INT16_MAX -#define INT16_MAX (32767) -#endif -#ifndef INT32_MAX -#define INT32_MAX (2147483647) -#endif -#ifndef UINT8_MAX -#define UINT8_MAX (255U) -#endif -#ifndef UINT16_MAX -#define UINT16_MAX (65535U) -#endif -#ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) -#endif - -#endif /* ! C99 */ - -#endif /* ! FLEXINT_H */ - -/* TODO: this is always defined, so inline it */ -#define yyconst const - -#if defined(__GNUC__) && __GNUC__ >= 3 -#define yynoreturn __attribute__((__noreturn__)) -#else -#define yynoreturn -#endif - -/* Returned upon end-of-file. */ -#define YY_NULL 0 - -/* Promotes a possibly negative, possibly signed char to an unsigned - * integer for use as an array index. If the signed char is negative, - * we want to instead treat it as an 8-bit unsigned char, hence the - * double cast. - */ -#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) - -/* An opaque pointer. */ -#ifndef YY_TYPEDEF_YY_SCANNER_T -#define YY_TYPEDEF_YY_SCANNER_T -typedef void* yyscan_t; -#endif - -/* For convenience, these vars (plus the bison vars far below) - are macros in the reentrant scanner. */ -#define yyin yyg->yyin_r -#define yyout yyg->yyout_r -#define yyextra yyg->yyextra_r -#define yyleng yyg->yyleng_r -#define yytext yyg->yytext_r -#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) -#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) -#define yy_flex_debug yyg->yy_flex_debug_r - -/* Enter a start condition. This macro really ought to take a parameter, - * but we do it the disgusting crufty way forced on us by the ()-less - * definition of BEGIN. - */ -#define BEGIN yyg->yy_start = 1 + 2 * - -/* Translate the current start state into a value that can be later handed - * to BEGIN to return to the state. The YYSTATE alias is for lex - * compatibility. - */ -#define YY_START ((yyg->yy_start - 1) / 2) -#define YYSTATE YY_START - -/* Action number for EOF rule of a given start state. */ -#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) - -/* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE cmListFileLexer_yyrestart(yyin ,yyscanner ) - -#define YY_END_OF_BUFFER_CHAR 0 - -/* Size of default input buffer. */ -#ifndef YY_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k. - * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. - * Ditto for the __ia64__ case accordingly. - */ -#define YY_BUF_SIZE 32768 -#else -#define YY_BUF_SIZE 16384 -#endif /* __ia64__ */ -#endif - -/* The state buf must be large enough to hold one state per character in the main buffer. - */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) - -#ifndef YY_TYPEDEF_YY_BUFFER_STATE -#define YY_TYPEDEF_YY_BUFFER_STATE -typedef struct yy_buffer_state *YY_BUFFER_STATE; -#endif - -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - -#define EOB_ACT_CONTINUE_SCAN 0 -#define EOB_ACT_END_OF_FILE 1 -#define EOB_ACT_LAST_MATCH 2 - - /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires - * access to the local variable yy_act. Since yyless() is a macro, it would break - * existing scanners that call yyless() from OUTSIDE cmListFileLexer_yylex. - * One obvious solution it to make yy_act a global. I tried that, and saw - * a 5% performance hit in a non-yylineno scanner, because yy_act is - * normally declared as a register variable-- so it is not worth it. - */ - #define YY_LESS_LINENO(n) \ - do { \ - int yyl;\ - for ( yyl = n; yyl < yyleng; ++yyl )\ - if ( yytext[yyl] == '\n' )\ - --yylineno;\ - }while(0) - #define YY_LINENO_REWIND_TO(dst) \ - do {\ - const char *p;\ - for ( p = yy_cp-1; p >= (dst); --p)\ - if ( *p == '\n' )\ - --yylineno;\ - }while(0) - -/* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - *yy_cp = yyg->yy_hold_char; \ - YY_RESTORE_YY_MORE_OFFSET \ - yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } \ - while ( 0 ) - -#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) - -#ifndef YY_STRUCT_YY_BUFFER_STATE -#define YY_STRUCT_YY_BUFFER_STATE -struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - int yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; - -#define YY_BUFFER_NEW 0 -#define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via cmListFileLexer_yyrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ -#define YY_BUFFER_EOF_PENDING 2 - - }; -#endif /* !YY_STRUCT_YY_BUFFER_STATE */ - -/* We provide macros for accessing buffer states in case in the - * future we want to put the buffer states in a more general - * "scanner state". - * - * Returns the top of the stack, or NULL. - */ -#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ - ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ - : NULL) - -/* Same as previous macro, but useful when we know that the buffer stack is not - * NULL or when we need an lvalue. For internal use only. - */ -#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] - -void cmListFileLexer_yyrestart (FILE *input_file ,yyscan_t yyscanner ); -void cmListFileLexer_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); -YY_BUFFER_STATE cmListFileLexer_yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner ); -void cmListFileLexer_yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); -void cmListFileLexer_yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); -void cmListFileLexer_yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); -void cmListFileLexer_yypop_buffer_state (yyscan_t yyscanner ); - -static void cmListFileLexer_yyensure_buffer_stack (yyscan_t yyscanner ); -static void cmListFileLexer_yy_load_buffer_state (yyscan_t yyscanner ); -static void cmListFileLexer_yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner ); - -#define YY_FLUSH_BUFFER cmListFileLexer_yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner) - -YY_BUFFER_STATE cmListFileLexer_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); -YY_BUFFER_STATE cmListFileLexer_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); -YY_BUFFER_STATE cmListFileLexer_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); - -void *cmListFileLexer_yyalloc (yy_size_t ,yyscan_t yyscanner ); -void *cmListFileLexer_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); -void cmListFileLexer_yyfree (void * ,yyscan_t yyscanner ); - -#define yy_new_buffer cmListFileLexer_yy_create_buffer - -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! YY_CURRENT_BUFFER ){ \ - cmListFileLexer_yyensure_buffer_stack (yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = \ - cmListFileLexer_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } - -#define yy_set_bol(at_bol) \ - { \ - if ( ! YY_CURRENT_BUFFER ){\ - cmListFileLexer_yyensure_buffer_stack (yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = \ - cmListFileLexer_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } - -#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) - -/* Begin user sect3 */ - -#define cmListFileLexer_yywrap(yyscanner) (/*CONSTCOND*/1) -#define YY_SKIP_YYWRAP - -typedef unsigned char YY_CHAR; - -typedef int yy_state_type; - -#define yytext_ptr yytext_r - -static yy_state_type yy_get_previous_state (yyscan_t yyscanner ); -static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner); -static int yy_get_next_buffer (yyscan_t yyscanner ); -static void yynoreturn yy_fatal_error (yyconst char* msg ,yyscan_t yyscanner ); - -/* Done after the current pattern has been matched and before the - * corresponding action - sets up yytext. - */ -#define YY_DO_BEFORE_ACTION \ - yyg->yytext_ptr = yy_bp; \ - yyleng = (int) (yy_cp - yy_bp); \ - yyg->yy_hold_char = *yy_cp; \ - *yy_cp = '\0'; \ - yyg->yy_c_buf_p = yy_cp; - -#define YY_NUM_RULES 24 -#define YY_END_OF_BUFFER 25 -/* This struct is not used in this scanner, - but its presence is necessary. */ -struct yy_trans_info - { - flex_int32_t yy_verify; - flex_int32_t yy_nxt; - }; -static yyconst flex_int16_t yy_accept[77] = - { 0, - 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, - 25, 13, 22, 1, 16, 3, 13, 5, 6, 7, - 15, 23, 17, 19, 20, 21, 10, 11, 8, 12, - 9, 4, 13, 0, 13, 0, 22, 0, 0, 7, - 13, 0, 13, 0, 2, 0, 13, 17, 0, 18, - 10, 8, 4, 0, 14, 0, 0, 0, 0, 14, - 0, 0, 14, 0, 0, 0, 2, 14, 0, 0, - 0, 0, 0, 0, 0, 0 - } ; - -static yyconst YY_CHAR yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, - 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 1, 5, 6, 7, 1, 1, 1, 8, - 9, 1, 1, 1, 1, 1, 1, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 1, 1, 1, - 11, 1, 1, 1, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 13, 14, 15, 1, 12, 1, 12, 12, 12, 12, - - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 - } ; - -static yyconst YY_CHAR yy_meta[16] = - { 0, - 1, 1, 2, 3, 4, 3, 1, 3, 5, 6, - 1, 6, 1, 1, 7 - } ; - -static yyconst flex_uint16_t yy_base[95] = - { 0, - 0, 0, 13, 25, 14, 16, 17, 18, 90, 88, - 88, 39, 20, 237, 237, 74, 78, 237, 237, 13, - 54, 0, 71, 237, 237, 31, 0, 237, 73, 237, - 237, 0, 0, 65, 75, 0, 33, 30, 72, 0, - 0, 75, 70, 0, 74, 0, 0, 62, 70, 237, - 0, 63, 0, 85, 99, 65, 111, 62, 34, 0, - 54, 116, 0, 54, 127, 51, 237, 50, 0, 48, - 47, 39, 33, 29, 17, 237, 136, 143, 150, 157, - 164, 171, 178, 184, 191, 198, 201, 207, 214, 217, - 219, 225, 228, 230 - - } ; - -static yyconst flex_int16_t yy_def[95] = - { 0, - 76, 1, 77, 77, 78, 78, 79, 79, 80, 80, - 76, 76, 76, 76, 76, 76, 12, 76, 76, 12, - 76, 81, 82, 76, 76, 82, 83, 76, 76, 76, - 76, 84, 12, 85, 12, 86, 76, 76, 87, 20, - 12, 88, 12, 21, 76, 89, 12, 82, 82, 76, - 83, 76, 84, 85, 76, 54, 85, 90, 76, 55, - 87, 88, 55, 62, 88, 91, 76, 55, 92, 93, - 90, 94, 91, 93, 94, 0, 76, 76, 76, 76, - 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, - 76, 76, 76, 76 - - } ; - -static yyconst flex_uint16_t yy_nxt[253] = - { 0, - 12, 13, 14, 13, 15, 16, 17, 18, 19, 12, - 12, 20, 21, 22, 12, 24, 28, 25, 28, 28, - 28, 37, 40, 37, 40, 62, 26, 24, 29, 25, - 29, 31, 31, 50, 37, 48, 37, 54, 26, 33, - 59, 63, 45, 34, 59, 35, 45, 62, 33, 33, - 33, 33, 36, 33, 41, 55, 54, 58, 42, 63, - 43, 72, 60, 41, 44, 41, 45, 46, 41, 55, - 55, 56, 70, 52, 48, 49, 67, 66, 57, 63, - 60, 64, 58, 52, 49, 39, 38, 76, 65, 55, - 14, 56, 14, 76, 76, 76, 76, 76, 57, 55, - - 76, 76, 76, 34, 76, 68, 76, 76, 55, 55, - 55, 55, 69, 55, 54, 76, 54, 76, 54, 54, - 63, 76, 64, 76, 76, 76, 76, 76, 76, 65, - 62, 76, 62, 76, 62, 62, 23, 23, 23, 23, - 23, 23, 23, 27, 27, 27, 27, 27, 27, 27, - 30, 30, 30, 30, 30, 30, 30, 32, 32, 32, - 32, 32, 32, 32, 47, 76, 47, 47, 47, 47, - 47, 48, 76, 48, 76, 48, 48, 48, 51, 76, - 51, 51, 51, 51, 53, 76, 53, 53, 53, 53, - 53, 54, 76, 76, 54, 76, 54, 54, 33, 76, - - 33, 33, 33, 33, 33, 61, 61, 62, 76, 76, - 62, 76, 62, 62, 41, 76, 41, 41, 41, 41, - 41, 71, 71, 73, 73, 55, 76, 55, 55, 55, - 55, 55, 74, 74, 75, 75, 11, 76, 76, 76, - 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, - 76, 76 - } ; - -static yyconst flex_int16_t yy_chk[253] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 3, 5, 3, 6, 7, - 8, 13, 20, 13, 20, 75, 3, 4, 5, 4, - 6, 7, 8, 26, 37, 26, 37, 74, 4, 12, - 38, 73, 38, 12, 59, 12, 59, 72, 12, 12, - 12, 12, 12, 12, 21, 71, 70, 68, 21, 66, - 21, 64, 61, 21, 21, 21, 21, 21, 21, 34, - 58, 34, 56, 52, 49, 48, 45, 43, 34, 42, - 39, 42, 35, 29, 23, 17, 16, 11, 42, 54, - 10, 54, 9, 0, 0, 0, 0, 0, 54, 55, - - 0, 0, 0, 55, 0, 55, 0, 0, 55, 55, - 55, 55, 55, 55, 57, 0, 57, 0, 57, 57, - 62, 0, 62, 0, 0, 0, 0, 0, 0, 62, - 65, 0, 65, 0, 65, 65, 77, 77, 77, 77, - 77, 77, 77, 78, 78, 78, 78, 78, 78, 78, - 79, 79, 79, 79, 79, 79, 79, 80, 80, 80, - 80, 80, 80, 80, 81, 0, 81, 81, 81, 81, - 81, 82, 0, 82, 0, 82, 82, 82, 83, 0, - 83, 83, 83, 83, 84, 0, 84, 84, 84, 84, - 84, 85, 0, 0, 85, 0, 85, 85, 86, 0, - - 86, 86, 86, 86, 86, 87, 87, 88, 0, 0, - 88, 0, 88, 88, 89, 0, 89, 89, 89, 89, - 89, 90, 90, 91, 91, 92, 0, 92, 92, 92, - 92, 92, 93, 93, 94, 94, 76, 76, 76, 76, - 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, - 76, 76 - } ; - -/* Table of booleans, true if rule could match eol. */ -static yyconst flex_int32_t yy_rule_can_match_eol[25] = - { 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, - 0, 0, 0, 0, 0, }; - -/* The intent behind this definition is that it'll catch - * any uses of REJECT which flex missed. - */ -#define REJECT reject_used_but_not_detected -#define yymore() yymore_used_but_not_detected -#define YY_MORE_ADJ 0 -#define YY_RESTORE_YY_MORE_OFFSET -#line 1 "cmListFileLexer.in.l" -#line 2 "cmListFileLexer.in.l" -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ -/* - -This file must be translated to C and modified to build everywhere. - -Run flex >= 2.6 like this: - - flex --nounistd -DFLEXINT_H --prefix=cmListFileLexer_yy -ocmListFileLexer.c cmListFileLexer.in.l - -Modify cmListFileLexer.c: - - remove trailing whitespace: sed -i 's/\s*$//' cmListFileLexer.c - - remove blank lines at end of file - - #include "cmStandardLexer.h" at the top - - add cast in cmListFileLexer_yy_scan_bytes for loop condition of _yybytes_len to size_t - - change type of variable yyl under yy_find_action from yy_size_t to int - -*/ - -/* IWYU pragma: no_forward_declare yyguts_t */ - -#ifdef WIN32 -#include "cmsys/Encoding.h" -#endif - -/* Setup the proper cmListFileLexer_yylex declaration. */ -#define YY_EXTRA_TYPE cmListFileLexer* -#define YY_DECL int cmListFileLexer_yylex (yyscan_t yyscanner, cmListFileLexer* lexer) - -#include "cmListFileLexer.h" - -/*--------------------------------------------------------------------------*/ -struct cmListFileLexer_s -{ - cmListFileLexer_Token token; - int bracket; - int comment; - int line; - int column; - int size; - FILE* file; - size_t cr; - char* string_buffer; - char* string_position; - int string_left; - yyscan_t scanner; -}; - -static void cmListFileLexerSetToken(cmListFileLexer* lexer, const char* text, - int length); -static void cmListFileLexerAppend(cmListFileLexer* lexer, const char* text, - int length); -static int cmListFileLexerInput(cmListFileLexer* lexer, char* buffer, - size_t bufferSize); -static void cmListFileLexerInit(cmListFileLexer* lexer); -static void cmListFileLexerDestroy(cmListFileLexer* lexer); - -/* Replace the lexer input function. */ -#undef YY_INPUT -#define YY_INPUT(buf, result, max_size) \ - { result = cmListFileLexerInput(cmListFileLexer_yyget_extra(yyscanner), buf, max_size); } - -/*--------------------------------------------------------------------------*/ - - - - -#line 606 "cmListFileLexer.c" - -#define INITIAL 0 -#define STRING 1 -#define BRACKET 2 -#define BRACKETEND 3 -#define COMMENT 4 - -#ifndef YY_EXTRA_TYPE -#define YY_EXTRA_TYPE void * -#endif - -/* Holds the entire state of the reentrant scanner. */ -struct yyguts_t - { - - /* User-defined. Not touched by flex. */ - YY_EXTRA_TYPE yyextra_r; - - /* The rest are the same as the globals declared in the non-reentrant scanner. */ - FILE *yyin_r, *yyout_r; - size_t yy_buffer_stack_top; /**< index of top of stack. */ - size_t yy_buffer_stack_max; /**< capacity of stack. */ - YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ - char yy_hold_char; - int yy_n_chars; - int yyleng_r; - char *yy_c_buf_p; - int yy_init; - int yy_start; - int yy_did_buffer_switch_on_eof; - int yy_start_stack_ptr; - int yy_start_stack_depth; - int *yy_start_stack; - yy_state_type yy_last_accepting_state; - char* yy_last_accepting_cpos; - - int yylineno_r; - int yy_flex_debug_r; - - char *yytext_r; - int yy_more_flag; - int yy_more_len; - - }; /* end struct yyguts_t */ - -static int yy_init_globals (yyscan_t yyscanner ); - -int cmListFileLexer_yylex_init (yyscan_t* scanner); - -int cmListFileLexer_yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); - -/* Accessor methods to globals. - These are made visible to non-reentrant scanners for convenience. */ - -int cmListFileLexer_yylex_destroy (yyscan_t yyscanner ); - -int cmListFileLexer_yyget_debug (yyscan_t yyscanner ); - -void cmListFileLexer_yyset_debug (int debug_flag ,yyscan_t yyscanner ); - -YY_EXTRA_TYPE cmListFileLexer_yyget_extra (yyscan_t yyscanner ); - -void cmListFileLexer_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); - -FILE *cmListFileLexer_yyget_in (yyscan_t yyscanner ); - -void cmListFileLexer_yyset_in (FILE * _in_str ,yyscan_t yyscanner ); - -FILE *cmListFileLexer_yyget_out (yyscan_t yyscanner ); - -void cmListFileLexer_yyset_out (FILE * _out_str ,yyscan_t yyscanner ); - - int cmListFileLexer_yyget_leng (yyscan_t yyscanner ); - -char *cmListFileLexer_yyget_text (yyscan_t yyscanner ); - -int cmListFileLexer_yyget_lineno (yyscan_t yyscanner ); - -void cmListFileLexer_yyset_lineno (int _line_number ,yyscan_t yyscanner ); - -int cmListFileLexer_yyget_column (yyscan_t yyscanner ); - -void cmListFileLexer_yyset_column (int _column_no ,yyscan_t yyscanner ); - -/* Macros after this point can all be overridden by user definitions in - * section 1. - */ - -#ifndef YY_SKIP_YYWRAP -#ifdef __cplusplus -extern "C" int cmListFileLexer_yywrap (yyscan_t yyscanner ); -#else -extern int cmListFileLexer_yywrap (yyscan_t yyscanner ); -#endif -#endif - -#ifndef YY_NO_UNPUT - - static void yyunput (int c,char *buf_ptr ,yyscan_t yyscanner); - -#endif - -#ifndef yytext_ptr -static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); -#endif - -#ifndef YY_NO_INPUT - -#ifdef __cplusplus -static int yyinput (yyscan_t yyscanner ); -#else -static int input (yyscan_t yyscanner ); -#endif - -#endif - -/* Amount of stuff to slurp up with each read. */ -#ifndef YY_READ_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k */ -#define YY_READ_BUF_SIZE 16384 -#else -#define YY_READ_BUF_SIZE 8192 -#endif /* __ia64__ */ -#endif - -/* Copy whatever the last rule matched to the standard output. */ -#ifndef ECHO -/* This used to be an fputs(), but since the string might contain NUL's, - * we now use fwrite(). - */ -#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) -#endif - -/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, - * is returned in "result". - */ -#ifndef YY_INPUT -#define YY_INPUT(buf,result,max_size) \ - if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ - { \ - int c = '*'; \ - size_t n; \ - for ( n = 0; n < max_size && \ - (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } \ - else \ - { \ - errno=0; \ - while ( (result = (int) fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ - { \ - if( errno != EINTR) \ - { \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - break; \ - } \ - errno=0; \ - clearerr(yyin); \ - } \ - }\ -\ - -#endif - -/* No semi-colon after return; correct usage is to write "yyterminate();" - - * we don't want an extra ';' after the "return" because that will cause - * some compilers to complain about unreachable statements. - */ -#ifndef yyterminate -#define yyterminate() return YY_NULL -#endif - -/* Number of entries by which start-condition stack grows. */ -#ifndef YY_START_STACK_INCR -#define YY_START_STACK_INCR 25 -#endif - -/* Report a fatal error. */ -#ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) -#endif - -/* end tables serialization structures and prototypes */ - -/* Default declaration of generated scanner - a define so the user can - * easily add parameters. - */ -#ifndef YY_DECL -#define YY_DECL_IS_OURS 1 - -extern int cmListFileLexer_yylex (yyscan_t yyscanner); - -#define YY_DECL int cmListFileLexer_yylex (yyscan_t yyscanner) -#endif /* !YY_DECL */ - -/* Code executed at the beginning of each rule, after yytext and yyleng - * have been set up. - */ -#ifndef YY_USER_ACTION -#define YY_USER_ACTION -#endif - -/* Code executed at the end of each rule. */ -#ifndef YY_BREAK -#define YY_BREAK /*LINTED*/break; -#endif - -#define YY_RULE_SETUP \ - YY_USER_ACTION - -/** The main scanner function which does all the work. - */ -YY_DECL -{ - yy_state_type yy_current_state; - char *yy_cp, *yy_bp; - int yy_act; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if ( !yyg->yy_init ) - { - yyg->yy_init = 1; - -#ifdef YY_USER_INIT - YY_USER_INIT; -#endif - - if ( ! yyg->yy_start ) - yyg->yy_start = 1; /* first start state */ - - if ( ! yyin ) - yyin = stdin; - - if ( ! yyout ) - yyout = stdout; - - if ( ! YY_CURRENT_BUFFER ) { - cmListFileLexer_yyensure_buffer_stack (yyscanner); - YY_CURRENT_BUFFER_LVALUE = - cmListFileLexer_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); - } - - cmListFileLexer_yy_load_buffer_state(yyscanner ); - } - - { -#line 80 "cmListFileLexer.in.l" - - -#line 866 "cmListFileLexer.c" - - while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ - { - yy_cp = yyg->yy_c_buf_p; - - /* Support of yytext. */ - *yy_cp = yyg->yy_hold_char; - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = yyg->yy_start; -yy_match: - do - { - YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 77 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; - ++yy_cp; - } - while ( yy_base[yy_current_state] != 237 ); - -yy_find_action: - yy_act = yy_accept[yy_current_state]; - if ( yy_act == 0 ) - { /* have to back up */ - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - yy_act = yy_accept[yy_current_state]; - } - - YY_DO_BEFORE_ACTION; - - if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] ) - { - int yyl; - for ( yyl = 0; yyl < yyleng; ++yyl ) - if ( yytext[yyl] == '\n' ) - - do{ yylineno++; - yycolumn=0; - }while(0) -; - } - -do_action: /* This label is used only to access EOF actions. */ - - switch ( yy_act ) - { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = yyg->yy_hold_char; - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - goto yy_find_action; - -case 1: -/* rule 1 can match eol */ -YY_RULE_SETUP -#line 82 "cmListFileLexer.in.l" -{ - lexer->token.type = cmListFileLexer_Token_Newline; - cmListFileLexerSetToken(lexer, yytext, yyleng); - ++lexer->line; - lexer->column = 1; - BEGIN(INITIAL); - return 1; -} - YY_BREAK -case 2: -/* rule 2 can match eol */ -YY_RULE_SETUP -#line 91 "cmListFileLexer.in.l" -{ - const char* bracket = yytext; - lexer->comment = yytext[0] == '#'; - if (lexer->comment) { - lexer->token.type = cmListFileLexer_Token_CommentBracket; - bracket += 1; - } else { - lexer->token.type = cmListFileLexer_Token_ArgumentBracket; - } - cmListFileLexerSetToken(lexer, "", 0); - lexer->bracket = strchr(bracket+1, '[') - bracket; - if (yytext[yyleng-1] == '\n') { - ++lexer->line; - lexer->column = 1; - } else { - lexer->column += yyleng; - } - BEGIN(BRACKET); -} - YY_BREAK -case 3: -YY_RULE_SETUP -#line 111 "cmListFileLexer.in.l" -{ - lexer->column += yyleng; - BEGIN(COMMENT); -} - YY_BREAK -case 4: -YY_RULE_SETUP -#line 116 "cmListFileLexer.in.l" -{ - lexer->column += yyleng; -} - YY_BREAK -case 5: -YY_RULE_SETUP -#line 120 "cmListFileLexer.in.l" -{ - lexer->token.type = cmListFileLexer_Token_ParenLeft; - cmListFileLexerSetToken(lexer, yytext, yyleng); - lexer->column += yyleng; - return 1; -} - YY_BREAK -case 6: -YY_RULE_SETUP -#line 127 "cmListFileLexer.in.l" -{ - lexer->token.type = cmListFileLexer_Token_ParenRight; - cmListFileLexerSetToken(lexer, yytext, yyleng); - lexer->column += yyleng; - return 1; -} - YY_BREAK -case 7: -YY_RULE_SETUP -#line 134 "cmListFileLexer.in.l" -{ - lexer->token.type = cmListFileLexer_Token_Identifier; - cmListFileLexerSetToken(lexer, yytext, yyleng); - lexer->column += yyleng; - return 1; -} - YY_BREAK -case 8: -YY_RULE_SETUP -#line 141 "cmListFileLexer.in.l" -{ - /* Handle ]]====]=======]*/ - cmListFileLexerAppend(lexer, yytext, yyleng); - lexer->column += yyleng; - if (yyleng == lexer->bracket) { - BEGIN(BRACKETEND); - } -} - YY_BREAK -case 9: -YY_RULE_SETUP -#line 150 "cmListFileLexer.in.l" -{ - lexer->column += yyleng; - /* Erase the partial bracket from the token. */ - lexer->token.length -= lexer->bracket; - lexer->token.text[lexer->token.length] = 0; - BEGIN(INITIAL); - return 1; -} - YY_BREAK -case 10: -YY_RULE_SETUP -#line 159 "cmListFileLexer.in.l" -{ - cmListFileLexerAppend(lexer, yytext, yyleng); - lexer->column += yyleng; -} - YY_BREAK -case 11: -/* rule 11 can match eol */ -YY_RULE_SETUP -#line 164 "cmListFileLexer.in.l" -{ - cmListFileLexerAppend(lexer, yytext, yyleng); - ++lexer->line; - lexer->column = 1; - BEGIN(BRACKET); -} - YY_BREAK -case 12: -YY_RULE_SETUP -#line 171 "cmListFileLexer.in.l" -{ - cmListFileLexerAppend(lexer, yytext, yyleng); - lexer->column += yyleng; - BEGIN(BRACKET); -} - YY_BREAK -case YY_STATE_EOF(BRACKET): -case YY_STATE_EOF(BRACKETEND): -#line 177 "cmListFileLexer.in.l" -{ - lexer->token.type = cmListFileLexer_Token_BadBracket; - BEGIN(INITIAL); - return 1; -} - YY_BREAK -case 13: -YY_RULE_SETUP -#line 183 "cmListFileLexer.in.l" -{ - lexer->token.type = cmListFileLexer_Token_ArgumentUnquoted; - cmListFileLexerSetToken(lexer, yytext, yyleng); - lexer->column += yyleng; - return 1; -} - YY_BREAK -case 14: -YY_RULE_SETUP -#line 190 "cmListFileLexer.in.l" -{ - lexer->token.type = cmListFileLexer_Token_ArgumentUnquoted; - cmListFileLexerSetToken(lexer, yytext, yyleng); - lexer->column += yyleng; - return 1; -} - YY_BREAK -case 15: -YY_RULE_SETUP -#line 197 "cmListFileLexer.in.l" -{ - lexer->token.type = cmListFileLexer_Token_ArgumentUnquoted; - cmListFileLexerSetToken(lexer, yytext, yyleng); - lexer->column += yyleng; - return 1; -} - YY_BREAK -case 16: -YY_RULE_SETUP -#line 204 "cmListFileLexer.in.l" -{ - lexer->token.type = cmListFileLexer_Token_ArgumentQuoted; - cmListFileLexerSetToken(lexer, "", 0); - lexer->column += yyleng; - BEGIN(STRING); -} - YY_BREAK -case 17: -YY_RULE_SETUP -#line 211 "cmListFileLexer.in.l" -{ - cmListFileLexerAppend(lexer, yytext, yyleng); - lexer->column += yyleng; -} - YY_BREAK -case 18: -/* rule 18 can match eol */ -YY_RULE_SETUP -#line 216 "cmListFileLexer.in.l" -{ - /* Continuation: text is not part of string */ - ++lexer->line; - lexer->column = 1; -} - YY_BREAK -case 19: -/* rule 19 can match eol */ -YY_RULE_SETUP -#line 222 "cmListFileLexer.in.l" -{ - cmListFileLexerAppend(lexer, yytext, yyleng); - ++lexer->line; - lexer->column = 1; -} - YY_BREAK -case 20: -YY_RULE_SETUP -#line 228 "cmListFileLexer.in.l" -{ - lexer->column += yyleng; - BEGIN(INITIAL); - return 1; -} - YY_BREAK -case 21: -YY_RULE_SETUP -#line 234 "cmListFileLexer.in.l" -{ - cmListFileLexerAppend(lexer, yytext, yyleng); - lexer->column += yyleng; -} - YY_BREAK -case YY_STATE_EOF(STRING): -#line 239 "cmListFileLexer.in.l" -{ - lexer->token.type = cmListFileLexer_Token_BadString; - BEGIN(INITIAL); - return 1; -} - YY_BREAK -case 22: -YY_RULE_SETUP -#line 245 "cmListFileLexer.in.l" -{ - lexer->token.type = cmListFileLexer_Token_Space; - cmListFileLexerSetToken(lexer, yytext, yyleng); - lexer->column += yyleng; - return 1; -} - YY_BREAK -case 23: -YY_RULE_SETUP -#line 252 "cmListFileLexer.in.l" -{ - lexer->token.type = cmListFileLexer_Token_BadCharacter; - cmListFileLexerSetToken(lexer, yytext, yyleng); - lexer->column += yyleng; - return 1; -} - YY_BREAK -case YY_STATE_EOF(INITIAL): -case YY_STATE_EOF(COMMENT): -#line 259 "cmListFileLexer.in.l" -{ - lexer->token.type = cmListFileLexer_Token_None; - cmListFileLexerSetToken(lexer, 0, 0); - return 0; -} - YY_BREAK -case 24: -YY_RULE_SETUP -#line 265 "cmListFileLexer.in.l" -ECHO; - YY_BREAK -#line 1205 "cmListFileLexer.c" - - case YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = yyg->yy_hold_char; - YY_RESTORE_YY_MORE_OFFSET - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * cmListFileLexer_yylex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; - - yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( yyscanner ); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); - - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++yyg->yy_c_buf_p; - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = yyg->yy_c_buf_p; - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer( yyscanner ) ) - { - case EOB_ACT_END_OF_FILE: - { - yyg->yy_did_buffer_switch_on_eof = 0; - - if ( cmListFileLexer_yywrap(yyscanner ) ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else - { - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = - yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( yyscanner ); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - yyg->yy_c_buf_p = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; - - yy_current_state = yy_get_previous_state( yyscanner ); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ - } /* end of user's declarations */ -} /* end of cmListFileLexer_yylex */ - -/* yy_get_next_buffer - try to read in a new buffer - * - * Returns a code representing an action: - * EOB_ACT_LAST_MATCH - - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position - * EOB_ACT_END_OF_FILE - end of file - */ -static int yy_get_next_buffer (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - char *source = yyg->yytext_ptr; - yy_size_t number_to_move, i; - int ret_val; - - if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) - YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) - { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else - { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (yy_size_t) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1; - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; - - else - { - int num_to_read = - YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; - - int yy_c_buf_p_offset = - (int) (yyg->yy_c_buf_p - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) - { - int new_size = b->yy_buf_size * 2; - - if ( new_size <= 0 ) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - cmListFileLexer_yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner ); - } - else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = NULL; - - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); - - yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - - number_to_move - 1; - - } - - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - yyg->yy_n_chars, num_to_read ); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - if ( yyg->yy_n_chars == 0 ) - { - if ( number_to_move == YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - cmListFileLexer_yyrestart(yyin ,yyscanner); - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - if ((int) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) cmListFileLexer_yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner ); - if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); - } - - yyg->yy_n_chars += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; - - yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; -} - -/* yy_get_previous_state - get the state just before the EOB char was reached */ - - static yy_state_type yy_get_previous_state (yyscan_t yyscanner) -{ - yy_state_type yy_current_state; - char *yy_cp; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - yy_current_state = yyg->yy_start; - - for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) - { - YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 77 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; - } - - return yy_current_state; -} - -/* yy_try_NUL_trans - try to make a transition on the NUL character - * - * synopsis - * next_state = yy_try_NUL_trans( current_state ); - */ - static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) -{ - int yy_is_jam; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ - char *yy_cp = yyg->yy_c_buf_p; - - YY_CHAR yy_c = 1; - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 77 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; - yy_is_jam = (yy_current_state == 76); - - (void)yyg; - return yy_is_jam ? 0 : yy_current_state; -} - -#ifndef YY_NO_UNPUT - - static void yyunput (int c, char * yy_bp , yyscan_t yyscanner) -{ - char *yy_cp; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - yy_cp = yyg->yy_c_buf_p; - - /* undo effects of setting up yytext */ - *yy_cp = yyg->yy_hold_char; - - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) - { /* need to shift things up to make room */ - /* +2 for EOB chars. */ - int number_to_move = yyg->yy_n_chars + 2; - char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; - char *source = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; - - while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - *--dest = *--source; - - yy_cp += (int) (dest - source); - yy_bp += (int) (dest - source); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = - yyg->yy_n_chars = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size; - - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) - YY_FATAL_ERROR( "flex scanner push-back overflow" ); - } - - *--yy_cp = (char) c; - - if ( c == '\n' ){ - --yylineno; - } - - yyg->yytext_ptr = yy_bp; - yyg->yy_hold_char = *yy_cp; - yyg->yy_c_buf_p = yy_cp; -} - -#endif - -#ifndef YY_NO_INPUT -#ifdef __cplusplus - static int yyinput (yyscan_t yyscanner) -#else - static int input (yyscan_t yyscanner) -#endif - -{ - int c; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - *yyg->yy_c_buf_p = yyg->yy_hold_char; - - if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) - { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) - /* This was really a NUL. */ - *yyg->yy_c_buf_p = '\0'; - - else - { /* need more input */ - int offset = yyg->yy_c_buf_p - yyg->yytext_ptr; - ++yyg->yy_c_buf_p; - - switch ( yy_get_next_buffer( yyscanner ) ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - cmListFileLexer_yyrestart(yyin ,yyscanner); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: - { - if ( cmListFileLexer_yywrap(yyscanner ) ) - return 0; - - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; -#ifdef __cplusplus - return yyinput(yyscanner); -#else - return input(yyscanner); -#endif - } - - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = yyg->yytext_ptr + offset; - break; - } - } - } - - c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ - *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ - yyg->yy_hold_char = *++yyg->yy_c_buf_p; - - if ( c == '\n' ) - - do{ yylineno++; - yycolumn=0; - }while(0) -; - - return c; -} -#endif /* ifndef YY_NO_INPUT */ - -/** Immediately switch to a different input stream. - * @param input_file A readable stream. - * @param yyscanner The scanner object. - * @note This function does not reset the start condition to @c INITIAL . - */ - void cmListFileLexer_yyrestart (FILE * input_file , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if ( ! YY_CURRENT_BUFFER ){ - cmListFileLexer_yyensure_buffer_stack (yyscanner); - YY_CURRENT_BUFFER_LVALUE = - cmListFileLexer_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); - } - - cmListFileLexer_yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner); - cmListFileLexer_yy_load_buffer_state(yyscanner ); -} - -/** Switch to a different input buffer. - * @param new_buffer The new input buffer. - * @param yyscanner The scanner object. - */ - void cmListFileLexer_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* TODO. We should be able to replace this entire function body - * with - * cmListFileLexer_yypop_buffer_state(); - * cmListFileLexer_yypush_buffer_state(new_buffer); - */ - cmListFileLexer_yyensure_buffer_stack (yyscanner); - if ( YY_CURRENT_BUFFER == new_buffer ) - return; - - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - cmListFileLexer_yy_load_buffer_state(yyscanner ); - - /* We don't actually know whether we did this switch during - * EOF (cmListFileLexer_yywrap()) processing, but the only time this flag - * is looked at is after cmListFileLexer_yywrap() is called, so it's safe - * to go ahead and always set it. - */ - yyg->yy_did_buffer_switch_on_eof = 1; -} - -static void cmListFileLexer_yy_load_buffer_state (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - yyg->yy_hold_char = *yyg->yy_c_buf_p; -} - -/** Allocate and initialize an input buffer state. - * @param file A readable stream. - * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. - * @param yyscanner The scanner object. - * @return the allocated buffer state. - */ - YY_BUFFER_STATE cmListFileLexer_yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) -{ - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) cmListFileLexer_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in cmListFileLexer_yy_create_buffer()" ); - - b->yy_buf_size = (yy_size_t)size; - - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *) cmListFileLexer_yyalloc(b->yy_buf_size + 2 ,yyscanner ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in cmListFileLexer_yy_create_buffer()" ); - - b->yy_is_our_buffer = 1; - - cmListFileLexer_yy_init_buffer(b,file ,yyscanner); - - return b; -} - -/** Destroy the buffer. - * @param b a buffer created with cmListFileLexer_yy_create_buffer() - * @param yyscanner The scanner object. - */ - void cmListFileLexer_yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if ( ! b ) - return; - - if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; - - if ( b->yy_is_our_buffer ) - cmListFileLexer_yyfree((void *) b->yy_ch_buf ,yyscanner ); - - cmListFileLexer_yyfree((void *) b ,yyscanner ); -} - -/* Initializes or reinitializes a buffer. - * This function is sometimes called more than once on the same buffer, - * such as during a cmListFileLexer_yyrestart() or at EOF. - */ - static void cmListFileLexer_yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) - -{ - int oerrno = errno; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - cmListFileLexer_yy_flush_buffer(b ,yyscanner); - - b->yy_input_file = file; - b->yy_fill_buffer = 1; - - /* If b is the current buffer, then cmListFileLexer_yy_init_buffer was _probably_ - * called from cmListFileLexer_yyrestart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER){ - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } - - b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; - - errno = oerrno; -} - -/** Discard all buffered characters. On the next scan, YY_INPUT will be called. - * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. - * @param yyscanner The scanner object. - */ - void cmListFileLexer_yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if ( ! b ) - return; - - b->yy_n_chars = 0; - - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - - b->yy_buf_pos = &b->yy_ch_buf[0]; - - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; - - if ( b == YY_CURRENT_BUFFER ) - cmListFileLexer_yy_load_buffer_state(yyscanner ); -} - -/** Pushes the new state onto the stack. The new state becomes - * the current state. This function will allocate the stack - * if necessary. - * @param new_buffer The new state. - * @param yyscanner The scanner object. - */ -void cmListFileLexer_yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (new_buffer == NULL) - return; - - cmListFileLexer_yyensure_buffer_stack(yyscanner); - - /* This block is copied from cmListFileLexer_yy_switch_to_buffer. */ - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - yyg->yy_buffer_stack_top++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from cmListFileLexer_yy_switch_to_buffer. */ - cmListFileLexer_yy_load_buffer_state(yyscanner ); - yyg->yy_did_buffer_switch_on_eof = 1; -} - -/** Removes and deletes the top of the stack, if present. - * The next element becomes the new top. - * @param yyscanner The scanner object. - */ -void cmListFileLexer_yypop_buffer_state (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!YY_CURRENT_BUFFER) - return; - - cmListFileLexer_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner); - YY_CURRENT_BUFFER_LVALUE = NULL; - if (yyg->yy_buffer_stack_top > 0) - --yyg->yy_buffer_stack_top; - - if (YY_CURRENT_BUFFER) { - cmListFileLexer_yy_load_buffer_state(yyscanner ); - yyg->yy_did_buffer_switch_on_eof = 1; - } -} - -/* Allocates the stack if it does not exist. - * Guarantees space for at least one push. - */ -static void cmListFileLexer_yyensure_buffer_stack (yyscan_t yyscanner) -{ - int num_to_alloc; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (!yyg->yy_buffer_stack) { - - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ - yyg->yy_buffer_stack = (struct yy_buffer_state**)cmListFileLexer_yyalloc - (num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); - if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in cmListFileLexer_yyensure_buffer_stack()" ); - - memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - - yyg->yy_buffer_stack_max = num_to_alloc; - yyg->yy_buffer_stack_top = 0; - return; - } - - if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ - - /* Increase the buffer to prepare for a possible push. */ - yy_size_t grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = yyg->yy_buffer_stack_max + grow_size; - yyg->yy_buffer_stack = (struct yy_buffer_state**)cmListFileLexer_yyrealloc - (yyg->yy_buffer_stack, - num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); - if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in cmListFileLexer_yyensure_buffer_stack()" ); - - /* zero only the new slots.*/ - memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); - yyg->yy_buffer_stack_max = num_to_alloc; - } -} - -/** Setup the input buffer state to scan directly from a user-specified character buffer. - * @param base the character buffer - * @param size the size in bytes of the character buffer - * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE cmListFileLexer_yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) -{ - YY_BUFFER_STATE b; - - if ( size < 2 || - base[size-2] != YY_END_OF_BUFFER_CHAR || - base[size-1] != YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return NULL; - - b = (YY_BUFFER_STATE) cmListFileLexer_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in cmListFileLexer_yy_scan_buffer()" ); - - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = NULL; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - cmListFileLexer_yy_switch_to_buffer(b ,yyscanner ); - - return b; -} - -/** Setup the input buffer state to scan a string. The next call to cmListFileLexer_yylex() will - * scan from a @e copy of @a str. - * @param yystr a NUL-terminated string to scan - * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. - * @note If you want to scan bytes that may contain NUL values, then use - * cmListFileLexer_yy_scan_bytes() instead. - */ -YY_BUFFER_STATE cmListFileLexer_yy_scan_string (yyconst char * yystr , yyscan_t yyscanner) -{ - - return cmListFileLexer_yy_scan_bytes(yystr,(int) strlen(yystr) ,yyscanner); -} - -/** Setup the input buffer state to scan the given bytes. The next call to cmListFileLexer_yylex() will - * scan from a @e copy of @a bytes. - * @param yybytes the byte buffer to scan - * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. - * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE cmListFileLexer_yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner) -{ - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - yy_size_t i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = (yy_size_t) _yybytes_len + 2; - buf = (char *) cmListFileLexer_yyalloc(n ,yyscanner ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in cmListFileLexer_yy_scan_bytes()" ); - - for ( i = 0; i < (size_t)_yybytes_len; ++i ) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - - b = cmListFileLexer_yy_scan_buffer(buf,n ,yyscanner); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in cmListFileLexer_yy_scan_bytes()" ); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; -} - -#ifndef YY_EXIT_FAILURE -#define YY_EXIT_FAILURE 2 -#endif - -static void yynoreturn yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - (void) fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); -} - -/* Redefine yyless() so it works in section 3 code. */ - -#undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - yytext[yyleng] = yyg->yy_hold_char; \ - yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ - yyg->yy_hold_char = *yyg->yy_c_buf_p; \ - *yyg->yy_c_buf_p = '\0'; \ - yyleng = yyless_macro_arg; \ - } \ - while ( 0 ) - -/* Accessor methods (get/set functions) to struct members. */ - -/** Get the user-defined data for this scanner. - * @param yyscanner The scanner object. - */ -YY_EXTRA_TYPE cmListFileLexer_yyget_extra (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyextra; -} - -/** Get the current line number. - * @param yyscanner The scanner object. - */ -int cmListFileLexer_yyget_lineno (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (! YY_CURRENT_BUFFER) - return 0; - - return yylineno; -} - -/** Get the current column number. - * @param yyscanner The scanner object. - */ -int cmListFileLexer_yyget_column (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (! YY_CURRENT_BUFFER) - return 0; - - return yycolumn; -} - -/** Get the input stream. - * @param yyscanner The scanner object. - */ -FILE *cmListFileLexer_yyget_in (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyin; -} - -/** Get the output stream. - * @param yyscanner The scanner object. - */ -FILE *cmListFileLexer_yyget_out (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyout; -} - -/** Get the length of the current token. - * @param yyscanner The scanner object. - */ -int cmListFileLexer_yyget_leng (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyleng; -} - -/** Get the current token. - * @param yyscanner The scanner object. - */ - -char *cmListFileLexer_yyget_text (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yytext; -} - -/** Set the user-defined data. This data is never touched by the scanner. - * @param user_defined The data to be associated with this scanner. - * @param yyscanner The scanner object. - */ -void cmListFileLexer_yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyextra = user_defined ; -} - -/** Set the current line number. - * @param _line_number line number - * @param yyscanner The scanner object. - */ -void cmListFileLexer_yyset_lineno (int _line_number , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* lineno is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) - YY_FATAL_ERROR( "cmListFileLexer_yyset_lineno called with no buffer" ); - - yylineno = _line_number; -} - -/** Set the current column. - * @param _column_no column number - * @param yyscanner The scanner object. - */ -void cmListFileLexer_yyset_column (int _column_no , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* column is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) - YY_FATAL_ERROR( "cmListFileLexer_yyset_column called with no buffer" ); - - yycolumn = _column_no; -} - -/** Set the input stream. This does not discard the current - * input buffer. - * @param _in_str A readable stream. - * @param yyscanner The scanner object. - * @see cmListFileLexer_yy_switch_to_buffer - */ -void cmListFileLexer_yyset_in (FILE * _in_str , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyin = _in_str ; -} - -void cmListFileLexer_yyset_out (FILE * _out_str , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyout = _out_str ; -} - -int cmListFileLexer_yyget_debug (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yy_flex_debug; -} - -void cmListFileLexer_yyset_debug (int _bdebug , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yy_flex_debug = _bdebug ; -} - -/* Accessor methods for yylval and yylloc */ - -/* User-visible API */ - -/* cmListFileLexer_yylex_init is special because it creates the scanner itself, so it is - * the ONLY reentrant function that doesn't take the scanner as the last argument. - * That's why we explicitly handle the declaration, instead of using our macros. - */ - -int cmListFileLexer_yylex_init(yyscan_t* ptr_yy_globals) - -{ - if (ptr_yy_globals == NULL){ - errno = EINVAL; - return 1; - } - - *ptr_yy_globals = (yyscan_t) cmListFileLexer_yyalloc ( sizeof( struct yyguts_t ), NULL ); - - if (*ptr_yy_globals == NULL){ - errno = ENOMEM; - return 1; - } - - /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - - return yy_init_globals ( *ptr_yy_globals ); -} - -/* cmListFileLexer_yylex_init_extra has the same functionality as cmListFileLexer_yylex_init, but follows the - * convention of taking the scanner as the last argument. Note however, that - * this is a *pointer* to a scanner, as it will be allocated by this call (and - * is the reason, too, why this function also must handle its own declaration). - * The user defined value in the first argument will be available to cmListFileLexer_yyalloc in - * the yyextra field. - */ - -int cmListFileLexer_yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals ) - -{ - struct yyguts_t dummy_yyguts; - - cmListFileLexer_yyset_extra (yy_user_defined, &dummy_yyguts); - - if (ptr_yy_globals == NULL){ - errno = EINVAL; - return 1; - } - - *ptr_yy_globals = (yyscan_t) cmListFileLexer_yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); - - if (*ptr_yy_globals == NULL){ - errno = ENOMEM; - return 1; - } - - /* By setting to 0xAA, we expose bugs in - yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - - cmListFileLexer_yyset_extra (yy_user_defined, *ptr_yy_globals); - - return yy_init_globals ( *ptr_yy_globals ); -} - -static int yy_init_globals (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from cmListFileLexer_yylex_destroy(), so don't allocate here. - */ - - yyg->yy_buffer_stack = NULL; - yyg->yy_buffer_stack_top = 0; - yyg->yy_buffer_stack_max = 0; - yyg->yy_c_buf_p = NULL; - yyg->yy_init = 0; - yyg->yy_start = 0; - - yyg->yy_start_stack_ptr = 0; - yyg->yy_start_stack_depth = 0; - yyg->yy_start_stack = NULL; - -/* Defined in main.c */ -#ifdef YY_STDINIT - yyin = stdin; - yyout = stdout; -#else - yyin = NULL; - yyout = NULL; -#endif - - /* For future reference: Set errno on error, since we are called by - * cmListFileLexer_yylex_init() - */ - return 0; -} - -/* cmListFileLexer_yylex_destroy is for both reentrant and non-reentrant scanners. */ -int cmListFileLexer_yylex_destroy (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* Pop the buffer stack, destroying each element. */ - while(YY_CURRENT_BUFFER){ - cmListFileLexer_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner ); - YY_CURRENT_BUFFER_LVALUE = NULL; - cmListFileLexer_yypop_buffer_state(yyscanner); - } - - /* Destroy the stack itself. */ - cmListFileLexer_yyfree(yyg->yy_buffer_stack ,yyscanner); - yyg->yy_buffer_stack = NULL; - - /* Destroy the start condition stack. */ - cmListFileLexer_yyfree(yyg->yy_start_stack ,yyscanner ); - yyg->yy_start_stack = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner so the next time - * cmListFileLexer_yylex() is called, initialization will occur. */ - yy_init_globals( yyscanner); - - /* Destroy the main struct (reentrant only). */ - cmListFileLexer_yyfree ( yyscanner , yyscanner ); - yyscanner = NULL; - return 0; -} - -/* - * Internal utility routines. - */ - -#ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - - int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; -} -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) -{ - int n; - for ( n = 0; s[n]; ++n ) - ; - - return n; -} -#endif - -void *cmListFileLexer_yyalloc (yy_size_t size , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - return malloc(size); -} - -void *cmListFileLexer_yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return realloc(ptr, size); -} - -void cmListFileLexer_yyfree (void * ptr , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - free( (char *) ptr ); /* see cmListFileLexer_yyrealloc() for (char *) cast */ -} - -#define YYTABLES_NAME "yytables" - -#line 265 "cmListFileLexer.in.l" - - - -/*--------------------------------------------------------------------------*/ -static void cmListFileLexerSetToken(cmListFileLexer* lexer, const char* text, - int length) -{ - /* Set the token line and column number. */ - lexer->token.line = lexer->line; - lexer->token.column = lexer->column; - - /* Use the same buffer if possible. */ - if (lexer->token.text) { - if (text && length < lexer->size) { - strcpy(lexer->token.text, text); - lexer->token.length = length; - return; - } - free(lexer->token.text); - lexer->token.text = 0; - lexer->size = 0; - } - - /* Need to extend the buffer. */ - if (text) { - lexer->token.text = strdup(text); - lexer->token.length = length; - lexer->size = length + 1; - } else { - lexer->token.length = 0; - } -} - -/*--------------------------------------------------------------------------*/ -static void cmListFileLexerAppend(cmListFileLexer* lexer, const char* text, - int length) -{ - char* temp; - int newSize; - - /* If the appended text will fit in the buffer, do not reallocate. */ - newSize = lexer->token.length + length + 1; - if (lexer->token.text && newSize <= lexer->size) { - strcpy(lexer->token.text + lexer->token.length, text); - lexer->token.length += length; - return; - } - - /* We need to extend the buffer. */ - temp = malloc(newSize); - if (lexer->token.text) { - memcpy(temp, lexer->token.text, lexer->token.length); - free(lexer->token.text); - } - memcpy(temp + lexer->token.length, text, length); - temp[lexer->token.length + length] = 0; - lexer->token.text = temp; - lexer->token.length += length; - lexer->size = newSize; -} - -/*--------------------------------------------------------------------------*/ -static int cmListFileLexerInput(cmListFileLexer* lexer, char* buffer, - size_t bufferSize) -{ - if (lexer) { - if (lexer->file) { - /* Convert CRLF -> LF explicitly. The C FILE "t"ext mode - does not convert newlines on all platforms. Move any - trailing CR to the start of the buffer for the next read. */ - size_t cr = lexer->cr; - size_t n; - buffer[0] = '\r'; - n = fread(buffer + cr, 1, bufferSize - cr, lexer->file); - if (n) { - char* o = buffer; - const char* i = buffer; - const char* e; - n += cr; - cr = (buffer[n - 1] == '\r') ? 1 : 0; - e = buffer + n - cr; - while (i != e) { - if (i[0] == '\r' && i[1] == '\n') { - ++i; - } - *o++ = *i++; - } - n = o - buffer; - } else { - n = cr; - cr = 0; - } - lexer->cr = cr; - return n; - } else if (lexer->string_left) { - int length = lexer->string_left; - if ((int)bufferSize < length) { - length = (int)bufferSize; - } - memcpy(buffer, lexer->string_position, length); - lexer->string_position += length; - lexer->string_left -= length; - return length; - } - } - return 0; -} - -/*--------------------------------------------------------------------------*/ -static void cmListFileLexerInit(cmListFileLexer* lexer) -{ - if (lexer->file || lexer->string_buffer) { - cmListFileLexer_yylex_init(&lexer->scanner); - cmListFileLexer_yyset_extra(lexer, lexer->scanner); - } -} - -/*--------------------------------------------------------------------------*/ -static void cmListFileLexerDestroy(cmListFileLexer* lexer) -{ - cmListFileLexerSetToken(lexer, 0, 0); - if (lexer->file || lexer->string_buffer) { - cmListFileLexer_yylex_destroy(lexer->scanner); - if (lexer->file) { - fclose(lexer->file); - lexer->file = 0; - } - if (lexer->string_buffer) { - free(lexer->string_buffer); - lexer->string_buffer = 0; - lexer->string_left = 0; - lexer->string_position = 0; - } - } -} - -/*--------------------------------------------------------------------------*/ -cmListFileLexer* cmListFileLexer_New(void) -{ - cmListFileLexer* lexer = (cmListFileLexer*)malloc(sizeof(cmListFileLexer)); - if (!lexer) { - return 0; - } - memset(lexer, 0, sizeof(*lexer)); - lexer->line = 1; - lexer->column = 1; - return lexer; -} - -/*--------------------------------------------------------------------------*/ -void cmListFileLexer_Delete(cmListFileLexer* lexer) -{ - cmListFileLexer_SetFileName(lexer, 0, 0); - free(lexer); -} - -/*--------------------------------------------------------------------------*/ -static cmListFileLexer_BOM cmListFileLexer_ReadBOM(FILE* f) -{ - unsigned char b[2]; - if (fread(b, 1, 2, f) == 2) { - if (b[0] == 0xEF && b[1] == 0xBB) { - if (fread(b, 1, 1, f) == 1 && b[0] == 0xBF) { - return cmListFileLexer_BOM_UTF8; - } - } else if (b[0] == 0xFE && b[1] == 0xFF) { - /* UTF-16 BE */ - return cmListFileLexer_BOM_UTF16BE; - } else if (b[0] == 0 && b[1] == 0) { - if (fread(b, 1, 2, f) == 2 && b[0] == 0xFE && b[1] == 0xFF) { - return cmListFileLexer_BOM_UTF32BE; - } - } else if (b[0] == 0xFF && b[1] == 0xFE) { - fpos_t p; - fgetpos(f, &p); - if (fread(b, 1, 2, f) == 2 && b[0] == 0 && b[1] == 0) { - return cmListFileLexer_BOM_UTF32LE; - } - if (fsetpos(f, &p) != 0) { - return cmListFileLexer_BOM_Broken; - } - return cmListFileLexer_BOM_UTF16LE; - } - } - if (fseek(f, 0, SEEK_SET) != 0) { - return cmListFileLexer_BOM_Broken; - } - return cmListFileLexer_BOM_None; -} - -/*--------------------------------------------------------------------------*/ -int cmListFileLexer_SetFileName(cmListFileLexer* lexer, const char* name, - cmListFileLexer_BOM* bom) -{ - int result = 1; - cmListFileLexerDestroy(lexer); - if (name) { -#ifdef _WIN32 - wchar_t* wname = cmsysEncoding_DupToWide(name); - lexer->file = _wfopen(wname, L"rb"); - free(wname); -#else - lexer->file = fopen(name, "rb"); -#endif - if (lexer->file) { - if (bom) { - *bom = cmListFileLexer_ReadBOM(lexer->file); - } - } else { - result = 0; - } - } - cmListFileLexerInit(lexer); - return result; -} - -/*--------------------------------------------------------------------------*/ -int cmListFileLexer_SetString(cmListFileLexer* lexer, const char* text) -{ - int result = 1; - cmListFileLexerDestroy(lexer); - if (text) { - int length = (int)strlen(text); - lexer->string_buffer = (char*)malloc(length + 1); - if (lexer->string_buffer) { - strcpy(lexer->string_buffer, text); - lexer->string_position = lexer->string_buffer; - lexer->string_left = length; - } else { - result = 0; - } - } - cmListFileLexerInit(lexer); - return result; -} - -/*--------------------------------------------------------------------------*/ -cmListFileLexer_Token* cmListFileLexer_Scan(cmListFileLexer* lexer) -{ - if (!lexer->file) { - return 0; - } - if (cmListFileLexer_yylex(lexer->scanner, lexer)) { - return &lexer->token; - } else { - cmListFileLexer_SetFileName(lexer, 0, 0); - return 0; - } -} - -/*--------------------------------------------------------------------------*/ -long cmListFileLexer_GetCurrentLine(cmListFileLexer* lexer) -{ - if (lexer->file) { - return lexer->line; - } else { - return 0; - } -} - -/*--------------------------------------------------------------------------*/ -long cmListFileLexer_GetCurrentColumn(cmListFileLexer* lexer) -{ - if (lexer->file) { - return lexer->column; - } else { - return 0; - } -} - -/*--------------------------------------------------------------------------*/ -const char* cmListFileLexer_GetTypeAsString(cmListFileLexer* lexer, - cmListFileLexer_Type type) -{ - (void)lexer; - switch (type) { - case cmListFileLexer_Token_None: - return "nothing"; - case cmListFileLexer_Token_Space: - return "space"; - case cmListFileLexer_Token_Newline: - return "newline"; - case cmListFileLexer_Token_Identifier: - return "identifier"; - case cmListFileLexer_Token_ParenLeft: - return "left paren"; - case cmListFileLexer_Token_ParenRight: - return "right paren"; - case cmListFileLexer_Token_ArgumentUnquoted: - return "unquoted argument"; - case cmListFileLexer_Token_ArgumentQuoted: - return "quoted argument"; - case cmListFileLexer_Token_ArgumentBracket: - return "bracket argument"; - case cmListFileLexer_Token_CommentBracket: - return "bracket comment"; - case cmListFileLexer_Token_BadCharacter: - return "bad character"; - case cmListFileLexer_Token_BadBracket: - return "unterminated bracket"; - case cmListFileLexer_Token_BadString: - return "unterminated string"; - } - return "unknown token"; -} diff --git a/Source/cmListFileLexer.in.l b/Source/cmListFileLexer.in.l deleted file mode 100644 index 5152dbf..0000000 --- a/Source/cmListFileLexer.in.l +++ /dev/null @@ -1,564 +0,0 @@ -%{ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ -/* - -This file must be translated to C and modified to build everywhere. - -Run flex >= 2.6 like this: - - flex --nounistd -DFLEXINT_H --prefix=cmListFileLexer_yy -ocmListFileLexer.c cmListFileLexer.in.l - -Modify cmListFileLexer.c: - - remove trailing whitespace: sed -i 's/\s*$//' cmListFileLexer.c - - remove blank lines at end of file - - #include "cmStandardLexer.h" at the top - - add cast in yy_scan_bytes for loop condition of _yybytes_len to size_t - - change type of variable yyl under yy_find_action from yy_size_t to int - -*/ - -/* IWYU pragma: no_forward_declare yyguts_t */ - -#ifdef WIN32 -#include "cmsys/Encoding.h" -#endif - -/* Setup the proper cmListFileLexer_yylex declaration. */ -#define YY_EXTRA_TYPE cmListFileLexer* -#define YY_DECL int cmListFileLexer_yylex (yyscan_t yyscanner, cmListFileLexer* lexer) - -#include "cmListFileLexer.h" - -/*--------------------------------------------------------------------------*/ -struct cmListFileLexer_s -{ - cmListFileLexer_Token token; - int bracket; - int comment; - int line; - int column; - int size; - FILE* file; - size_t cr; - char* string_buffer; - char* string_position; - int string_left; - yyscan_t scanner; -}; - -static void cmListFileLexerSetToken(cmListFileLexer* lexer, const char* text, - int length); -static void cmListFileLexerAppend(cmListFileLexer* lexer, const char* text, - int length); -static int cmListFileLexerInput(cmListFileLexer* lexer, char* buffer, - size_t bufferSize); -static void cmListFileLexerInit(cmListFileLexer* lexer); -static void cmListFileLexerDestroy(cmListFileLexer* lexer); - -/* Replace the lexer input function. */ -#undef YY_INPUT -#define YY_INPUT(buf, result, max_size) \ - { result = cmListFileLexerInput(cmListFileLexer_yyget_extra(yyscanner), buf, max_size); } - -/*--------------------------------------------------------------------------*/ -%} - -%option reentrant -%option yylineno -%option noyywrap -%pointer -%x STRING -%x BRACKET -%x BRACKETEND -%x COMMENT - -MAKEVAR \$\([A-Za-z0-9_]*\) -UNQUOTED ([^ \t\r\n\(\)#\\\"[=]|\\.) -LEGACY {MAKEVAR}|{UNQUOTED}|\"({MAKEVAR}|{UNQUOTED}|[ \t[=])*\" - -%% - -\n { - lexer->token.type = cmListFileLexer_Token_Newline; - cmListFileLexerSetToken(lexer, yytext, yyleng); - ++lexer->line; - lexer->column = 1; - BEGIN(INITIAL); - return 1; -} - -#?\[=*\[\n? { - const char* bracket = yytext; - lexer->comment = yytext[0] == '#'; - if (lexer->comment) { - lexer->token.type = cmListFileLexer_Token_CommentBracket; - bracket += 1; - } else { - lexer->token.type = cmListFileLexer_Token_ArgumentBracket; - } - cmListFileLexerSetToken(lexer, "", 0); - lexer->bracket = strchr(bracket+1, '[') - bracket; - if (yytext[yyleng-1] == '\n') { - ++lexer->line; - lexer->column = 1; - } else { - lexer->column += yyleng; - } - BEGIN(BRACKET); -} - -# { - lexer->column += yyleng; - BEGIN(COMMENT); -} - -.* { - lexer->column += yyleng; -} - -\( { - lexer->token.type = cmListFileLexer_Token_ParenLeft; - cmListFileLexerSetToken(lexer, yytext, yyleng); - lexer->column += yyleng; - return 1; -} - -\) { - lexer->token.type = cmListFileLexer_Token_ParenRight; - cmListFileLexerSetToken(lexer, yytext, yyleng); - lexer->column += yyleng; - return 1; -} - -[A-Za-z_][A-Za-z0-9_]* { - lexer->token.type = cmListFileLexer_Token_Identifier; - cmListFileLexerSetToken(lexer, yytext, yyleng); - lexer->column += yyleng; - return 1; -} - -\]=* { - /* Handle ]]====]=======]*/ - cmListFileLexerAppend(lexer, yytext, yyleng); - lexer->column += yyleng; - if (yyleng == lexer->bracket) { - BEGIN(BRACKETEND); - } -} - -\] { - lexer->column += yyleng; - /* Erase the partial bracket from the token. */ - lexer->token.length -= lexer->bracket; - lexer->token.text[lexer->token.length] = 0; - BEGIN(INITIAL); - return 1; -} - -([^]\n])+ { - cmListFileLexerAppend(lexer, yytext, yyleng); - lexer->column += yyleng; -} - -\n { - cmListFileLexerAppend(lexer, yytext, yyleng); - ++lexer->line; - lexer->column = 1; - BEGIN(BRACKET); -} - -. { - cmListFileLexerAppend(lexer, yytext, yyleng); - lexer->column += yyleng; - BEGIN(BRACKET); -} - -<> { - lexer->token.type = cmListFileLexer_Token_BadBracket; - BEGIN(INITIAL); - return 1; -} - -({UNQUOTED}|=|\[=*{UNQUOTED})({UNQUOTED}|[[=])* { - lexer->token.type = cmListFileLexer_Token_ArgumentUnquoted; - cmListFileLexerSetToken(lexer, yytext, yyleng); - lexer->column += yyleng; - return 1; -} - -({MAKEVAR}|{UNQUOTED}|=|\[=*{LEGACY})({LEGACY}|[[=])* { - lexer->token.type = cmListFileLexer_Token_ArgumentUnquoted; - cmListFileLexerSetToken(lexer, yytext, yyleng); - lexer->column += yyleng; - return 1; -} - -\[ { - lexer->token.type = cmListFileLexer_Token_ArgumentUnquoted; - cmListFileLexerSetToken(lexer, yytext, yyleng); - lexer->column += yyleng; - return 1; -} - -\" { - lexer->token.type = cmListFileLexer_Token_ArgumentQuoted; - cmListFileLexerSetToken(lexer, "", 0); - lexer->column += yyleng; - BEGIN(STRING); -} - -([^\\\n\"]|\\.)+ { - cmListFileLexerAppend(lexer, yytext, yyleng); - lexer->column += yyleng; -} - -\\\n { - /* Continuation: text is not part of string */ - ++lexer->line; - lexer->column = 1; -} - -\n { - cmListFileLexerAppend(lexer, yytext, yyleng); - ++lexer->line; - lexer->column = 1; -} - -\" { - lexer->column += yyleng; - BEGIN(INITIAL); - return 1; -} - -. { - cmListFileLexerAppend(lexer, yytext, yyleng); - lexer->column += yyleng; -} - -<> { - lexer->token.type = cmListFileLexer_Token_BadString; - BEGIN(INITIAL); - return 1; -} - -[ \t\r]+ { - lexer->token.type = cmListFileLexer_Token_Space; - cmListFileLexerSetToken(lexer, yytext, yyleng); - lexer->column += yyleng; - return 1; -} - -. { - lexer->token.type = cmListFileLexer_Token_BadCharacter; - cmListFileLexerSetToken(lexer, yytext, yyleng); - lexer->column += yyleng; - return 1; -} - -<> { - lexer->token.type = cmListFileLexer_Token_None; - cmListFileLexerSetToken(lexer, 0, 0); - return 0; -} - -%% - -/*--------------------------------------------------------------------------*/ -static void cmListFileLexerSetToken(cmListFileLexer* lexer, const char* text, - int length) -{ - /* Set the token line and column number. */ - lexer->token.line = lexer->line; - lexer->token.column = lexer->column; - - /* Use the same buffer if possible. */ - if (lexer->token.text) { - if (text && length < lexer->size) { - strcpy(lexer->token.text, text); - lexer->token.length = length; - return; - } - free(lexer->token.text); - lexer->token.text = 0; - lexer->size = 0; - } - - /* Need to extend the buffer. */ - if (text) { - lexer->token.text = strdup(text); - lexer->token.length = length; - lexer->size = length + 1; - } else { - lexer->token.length = 0; - } -} - -/*--------------------------------------------------------------------------*/ -static void cmListFileLexerAppend(cmListFileLexer* lexer, const char* text, - int length) -{ - char* temp; - int newSize; - - /* If the appended text will fit in the buffer, do not reallocate. */ - newSize = lexer->token.length + length + 1; - if (lexer->token.text && newSize <= lexer->size) { - strcpy(lexer->token.text + lexer->token.length, text); - lexer->token.length += length; - return; - } - - /* We need to extend the buffer. */ - temp = malloc(newSize); - if (lexer->token.text) { - memcpy(temp, lexer->token.text, lexer->token.length); - free(lexer->token.text); - } - memcpy(temp + lexer->token.length, text, length); - temp[lexer->token.length + length] = 0; - lexer->token.text = temp; - lexer->token.length += length; - lexer->size = newSize; -} - -/*--------------------------------------------------------------------------*/ -static int cmListFileLexerInput(cmListFileLexer* lexer, char* buffer, - size_t bufferSize) -{ - if (lexer) { - if (lexer->file) { - /* Convert CRLF -> LF explicitly. The C FILE "t"ext mode - does not convert newlines on all platforms. Move any - trailing CR to the start of the buffer for the next read. */ - size_t cr = lexer->cr; - size_t n; - buffer[0] = '\r'; - n = fread(buffer + cr, 1, bufferSize - cr, lexer->file); - if (n) { - char* o = buffer; - const char* i = buffer; - const char* e; - n += cr; - cr = (buffer[n - 1] == '\r') ? 1 : 0; - e = buffer + n - cr; - while (i != e) { - if (i[0] == '\r' && i[1] == '\n') { - ++i; - } - *o++ = *i++; - } - n = o - buffer; - } else { - n = cr; - cr = 0; - } - lexer->cr = cr; - return n; - } else if (lexer->string_left) { - int length = lexer->string_left; - if ((int)bufferSize < length) { - length = (int)bufferSize; - } - memcpy(buffer, lexer->string_position, length); - lexer->string_position += length; - lexer->string_left -= length; - return length; - } - } - return 0; -} - -/*--------------------------------------------------------------------------*/ -static void cmListFileLexerInit(cmListFileLexer* lexer) -{ - if (lexer->file || lexer->string_buffer) { - cmListFileLexer_yylex_init(&lexer->scanner); - cmListFileLexer_yyset_extra(lexer, lexer->scanner); - } -} - -/*--------------------------------------------------------------------------*/ -static void cmListFileLexerDestroy(cmListFileLexer* lexer) -{ - cmListFileLexerSetToken(lexer, 0, 0); - if (lexer->file || lexer->string_buffer) { - cmListFileLexer_yylex_destroy(lexer->scanner); - if (lexer->file) { - fclose(lexer->file); - lexer->file = 0; - } - if (lexer->string_buffer) { - free(lexer->string_buffer); - lexer->string_buffer = 0; - lexer->string_left = 0; - lexer->string_position = 0; - } - } -} - -/*--------------------------------------------------------------------------*/ -cmListFileLexer* cmListFileLexer_New(void) -{ - cmListFileLexer* lexer = (cmListFileLexer*)malloc(sizeof(cmListFileLexer)); - if (!lexer) { - return 0; - } - memset(lexer, 0, sizeof(*lexer)); - lexer->line = 1; - lexer->column = 1; - return lexer; -} - -/*--------------------------------------------------------------------------*/ -void cmListFileLexer_Delete(cmListFileLexer* lexer) -{ - cmListFileLexer_SetFileName(lexer, 0, 0); - free(lexer); -} - -/*--------------------------------------------------------------------------*/ -static cmListFileLexer_BOM cmListFileLexer_ReadBOM(FILE* f) -{ - unsigned char b[2]; - if (fread(b, 1, 2, f) == 2) { - if (b[0] == 0xEF && b[1] == 0xBB) { - if (fread(b, 1, 1, f) == 1 && b[0] == 0xBF) { - return cmListFileLexer_BOM_UTF8; - } - } else if (b[0] == 0xFE && b[1] == 0xFF) { - /* UTF-16 BE */ - return cmListFileLexer_BOM_UTF16BE; - } else if (b[0] == 0 && b[1] == 0) { - if (fread(b, 1, 2, f) == 2 && b[0] == 0xFE && b[1] == 0xFF) { - return cmListFileLexer_BOM_UTF32BE; - } - } else if (b[0] == 0xFF && b[1] == 0xFE) { - fpos_t p; - fgetpos(f, &p); - if (fread(b, 1, 2, f) == 2 && b[0] == 0 && b[1] == 0) { - return cmListFileLexer_BOM_UTF32LE; - } - fsetpos(f, &p); - return cmListFileLexer_BOM_UTF16LE; - } - } - rewind(f); - return cmListFileLexer_BOM_None; -} - -/*--------------------------------------------------------------------------*/ -int cmListFileLexer_SetFileName(cmListFileLexer* lexer, const char* name, - cmListFileLexer_BOM* bom) -{ - int result = 1; - cmListFileLexerDestroy(lexer); - if (name) { -#ifdef _WIN32 - wchar_t* wname = cmsysEncoding_DupToWide(name); - lexer->file = _wfopen(wname, L"rb"); - free(wname); -#else - lexer->file = fopen(name, "rb"); -#endif - if (lexer->file) { - if (bom) { - *bom = cmListFileLexer_ReadBOM(lexer->file); - } - } else { - result = 0; - } - } - cmListFileLexerInit(lexer); - return result; -} - -/*--------------------------------------------------------------------------*/ -int cmListFileLexer_SetString(cmListFileLexer* lexer, const char* text) -{ - int result = 1; - cmListFileLexerDestroy(lexer); - if (text) { - int length = (int)strlen(text); - lexer->string_buffer = (char*)malloc(length + 1); - if (lexer->string_buffer) { - strcpy(lexer->string_buffer, text); - lexer->string_position = lexer->string_buffer; - lexer->string_left = length; - } else { - result = 0; - } - } - cmListFileLexerInit(lexer); - return result; -} - -/*--------------------------------------------------------------------------*/ -cmListFileLexer_Token* cmListFileLexer_Scan(cmListFileLexer* lexer) -{ - if (!lexer->file) { - return 0; - } - if (cmListFileLexer_yylex(lexer->scanner, lexer)) { - return &lexer->token; - } else { - cmListFileLexer_SetFileName(lexer, 0, 0); - return 0; - } -} - -/*--------------------------------------------------------------------------*/ -long cmListFileLexer_GetCurrentLine(cmListFileLexer* lexer) -{ - if (lexer->file) { - return lexer->line; - } else { - return 0; - } -} - -/*--------------------------------------------------------------------------*/ -long cmListFileLexer_GetCurrentColumn(cmListFileLexer* lexer) -{ - if (lexer->file) { - return lexer->column; - } else { - return 0; - } -} - -/*--------------------------------------------------------------------------*/ -const char* cmListFileLexer_GetTypeAsString(cmListFileLexer* lexer, - cmListFileLexer_Type type) -{ - (void)lexer; - switch (type) { - case cmListFileLexer_Token_None: - return "nothing"; - case cmListFileLexer_Token_Space: - return "space"; - case cmListFileLexer_Token_Newline: - return "newline"; - case cmListFileLexer_Token_Identifier: - return "identifier"; - case cmListFileLexer_Token_ParenLeft: - return "left paren"; - case cmListFileLexer_Token_ParenRight: - return "right paren"; - case cmListFileLexer_Token_ArgumentUnquoted: - return "unquoted argument"; - case cmListFileLexer_Token_ArgumentQuoted: - return "quoted argument"; - case cmListFileLexer_Token_ArgumentBracket: - return "bracket argument"; - case cmListFileLexer_Token_CommentBracket: - return "bracket comment"; - case cmListFileLexer_Token_BadCharacter: - return "bad character"; - case cmListFileLexer_Token_BadBracket: - return "unterminated bracket"; - case cmListFileLexer_Token_BadString: - return "unterminated string"; - } - return "unknown token"; -} diff --git a/bootstrap b/bootstrap index e957e82..9ac3904 100755 --- a/bootstrap +++ b/bootstrap @@ -240,6 +240,10 @@ CMAKE_UNUSED_SOURCES="\ " CMAKE_CXX_SOURCES="\ + LexerParser/cmCommandArgumentLexer \ + LexerParser/cmCommandArgumentParser \ + LexerParser/cmExprLexer \ + LexerParser/cmExprParser \ cmAddCustomCommandCommand \ cmAddCustomTargetCommand \ cmAddDefinitionsCommand \ @@ -255,8 +259,6 @@ CMAKE_CXX_SOURCES="\ cmCPackPropertiesGenerator \ cmCacheManager \ cmCommand \ - cmCommandArgumentLexer \ - cmCommandArgumentParser \ cmCommandArgumentParserHelper \ cmCommandArgumentsHelper \ cmCommands \ @@ -288,8 +290,6 @@ CMAKE_CXX_SOURCES="\ cmExportSet \ cmExportSetMap \ cmExportTryCompileFileGenerator \ - cmExprLexer \ - cmExprParser \ cmExprParserHelper \ cmExternalMakefileProjectGenerator \ cmFileCommand \ @@ -417,7 +417,7 @@ if ${cmake_system_mingw}; then fi CMAKE_C_SOURCES="\ - cmListFileLexer \ + LexerParser/cmListFileLexer \ " if ${cmake_system_mingw}; then @@ -810,6 +810,11 @@ if [ ! -d "cmsys" ]; then cmake_error 4 "Cannot create directory ${cmake_bootstrap_dir}/cmsys" fi +[ -d "LexerParser" ] || mkdir "LexerParser" +if [ ! -d "LexerParser" ]; then + cmake_error 5 "Cannot create directory ${cmake_bootstrap_dir}/LexerParser" +fi + # Delete all the bootstrap files rm -f "${cmake_bootstrap_dir}/cmake_bootstrap.log" rm -f "${cmake_bootstrap_dir}/cmConfigure.h${_tmp}" @@ -1431,9 +1436,15 @@ cmake_cxx_flags_SystemTools=" -DKWSYS_CXX_HAS_UTIMENSAT=${KWSYS_CXX_HAS_UTIMENSAT} -DKWSYS_CXX_HAS_UTIMES=${KWSYS_CXX_HAS_UTIMES} " -cmake_c_flags="${cmake_c_flags}-I`cmake_escape \"${cmake_bootstrap_dir}\"` -I`cmake_escape \"${cmake_source_dir}/Source\"` \ +cmake_c_flags="${cmake_c_flags} \ + -I`cmake_escape \"${cmake_bootstrap_dir}\"` \ + -I`cmake_escape \"${cmake_source_dir}/Source\"` \ + -I`cmake_escape \"${cmake_source_dir}/Source/LexerParser\"` \ -I`cmake_escape \"${cmake_source_dir}/Utilities\"`" -cmake_cxx_flags="${cmake_cxx_flags} -I`cmake_escape \"${cmake_bootstrap_dir}\"` -I`cmake_escape \"${cmake_source_dir}/Source\"` \ +cmake_cxx_flags="${cmake_cxx_flags} \ + -I`cmake_escape \"${cmake_bootstrap_dir}\"` \ + -I`cmake_escape \"${cmake_source_dir}/Source\"` \ + -I`cmake_escape \"${cmake_source_dir}/Source/LexerParser\"` \ -I`cmake_escape \"${cmake_source_dir}/Utilities\"`" echo "cmake: ${objs}" > "${cmake_bootstrap_dir}/Makefile" echo " ${cmake_cxx_compiler} ${cmake_ld_flags} ${cmake_cxx_flags} ${objs} -o cmake" >> "${cmake_bootstrap_dir}/Makefile" -- cgit v0.12