diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2212a8fa..e9796b5c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,6 +6,10 @@ on: os: required: true type: string + configure-args: + required: false + type: string + default: "" permissions: contents: read @@ -32,26 +36,27 @@ jobs: if: inputs.os == 'ubuntu:24.04' run: | apt-get update -y - apt-get install -y build-essential gettext autoconf + apt-get install -y build-essential gettext autoconf bison flex - name: Install dependencies on AlmaLinux 9 if: inputs.os == 'almalinux:9' run: | dnf -y update - dnf install -y gcc make autoconf diffutils gettext + dnf install -y gcc make autoconf diffutils gettext bison flex - name: Install dependencies on Amazon Linux 2023 if: inputs.os == 'amazonlinux:2023' run: | dnf -y update - dnf install -y java-21-amazon-corretto-devel gcc make autoconf diffutils gettext tar gzip + dnf install -y java-21-amazon-corretto-devel gcc make autoconf diffutils gettext tar gzip bison flex - name: Checkout opensource COBOL 4J uses: actions/checkout@v4 - name: Install opensource COBOL 4J run: | - ./configure --prefix=/usr/ CFLAGS=-Werror + ./configure --prefix=/usr/ CFLAGS=-Werror ${{ inputs.configure-args }} + touch cobj/*.m4 make echo "ARTIFACT_NAME=${{ inputs.os }}" | sed 's/:/-/g' >> "$GITHUB_ENV" @@ -64,5 +69,5 @@ jobs: - name: Upload an artifact uses: actions/upload-artifact@v4 with: - name: opensourcecobol4j-${{ env.ARTIFACT_NAME }} + name: opensourcecobol4j-${{ env.ARTIFACT_NAME }}-opt_${{ inputs.configure-args }} path: opensourcecobol4j.tar.gz \ No newline at end of file diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index fba0c43d..66dc4822 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -30,6 +30,16 @@ jobs: with: os: ${{ matrix.os }} + build-utf8: + needs: check-workflows + strategy: + matrix: + os: ["ubuntu:24.04", "almalinux:9", "amazonlinux:2023"] + uses: ./.github/workflows/build.yml + with: + os: ${{ matrix.os }} + configure-args: --enable-utf8 + run-test-other: needs: build strategy: @@ -49,6 +59,28 @@ jobs: test-name: ${{ matrix.test_name }} os: ${{ matrix.os }} + run-test-other-utf8: + needs: build-utf8 + strategy: + fail-fast: false + matrix: + test_name: + - "command-line-options" + - "data-rep" + - "cobol_utf8" + #- "i18n_utf8" + - "jp-compat" + - "run" + - "syntax" + - "cobj-idx" + #- "misc" + os: ["ubuntu:24.04", "almalinux:9", "amazonlinux:2023"] + uses: ./.github/workflows/test-other.yml + with: + test-name: ${{ matrix.test_name }} + os: ${{ matrix.os }} + configure-args: --enable-utf8 + run-test-cobj-api: needs: build strategy: @@ -70,6 +102,20 @@ jobs: check-result: true os: ${{ matrix.os }} + run-test-nist-utf8: + needs: build-utf8 + strategy: + fail-fast: false + matrix: + test_name: ["IC", "IF", "IX", "NC", "OB", "RL", "SG", "SM", "SQ", "ST"] + os: ["ubuntu:24.04", "almalinux:9", "amazonlinux:2023"] + uses: ./.github/workflows/test-nist.yml + with: + test-name: ${{ matrix.test_name }} + check-result: true + os: ${{ matrix.os }} + configure-args: --enable-utf8 + run-test-nist-extra: needs: build strategy: diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 5fb65f08..97cbd919 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -29,9 +29,20 @@ jobs: with: os: ${{ matrix.os }} + build-utf8: + needs: check-workflows + strategy: + matrix: + os: ["ubuntu:24.04"] + uses: ./.github/workflows/build.yml + with: + os: ${{ matrix.os }} + configure-args: --enable-utf8 + run-test-other: needs: build strategy: + fail-fast: false matrix: test_name: - "command-line-options" @@ -47,6 +58,28 @@ jobs: with: test-name: ${{ matrix.test_name }} os: ${{ matrix.os }} + + run-test-other-utf8: + needs: build-utf8 + strategy: + fail-fast: false + matrix: + test_name: + - "command-line-options" + - "data-rep" + - "cobol_utf8" + #- "i18n_utf8" + - "jp-compat" + - "run" + - "syntax" + - "cobj-idx" + #- "misc" + os: ["ubuntu:24.04"] + uses: ./.github/workflows/test-other.yml + with: + test-name: ${{ matrix.test_name }} + os: ${{ matrix.os }} + configure-args: --enable-utf8 run-test-cobj-api: needs: build @@ -60,6 +93,20 @@ jobs: run-test-nist: needs: build strategy: + fail-fast: false + matrix: + test_name: ["IC", "IF", "IX", "NC", "OB", "RL", "SG", "SM", "SQ", "ST"] + os: ["ubuntu:24.04"] + uses: ./.github/workflows/test-nist.yml + with: + test-name: ${{ matrix.test_name }} + check-result: true + os: ${{ matrix.os }} + + run-test-nist-utf8: + needs: build-utf8 + strategy: + fail-fast: false matrix: test_name: ["IC", "IF", "IX", "NC", "OB", "RL", "SG", "SM", "SQ", "ST"] os: ["ubuntu:24.04"] @@ -68,6 +115,7 @@ jobs: test-name: ${{ matrix.test_name }} check-result: true os: ${{ matrix.os }} + configure-args: --enable-utf8 run-test-nist-extra: needs: build diff --git a/.github/workflows/test-cobj-api.yml b/.github/workflows/test-cobj-api.yml index 4f95c137..b1b9c579 100644 --- a/.github/workflows/test-cobj-api.yml +++ b/.github/workflows/test-cobj-api.yml @@ -6,6 +6,10 @@ on: os: required: true type: string + configure-args: + required: false + type: string + default: "" permissions: contents: read @@ -24,7 +28,7 @@ jobs: - uses: actions/download-artifact@v4 with: - name: opensourcecobol4j-${{ env.ARTIFACT_NAME }} + name: opensourcecobol4j-${{ env.ARTIFACT_NAME }}-opt_${{ inputs.configure-args }} - uses: actions/setup-java@v4 if: inputs.os != 'amazonlinux:2023' diff --git a/.github/workflows/test-nist.yml b/.github/workflows/test-nist.yml index 54128e90..a43315ff 100644 --- a/.github/workflows/test-nist.yml +++ b/.github/workflows/test-nist.yml @@ -12,6 +12,10 @@ on: os: required: true type: string + configure-args: + required: false + type: string + default: "" permissions: contents: read @@ -30,7 +34,7 @@ jobs: - uses: actions/download-artifact@v4 with: - name: opensourcecobol4j-${{ env.ARTIFACT_NAME }} + name: opensourcecobol4j-${{ env.ARTIFACT_NAME }}-opt_${{ inputs.configure-args }} - name: Install Java uses: actions/setup-java@v4 diff --git a/.github/workflows/test-other.yml b/.github/workflows/test-other.yml index b7703654..923a0842 100644 --- a/.github/workflows/test-other.yml +++ b/.github/workflows/test-other.yml @@ -9,6 +9,10 @@ on: os: required: true type: string + configure-args: + required: false + type: string + default: "" permissions: contents: read @@ -27,7 +31,7 @@ jobs: - uses: actions/download-artifact@v4 with: - name: opensourcecobol4j-${{ env.ARTIFACT_NAME }} + name: opensourcecobol4j-${{ env.ARTIFACT_NAME }}-opt_${{ inputs.configure-args }} - uses: actions/setup-java@v4 if: inputs.os != 'amazonlinux:2023' @@ -39,19 +43,29 @@ jobs: if: inputs.os == 'ubuntu:24.04' run: | apt-get update -y - apt-get install -y build-essential unzip + apt-get install -y build-essential unzip nkf - name: Install dependencies on AlmaLinux 9 if: inputs.os == 'almalinux:9' run: | dnf -y update - dnf install -y gcc make diffutils glibc-gconv-extra unzip + dnf install -y gcc make diffutils glibc-gconv-extra unzip wget + wget "http://sourceforge.jp/frs/redir.php?m=jaist&f=%2Fnkf%2F59912%2Fnkf-2.1.3.tar.gz" -O nkf-2.1.3.tar.gz --no-check-certificate + tar zxf nkf-2.1.3.tar.gz + cd nkf-2.1.3 + make + make install - name: Install dependencies on Amazon Linux 2023 if: inputs.os == 'amazonlinux:2023' run: | dnf -y update - dnf install -y gcc make diffutils tar gzip unzip + dnf install -y gcc make diffutils tar gzip unzip wget + wget "http://sourceforge.jp/frs/redir.php?m=jaist&f=%2Fnkf%2F59912%2Fnkf-2.1.3.tar.gz" -O nkf-2.1.3.tar.gz --no-check-certificate + tar zxf nkf-2.1.3.tar.gz + cd nkf-2.1.3 + make + make install - name: Install Java if: inputs.os == 'amazonlinux:2023' diff --git a/.gitignore b/.gitignore index 8aeec330..5da2e10f 100644 --- a/.gitignore +++ b/.gitignore @@ -49,6 +49,7 @@ tests/command-line-options tests/data-rep tests/i18n_sjis tests/i18n_utf8 +tests/cobol_utf8 tests/jp-compat tests/cobj-idx tests/misc diff --git a/cobj/cobj.c b/cobj/cobj.c index 0373efdd..18990f36 100644 --- a/cobj/cobj.c +++ b/cobj/cobj.c @@ -329,6 +329,12 @@ static const struct option long_options[] = { #undef CB_WARNDEF {NULL, 0, NULL, 0}}; +#ifdef I18N_UTF8 +static const char *JAVAC_ENCODING = "UTF-8"; +#else +static const char *JAVAC_ENCODING = "SJIS"; +#endif + static const char *cob_cc; /* gcc */ static char cob_java_flags[COB_SMALL_BUFF]; /* -I... */ static char cob_libs[COB_MEDIUM_BUFF]; /* -L... -lcob */ @@ -664,6 +670,43 @@ void sjis_spc_to_ascii(char *str) { } #endif /*I18N_UTF8*/ +#ifdef I18N_UTF8 +size_t utf8_calc_sjis_size(const unsigned char *p, int len) { + const unsigned char *ub = p + len; + int char_size = 0; + size_t name_size = 0; + while (p < ub) { + char_size = COB_U8BYTE_1(*p); + if (char_size == 1) { + name_size += 1; + p++; + } else if (char_size == 3 && utf8_hankaku_kana(p)) { + name_size += 1; + p += char_size; + } else { + name_size += 2; + p += char_size; + } + } + return name_size; +} + +int utf8_hankaku_kana(const unsigned char *p) { + if (p[0] == 0xef) { + if (p[1] == 0xbd) { + if (p[2] >= 0xa1 && p[2] <= 0xbf) { + return 1; + } + } else if (p[1] == 0xbe) { + if (p[2] >= 0x80 && p[2] <= 0x9f) { + return 1; + } + } + } + return 0; +} +#endif /*I18N_UTF8*/ + /* * Local functions */ @@ -1772,8 +1815,9 @@ static int process_compile(struct filename *fn) { char **program_id; for (program_id = program_id_list; *program_id; ++program_id) { - snprintf(buff, COB_MEDIUM_BUFF, "javac %s -encoding SJIS -d %s %s/%s.java", - cob_java_flags, output_name_a, java_source_dir_a, *program_id); + snprintf(buff, COB_MEDIUM_BUFF, "javac %s -encoding %s -d %s %s/%s.java", + cob_java_flags, JAVAC_ENCODING, output_name_a, java_source_dir_a, + *program_id); ret = process(buff); if (ret) { @@ -2044,8 +2088,8 @@ static int process_build_single_jar() { #else char remove_cmd[] = "rm -f"; #endif - sprintf(buff, "javac %s -encoding SJIS -d %s %s/*.java", cob_java_flags, - output_name_a, java_source_dir_a); + sprintf(buff, "javac %s -encoding %s -d %s %s/*.java", cob_java_flags, + JAVAC_ENCODING, output_name_a, java_source_dir_a); ret = process(buff); if (ret) { diff --git a/cobj/cobj.h b/cobj/cobj.h index 686a3953..db682b25 100644 --- a/cobj/cobj.h +++ b/cobj/cobj.h @@ -198,6 +198,8 @@ extern size_t utf8_strlen(const unsigned char *p); extern int utf8_casecmp(const char *s1, const char *s2); extern void utf8_spc_to_ascii(char *); extern int utf8_national_length(const unsigned char *str, int len); +extern size_t utf8_calc_sjis_size(const unsigned char *data, int len); +extern int utf8_hankaku_kana(const unsigned char *data); #else /*!I18N_UTF8*/ extern const unsigned char *sjis_pick(const unsigned char *); extern size_t sjis_strlen(const unsigned char *); diff --git a/cobj/codegen.c b/cobj/codegen.c index 95a4d7df..1b07b683 100644 --- a/cobj/codegen.c +++ b/cobj/codegen.c @@ -449,9 +449,12 @@ static void joutput_indent(const char *str) { } enum cb_string_category { + // all chracters are ASCII CB_STRING_CATEGORY_ALL_ASCII, - CB_STRING_CATEGORY_ALL_SJIS, - CB_STRING_CATEGORY_CONTAINS_NON_SJIS, + // string contains non-ASCII characters but no uncommon characters + CB_STRING_CATEGORY_CONTAINS_NON_ASCII, + // string contains uncommon characters + CB_STRING_CATEGORY_CONTAINS_UNCOMMON, }; struct string_literal_cache { @@ -491,11 +494,38 @@ static enum cb_string_category get_string_category(const unsigned char *s, int c = s[i]; if (0x20 <= c && c <= 0x7e) { i += 1; +#ifdef I18N_UTF8 + } else if (0xc2 <= c && c <= 0xdf) { + if (i + 1 < size && 0x80 <= s[i + 1] && s[i + 1] <= 0xbf) { + i += 2; + category = CB_STRING_CATEGORY_CONTAINS_NON_ASCII; + } else { + return CB_STRING_CATEGORY_CONTAINS_UNCOMMON; + } + } else if (0xe0 <= c && c <= 0xef) { + if (i + 2 < size && 0x80 <= s[i + 1] && s[i + 1] <= 0xbf && + 0x80 <= s[i + 2] && s[i + 2] <= 0xbf) { + i += 3; + category = CB_STRING_CATEGORY_CONTAINS_NON_ASCII; + } else { + return CB_STRING_CATEGORY_CONTAINS_UNCOMMON; + } + } else if (0xf0 <= c && c <= 0xf4) { + if (i + 3 < size && 0x80 <= s[i + 1] && s[i + 1] <= 0xbf && + 0x80 <= s[i + 2] && s[i + 2] <= 0xbf && 0x80 <= s[i + 3] && + s[i + 3] <= 0xbf) { + i += 4; + category = CB_STRING_CATEGORY_CONTAINS_NON_ASCII; + } else { + return CB_STRING_CATEGORY_CONTAINS_UNCOMMON; + } +#else } else if ((0x81 <= c && c <= 0x9f) || (0xe0 <= c && c <= 0xef)) { i += 2; - category = CB_STRING_CATEGORY_ALL_SJIS; + category = CB_STRING_CATEGORY_CONTAINS_NON_ASCII; +#endif } else { - return CB_STRING_CATEGORY_CONTAINS_NON_SJIS; + return CB_STRING_CATEGORY_CONTAINS_UNCOMMON; } } return category; @@ -505,8 +535,19 @@ static void joutput_string_write(const unsigned char *s, int size, enum cb_string_category category) { int i; +#ifdef I18N_UTF8 + int multi_byte = 0; + if (utf8_ext_pick(s)) { + multi_byte = 1; + } +#endif /* I18N_UTF8 */ + if (category == CB_STRING_CATEGORY_ALL_ASCII || - category == CB_STRING_CATEGORY_ALL_SJIS) { + category == CB_STRING_CATEGORY_CONTAINS_NON_ASCII +#ifdef I18N_UTF8 + || multi_byte +#endif /* I18N_UTF8 */ + ) { if (param_wrap_string_flag) { joutput("new CobolDataStorage("); } else { @@ -515,6 +556,18 @@ static void joutput_string_write(const unsigned char *s, int size, joutput("\""); +#ifdef I18N_UTF8 + for (i = 0; i < size; i++) { + int c = s[i]; + if (c == '\"' || c == '\\') { + joutput("\\%c", c); + } else if (c == '\n') { + joutput("\\n"); + } else { + joutput("%c", c); + } + } +#else int output_multibyte = 0; for (i = 0; i < size; i++) { int c = s[i]; @@ -528,7 +581,7 @@ static void joutput_string_write(const unsigned char *s, int size, output_multibyte = !output_multibyte && ((0x81 <= c && c <= 0x9f) || (0xe0 <= c && c <= 0xef)); } - +#endif joutput("\")"); } else { if (param_wrap_string_flag) { @@ -1144,9 +1197,14 @@ static void joutput_attr(cb_tree x) { * AbstractCobolField型の変数をインスタンス化するコードを出力する */ static void joutput_field(cb_tree x) { + joutput("CobolFieldFactory.makeCobolField("); - joutput_size(x); - joutput(", "); + if (!(CB_LITERAL_P(x) && + (CB_TREE_CATEGORY(x) == CB_CATEGORY_ALPHANUMERIC || + CB_LITERAL_P(x) && CB_TREE_CATEGORY(x) == CB_CATEGORY_NATIONAL))) { + joutput_size(x); + joutput(", "); + } joutput_data(x); joutput(", "); joutput_attr(x); @@ -1674,8 +1732,12 @@ static void joutput_param(cb_tree x, int id) { } #endif joutput("CobolFieldFactory.makeCobolField("); - joutput_size(x); - joutput(", "); + if (!(CB_LITERAL_P(x) && + (CB_TREE_CATEGORY(x) == CB_CATEGORY_ALPHANUMERIC || + CB_LITERAL_P(x) && CB_TREE_CATEGORY(x) == CB_CATEGORY_NATIONAL))) { + joutput_size(x); + joutput(", "); + } joutput_data(x); joutput(", "); joutput_attr(x); @@ -2410,9 +2472,15 @@ static void joutput_initialize_one(struct cb_initialize *p, cb_tree x) { } } joutput_data(x); +#if I18N_UTF8 + joutput(".setByByteArrayAndPaddingSpaces ("); + joutput_string(l->data, l->size); + joutput(", %d);\n", f->size); +#else joutput(".setBytes ("); joutput_string((ucharptr)buff, f->size); joutput(", %d);\n", f->size); +#endif } } } diff --git a/cobj/parser.c b/cobj/parser.c index a6d09491..61b36271 100644 --- a/cobj/parser.c +++ b/cobj/parser.c @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.8.2. */ +/* A Bison parser, made by GNU Bison 3.7.4. */ /* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -16,7 +16,7 @@ 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 . */ + 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 @@ -46,10 +46,10 @@ USER NAME SPACE" below. */ /* Identify Bison output, and Bison version. */ -#define YYBISON 30802 +#define YYBISON 30704 /* Bison version string. */ -#define YYBISON_VERSION "3.8.2" +#define YYBISON_VERSION "3.7.4" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -1587,18 +1587,6 @@ typedef int_least16_t yytype_int16; typedef short yytype_int16; #endif -/* Work around bug in HP-UX 11.23, which defines these macros - incorrectly for preprocessor constants. This workaround can likely - be removed in 2023, as HPE has promised support for HP-UX 11.23 - (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of - . */ -#ifdef __hpux -# undef UINT_LEAST8_MAX -# undef UINT_LEAST16_MAX -# define UINT_LEAST8_MAX 255 -# define UINT_LEAST16_MAX 65535 -#endif - #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ typedef __UINT_LEAST8_TYPE__ yytype_uint8; #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ @@ -1696,23 +1684,17 @@ typedef int yy_state_fast_t; /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ -# define YY_USE(E) ((void) (E)) +# define YYUSE(E) ((void) (E)) #else -# define YY_USE(E) /* empty */ +# define YYUSE(E) /* empty */ #endif +#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ /* Suppress an incorrect diagnostic about yylval being uninitialized. */ -#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ -# if __GNUC__ * 100 + __GNUC_MINOR__ < 407 -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") -# else -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -# endif # define YY_IGNORE_MAYBE_UNINITIALIZED_END \ _Pragma ("GCC diagnostic pop") #else @@ -1971,7 +1953,7 @@ static const yytype_int16 yytranslate[] = }; #if YYDEBUG -/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ + /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { 0, 772, 772, 772, 816, 817, 821, 822, 827, 828, @@ -2113,22 +2095,22 @@ static const yytype_int16 yyrline[] = 6887, 6888, 6889, 6890, 6891, 6892, 6893, 6897, 6898, 6902, 6903, 6907, 6908, 6912, 6913, 6924, 6925, 6929, 6930, 6931, 6935, 6936, 6937, 6945, 6949, 6950, 6951, 6952, 6956, 6957, - 6961, 6971, 6989, 7016, 7028, 7029, 7039, 7040, 7044, 7045, - 7046, 7047, 7048, 7049, 7050, 7058, 7062, 7066, 7070, 7074, - 7078, 7082, 7086, 7090, 7094, 7098, 7102, 7109, 7110, 7111, - 7115, 7116, 7120, 7121, 7126, 7133, 7140, 7150, 7157, 7167, - 7174, 7188, 7198, 7199, 7203, 7204, 7208, 7209, 7213, 7214, - 7215, 7219, 7220, 7224, 7225, 7229, 7230, 7234, 7235, 7242, - 7242, 7243, 7243, 7244, 7244, 7245, 7245, 7247, 7247, 7248, - 7248, 7249, 7249, 7250, 7250, 7251, 7251, 7252, 7252, 7253, - 7253, 7254, 7254, 7255, 7255, 7256, 7256, 7257, 7257, 7258, - 7258, 7259, 7259, 7260, 7260, 7261, 7261, 7262, 7262, 7263, - 7263, 7264, 7264, 7264, 7265, 7265, 7266, 7266, 7266, 7267, - 7267, 7268, 7268, 7269, 7269, 7270, 7270, 7271, 7271, 7272, - 7272, 7273, 7273, 7273, 7274, 7274, 7275, 7275, 7276, 7276, - 7277, 7277, 7278, 7278, 7279, 7279, 7280, 7280, 7280, 7281, - 7281, 7282, 7282, 7283, 7283, 7284, 7284, 7285, 7285, 7286, - 7286, 7287, 7287, 7289, 7289, 7290, 7290 + 6961, 6971, 6985, 7008, 7020, 7021, 7031, 7032, 7036, 7037, + 7038, 7039, 7040, 7041, 7042, 7050, 7054, 7058, 7062, 7066, + 7070, 7074, 7078, 7082, 7086, 7090, 7094, 7101, 7102, 7103, + 7107, 7108, 7112, 7113, 7118, 7125, 7132, 7142, 7149, 7159, + 7166, 7180, 7190, 7191, 7195, 7196, 7200, 7201, 7205, 7206, + 7207, 7211, 7212, 7216, 7217, 7221, 7222, 7226, 7227, 7234, + 7234, 7235, 7235, 7236, 7236, 7237, 7237, 7239, 7239, 7240, + 7240, 7241, 7241, 7242, 7242, 7243, 7243, 7244, 7244, 7245, + 7245, 7246, 7246, 7247, 7247, 7248, 7248, 7249, 7249, 7250, + 7250, 7251, 7251, 7252, 7252, 7253, 7253, 7254, 7254, 7255, + 7255, 7256, 7256, 7256, 7257, 7257, 7258, 7258, 7258, 7259, + 7259, 7260, 7260, 7261, 7261, 7262, 7262, 7263, 7263, 7264, + 7264, 7265, 7265, 7265, 7266, 7266, 7267, 7267, 7268, 7268, + 7269, 7269, 7270, 7270, 7271, 7271, 7272, 7272, 7272, 7273, + 7273, 7274, 7274, 7275, 7275, 7276, 7276, 7277, 7277, 7278, + 7278, 7279, 7279, 7281, 7281, 7282, 7282 }; #endif @@ -2420,6 +2402,61 @@ yysymbol_name (yysymbol_kind_t yysymbol) } #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_int16 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, 361, 362, 363, 364, + 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, + 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, + 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, + 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, + 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, + 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, + 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, + 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, + 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, + 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, + 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, + 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, + 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, + 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, + 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, + 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, + 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, + 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, + 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, + 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, + 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, + 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, + 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, + 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, + 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, + 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, + 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, + 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, + 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, + 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, + 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, + 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, + 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, + 695, 696, 697, 698, 699, 700, 701, 702, 703, 43, + 45, 42, 47, 704, 94, 46, 61, 41, 40, 62, + 60, 58, 38 +}; +#endif + #define YYPACT_NINF (-2010) #define yypact_value_is_default(Yyn) \ @@ -2430,8 +2467,8 @@ yysymbol_name (yysymbol_kind_t yysymbol) #define yytable_value_is_error(Yyn) \ 0 -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ + /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ static const yytype_int16 yypact[] = { -2010, 206, 536, -2010, 153, 306, 195, -2010, -2010, -2010, @@ -2665,9 +2702,9 @@ static const yytype_int16 yypact[] = -2010, 4721, -2010, -2010 }; -/* 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. */ + /* 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_int16 yydefact[] = { 2, 0, 0, 1, 0, 0, 0, 4, 6, 7, @@ -2901,7 +2938,7 @@ static const yytype_int16 yydefact[] = 509, 0, 1080, 553 }; -/* YYPGOTO[NTERM-NUM]. */ + /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { -2010, -2010, -2010, -2010, 1892, -2010, -2010, -2010, 44, -2010, @@ -2977,10 +3014,10 @@ static const yytype_int16 yypgoto[] = 1076, -129 }; -/* YYDEFGOTO[NTERM-NUM]. */ + /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - 0, 1, 2, 6, 7, 8, 24, 39, 69, 128, + -1, 1, 2, 6, 7, 8, 24, 39, 69, 128, 256, 9, 25, 40, 70, 90, 499, 73, 71, 35, 11, 21, 27, 42, 57, 58, 17, 37, 77, 97, 98, 191, 192, 178, 99, 179, 180, 181, 182, 502, @@ -3053,9 +3090,9 @@ static const yytype_int16 yydefgoto[] = 844, 1524 }; -/* 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. */ + /* 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[] = { 122, 258, 301, 194, 478, 686, 902, 1137, 560, 865, @@ -4174,8 +4211,8 @@ static const yytype_int16 yycheck[] = 450, -1, -1, -1, -1, -1, -1, -1, 458 }; -/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of - state STATE-NUM. */ + /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ static const yytype_int16 yystos[] = { 0, 464, 465, 0, 183, 311, 466, 467, 468, 474, @@ -4409,7 +4446,7 @@ static const yytype_int16 yystos[] = 1098, 49, 901, 1084 }; -/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ + /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_int16 yyr1[] = { 0, 463, 465, 464, 466, 466, 467, 467, 469, 470, @@ -4569,7 +4606,7 @@ static const yytype_int16 yyr1[] = 1161, 1162, 1162, 1163, 1163, 1164, 1164 }; -/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ + /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ static const yytype_int8 yyr2[] = { 0, 2, 0, 3, 1, 2, 1, 1, 0, 0, @@ -4738,7 +4775,6 @@ enum { YYENOMEM = -2 }; #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrorlab -#define YYNOMEM goto yyexhaustedlab #define YYRECOVERING() (!!yyerrstatus) @@ -4779,7 +4815,10 @@ do { \ 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, Kind, Value, Location) \ @@ -4803,11 +4842,15 @@ yy_symbol_value_print (FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep) { FILE *yyoutput = yyo; - YY_USE (yyoutput); + YYUSE (yyoutput); if (!yyvaluep) return; +# ifdef YYPRINT + if (yykind < YYNTOKENS) + YYPRINT (yyo, yytoknum[yykind], *yyvaluep); +# endif YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YY_USE (yykind); + YYUSE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } @@ -4921,13 +4964,13 @@ static void yydestruct (const char *yymsg, yysymbol_kind_t yykind, YYSTYPE *yyvaluep) { - YY_USE (yyvaluep); + YYUSE (yyvaluep); if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YY_USE (yykind); + YYUSE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } @@ -4990,7 +5033,6 @@ yyparse (void) YYDPRINTF ((stderr, "Starting parse\n")); yychar = YYEMPTY; /* Cause a token to be read. */ - goto yysetstate; @@ -5016,7 +5058,7 @@ yyparse (void) if (yyss + yystacksize - 1 <= yyssp) #if !defined yyoverflow && !defined YYSTACK_RELOCATE - YYNOMEM; + goto yyexhaustedlab; #else { /* Get the current used size of the three stacks, in elements. */ @@ -5044,7 +5086,7 @@ yyparse (void) # else /* defined YYSTACK_RELOCATE */ /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) - YYNOMEM; + goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; @@ -5055,7 +5097,7 @@ yyparse (void) YY_CAST (union yyalloc *, YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); if (! yyptr) - YYNOMEM; + goto yyexhaustedlab; YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE @@ -5077,7 +5119,6 @@ yyparse (void) } #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ - if (yystate == YYFINAL) YYACCEPT; @@ -5213,7 +5254,7 @@ yyparse (void) cb_build_registers (); current_program->flag_main = cb_flag_main; } -#line 5217 "parser.c" +#line 5258 "parser.c" break; case 3: /* start: $@1 nested_list "end of file" */ @@ -5235,19 +5276,19 @@ yyparse (void) emit_entry (current_program->program_id, 0, NULL); } } -#line 5239 "parser.c" +#line 5280 "parser.c" break; case 8: /* $@2: %empty */ #line 827 "parser.y" { cb_validate_program_environment (current_program); } -#line 5245 "parser.c" +#line 5286 "parser.c" break; case 9: /* $@3: %empty */ #line 828 "parser.y" { cb_validate_program_data (current_program); } -#line 5251 "parser.c" +#line 5292 "parser.c" break; case 10: /* program_definition: identification_division environment_division $@2 data_division $@3 procedure_division nested_prog end_program */ @@ -5258,19 +5299,19 @@ yyparse (void) cb_validate_indexed_file_key(CB_FILE(CB_VALUE(file))); } } -#line 5262 "parser.c" +#line 5303 "parser.c" break; case 11: /* $@4: %empty */ #line 841 "parser.y" { cb_validate_program_environment (current_program); } -#line 5268 "parser.c" +#line 5309 "parser.c" break; case 12: /* $@5: %empty */ #line 842 "parser.y" { cb_validate_program_data (current_program); } -#line 5274 "parser.c" +#line 5315 "parser.c" break; case 13: /* program_mandatory: identification_division environment_division $@4 data_division $@5 procedure_division nested_prog end_mandatory */ @@ -5281,19 +5322,19 @@ yyparse (void) cb_validate_indexed_file_key(CB_FILE(CB_VALUE(file))); } } -#line 5285 "parser.c" +#line 5326 "parser.c" break; case 14: /* $@6: %empty */ #line 855 "parser.y" { cb_validate_program_environment (current_program); } -#line 5291 "parser.c" +#line 5332 "parser.c" break; case 15: /* $@7: %empty */ #line 856 "parser.y" { cb_validate_program_data (current_program); } -#line 5297 "parser.c" +#line 5338 "parser.c" break; case 21: /* end_program: "END PROGRAM" program_name '.' */ @@ -5322,7 +5363,7 @@ yyparse (void) cb_validate_program_body (current_program); } } -#line 5326 "parser.c" +#line 5367 "parser.c" break; case 22: /* end_mandatory: "END PROGRAM" program_name '.' */ @@ -5349,7 +5390,7 @@ yyparse (void) cb_validate_program_body (current_program); } } -#line 5353 "parser.c" +#line 5394 "parser.c" break; case 23: /* end_function: "END FUNCTION" program_name '.' */ @@ -5376,7 +5417,7 @@ yyparse (void) cb_validate_program_body (current_program); } } -#line 5380 "parser.c" +#line 5421 "parser.c" break; case 24: /* $@8: %empty */ @@ -5420,7 +5461,7 @@ yyparse (void) depth++; current_program->program_id = cb_build_program_id (yyvsp[-1], yyvsp[0]); } -#line 5424 "parser.c" +#line 5465 "parser.c" break; case 26: /* function_division: "FUNCTION-ID" '.' program_name as_literal '.' */ @@ -5465,19 +5506,19 @@ yyparse (void) current_program->flag_recursive = 1; current_program->flag_initial = 1; } -#line 5469 "parser.c" +#line 5510 "parser.c" break; case 29: /* as_literal: %empty */ #line 1045 "parser.y" { yyval = NULL; } -#line 5475 "parser.c" +#line 5516 "parser.c" break; case 30: /* as_literal: AS "Literal" */ #line 1046 "parser.y" { yyval = yyvsp[0]; } -#line 5481 "parser.c" +#line 5522 "parser.c" break; case 33: /* program_type_clause: COMMON */ @@ -5488,7 +5529,7 @@ yyparse (void) } current_program->flag_common = 1; } -#line 5492 "parser.c" +#line 5533 "parser.c" break; case 34: /* program_type_clause: COMMON _init_or_recurs */ @@ -5499,7 +5540,7 @@ yyparse (void) } current_program->flag_common = 1; } -#line 5503 "parser.c" +#line 5544 "parser.c" break; case 36: /* _init_or_recurs: "INITIAL" */ @@ -5507,7 +5548,7 @@ yyparse (void) { current_program->flag_initial = 1; } -#line 5511 "parser.c" +#line 5552 "parser.c" break; case 37: /* _init_or_recurs: RECURSIVE */ @@ -5516,7 +5557,7 @@ yyparse (void) current_program->flag_recursive = 1; current_program->flag_initial = 1; } -#line 5520 "parser.c" +#line 5561 "parser.c" break; case 41: /* configuration_section: CONFIGURATION SECTION '.' configuration_list */ @@ -5526,7 +5567,7 @@ yyparse (void) cb_error (_("CONFIGURATION SECTION not allowed in nested programs")); } } -#line 5530 "parser.c" +#line 5571 "parser.c" break; case 53: /* with_debugging_mode: _with DEBUGGING MODE */ @@ -5534,13 +5575,13 @@ yyparse (void) { cb_verify (cb_debugging_line, "DEBUGGING MODE"); } -#line 5538 "parser.c" +#line 5579 "parser.c" break; case 54: /* computer_name: "Identifier" */ #line 1143 "parser.y" { } -#line 5544 "parser.c" +#line 5585 "parser.c" break; case 65: /* object_computer_memory: MEMORY SIZE _is integer object_char_or_word */ @@ -5548,7 +5589,7 @@ yyparse (void) { cb_verify (cb_memory_size_clause, "MEMORY SIZE"); } -#line 5552 "parser.c" +#line 5593 "parser.c" break; case 68: /* object_computer_sequence: _program coll_sequence _is reference */ @@ -5556,7 +5597,7 @@ yyparse (void) { current_program->collating_sequence = yyvsp[0]; } -#line 5560 "parser.c" +#line 5601 "parser.c" break; case 69: /* object_computer_segment: "SEGMENT-LIMIT" _is integer */ @@ -5564,7 +5605,7 @@ yyparse (void) { /* Ignore */ } -#line 5568 "parser.c" +#line 5609 "parser.c" break; case 75: /* repository_name: FUNCTION repository_literal_list INTRINSIC */ @@ -5572,7 +5613,7 @@ yyparse (void) { current_program->function_spec_list = yyvsp[-1]; } -#line 5576 "parser.c" +#line 5617 "parser.c" break; case 76: /* repository_name: FUNCTION ALL INTRINSIC */ @@ -5580,19 +5621,19 @@ yyparse (void) { functions_are_all = 1; } -#line 5584 "parser.c" +#line 5625 "parser.c" break; case 77: /* repository_literal_list: "Literal" */ #line 1228 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 5590 "parser.c" +#line 5631 "parser.c" break; case 78: /* repository_literal_list: repository_literal_list "Literal" */ #line 1230 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 5596 "parser.c" +#line 5637 "parser.c" break; case 96: /* mnemonic_name_clause: "Identifier" _is CRT */ @@ -5606,7 +5647,7 @@ yyparse (void) } /* current_program->flag_screen = 1; */ } -#line 5610 "parser.c" +#line 5651 "parser.c" break; case 97: /* $@9: %empty */ @@ -5620,7 +5661,7 @@ yyparse (void) } save_tree_2 = yyvsp[0]; } -#line 5624 "parser.c" +#line 5665 "parser.c" break; case 99: /* $@10: %empty */ @@ -5632,7 +5673,7 @@ yyparse (void) } save_tree_2 = NULL; } -#line 5636 "parser.c" +#line 5677 "parser.c" break; case 101: /* mnemonic_name_clause: "ARGUMENT-NUMBER" _is undefined_word */ @@ -5650,7 +5691,7 @@ yyparse (void) cb_error (_("SPECIAL-NAMES with ARGUMENT-NUMBER clause is not yet supported")); } } -#line 5654 "parser.c" +#line 5695 "parser.c" break; case 102: /* mnemonic_name_clause: "ARGUMENT-VALUE" _is undefined_word */ @@ -5668,7 +5709,7 @@ yyparse (void) cb_error (_("SPECIAL-NAMES with ARGUMENT-VALUE clause is not yet supported")); } } -#line 5672 "parser.c" +#line 5713 "parser.c" break; case 103: /* mnemonic_name_clause: "ENVIRONMENT-NAME" _is undefined_word */ @@ -5686,7 +5727,7 @@ yyparse (void) cb_error (_("SPECIAL-NAMES with ENVIRONMENT-NAME clause is not yet supported")); } } -#line 5690 "parser.c" +#line 5731 "parser.c" break; case 104: /* mnemonic_name_clause: "ENVIRONMENT-VALUE" _is undefined_word */ @@ -5704,7 +5745,7 @@ yyparse (void) cb_error (_("SPECIAL-NAMES with ENVIRONMENT-VALUE clause is not yet supported")); } } -#line 5708 "parser.c" +#line 5749 "parser.c" break; case 109: /* special_name_mnemonic_on_off: on_or_off _status _is undefined_word */ @@ -5716,19 +5757,19 @@ yyparse (void) cb_define_switch_name (yyvsp[0], save_tree_1, yyvsp[-3], save_tree_2); } } -#line 5720 "parser.c" +#line 5761 "parser.c" break; case 110: /* on_or_off: ON */ #line 1379 "parser.y" { yyval = cb_int1; } -#line 5726 "parser.c" +#line 5767 "parser.c" break; case 111: /* on_or_off: OFF */ #line 1380 "parser.y" { yyval = cb_int0; } -#line 5732 "parser.c" +#line 5773 "parser.c" break; case 112: /* $@11: %empty */ @@ -5736,7 +5777,7 @@ yyparse (void) { save_tree_1 = yyvsp[0]; } -#line 5740 "parser.c" +#line 5781 "parser.c" break; case 113: /* alphabet_name_clause: ALPHABET undefined_word $@11 _is alphabet_definition */ @@ -5745,31 +5786,31 @@ yyparse (void) current_program->alphabet_name_list = cb_list_add (current_program->alphabet_name_list, yyvsp[0]); } -#line 5749 "parser.c" +#line 5790 "parser.c" break; case 114: /* alphabet_definition: NATIVE */ #line 1399 "parser.y" { yyval = cb_build_alphabet_name (save_tree_1, CB_ALPHABET_NATIVE); } -#line 5755 "parser.c" +#line 5796 "parser.c" break; case 115: /* alphabet_definition: "STANDARD-1" */ #line 1400 "parser.y" { yyval = cb_build_alphabet_name (save_tree_1, CB_ALPHABET_STANDARD_1); } -#line 5761 "parser.c" +#line 5802 "parser.c" break; case 116: /* alphabet_definition: "STANDARD-2" */ #line 1401 "parser.y" { yyval = cb_build_alphabet_name (save_tree_1, CB_ALPHABET_STANDARD_2); } -#line 5767 "parser.c" +#line 5808 "parser.c" break; case 117: /* alphabet_definition: EBCDIC */ #line 1402 "parser.y" { yyval = cb_build_alphabet_name (save_tree_1, CB_ALPHABET_EBCDIC); } -#line 5773 "parser.c" +#line 5814 "parser.c" break; case 118: /* alphabet_definition: alphabet_literal_list */ @@ -5778,31 +5819,31 @@ yyparse (void) yyval = cb_build_alphabet_name (save_tree_1, CB_ALPHABET_CUSTOM); CB_ALPHABET_NAME (yyval)->custom_list = yyvsp[0]; } -#line 5782 "parser.c" +#line 5823 "parser.c" break; case 119: /* alphabet_literal_list: alphabet_literal */ #line 1411 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 5788 "parser.c" +#line 5829 "parser.c" break; case 120: /* alphabet_literal_list: alphabet_literal_list alphabet_literal */ #line 1413 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 5794 "parser.c" +#line 5835 "parser.c" break; case 121: /* alphabet_literal: alphabet_lits */ #line 1417 "parser.y" { yyval = yyvsp[0]; } -#line 5800 "parser.c" +#line 5841 "parser.c" break; case 122: /* alphabet_literal: alphabet_lits THRU alphabet_lits */ #line 1418 "parser.y" { yyval = cb_build_pair (yyvsp[-2], yyvsp[0]); } -#line 5806 "parser.c" +#line 5847 "parser.c" break; case 123: /* @12: %empty */ @@ -5811,7 +5852,7 @@ yyparse (void) yyval = cb_list_init (yyvsp[-1]); save_tree_2 = yyval; } -#line 5815 "parser.c" +#line 5856 "parser.c" break; case 124: /* alphabet_literal: alphabet_lits ALSO @12 alphabet_also_sequence */ @@ -5819,79 +5860,79 @@ yyparse (void) { yyval = yyvsp[-1]; } -#line 5823 "parser.c" +#line 5864 "parser.c" break; case 127: /* alphabet_lits: "Literal" */ #line 1436 "parser.y" { yyval = yyvsp[0]; } -#line 5829 "parser.c" +#line 5870 "parser.c" break; case 128: /* alphabet_lits: SPACE */ #line 1437 "parser.y" { yyval = cb_space; } -#line 5835 "parser.c" +#line 5876 "parser.c" break; case 129: /* alphabet_lits: ZERO */ #line 1438 "parser.y" { yyval = cb_zero; } -#line 5841 "parser.c" +#line 5882 "parser.c" break; case 130: /* alphabet_lits: QUOTE */ #line 1439 "parser.y" { yyval = cb_quote; } -#line 5847 "parser.c" +#line 5888 "parser.c" break; case 131: /* alphabet_lits: "HIGH-VALUE" */ #line 1440 "parser.y" { yyval = cb_norm_high; } -#line 5853 "parser.c" +#line 5894 "parser.c" break; case 132: /* alphabet_lits: "LOW-VALUE" */ #line 1441 "parser.y" { yyval = cb_norm_low; } -#line 5859 "parser.c" +#line 5900 "parser.c" break; case 133: /* alphabet_also_literal: "Literal" */ #line 1445 "parser.y" { cb_list_add (save_tree_2, yyvsp[0]); } -#line 5865 "parser.c" +#line 5906 "parser.c" break; case 134: /* alphabet_also_literal: SPACE */ #line 1446 "parser.y" { cb_list_add (save_tree_2, cb_space); } -#line 5871 "parser.c" +#line 5912 "parser.c" break; case 135: /* alphabet_also_literal: ZERO */ #line 1447 "parser.y" { cb_list_add (save_tree_2, cb_zero); } -#line 5877 "parser.c" +#line 5918 "parser.c" break; case 136: /* alphabet_also_literal: QUOTE */ #line 1448 "parser.y" { cb_list_add (save_tree_2, cb_quote); } -#line 5883 "parser.c" +#line 5924 "parser.c" break; case 137: /* alphabet_also_literal: "HIGH-VALUE" */ #line 1449 "parser.y" { cb_list_add (save_tree_2, cb_norm_high); } -#line 5889 "parser.c" +#line 5930 "parser.c" break; case 138: /* alphabet_also_literal: "LOW-VALUE" */ #line 1450 "parser.y" { cb_list_add (save_tree_2, cb_norm_low); } -#line 5895 "parser.c" +#line 5936 "parser.c" break; case 139: /* symbolic_characters_clause: SYMBOLIC _characters symbolic_characters_list */ @@ -5903,7 +5944,7 @@ yyparse (void) } PENDING ("SYMBOLIC CHARACTERS"); } -#line 5907 "parser.c" +#line 5948 "parser.c" break; case 140: /* symbolic_characters_list: char_list _is_are integer_list */ @@ -5916,31 +5957,31 @@ yyparse (void) yyval = NULL; } } -#line 5920 "parser.c" +#line 5961 "parser.c" break; case 141: /* char_list: undefined_word */ #line 1480 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 5926 "parser.c" +#line 5967 "parser.c" break; case 142: /* char_list: char_list undefined_word */ #line 1481 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 5932 "parser.c" +#line 5973 "parser.c" break; case 143: /* integer_list: integer */ #line 1485 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 5938 "parser.c" +#line 5979 "parser.c" break; case 144: /* integer_list: integer_list integer */ #line 1486 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 5944 "parser.c" +#line 5985 "parser.c" break; case 145: /* class_name_clause: CLASS undefined_word _is class_item_list */ @@ -5950,25 +5991,25 @@ yyparse (void) cb_list_add (current_program->class_name_list, cb_build_class_name (yyvsp[-2], yyvsp[0])); } -#line 5954 "parser.c" +#line 5995 "parser.c" break; case 146: /* class_item_list: class_item */ #line 1502 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 5960 "parser.c" +#line 6001 "parser.c" break; case 147: /* class_item_list: class_item_list class_item */ #line 1503 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 5966 "parser.c" +#line 6007 "parser.c" break; case 148: /* class_item: basic_value */ #line 1507 "parser.y" { yyval = yyvsp[0]; } -#line 5972 "parser.c" +#line 6013 "parser.c" break; case 149: /* class_item: basic_value THRU basic_value */ @@ -5981,7 +6022,7 @@ yyparse (void) yyval = cb_build_pair (yyvsp[0], yyvsp[-2]); } } -#line 5985 "parser.c" +#line 6026 "parser.c" break; case 150: /* locale_clause: LOCALE undefined_word _is reference */ @@ -5995,7 +6036,7 @@ yyparse (void) cb_list_add (current_program->locale_list, l); } } -#line 5999 "parser.c" +#line 6040 "parser.c" break; case 151: /* currency_sign_clause: CURRENCY _sign _is "Literal" */ @@ -6060,7 +6101,7 @@ yyparse (void) } current_program->currency_symbol = s[0]; } -#line 6064 "parser.c" +#line 6105 "parser.c" break; case 152: /* decimal_point_clause: "DECIMAL-POINT" _is COMMA */ @@ -6069,31 +6110,31 @@ yyparse (void) current_program->decimal_point = ','; current_program->numeric_separator = '.'; } -#line 6073 "parser.c" +#line 6114 "parser.c" break; case 153: /* cursor_clause: CURSOR _is reference */ #line 1615 "parser.y" { current_program->cursor_pos = yyvsp[0]; } -#line 6079 "parser.c" +#line 6120 "parser.c" break; case 154: /* crt_status_clause: CRT STATUS _is reference */ #line 1622 "parser.y" { current_program->crt_status = yyvsp[0]; } -#line 6085 "parser.c" +#line 6126 "parser.c" break; case 155: /* screen_control: "SCREEN-CONTROL" _is reference */ #line 1629 "parser.y" { PENDING ("SCREEN CONTROL"); } -#line 6091 "parser.c" +#line 6132 "parser.c" break; case 156: /* event_status: "EVENT-STATUS" _is reference */ #line 1635 "parser.y" { PENDING ("EVENT STATUS"); } -#line 6097 "parser.c" +#line 6138 "parser.c" break; case 159: /* $@13: %empty */ @@ -6106,7 +6147,7 @@ yyparse (void) cb_error (_("INPUT-OUTPUT SECTION header missing")); } } -#line 6110 "parser.c" +#line 6151 "parser.c" break; case 161: /* $@14: %empty */ @@ -6119,7 +6160,7 @@ yyparse (void) cb_error (_("INPUT-OUTPUT SECTION header missing")); } } -#line 6123 "parser.c" +#line 6164 "parser.c" break; case 167: /* $@15: %empty */ @@ -6138,7 +6179,7 @@ yyparse (void) current_program->file_list = cb_cons (CB_TREE (current_file), current_program->file_list); } -#line 6142 "parser.c" +#line 6183 "parser.c" break; case 168: /* file_control_entry: SELECT flag_optional undefined_word $@15 select_clause_sequence '.' */ @@ -6146,7 +6187,7 @@ yyparse (void) { validate_file (current_file, yyvsp[-3]); } -#line 6150 "parser.c" +#line 6191 "parser.c" break; case 186: /* assign_clause: ASSIGN _to _ext_clause _device assignment_name */ @@ -6154,7 +6195,7 @@ yyparse (void) { current_file->assign = cb_build_assignment_name (current_file, yyvsp[0]); } -#line 6158 "parser.c" +#line 6199 "parser.c" break; case 187: /* assign_clause: ASSIGN _to _ext_clause DISK */ @@ -6163,7 +6204,7 @@ yyparse (void) current_file->fileid_assign = 1; current_file->assign = cb_build_assignment_name (current_file, cb_build_reference ("DISK")); } -#line 6167 "parser.c" +#line 6208 "parser.c" break; case 188: /* assign_clause: ASSIGN _to _ext_clause PRINTER */ @@ -6172,13 +6213,13 @@ yyparse (void) current_file->fileid_assign = 1; current_file->assign = cb_build_assignment_name (current_file, cb_build_reference ("PRINTER")); } -#line 6176 "parser.c" +#line 6217 "parser.c" break; case 191: /* _device: PRINTER */ #line 1745 "parser.y" { current_file->organization = COB_ORG_LINE_SEQUENTIAL; } -#line 6182 "parser.c" +#line 6223 "parser.c" break; case 193: /* _ext_clause: EXTERNAL */ @@ -6186,7 +6227,7 @@ yyparse (void) { current_file->external_assign = 1; } -#line 6190 "parser.c" +#line 6231 "parser.c" break; case 194: /* _ext_clause: DYNAMIC */ @@ -6194,7 +6235,7 @@ yyparse (void) { current_file->external_assign = 0; } -#line 6198 "parser.c" +#line 6239 "parser.c" break; case 196: /* assignment_name: DISPLAY */ @@ -6205,7 +6246,7 @@ yyparse (void) s = "$#@DUMMY@#$"; yyval = cb_build_alphanumeric_literal ((unsigned char *)s, strlen (s)); } -#line 6209 "parser.c" +#line 6250 "parser.c" break; case 197: /* assignment_name: _literal assignment_device_name_list */ @@ -6226,37 +6267,37 @@ yyparse (void) yyval = yyvsp[-1]; } } -#line 6230 "parser.c" +#line 6271 "parser.c" break; case 198: /* assignment_device_name_list: qualified_word */ #line 1788 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 6236 "parser.c" +#line 6277 "parser.c" break; case 199: /* assignment_device_name_list: assignment_device_name_list qualified_word */ #line 1789 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 6242 "parser.c" +#line 6283 "parser.c" break; case 201: /* access_mode: SEQUENTIAL */ #line 1799 "parser.y" { current_file->access_mode = COB_ACCESS_SEQUENTIAL; } -#line 6248 "parser.c" +#line 6289 "parser.c" break; case 202: /* access_mode: DYNAMIC */ #line 1800 "parser.y" { current_file->access_mode = COB_ACCESS_DYNAMIC; } -#line 6254 "parser.c" +#line 6295 "parser.c" break; case 203: /* access_mode: RANDOM */ #line 1801 "parser.y" { current_file->access_mode = COB_ACCESS_RANDOM; } -#line 6260 "parser.c" +#line 6301 "parser.c" break; case 204: /* alternative_record_key_clause: ALTERNATE RECORD _key _is reference flag_duplicates */ @@ -6280,7 +6321,7 @@ yyparse (void) l->next = p; } } -#line 6284 "parser.c" +#line 6325 "parser.c" break; case 205: /* alternative_record_key_clause: ALTERNATE RECORD _key _is reference key_is_eq split_key_list flag_duplicates */ @@ -6324,7 +6365,7 @@ yyparse (void) } } } -#line 6328 "parser.c" +#line 6369 "parser.c" break; case 206: /* $@16: %empty */ @@ -6332,7 +6373,7 @@ yyparse (void) { key_component_list = NULL; } -#line 6336 "parser.c" +#line 6377 "parser.c" break; case 209: /* split_key: reference */ @@ -6349,25 +6390,25 @@ yyparse (void) c->next = comp; } } -#line 6353 "parser.c" +#line 6394 "parser.c" break; case 210: /* key_is_eq: %empty */ #line 1895 "parser.y" { yyval = NULL; } -#line 6359 "parser.c" +#line 6400 "parser.c" break; case 211: /* key_is_eq: SOURCE _is */ #line 1896 "parser.y" { yyval = cb_int1; } -#line 6365 "parser.c" +#line 6406 "parser.c" break; case 212: /* key_is_eq: '=' */ #line 1897 "parser.y" { yyval = cb_int('='); } -#line 6371 "parser.c" +#line 6412 "parser.c" break; case 213: /* collating_sequence_clause: coll_sequence _is "Identifier" */ @@ -6375,7 +6416,7 @@ yyparse (void) { PENDING ("COLLATING SEQUENCE"); } -#line 6379 "parser.c" +#line 6420 "parser.c" break; case 214: /* file_status_clause: file_or_sort STATUS _is reference opt_reference */ @@ -6386,25 +6427,25 @@ yyparse (void) PENDING ("2nd FILE STATUS"); } } -#line 6390 "parser.c" +#line 6431 "parser.c" break; case 219: /* lock_mode: MANUAL lock_with */ #line 1935 "parser.y" { current_file->lock_mode = COB_LOCK_MANUAL; } -#line 6396 "parser.c" +#line 6437 "parser.c" break; case 220: /* lock_mode: AUTOMATIC lock_with */ #line 1936 "parser.y" { current_file->lock_mode = COB_LOCK_AUTOMATIC; } -#line 6402 "parser.c" +#line 6443 "parser.c" break; case 221: /* lock_mode: EXCLUSIVE */ #line 1937 "parser.y" { current_file->lock_mode = COB_LOCK_EXCLUSIVE; } -#line 6408 "parser.c" +#line 6449 "parser.c" break; case 224: /* lock_with: WITH LOCK ON MULTIPLE lock_records */ @@ -6412,13 +6453,13 @@ yyparse (void) { current_file->lock_mode |= COB_LOCK_MULTIPLE; } -#line 6416 "parser.c" +#line 6457 "parser.c" break; case 225: /* lock_with: WITH ROLLBACK */ #line 1946 "parser.y" { PENDING ("WITH ROLLBACK"); } -#line 6422 "parser.c" +#line 6463 "parser.c" break; case 230: /* organization: INDEXED */ @@ -6431,7 +6472,7 @@ yyparse (void) organized_seen = 1; } } -#line 6435 "parser.c" +#line 6476 "parser.c" break; case 231: /* organization: RECORD _binary SEQUENTIAL */ @@ -6444,7 +6485,7 @@ yyparse (void) organized_seen = 1; } } -#line 6448 "parser.c" +#line 6489 "parser.c" break; case 232: /* organization: SEQUENTIAL */ @@ -6457,7 +6498,7 @@ yyparse (void) organized_seen = 1; } } -#line 6461 "parser.c" +#line 6502 "parser.c" break; case 233: /* organization: RELATIVE */ @@ -6470,7 +6511,7 @@ yyparse (void) organized_seen = 1; } } -#line 6474 "parser.c" +#line 6515 "parser.c" break; case 234: /* organization: LINE SEQUENTIAL */ @@ -6483,7 +6524,7 @@ yyparse (void) organized_seen = 1; } } -#line 6487 "parser.c" +#line 6528 "parser.c" break; case 235: /* padding_character_clause: PADDING _character _is reference_or_literal */ @@ -6491,13 +6532,13 @@ yyparse (void) { cb_verify (cb_padding_character_clause, "PADDING CHARACTER"); } -#line 6495 "parser.c" +#line 6536 "parser.c" break; case 236: /* record_delimiter_clause: RECORD DELIMITER _is "STANDARD-1" */ #line 2023 "parser.y" { /* ignored */ } -#line 6501 "parser.c" +#line 6542 "parser.c" break; case 237: /* record_key_clause: RECORD _key _is reference flag_duplicates */ @@ -6510,7 +6551,7 @@ yyparse (void) current_file->key = yyvsp[-1]; } -#line 6514 "parser.c" +#line 6555 "parser.c" break; case 238: /* record_key_clause: RECORD _key _is reference key_is_eq split_key_list flag_duplicates */ @@ -6546,55 +6587,55 @@ yyparse (void) current_file->component_list = key_component_list; } } -#line 6550 "parser.c" +#line 6591 "parser.c" break; case 239: /* relative_key_clause: RELATIVE _key _is reference */ #line 2077 "parser.y" { current_file->key = yyvsp[0]; } -#line 6556 "parser.c" +#line 6597 "parser.c" break; case 240: /* reserve_clause: RESERVE integer _area */ #line 2084 "parser.y" { /* ignored */ } -#line 6562 "parser.c" +#line 6603 "parser.c" break; case 241: /* reserve_clause: RESERVE NO */ #line 2085 "parser.y" { /* ignored */ } -#line 6568 "parser.c" +#line 6609 "parser.c" break; case 242: /* sharing_clause: SHARING _with sharing_option */ #line 2092 "parser.y" { current_file->sharing = yyvsp[0]; } -#line 6574 "parser.c" +#line 6615 "parser.c" break; case 243: /* sharing_option: ALL _other */ #line 2096 "parser.y" { yyval = NULL; PENDING ("SHARING ALL OTHER"); } -#line 6580 "parser.c" +#line 6621 "parser.c" break; case 244: /* sharing_option: NO _other */ #line 2097 "parser.y" { yyval = cb_int1; } -#line 6586 "parser.c" +#line 6627 "parser.c" break; case 245: /* sharing_option: READ ONLY */ #line 2098 "parser.y" { yyval = cb_int0; } -#line 6592 "parser.c" +#line 6633 "parser.c" break; case 246: /* nominal_key_clause: NOMINAL _key _is reference */ #line 2104 "parser.y" { PENDING ("NOMINAL KEY"); } -#line 6598 "parser.c" +#line 6639 "parser.c" break; case 257: /* same_clause: SAME same_option _area _for file_name_list */ @@ -6620,31 +6661,31 @@ yyparse (void) break; } } -#line 6624 "parser.c" +#line 6665 "parser.c" break; case 258: /* same_option: %empty */ #line 2159 "parser.y" { yyval = cb_int0; } -#line 6630 "parser.c" +#line 6671 "parser.c" break; case 259: /* same_option: RECORD */ #line 2160 "parser.y" { yyval = cb_int1; } -#line 6636 "parser.c" +#line 6677 "parser.c" break; case 260: /* same_option: SORT */ #line 2161 "parser.y" { yyval = cb_int2; } -#line 6642 "parser.c" +#line 6683 "parser.c" break; case 261: /* same_option: "SORT-MERGE" */ #line 2162 "parser.y" { yyval = cb_int2; } -#line 6648 "parser.c" +#line 6689 "parser.c" break; case 262: /* multiple_file_tape_clause: MULTIPLE _file _tape _contains multiple_file_list */ @@ -6652,13 +6693,13 @@ yyparse (void) { cb_verify (cb_multiple_file_tape_clause, "MULTIPLE FILE TAPE"); } -#line 6656 "parser.c" +#line 6697 "parser.c" break; case 265: /* multiple_file: file_name multiple_file_position */ #line 2180 "parser.y" { } -#line 6662 "parser.c" +#line 6703 "parser.c" break; case 271: /* apply_clause: APPLY "COMMITMENT-CONTROL" _on reference_list */ @@ -6666,7 +6707,7 @@ yyparse (void) { PENDING ("APPLY COMMITMENT-CONTROL"); } -#line 6670 "parser.c" +#line 6711 "parser.c" break; case 272: /* apply_clause: APPLY "CYL-OVERFLOW" _of "Literal" TRACKS ON reference_list */ @@ -6674,7 +6715,7 @@ yyparse (void) { PENDING ("APPLY CYL-OVERFLOW"); } -#line 6678 "parser.c" +#line 6719 "parser.c" break; case 273: /* apply_clause: APPLY "CORE-INDEX" TO reference ON reference_list */ @@ -6682,7 +6723,7 @@ yyparse (void) { PENDING ("APPLY CORE-INDEX"); } -#line 6686 "parser.c" +#line 6727 "parser.c" break; case 274: /* apply_clause: APPLY "FORMS-OVERLAY" TO reference ON reference_list */ @@ -6690,7 +6731,7 @@ yyparse (void) { PENDING ("APPLY FORMS-OVERLAY"); } -#line 6694 "parser.c" +#line 6735 "parser.c" break; case 275: /* apply_clause: APPLY "CLOSE-NOFEED" ON reference_list */ @@ -6698,13 +6739,13 @@ yyparse (void) { PENDING ("APPLY CLOSE-NOFEED"); } -#line 6702 "parser.c" +#line 6743 "parser.c" break; case 279: /* $@17: %empty */ #line 2238 "parser.y" { current_storage = CB_STORAGE_FILE; } -#line 6708 "parser.c" +#line 6749 "parser.c" break; case 281: /* $@18: %empty */ @@ -6718,7 +6759,7 @@ yyparse (void) } current_storage = CB_STORAGE_FILE; } -#line 6722 "parser.c" +#line 6763 "parser.c" break; case 285: /* file_description: file_type file_description_entry record_description_list */ @@ -6730,7 +6771,7 @@ yyparse (void) cb_error (_("RECORD description missing or invalid")); } } -#line 6734 "parser.c" +#line 6775 "parser.c" break; case 286: /* file_description_sequence_without_type: file_description_entry record_description_list */ @@ -6742,19 +6783,19 @@ yyparse (void) cb_error (_("RECORD description missing or invalid")); } } -#line 6746 "parser.c" +#line 6787 "parser.c" break; case 288: /* file_type: FD */ #line 2283 "parser.y" { yyval = cb_int0; } -#line 6752 "parser.c" +#line 6793 "parser.c" break; case 289: /* file_type: SD */ #line 2284 "parser.y" { yyval = cb_int1; } -#line 6758 "parser.c" +#line 6799 "parser.c" break; case 290: /* @19: %empty */ @@ -6769,7 +6810,7 @@ yyparse (void) current_file->organization = COB_ORG_SORT; } } -#line 6773 "parser.c" +#line 6814 "parser.c" break; case 291: /* file_description_entry: file_name @19 file_description_clause_sequence '.' */ @@ -6778,7 +6819,7 @@ yyparse (void) /* Shut up bison */ dummy_tree = yyvsp[-2]; } -#line 6782 "parser.c" +#line 6823 "parser.c" break; case 294: /* file_description_clause: _is EXTERNAL */ @@ -6789,7 +6830,7 @@ yyparse (void) } current_file->external = 1; } -#line 6793 "parser.c" +#line 6834 "parser.c" break; case 295: /* file_description_clause: _is GLOBAL */ @@ -6800,13 +6841,13 @@ yyparse (void) } current_file->global = 1; } -#line 6804 "parser.c" +#line 6845 "parser.c" break; case 306: /* block_contains_clause: BLOCK _contains integer opt_to_integer _records_or_characters */ #line 2347 "parser.y" { /* ignored */ } -#line 6810 "parser.c" +#line 6851 "parser.c" break; case 310: /* record_clause: RECORD _contains integer _characters */ @@ -6822,7 +6863,7 @@ yyparse (void) } } } -#line 6826 "parser.c" +#line 6867 "parser.c" break; case 311: /* record_clause: RECORD _contains integer TO integer _characters */ @@ -6851,7 +6892,7 @@ yyparse (void) } } } -#line 6855 "parser.c" +#line 6896 "parser.c" break; case 312: /* record_clause: RECORD _is VARYING _in _size opt_from_integer opt_to_integer _characters record_depending */ @@ -6876,7 +6917,7 @@ yyparse (void) cb_error (_("RECORD clause invalid")); } } -#line 6880 "parser.c" +#line 6921 "parser.c" break; case 314: /* record_depending: DEPENDING _on reference */ @@ -6884,31 +6925,31 @@ yyparse (void) { current_file->record_depending = yyvsp[0]; } -#line 6888 "parser.c" +#line 6929 "parser.c" break; case 315: /* opt_from_integer: %empty */ #line 2425 "parser.y" { yyval = NULL; } -#line 6894 "parser.c" +#line 6935 "parser.c" break; case 316: /* opt_from_integer: _from integer */ #line 2426 "parser.y" { yyval = yyvsp[0]; } -#line 6900 "parser.c" +#line 6941 "parser.c" break; case 317: /* opt_to_integer: %empty */ #line 2430 "parser.y" { yyval = NULL; } -#line 6906 "parser.c" +#line 6947 "parser.c" break; case 318: /* opt_to_integer: TO integer */ #line 2431 "parser.y" { yyval = yyvsp[0]; } -#line 6912 "parser.c" +#line 6953 "parser.c" break; case 319: /* label_records_clause: LABEL records label_option */ @@ -6916,7 +6957,7 @@ yyparse (void) { cb_verify (cb_label_records_clause, "LABEL RECORDS"); } -#line 6920 "parser.c" +#line 6961 "parser.c" break; case 322: /* value_of_clause: VALUE OF "Identifier" _is valueof_name */ @@ -6924,7 +6965,7 @@ yyparse (void) { cb_verify (cb_value_of_clause, "VALUE OF"); } -#line 6928 "parser.c" +#line 6969 "parser.c" break; case 323: /* value_of_clause: VALUE OF "FILE-ID" _is valueof_name */ @@ -6934,7 +6975,7 @@ yyparse (void) current_file->assign = cb_build_assignment_name (current_file, yyvsp[0]); } } -#line 6938 "parser.c" +#line 6979 "parser.c" break; case 326: /* data_records_clause: DATA records no_reference_list */ @@ -6942,7 +6983,7 @@ yyparse (void) { cb_verify (cb_data_records_clause, "DATA RECORDS"); } -#line 6946 "parser.c" +#line 6987 "parser.c" break; case 327: /* linage_clause: LINAGE _is reference_or_literal _lines linage_sequence */ @@ -6961,7 +7002,7 @@ yyparse (void) current_linage++; } } -#line 6965 "parser.c" +#line 7006 "parser.c" break; case 333: /* linage_footing: _with FOOTING _at reference_or_literal _lines */ @@ -6969,7 +7010,7 @@ yyparse (void) { current_file->latfoot = yyvsp[-1]; } -#line 6973 "parser.c" +#line 7014 "parser.c" break; case 334: /* linage_top: _at TOP reference_or_literal _lines */ @@ -6977,7 +7018,7 @@ yyparse (void) { current_file->lattop = yyvsp[-1]; } -#line 6981 "parser.c" +#line 7022 "parser.c" break; case 335: /* linage_bottom: _at BOTTOM reference_or_literal */ @@ -6985,13 +7026,13 @@ yyparse (void) { current_file->latbot = yyvsp[0]; } -#line 6989 "parser.c" +#line 7030 "parser.c" break; case 336: /* recording_mode_clause: RECORDING _mode _is "Identifier" */ #line 2536 "parser.y" { /* ignore */ } -#line 6995 "parser.c" +#line 7036 "parser.c" break; case 337: /* code_set_clause: "CODE-SET" _is "Identifier" */ @@ -7008,7 +7049,7 @@ yyparse (void) } } } -#line 7012 "parser.c" +#line 7053 "parser.c" break; case 338: /* report_clause: REPORT _is report_name */ @@ -7016,7 +7057,7 @@ yyparse (void) { cb_warning (_("file descriptor REPORT IS")); } -#line 7020 "parser.c" +#line 7061 "parser.c" break; case 339: /* report_clause: REPORTS _are report_name */ @@ -7024,13 +7065,13 @@ yyparse (void) { cb_warning (_("file descriptor REPORTS ARE")); } -#line 7028 "parser.c" +#line 7069 "parser.c" break; case 341: /* $@20: %empty */ #line 2577 "parser.y" { current_storage = CB_STORAGE_WORKING; } -#line 7034 "parser.c" +#line 7075 "parser.c" break; case 342: /* working_storage_section: "WORKING-STORAGE" SECTION '.' $@20 record_description_list */ @@ -7041,19 +7082,19 @@ yyparse (void) cb_field_add (current_program->working_storage, CB_FIELD (yyvsp[0])); } } -#line 7045 "parser.c" +#line 7086 "parser.c" break; case 343: /* record_description_list: %empty */ #line 2588 "parser.y" { yyval = NULL; } -#line 7051 "parser.c" +#line 7092 "parser.c" break; case 344: /* record_description_list: record_description_list_1 */ #line 2589 "parser.y" { yyval = yyvsp[0]; } -#line 7057 "parser.c" +#line 7098 "parser.c" break; case 345: /* $@21: %empty */ @@ -7063,7 +7104,7 @@ yyparse (void) description_field = NULL; cb_clear_real_field (); } -#line 7067 "parser.c" +#line 7108 "parser.c" break; case 346: /* record_description_list_1: $@21 record_description_list_2 */ @@ -7076,7 +7117,7 @@ yyparse (void) } yyval = CB_TREE (description_field); } -#line 7080 "parser.c" +#line 7121 "parser.c" break; case 351: /* $@22: %empty */ @@ -7092,7 +7133,7 @@ yyparse (void) current_field = CB_FIELD (x); } } -#line 7096 "parser.c" +#line 7137 "parser.c" break; case 352: /* data_description: level_number entry_name $@22 data_description_clause_sequence _maybe_next_level_number */ @@ -7109,7 +7150,7 @@ yyparse (void) description_field = current_field; } } -#line 7113 "parser.c" +#line 7154 "parser.c" break; case 353: /* $@23: %empty */ @@ -7125,7 +7166,7 @@ yyparse (void) current_field = CB_FIELD (x); } } -#line 7129 "parser.c" +#line 7170 "parser.c" break; case 354: /* data_description: level_number_88 entry_name $@23 value_cond_clause */ @@ -7140,7 +7181,7 @@ yyparse (void) } } -#line 7144 "parser.c" +#line 7185 "parser.c" break; case 358: /* _maybe_next_level_number: "Literal" */ @@ -7162,7 +7203,7 @@ yyparse (void) cb_unget_token (LITERAL, yyvsp[0]); } } -#line 7166 "parser.c" +#line 7207 "parser.c" break; case 359: /* entry_name: %empty */ @@ -7172,7 +7213,7 @@ yyparse (void) qualifier = NULL; non_const_word = 0; } -#line 7176 "parser.c" +#line 7217 "parser.c" break; case 360: /* entry_name: FILLER */ @@ -7182,7 +7223,7 @@ yyparse (void) qualifier = NULL; non_const_word = 0; } -#line 7186 "parser.c" +#line 7227 "parser.c" break; case 361: /* entry_name: "Identifier" */ @@ -7192,7 +7233,7 @@ yyparse (void) qualifier = yyvsp[0]; non_const_word = 0; } -#line 7196 "parser.c" +#line 7237 "parser.c" break; case 362: /* const_name: "Identifier" */ @@ -7202,7 +7243,7 @@ yyparse (void) qualifier = yyvsp[0]; non_const_word = 0; } -#line 7206 "parser.c" +#line 7247 "parser.c" break; case 364: /* const_global: _is GLOBAL */ @@ -7211,25 +7252,25 @@ yyparse (void) current_field->flag_is_global = 1; cb_error (_("CONSTANT with GLOBAL clause is not yet supported")); } -#line 7215 "parser.c" +#line 7256 "parser.c" break; case 365: /* lit_or_length: literal */ #line 2741 "parser.y" { yyval = yyvsp[0]; } -#line 7221 "parser.c" +#line 7262 "parser.c" break; case 366: /* lit_or_length: LENGTH _of identifier_1 */ #line 2742 "parser.y" { yyval = cb_build_const_length (yyvsp[0]); } -#line 7227 "parser.c" +#line 7268 "parser.c" break; case 367: /* lit_or_length: "BYTE-LENGTH" _of identifier_1 */ #line 2743 "parser.y" { yyval = cb_build_const_length (yyvsp[0]); } -#line 7233 "parser.c" +#line 7274 "parser.c" break; case 368: /* constant_entry: level_number const_name CONSTANT const_global _as lit_or_length */ @@ -7249,7 +7290,7 @@ yyparse (void) /* Ignore return value */ cb_validate_78_item (CB_FIELD (x)); } -#line 7253 "parser.c" +#line 7294 "parser.c" break; case 369: /* data_description_clause_sequence: %empty */ @@ -7258,7 +7299,7 @@ yyparse (void) /* required to check redefines */ yyval = NULL; } -#line 7262 "parser.c" +#line 7303 "parser.c" break; case 370: /* data_description_clause_sequence: data_description_clause_sequence data_description_clause */ @@ -7267,7 +7308,7 @@ yyparse (void) /* required to check redefines */ yyval = cb_true; } -#line 7271 "parser.c" +#line 7312 "parser.c" break; case 386: /* redefines_clause: REDEFINES identifier_1 */ @@ -7287,7 +7328,7 @@ yyparse (void) YYERROR; } } -#line 7291 "parser.c" +#line 7332 "parser.c" break; case 387: /* external_clause: _is EXTERNAL as_extname */ @@ -7310,13 +7351,13 @@ yyparse (void) has_external = 1; } } -#line 7314 "parser.c" +#line 7355 "parser.c" break; case 388: /* as_extname: %empty */ #line 2845 "parser.y" { current_field->ename = NULL; } -#line 7320 "parser.c" +#line 7361 "parser.c" break; case 389: /* as_extname: AS "Literal" */ @@ -7327,7 +7368,7 @@ yyparse (void) x = CB_FIELD(cb_build_field (cb_build_reference ((char *)(CB_LITERAL (yyvsp[0])->data)))); current_field->ename = x->name; } -#line 7331 "parser.c" +#line 7372 "parser.c" break; case 390: /* global_clause: _is GLOBAL */ @@ -7345,79 +7386,79 @@ yyparse (void) current_field->flag_is_global = 1; } } -#line 7349 "parser.c" +#line 7390 "parser.c" break; case 391: /* picture_clause: PICTURE */ #line 2878 "parser.y" { current_field->pic = CB_PICTURE (yyvsp[0]); } -#line 7355 "parser.c" +#line 7396 "parser.c" break; case 394: /* usage: BINARY */ #line 2890 "parser.y" { current_field->usage = CB_USAGE_BINARY; } -#line 7361 "parser.c" +#line 7402 "parser.c" break; case 395: /* usage: COMP */ #line 2891 "parser.y" { current_field->usage = CB_USAGE_BINARY; } -#line 7367 "parser.c" +#line 7408 "parser.c" break; case 396: /* usage: "COMP-1" */ #line 2892 "parser.y" { current_field->usage = CB_USAGE_FLOAT; } -#line 7373 "parser.c" +#line 7414 "parser.c" break; case 397: /* usage: "COMP-2" */ #line 2893 "parser.y" { current_field->usage = CB_USAGE_DOUBLE; } -#line 7379 "parser.c" +#line 7420 "parser.c" break; case 398: /* usage: "COMP-3" */ #line 2894 "parser.y" { current_field->usage = CB_USAGE_PACKED; } -#line 7385 "parser.c" +#line 7426 "parser.c" break; case 399: /* usage: "COMP-4" */ #line 2895 "parser.y" { current_field->usage = CB_USAGE_BINARY; } -#line 7391 "parser.c" +#line 7432 "parser.c" break; case 400: /* usage: "COMP-5" */ #line 2896 "parser.y" { current_field->usage = CB_USAGE_COMP_5; } -#line 7397 "parser.c" +#line 7438 "parser.c" break; case 401: /* usage: "COMP-X" */ #line 2897 "parser.y" { current_field->usage = CB_USAGE_COMP_X; } -#line 7403 "parser.c" +#line 7444 "parser.c" break; case 402: /* usage: DISPLAY */ #line 2898 "parser.y" { current_field->usage = CB_USAGE_DISPLAY; } -#line 7409 "parser.c" +#line 7450 "parser.c" break; case 403: /* usage: INDEX */ #line 2899 "parser.y" { current_field->usage = CB_USAGE_INDEX; } -#line 7415 "parser.c" +#line 7456 "parser.c" break; case 404: /* usage: "PACKED-DECIMAL" */ #line 2900 "parser.y" { current_field->usage = CB_USAGE_PACKED; } -#line 7421 "parser.c" +#line 7462 "parser.c" break; case 405: /* usage: POINTER */ @@ -7426,7 +7467,7 @@ yyparse (void) current_field->usage = CB_USAGE_POINTER; current_field->flag_is_pointer = 1; } -#line 7430 "parser.c" +#line 7471 "parser.c" break; case 406: /* usage: "PROGRAM-POINTER" */ @@ -7435,115 +7476,115 @@ yyparse (void) current_field->usage = CB_USAGE_PROGRAM_POINTER; current_field->flag_is_pointer = 1; } -#line 7439 "parser.c" +#line 7480 "parser.c" break; case 407: /* usage: "SIGNED-SHORT" */ #line 2911 "parser.y" { current_field->usage = CB_USAGE_SIGNED_SHORT; } -#line 7445 "parser.c" +#line 7486 "parser.c" break; case 408: /* usage: "SIGNED-INT" */ #line 2912 "parser.y" { current_field->usage = CB_USAGE_SIGNED_INT; } -#line 7451 "parser.c" +#line 7492 "parser.c" break; case 409: /* usage: "SIGNED-LONG" */ #line 2913 "parser.y" { current_field->usage = CB_USAGE_SIGNED_LONG; } -#line 7457 "parser.c" +#line 7498 "parser.c" break; case 410: /* usage: "UNSIGNED-SHORT" */ #line 2914 "parser.y" { current_field->usage = CB_USAGE_UNSIGNED_SHORT; } -#line 7463 "parser.c" +#line 7504 "parser.c" break; case 411: /* usage: "UNSIGNED-INT" */ #line 2915 "parser.y" { current_field->usage = CB_USAGE_UNSIGNED_INT; } -#line 7469 "parser.c" +#line 7510 "parser.c" break; case 412: /* usage: "UNSIGNED-LONG" */ #line 2916 "parser.y" { current_field->usage = CB_USAGE_UNSIGNED_LONG; } -#line 7475 "parser.c" +#line 7516 "parser.c" break; case 413: /* usage: "BINARY-CHAR" SIGNED */ #line 2917 "parser.y" { current_field->usage = CB_USAGE_SIGNED_CHAR; } -#line 7481 "parser.c" +#line 7522 "parser.c" break; case 414: /* usage: "BINARY-CHAR" UNSIGNED */ #line 2918 "parser.y" { current_field->usage = CB_USAGE_UNSIGNED_CHAR; } -#line 7487 "parser.c" +#line 7528 "parser.c" break; case 415: /* usage: "BINARY-CHAR" */ #line 2919 "parser.y" { current_field->usage = CB_USAGE_SIGNED_CHAR; } -#line 7493 "parser.c" +#line 7534 "parser.c" break; case 416: /* usage: "BINARY-SHORT" SIGNED */ #line 2920 "parser.y" { current_field->usage = CB_USAGE_SIGNED_SHORT; } -#line 7499 "parser.c" +#line 7540 "parser.c" break; case 417: /* usage: "BINARY-SHORT" UNSIGNED */ #line 2921 "parser.y" { current_field->usage = CB_USAGE_UNSIGNED_SHORT; } -#line 7505 "parser.c" +#line 7546 "parser.c" break; case 418: /* usage: "BINARY-SHORT" */ #line 2922 "parser.y" { current_field->usage = CB_USAGE_SIGNED_SHORT; } -#line 7511 "parser.c" +#line 7552 "parser.c" break; case 419: /* usage: "BINARY-LONG" SIGNED */ #line 2923 "parser.y" { current_field->usage = CB_USAGE_SIGNED_INT; } -#line 7517 "parser.c" +#line 7558 "parser.c" break; case 420: /* usage: "BINARY-LONG" UNSIGNED */ #line 2924 "parser.y" { current_field->usage = CB_USAGE_UNSIGNED_INT; } -#line 7523 "parser.c" +#line 7564 "parser.c" break; case 421: /* usage: "BINARY-LONG" */ #line 2925 "parser.y" { current_field->usage = CB_USAGE_SIGNED_INT; } -#line 7529 "parser.c" +#line 7570 "parser.c" break; case 422: /* usage: "BINARY-DOUBLE" SIGNED */ #line 2926 "parser.y" { current_field->usage = CB_USAGE_SIGNED_LONG; } -#line 7535 "parser.c" +#line 7576 "parser.c" break; case 423: /* usage: "BINARY-DOUBLE" UNSIGNED */ #line 2927 "parser.y" { current_field->usage = CB_USAGE_UNSIGNED_LONG; } -#line 7541 "parser.c" +#line 7582 "parser.c" break; case 424: /* usage: "BINARY-DOUBLE" */ #line 2928 "parser.y" { current_field->usage = CB_USAGE_SIGNED_LONG; } -#line 7547 "parser.c" +#line 7588 "parser.c" break; case 425: /* usage: "BINARY-C-LONG" SIGNED */ @@ -7555,7 +7596,7 @@ yyparse (void) current_field->usage = CB_USAGE_SIGNED_LONG; } } -#line 7559 "parser.c" +#line 7600 "parser.c" break; case 426: /* usage: "BINARY-C-LONG" UNSIGNED */ @@ -7567,7 +7608,7 @@ yyparse (void) current_field->usage = CB_USAGE_UNSIGNED_LONG; } } -#line 7571 "parser.c" +#line 7612 "parser.c" break; case 427: /* usage: "BINARY-C-LONG" */ @@ -7579,13 +7620,13 @@ yyparse (void) current_field->usage = CB_USAGE_SIGNED_LONG; } } -#line 7583 "parser.c" +#line 7624 "parser.c" break; case 428: /* usage: NATIONAL */ #line 2953 "parser.y" { PENDING ("USAGE NATIONAL");} -#line 7589 "parser.c" +#line 7630 "parser.c" break; case 429: /* sign_clause: _sign_is LEADING flag_separate */ @@ -7594,7 +7635,7 @@ yyparse (void) current_field->flag_sign_separate = CB_INTEGER (yyvsp[0])->val; current_field->flag_sign_leading = 1; } -#line 7598 "parser.c" +#line 7639 "parser.c" break; case 430: /* sign_clause: _sign_is TRAILING flag_separate */ @@ -7603,7 +7644,7 @@ yyparse (void) current_field->flag_sign_separate = CB_INTEGER (yyvsp[0])->val; current_field->flag_sign_leading = 0; } -#line 7607 "parser.c" +#line 7648 "parser.c" break; case 434: /* occurs_clause: OCCURS integer occurs_to_integer _times occurs_depending occurs_key_spec */ @@ -7620,19 +7661,19 @@ yyparse (void) } current_field->flag_occurs = 1; } -#line 7624 "parser.c" +#line 7665 "parser.c" break; case 435: /* occurs_to_integer: %empty */ #line 2998 "parser.y" { yyval = NULL; } -#line 7630 "parser.c" +#line 7671 "parser.c" break; case 436: /* occurs_to_integer: TO integer */ #line 2999 "parser.y" { yyval = yyvsp[0]; } -#line 7636 "parser.c" +#line 7677 "parser.c" break; case 438: /* occurs_depending: DEPENDING _on reference */ @@ -7640,7 +7681,7 @@ yyparse (void) { current_field->occurs_depending = yyvsp[0]; } -#line 7644 "parser.c" +#line 7685 "parser.c" break; case 441: /* occurs_keys: occurs_key_list */ @@ -7665,7 +7706,7 @@ yyparse (void) current_field->nkeys = nkeys; } } -#line 7669 "parser.c" +#line 7710 "parser.c" break; case 442: /* occurs_key: ascending_or_descending _key _is reference_list */ @@ -7682,31 +7723,31 @@ yyparse (void) } yyval = yyvsp[0]; } -#line 7686 "parser.c" +#line 7727 "parser.c" break; case 443: /* occurs_key_list: occurs_key */ #line 3052 "parser.y" { yyval = yyvsp[0]; } -#line 7692 "parser.c" +#line 7733 "parser.c" break; case 444: /* occurs_key_list: occurs_key_list occurs_key */ #line 3053 "parser.y" { yyval = cb_list_append (yyvsp[-1], yyvsp[0]); } -#line 7698 "parser.c" +#line 7739 "parser.c" break; case 445: /* ascending_or_descending: ASCENDING */ #line 3057 "parser.y" { yyval = cb_int (COB_ASCENDING); } -#line 7704 "parser.c" +#line 7745 "parser.c" break; case 446: /* ascending_or_descending: DESCENDING */ #line 3058 "parser.y" { yyval = cb_int (COB_DESCENDING); } -#line 7710 "parser.c" +#line 7751 "parser.c" break; case 449: /* occurs_indexed: INDEXED _by occurs_index_list */ @@ -7714,19 +7755,19 @@ yyparse (void) { current_field->index_list = yyvsp[0]; } -#line 7718 "parser.c" +#line 7759 "parser.c" break; case 450: /* occurs_index_list: occurs_index */ #line 3071 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 7724 "parser.c" +#line 7765 "parser.c" break; case 451: /* occurs_index_list: occurs_index_list occurs_index */ #line 3073 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 7730 "parser.c" +#line 7771 "parser.c" break; case 452: /* occurs_index: "Identifier" */ @@ -7734,25 +7775,25 @@ yyparse (void) { yyval = cb_build_index (yyvsp[0], cb_int1, 1, current_field); } -#line 7738 "parser.c" +#line 7779 "parser.c" break; case 453: /* justified_clause: JUSTIFIED _right */ #line 3087 "parser.y" { current_field->flag_justified = 1; } -#line 7744 "parser.c" +#line 7785 "parser.c" break; case 454: /* synchronized_clause: SYNCHRONIZED left_or_right */ #line 3094 "parser.y" { current_field->flag_synchronized = 1; } -#line 7750 "parser.c" +#line 7791 "parser.c" break; case 458: /* blank_clause: BLANK _when ZERO */ #line 3106 "parser.y" { current_field->flag_blank_zero = 1; } -#line 7756 "parser.c" +#line 7797 "parser.c" break; case 459: /* based_clause: BASED */ @@ -7776,43 +7817,43 @@ yyparse (void) current_field->flag_item_based = 1; } } -#line 7780 "parser.c" +#line 7821 "parser.c" break; case 460: /* value_clause: VALUE _is literal */ #line 3138 "parser.y" { current_field->values = cb_list_init (yyvsp[0]); } -#line 7786 "parser.c" +#line 7827 "parser.c" break; case 461: /* $@24: %empty */ #line 3142 "parser.y" { current_field->values = yyvsp[0]; } -#line 7792 "parser.c" +#line 7833 "parser.c" break; case 463: /* value_item_list: value_item */ #line 3147 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 7798 "parser.c" +#line 7839 "parser.c" break; case 464: /* value_item_list: value_item_list value_item */ #line 3148 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 7804 "parser.c" +#line 7845 "parser.c" break; case 465: /* value_item: literal */ #line 3152 "parser.y" { yyval = yyvsp[0]; } -#line 7810 "parser.c" +#line 7851 "parser.c" break; case 466: /* value_item: literal THRU literal */ #line 3153 "parser.y" { yyval = cb_build_pair (yyvsp[-2], yyvsp[0]); } -#line 7816 "parser.c" +#line 7857 "parser.c" break; case 468: /* false_is: "FALSE" _is literal */ @@ -7823,7 +7864,7 @@ yyparse (void) } current_field->false_88 = cb_list_init (yyvsp[0]); } -#line 7827 "parser.c" +#line 7868 "parser.c" break; case 469: /* renames_clause: RENAMES qualified_word */ @@ -7839,7 +7880,7 @@ yyparse (void) } } } -#line 7843 "parser.c" +#line 7884 "parser.c" break; case 470: /* renames_clause: RENAMES qualified_word THRU qualified_word */ @@ -7858,7 +7899,7 @@ yyparse (void) } } } -#line 7862 "parser.c" +#line 7903 "parser.c" break; case 471: /* any_length_clause: ANY LENGTH */ @@ -7870,7 +7911,7 @@ yyparse (void) current_field->flag_any_length = 1; } } -#line 7874 "parser.c" +#line 7915 "parser.c" break; case 473: /* $@25: %empty */ @@ -7881,7 +7922,7 @@ yyparse (void) cb_error (_("LOCAL-STORAGE not allowed in nested programs")); } } -#line 7885 "parser.c" +#line 7926 "parser.c" break; case 474: /* local_storage_section: "LOCAL-STORAGE" SECTION '.' $@25 record_description_list */ @@ -7891,13 +7932,13 @@ yyparse (void) current_program->local_storage = CB_FIELD (yyvsp[0]); } } -#line 7895 "parser.c" +#line 7936 "parser.c" break; case 476: /* $@26: %empty */ #line 3238 "parser.y" { current_storage = CB_STORAGE_LINKAGE; } -#line 7901 "parser.c" +#line 7942 "parser.c" break; case 477: /* linkage_section: LINKAGE SECTION '.' $@26 record_description_list */ @@ -7907,7 +7948,7 @@ yyparse (void) current_program->linkage_storage = CB_FIELD (yyvsp[0]); } } -#line 7911 "parser.c" +#line 7952 "parser.c" break; case 479: /* $@27: %empty */ @@ -7916,7 +7957,7 @@ yyparse (void) cb_error (_("REPORT SECTION not supported")); current_storage = CB_STORAGE_REPORT; } -#line 7920 "parser.c" +#line 7961 "parser.c" break; case 486: /* report_description_options: %empty */ @@ -7924,7 +7965,7 @@ yyparse (void) { cb_warning (_("Report description using defaults")); } -#line 7928 "parser.c" +#line 7969 "parser.c" break; case 488: /* report_description_option: _is GLOBAL */ @@ -7932,31 +7973,31 @@ yyparse (void) { cb_error (_("GLOBAL is not allowed with RD")); } -#line 7936 "parser.c" +#line 7977 "parser.c" break; case 497: /* identifier_list: identifier */ #line 3317 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 7942 "parser.c" +#line 7983 "parser.c" break; case 498: /* identifier_list: identifier_list identifier */ #line 3318 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 7948 "parser.c" +#line 7989 "parser.c" break; case 520: /* report_group_option: type_clause */ #line 3374 "parser.y" { cb_warning (_("looking for Report line TYPE")); } -#line 7954 "parser.c" +#line 7995 "parser.c" break; case 571: /* $@28: %empty */ #line 3479 "parser.y" { current_storage = CB_STORAGE_SCREEN; } -#line 7960 "parser.c" +#line 8001 "parser.c" break; case 572: /* screen_section: SCREEN SECTION '.' $@28 */ @@ -7964,7 +8005,7 @@ yyparse (void) { cb_error (_("SCREEN SECTION is not supported")); } -#line 7968 "parser.c" +#line 8009 "parser.c" break; case 574: /* $@29: %empty */ @@ -7978,7 +8019,7 @@ yyparse (void) cb_define_system_name ("SYSERR"); cb_set_in_procedure (); } -#line 7982 "parser.c" +#line 8023 "parser.c" break; case 575: /* $@30: %empty */ @@ -7992,7 +8033,7 @@ yyparse (void) emit_entry (current_program->source_name, 1, yyvsp[-4]); } } -#line 7996 "parser.c" +#line 8037 "parser.c" break; case 576: /* procedure_division: PROCEDURE DIVISION procedure_using_chaining procedure_returning '.' $@29 procedure_declaratives $@30 procedure_list */ @@ -8011,13 +8052,13 @@ yyparse (void) emit_statement (cb_build_perform_exit (current_section)); } } -#line 8015 "parser.c" +#line 8056 "parser.c" break; case 577: /* procedure_using_chaining: %empty */ #line 3528 "parser.y" { yyval = NULL; } -#line 8021 "parser.c" +#line 8062 "parser.c" break; case 578: /* $@31: %empty */ @@ -8026,13 +8067,13 @@ yyparse (void) call_mode = CB_CALL_BY_REFERENCE; size_mode = CB_SIZE_4; } -#line 8030 "parser.c" +#line 8071 "parser.c" break; case 579: /* procedure_using_chaining: USING $@31 procedure_param_list */ #line 3534 "parser.y" { yyval = yyvsp[0]; } -#line 8036 "parser.c" +#line 8077 "parser.c" break; case 580: /* $@32: %empty */ @@ -8041,25 +8082,25 @@ yyparse (void) call_mode = CB_CALL_BY_REFERENCE; current_program->flag_chained = 1; } -#line 8045 "parser.c" +#line 8086 "parser.c" break; case 581: /* procedure_using_chaining: CHAINING $@32 procedure_param_list */ #line 3540 "parser.y" { yyval = yyvsp[0]; } -#line 8051 "parser.c" +#line 8092 "parser.c" break; case 582: /* procedure_param_list: procedure_param */ #line 3544 "parser.y" { yyval = yyvsp[0]; } -#line 8057 "parser.c" +#line 8098 "parser.c" break; case 583: /* procedure_param_list: procedure_param_list procedure_param */ #line 3546 "parser.y" { yyval = cb_list_append (yyvsp[-1], yyvsp[0]); } -#line 8063 "parser.c" +#line 8104 "parser.c" break; case 584: /* procedure_param: procedure_type size_optional procedure_optional "Identifier" */ @@ -8068,7 +8109,7 @@ yyparse (void) yyval = cb_build_pair (cb_int (call_mode), cb_build_identifier (yyvsp[0])); CB_SIZES (yyval) = size_mode; } -#line 8072 "parser.c" +#line 8113 "parser.c" break; case 586: /* procedure_type: _by REFERENCE */ @@ -8076,7 +8117,7 @@ yyparse (void) { call_mode = CB_CALL_BY_REFERENCE; } -#line 8080 "parser.c" +#line 8121 "parser.c" break; case 587: /* procedure_type: _by VALUE */ @@ -8088,7 +8129,7 @@ yyparse (void) call_mode = CB_CALL_BY_VALUE; } } -#line 8092 "parser.c" +#line 8133 "parser.c" break; case 589: /* size_optional: SIZE _is AUTO */ @@ -8100,7 +8141,7 @@ yyparse (void) size_mode = CB_SIZE_AUTO; } } -#line 8104 "parser.c" +#line 8145 "parser.c" break; case 590: /* size_optional: SIZE _is DEFAULT */ @@ -8112,7 +8153,7 @@ yyparse (void) size_mode = CB_SIZE_4; } } -#line 8116 "parser.c" +#line 8157 "parser.c" break; case 591: /* size_optional: UNSIGNED SIZE _is integer */ @@ -8145,7 +8186,7 @@ yyparse (void) } } } -#line 8149 "parser.c" +#line 8190 "parser.c" break; case 592: /* size_optional: SIZE _is integer */ @@ -8178,7 +8219,7 @@ yyparse (void) } } } -#line 8182 "parser.c" +#line 8223 "parser.c" break; case 594: /* procedure_optional: OPTIONAL */ @@ -8188,7 +8229,7 @@ yyparse (void) cb_error (_("OPTIONAL only allowed for BY REFERENCE items")); } } -#line 8192 "parser.c" +#line 8233 "parser.c" break; case 595: /* procedure_returning: %empty */ @@ -8198,7 +8239,7 @@ yyparse (void) cb_error (_("RETURNING clause is required for a FUNCTION")); } } -#line 8202 "parser.c" +#line 8243 "parser.c" break; case 596: /* procedure_returning: RETURNING "Identifier" */ @@ -8211,13 +8252,13 @@ yyparse (void) } } } -#line 8215 "parser.c" +#line 8256 "parser.c" break; case 598: /* $@33: %empty */ #line 3680 "parser.y" { in_declaratives = 1; } -#line 8221 "parser.c" +#line 8262 "parser.c" break; case 599: /* procedure_declaratives: DECLARATIVES '.' $@33 procedure_list END DECLARATIVES '.' */ @@ -8239,7 +8280,7 @@ yyparse (void) current_section = NULL; } } -#line 8243 "parser.c" +#line 8284 "parser.c" break; case 605: /* procedure: statements '.' */ @@ -8259,7 +8300,7 @@ yyparse (void) } /* check_unreached = 0; */ } -#line 8263 "parser.c" +#line 8304 "parser.c" break; case 606: /* procedure: error */ @@ -8267,7 +8308,7 @@ yyparse (void) { check_unreached = 0; } -#line 8271 "parser.c" +#line 8312 "parser.c" break; case 607: /* section_header: section_name SECTION opt_segment '.' */ @@ -8299,7 +8340,7 @@ yyparse (void) current_paragraph = NULL; emit_statement (CB_TREE (current_section)); } -#line 8303 "parser.c" +#line 8344 "parser.c" break; case 608: /* paragraph_header: "Identifier" '.' */ @@ -8337,7 +8378,7 @@ yyparse (void) } emit_statement (CB_TREE (current_paragraph)); } -#line 8341 "parser.c" +#line 8382 "parser.c" break; case 609: /* invalid_statement: section_name */ @@ -8350,19 +8391,19 @@ yyparse (void) } YYERROR; } -#line 8354 "parser.c" +#line 8395 "parser.c" break; case 610: /* section_name: "Identifier" */ #line 3823 "parser.y" { yyval = cb_build_section_name (yyvsp[0], 0); } -#line 8360 "parser.c" +#line 8401 "parser.c" break; case 612: /* opt_segment: "Literal" */ #line 3827 "parser.y" { /* ignore */ } -#line 8366 "parser.c" +#line 8407 "parser.c" break; case 613: /* @34: %empty */ @@ -8371,7 +8412,7 @@ yyparse (void) yyval = current_program->exec_list; current_program->exec_list = NULL; } -#line 8375 "parser.c" +#line 8416 "parser.c" break; case 614: /* @35: %empty */ @@ -8380,7 +8421,7 @@ yyparse (void) yyval = CB_TREE (current_statement); current_statement = NULL; } -#line 8384 "parser.c" +#line 8425 "parser.c" break; case 615: /* statement_list: @34 @35 statements */ @@ -8390,7 +8431,7 @@ yyparse (void) current_program->exec_list = yyvsp[-2]; current_statement = CB_STATEMENT (yyvsp[-1]); } -#line 8394 "parser.c" +#line 8435 "parser.c" break; case 616: /* statements: %empty */ @@ -8415,7 +8456,7 @@ yyparse (void) cb_cons (CB_TREE (current_paragraph), current_section->children); } } -#line 8419 "parser.c" +#line 8460 "parser.c" break; case 667: /* statement: "NEXT SENTENCE" */ @@ -8433,7 +8474,7 @@ yyparse (void) } check_unreached = 0; } -#line 8437 "parser.c" +#line 8478 "parser.c" break; case 668: /* $@36: %empty */ @@ -8445,7 +8486,7 @@ yyparse (void) bgc = NULL; scroll = NULL; } -#line 8449 "parser.c" +#line 8490 "parser.c" break; case 670: /* accept_body: identifier opt_at_line_column opt_accp_attr on_accp_exception */ @@ -8453,7 +8494,7 @@ yyparse (void) { cb_emit_accept (yyvsp[-3], yyvsp[-2], fgc, bgc, scroll, dispattrs); } -#line 8457 "parser.c" +#line 8498 "parser.c" break; case 671: /* accept_body: identifier FROM ESCAPE KEY */ @@ -8461,7 +8502,7 @@ yyparse (void) { PENDING ("ACCEPT .. FROM ESCAPE KEY"); } -#line 8465 "parser.c" +#line 8506 "parser.c" break; case 672: /* accept_body: identifier FROM LINES */ @@ -8469,7 +8510,7 @@ yyparse (void) { cb_emit_accept_line_or_col (yyvsp[-2], 0); } -#line 8473 "parser.c" +#line 8514 "parser.c" break; case 673: /* accept_body: identifier FROM COLUMNS */ @@ -8477,7 +8518,7 @@ yyparse (void) { cb_emit_accept_line_or_col (yyvsp[-2], 1); } -#line 8481 "parser.c" +#line 8522 "parser.c" break; case 674: /* accept_body: identifier FROM DATE */ @@ -8485,7 +8526,7 @@ yyparse (void) { cb_emit_accept_date (yyvsp[-2]); } -#line 8489 "parser.c" +#line 8530 "parser.c" break; case 675: /* accept_body: identifier FROM DATE YYYYMMDD */ @@ -8493,7 +8534,7 @@ yyparse (void) { cb_emit_accept_date_yyyymmdd (yyvsp[-3]); } -#line 8497 "parser.c" +#line 8538 "parser.c" break; case 676: /* accept_body: identifier FROM DAY */ @@ -8501,7 +8542,7 @@ yyparse (void) { cb_emit_accept_day (yyvsp[-2]); } -#line 8505 "parser.c" +#line 8546 "parser.c" break; case 677: /* accept_body: identifier FROM DAY YYYYDDD */ @@ -8509,7 +8550,7 @@ yyparse (void) { cb_emit_accept_day_yyyyddd (yyvsp[-3]); } -#line 8513 "parser.c" +#line 8554 "parser.c" break; case 678: /* accept_body: identifier FROM "DAY-OF-WEEK" */ @@ -8517,7 +8558,7 @@ yyparse (void) { cb_emit_accept_day_of_week (yyvsp[-2]); } -#line 8521 "parser.c" +#line 8562 "parser.c" break; case 679: /* accept_body: identifier FROM TIME */ @@ -8525,7 +8566,7 @@ yyparse (void) { cb_emit_accept_time (yyvsp[-2]); } -#line 8529 "parser.c" +#line 8570 "parser.c" break; case 680: /* accept_body: identifier FROM "COMMAND-LINE" */ @@ -8533,7 +8574,7 @@ yyparse (void) { cb_emit_accept_command_line (yyvsp[-2]); } -#line 8537 "parser.c" +#line 8578 "parser.c" break; case 681: /* accept_body: identifier FROM "ENVIRONMENT-VALUE" on_accp_exception */ @@ -8541,7 +8582,7 @@ yyparse (void) { cb_emit_accept_environment (yyvsp[-3]); } -#line 8545 "parser.c" +#line 8586 "parser.c" break; case 682: /* accept_body: identifier FROM ENVIRONMENT simple_value on_accp_exception */ @@ -8549,7 +8590,7 @@ yyparse (void) { cb_emit_get_environment (yyvsp[-1], yyvsp[-4]); } -#line 8553 "parser.c" +#line 8594 "parser.c" break; case 683: /* accept_body: identifier FROM "ARGUMENT-NUMBER" */ @@ -8557,7 +8598,7 @@ yyparse (void) { cb_emit_accept_arg_number (yyvsp[-2]); } -#line 8561 "parser.c" +#line 8602 "parser.c" break; case 684: /* accept_body: identifier FROM "ARGUMENT-VALUE" on_accp_exception */ @@ -8565,7 +8606,7 @@ yyparse (void) { cb_emit_accept_arg_value (yyvsp[-3]); } -#line 8569 "parser.c" +#line 8610 "parser.c" break; case 685: /* accept_body: identifier FROM mnemonic_name */ @@ -8573,7 +8614,7 @@ yyparse (void) { cb_emit_accept_mnemonic (yyvsp[-2], yyvsp[0]); } -#line 8577 "parser.c" +#line 8618 "parser.c" break; case 686: /* accept_body: identifier FROM "Identifier" */ @@ -8581,103 +8622,103 @@ yyparse (void) { cb_emit_accept_name (yyvsp[-2], yyvsp[0]); } -#line 8585 "parser.c" +#line 8626 "parser.c" break; case 687: /* opt_at_line_column: %empty */ #line 4033 "parser.y" { yyval = NULL; } -#line 8591 "parser.c" +#line 8632 "parser.c" break; case 688: /* opt_at_line_column: _at line_number column_number */ #line 4034 "parser.y" { yyval = cb_build_pair (yyvsp[-1], yyvsp[0]); } -#line 8597 "parser.c" +#line 8638 "parser.c" break; case 689: /* opt_at_line_column: _at column_number line_number */ #line 4035 "parser.y" { yyval = cb_build_pair (yyvsp[0], yyvsp[-1]); } -#line 8603 "parser.c" +#line 8644 "parser.c" break; case 690: /* opt_at_line_column: _at line_number */ #line 4036 "parser.y" { yyval = cb_build_pair (yyvsp[0], NULL); } -#line 8609 "parser.c" +#line 8650 "parser.c" break; case 691: /* opt_at_line_column: _at column_number */ #line 4037 "parser.y" { yyval = cb_build_pair (NULL, yyvsp[0]); } -#line 8615 "parser.c" +#line 8656 "parser.c" break; case 692: /* opt_at_line_column: AT simple_value */ #line 4038 "parser.y" { yyval = yyvsp[0]; } -#line 8621 "parser.c" +#line 8662 "parser.c" break; case 693: /* line_number: LINE _number id_or_lit */ #line 4042 "parser.y" { yyval = yyvsp[0]; } -#line 8627 "parser.c" +#line 8668 "parser.c" break; case 694: /* column_number: COLUMN _number id_or_lit */ #line 4046 "parser.y" { yyval = yyvsp[0]; } -#line 8633 "parser.c" +#line 8674 "parser.c" break; case 695: /* column_number: POSITION _number id_or_lit */ #line 4047 "parser.y" { yyval = yyvsp[0]; } -#line 8639 "parser.c" +#line 8680 "parser.c" break; case 700: /* accp_attr: BELL */ #line 4060 "parser.y" { dispattrs |= COB_SCREEN_BELL; } -#line 8645 "parser.c" +#line 8686 "parser.c" break; case 701: /* accp_attr: BLINK */ #line 4061 "parser.y" { dispattrs |= COB_SCREEN_BLINK; } -#line 8651 "parser.c" +#line 8692 "parser.c" break; case 702: /* accp_attr: HIGHLIGHT */ #line 4062 "parser.y" { dispattrs |= COB_SCREEN_HIGHLIGHT; } -#line 8657 "parser.c" +#line 8698 "parser.c" break; case 703: /* accp_attr: LOWLIGHT */ #line 4063 "parser.y" { dispattrs |= COB_SCREEN_LOWLIGHT; } -#line 8663 "parser.c" +#line 8704 "parser.c" break; case 704: /* accp_attr: "REVERSE-VIDEO" */ #line 4064 "parser.y" { dispattrs |= COB_SCREEN_REVERSE; } -#line 8669 "parser.c" +#line 8710 "parser.c" break; case 705: /* accp_attr: UNDERLINE */ #line 4065 "parser.y" { dispattrs |= COB_SCREEN_UNDERLINE; } -#line 8675 "parser.c" +#line 8716 "parser.c" break; case 706: /* accp_attr: OVERLINE */ #line 4066 "parser.y" { dispattrs |= COB_SCREEN_OVERLINE; } -#line 8681 "parser.c" +#line 8722 "parser.c" break; case 707: /* accp_attr: "FOREGROUND-COLOR" _is num_id_or_lit */ @@ -8685,7 +8726,7 @@ yyparse (void) { fgc = yyvsp[0]; } -#line 8689 "parser.c" +#line 8730 "parser.c" break; case 708: /* accp_attr: "BACKGROUND-COLOR" _is num_id_or_lit */ @@ -8693,7 +8734,7 @@ yyparse (void) { bgc = yyvsp[0]; } -#line 8697 "parser.c" +#line 8738 "parser.c" break; case 709: /* accp_attr: SCROLL UP _opt_scroll_lines */ @@ -8701,7 +8742,7 @@ yyparse (void) { scroll = yyvsp[0]; } -#line 8705 "parser.c" +#line 8746 "parser.c" break; case 710: /* accp_attr: SCROLL DOWN _opt_scroll_lines */ @@ -8710,61 +8751,61 @@ yyparse (void) dispattrs |= COB_SCREEN_SCROLL_DOWN; scroll = yyvsp[0]; } -#line 8714 "parser.c" +#line 8755 "parser.c" break; case 711: /* accp_attr: AUTO */ #line 4084 "parser.y" { dispattrs |= COB_SCREEN_AUTO; } -#line 8720 "parser.c" +#line 8761 "parser.c" break; case 712: /* accp_attr: FULL */ #line 4085 "parser.y" { dispattrs |= COB_SCREEN_FULL; } -#line 8726 "parser.c" +#line 8767 "parser.c" break; case 713: /* accp_attr: REQUIRED */ #line 4086 "parser.y" { dispattrs |= COB_SCREEN_REQUIRED; } -#line 8732 "parser.c" +#line 8773 "parser.c" break; case 714: /* accp_attr: SECURE */ #line 4087 "parser.y" { dispattrs |= COB_SCREEN_SECURE; } -#line 8738 "parser.c" +#line 8779 "parser.c" break; case 715: /* accp_attr: UPDATE */ #line 4088 "parser.y" { dispattrs |= COB_SCREEN_UPDATE; } -#line 8744 "parser.c" +#line 8785 "parser.c" break; case 716: /* accp_attr: PROMPT */ #line 4089 "parser.y" { dispattrs |= COB_SCREEN_PROMPT; } -#line 8750 "parser.c" +#line 8791 "parser.c" break; case 717: /* end_accept: %empty */ #line 4093 "parser.y" { terminator_warning (TERM_ACCEPT); } -#line 8756 "parser.c" +#line 8797 "parser.c" break; case 718: /* end_accept: "END-ACCEPT" */ #line 4094 "parser.y" { terminator_clear (TERM_ACCEPT); } -#line 8762 "parser.c" +#line 8803 "parser.c" break; case 719: /* $@37: %empty */ #line 4103 "parser.y" { BEGIN_STATEMENT ("ADD", TERM_ADD); } -#line 8768 "parser.c" +#line 8809 "parser.c" break; case 721: /* add_body: x_list TO arithmetic_x_list on_size_error */ @@ -8772,7 +8813,7 @@ yyparse (void) { cb_emit_arithmetic (yyvsp[-1], '+', cb_build_binary_list (yyvsp[-3], '+')); } -#line 8776 "parser.c" +#line 8817 "parser.c" break; case 722: /* add_body: x_list add_to GIVING arithmetic_x_list on_size_error */ @@ -8780,7 +8821,7 @@ yyparse (void) { cb_emit_arithmetic (yyvsp[-1], 0, cb_build_binary_list (yyvsp[-4], '+')); } -#line 8784 "parser.c" +#line 8825 "parser.c" break; case 723: /* add_body: CORRESPONDING identifier TO identifier flag_rounded on_size_error */ @@ -8788,31 +8829,31 @@ yyparse (void) { cb_emit_corresponding (cb_build_add, yyvsp[-2], yyvsp[-4], yyvsp[-1]); } -#line 8792 "parser.c" +#line 8833 "parser.c" break; case 725: /* add_to: TO x */ #line 4124 "parser.y" { cb_list_add (yyvsp[-2], yyvsp[0]); } -#line 8798 "parser.c" +#line 8839 "parser.c" break; case 726: /* end_add: %empty */ #line 4128 "parser.y" { terminator_warning (TERM_ADD); } -#line 8804 "parser.c" +#line 8845 "parser.c" break; case 727: /* end_add: "END-ADD" */ #line 4129 "parser.y" { terminator_clear (TERM_ADD); } -#line 8810 "parser.c" +#line 8851 "parser.c" break; case 728: /* $@38: %empty */ #line 4138 "parser.y" { BEGIN_STATEMENT ("ALLOCATE", 0); } -#line 8816 "parser.c" +#line 8857 "parser.c" break; case 730: /* allocate_body: "Identifier" flag_initialized allocate_returning */ @@ -8820,7 +8861,7 @@ yyparse (void) { cb_emit_allocate (yyvsp[-2], yyvsp[0], NULL, yyvsp[-1]); } -#line 8824 "parser.c" +#line 8865 "parser.c" break; case 731: /* allocate_body: expr CHARACTERS flag_initialized RETURNING target_x */ @@ -8828,19 +8869,19 @@ yyparse (void) { cb_emit_allocate (NULL, yyvsp[0], yyvsp[-4], yyvsp[-2]); } -#line 8832 "parser.c" +#line 8873 "parser.c" break; case 732: /* allocate_returning: %empty */ #line 4154 "parser.y" { yyval = NULL; } -#line 8838 "parser.c" +#line 8879 "parser.c" break; case 733: /* allocate_returning: RETURNING target_x */ #line 4155 "parser.y" { yyval = yyvsp[0]; } -#line 8844 "parser.c" +#line 8885 "parser.c" break; case 734: /* alter_statement: ALTER alter_options */ @@ -8848,13 +8889,13 @@ yyparse (void) { cb_error (_("ALTER statement is obsolete and unsupported")); } -#line 8852 "parser.c" +#line 8893 "parser.c" break; case 739: /* $@39: %empty */ #line 4183 "parser.y" { BEGIN_STATEMENT ("CALL", TERM_CALL); } -#line 8858 "parser.c" +#line 8899 "parser.c" break; case 740: /* call_statement: CALL $@39 id_or_lit_or_func call_using call_returning call_on_exception call_not_on_exception end_call */ @@ -8862,13 +8903,13 @@ yyparse (void) { cb_emit_call (yyvsp[-5], yyvsp[-4], yyvsp[-3], yyvsp[-2], yyvsp[-1]); } -#line 8866 "parser.c" +#line 8907 "parser.c" break; case 741: /* call_using: %empty */ #line 4193 "parser.y" { yyval = NULL; } -#line 8872 "parser.c" +#line 8913 "parser.c" break; case 742: /* $@40: %empty */ @@ -8877,25 +8918,25 @@ yyparse (void) call_mode = CB_CALL_BY_REFERENCE; size_mode = CB_SIZE_4; } -#line 8881 "parser.c" +#line 8922 "parser.c" break; case 743: /* call_using: USING $@40 call_param_list */ #line 4199 "parser.y" { yyval = yyvsp[0]; } -#line 8887 "parser.c" +#line 8928 "parser.c" break; case 744: /* call_param_list: call_param */ #line 4203 "parser.y" { yyval = yyvsp[0]; } -#line 8893 "parser.c" +#line 8934 "parser.c" break; case 745: /* call_param_list: call_param_list call_param */ #line 4205 "parser.y" { yyval = cb_list_append (yyvsp[-1], yyvsp[0]); } -#line 8899 "parser.c" +#line 8940 "parser.c" break; case 746: /* call_param: call_type OMITTED */ @@ -8906,7 +8947,7 @@ yyparse (void) } yyval = cb_build_pair (cb_int (call_mode), cb_null); } -#line 8910 "parser.c" +#line 8951 "parser.c" break; case 747: /* call_param: call_type size_optional x */ @@ -8915,7 +8956,7 @@ yyparse (void) yyval = cb_build_pair (cb_int (call_mode), yyvsp[0]); CB_SIZES (yyval) = size_mode; } -#line 8919 "parser.c" +#line 8960 "parser.c" break; case 749: /* call_type: _by REFERENCE */ @@ -8923,7 +8964,7 @@ yyparse (void) { call_mode = CB_CALL_BY_REFERENCE; } -#line 8927 "parser.c" +#line 8968 "parser.c" break; case 750: /* call_type: _by CONTENT */ @@ -8935,7 +8976,7 @@ yyparse (void) call_mode = CB_CALL_BY_CONTENT; } } -#line 8939 "parser.c" +#line 8980 "parser.c" break; case 751: /* call_type: _by VALUE */ @@ -8947,25 +8988,25 @@ yyparse (void) call_mode = CB_CALL_BY_VALUE; } } -#line 8951 "parser.c" +#line 8992 "parser.c" break; case 752: /* call_returning: %empty */ #line 4248 "parser.y" { yyval = NULL; } -#line 8957 "parser.c" +#line 8998 "parser.c" break; case 753: /* call_returning: RETURNING identifier */ #line 4249 "parser.y" { yyval = yyvsp[0]; } -#line 8963 "parser.c" +#line 9004 "parser.c" break; case 754: /* call_returning: GIVING identifier */ #line 4250 "parser.y" { yyval = yyvsp[0]; } -#line 8969 "parser.c" +#line 9010 "parser.c" break; case 755: /* call_on_exception: %empty */ @@ -8973,7 +9014,7 @@ yyparse (void) { yyval = NULL; } -#line 8977 "parser.c" +#line 9018 "parser.c" break; case 756: /* $@41: %empty */ @@ -8981,7 +9022,7 @@ yyparse (void) { check_unreached = 0; } -#line 8985 "parser.c" +#line 9026 "parser.c" break; case 757: /* call_on_exception: exception_or_overflow $@41 statement_list */ @@ -8989,7 +9030,7 @@ yyparse (void) { yyval = yyvsp[0]; } -#line 8993 "parser.c" +#line 9034 "parser.c" break; case 758: /* call_not_on_exception: %empty */ @@ -8997,7 +9038,7 @@ yyparse (void) { yyval = NULL; } -#line 9001 "parser.c" +#line 9042 "parser.c" break; case 759: /* $@42: %empty */ @@ -9005,7 +9046,7 @@ yyparse (void) { check_unreached = 0; } -#line 9009 "parser.c" +#line 9050 "parser.c" break; case 760: /* call_not_on_exception: not_exception_or_overflow $@42 statement_list */ @@ -9013,25 +9054,25 @@ yyparse (void) { yyval = yyvsp[0]; } -#line 9017 "parser.c" +#line 9058 "parser.c" break; case 761: /* end_call: %empty */ #line 4284 "parser.y" { terminator_warning (TERM_CALL); } -#line 9023 "parser.c" +#line 9064 "parser.c" break; case 762: /* end_call: "END-CALL" */ #line 4285 "parser.y" { terminator_clear (TERM_CALL); } -#line 9029 "parser.c" +#line 9070 "parser.c" break; case 763: /* $@43: %empty */ #line 4294 "parser.y" { BEGIN_STATEMENT ("CANCEL", 0); } -#line 9035 "parser.c" +#line 9076 "parser.c" break; case 766: /* cancel_list: cancel_list id_or_lit */ @@ -9039,7 +9080,7 @@ yyparse (void) { cb_emit_cancel (yyvsp[0]); } -#line 9043 "parser.c" +#line 9084 "parser.c" break; case 767: /* cancel_list: ALL */ @@ -9047,13 +9088,13 @@ yyparse (void) { cb_emit_cancel_all (); } -#line 9051 "parser.c" +#line 9092 "parser.c" break; case 768: /* $@44: %empty */ #line 4315 "parser.y" { BEGIN_STATEMENT ("CLOSE", 0); } -#line 9057 "parser.c" +#line 9098 "parser.c" break; case 771: /* close_list: close_list file_name close_option */ @@ -9064,43 +9105,43 @@ yyparse (void) cb_emit_close (yyvsp[-1], yyvsp[0]); } } -#line 9068 "parser.c" +#line 9109 "parser.c" break; case 772: /* close_option: %empty */ #line 4331 "parser.y" { yyval = cb_int (COB_CLOSE_NORMAL); } -#line 9074 "parser.c" +#line 9115 "parser.c" break; case 773: /* close_option: reel_or_unit */ #line 4332 "parser.y" { yyval = cb_int (COB_CLOSE_UNIT); } -#line 9080 "parser.c" +#line 9121 "parser.c" break; case 774: /* close_option: reel_or_unit _for REMOVAL */ #line 4333 "parser.y" { yyval = cb_int (COB_CLOSE_UNIT_REMOVAL); } -#line 9086 "parser.c" +#line 9127 "parser.c" break; case 775: /* close_option: _with NO REWIND */ #line 4334 "parser.y" { yyval = cb_int (COB_CLOSE_NO_REWIND); } -#line 9092 "parser.c" +#line 9133 "parser.c" break; case 776: /* close_option: _with LOCK */ #line 4335 "parser.y" { yyval = cb_int (COB_CLOSE_LOCK); } -#line 9098 "parser.c" +#line 9139 "parser.c" break; case 779: /* $@45: %empty */ #line 4346 "parser.y" { BEGIN_STATEMENT ("COMPUTE", TERM_COMPUTE); } -#line 9104 "parser.c" +#line 9145 "parser.c" break; case 781: /* compute_body: arithmetic_x_list comp_equal expr on_size_error */ @@ -9108,19 +9149,19 @@ yyparse (void) { cb_emit_arithmetic (yyvsp[-3], 0, yyvsp[-1]); } -#line 9112 "parser.c" +#line 9153 "parser.c" break; case 782: /* end_compute: %empty */ #line 4359 "parser.y" { terminator_warning (TERM_COMPUTE); } -#line 9118 "parser.c" +#line 9159 "parser.c" break; case 783: /* end_compute: "END-COMPUTE" */ #line 4360 "parser.y" { terminator_clear (TERM_COMPUTE); } -#line 9124 "parser.c" +#line 9165 "parser.c" break; case 786: /* commit_statement: COMMIT */ @@ -9129,7 +9170,7 @@ yyparse (void) BEGIN_STATEMENT ("COMMIT", 0); cb_emit_commit (); } -#line 9133 "parser.c" +#line 9174 "parser.c" break; case 787: /* continue_statement: CONTINUE */ @@ -9138,13 +9179,13 @@ yyparse (void) BEGIN_STATEMENT ("CONTINUE", 0); cb_emit_continue (); } -#line 9142 "parser.c" +#line 9183 "parser.c" break; case 788: /* $@46: %empty */ #line 4396 "parser.y" { BEGIN_STATEMENT ("DELETE", TERM_DELETE); } -#line 9148 "parser.c" +#line 9189 "parser.c" break; case 789: /* delete_statement: DELETE $@46 file_name _record opt_invalid_key end_delete */ @@ -9154,25 +9195,25 @@ yyparse (void) cb_emit_delete (yyvsp[-3]); } } -#line 9158 "parser.c" +#line 9199 "parser.c" break; case 790: /* end_delete: %empty */ #line 4407 "parser.y" { terminator_warning (TERM_DELETE); } -#line 9164 "parser.c" +#line 9205 "parser.c" break; case 791: /* end_delete: "END-DELETE" */ #line 4408 "parser.y" { terminator_clear (TERM_DELETE); } -#line 9170 "parser.c" +#line 9211 "parser.c" break; case 792: /* $@47: %empty */ #line 4417 "parser.y" { BEGIN_STATEMENT ("DELETE-FILE", 0); } -#line 9176 "parser.c" +#line 9217 "parser.c" break; case 793: /* delete_file_statement: DELETE $@47 "FILE" file_name_list */ @@ -9186,7 +9227,7 @@ yyparse (void) } } } -#line 9190 "parser.c" +#line 9231 "parser.c" break; case 794: /* $@48: %empty */ @@ -9198,7 +9239,7 @@ yyparse (void) bgc = NULL; scroll = NULL; } -#line 9202 "parser.c" +#line 9243 "parser.c" break; case 796: /* display_body: id_or_lit "UPON ENVIRONMENT-NAME" on_disp_exception */ @@ -9206,7 +9247,7 @@ yyparse (void) { cb_emit_env_name (yyvsp[-2]); } -#line 9210 "parser.c" +#line 9251 "parser.c" break; case 797: /* display_body: id_or_lit "UPON ENVIRONMENT-VALUE" on_disp_exception */ @@ -9214,7 +9255,7 @@ yyparse (void) { cb_emit_env_value (yyvsp[-2]); } -#line 9218 "parser.c" +#line 9259 "parser.c" break; case 798: /* display_body: id_or_lit "UPON ARGUMENT-NUMBER" on_disp_exception */ @@ -9222,7 +9263,7 @@ yyparse (void) { cb_emit_arg_number (yyvsp[-2]); } -#line 9226 "parser.c" +#line 9267 "parser.c" break; case 799: /* display_body: id_or_lit "UPON COMMAND-LINE" on_disp_exception */ @@ -9230,7 +9271,7 @@ yyparse (void) { cb_emit_command_line (yyvsp[-2]); } -#line 9234 "parser.c" +#line 9275 "parser.c" break; case 800: /* display_body: x_list opt_at_line_column with_clause on_disp_exception */ @@ -9238,7 +9279,7 @@ yyparse (void) { cb_emit_display (yyvsp[-3], cb_int0, yyvsp[-1], yyvsp[-2], fgc, bgc, scroll, dispattrs); } -#line 9242 "parser.c" +#line 9283 "parser.c" break; case 801: /* display_body: x_list opt_at_line_column UPON mnemonic_name with_clause on_disp_exception */ @@ -9246,7 +9287,7 @@ yyparse (void) { cb_emit_display_mnemonic (yyvsp[-5], yyvsp[-2], yyvsp[-1], yyvsp[-4], fgc, bgc, scroll, dispattrs); } -#line 9250 "parser.c" +#line 9291 "parser.c" break; case 802: /* display_body: x_list opt_at_line_column UPON "Identifier" with_clause on_disp_exception */ @@ -9255,7 +9296,7 @@ yyparse (void) cb_tree word = cb_build_display_upon_direct (yyvsp[-2]); cb_emit_display (yyvsp[-5], word, yyvsp[-1], yyvsp[-4], fgc, bgc, scroll, dispattrs); } -#line 9259 "parser.c" +#line 9300 "parser.c" break; case 803: /* display_body: x_list opt_at_line_column UPON PRINTER with_clause on_disp_exception */ @@ -9263,7 +9304,7 @@ yyparse (void) { cb_emit_display (yyvsp[-5], cb_int0, yyvsp[-1], yyvsp[-4], fgc, bgc, scroll, dispattrs); } -#line 9267 "parser.c" +#line 9308 "parser.c" break; case 804: /* display_body: x_list opt_at_line_column UPON CRT with_clause on_disp_exception */ @@ -9271,79 +9312,79 @@ yyparse (void) { cb_emit_display (yyvsp[-5], cb_int0, yyvsp[-1], yyvsp[-4], fgc, bgc, scroll, dispattrs); } -#line 9275 "parser.c" +#line 9316 "parser.c" break; case 805: /* with_clause: %empty */ #line 4489 "parser.y" { yyval = cb_int1; } -#line 9281 "parser.c" +#line 9322 "parser.c" break; case 806: /* with_clause: _with "NO ADVANCING" */ #line 4490 "parser.y" { yyval = cb_int0; } -#line 9287 "parser.c" +#line 9328 "parser.c" break; case 807: /* with_clause: WITH disp_attrs */ #line 4491 "parser.y" { yyval = cb_int1; } -#line 9293 "parser.c" +#line 9334 "parser.c" break; case 810: /* disp_attr: BELL */ #line 4501 "parser.y" { dispattrs |= COB_SCREEN_BELL; } -#line 9299 "parser.c" +#line 9340 "parser.c" break; case 811: /* disp_attr: BLINK */ #line 4502 "parser.y" { dispattrs |= COB_SCREEN_BLINK; } -#line 9305 "parser.c" +#line 9346 "parser.c" break; case 812: /* disp_attr: ERASE EOL */ #line 4503 "parser.y" { dispattrs |= COB_SCREEN_ERASE_EOL; } -#line 9311 "parser.c" +#line 9352 "parser.c" break; case 813: /* disp_attr: ERASE EOS */ #line 4504 "parser.y" { dispattrs |= COB_SCREEN_ERASE_EOS; } -#line 9317 "parser.c" +#line 9358 "parser.c" break; case 814: /* disp_attr: HIGHLIGHT */ #line 4505 "parser.y" { dispattrs |= COB_SCREEN_HIGHLIGHT; } -#line 9323 "parser.c" +#line 9364 "parser.c" break; case 815: /* disp_attr: LOWLIGHT */ #line 4506 "parser.y" { dispattrs |= COB_SCREEN_LOWLIGHT; } -#line 9329 "parser.c" +#line 9370 "parser.c" break; case 816: /* disp_attr: "REVERSE-VIDEO" */ #line 4507 "parser.y" { dispattrs |= COB_SCREEN_REVERSE; } -#line 9335 "parser.c" +#line 9376 "parser.c" break; case 817: /* disp_attr: UNDERLINE */ #line 4508 "parser.y" { dispattrs |= COB_SCREEN_UNDERLINE; } -#line 9341 "parser.c" +#line 9382 "parser.c" break; case 818: /* disp_attr: OVERLINE */ #line 4509 "parser.y" { dispattrs |= COB_SCREEN_OVERLINE; } -#line 9347 "parser.c" +#line 9388 "parser.c" break; case 819: /* disp_attr: "FOREGROUND-COLOR" _is num_id_or_lit */ @@ -9351,7 +9392,7 @@ yyparse (void) { fgc = yyvsp[0]; } -#line 9355 "parser.c" +#line 9396 "parser.c" break; case 820: /* disp_attr: "BACKGROUND-COLOR" _is num_id_or_lit */ @@ -9359,7 +9400,7 @@ yyparse (void) { bgc = yyvsp[0]; } -#line 9363 "parser.c" +#line 9404 "parser.c" break; case 821: /* disp_attr: SCROLL UP _opt_scroll_lines */ @@ -9367,7 +9408,7 @@ yyparse (void) { scroll = yyvsp[0]; } -#line 9371 "parser.c" +#line 9412 "parser.c" break; case 822: /* disp_attr: SCROLL DOWN _opt_scroll_lines */ @@ -9376,37 +9417,37 @@ yyparse (void) dispattrs |= COB_SCREEN_SCROLL_DOWN; scroll = yyvsp[0]; } -#line 9380 "parser.c" +#line 9421 "parser.c" break; case 823: /* disp_attr: "BLANK-LINE" */ #line 4527 "parser.y" { dispattrs |= COB_SCREEN_BLANK_LINE; } -#line 9386 "parser.c" +#line 9427 "parser.c" break; case 824: /* disp_attr: "BLANK-SCREEN" */ #line 4528 "parser.y" { dispattrs |= COB_SCREEN_BLANK_SCREEN; } -#line 9392 "parser.c" +#line 9433 "parser.c" break; case 825: /* end_display: %empty */ #line 4532 "parser.y" { terminator_warning (TERM_DISPLAY); } -#line 9398 "parser.c" +#line 9439 "parser.c" break; case 826: /* end_display: "END-DISPLAY" */ #line 4533 "parser.y" { terminator_clear (TERM_DISPLAY); } -#line 9404 "parser.c" +#line 9445 "parser.c" break; case 827: /* $@49: %empty */ #line 4542 "parser.y" { BEGIN_STATEMENT ("DIVIDE", TERM_DIVIDE); } -#line 9410 "parser.c" +#line 9451 "parser.c" break; case 829: /* divide_body: x INTO arithmetic_x_list on_size_error */ @@ -9414,7 +9455,7 @@ yyparse (void) { cb_emit_arithmetic (yyvsp[-1], '/', yyvsp[-3]); } -#line 9418 "parser.c" +#line 9459 "parser.c" break; case 830: /* divide_body: x INTO x GIVING arithmetic_x_list on_size_error */ @@ -9422,7 +9463,7 @@ yyparse (void) { cb_emit_arithmetic (yyvsp[-1], 0, cb_build_binary_op (yyvsp[-3], '/', yyvsp[-5])); } -#line 9426 "parser.c" +#line 9467 "parser.c" break; case 831: /* divide_body: x BY x GIVING arithmetic_x_list on_size_error */ @@ -9430,7 +9471,7 @@ yyparse (void) { cb_emit_arithmetic (yyvsp[-1], 0, cb_build_binary_op (yyvsp[-5], '/', yyvsp[-3])); } -#line 9434 "parser.c" +#line 9475 "parser.c" break; case 832: /* divide_body: x INTO x GIVING arithmetic_x REMAINDER arithmetic_x on_size_error */ @@ -9438,7 +9479,7 @@ yyparse (void) { cb_emit_divide (yyvsp[-5], yyvsp[-7], yyvsp[-3], yyvsp[-1]); } -#line 9442 "parser.c" +#line 9483 "parser.c" break; case 833: /* divide_body: x BY x GIVING arithmetic_x REMAINDER arithmetic_x on_size_error */ @@ -9446,25 +9487,25 @@ yyparse (void) { cb_emit_divide (yyvsp[-7], yyvsp[-5], yyvsp[-3], yyvsp[-1]); } -#line 9450 "parser.c" +#line 9491 "parser.c" break; case 834: /* end_divide: %empty */ #line 4571 "parser.y" { terminator_warning (TERM_DIVIDE); } -#line 9456 "parser.c" +#line 9497 "parser.c" break; case 835: /* end_divide: "END-DIVIDE" */ #line 4572 "parser.y" { terminator_clear (TERM_DIVIDE); } -#line 9462 "parser.c" +#line 9503 "parser.c" break; case 836: /* $@50: %empty */ #line 4581 "parser.y" { BEGIN_STATEMENT ("ENTRY", 0); } -#line 9468 "parser.c" +#line 9509 "parser.c" break; case 837: /* entry_statement: ENTRY $@50 "Literal" call_using */ @@ -9480,7 +9521,7 @@ yyparse (void) } check_unreached = 0; } -#line 9484 "parser.c" +#line 9525 "parser.c" break; case 838: /* $@51: %empty */ @@ -9494,7 +9535,7 @@ yyparse (void) eval_inc = 0; eval_inc2 = 0; } -#line 9498 "parser.c" +#line 9539 "parser.c" break; case 839: /* evaluate_statement: EVALUATE $@51 evaluate_subject_list evaluate_condition_list end_evaluate */ @@ -9503,13 +9544,13 @@ yyparse (void) cb_emit_evaluate (yyvsp[-2], yyvsp[-1]); eval_level--; } -#line 9507 "parser.c" +#line 9548 "parser.c" break; case 840: /* evaluate_subject_list: evaluate_subject */ #line 4621 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 9513 "parser.c" +#line 9554 "parser.c" break; case 841: /* evaluate_subject_list: evaluate_subject_list _also evaluate_subject */ @@ -9520,7 +9561,7 @@ yyparse (void) } yyval = cb_list_add (yyvsp[-2], yyvsp[0]); } -#line 9524 "parser.c" +#line 9565 "parser.c" break; case 842: /* evaluate_subject: expr */ @@ -9533,7 +9574,7 @@ yyparse (void) eval_check[eval_level][eval_inc++] = 1; } } -#line 9537 "parser.c" +#line 9578 "parser.c" break; case 843: /* evaluate_subject: "TRUE" */ @@ -9542,7 +9583,7 @@ yyparse (void) yyval = cb_true; eval_check[eval_level][eval_inc++] = 2; } -#line 9546 "parser.c" +#line 9587 "parser.c" break; case 844: /* evaluate_subject: "FALSE" */ @@ -9551,7 +9592,7 @@ yyparse (void) yyval = cb_false; eval_check[eval_level][eval_inc++] = 3; } -#line 9555 "parser.c" +#line 9596 "parser.c" break; case 845: /* evaluate_condition_list: evaluate_case_list evaluate_other */ @@ -9581,19 +9622,19 @@ yyparse (void) yyval = cb_list_add (yyval, yyvsp[0]); } } -#line 9585 "parser.c" +#line 9626 "parser.c" break; case 846: /* evaluate_case_list: evaluate_case */ #line 4684 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 9591 "parser.c" +#line 9632 "parser.c" break; case 847: /* evaluate_case_list: evaluate_case_list evaluate_case */ #line 4686 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 9597 "parser.c" +#line 9638 "parser.c" break; case 848: /* $@52: %empty */ @@ -9601,7 +9642,7 @@ yyparse (void) { check_unreached = 0; } -#line 9605 "parser.c" +#line 9646 "parser.c" break; case 849: /* evaluate_case: evaluate_when_list $@52 statement_list */ @@ -9613,7 +9654,7 @@ yyparse (void) yyval = cb_cons (yyvsp[0], yyvsp[-2]); eval_inc2 = 0; } -#line 9617 "parser.c" +#line 9658 "parser.c" break; case 850: /* evaluate_other: %empty */ @@ -9621,7 +9662,7 @@ yyparse (void) { yyval = NULL; } -#line 9625 "parser.c" +#line 9666 "parser.c" break; case 851: /* $@53: %empty */ @@ -9629,7 +9670,7 @@ yyparse (void) { check_unreached = 0; } -#line 9633 "parser.c" +#line 9674 "parser.c" break; case 852: /* evaluate_other: "WHEN OTHER" $@53 statement_list */ @@ -9641,25 +9682,25 @@ yyparse (void) yyval = cb_cons (yyvsp[0], NULL); eval_inc2 = 0; } -#line 9645 "parser.c" +#line 9686 "parser.c" break; case 853: /* evaluate_when_list: WHEN evaluate_object_list */ #line 4724 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 9651 "parser.c" +#line 9692 "parser.c" break; case 854: /* evaluate_when_list: evaluate_when_list WHEN evaluate_object_list */ #line 4726 "parser.y" { yyval = cb_list_add (yyvsp[-2], yyvsp[0]); } -#line 9657 "parser.c" +#line 9698 "parser.c" break; case 855: /* evaluate_object_list: evaluate_object */ #line 4730 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 9663 "parser.c" +#line 9704 "parser.c" break; case 856: /* evaluate_object_list: evaluate_object_list _also evaluate_object */ @@ -9670,7 +9711,7 @@ yyparse (void) } yyval = cb_list_add (yyvsp[-2], yyvsp[0]); } -#line 9674 "parser.c" +#line 9715 "parser.c" break; case 857: /* evaluate_object: partial_expr opt_evaluate_thru_expr */ @@ -9703,61 +9744,61 @@ yyparse (void) eval_inc2++; } } -#line 9707 "parser.c" +#line 9748 "parser.c" break; case 858: /* evaluate_object: ANY */ #line 4771 "parser.y" { yyval = cb_any; eval_inc2++; } -#line 9713 "parser.c" +#line 9754 "parser.c" break; case 859: /* evaluate_object: "TRUE" */ #line 4772 "parser.y" { yyval = cb_true; eval_inc2++; } -#line 9719 "parser.c" +#line 9760 "parser.c" break; case 860: /* evaluate_object: "FALSE" */ #line 4773 "parser.y" { yyval = cb_false; eval_inc2++; } -#line 9725 "parser.c" +#line 9766 "parser.c" break; case 861: /* opt_evaluate_thru_expr: %empty */ #line 4776 "parser.y" { yyval = NULL; } -#line 9731 "parser.c" +#line 9772 "parser.c" break; case 862: /* opt_evaluate_thru_expr: THRU expr */ #line 4777 "parser.y" { yyval = yyvsp[0]; } -#line 9737 "parser.c" +#line 9778 "parser.c" break; case 863: /* end_evaluate: %empty */ #line 4781 "parser.y" { terminator_warning (TERM_EVALUATE); } -#line 9743 "parser.c" +#line 9784 "parser.c" break; case 864: /* end_evaluate: "END-EVALUATE" */ #line 4782 "parser.y" { terminator_clear (TERM_EVALUATE); } -#line 9749 "parser.c" +#line 9790 "parser.c" break; case 865: /* $@54: %empty */ #line 4791 "parser.y" { BEGIN_STATEMENT ("EXIT", 0); } -#line 9755 "parser.c" +#line 9796 "parser.c" break; case 867: /* exit_body: %empty */ #line 4796 "parser.y" { /* nothing */ } -#line 9761 "parser.c" +#line 9802 "parser.c" break; case 868: /* exit_body: PROGRAM */ @@ -9769,7 +9810,7 @@ yyparse (void) check_unreached = 1; cb_emit_exit (0); } -#line 9773 "parser.c" +#line 9814 "parser.c" break; case 869: /* exit_body: PERFORM */ @@ -9781,7 +9822,7 @@ yyparse (void) cb_emit_java_break (); } } -#line 9785 "parser.c" +#line 9826 "parser.c" break; case 870: /* exit_body: PERFORM CYCLE */ @@ -9793,7 +9834,7 @@ yyparse (void) cb_emit_java_continue (); } } -#line 9797 "parser.c" +#line 9838 "parser.c" break; case 871: /* exit_body: SECTION */ @@ -9815,7 +9856,7 @@ yyparse (void) cb_emit_goto (cb_list_init (current_section->exit_label_ref), NULL); } } -#line 9819 "parser.c" +#line 9860 "parser.c" break; case 872: /* exit_body: PARAGRAPH */ @@ -9837,13 +9878,13 @@ yyparse (void) cb_emit_goto (cb_list_init (current_paragraph->exit_label_ref), NULL); } } -#line 9841 "parser.c" +#line 9882 "parser.c" break; case 873: /* $@55: %empty */ #line 4864 "parser.y" { BEGIN_STATEMENT ("FREE", 0); } -#line 9847 "parser.c" +#line 9888 "parser.c" break; case 874: /* free_statement: FREE $@55 target_x_list */ @@ -9851,13 +9892,13 @@ yyparse (void) { cb_emit_free (yyvsp[0]); } -#line 9855 "parser.c" +#line 9896 "parser.c" break; case 875: /* $@56: %empty */ #line 4877 "parser.y" { BEGIN_STATEMENT ("GENERATE", 0); } -#line 9861 "parser.c" +#line 9902 "parser.c" break; case 876: /* generate_statement: GENERATE $@56 identifier */ @@ -9865,13 +9906,13 @@ yyparse (void) { PENDING("GENERATE"); } -#line 9869 "parser.c" +#line 9910 "parser.c" break; case 877: /* $@57: %empty */ #line 4890 "parser.y" { BEGIN_STATEMENT ("GO TO", 0); } -#line 9875 "parser.c" +#line 9916 "parser.c" break; case 878: /* goto_statement: GO _to $@57 procedure_name_list goto_depending */ @@ -9879,7 +9920,7 @@ yyparse (void) { cb_emit_goto (yyvsp[-1], yyvsp[0]); } -#line 9883 "parser.c" +#line 9924 "parser.c" break; case 879: /* goto_depending: %empty */ @@ -9888,7 +9929,7 @@ yyparse (void) check_unreached = 1; yyval = NULL; } -#line 9892 "parser.c" +#line 9933 "parser.c" break; case 880: /* goto_depending: DEPENDING _on identifier */ @@ -9897,13 +9938,13 @@ yyparse (void) check_unreached = 0; yyval = yyvsp[0]; } -#line 9901 "parser.c" +#line 9942 "parser.c" break; case 881: /* $@58: %empty */ #line 4916 "parser.y" { BEGIN_STATEMENT ("GOBACK", 0); } -#line 9907 "parser.c" +#line 9948 "parser.c" break; case 882: /* goback_statement: GOBACK $@58 */ @@ -9912,13 +9953,13 @@ yyparse (void) check_unreached = 1; cb_emit_exit (1); } -#line 9916 "parser.c" +#line 9957 "parser.c" break; case 883: /* $@59: %empty */ #line 4929 "parser.y" { BEGIN_STATEMENT ("IF", TERM_IF); } -#line 9922 "parser.c" +#line 9963 "parser.c" break; case 884: /* $@60: %empty */ @@ -9926,7 +9967,7 @@ yyparse (void) { check_unreached = 0; } -#line 9930 "parser.c" +#line 9971 "parser.c" break; case 885: /* if_statement: IF $@59 condition _then $@60 statement_list if_else_sentence end_if */ @@ -9937,7 +9978,7 @@ yyparse (void) } cb_emit_if (yyvsp[-5], yyvsp[-2], yyvsp[-1]); } -#line 9941 "parser.c" +#line 9982 "parser.c" break; case 887: /* if_else_sentence: %empty */ @@ -9945,7 +9986,7 @@ yyparse (void) { yyval = NULL; } -#line 9949 "parser.c" +#line 9990 "parser.c" break; case 888: /* $@61: %empty */ @@ -9953,7 +9994,7 @@ yyparse (void) { check_unreached = 0; } -#line 9957 "parser.c" +#line 9998 "parser.c" break; case 889: /* if_else_sentence: ELSE $@61 statement_list */ @@ -9964,25 +10005,25 @@ yyparse (void) } yyval = yyvsp[0]; } -#line 9968 "parser.c" +#line 10009 "parser.c" break; case 890: /* end_if: %empty */ #line 4964 "parser.y" { terminator_warning (TERM_IF); } -#line 9974 "parser.c" +#line 10015 "parser.c" break; case 891: /* end_if: "END-IF" */ #line 4965 "parser.y" { terminator_clear (TERM_IF); } -#line 9980 "parser.c" +#line 10021 "parser.c" break; case 892: /* $@62: %empty */ #line 4974 "parser.y" { BEGIN_STATEMENT ("INITIALIZE", 0); } -#line 9986 "parser.c" +#line 10027 "parser.c" break; case 893: /* initialize_statement: INITIALIZE $@62 target_x_list initialize_filler initialize_value initialize_replacing initialize_default */ @@ -9990,127 +10031,127 @@ yyparse (void) { cb_emit_initialize (yyvsp[-4], yyvsp[-3], yyvsp[-2], yyvsp[-1], yyvsp[0]); } -#line 9994 "parser.c" +#line 10035 "parser.c" break; case 894: /* initialize_filler: %empty */ #line 4982 "parser.y" { yyval = NULL; } -#line 10000 "parser.c" +#line 10041 "parser.c" break; case 895: /* initialize_filler: _with FILLER */ #line 4983 "parser.y" { yyval = cb_true; } -#line 10006 "parser.c" +#line 10047 "parser.c" break; case 896: /* initialize_value: %empty */ #line 4987 "parser.y" { yyval = NULL; } -#line 10012 "parser.c" +#line 10053 "parser.c" break; case 897: /* initialize_value: ALL _to VALUE */ #line 4988 "parser.y" { yyval = cb_true; } -#line 10018 "parser.c" +#line 10059 "parser.c" break; case 898: /* initialize_value: initialize_category _to VALUE */ #line 4989 "parser.y" { yyval = yyvsp[-2]; } -#line 10024 "parser.c" +#line 10065 "parser.c" break; case 899: /* initialize_replacing: %empty */ #line 4993 "parser.y" { yyval = NULL; } -#line 10030 "parser.c" +#line 10071 "parser.c" break; case 900: /* initialize_replacing: REPLACING initialize_replacing_list */ #line 4995 "parser.y" { yyval = yyvsp[0]; } -#line 10036 "parser.c" +#line 10077 "parser.c" break; case 901: /* initialize_replacing_list: initialize_replacing_item */ #line 4999 "parser.y" { yyval = yyvsp[0]; } -#line 10042 "parser.c" +#line 10083 "parser.c" break; case 902: /* initialize_replacing_list: initialize_replacing_list initialize_replacing_item */ #line 5001 "parser.y" { yyval = cb_list_append (yyvsp[-1], yyvsp[0]); } -#line 10048 "parser.c" +#line 10089 "parser.c" break; case 903: /* initialize_replacing_item: initialize_category _data BY x */ #line 5005 "parser.y" { yyval = cb_build_pair (yyvsp[-3], yyvsp[0]); } -#line 10054 "parser.c" +#line 10095 "parser.c" break; case 904: /* initialize_category: ALPHABETIC */ #line 5009 "parser.y" { yyval = cb_int (CB_CATEGORY_ALPHABETIC); } -#line 10060 "parser.c" +#line 10101 "parser.c" break; case 905: /* initialize_category: ALPHANUMERIC */ #line 5010 "parser.y" { yyval = cb_int (CB_CATEGORY_ALPHANUMERIC); } -#line 10066 "parser.c" +#line 10107 "parser.c" break; case 906: /* initialize_category: NUMERIC */ #line 5011 "parser.y" { yyval = cb_int (CB_CATEGORY_NUMERIC); } -#line 10072 "parser.c" +#line 10113 "parser.c" break; case 907: /* initialize_category: "ALPHANUMERIC-EDITED" */ #line 5012 "parser.y" { yyval = cb_int (CB_CATEGORY_ALPHANUMERIC_EDITED); } -#line 10078 "parser.c" +#line 10119 "parser.c" break; case 908: /* initialize_category: "NUMERIC-EDITED" */ #line 5013 "parser.y" { yyval = cb_int (CB_CATEGORY_NUMERIC_EDITED); } -#line 10084 "parser.c" +#line 10125 "parser.c" break; case 909: /* initialize_category: NATIONAL */ #line 5014 "parser.y" { yyval = cb_int (CB_CATEGORY_NATIONAL); } -#line 10090 "parser.c" +#line 10131 "parser.c" break; case 910: /* initialize_category: "NATIONAL-EDITED" */ #line 5015 "parser.y" { yyval = cb_int (CB_CATEGORY_NATIONAL_EDITED); } -#line 10096 "parser.c" +#line 10137 "parser.c" break; case 911: /* initialize_default: %empty */ #line 5019 "parser.y" { yyval = NULL; } -#line 10102 "parser.c" +#line 10143 "parser.c" break; case 912: /* initialize_default: DEFAULT */ #line 5020 "parser.y" { yyval = cb_true; } -#line 10108 "parser.c" +#line 10149 "parser.c" break; case 913: /* $@63: %empty */ #line 5029 "parser.y" { BEGIN_STATEMENT ("INITIATE", 0); } -#line 10114 "parser.c" +#line 10155 "parser.c" break; case 914: /* initiate_statement: INITIATE $@63 identifier_list */ @@ -10118,7 +10159,7 @@ yyparse (void) { PENDING("INITIATE"); } -#line 10122 "parser.c" +#line 10163 "parser.c" break; case 915: /* $@64: %empty */ @@ -10128,121 +10169,121 @@ yyparse (void) sending_id = 0; inspect_keyword = 0; } -#line 10132 "parser.c" +#line 10173 "parser.c" break; case 917: /* send_identifier: identifier */ #line 5051 "parser.y" { save_tree_1 = yyvsp[0]; sending_id = 0; } -#line 10138 "parser.c" +#line 10179 "parser.c" break; case 918: /* send_identifier: literal */ #line 5052 "parser.y" { save_tree_1 = yyvsp[0]; sending_id = 1; } -#line 10144 "parser.c" +#line 10185 "parser.c" break; case 919: /* send_identifier: function */ #line 5053 "parser.y" { save_tree_1 = yyvsp[0]; sending_id = 1; } -#line 10150 "parser.c" +#line 10191 "parser.c" break; case 922: /* inspect_item: inspect_tallying */ #line 5062 "parser.y" { cb_emit_inspect (save_tree_1, yyvsp[0], cb_int0, 0); } -#line 10156 "parser.c" +#line 10197 "parser.c" break; case 923: /* inspect_item: inspect_replacing */ #line 5063 "parser.y" { cb_emit_inspect (save_tree_1, yyvsp[0], cb_int1, 1); } -#line 10162 "parser.c" +#line 10203 "parser.c" break; case 924: /* inspect_item: inspect_converting */ #line 5064 "parser.y" { cb_emit_inspect (save_tree_1, yyvsp[0], cb_int0, 2); } -#line 10168 "parser.c" +#line 10209 "parser.c" break; case 925: /* $@65: %empty */ #line 5070 "parser.y" { cb_init_tarrying (); } -#line 10174 "parser.c" +#line 10215 "parser.c" break; case 926: /* inspect_tallying: TALLYING $@65 tallying_list */ #line 5071 "parser.y" { yyval = yyvsp[0]; } -#line 10180 "parser.c" +#line 10221 "parser.c" break; case 927: /* tallying_list: tallying_item */ #line 5075 "parser.y" { yyval = yyvsp[0]; } -#line 10186 "parser.c" +#line 10227 "parser.c" break; case 928: /* tallying_list: tallying_list tallying_item */ #line 5076 "parser.y" { yyval = cb_list_append (yyvsp[-1], yyvsp[0]); } -#line 10192 "parser.c" +#line 10233 "parser.c" break; case 929: /* tallying_item: simple_value FOR */ #line 5080 "parser.y" { yyval = cb_build_tarrying_data (yyvsp[-1]); } -#line 10198 "parser.c" +#line 10239 "parser.c" break; case 930: /* tallying_item: CHARACTERS inspect_region */ #line 5081 "parser.y" { yyval = cb_build_tarrying_characters (yyvsp[0]); } -#line 10204 "parser.c" +#line 10245 "parser.c" break; case 931: /* tallying_item: ALL */ #line 5082 "parser.y" { yyval = cb_build_tarrying_all (); } -#line 10210 "parser.c" +#line 10251 "parser.c" break; case 932: /* tallying_item: LEADING */ #line 5083 "parser.y" { yyval = cb_build_tarrying_leading (); } -#line 10216 "parser.c" +#line 10257 "parser.c" break; case 933: /* tallying_item: TRAILING */ #line 5084 "parser.y" { yyval = cb_build_tarrying_trailing (); } -#line 10222 "parser.c" +#line 10263 "parser.c" break; case 934: /* tallying_item: simple_value inspect_region */ #line 5085 "parser.y" { yyval = cb_build_tarrying_value (yyvsp[-1], yyvsp[0]); } -#line 10228 "parser.c" +#line 10269 "parser.c" break; case 935: /* inspect_replacing: REPLACING replacing_list */ #line 5091 "parser.y" { yyval = yyvsp[0]; inspect_keyword = 0; } -#line 10234 "parser.c" +#line 10275 "parser.c" break; case 936: /* replacing_list: replacing_item */ #line 5095 "parser.y" { yyval = yyvsp[0]; } -#line 10240 "parser.c" +#line 10281 "parser.c" break; case 937: /* replacing_list: replacing_list replacing_item */ #line 5096 "parser.y" { yyval = cb_list_append (yyvsp[-1], yyvsp[0]); } -#line 10246 "parser.c" +#line 10287 "parser.c" break; case 938: /* replacing_item: CHARACTERS BY simple_value inspect_region */ @@ -10251,43 +10292,43 @@ yyparse (void) yyval = cb_build_replacing_characters (yyvsp[-1], yyvsp[0], save_tree_1); inspect_keyword = 0; } -#line 10255 "parser.c" +#line 10296 "parser.c" break; case 939: /* replacing_item: rep_keyword replacing_region */ #line 5105 "parser.y" { yyval = yyvsp[0]; } -#line 10261 "parser.c" +#line 10302 "parser.c" break; case 940: /* rep_keyword: %empty */ #line 5109 "parser.y" { /* Nothing */ } -#line 10267 "parser.c" +#line 10308 "parser.c" break; case 941: /* rep_keyword: ALL */ #line 5110 "parser.y" { inspect_keyword = 1; } -#line 10273 "parser.c" +#line 10314 "parser.c" break; case 942: /* rep_keyword: LEADING */ #line 5111 "parser.y" { inspect_keyword = 2; } -#line 10279 "parser.c" +#line 10320 "parser.c" break; case 943: /* rep_keyword: FIRST */ #line 5112 "parser.y" { inspect_keyword = 3; } -#line 10285 "parser.c" +#line 10326 "parser.c" break; case 944: /* rep_keyword: TRAILING */ #line 5113 "parser.y" { inspect_keyword = 4; } -#line 10291 "parser.c" +#line 10332 "parser.c" break; case 945: /* replacing_region: simple_value BY simple_all_value inspect_region */ @@ -10312,7 +10353,7 @@ yyparse (void) break; } } -#line 10316 "parser.c" +#line 10357 "parser.c" break; case 946: /* inspect_converting: CONVERTING simple_value TO simple_all_value inspect_region */ @@ -10324,31 +10365,31 @@ yyparse (void) yyval = cb_build_converting (yyvsp[-3], yyvsp[-1], yyvsp[0]); } } -#line 10328 "parser.c" +#line 10369 "parser.c" break; case 947: /* inspect_region: %empty */ #line 5156 "parser.y" { yyval = cb_build_inspect_region_start (); } -#line 10334 "parser.c" +#line 10375 "parser.c" break; case 948: /* inspect_region: inspect_region before_or_after _initial x */ #line 5158 "parser.y" { yyval = cb_build_inspect_region (yyvsp[-3], yyvsp[-2], yyvsp[0]); } -#line 10340 "parser.c" +#line 10381 "parser.c" break; case 951: /* $@66: %empty */ #line 5169 "parser.y" { BEGIN_STATEMENT ("MERGE", 0); } -#line 10346 "parser.c" +#line 10387 "parser.c" break; case 953: /* $@67: %empty */ #line 5179 "parser.y" { BEGIN_STATEMENT ("MOVE", 0); } -#line 10352 "parser.c" +#line 10393 "parser.c" break; case 955: /* move_body: x TO target_x_list */ @@ -10356,7 +10397,7 @@ yyparse (void) { cb_emit_move (yyvsp[-2], yyvsp[0]); } -#line 10360 "parser.c" +#line 10401 "parser.c" break; case 956: /* move_body: CORRESPONDING x TO target_x_list */ @@ -10364,13 +10405,13 @@ yyparse (void) { cb_emit_move_corresponding (yyvsp[-2], yyvsp[0]); } -#line 10368 "parser.c" +#line 10409 "parser.c" break; case 957: /* $@68: %empty */ #line 5200 "parser.y" { BEGIN_STATEMENT ("MULTIPLY", TERM_MULTIPLY); } -#line 10374 "parser.c" +#line 10415 "parser.c" break; case 959: /* multiply_body: x BY arithmetic_x_list on_size_error */ @@ -10378,7 +10419,7 @@ yyparse (void) { cb_emit_arithmetic (yyvsp[-1], '*', yyvsp[-3]); } -#line 10382 "parser.c" +#line 10423 "parser.c" break; case 960: /* multiply_body: x BY x GIVING arithmetic_x_list on_size_error */ @@ -10386,25 +10427,25 @@ yyparse (void) { cb_emit_arithmetic (yyvsp[-1], 0, cb_build_binary_op (yyvsp[-5], '*', yyvsp[-3])); } -#line 10390 "parser.c" +#line 10431 "parser.c" break; case 961: /* end_multiply: %empty */ #line 5217 "parser.y" { terminator_warning (TERM_MULTIPLY); } -#line 10396 "parser.c" +#line 10437 "parser.c" break; case 962: /* end_multiply: "END-MULTIPLY" */ #line 5218 "parser.y" { terminator_clear (TERM_MULTIPLY); } -#line 10402 "parser.c" +#line 10443 "parser.c" break; case 963: /* $@69: %empty */ #line 5227 "parser.y" { BEGIN_STATEMENT ("OPEN", 0); } -#line 10408 "parser.c" +#line 10449 "parser.c" break; case 966: /* open_list: open_list open_mode open_sharing file_name_list open_option */ @@ -10418,67 +10459,67 @@ yyparse (void) } } } -#line 10422 "parser.c" +#line 10463 "parser.c" break; case 967: /* open_mode: INPUT */ #line 5246 "parser.y" { yyval = cb_int (COB_OPEN_INPUT); } -#line 10428 "parser.c" +#line 10469 "parser.c" break; case 968: /* open_mode: OUTPUT */ #line 5247 "parser.y" { yyval = cb_int (COB_OPEN_OUTPUT); } -#line 10434 "parser.c" +#line 10475 "parser.c" break; case 969: /* open_mode: "I-O" */ #line 5248 "parser.y" { yyval = cb_int (COB_OPEN_I_O); } -#line 10440 "parser.c" +#line 10481 "parser.c" break; case 970: /* open_mode: EXTEND */ #line 5249 "parser.y" { yyval = cb_int (COB_OPEN_EXTEND); } -#line 10446 "parser.c" +#line 10487 "parser.c" break; case 971: /* open_sharing: %empty */ #line 5253 "parser.y" { yyval = NULL; } -#line 10452 "parser.c" +#line 10493 "parser.c" break; case 972: /* open_sharing: SHARING _with sharing_option */ #line 5254 "parser.y" { yyval = yyvsp[0]; } -#line 10458 "parser.c" +#line 10499 "parser.c" break; case 973: /* open_option: %empty */ #line 5258 "parser.y" { yyval = NULL; } -#line 10464 "parser.c" +#line 10505 "parser.c" break; case 974: /* open_option: _with NO REWIND */ #line 5259 "parser.y" { yyval = NULL; } -#line 10470 "parser.c" +#line 10511 "parser.c" break; case 975: /* open_option: _with LOCK */ #line 5260 "parser.y" { PENDING ("OPEN ... WITH LOCK"); } -#line 10476 "parser.c" +#line 10517 "parser.c" break; case 976: /* $@70: %empty */ #line 5272 "parser.y" { BEGIN_STATEMENT ("PERFORM", TERM_PERFORM); } -#line 10482 "parser.c" +#line 10523 "parser.c" break; case 978: /* perform_body: perform_procedure perform_option */ @@ -10486,7 +10527,7 @@ yyparse (void) { cb_emit_perform (yyvsp[0], yyvsp[-1]); } -#line 10490 "parser.c" +#line 10531 "parser.c" break; case 979: /* $@71: %empty */ @@ -10495,7 +10536,7 @@ yyparse (void) perform_stack = cb_cons (yyvsp[0], perform_stack); check_unreached = 0; } -#line 10499 "parser.c" +#line 10540 "parser.c" break; case 980: /* perform_body: perform_option $@71 statement_list end_perform */ @@ -10504,7 +10545,7 @@ yyparse (void) perform_stack = CB_CHAIN (perform_stack); cb_emit_perform (yyvsp[-3], yyvsp[-1]); } -#line 10508 "parser.c" +#line 10549 "parser.c" break; case 981: /* perform_body: perform_option "END-PERFORM" */ @@ -10512,19 +10553,19 @@ yyparse (void) { cb_emit_perform (yyvsp[-1], NULL); } -#line 10516 "parser.c" +#line 10557 "parser.c" break; case 982: /* end_perform: %empty */ #line 5298 "parser.y" { terminator_error (); } -#line 10522 "parser.c" +#line 10563 "parser.c" break; case 983: /* end_perform: "END-PERFORM" */ #line 5299 "parser.y" { terminator_clear (TERM_PERFORM); } -#line 10528 "parser.c" +#line 10569 "parser.c" break; case 984: /* perform_procedure: procedure_name */ @@ -10533,7 +10574,7 @@ yyparse (void) CB_REFERENCE (yyvsp[0])->length = cb_true; /* return from $1 */ yyval = cb_build_pair (yyvsp[0], yyvsp[0]); } -#line 10537 "parser.c" +#line 10578 "parser.c" break; case 985: /* perform_procedure: procedure_name THRU procedure_name */ @@ -10542,7 +10583,7 @@ yyparse (void) CB_REFERENCE (yyvsp[0])->length = cb_true; /* return from $3 */ yyval = cb_build_pair (yyvsp[-2], yyvsp[0]); } -#line 10546 "parser.c" +#line 10587 "parser.c" break; case 986: /* perform_option: %empty */ @@ -10550,7 +10591,7 @@ yyparse (void) { yyval = cb_build_perform_once (NULL); } -#line 10554 "parser.c" +#line 10595 "parser.c" break; case 987: /* perform_option: FOREVER */ @@ -10558,7 +10599,7 @@ yyparse (void) { yyval = cb_build_perform_forever (NULL); } -#line 10562 "parser.c" +#line 10603 "parser.c" break; case 988: /* perform_option: id_or_lit_or_func TIMES */ @@ -10567,7 +10608,7 @@ yyparse (void) yyval = cb_build_perform_times (yyvsp[-1]); current_program->loop_counter++; } -#line 10571 "parser.c" +#line 10612 "parser.c" break; case 989: /* perform_option: perform_test UNTIL condition */ @@ -10578,7 +10619,7 @@ yyparse (void) varying = cb_list_init (cb_build_perform_varying (NULL, NULL, NULL, yyvsp[0])); yyval = cb_build_perform_until (yyvsp[-2], varying); } -#line 10582 "parser.c" +#line 10623 "parser.c" break; case 990: /* perform_option: perform_test VARYING perform_varying_list */ @@ -10586,31 +10627,31 @@ yyparse (void) { yyval = cb_build_perform_until (yyvsp[-2], yyvsp[0]); } -#line 10590 "parser.c" +#line 10631 "parser.c" break; case 991: /* perform_test: %empty */ #line 5343 "parser.y" { yyval = CB_BEFORE; } -#line 10596 "parser.c" +#line 10637 "parser.c" break; case 992: /* perform_test: _with TEST before_or_after */ #line 5344 "parser.y" { yyval = yyvsp[0]; } -#line 10602 "parser.c" +#line 10643 "parser.c" break; case 993: /* perform_varying_list: perform_varying */ #line 5348 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 10608 "parser.c" +#line 10649 "parser.c" break; case 994: /* perform_varying_list: perform_varying_list AFTER perform_varying */ #line 5350 "parser.y" { yyval = cb_list_add (yyvsp[-2], yyvsp[0]); } -#line 10614 "parser.c" +#line 10655 "parser.c" break; case 995: /* perform_varying: identifier FROM x BY x UNTIL condition */ @@ -10618,13 +10659,13 @@ yyparse (void) { yyval = cb_build_perform_varying (yyvsp[-6], yyvsp[-4], yyvsp[-2], yyvsp[0]); } -#line 10622 "parser.c" +#line 10663 "parser.c" break; case 996: /* $@72: %empty */ #line 5366 "parser.y" { BEGIN_STATEMENT ("READ", TERM_READ); } -#line 10628 "parser.c" +#line 10669 "parser.c" break; case 997: /* read_statement: READ $@72 file_name flag_next _record read_into with_lock read_key read_handler end_read */ @@ -10652,25 +10693,25 @@ yyparse (void) } } } -#line 10656 "parser.c" +#line 10697 "parser.c" break; case 998: /* read_into: %empty */ #line 5395 "parser.y" { yyval = NULL; } -#line 10662 "parser.c" +#line 10703 "parser.c" break; case 999: /* read_into: INTO identifier */ #line 5396 "parser.y" { yyval = yyvsp[0]; } -#line 10668 "parser.c" +#line 10709 "parser.c" break; case 1000: /* with_lock: %empty */ #line 5400 "parser.y" { yyval = NULL; } -#line 10674 "parser.c" +#line 10715 "parser.c" break; case 1001: /* with_lock: IGNORING LOCK */ @@ -10678,7 +10719,7 @@ yyparse (void) { yyval = cb_int3; } -#line 10682 "parser.c" +#line 10723 "parser.c" break; case 1002: /* with_lock: _with LOCK */ @@ -10686,7 +10727,7 @@ yyparse (void) { yyval = cb_int1; } -#line 10690 "parser.c" +#line 10731 "parser.c" break; case 1003: /* with_lock: _with NO LOCK */ @@ -10694,7 +10735,7 @@ yyparse (void) { yyval = cb_int2; } -#line 10698 "parser.c" +#line 10739 "parser.c" break; case 1004: /* with_lock: _with IGNORE LOCK */ @@ -10702,7 +10743,7 @@ yyparse (void) { yyval = cb_int3; } -#line 10706 "parser.c" +#line 10747 "parser.c" break; case 1005: /* with_lock: _with WAIT */ @@ -10710,13 +10751,13 @@ yyparse (void) { yyval = cb_int4; } -#line 10714 "parser.c" +#line 10755 "parser.c" break; case 1006: /* read_key: %empty */ #line 5424 "parser.y" { yyval = NULL; } -#line 10720 "parser.c" +#line 10761 "parser.c" break; case 1007: /* read_key: KEY _is identifier_list */ @@ -10724,25 +10765,25 @@ yyparse (void) { yyval = yyvsp[0]; } -#line 10728 "parser.c" +#line 10769 "parser.c" break; case 1011: /* end_read: %empty */ #line 5437 "parser.y" { terminator_warning (TERM_READ); } -#line 10734 "parser.c" +#line 10775 "parser.c" break; case 1012: /* end_read: "END-READ" */ #line 5438 "parser.y" { terminator_clear (TERM_READ); } -#line 10740 "parser.c" +#line 10781 "parser.c" break; case 1013: /* $@73: %empty */ #line 5447 "parser.y" { BEGIN_STATEMENT ("RELEASE", 0); } -#line 10746 "parser.c" +#line 10787 "parser.c" break; case 1014: /* release_statement: RELEASE $@73 record_name write_from */ @@ -10752,13 +10793,13 @@ yyparse (void) cb_emit_release (yyvsp[-1], yyvsp[0]); } } -#line 10756 "parser.c" +#line 10797 "parser.c" break; case 1015: /* $@74: %empty */ #line 5462 "parser.y" { BEGIN_STATEMENT ("RETURN", TERM_RETURN); } -#line 10762 "parser.c" +#line 10803 "parser.c" break; case 1016: /* return_statement: RETURN $@74 file_name _record read_into at_end end_return */ @@ -10768,25 +10809,25 @@ yyparse (void) cb_emit_return (yyvsp[-4], yyvsp[-2]); } } -#line 10772 "parser.c" +#line 10813 "parser.c" break; case 1017: /* end_return: %empty */ #line 5473 "parser.y" { terminator_warning (TERM_RETURN); } -#line 10778 "parser.c" +#line 10819 "parser.c" break; case 1018: /* end_return: "END-RETURN" */ #line 5474 "parser.y" { terminator_clear (TERM_RETURN); } -#line 10784 "parser.c" +#line 10825 "parser.c" break; case 1019: /* $@75: %empty */ #line 5483 "parser.y" { BEGIN_STATEMENT ("REWRITE", TERM_REWRITE); } -#line 10790 "parser.c" +#line 10831 "parser.c" break; case 1020: /* rewrite_statement: REWRITE $@75 record_name write_from write_lock opt_invalid_key end_rewrite */ @@ -10802,13 +10843,13 @@ yyparse (void) cb_emit_rewrite (yyvsp[-4], yyvsp[-3], yyvsp[-2]); } } -#line 10806 "parser.c" +#line 10847 "parser.c" break; case 1021: /* write_lock: %empty */ #line 5500 "parser.y" { yyval = NULL; } -#line 10812 "parser.c" +#line 10853 "parser.c" break; case 1022: /* write_lock: _with LOCK */ @@ -10816,7 +10857,7 @@ yyparse (void) { yyval = cb_int1; } -#line 10820 "parser.c" +#line 10861 "parser.c" break; case 1023: /* write_lock: _with NO LOCK */ @@ -10824,19 +10865,19 @@ yyparse (void) { yyval = cb_int2; } -#line 10828 "parser.c" +#line 10869 "parser.c" break; case 1024: /* end_rewrite: %empty */ #line 5512 "parser.y" { terminator_warning (TERM_REWRITE); } -#line 10834 "parser.c" +#line 10875 "parser.c" break; case 1025: /* end_rewrite: "END-REWRITE" */ #line 5513 "parser.y" { terminator_clear (TERM_REWRITE); } -#line 10840 "parser.c" +#line 10881 "parser.c" break; case 1026: /* rollback_statement: ROLLBACK */ @@ -10845,13 +10886,13 @@ yyparse (void) BEGIN_STATEMENT ("ROLLBACK", 0); cb_emit_rollback (); } -#line 10849 "parser.c" +#line 10890 "parser.c" break; case 1027: /* $@76: %empty */ #line 5535 "parser.y" { BEGIN_STATEMENT ("SEARCH", TERM_SEARCH); } -#line 10855 "parser.c" +#line 10896 "parser.c" break; case 1029: /* search_body: table_name search_varying search_at_end search_whens */ @@ -10859,7 +10900,7 @@ yyparse (void) { cb_emit_search (yyvsp[-3], yyvsp[-2], yyvsp[-1], yyvsp[0]); } -#line 10863 "parser.c" +#line 10904 "parser.c" break; case 1030: /* $@77: %empty */ @@ -10867,7 +10908,7 @@ yyparse (void) { check_unreached = 0; } -#line 10871 "parser.c" +#line 10912 "parser.c" break; case 1031: /* search_body: ALL table_name search_at_end WHEN expr $@77 statement_list */ @@ -10875,25 +10916,25 @@ yyparse (void) { cb_emit_search_all (yyvsp[-5], yyvsp[-4], yyvsp[-2], yyvsp[0]); } -#line 10879 "parser.c" +#line 10920 "parser.c" break; case 1032: /* search_varying: %empty */ #line 5556 "parser.y" { yyval = NULL; } -#line 10885 "parser.c" +#line 10926 "parser.c" break; case 1033: /* search_varying: VARYING identifier */ #line 5557 "parser.y" { yyval = yyvsp[0]; } -#line 10891 "parser.c" +#line 10932 "parser.c" break; case 1034: /* search_at_end: %empty */ #line 5561 "parser.y" { yyval = NULL; } -#line 10897 "parser.c" +#line 10938 "parser.c" break; case 1035: /* $@78: %empty */ @@ -10901,7 +10942,7 @@ yyparse (void) { check_unreached = 0; } -#line 10905 "parser.c" +#line 10946 "parser.c" break; case 1036: /* search_at_end: _at END $@78 statement_list */ @@ -10909,19 +10950,19 @@ yyparse (void) { yyval = yyvsp[0]; } -#line 10913 "parser.c" +#line 10954 "parser.c" break; case 1037: /* search_whens: search_when */ #line 5573 "parser.y" { yyval = yyvsp[0]; } -#line 10919 "parser.c" +#line 10960 "parser.c" break; case 1038: /* search_whens: search_when search_whens */ #line 5574 "parser.y" { yyval = yyvsp[-1]; CB_IF (yyvsp[-1])->stmt2 = yyvsp[0]; } -#line 10925 "parser.c" +#line 10966 "parser.c" break; case 1039: /* $@79: %empty */ @@ -10929,7 +10970,7 @@ yyparse (void) { check_unreached = 0; } -#line 10933 "parser.c" +#line 10974 "parser.c" break; case 1040: /* search_when: WHEN condition $@79 statement_list */ @@ -10937,25 +10978,25 @@ yyparse (void) { yyval = cb_build_if (yyvsp[-2], yyvsp[0], NULL); } -#line 10941 "parser.c" +#line 10982 "parser.c" break; case 1041: /* end_search: %empty */ #line 5589 "parser.y" { terminator_warning (TERM_SEARCH); } -#line 10947 "parser.c" +#line 10988 "parser.c" break; case 1042: /* end_search: "END-SEARCH" */ #line 5590 "parser.y" { terminator_clear (TERM_SEARCH); } -#line 10953 "parser.c" +#line 10994 "parser.c" break; case 1043: /* $@80: %empty */ #line 5599 "parser.y" { BEGIN_STATEMENT ("SET", 0); } -#line 10959 "parser.c" +#line 11000 "parser.c" break; case 1050: /* set_environment: ENVIRONMENT simple_value TO simple_value */ @@ -10963,7 +11004,7 @@ yyparse (void) { cb_emit_setenv (yyvsp[-2], yyvsp[0]); } -#line 10967 "parser.c" +#line 11008 "parser.c" break; case 1051: /* set_to: target_x_list TO ENTRY alnum_or_id */ @@ -10971,7 +11012,7 @@ yyparse (void) { cb_emit_set_to (yyvsp[-3], cb_build_ppointer (yyvsp[0])); } -#line 10975 "parser.c" +#line 11016 "parser.c" break; case 1052: /* set_to: target_x_list TO x */ @@ -10979,7 +11020,7 @@ yyparse (void) { cb_emit_set_to (yyvsp[-2], yyvsp[0]); } -#line 10983 "parser.c" +#line 11024 "parser.c" break; case 1053: /* set_up_down: target_x_list up_or_down BY x */ @@ -10987,19 +11028,19 @@ yyparse (void) { cb_emit_set_up_down (yyvsp[-3], yyvsp[-2], yyvsp[0]); } -#line 10991 "parser.c" +#line 11032 "parser.c" break; case 1054: /* up_or_down: UP */ #line 5643 "parser.y" { yyval = cb_int0; } -#line 10997 "parser.c" +#line 11038 "parser.c" break; case 1055: /* up_or_down: DOWN */ #line 5644 "parser.y" { yyval = cb_int1; } -#line 11003 "parser.c" +#line 11044 "parser.c" break; case 1058: /* set_to_on_off: mnemonic_name_list TO on_or_off */ @@ -11007,7 +11048,7 @@ yyparse (void) { cb_emit_set_on_off (yyvsp[-2], yyvsp[0]); } -#line 11011 "parser.c" +#line 11052 "parser.c" break; case 1061: /* set_to_true_false: target_x_list TO "TRUE" */ @@ -11015,7 +11056,7 @@ yyparse (void) { cb_emit_set_true (yyvsp[-2]); } -#line 11019 "parser.c" +#line 11060 "parser.c" break; case 1062: /* set_to_true_false: target_x_list TO "FALSE" */ @@ -11023,13 +11064,13 @@ yyparse (void) { cb_emit_set_false (yyvsp[-2]); } -#line 11027 "parser.c" +#line 11068 "parser.c" break; case 1063: /* $@81: %empty */ #line 5685 "parser.y" { BEGIN_STATEMENT ("SORT", 0); } -#line 11033 "parser.c" +#line 11074 "parser.c" break; case 1065: /* $@82: %empty */ @@ -11042,7 +11083,7 @@ yyparse (void) /* used in sort_input/sort_output */ save_tree_1 = yyvsp[-3]; } -#line 11046 "parser.c" +#line 11087 "parser.c" break; case 1066: /* sort_body: qualified_word sort_key_list sort_duplicates sort_collating $@82 sort_input sort_output */ @@ -11050,7 +11091,7 @@ yyparse (void) { cb_emit_sort_finish (yyvsp[-6]); } -#line 11054 "parser.c" +#line 11095 "parser.c" break; case 1067: /* sort_key_list: %empty */ @@ -11058,7 +11099,7 @@ yyparse (void) { yyval = NULL; } -#line 11062 "parser.c" +#line 11103 "parser.c" break; case 1068: /* sort_key_list: sort_key_list _on ascending_or_descending _key _is opt_key_list */ @@ -11079,37 +11120,37 @@ yyparse (void) yyval = cb_list_append (yyvsp[-5], yyvsp[0]); } } -#line 11083 "parser.c" +#line 11124 "parser.c" break; case 1069: /* opt_key_list: %empty */ #line 5731 "parser.y" { yyval = NULL; } -#line 11089 "parser.c" +#line 11130 "parser.c" break; case 1070: /* opt_key_list: opt_key_list qualified_word */ #line 5732 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 11095 "parser.c" +#line 11136 "parser.c" break; case 1072: /* sort_duplicates: with_dups _in_order */ #line 5736 "parser.y" { /* nothing */ } -#line 11101 "parser.c" +#line 11142 "parser.c" break; case 1073: /* sort_collating: %empty */ #line 5740 "parser.y" { yyval = cb_null; } -#line 11107 "parser.c" +#line 11148 "parser.c" break; case 1074: /* sort_collating: coll_sequence _is reference */ #line 5741 "parser.y" { yyval = cb_ref (yyvsp[0]); } -#line 11113 "parser.c" +#line 11154 "parser.c" break; case 1075: /* sort_input: %empty */ @@ -11119,7 +11160,7 @@ yyparse (void) cb_error (_("File sort requires USING or INPUT PROCEDURE")); } } -#line 11123 "parser.c" +#line 11164 "parser.c" break; case 1076: /* sort_input: USING file_name_list */ @@ -11131,7 +11172,7 @@ yyparse (void) cb_emit_sort_using (save_tree_1, yyvsp[0]); } } -#line 11135 "parser.c" +#line 11176 "parser.c" break; case 1077: /* sort_input: INPUT PROCEDURE _is perform_procedure */ @@ -11143,7 +11184,7 @@ yyparse (void) cb_emit_sort_input (yyvsp[0], save_tree_1); } } -#line 11147 "parser.c" +#line 11188 "parser.c" break; case 1078: /* sort_output: %empty */ @@ -11153,7 +11194,7 @@ yyparse (void) cb_error (_("File sort requires GIVING or OUTPUT PROCEDURE")); } } -#line 11157 "parser.c" +#line 11198 "parser.c" break; case 1079: /* sort_output: GIVING file_name_list */ @@ -11165,7 +11206,7 @@ yyparse (void) cb_emit_sort_giving (save_tree_1, yyvsp[0]); } } -#line 11169 "parser.c" +#line 11210 "parser.c" break; case 1080: /* sort_output: OUTPUT PROCEDURE _is perform_procedure */ @@ -11177,19 +11218,19 @@ yyparse (void) cb_emit_sort_output (yyvsp[0], save_tree_1); } } -#line 11181 "parser.c" +#line 11222 "parser.c" break; case 1081: /* $@83: %empty */ #line 5800 "parser.y" { BEGIN_STATEMENT ("START", TERM_START); } -#line 11187 "parser.c" +#line 11228 "parser.c" break; case 1082: /* @84: %empty */ #line 5801 "parser.y" { yyval = cb_int (COB_EQ); } -#line 11193 "parser.c" +#line 11234 "parser.c" break; case 1083: /* start_statement: START $@83 file_name @84 start_key opt_invalid_key end_start */ @@ -11208,13 +11249,13 @@ yyparse (void) yyval = cb_error_node; } } -#line 11212 "parser.c" +#line 11253 "parser.c" break; case 1084: /* start_key: %empty */ #line 5821 "parser.y" { yyval = NULL; } -#line 11218 "parser.c" +#line 11259 "parser.c" break; case 1085: /* start_key: KEY _is start_op identifier_list */ @@ -11223,55 +11264,55 @@ yyparse (void) yyvsp[-4] = yyvsp[-1]; yyval = yyvsp[0]; } -#line 11227 "parser.c" +#line 11268 "parser.c" break; case 1086: /* start_op: flag_not eq */ #line 5830 "parser.y" { yyval = cb_int ((yyvsp[-1] == cb_int1) ? COB_NE : COB_EQ); } -#line 11233 "parser.c" +#line 11274 "parser.c" break; case 1087: /* start_op: flag_not gt */ #line 5831 "parser.y" { yyval = cb_int ((yyvsp[-1] == cb_int1) ? COB_LE : COB_GT); } -#line 11239 "parser.c" +#line 11280 "parser.c" break; case 1088: /* start_op: flag_not lt */ #line 5832 "parser.y" { yyval = cb_int ((yyvsp[-1] == cb_int1) ? COB_GE : COB_LT); } -#line 11245 "parser.c" +#line 11286 "parser.c" break; case 1089: /* start_op: flag_not ge */ #line 5833 "parser.y" { yyval = cb_int ((yyvsp[-1] == cb_int1) ? COB_LT : COB_GE); } -#line 11251 "parser.c" +#line 11292 "parser.c" break; case 1090: /* start_op: flag_not le */ #line 5834 "parser.y" { yyval = cb_int ((yyvsp[-1] == cb_int1) ? COB_GT : COB_LE); } -#line 11257 "parser.c" +#line 11298 "parser.c" break; case 1091: /* end_start: %empty */ #line 5838 "parser.y" { terminator_warning (TERM_START); } -#line 11263 "parser.c" +#line 11304 "parser.c" break; case 1092: /* end_start: "END-START" */ #line 5839 "parser.y" { terminator_clear (TERM_START); } -#line 11269 "parser.c" +#line 11310 "parser.c" break; case 1093: /* $@85: %empty */ #line 5848 "parser.y" { BEGIN_STATEMENT ("STOP", 0); } -#line 11275 "parser.c" +#line 11316 "parser.c" break; case 1094: /* stop_statement: STOP RUN $@85 stop_returning */ @@ -11279,13 +11320,13 @@ yyparse (void) { cb_emit_stop_run (yyvsp[0]); } -#line 11283 "parser.c" +#line 11324 "parser.c" break; case 1095: /* $@86: %empty */ #line 5853 "parser.y" { BEGIN_STATEMENT ("STOP", 0); } -#line 11289 "parser.c" +#line 11330 "parser.c" break; case 1096: /* stop_statement: STOP "Literal" $@86 */ @@ -11293,31 +11334,31 @@ yyparse (void) { cb_verify (cb_stop_literal_statement, "STOP literal"); } -#line 11297 "parser.c" +#line 11338 "parser.c" break; case 1097: /* stop_returning: %empty */ #line 5860 "parser.y" { yyval = current_program->cb_return_code; } -#line 11303 "parser.c" +#line 11344 "parser.c" break; case 1098: /* stop_returning: RETURNING x */ #line 5861 "parser.y" { yyval = yyvsp[0]; } -#line 11309 "parser.c" +#line 11350 "parser.c" break; case 1099: /* stop_returning: GIVING x */ #line 5862 "parser.y" { yyval = yyvsp[0]; } -#line 11315 "parser.c" +#line 11356 "parser.c" break; case 1100: /* $@87: %empty */ #line 5871 "parser.y" { BEGIN_STATEMENT ("STRING", TERM_STRING); } -#line 11321 "parser.c" +#line 11362 "parser.c" break; case 1101: /* string_statement: STRING $@87 string_item_list INTO identifier opt_with_pointer on_overflow end_string */ @@ -11325,67 +11366,67 @@ yyparse (void) { cb_emit_string (yyvsp[-5], yyvsp[-3], yyvsp[-2]); } -#line 11329 "parser.c" +#line 11370 "parser.c" break; case 1102: /* string_item_list: string_item */ #line 5880 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 11335 "parser.c" +#line 11376 "parser.c" break; case 1103: /* string_item_list: string_item_list string_item */ #line 5881 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 11341 "parser.c" +#line 11382 "parser.c" break; case 1104: /* string_item: x */ #line 5885 "parser.y" { yyval = yyvsp[0]; } -#line 11347 "parser.c" +#line 11388 "parser.c" break; case 1105: /* string_item: DELIMITED _by SIZE */ #line 5886 "parser.y" { yyval = cb_build_pair (cb_int0, NULL); } -#line 11353 "parser.c" +#line 11394 "parser.c" break; case 1106: /* string_item: DELIMITED _by x */ #line 5887 "parser.y" { yyval = cb_build_pair (yyvsp[0], NULL); } -#line 11359 "parser.c" +#line 11400 "parser.c" break; case 1107: /* opt_with_pointer: %empty */ #line 5891 "parser.y" { yyval = cb_int0; } -#line 11365 "parser.c" +#line 11406 "parser.c" break; case 1108: /* opt_with_pointer: _with POINTER identifier */ #line 5892 "parser.y" { yyval = yyvsp[0]; } -#line 11371 "parser.c" +#line 11412 "parser.c" break; case 1109: /* end_string: %empty */ #line 5896 "parser.y" { terminator_warning (TERM_STRING); } -#line 11377 "parser.c" +#line 11418 "parser.c" break; case 1110: /* end_string: "END-STRING" */ #line 5897 "parser.y" { terminator_clear (TERM_STRING); } -#line 11383 "parser.c" +#line 11424 "parser.c" break; case 1111: /* $@88: %empty */ #line 5906 "parser.y" { BEGIN_STATEMENT ("SUBTRACT", TERM_SUBTRACT); } -#line 11389 "parser.c" +#line 11430 "parser.c" break; case 1113: /* subtract_body: x_list FROM arithmetic_x_list on_size_error */ @@ -11393,7 +11434,7 @@ yyparse (void) { cb_emit_arithmetic (yyvsp[-1], '-', cb_build_binary_list (yyvsp[-3], '+')); } -#line 11397 "parser.c" +#line 11438 "parser.c" break; case 1114: /* subtract_body: x_list FROM x GIVING arithmetic_x_list on_size_error */ @@ -11401,7 +11442,7 @@ yyparse (void) { cb_emit_arithmetic (yyvsp[-1], 0, cb_build_binary_list (cb_cons (yyvsp[-3], yyvsp[-5]), '-')); } -#line 11405 "parser.c" +#line 11446 "parser.c" break; case 1115: /* subtract_body: CORRESPONDING identifier FROM identifier flag_rounded on_size_error */ @@ -11409,19 +11450,19 @@ yyparse (void) { cb_emit_corresponding (cb_build_sub, yyvsp[-2], yyvsp[-4], yyvsp[-1]); } -#line 11413 "parser.c" +#line 11454 "parser.c" break; case 1116: /* end_subtract: %empty */ #line 5927 "parser.y" { terminator_warning (TERM_SUBTRACT); } -#line 11419 "parser.c" +#line 11460 "parser.c" break; case 1117: /* end_subtract: "END-SUBTRACT" */ #line 5928 "parser.y" { terminator_clear (TERM_SUBTRACT); } -#line 11425 "parser.c" +#line 11466 "parser.c" break; case 1118: /* suppress_statement: SUPPRESS _printing */ @@ -11430,13 +11471,13 @@ yyparse (void) BEGIN_STATEMENT ("SUPPRESS", 0); PENDING("SUPPRESS"); } -#line 11434 "parser.c" +#line 11475 "parser.c" break; case 1121: /* $@89: %empty */ #line 5953 "parser.y" { BEGIN_STATEMENT ("TERMINATE", 0); } -#line 11440 "parser.c" +#line 11481 "parser.c" break; case 1122: /* terminate_statement: TERMINATE $@89 identifier_list */ @@ -11444,13 +11485,13 @@ yyparse (void) { PENDING("TERMINATE"); } -#line 11448 "parser.c" +#line 11489 "parser.c" break; case 1123: /* $@90: %empty */ #line 5966 "parser.y" { BEGIN_STATEMENT ("TRANSFORM", 0); } -#line 11454 "parser.c" +#line 11495 "parser.c" break; case 1124: /* transform_statement: TRANSFORM $@90 identifier FROM simple_value TO simple_all_value */ @@ -11461,13 +11502,13 @@ yyparse (void) x = cb_build_converting (yyvsp[-2], yyvsp[0], cb_build_inspect_region_start ()); cb_emit_inspect (yyvsp[-4], x, cb_int0, 2); } -#line 11465 "parser.c" +#line 11506 "parser.c" break; case 1125: /* $@91: %empty */ #line 5982 "parser.y" { BEGIN_STATEMENT ("UNLOCK", 0); } -#line 11471 "parser.c" +#line 11512 "parser.c" break; case 1126: /* unlock_statement: UNLOCK $@91 file_name opt_record */ @@ -11477,13 +11518,13 @@ yyparse (void) cb_emit_unlock (yyvsp[-1]); } } -#line 11481 "parser.c" +#line 11522 "parser.c" break; case 1130: /* $@92: %empty */ #line 6003 "parser.y" { BEGIN_STATEMENT ("UNSTRING", TERM_UNSTRING); } -#line 11487 "parser.c" +#line 11528 "parser.c" break; case 1131: /* unstring_statement: UNSTRING $@92 identifier unstring_delimited unstring_into opt_with_pointer unstring_tallying on_overflow end_unstring */ @@ -11491,31 +11532,31 @@ yyparse (void) { cb_emit_unstring (yyvsp[-6], yyvsp[-5], yyvsp[-4], yyvsp[-3], yyvsp[-2]); } -#line 11495 "parser.c" +#line 11536 "parser.c" break; case 1132: /* unstring_delimited: %empty */ #line 6013 "parser.y" { yyval = NULL; } -#line 11501 "parser.c" +#line 11542 "parser.c" break; case 1133: /* unstring_delimited: DELIMITED _by unstring_delimited_list */ #line 6015 "parser.y" { yyval = yyvsp[0]; } -#line 11507 "parser.c" +#line 11548 "parser.c" break; case 1134: /* unstring_delimited_list: unstring_delimited_item */ #line 6019 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 11513 "parser.c" +#line 11554 "parser.c" break; case 1135: /* unstring_delimited_list: unstring_delimited_list OR unstring_delimited_item */ #line 6021 "parser.y" { yyval = cb_list_add (yyvsp[-2], yyvsp[0]); } -#line 11519 "parser.c" +#line 11560 "parser.c" break; case 1136: /* unstring_delimited_item: flag_all simple_value */ @@ -11523,19 +11564,19 @@ yyparse (void) { yyval = cb_build_unstring_delimited (yyvsp[-1], yyvsp[0]); } -#line 11527 "parser.c" +#line 11568 "parser.c" break; case 1137: /* unstring_into: INTO unstring_into_item */ #line 6032 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 11533 "parser.c" +#line 11574 "parser.c" break; case 1138: /* unstring_into: unstring_into unstring_into_item */ #line 6034 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 11539 "parser.c" +#line 11580 "parser.c" break; case 1139: /* unstring_into_item: identifier unstring_into_delimiter unstring_into_count */ @@ -11543,55 +11584,55 @@ yyparse (void) { yyval = cb_build_unstring_into (yyvsp[-2], yyvsp[-1], yyvsp[0]); } -#line 11547 "parser.c" +#line 11588 "parser.c" break; case 1140: /* unstring_into_delimiter: %empty */ #line 6045 "parser.y" { yyval = NULL; } -#line 11553 "parser.c" +#line 11594 "parser.c" break; case 1141: /* unstring_into_delimiter: DELIMITER _in identifier */ #line 6046 "parser.y" { yyval = yyvsp[0]; } -#line 11559 "parser.c" +#line 11600 "parser.c" break; case 1142: /* unstring_into_count: %empty */ #line 6050 "parser.y" { yyval = NULL; } -#line 11565 "parser.c" +#line 11606 "parser.c" break; case 1143: /* unstring_into_count: COUNT _in identifier */ #line 6051 "parser.y" { yyval = yyvsp[0]; } -#line 11571 "parser.c" +#line 11612 "parser.c" break; case 1144: /* unstring_tallying: %empty */ #line 6055 "parser.y" { yyval = NULL; } -#line 11577 "parser.c" +#line 11618 "parser.c" break; case 1145: /* unstring_tallying: TALLYING _in identifier */ #line 6056 "parser.y" { yyval = yyvsp[0]; } -#line 11583 "parser.c" +#line 11624 "parser.c" break; case 1146: /* end_unstring: %empty */ #line 6060 "parser.y" { terminator_warning (TERM_UNSTRING); } -#line 11589 "parser.c" +#line 11630 "parser.c" break; case 1147: /* end_unstring: "END-UNSTRING" */ #line 6061 "parser.y" { terminator_clear (TERM_UNSTRING); } -#line 11595 "parser.c" +#line 11636 "parser.c" break; case 1151: /* use_exception: USE use_global _after _standard exception_or_error _procedure _on use_exception_target */ @@ -11613,7 +11654,7 @@ yyparse (void) } } } -#line 11617 "parser.c" +#line 11658 "parser.c" break; case 1152: /* use_global: %empty */ @@ -11621,7 +11662,7 @@ yyparse (void) { use_global_ind = 0; } -#line 11625 "parser.c" +#line 11666 "parser.c" break; case 1153: /* use_global: GLOBAL */ @@ -11630,7 +11671,7 @@ yyparse (void) use_global_ind = 1; current_program->flag_global_use = 1; } -#line 11634 "parser.c" +#line 11675 "parser.c" break; case 1154: /* use_exception_target: file_name_list */ @@ -11644,7 +11685,7 @@ yyparse (void) } } } -#line 11648 "parser.c" +#line 11689 "parser.c" break; case 1155: /* use_exception_target: INPUT */ @@ -11653,7 +11694,7 @@ yyparse (void) current_program->global_handler[COB_OPEN_INPUT].handler_label = current_section; current_program->global_handler[COB_OPEN_INPUT].handler_prog = current_program; } -#line 11657 "parser.c" +#line 11698 "parser.c" break; case 1156: /* use_exception_target: OUTPUT */ @@ -11662,7 +11703,7 @@ yyparse (void) current_program->global_handler[COB_OPEN_OUTPUT].handler_label = current_section; current_program->global_handler[COB_OPEN_OUTPUT].handler_prog = current_program; } -#line 11666 "parser.c" +#line 11707 "parser.c" break; case 1157: /* use_exception_target: "I-O" */ @@ -11671,7 +11712,7 @@ yyparse (void) current_program->global_handler[COB_OPEN_I_O].handler_label = current_section; current_program->global_handler[COB_OPEN_I_O].handler_prog = current_program; } -#line 11675 "parser.c" +#line 11716 "parser.c" break; case 1158: /* use_exception_target: EXTEND */ @@ -11680,7 +11721,7 @@ yyparse (void) current_program->global_handler[COB_OPEN_EXTEND].handler_label = current_section; current_program->global_handler[COB_OPEN_EXTEND].handler_prog = current_program; } -#line 11684 "parser.c" +#line 11725 "parser.c" break; case 1171: /* use_debugging: USE _for DEBUGGING _on use_debugging_target */ @@ -11688,7 +11729,7 @@ yyparse (void) { PENDING ("USE FOR DEBUGGING"); } -#line 11692 "parser.c" +#line 11733 "parser.c" break; case 1174: /* use_reporting: USE use_global BEFORE REPORTING identifier */ @@ -11696,13 +11737,13 @@ yyparse (void) { PENDING ("USE BEFORE REPORTING"); } -#line 11700 "parser.c" +#line 11741 "parser.c" break; case 1175: /* $@93: %empty */ #line 6192 "parser.y" { BEGIN_STATEMENT ("WRITE", TERM_WRITE); } -#line 11706 "parser.c" +#line 11747 "parser.c" break; case 1176: /* write_statement: WRITE $@93 record_name write_from write_lock write_option write_handler end_write */ @@ -11718,19 +11759,19 @@ yyparse (void) cb_emit_write (yyvsp[-5], yyvsp[-4], yyvsp[-2], yyvsp[-3]); } } -#line 11722 "parser.c" +#line 11763 "parser.c" break; case 1177: /* write_from: %empty */ #line 6209 "parser.y" { yyval = NULL; } -#line 11728 "parser.c" +#line 11769 "parser.c" break; case 1178: /* write_from: FROM id_or_lit */ #line 6210 "parser.y" { yyval = yyvsp[0]; } -#line 11734 "parser.c" +#line 11775 "parser.c" break; case 1179: /* write_option: %empty */ @@ -11738,7 +11779,7 @@ yyparse (void) { yyval = cb_int0; } -#line 11742 "parser.c" +#line 11783 "parser.c" break; case 1180: /* write_option: before_or_after _advancing num_id_or_lit _line_or_lines */ @@ -11746,7 +11787,7 @@ yyparse (void) { yyval = cb_build_write_advancing_lines (yyvsp[-3], yyvsp[-1]); } -#line 11750 "parser.c" +#line 11791 "parser.c" break; case 1181: /* write_option: before_or_after _advancing mnemonic_name */ @@ -11754,7 +11795,7 @@ yyparse (void) { yyval = cb_build_write_advancing_mnemonic (yyvsp[-2], yyvsp[0]); } -#line 11758 "parser.c" +#line 11799 "parser.c" break; case 1182: /* write_option: before_or_after _advancing PAGE */ @@ -11762,31 +11803,31 @@ yyparse (void) { yyval = cb_build_write_advancing_page (yyvsp[-2]); } -#line 11766 "parser.c" +#line 11807 "parser.c" break; case 1183: /* before_or_after: BEFORE */ #line 6233 "parser.y" { yyval = CB_BEFORE; } -#line 11772 "parser.c" +#line 11813 "parser.c" break; case 1184: /* before_or_after: AFTER */ #line 6234 "parser.y" { yyval = CB_AFTER; } -#line 11778 "parser.c" +#line 11819 "parser.c" break; case 1188: /* end_write: %empty */ #line 6243 "parser.y" { terminator_warning (TERM_WRITE); } -#line 11784 "parser.c" +#line 11825 "parser.c" break; case 1189: /* end_write: "END-WRITE" */ #line 6244 "parser.y" { terminator_clear (TERM_WRITE); } -#line 11790 "parser.c" +#line 11831 "parser.c" break; case 1190: /* on_accp_exception: opt_on_exception opt_not_on_exception */ @@ -11794,7 +11835,7 @@ yyparse (void) { current_statement->handler_id = COB_EC_IMP_ACCEPT; } -#line 11798 "parser.c" +#line 11839 "parser.c" break; case 1191: /* on_disp_exception: opt_on_exception opt_not_on_exception */ @@ -11802,7 +11843,7 @@ yyparse (void) { current_statement->handler_id = COB_EC_IMP_DISPLAY; } -#line 11806 "parser.c" +#line 11847 "parser.c" break; case 1193: /* $@94: %empty */ @@ -11810,7 +11851,7 @@ yyparse (void) { check_unreached = 0; } -#line 11814 "parser.c" +#line 11855 "parser.c" break; case 1194: /* opt_on_exception: EXCEPTION $@94 statement_list */ @@ -11818,7 +11859,7 @@ yyparse (void) { current_statement->handler1 = yyvsp[0]; } -#line 11822 "parser.c" +#line 11863 "parser.c" break; case 1196: /* $@95: %empty */ @@ -11826,7 +11867,7 @@ yyparse (void) { check_unreached = 0; } -#line 11830 "parser.c" +#line 11871 "parser.c" break; case 1197: /* opt_not_on_exception: "NOT EXCEPTION" $@95 statement_list */ @@ -11834,7 +11875,7 @@ yyparse (void) { current_statement->handler2 = yyvsp[0]; } -#line 11838 "parser.c" +#line 11879 "parser.c" break; case 1200: /* $@96: %empty */ @@ -11843,7 +11884,7 @@ yyparse (void) check_unreached = 0; current_statement->handler_id = COB_EC_SIZE; } -#line 11847 "parser.c" +#line 11888 "parser.c" break; case 1201: /* opt_on_size_error: "SIZE ERROR" $@96 statement_list */ @@ -11851,7 +11892,7 @@ yyparse (void) { current_statement->handler1 = yyvsp[0]; } -#line 11855 "parser.c" +#line 11896 "parser.c" break; case 1203: /* $@97: %empty */ @@ -11860,7 +11901,7 @@ yyparse (void) check_unreached = 0; current_statement->handler_id = COB_EC_SIZE; } -#line 11864 "parser.c" +#line 11905 "parser.c" break; case 1204: /* opt_not_on_size_error: "NOT SIZE ERROR" $@97 statement_list */ @@ -11868,7 +11909,7 @@ yyparse (void) { current_statement->handler2 = yyvsp[0]; } -#line 11872 "parser.c" +#line 11913 "parser.c" break; case 1205: /* on_overflow: opt_on_overflow opt_not_on_overflow */ @@ -11876,7 +11917,7 @@ yyparse (void) { current_statement->handler_id = COB_EC_OVERFLOW; } -#line 11880 "parser.c" +#line 11921 "parser.c" break; case 1207: /* $@98: %empty */ @@ -11884,7 +11925,7 @@ yyparse (void) { check_unreached = 0; } -#line 11888 "parser.c" +#line 11929 "parser.c" break; case 1208: /* opt_on_overflow: OVERFLOW $@98 statement_list */ @@ -11892,7 +11933,7 @@ yyparse (void) { current_statement->handler1 = yyvsp[0]; } -#line 11896 "parser.c" +#line 11937 "parser.c" break; case 1210: /* $@99: %empty */ @@ -11900,7 +11941,7 @@ yyparse (void) { check_unreached = 0; } -#line 11904 "parser.c" +#line 11945 "parser.c" break; case 1211: /* opt_not_on_overflow: "NOT OVERFLOW" $@99 statement_list */ @@ -11908,7 +11949,7 @@ yyparse (void) { current_statement->handler2 = yyvsp[0]; } -#line 11912 "parser.c" +#line 11953 "parser.c" break; case 1212: /* at_end: at_end_sentence */ @@ -11917,7 +11958,7 @@ yyparse (void) current_statement->handler_id = COB_EC_I_O_AT_END; current_statement->handler1 = yyvsp[0]; } -#line 11921 "parser.c" +#line 11962 "parser.c" break; case 1213: /* at_end: not_at_end_sentence */ @@ -11926,7 +11967,7 @@ yyparse (void) current_statement->handler_id = COB_EC_I_O_AT_END; current_statement->handler2 = yyvsp[0]; } -#line 11930 "parser.c" +#line 11971 "parser.c" break; case 1214: /* at_end: at_end_sentence not_at_end_sentence */ @@ -11936,7 +11977,7 @@ yyparse (void) current_statement->handler1 = yyvsp[-1]; current_statement->handler2 = yyvsp[0]; } -#line 11940 "parser.c" +#line 11981 "parser.c" break; case 1215: /* $@100: %empty */ @@ -11944,7 +11985,7 @@ yyparse (void) { check_unreached = 0; } -#line 11948 "parser.c" +#line 11989 "parser.c" break; case 1216: /* at_end_sentence: END $@100 statement_list */ @@ -11952,7 +11993,7 @@ yyparse (void) { yyval = yyvsp[0]; } -#line 11956 "parser.c" +#line 11997 "parser.c" break; case 1217: /* $@101: %empty */ @@ -11960,7 +12001,7 @@ yyparse (void) { check_unreached = 0; } -#line 11964 "parser.c" +#line 12005 "parser.c" break; case 1218: /* not_at_end_sentence: "NOT END" $@101 statement_list */ @@ -11968,7 +12009,7 @@ yyparse (void) { yyval = yyvsp[0]; } -#line 11972 "parser.c" +#line 12013 "parser.c" break; case 1219: /* at_eop: at_eop_sentence */ @@ -11977,7 +12018,7 @@ yyparse (void) current_statement->handler_id = COB_EC_I_O_EOP; current_statement->handler1 = yyvsp[0]; } -#line 11981 "parser.c" +#line 12022 "parser.c" break; case 1220: /* at_eop: not_at_eop_sentence */ @@ -11986,7 +12027,7 @@ yyparse (void) current_statement->handler_id = COB_EC_I_O_EOP; current_statement->handler2 = yyvsp[0]; } -#line 11990 "parser.c" +#line 12031 "parser.c" break; case 1221: /* at_eop: at_eop_sentence not_at_eop_sentence */ @@ -11996,7 +12037,7 @@ yyparse (void) current_statement->handler1 = yyvsp[-1]; current_statement->handler2 = yyvsp[0]; } -#line 12000 "parser.c" +#line 12041 "parser.c" break; case 1222: /* $@102: %empty */ @@ -12004,7 +12045,7 @@ yyparse (void) { check_unreached = 0; } -#line 12008 "parser.c" +#line 12049 "parser.c" break; case 1223: /* at_eop_sentence: EOP $@102 statement_list */ @@ -12012,7 +12053,7 @@ yyparse (void) { yyval = yyvsp[0]; } -#line 12016 "parser.c" +#line 12057 "parser.c" break; case 1224: /* $@103: %empty */ @@ -12020,7 +12061,7 @@ yyparse (void) { check_unreached = 0; } -#line 12024 "parser.c" +#line 12065 "parser.c" break; case 1225: /* not_at_eop_sentence: "NOT EOP" $@103 statement_list */ @@ -12028,7 +12069,7 @@ yyparse (void) { yyval = yyvsp[0]; } -#line 12032 "parser.c" +#line 12073 "parser.c" break; case 1228: /* invalid_key: invalid_key_sentence */ @@ -12037,7 +12078,7 @@ yyparse (void) current_statement->handler_id = COB_EC_I_O_INVALID_KEY; current_statement->handler1 = yyvsp[0]; } -#line 12041 "parser.c" +#line 12082 "parser.c" break; case 1229: /* invalid_key: not_invalid_key_sentence */ @@ -12046,7 +12087,7 @@ yyparse (void) current_statement->handler_id = COB_EC_I_O_INVALID_KEY; current_statement->handler2 = yyvsp[0]; } -#line 12050 "parser.c" +#line 12091 "parser.c" break; case 1230: /* invalid_key: invalid_key_sentence not_invalid_key_sentence */ @@ -12056,7 +12097,7 @@ yyparse (void) current_statement->handler1 = yyvsp[-1]; current_statement->handler2 = yyvsp[0]; } -#line 12060 "parser.c" +#line 12101 "parser.c" break; case 1231: /* $@104: %empty */ @@ -12064,7 +12105,7 @@ yyparse (void) { check_unreached = 0; } -#line 12068 "parser.c" +#line 12109 "parser.c" break; case 1232: /* invalid_key_sentence: "INVALID KEY" $@104 statement_list */ @@ -12072,7 +12113,7 @@ yyparse (void) { yyval = yyvsp[0]; } -#line 12076 "parser.c" +#line 12117 "parser.c" break; case 1233: /* $@105: %empty */ @@ -12080,7 +12121,7 @@ yyparse (void) { check_unreached = 0; } -#line 12084 "parser.c" +#line 12125 "parser.c" break; case 1234: /* not_invalid_key_sentence: "NOT INVALID KEY" $@105 statement_list */ @@ -12088,7 +12129,7 @@ yyparse (void) { yyval = yyvsp[0]; } -#line 12092 "parser.c" +#line 12133 "parser.c" break; case 1235: /* _opt_scroll_lines: %empty */ @@ -12096,7 +12137,7 @@ yyparse (void) { yyval = cb_one; } -#line 12100 "parser.c" +#line 12141 "parser.c" break; case 1236: /* _opt_scroll_lines: _by num_id_or_lit _line_or_lines */ @@ -12104,7 +12145,7 @@ yyparse (void) { yyval = yyvsp[-1]; } -#line 12108 "parser.c" +#line 12149 "parser.c" break; case 1237: /* condition: expr */ @@ -12112,7 +12153,7 @@ yyparse (void) { yyval = cb_build_cond (yyvsp[0]); } -#line 12116 "parser.c" +#line 12157 "parser.c" break; case 1238: /* expr: partial_expr */ @@ -12120,7 +12161,7 @@ yyparse (void) { yyval = cb_build_expr (yyvsp[0]); } -#line 12124 "parser.c" +#line 12165 "parser.c" break; case 1239: /* $@106: %empty */ @@ -12128,7 +12169,7 @@ yyparse (void) { current_expr = NULL; } -#line 12132 "parser.c" +#line 12173 "parser.c" break; case 1240: /* partial_expr: $@106 expr_tokens */ @@ -12136,337 +12177,337 @@ yyparse (void) { yyval = cb_list_reverse (current_expr); } -#line 12140 "parser.c" +#line 12181 "parser.c" break; case 1241: /* expr_tokens: expr_token x */ #line 6549 "parser.y" { push_expr ('x', yyvsp[0]); } -#line 12146 "parser.c" +#line 12187 "parser.c" break; case 1242: /* expr_tokens: expr_tokens ')' */ #line 6550 "parser.y" { push_expr (')', NULL); } -#line 12152 "parser.c" +#line 12193 "parser.c" break; case 1243: /* expr_tokens: expr_token OMITTED */ #line 6552 "parser.y" { push_expr ('O', NULL); } -#line 12158 "parser.c" +#line 12199 "parser.c" break; case 1244: /* expr_tokens: expr_token NUMERIC */ #line 6553 "parser.y" { push_expr ('9', NULL); } -#line 12164 "parser.c" +#line 12205 "parser.c" break; case 1245: /* expr_tokens: expr_token ALPHABETIC */ #line 6554 "parser.y" { push_expr ('A', NULL); } -#line 12170 "parser.c" +#line 12211 "parser.c" break; case 1246: /* expr_tokens: expr_token "ALPHABETIC-LOWER" */ #line 6555 "parser.y" { push_expr ('L', NULL); } -#line 12176 "parser.c" +#line 12217 "parser.c" break; case 1247: /* expr_tokens: expr_token "ALPHABETIC-UPPER" */ #line 6556 "parser.y" { push_expr ('U', NULL); } -#line 12182 "parser.c" +#line 12223 "parser.c" break; case 1248: /* expr_tokens: expr_token CLASS_NAME */ #line 6557 "parser.y" { push_expr ('x', yyvsp[0]); } -#line 12188 "parser.c" +#line 12229 "parser.c" break; case 1249: /* expr_tokens: expr_tokens OMITTED */ #line 6559 "parser.y" { push_expr ('O', NULL); } -#line 12194 "parser.c" +#line 12235 "parser.c" break; case 1250: /* expr_tokens: expr_tokens NUMERIC */ #line 6560 "parser.y" { push_expr ('9', NULL); } -#line 12200 "parser.c" +#line 12241 "parser.c" break; case 1251: /* expr_tokens: expr_tokens ALPHABETIC */ #line 6561 "parser.y" { push_expr ('A', NULL); } -#line 12206 "parser.c" +#line 12247 "parser.c" break; case 1252: /* expr_tokens: expr_tokens "ALPHABETIC-LOWER" */ #line 6562 "parser.y" { push_expr ('L', NULL); } -#line 12212 "parser.c" +#line 12253 "parser.c" break; case 1253: /* expr_tokens: expr_tokens "ALPHABETIC-UPPER" */ #line 6563 "parser.y" { push_expr ('U', NULL); } -#line 12218 "parser.c" +#line 12259 "parser.c" break; case 1254: /* expr_tokens: expr_tokens CLASS_NAME */ #line 6564 "parser.y" { push_expr ('x', yyvsp[0]); } -#line 12224 "parser.c" +#line 12265 "parser.c" break; case 1255: /* expr_tokens: expr_token POSITIVE */ #line 6566 "parser.y" { push_expr ('P', NULL); } -#line 12230 "parser.c" +#line 12271 "parser.c" break; case 1256: /* expr_tokens: expr_token NEGATIVE */ #line 6567 "parser.y" { push_expr ('N', NULL); } -#line 12236 "parser.c" +#line 12277 "parser.c" break; case 1257: /* expr_tokens: expr_tokens POSITIVE */ #line 6569 "parser.y" { push_expr ('P', NULL); } -#line 12242 "parser.c" +#line 12283 "parser.c" break; case 1258: /* expr_tokens: expr_tokens NEGATIVE */ #line 6570 "parser.y" { push_expr ('N', NULL); } -#line 12248 "parser.c" +#line 12289 "parser.c" break; case 1259: /* expr_tokens: expr_tokens ZERO */ #line 6571 "parser.y" { push_expr ('x', cb_zero); } -#line 12254 "parser.c" +#line 12295 "parser.c" break; case 1263: /* expr_token: expr_token '(' */ #line 6578 "parser.y" { push_expr ('(', NULL); } -#line 12260 "parser.c" +#line 12301 "parser.c" break; case 1264: /* expr_token: expr_token '+' */ #line 6580 "parser.y" { push_expr ('+', NULL); } -#line 12266 "parser.c" +#line 12307 "parser.c" break; case 1265: /* expr_token: expr_token '-' */ #line 6581 "parser.y" { push_expr ('-', NULL); } -#line 12272 "parser.c" +#line 12313 "parser.c" break; case 1266: /* expr_token: expr_token '^' */ #line 6582 "parser.y" { push_expr ('^', NULL); } -#line 12278 "parser.c" +#line 12319 "parser.c" break; case 1267: /* expr_token: expr_token NOT */ #line 6584 "parser.y" { push_expr ('!', NULL); } -#line 12284 "parser.c" +#line 12325 "parser.c" break; case 1268: /* expr_token: expr_tokens NOT */ #line 6585 "parser.y" { push_expr ('!', NULL); } -#line 12290 "parser.c" +#line 12331 "parser.c" break; case 1269: /* expr_token: expr_tokens '+' */ #line 6587 "parser.y" { push_expr ('+', NULL); } -#line 12296 "parser.c" +#line 12337 "parser.c" break; case 1270: /* expr_token: expr_tokens '-' */ #line 6588 "parser.y" { push_expr ('-', NULL); } -#line 12302 "parser.c" +#line 12343 "parser.c" break; case 1271: /* expr_token: expr_tokens '*' */ #line 6589 "parser.y" { push_expr ('*', NULL); } -#line 12308 "parser.c" +#line 12349 "parser.c" break; case 1272: /* expr_token: expr_tokens '/' */ #line 6590 "parser.y" { push_expr ('/', NULL); } -#line 12314 "parser.c" +#line 12355 "parser.c" break; case 1273: /* expr_token: expr_tokens '^' */ #line 6591 "parser.y" { push_expr ('^', NULL); } -#line 12320 "parser.c" +#line 12361 "parser.c" break; case 1274: /* expr_token: expr_tokens eq */ #line 6593 "parser.y" { push_expr ('=', NULL); } -#line 12326 "parser.c" +#line 12367 "parser.c" break; case 1275: /* expr_token: expr_tokens gt */ #line 6594 "parser.y" { push_expr ('>', NULL); } -#line 12332 "parser.c" +#line 12373 "parser.c" break; case 1276: /* expr_token: expr_tokens lt */ #line 6595 "parser.y" { push_expr ('<', NULL); } -#line 12338 "parser.c" +#line 12379 "parser.c" break; case 1277: /* expr_token: expr_tokens ge */ #line 6596 "parser.y" { push_expr (']', NULL); } -#line 12344 "parser.c" +#line 12385 "parser.c" break; case 1278: /* expr_token: expr_tokens le */ #line 6597 "parser.y" { push_expr ('[', NULL); } -#line 12350 "parser.c" +#line 12391 "parser.c" break; case 1279: /* expr_token: expr_tokens NE */ #line 6598 "parser.y" { push_expr ('~', NULL); } -#line 12356 "parser.c" +#line 12397 "parser.c" break; case 1280: /* expr_token: expr_token eq */ #line 6600 "parser.y" { push_expr ('=', NULL); } -#line 12362 "parser.c" +#line 12403 "parser.c" break; case 1281: /* expr_token: expr_token gt */ #line 6601 "parser.y" { push_expr ('>', NULL); } -#line 12368 "parser.c" +#line 12409 "parser.c" break; case 1282: /* expr_token: expr_token lt */ #line 6602 "parser.y" { push_expr ('<', NULL); } -#line 12374 "parser.c" +#line 12415 "parser.c" break; case 1283: /* expr_token: expr_token ge */ #line 6603 "parser.y" { push_expr (']', NULL); } -#line 12380 "parser.c" +#line 12421 "parser.c" break; case 1284: /* expr_token: expr_token le */ #line 6604 "parser.y" { push_expr ('[', NULL); } -#line 12386 "parser.c" +#line 12427 "parser.c" break; case 1285: /* expr_token: expr_token NE */ #line 6605 "parser.y" { push_expr ('~', NULL); } -#line 12392 "parser.c" +#line 12433 "parser.c" break; case 1286: /* expr_token: expr_tokens AND */ #line 6607 "parser.y" { push_expr ('&', NULL); } -#line 12398 "parser.c" +#line 12439 "parser.c" break; case 1287: /* expr_token: expr_tokens OR */ #line 6608 "parser.y" { push_expr ('|', NULL); } -#line 12404 "parser.c" +#line 12445 "parser.c" break; case 1301: /* exp_list: exp */ #line 6620 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 12410 "parser.c" +#line 12451 "parser.c" break; case 1302: /* exp_list: exp_list e_sep exp */ #line 6621 "parser.y" { yyval = cb_list_add (yyvsp[-2], yyvsp[0]); } -#line 12416 "parser.c" +#line 12457 "parser.c" break; case 1306: /* exp: arith_x */ #line 6630 "parser.y" { yyval = yyvsp[0]; } -#line 12422 "parser.c" +#line 12463 "parser.c" break; case 1307: /* exp: exp '+' exp */ #line 6631 "parser.y" { yyval = cb_build_binary_op (yyvsp[-2], '+', yyvsp[0]); } -#line 12428 "parser.c" +#line 12469 "parser.c" break; case 1308: /* exp: exp '-' exp */ #line 6632 "parser.y" { yyval = cb_build_binary_op (yyvsp[-2], '-', yyvsp[0]); } -#line 12434 "parser.c" +#line 12475 "parser.c" break; case 1309: /* exp: exp '*' exp */ #line 6633 "parser.y" { yyval = cb_build_binary_op (yyvsp[-2], '*', yyvsp[0]); } -#line 12440 "parser.c" +#line 12481 "parser.c" break; case 1310: /* exp: exp '/' exp */ #line 6634 "parser.y" { yyval = cb_build_binary_op (yyvsp[-2], '/', yyvsp[0]); } -#line 12446 "parser.c" +#line 12487 "parser.c" break; case 1311: /* exp: '+' exp */ #line 6635 "parser.y" { yyval = yyvsp[0]; } -#line 12452 "parser.c" +#line 12493 "parser.c" break; case 1312: /* exp: '-' exp */ #line 6636 "parser.y" { yyval = cb_build_binary_op (cb_zero, '-', yyvsp[0]); } -#line 12458 "parser.c" +#line 12499 "parser.c" break; case 1313: /* exp: exp '^' exp */ #line 6637 "parser.y" { yyval = cb_build_binary_op (yyvsp[-2], '^', yyvsp[0]); } -#line 12464 "parser.c" +#line 12505 "parser.c" break; case 1314: /* exp: '(' exp ')' */ #line 6638 "parser.y" { yyval = yyvsp[-1]; } -#line 12470 "parser.c" +#line 12511 "parser.c" break; case 1315: /* linage_counter: "LINAGE-COUNTER" */ @@ -12482,7 +12523,7 @@ yyparse (void) yyval = linage_file->linage_ctr; } } -#line 12486 "parser.c" +#line 12527 "parser.c" break; case 1316: /* linage_counter: "LINAGE-COUNTER" in_of "Identifier" */ @@ -12495,25 +12536,25 @@ yyparse (void) yyval = cb_error_node; } } -#line 12499 "parser.c" +#line 12540 "parser.c" break; case 1317: /* arithmetic_x_list: arithmetic_x */ #line 6676 "parser.y" { yyval = yyvsp[0]; } -#line 12505 "parser.c" +#line 12546 "parser.c" break; case 1318: /* arithmetic_x_list: arithmetic_x_list arithmetic_x */ #line 6678 "parser.y" { yyval = cb_list_append (yyvsp[-1], yyvsp[0]); } -#line 12511 "parser.c" +#line 12552 "parser.c" break; case 1319: /* arithmetic_x: x flag_rounded */ #line 6682 "parser.y" { yyval = cb_build_pair (yyvsp[0], yyvsp[-1]); } -#line 12517 "parser.c" +#line 12558 "parser.c" break; case 1320: /* record_name: qualified_word */ @@ -12534,7 +12575,7 @@ yyparse (void) } yyval = x; } -#line 12538 "parser.c" +#line 12579 "parser.c" break; case 1321: /* table_name: qualified_word */ @@ -12553,7 +12594,7 @@ yyparse (void) yyval = yyvsp[0]; } } -#line 12557 "parser.c" +#line 12598 "parser.c" break; case 1322: /* file_name_list: file_name */ @@ -12561,7 +12602,7 @@ yyparse (void) { yyval = cb_list_init (yyvsp[0]); } -#line 12565 "parser.c" +#line 12606 "parser.c" break; case 1323: /* file_name_list: file_name_list file_name */ @@ -12578,7 +12619,7 @@ yyparse (void) yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } } -#line 12582 "parser.c" +#line 12623 "parser.c" break; case 1324: /* file_name: "Identifier" */ @@ -12591,37 +12632,37 @@ yyparse (void) yyval = cb_error_node; } } -#line 12595 "parser.c" +#line 12636 "parser.c" break; case 1325: /* mnemonic_name_list: mnemonic_name */ #line 6764 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 12601 "parser.c" +#line 12642 "parser.c" break; case 1326: /* mnemonic_name_list: mnemonic_name_list mnemonic_name */ #line 6766 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 12607 "parser.c" +#line 12648 "parser.c" break; case 1327: /* mnemonic_name: "MNEMONIC NAME" */ #line 6770 "parser.y" { yyval = yyvsp[0]; } -#line 12613 "parser.c" +#line 12654 "parser.c" break; case 1328: /* procedure_name_list: %empty */ #line 6776 "parser.y" { yyval = NULL; } -#line 12619 "parser.c" +#line 12660 "parser.c" break; case 1329: /* procedure_name_list: procedure_name_list procedure_name */ #line 6778 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 12625 "parser.c" +#line 12666 "parser.c" break; case 1330: /* procedure_name: label */ @@ -12631,7 +12672,7 @@ yyparse (void) CB_REFERENCE (yyval)->offset = CB_TREE (current_section); current_program->label_list = cb_cons (yyval, current_program->label_list); } -#line 12635 "parser.c" +#line 12676 "parser.c" break; case 1334: /* integer_label: "Literal" */ @@ -12641,19 +12682,19 @@ yyparse (void) yyval->source_file = yyvsp[0]->source_file; yyval->source_line = yyvsp[0]->source_line; } -#line 12645 "parser.c" +#line 12686 "parser.c" break; case 1335: /* reference_list: reference */ #line 6808 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 12651 "parser.c" +#line 12692 "parser.c" break; case 1336: /* reference_list: reference_list reference */ #line 6809 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 12657 "parser.c" +#line 12698 "parser.c" break; case 1337: /* reference: qualified_word */ @@ -12662,31 +12703,31 @@ yyparse (void) yyval = yyvsp[0]; current_program->reference_list = cb_cons (yyval, current_program->reference_list); } -#line 12666 "parser.c" +#line 12707 "parser.c" break; case 1338: /* no_reference_list: qualified_word */ #line 6823 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 12672 "parser.c" +#line 12713 "parser.c" break; case 1339: /* no_reference_list: no_reference_list qualified_word */ #line 6824 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 12678 "parser.c" +#line 12719 "parser.c" break; case 1340: /* opt_reference: %empty */ #line 6828 "parser.y" { yyval = NULL; } -#line 12684 "parser.c" +#line 12725 "parser.c" break; case 1341: /* opt_reference: reference */ #line 6829 "parser.y" { yyval = yyvsp[0]; } -#line 12690 "parser.c" +#line 12731 "parser.c" break; case 1344: /* undefined_word: "Identifier" */ @@ -12698,145 +12739,145 @@ yyparse (void) yyval = cb_error_node; } } -#line 12702 "parser.c" +#line 12743 "parser.c" break; case 1345: /* target_x_list: target_x */ #line 6860 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 12708 "parser.c" +#line 12749 "parser.c" break; case 1346: /* target_x_list: target_x_list target_x */ #line 6861 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 12714 "parser.c" +#line 12755 "parser.c" break; case 1348: /* target_x: ADDRESS _of identifier_1 */ #line 6866 "parser.y" { yyval = cb_build_address (yyvsp[0]); } -#line 12720 "parser.c" +#line 12761 "parser.c" break; case 1349: /* x_list: x */ #line 6870 "parser.y" { yyval = cb_list_init (yyvsp[0]); } -#line 12726 "parser.c" +#line 12767 "parser.c" break; case 1350: /* x_list: x_list x */ #line 6871 "parser.y" { yyval = cb_list_add (yyvsp[-1], yyvsp[0]); } -#line 12732 "parser.c" +#line 12773 "parser.c" break; case 1352: /* x: LENGTH _of identifier_1 */ #line 6876 "parser.y" { yyval = cb_build_length (yyvsp[0]); } -#line 12738 "parser.c" +#line 12779 "parser.c" break; case 1353: /* x: LENGTH _of basic_literal */ #line 6877 "parser.y" { yyval = cb_build_length (yyvsp[0]); } -#line 12744 "parser.c" +#line 12785 "parser.c" break; case 1354: /* x: LENGTH _of function */ #line 6878 "parser.y" { yyval = cb_build_length (yyvsp[0]); } -#line 12750 "parser.c" +#line 12791 "parser.c" break; case 1355: /* x: ADDRESS _of prog_or_entry alnum_or_id */ #line 6879 "parser.y" { yyval = cb_build_ppointer (yyvsp[0]); } -#line 12756 "parser.c" +#line 12797 "parser.c" break; case 1356: /* x: ADDRESS _of identifier_1 */ #line 6880 "parser.y" { yyval = cb_build_address (yyvsp[0]); } -#line 12762 "parser.c" +#line 12803 "parser.c" break; case 1361: /* arith_x: LENGTH _of identifier_1 */ #line 6888 "parser.y" { yyval = cb_build_length (yyvsp[0]); } -#line 12768 "parser.c" +#line 12809 "parser.c" break; case 1362: /* arith_x: LENGTH _of basic_literal */ #line 6889 "parser.y" { yyval = cb_build_length (yyvsp[0]); } -#line 12774 "parser.c" +#line 12815 "parser.c" break; case 1363: /* arith_x: LENGTH _of function */ #line 6890 "parser.y" { yyval = cb_build_length (yyvsp[0]); } -#line 12780 "parser.c" +#line 12821 "parser.c" break; case 1369: /* alnum_or_id: identifier_1 */ #line 6902 "parser.y" { yyval = yyvsp[0]; } -#line 12786 "parser.c" +#line 12827 "parser.c" break; case 1370: /* alnum_or_id: "Literal" */ #line 6903 "parser.y" { yyval = yyvsp[0]; } -#line 12792 "parser.c" +#line 12833 "parser.c" break; case 1382: /* num_id_or_lit: ZERO */ #line 6937 "parser.y" { yyval = cb_zero; } -#line 12798 "parser.c" +#line 12839 "parser.c" break; case 1383: /* identifier: identifier_1 */ #line 6945 "parser.y" { yyval = cb_build_identifier (yyvsp[0]); } -#line 12804 "parser.c" +#line 12845 "parser.c" break; case 1384: /* identifier_1: qualified_word */ #line 6949 "parser.y" { yyval = yyvsp[0]; } -#line 12810 "parser.c" +#line 12851 "parser.c" break; case 1385: /* identifier_1: qualified_word subref */ #line 6950 "parser.y" { yyval = yyvsp[-1]; } -#line 12816 "parser.c" +#line 12857 "parser.c" break; case 1386: /* identifier_1: qualified_word refmod */ #line 6951 "parser.y" { yyval = yyvsp[-1]; } -#line 12822 "parser.c" +#line 12863 "parser.c" break; case 1387: /* identifier_1: qualified_word subref refmod */ #line 6952 "parser.y" { yyval = yyvsp[-2]; } -#line 12828 "parser.c" +#line 12869 "parser.c" break; case 1388: /* qualified_word: "Identifier" */ #line 6956 "parser.y" { yyval = yyvsp[0]; } -#line 12834 "parser.c" +#line 12875 "parser.c" break; case 1389: /* qualified_word: "Identifier" in_of qualified_word */ #line 6957 "parser.y" { yyval = yyvsp[-2]; CB_REFERENCE (yyvsp[-2])->chain = yyvsp[0]; } -#line 12840 "parser.c" +#line 12881 "parser.c" break; case 1390: /* subref: '(' exp_list ')' */ @@ -12847,7 +12888,7 @@ yyparse (void) CB_REFERENCE (yyvsp[-3])->subs = cb_list_reverse (yyvsp[-1]); } } -#line 12851 "parser.c" +#line 12892 "parser.c" break; case 1391: /* refmod: '(' exp ':' ')' */ @@ -12857,35 +12898,27 @@ yyparse (void) CB_REFERENCE (yyvsp[-4])->value = CB_TREE (cb_field (yyvsp[-4])); if (cb_tree_category (yyvsp[-4]) == CB_CATEGORY_NATIONAL || cb_tree_category (yyvsp[-4]) == CB_CATEGORY_NATIONAL_EDITED) { -#ifdef I18N_UTF8 - /* I18N_UTF8: No wide char support. */ -#else /*!I18N_UTF8*/ yyvsp[-2] = cb_build_binary_op (yyvsp[-2], '*', cb_int2); yyvsp[-2] = cb_build_binary_op (yyvsp[-2], '-', cb_int1); -#endif /*I18N_UTF8*/ } else { CB_TREE (yyvsp[-4])->category = CB_CATEGORY_ALPHANUMERIC; } CB_REFERENCE (yyvsp[-4])->offset = yyvsp[-2]; } } -#line 12873 "parser.c" +#line 12910 "parser.c" break; case 1392: /* refmod: '(' exp ':' exp ')' */ -#line 6990 "parser.y" +#line 6986 "parser.y" { if (cb_ref (yyvsp[-5]) != cb_error_node) { CB_REFERENCE (yyvsp[-5])->value = CB_TREE (cb_field (yyvsp[-5])); if (cb_tree_category (yyvsp[-5]) == CB_CATEGORY_NATIONAL || cb_tree_category (yyvsp[-5]) == CB_CATEGORY_NATIONAL_EDITED) { -#ifdef I18N_UTF8 - /* I18N_UTF8: No wide char support. */ -#else /*!I18N_UTF8*/ yyvsp[-3] = cb_build_binary_op (yyvsp[-3], '*', cb_int2); yyvsp[-3] = cb_build_binary_op (yyvsp[-3], '-', cb_int1); yyvsp[-1] = cb_build_binary_op (yyvsp[-1], '*', cb_int2); -#endif /*I18N_UTF8*/ } else { CB_TREE (yyvsp[-5])->category = CB_CATEGORY_ALPHANUMERIC; } @@ -12893,11 +12926,11 @@ yyparse (void) CB_REFERENCE (yyvsp[-5])->length = yyvsp[-1]; } } -#line 12897 "parser.c" +#line 12930 "parser.c" break; case 1393: /* integer: "Literal" */ -#line 7017 "parser.y" +#line 7009 "parser.y" { if (cb_tree_category (yyvsp[0]) != CB_CATEGORY_NUMERIC) { cb_error (_("Integer value expected")); @@ -12906,437 +12939,437 @@ yyparse (void) } yyval = yyvsp[0]; } -#line 12910 "parser.c" +#line 12943 "parser.c" break; case 1394: /* literal: basic_literal */ -#line 7028 "parser.y" +#line 7020 "parser.y" { yyval = yyvsp[0]; } -#line 12916 "parser.c" +#line 12949 "parser.c" break; case 1395: /* literal: ALL basic_value */ -#line 7030 "parser.y" +#line 7022 "parser.y" { yyval = yyvsp[0]; if (CB_LITERAL_P (yyvsp[0])) { CB_LITERAL (yyvsp[0])->all = 1; } } -#line 12927 "parser.c" +#line 12960 "parser.c" break; case 1396: /* basic_literal: basic_value */ -#line 7039 "parser.y" +#line 7031 "parser.y" { yyval = yyvsp[0]; } -#line 12933 "parser.c" +#line 12966 "parser.c" break; case 1397: /* basic_literal: basic_literal '&' basic_value */ -#line 7040 "parser.y" +#line 7032 "parser.y" { yyval = cb_concat_literals (yyvsp[-2], yyvsp[0]); } -#line 12939 "parser.c" +#line 12972 "parser.c" break; case 1398: /* basic_value: "Literal" */ -#line 7044 "parser.y" +#line 7036 "parser.y" { yyval = yyvsp[0]; } -#line 12945 "parser.c" +#line 12978 "parser.c" break; case 1399: /* basic_value: SPACE */ -#line 7045 "parser.y" +#line 7037 "parser.y" { yyval = cb_space; } -#line 12951 "parser.c" +#line 12984 "parser.c" break; case 1400: /* basic_value: ZERO */ -#line 7046 "parser.y" +#line 7038 "parser.y" { yyval = cb_zero; } -#line 12957 "parser.c" +#line 12990 "parser.c" break; case 1401: /* basic_value: QUOTE */ -#line 7047 "parser.y" +#line 7039 "parser.y" { yyval = cb_quote; } -#line 12963 "parser.c" +#line 12996 "parser.c" break; case 1402: /* basic_value: "HIGH-VALUE" */ -#line 7048 "parser.y" +#line 7040 "parser.y" { yyval = cb_high; } -#line 12969 "parser.c" +#line 13002 "parser.c" break; case 1403: /* basic_value: "LOW-VALUE" */ -#line 7049 "parser.y" +#line 7041 "parser.y" { yyval = cb_low; } -#line 12975 "parser.c" +#line 13008 "parser.c" break; case 1404: /* basic_value: "NULL" */ -#line 7050 "parser.y" +#line 7042 "parser.y" { yyval = cb_null; } -#line 12981 "parser.c" +#line 13014 "parser.c" break; case 1405: /* function: "FUNCTION CURRENT-DATE" func_refmod */ -#line 7059 "parser.y" +#line 7051 "parser.y" { yyval = cb_build_intrinsic (yyvsp[-1], NULL, yyvsp[0]); } -#line 12989 "parser.c" +#line 13022 "parser.c" break; case 1406: /* function: "FUNCTION WHEN-COMPILED" func_refmod */ -#line 7063 "parser.y" +#line 7055 "parser.y" { yyval = cb_build_intrinsic (yyvsp[-1], NULL, yyvsp[0]); } -#line 12997 "parser.c" +#line 13030 "parser.c" break; case 1407: /* function: "FUNCTION UPPER-CASE" '(' exp ')' func_refmod */ -#line 7067 "parser.y" +#line 7059 "parser.y" { yyval = cb_build_intrinsic (yyvsp[-4], cb_list_init (yyvsp[-2]), yyvsp[0]); } -#line 13005 "parser.c" +#line 13038 "parser.c" break; case 1408: /* function: "FUNCTION LOWER-CASE" '(' exp ')' func_refmod */ -#line 7071 "parser.y" +#line 7063 "parser.y" { yyval = cb_build_intrinsic (yyvsp[-4], cb_list_init (yyvsp[-2]), yyvsp[0]); } -#line 13013 "parser.c" +#line 13046 "parser.c" break; case 1409: /* function: "FUNCTION REVERSE" '(' exp ')' func_refmod */ -#line 7075 "parser.y" +#line 7067 "parser.y" { yyval = cb_build_intrinsic (yyvsp[-4], cb_list_init (yyvsp[-2]), yyvsp[0]); } -#line 13021 "parser.c" +#line 13054 "parser.c" break; case 1410: /* function: "FUNCTION CONCATENATE" '(' exp_list ')' func_refmod */ -#line 7079 "parser.y" +#line 7071 "parser.y" { yyval = cb_build_intrinsic (yyvsp[-4], yyvsp[-2], yyvsp[0]); } -#line 13029 "parser.c" +#line 13062 "parser.c" break; case 1411: /* function: "FUNCTION SUBSTITUTE" '(' exp_list ')' func_refmod */ -#line 7083 "parser.y" +#line 7075 "parser.y" { yyval = cb_build_intrinsic (yyvsp[-4], yyvsp[-2], yyvsp[0]); } -#line 13037 "parser.c" +#line 13070 "parser.c" break; case 1412: /* function: "FUNCTION SUBSTITUTE-CASE" '(' exp_list ')' func_refmod */ -#line 7087 "parser.y" +#line 7079 "parser.y" { yyval = cb_build_intrinsic (yyvsp[-4], yyvsp[-2], yyvsp[0]); } -#line 13045 "parser.c" +#line 13078 "parser.c" break; case 1413: /* function: "FUNCTION TRIM" '(' trim_args ')' func_refmod */ -#line 7091 "parser.y" +#line 7083 "parser.y" { yyval = cb_build_intrinsic (yyvsp[-4], yyvsp[-2], yyvsp[0]); } -#line 13053 "parser.c" +#line 13086 "parser.c" break; case 1414: /* function: "FUNCTION NUMVALC" '(' numvalc_args ')' */ -#line 7095 "parser.y" +#line 7087 "parser.y" { yyval = cb_build_intrinsic (yyvsp[-3], yyvsp[-1], NULL); } -#line 13061 "parser.c" +#line 13094 "parser.c" break; case 1415: /* function: "FUNCTION LOCALE" '(' locale_dt_args ')' func_refmod */ -#line 7099 "parser.y" +#line 7091 "parser.y" { yyval = cb_build_intrinsic (yyvsp[-4], yyvsp[-2], yyvsp[0]); } -#line 13069 "parser.c" +#line 13102 "parser.c" break; case 1416: /* function: "FUNCTION" func_args */ -#line 7103 "parser.y" +#line 7095 "parser.y" { yyval = cb_build_intrinsic (yyvsp[-1], yyvsp[0], NULL); } -#line 13077 "parser.c" +#line 13110 "parser.c" break; case 1417: /* func_refmod: %empty */ -#line 7109 "parser.y" +#line 7101 "parser.y" { yyval = NULL; } -#line 13083 "parser.c" +#line 13116 "parser.c" break; case 1418: /* func_refmod: '(' exp ':' ')' */ -#line 7110 "parser.y" +#line 7102 "parser.y" { yyval = cb_build_pair (yyvsp[-2], NULL); } -#line 13089 "parser.c" +#line 13122 "parser.c" break; case 1419: /* func_refmod: '(' exp ':' exp ')' */ -#line 7111 "parser.y" +#line 7103 "parser.y" { yyval = cb_build_pair (yyvsp[-3], yyvsp[-1]); } -#line 13095 "parser.c" +#line 13128 "parser.c" break; case 1420: /* func_args: %empty */ -#line 7115 "parser.y" +#line 7107 "parser.y" { yyval = NULL; } -#line 13101 "parser.c" +#line 13134 "parser.c" break; case 1421: /* func_args: '(' list_func_args ')' */ -#line 7116 "parser.y" +#line 7108 "parser.y" { yyval = yyvsp[-1]; } -#line 13107 "parser.c" +#line 13140 "parser.c" break; case 1422: /* list_func_args: %empty */ -#line 7120 "parser.y" +#line 7112 "parser.y" { yyval = NULL; } -#line 13113 "parser.c" +#line 13146 "parser.c" break; case 1423: /* list_func_args: exp_list */ -#line 7121 "parser.y" +#line 7113 "parser.y" { yyval = yyvsp[0]; } -#line 13119 "parser.c" +#line 13152 "parser.c" break; case 1424: /* trim_args: exp */ -#line 7127 "parser.y" +#line 7119 "parser.y" { cb_tree x; x = cb_list_init (yyvsp[0]); yyval = cb_list_add (x, cb_int0); } -#line 13130 "parser.c" +#line 13163 "parser.c" break; case 1425: /* trim_args: exp e_sep LEADING */ -#line 7134 "parser.y" +#line 7126 "parser.y" { cb_tree x; x = cb_list_init (yyvsp[-2]); yyval = cb_list_add (x, cb_int1); } -#line 13141 "parser.c" +#line 13174 "parser.c" break; case 1426: /* trim_args: exp e_sep TRAILING */ -#line 7141 "parser.y" +#line 7133 "parser.y" { cb_tree x; x = cb_list_init (yyvsp[-2]); yyval = cb_list_add (x, cb_int2); } -#line 13152 "parser.c" +#line 13185 "parser.c" break; case 1427: /* numvalc_args: exp */ -#line 7151 "parser.y" +#line 7143 "parser.y" { cb_tree x; x = cb_list_init (yyvsp[0]); yyval = cb_list_add (x, cb_null); } -#line 13163 "parser.c" +#line 13196 "parser.c" break; case 1428: /* numvalc_args: exp e_sep exp */ -#line 7158 "parser.y" +#line 7150 "parser.y" { cb_tree x; x = cb_list_init (yyvsp[-2]); yyval = cb_list_add (x, yyvsp[0]); } -#line 13174 "parser.c" +#line 13207 "parser.c" break; case 1429: /* locale_dt_args: exp */ -#line 7168 "parser.y" +#line 7160 "parser.y" { cb_tree x; x = cb_list_init (yyvsp[0]); yyval = cb_list_add (x, cb_null); } -#line 13185 "parser.c" +#line 13218 "parser.c" break; case 1430: /* locale_dt_args: exp e_sep reference */ -#line 7175 "parser.y" +#line 7167 "parser.y" { cb_tree x; x = cb_list_init (yyvsp[-2]); yyval = cb_list_add (x, cb_ref (yyvsp[0])); } -#line 13196 "parser.c" +#line 13229 "parser.c" break; case 1431: /* not_const_word: %empty */ -#line 7188 "parser.y" +#line 7180 "parser.y" { non_const_word = 1; } -#line 13204 "parser.c" +#line 13237 "parser.c" break; case 1432: /* flag_all: %empty */ -#line 7198 "parser.y" +#line 7190 "parser.y" { yyval = cb_int0; } -#line 13210 "parser.c" +#line 13243 "parser.c" break; case 1433: /* flag_all: ALL */ -#line 7199 "parser.y" +#line 7191 "parser.y" { yyval = cb_int1; } -#line 13216 "parser.c" +#line 13249 "parser.c" break; case 1434: /* flag_duplicates: %empty */ -#line 7203 "parser.y" +#line 7195 "parser.y" { yyval = cb_int0; } -#line 13222 "parser.c" +#line 13255 "parser.c" break; case 1435: /* flag_duplicates: with_dups */ -#line 7204 "parser.y" +#line 7196 "parser.y" { yyval = cb_int1; } -#line 13228 "parser.c" +#line 13261 "parser.c" break; case 1436: /* flag_initialized: %empty */ -#line 7208 "parser.y" +#line 7200 "parser.y" { yyval = NULL; } -#line 13234 "parser.c" +#line 13267 "parser.c" break; case 1437: /* flag_initialized: INITIALIZED */ -#line 7209 "parser.y" +#line 7201 "parser.y" { yyval = cb_int1; } -#line 13240 "parser.c" +#line 13273 "parser.c" break; case 1438: /* flag_next: %empty */ -#line 7213 "parser.y" +#line 7205 "parser.y" { yyval = cb_int0; } -#line 13246 "parser.c" +#line 13279 "parser.c" break; case 1439: /* flag_next: NEXT */ -#line 7214 "parser.y" +#line 7206 "parser.y" { yyval = cb_int1; } -#line 13252 "parser.c" +#line 13285 "parser.c" break; case 1440: /* flag_next: PREVIOUS */ -#line 7215 "parser.y" +#line 7207 "parser.y" { yyval = cb_int2; } -#line 13258 "parser.c" +#line 13291 "parser.c" break; case 1441: /* flag_not: %empty */ -#line 7219 "parser.y" +#line 7211 "parser.y" { yyval = cb_int0; } -#line 13264 "parser.c" +#line 13297 "parser.c" break; case 1442: /* flag_not: NOT */ -#line 7220 "parser.y" +#line 7212 "parser.y" { yyval = cb_int1; } -#line 13270 "parser.c" +#line 13303 "parser.c" break; case 1443: /* flag_optional: %empty */ -#line 7224 "parser.y" +#line 7216 "parser.y" { yyval = cb_int0; } -#line 13276 "parser.c" +#line 13309 "parser.c" break; case 1444: /* flag_optional: OPTIONAL */ -#line 7225 "parser.y" +#line 7217 "parser.y" { yyval = cb_int1; } -#line 13282 "parser.c" +#line 13315 "parser.c" break; case 1445: /* flag_rounded: %empty */ -#line 7229 "parser.y" +#line 7221 "parser.y" { yyval = cb_int0; } -#line 13288 "parser.c" +#line 13321 "parser.c" break; case 1446: /* flag_rounded: ROUNDED */ -#line 7230 "parser.y" +#line 7222 "parser.y" { yyval = cb_int1; } -#line 13294 "parser.c" +#line 13327 "parser.c" break; case 1447: /* flag_separate: %empty */ -#line 7234 "parser.y" +#line 7226 "parser.y" { yyval = cb_int0; } -#line 13300 "parser.c" +#line 13333 "parser.c" break; case 1448: /* flag_separate: SEPARATE _character */ -#line 7235 "parser.y" +#line 7227 "parser.y" { yyval = cb_int1; } -#line 13306 "parser.c" +#line 13339 "parser.c" break; case 1460: /* _also: ALSO */ -#line 7248 "parser.y" +#line 7240 "parser.y" { yyval = cb_int1; } -#line 13312 "parser.c" +#line 13345 "parser.c" break; case 1489: /* _is: %empty */ -#line 7263 "parser.y" +#line 7255 "parser.y" { yyval = NULL; } -#line 13318 "parser.c" +#line 13351 "parser.c" break; case 1490: /* _is: IS */ -#line 7263 "parser.y" +#line 7255 "parser.y" { yyval = cb_int1; } -#line 13324 "parser.c" +#line 13357 "parser.c" break; case 1501: /* _literal: %empty */ -#line 7268 "parser.y" +#line 7260 "parser.y" { yyval = NULL; } -#line 13330 "parser.c" +#line 13363 "parser.c" break; case 1502: /* _literal: "Literal" */ -#line 7268 "parser.y" +#line 7260 "parser.y" { yyval = yyvsp[0]; } -#line 13336 "parser.c" +#line 13369 "parser.c" break; -#line 13340 "parser.c" +#line 13373 "parser.c" default: break; } @@ -13418,7 +13451,6 @@ yyparse (void) label yyerrorlab therefore never appears in user code. */ if (0) YYERROR; - ++yynerrs; /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ @@ -13479,7 +13511,7 @@ yyparse (void) `-------------------------------------*/ yyacceptlab: yyresult = 0; - goto yyreturnlab; + goto yyreturn; /*-----------------------------------. @@ -13487,22 +13519,24 @@ yyparse (void) `-----------------------------------*/ yyabortlab: yyresult = 1; - goto yyreturnlab; + goto yyreturn; -/*-----------------------------------------------------------. -| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. | -`-----------------------------------------------------------*/ +#if !defined yyoverflow +/*-------------------------------------------------. +| yyexhaustedlab -- memory exhaustion comes here. | +`-------------------------------------------------*/ yyexhaustedlab: yyerror (YY_("memory exhausted")); yyresult = 2; - goto yyreturnlab; + goto yyreturn; +#endif -/*----------------------------------------------------------. -| yyreturnlab -- parsing is finished, clean up and return. | -`----------------------------------------------------------*/ -yyreturnlab: +/*-------------------------------------------------------. +| yyreturn -- parsing is finished, clean up and return. | +`-------------------------------------------------------*/ +yyreturn: if (yychar != YYEMPTY) { /* Make sure we have latest lookahead translation. See comments at @@ -13529,5 +13563,5 @@ yyparse (void) return yyresult; } -#line 7293 "parser.y" +#line 7285 "parser.y" diff --git a/cobj/parser.y b/cobj/parser.y index 524bc1f8..187b5190 100644 --- a/cobj/parser.y +++ b/cobj/parser.y @@ -6974,12 +6974,8 @@ refmod: CB_REFERENCE ($0)->value = CB_TREE (cb_field ($0)); if (cb_tree_category ($0) == CB_CATEGORY_NATIONAL || cb_tree_category ($0) == CB_CATEGORY_NATIONAL_EDITED) { -#ifdef I18N_UTF8 - /* I18N_UTF8: No wide char support. */ -#else /*!I18N_UTF8*/ $2 = cb_build_binary_op ($2, '*', cb_int2); $2 = cb_build_binary_op ($2, '-', cb_int1); -#endif /*I18N_UTF8*/ } else { CB_TREE ($0)->category = CB_CATEGORY_ALPHANUMERIC; } @@ -6992,13 +6988,9 @@ refmod: CB_REFERENCE ($0)->value = CB_TREE (cb_field ($0)); if (cb_tree_category ($0) == CB_CATEGORY_NATIONAL || cb_tree_category ($0) == CB_CATEGORY_NATIONAL_EDITED) { -#ifdef I18N_UTF8 - /* I18N_UTF8: No wide char support. */ -#else /*!I18N_UTF8*/ $2 = cb_build_binary_op ($2, '*', cb_int2); $2 = cb_build_binary_op ($2, '-', cb_int1); $4 = cb_build_binary_op ($4, '*', cb_int2); -#endif /*I18N_UTF8*/ } else { CB_TREE ($0)->category = CB_CATEGORY_ALPHANUMERIC; } diff --git a/cobj/pplex.c b/cobj/pplex.c index 3be62fbb..7a3e6e35 100644 --- a/cobj/pplex.c +++ b/cobj/pplex.c @@ -1,8 +1,8 @@ -#line 2 "pplex.c" +#line 1 "pplex.c" -#line 4 "pplex.c" +#line 3 "pplex.c" -#define YY_INT_ALIGNED short int +#define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ @@ -276,10 +276,10 @@ /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ -#include #include -#include #include +#include +#include /* end standard C headers. */ @@ -290,10 +290,10 @@ /* C99 systems have . Non-C99 systems may or may not. */ -#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#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. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 @@ -310,41 +310,41 @@ typedef uint32_t flex_uint32_t; 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 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) +#define INT8_MIN (-128) #endif #ifndef INT16_MIN -#define INT16_MIN (-32767 - 1) +#define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN -#define INT32_MIN (-2147483647 - 1) +#define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX -#define INT8_MAX (127) +#define INT8_MAX (127) #endif #ifndef INT16_MAX -#define INT16_MAX (32767) +#define INT16_MAX (32767) #endif #ifndef INT32_MAX -#define INT32_MAX (2147483647) +#define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX -#define UINT8_MAX (255U) +#define UINT8_MAX (255U) #endif #ifndef UINT16_MAX -#define UINT16_MAX (65535U) +#define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) +#define UINT32_MAX (4294967295U) #endif #ifndef SIZE_MAX -#define SIZE_MAX (~(size_t)0) +#define SIZE_MAX (~(size_t)0) #endif #endif /* ! C99 */ @@ -368,7 +368,7 @@ typedef unsigned int flex_uint32_t; /* Promotes a possibly negative, possibly signed char to an * integer in range [0..255] for use as an array index. */ -#define YY_SC_TO_UI(c) ((YY_CHAR)(c)) +#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) /* 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 @@ -379,12 +379,12 @@ typedef unsigned int flex_uint32_t; * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ -#define YY_START (((yy_start)-1) / 2) +#define YY_START (((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 yyrestart(yyin) +#define YY_NEW_FILE yyrestart( yyin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ @@ -400,10 +400,9 @@ typedef unsigned int flex_uint32_t; #endif /* __ia64__ */ #endif -/* The state buf must be large enough to hold one state per character in the - * main buffer. +/* 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)) +#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 @@ -422,90 +421,94 @@ extern FILE *yyin, *yyout; #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) - + + #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 = (yy_hold_char); \ - YY_RESTORE_YY_MORE_OFFSET(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, (yytext_ptr)) +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = (yy_hold_char); \ + YY_RESTORE_YY_MORE_OFFSET \ + (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, (yytext_ptr) ) #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; +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 yyrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ + /* 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 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 */ /* Stack of input buffers. */ -static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ -static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ -static YY_BUFFER_STATE *yy_buffer_stack = NULL; /**< Stack as an array. */ +static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ +static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ +static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */ /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general @@ -513,8 +516,9 @@ static YY_BUFFER_STATE *yy_buffer_stack = NULL; /**< Stack as an array. */ * * Returns the top of the stack, or NULL. */ -#define YY_CURRENT_BUFFER \ - ((yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top)] : NULL) +#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ + ? (yy_buffer_stack)[(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. */ @@ -522,62 +526,64 @@ static YY_BUFFER_STATE *yy_buffer_stack = NULL; /**< Stack as an array. */ /* yy_hold_char holds the character lost when yytext is formed. */ static char yy_hold_char; -static int yy_n_chars; /* number of characters read into yy_ch_buf */ +static int yy_n_chars; /* number of characters read into yy_ch_buf */ int yyleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = NULL; -static int yy_init = 0; /* whether we need to initialize */ -static int yy_start = 0; /* start state number */ +static int yy_init = 0; /* whether we need to initialize */ +static int yy_start = 0; /* start state number */ /* Flag which is used to allow yywrap()'s to do buffer switches * instead of setting up a fresh yyin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; -void yyrestart(FILE *input_file); -void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer); -YY_BUFFER_STATE yy_create_buffer(FILE *file, int size); -void yy_delete_buffer(YY_BUFFER_STATE b); -void yy_flush_buffer(YY_BUFFER_STATE b); -void yypush_buffer_state(YY_BUFFER_STATE new_buffer); -void yypop_buffer_state(void); +void yyrestart ( FILE *input_file ); +void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer ); +YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size ); +void yy_delete_buffer ( YY_BUFFER_STATE b ); +void yy_flush_buffer ( YY_BUFFER_STATE b ); +void yypush_buffer_state ( YY_BUFFER_STATE new_buffer ); +void yypop_buffer_state ( void ); -static void yyensure_buffer_stack(void); -static void yy_load_buffer_state(void); -static void yy_init_buffer(YY_BUFFER_STATE b, FILE *file); -#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER) +static void yyensure_buffer_stack ( void ); +static void yy_load_buffer_state ( void ); +static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file ); +#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER ) -YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size); -YY_BUFFER_STATE yy_scan_string(const char *yy_str); -YY_BUFFER_STATE yy_scan_bytes(const char *bytes, int len); +YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size ); +YY_BUFFER_STATE yy_scan_string ( const char *yy_str ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len ); -void *yyalloc(yy_size_t); -void *yyrealloc(void *, yy_size_t); -void yyfree(void *); +void *yyalloc ( yy_size_t ); +void *yyrealloc ( void *, yy_size_t ); +void yyfree ( void * ); #define yy_new_buffer yy_create_buffer -#define yy_set_interactive(is_interactive) \ - { \ - if (!YY_CURRENT_BUFFER) { \ - yyensure_buffer_stack(); \ - YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } -#define yy_set_bol(at_bol) \ - { \ - if (!YY_CURRENT_BUFFER) { \ - yyensure_buffer_stack(); \ - YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + yyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer( yyin, YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + yyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer( yyin, YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ -#define ppwrap() (/*CONSTCOND*/ 1) +#define ppwrap() (/*CONSTCOND*/1) #define YY_SKIP_YYWRAP typedef flex_uint8_t YY_CHAR; @@ -594,820 +600,1445 @@ extern char *yytext; #endif #define yytext_ptr yytext -static yy_state_type yy_get_previous_state(void); -static yy_state_type yy_try_NUL_trans(yy_state_type current_state); -static int yy_get_next_buffer(void); -static void yynoreturn yy_fatal_error(const char *msg); +static yy_state_type yy_get_previous_state ( void ); +static yy_state_type yy_try_NUL_trans ( yy_state_type current_state ); +static int yy_get_next_buffer ( void ); +static void yynoreturn yy_fatal_error ( const char* msg ); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ -#define YY_DO_BEFORE_ACTION \ - (yytext_ptr) = yy_bp; \ - yyleng = (int)(yy_cp - yy_bp); \ - (yy_hold_char) = *yy_cp; \ - *yy_cp = '\0'; \ - (yy_c_buf_p) = yy_cp; +#define YY_DO_BEFORE_ACTION \ + (yytext_ptr) = yy_bp; \ + yyleng = (int) (yy_cp - yy_bp); \ + (yy_hold_char) = *yy_cp; \ + *yy_cp = '\0'; \ + (yy_c_buf_p) = yy_cp; #define YY_NUM_RULES 99 #define YY_END_OF_BUFFER 100 /* 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 const flex_int16_t yy_accept[609] = { - 0, 0, 0, 16, 16, 0, 0, 0, 0, 0, 0, 100, 98, 73, 74, 98, 98, - 76, 77, 98, 98, 98, 95, 94, 95, 98, 95, 95, 95, 95, 95, 95, 95, 95, - 95, 95, 95, 95, 98, 98, 74, 12, 13, 93, 98, 16, 15, 16, 12, 13, 44, - 20, 21, 44, 44, 24, 25, 44, 44, 44, 41, 22, 41, 44, 44, 41, 41, 41, - 41, 41, 41, 41, 41, 41, 41, 41, 44, 44, 12, 13, 51, 45, 46, 51, 51, - 51, 51, 51, 48, 51, 48, 51, 51, 48, 51, 51, 12, 13, 60, 55, 56, - - 60, 60, 60, 60, 60, 57, 60, 57, 60, 57, 57, 57, 57, 60, 60, 12, 13, - 74, 0, 0, 97, 0, 1, 0, 96, 73, 75, 0, 95, 95, 0, 0, 74, 0, - 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, - 95, 95, 95, 95, 95, 74, 93, 0, 12, 1, 13, 93, 16, 1, 12, 1, 13, - 21, 0, 0, 43, 0, 0, 42, 20, 41, 41, 0, 0, 23, 36, 26, 27, 41, - 41, 28, 41, 41, 41, 41, 46, 0, 0, 50, 0, 0, 49, 45, 48, - - 48, 0, 0, 47, 56, 0, 0, 59, 0, 0, 58, 55, 57, 57, 0, 0, 57, - 57, 57, 1, 95, 95, 0, 0, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, - 0, 95, 0, 95, 95, 0, 0, 95, 95, 95, 95, 95, 95, 95, 95, 0, 0, - 95, 1, 1, 1, 41, 41, 29, 41, 41, 41, 41, 41, 41, 57, 57, 57, 0, - 0, 0, 0, 89, 0, 95, 95, 17, 95, 95, 95, 0, 0, 95, 95, 95, 95, - 0, 0, 95, 95, 95, 80, 0, 95, 95, 95, 95, 95, 95, 95, 95, - - 95, 95, 92, 0, 95, 41, 41, 41, 41, 41, 41, 41, 41, 52, 57, 57, 82, - 0, 81, 0, 95, 95, 0, 0, 95, 69, 0, 0, 0, 95, 95, 0, 0, 95, - 0, 95, 95, 95, 0, 0, 95, 95, 95, 95, 95, 95, 70, 71, 72, 95, 0, - 0, 95, 41, 41, 41, 41, 41, 41, 41, 41, 57, 57, 62, 95, 0, 0, 95, - 95, 95, 69, 0, 0, 95, 0, 0, 91, 0, 95, 0, 95, 95, 95, 90, 0, - 95, 95, 95, 95, 95, 95, 95, 70, 71, 72, 95, 84, 0, 0, 95, - - 0, 41, 41, 37, 41, 41, 38, 41, 41, 57, 57, 95, 0, 95, 95, 95, 0, - 0, 95, 85, 0, 95, 0, 95, 18, 95, 95, 14, 95, 95, 67, 19, 95, 95, - 78, 0, 0, 0, 35, 33, 41, 41, 41, 41, 41, 41, 53, 54, 95, 0, 95, - 95, 95, 0, 0, 95, 95, 0, 95, 95, 95, 95, 95, 68, 0, 0, 79, 0, - 41, 31, 41, 41, 30, 34, 0, 0, 0, 95, 95, 95, 0, 0, 95, 0, 95, - 0, 0, 95, 95, 95, 95, 61, 83, 0, 39, 32, 40, 86, 0, 0, - - 0, 0, 95, 95, 95, 0, 0, 95, 0, 0, 95, 0, 95, 95, 0, 0, 5, - 0, 0, 0, 95, 95, 95, 0, 10, 95, 0, 6, 0, 95, 95, 0, 0, 0, - 0, 0, 0, 95, 95, 63, 11, 0, 0, 0, 0, 3, 0, 95, 66, 0, 0, - 0, 8, 65, 64, 0, 0, 0, 95, 0, 0, 0, 0, 0, 95, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 0, 0, 0, - 0, 0, 0, 0, 0, 4, 0, 0, 9, 0, 0, 0, 0, 88, 7, - - 0, 0, 0, 0, 0, 2, 0, 0}; - -static const 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, 3, 1, 4, 1, 1, 1, - 1, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 14, 14, 14, 14, 14, - 14, 1, 18, 1, 19, 20, 1, 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, 38, 47, 47, 47, 47, - 38, 47, 48, 49, 50, 51, - - 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 38, 64, 65, 66, 67, 68, 69, - 70, 71, 38, 47, 47, 47, 47, 1, 47, 72, 73, 73, 73, 73, 73, 73, 73, 73, 73, - 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, - 73, 73, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, - 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, - 74, 74, 74, 74, 74, - - 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, - 74, 74, 74, 74, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, - 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 1, 1, 1}; - -static const YY_CHAR yy_meta[75] = { - 0, 1, 2, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 1, 3, 3, 3, 3, 1, 1, 1, 1, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}; - -static const flex_int16_t yy_base[632] = { - 0, 0, 72, 74, 82, 144, 70, 218, 291, 364, 83, 871, - 3699, 3699, 241, 866, 858, 3699, 3699, 839, 87, 243, 252, 95, - 260, 245, 429, 67, 436, 432, 446, 473, 501, 517, 512, 539, - 532, 545, 609, 617, 268, 831, 0, 586, 625, 0, 3699, 829, - 808, 0, 3699, 3699, 246, 808, 787, 3699, 3699, 771, 103, 651, - 633, 111, 659, 248, 755, 276, 487, 645, 667, 671, 674, 677, - 681, 684, 699, 703, 748, 767, 753, 0, 3699, 3699, 249, 764, - 747, 717, 119, 784, 792, 340, 801, 448, 715, 717, 810, 822, - 699, 0, 3699, 3699, 251, - - 710, 698, 679, 449, 838, 865, 873, 881, 471, 832, 850, 889, - 899, 918, 931, 677, 0, 258, 671, 676, 3699, 646, 0, 903, - 965, 3699, 270, 601, 835, 973, 981, 989, 275, 589, 997, 1001, - 1012, 1006, 1025, 1009, 1028, 1051, 1031, 1055, 1077, 1096, 1101, 1127, - 1104, 1108, 1150, 1083, 1122, 1133, 1155, 1130, 475, 226, 571, 0, - 0, 0, 1176, 0, 0, 0, 0, 0, 286, 565, 579, 3699, - 577, 1202, 1219, 3699, 1173, 1227, 1240, 1248, 3699, 1199, 1220, 1256, - 1264, 1267, 1270, 1278, 1295, 1334, 1300, 442, 554, 568, 3699, 565, - 1364, 1374, 3699, 1291, - - 1384, 1398, 1406, 3699, 444, 513, 527, 3699, 512, 1414, 1422, 3699, - 1392, 1432, 1456, 1464, 1423, 1477, 1451, 0, 1480, 1496, 953, 1518, - 1490, 1506, 1510, 1532, 1549, 1440, 1545, 1554, 1564, 1578, 481, 1581, - 1645, 1575, 1597, 1629, 1661, 1655, 1669, 1673, 1676, 1679, 1690, 1693, - 1697, 1758, 1766, 1725, 0, 0, 0, 1774, 1743, 1778, 1781, 1791, - 1800, 1795, 1807, 1813, 1819, 1828, 1845, 1879, 1895, 1911, 1919, 312, - 466, 1887, 1909, 1865, 1912, 1933, 1929, 698, 1957, 1951, 1936, 1977, - 1945, 68, 455, 1981, 1984, 1988, 320, 449, 2017, 2020, 2002, 2025, - 2030, 2033, 2052, 2067, - - 2075, 2097, 329, 446, 2100, 2058, 2103, 2108, 2055, 2131, 2144, 2122, - 2125, 2134, 2173, 2177, 345, 434, 563, 431, 2180, 2199, 961, 2212, - 2224, 2208, 39, 77, 422, 2227, 2252, 2288, 2296, 2265, 213, 2306, - 2276, 2282, 2317, 2353, 2332, 2318, 2346, 2341, 2335, 2365, 2370, 2374, - 2382, 2399, 2414, 2446, 2438, 2424, 2454, 2463, 2458, 2467, 2471, 2480, - 2489, 2495, 2513, 2492, 2537, 419, 419, 2544, 2559, 2563, 3699, 418, - 424, 2547, 2574, 2627, 592, 332, 2587, 498, 2603, 2614, 2595, 599, - 330, 2591, 2640, 2635, 2643, 2660, 2667, 2679, 3699, 3699, 3699, 2682, - 943, 310, 2707, 2724, - - 2746, 2718, 2731, 2738, 2754, 2765, 2768, 2774, 2771, 2761, 2790, 2795, - 271, 2818, 2841, 2844, 545, 616, 2838, 1269, 301, 2810, 417, 2847, - 2807, 2874, 2863, 2877, 2883, 2889, 2894, 2897, 2911, 2922, 1302, 298, - 2928, 2964, 2916, 2941, 2961, 2981, 2989, 2994, 2998, 3011, 2953, 3005, - 3034, 622, 3031, 3018, 3039, 459, 471, 3046, 3076, 632, 3085, 3089, - 3098, 3103, 3113, 3110, 3124, 3177, 3129, 266, 3153, 3142, 3156, 3162, - 3167, 3185, 3216, 3238, 483, 3211, 3190, 3235, 652, 668, 3226, 1459, - 3256, 3279, 659, 3270, 3267, 3201, 3294, 3259, 1310, 259, 3299, 3303, - 3310, 1338, 665, 523, - - 258, 682, 3315, 3323, 3326, 686, 759, 3339, 767, 242, 3334, 768, - 3348, 3374, 1466, 3412, 3344, 799, 864, 810, 3382, 3392, 3358, 823, - 3699, 3429, 617, 3403, 527, 3433, 3425, 838, 122, 853, 1107, 121, - 865, 3441, 3457, 3438, 3699, 1671, 3505, 884, 1005, 3699, 117, 3471, - 3462, 712, 954, 961, 3699, 3467, 3475, 993, 116, 745, 3515, 996, - 996, 995, 762, 1002, 3481, 838, 1311, 1019, 1036, 1069, 1786, 3545, - 1091, 3565, 111, 1160, 866, 1163, 1191, 109, 1234, 1596, 1276, 1291, - 1353, 906, 1296, 1523, 1297, 1548, 3699, 101, 1319, 3699, 3569, 93, - 1331, 994, 1699, 3699, - - 1339, 1341, 1350, 1646, 1728, 3699, 87, 3699, 3641, 3644, 3647, 3650, - 97, 3653, 3656, 3659, 3662, 3665, 3668, 3671, 91, 3674, 3677, 90, - 3680, 3683, 89, 3686, 3689, 3692, 3695}; - -static const flex_int16_t yy_def[632] = { - 0, 608, 1, 609, 609, 608, 5, 610, 610, 608, 9, 608, 608, 608, 608, - 611, 612, 608, 608, 608, 608, 608, 613, 608, 613, 608, 613, 613, 613, 613, - 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 608, 614, 615, 613, 613, - 616, 608, 616, 617, 618, 608, 608, 608, 619, 620, 608, 608, 608, 608, 608, - 621, 608, 621, 608, 608, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, - 621, 621, 621, 614, 615, 608, 608, 608, 622, 623, 608, 608, 608, 624, 608, - 624, 608, 608, 624, 624, 624, 614, 615, 608, 608, 608, - - 625, 626, 608, 608, 608, 627, 608, 627, 608, 627, 627, 627, 627, 627, 627, - 614, 615, 608, 608, 611, 608, 612, 628, 608, 608, 608, 608, 608, 613, 613, - 613, 613, 608, 608, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, - 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 608, 608, 608, 614, - 629, 615, 613, 616, 630, 617, 631, 618, 608, 608, 619, 608, 620, 608, 608, - 608, 621, 621, 621, 621, 608, 621, 621, 621, 621, 621, 621, 621, 621, 621, - 621, 608, 608, 622, 608, 623, 608, 608, 608, 624, - - 624, 624, 624, 608, 608, 608, 625, 608, 626, 608, 608, 608, 627, 627, 627, - 627, 627, 627, 627, 628, 613, 613, 608, 613, 613, 613, 613, 613, 613, 613, - 613, 613, 613, 613, 608, 613, 613, 613, 613, 608, 613, 613, 613, 613, 613, - 613, 613, 613, 613, 608, 613, 613, 629, 630, 631, 621, 621, 621, 621, 621, - 621, 621, 621, 621, 627, 627, 627, 608, 613, 608, 613, 608, 608, 613, 613, - 613, 613, 613, 613, 608, 613, 613, 613, 613, 613, 608, 608, 613, 613, 613, - 608, 608, 613, 613, 613, 613, 613, 613, 613, 613, - - 613, 613, 608, 608, 613, 621, 621, 621, 621, 621, 621, 621, 621, 627, 627, - 627, 608, 608, 608, 608, 613, 613, 608, 613, 613, 613, 608, 608, 608, 613, - 613, 608, 613, 613, 608, 613, 613, 613, 608, 613, 613, 613, 613, 613, 613, - 613, 613, 613, 613, 613, 608, 613, 613, 621, 621, 621, 621, 621, 621, 621, - 621, 627, 627, 613, 613, 608, 608, 613, 613, 613, 608, 608, 608, 613, 608, - 613, 608, 608, 613, 608, 613, 613, 613, 608, 608, 613, 613, 613, 613, 613, - 613, 613, 608, 608, 608, 613, 608, 608, 608, 613, - - 613, 621, 621, 621, 621, 621, 621, 621, 621, 627, 627, 613, 608, 613, 613, - 613, 608, 608, 613, 608, 608, 613, 608, 613, 613, 613, 613, 613, 613, 613, - 613, 613, 613, 613, 608, 608, 608, 613, 621, 621, 621, 621, 621, 621, 621, - 621, 627, 627, 613, 608, 613, 613, 613, 608, 608, 613, 613, 608, 613, 613, - 613, 613, 613, 613, 608, 613, 608, 608, 621, 621, 621, 621, 621, 621, 608, - 613, 608, 613, 613, 613, 608, 608, 613, 608, 613, 613, 608, 613, 613, 613, - 613, 613, 608, 608, 621, 621, 621, 608, 608, 608, - - 608, 608, 613, 613, 613, 608, 608, 613, 608, 608, 613, 608, 613, 613, 608, - 613, 613, 608, 608, 608, 613, 613, 613, 608, 608, 613, 608, 613, 608, 613, - 613, 608, 608, 608, 608, 608, 608, 613, 613, 613, 608, 608, 613, 608, 608, - 608, 608, 613, 613, 608, 608, 608, 608, 613, 613, 608, 608, 608, 613, 608, - 608, 608, 608, 608, 613, 608, 608, 608, 608, 608, 608, 613, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, - - 608, 608, 608, 608, 608, 608, 608, 0, 608, 608, 608, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, - 608}; - -static const flex_int16_t yy_nxt[3774] = { - 0, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 12, 24, - 24, 24, 24, 25, 12, 12, 12, 26, 27, 28, 29, 30, 31, 27, 27, - 32, 27, 27, 27, 27, 27, 27, 33, 27, 34, 35, 36, 27, 37, 27, - 27, 27, 12, 26, 27, 28, 29, 30, 31, 27, 27, 32, 27, 27, 27, - 27, 27, 27, 33, 34, 35, 36, 27, 37, 27, 27, 27, 38, 39, 27, - 40, 46, 608, 78, 608, 41, 372, 47, 79, 46, 42, 43, 43, 43, 43, - 48, 116, 213, 200, 177, 49, 117, 124, 335, 124, 129, - - 125, 125, 125, 125, 124, 372, 124, 605, 125, 125, 125, 125, 174, 595, 174, - 373, 175, 175, 175, 175, 174, 590, 174, 335, 175, 175, 175, 175, 197, 571, - 197, 574, 198, 198, 198, 198, 542, 545, 131, 132, 373, 535, 515, 44, 50, - 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 50, 62, 62, 62, - 62, 63, 64, 50, 50, 65, 66, 67, 67, 67, 67, 67, 67, 68, 69, - 67, 70, 67, 67, 71, 72, 67, 73, 74, 75, 67, 67, 67, 67, 67, - 50, 65, 66, 67, 67, 67, 67, 67, 67, 68, - - 69, 67, 70, 67, 67, 71, 72, 73, 74, 75, 67, 67, 67, 67, 67, - 76, 77, 67, 80, 81, 82, 83, 84, 80, 80, 85, 86, 87, 88, 89, - 80, 90, 90, 90, 90, 91, 92, 80, 80, 158, 158, 158, 158, 118, 126, - 127, 126, 133, 169, 176, 169, 192, 124, 205, 124, 380, 125, 125, 125, 125, - 118, 124, 484, 124, 80, 130, 130, 130, 130, 124, 157, 124, 127, 130, 130, - 130, 130, 133, 475, 465, 380, 158, 158, 158, 158, 608, 437, 608, 169, 94, - 95, 80, 81, 82, 83, 84, 80, 80, 96, 86, - - 87, 88, 89, 97, 90, 90, 90, 90, 91, 92, 80, 80, 119, 450, 128, - 182, 134, 170, 399, 170, 193, 375, 206, 131, 132, 272, 272, 272, 272, 119, - 351, 131, 132, 291, 291, 291, 291, 80, 450, 159, 182, 128, 303, 303, 303, - 303, 134, 179, 180, 197, 339, 197, 332, 198, 198, 198, 198, 170, 317, 317, - 317, 317, 94, 95, 98, 99, 100, 101, 102, 98, 98, 103, 104, 105, 106, - 107, 98, 108, 108, 108, 108, 109, 98, 98, 98, 110, 110, 111, 110, 110, - 110, 110, 110, 112, 110, 110, 110, 110, 110, 110, - - 110, 110, 113, 110, 110, 110, 110, 110, 110, 110, 98, 110, 110, 111, 110, - 110, 110, 110, 110, 112, 110, 110, 110, 110, 110, 110, 110, 113, 110, 110, - 110, 110, 110, 110, 110, 114, 115, 110, 608, 323, 608, 608, 280, 608, 192, - 608, 205, 608, 413, 199, 192, 270, 417, 140, 268, 608, 458, 608, 210, 418, - 210, 135, 211, 211, 211, 211, 250, 136, 137, 240, 138, 139, 212, 205, 413, - 235, 141, 157, 417, 140, 142, 458, 608, 235, 608, 418, 223, 135, 158, 158, - 158, 158, 136, 137, 143, 138, 608, 139, 608, 481, - - 131, 132, 141, 131, 132, 286, 142, 131, 132, 482, 608, 144, 608, 193, 145, - 206, 208, 131, 132, 193, 143, 608, 502, 608, 481, 146, 608, 423, 608, 545, - 208, 286, 183, 205, 482, 147, 144, 151, 546, 145, 148, 608, 206, 608, 131, - 132, 159, 502, 608, 149, 608, 146, 287, 423, 608, 150, 608, 183, 179, 180, - 154, 147, 519, 151, 152, 148, 156, 155, 454, 195, 153, 195, 131, 132, 192, - 149, 319, 319, 319, 319, 150, 172, 172, 131, 132, 169, 154, 519, 131, 132, - 152, 157, 156, 155, 454, 124, 153, 124, 547, 163, - - 163, 163, 163, 131, 132, 377, 377, 377, 377, 133, 131, 132, 384, 384, 384, - 384, 131, 132, 608, 608, 608, 127, 608, 608, 608, 608, 608, 608, 608, 118, - 608, 608, 608, 608, 608, 608, 608, 129, 608, 608, 608, 608, 174, 455, 174, - 157, 178, 178, 178, 178, 121, 477, 176, 169, 608, 129, 608, 131, 132, 544, - 174, 487, 174, 129, 175, 175, 175, 175, 174, 455, 174, 129, 178, 178, 178, - 178, 608, 477, 608, 121, 608, 506, 608, 608, 544, 608, 608, 487, 608, 507, - 608, 118, 608, 608, 512, 608, 161, 518, 123, 186, - - 280, 184, 208, 187, 179, 180, 185, 506, 608, 189, 608, 520, 608, 208, 608, - 507, 179, 180, 161, 188, 512, 524, 170, 518, 327, 186, 608, 184, 608, 187, - 179, 180, 185, 204, 328, 189, 123, 520, 179, 180, 190, 191, 179, 180, 188, - 179, 180, 524, 179, 180, 327, 195, 179, 180, 560, 179, 180, 608, 608, 608, - 328, 608, 608, 608, 608, 190, 191, 195, 169, 329, 179, 180, 161, 181, 179, - 180, 608, 608, 608, 560, 608, 608, 608, 608, 564, 199, 192, 177, 202, 203, - 123, 172, 525, 197, 177, 197, 527, 198, 198, 198, - - 198, 197, 529, 197, 569, 201, 201, 201, 201, 564, 197, 172, 197, 177, 201, - 201, 201, 201, 525, 608, 608, 608, 527, 608, 608, 608, 608, 167, 529, 569, - 192, 608, 608, 608, 534, 608, 608, 608, 608, 212, 205, 608, 200, 608, 608, - 537, 608, 210, 165, 210, 161, 211, 211, 211, 211, 193, 200, 541, 123, 608, - 534, 608, 121, 202, 203, 535, 535, 550, 200, 121, 608, 537, 202, 203, 210, - 551, 210, 573, 214, 214, 214, 214, 210, 541, 210, 217, 211, 211, 211, 211, - 210, 608, 210, 550, 214, 214, 214, 214, 608, 553, - - 608, 551, 573, 215, 216, 584, 131, 132, 608, 206, 608, 217, 124, 558, 124, - 608, 125, 125, 125, 125, 608, 215, 216, 218, 219, 553, 608, 608, 608, 608, - 584, 608, 608, 608, 608, 536, 215, 216, 205, 558, 608, 608, 608, 608, 608, - 608, 608, 608, 593, 218, 219, 213, 215, 216, 223, 223, 397, 397, 397, 397, - 215, 216, 608, 323, 213, 608, 272, 272, 272, 272, 215, 216, 608, 593, 124, - 561, 124, 213, 125, 125, 125, 125, 124, 608, 124, 366, 130, 130, 130, 130, - 608, 608, 608, 562, 608, 608, 608, 608, 608, 608, - - 608, 561, 608, 608, 608, 608, 608, 545, 608, 129, 608, 366, 608, 223, 223, - 608, 546, 608, 608, 562, 608, 608, 563, 608, 273, 566, 222, 129, 567, 221, - 568, 570, 367, 601, 608, 129, 608, 608, 608, 608, 608, 576, 608, 608, 131, - 132, 225, 608, 563, 228, 608, 566, 222, 229, 567, 221, 568, 570, 601, 226, - 608, 227, 608, 232, 608, 577, 608, 576, 131, 132, 608, 225, 131, 132, 228, - 230, 547, 131, 132, 229, 131, 132, 608, 224, 132, 226, 608, 227, 608, 232, - 233, 577, 608, 231, 608, 608, 131, 132, 235, 131, - - 132, 230, 131, 132, 578, 608, 247, 608, 535, 535, 608, 234, 608, 608, 608, - 608, 233, 608, 231, 608, 581, 236, 131, 132, 238, 608, 131, 132, 240, 240, - 578, 608, 247, 608, 552, 608, 608, 234, 608, 608, 239, 608, 608, 243, 608, - 242, 581, 236, 131, 132, 238, 248, 608, 608, 131, 132, 250, 250, 608, 608, - 552, 608, 252, 608, 608, 239, 608, 237, 132, 243, 242, 249, 131, 132, 244, - 131, 132, 248, 536, 131, 132, 583, 608, 245, 608, 124, 246, 124, 252, 163, - 163, 163, 163, 131, 132, 608, 249, 585, 241, 132, - - 244, 131, 132, 608, 131, 132, 608, 583, 608, 245, 608, 174, 246, 174, 608, - 175, 175, 175, 175, 608, 586, 131, 132, 585, 608, 608, 251, 132, 174, 608, - 174, 608, 175, 175, 175, 175, 174, 608, 174, 608, 178, 178, 178, 178, 179, - 180, 586, 131, 132, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 608, 608, 177, 587, 179, 180, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 608, 420, 420, 420, 420, 177, 608, 257, 608, - 608, 179, 180, 256, 177, 587, 258, 608, 179, 180, - - 608, 608, 608, 259, 608, 608, 608, 260, 588, 608, 608, 608, 574, 574, 257, - 435, 435, 435, 435, 256, 589, 264, 258, 493, 493, 493, 493, 179, 180, 259, - 594, 261, 597, 260, 588, 179, 180, 608, 179, 180, 608, 179, 180, 608, 608, - 608, 589, 264, 598, 179, 180, 498, 498, 498, 498, 590, 594, 261, 597, 608, - 262, 608, 202, 203, 591, 600, 179, 180, 602, 608, 263, 179, 180, 197, 598, - 197, 603, 198, 198, 198, 198, 608, 575, 197, 604, 197, 262, 198, 198, 198, - 198, 600, 608, 197, 602, 197, 263, 201, 201, 201, - - 201, 608, 603, 608, 608, 179, 180, 608, 608, 608, 604, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 608, 608, 210, 592, 210, 200, 211, 211, 211, - 211, 210, 608, 210, 608, 211, 211, 211, 211, 608, 608, 210, 280, 210, 200, - 214, 214, 214, 214, 608, 608, 608, 200, 608, 608, 202, 203, 608, 608, 265, - 608, 484, 608, 215, 216, 608, 608, 608, 515, 608, 608, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 268, 268, 509, 213, 265, 608, 267, 608, 608, - 532, 608, 608, 608, 215, 216, 608, 270, 270, 608, - - 266, 608, 213, 215, 216, 608, 608, 608, 608, 509, 213, 281, 132, 267, 608, - 608, 532, 608, 274, 608, 608, 608, 215, 216, 595, 595, 266, 608, 608, 608, - 510, 608, 608, 608, 608, 608, 608, 533, 223, 608, 608, 608, 608, 608, 274, - 275, 608, 608, 215, 216, 590, 269, 132, 277, 608, 276, 608, 278, 608, 591, - 608, 131, 132, 608, 129, 608, 608, 271, 132, 608, 275, 608, 279, 608, 282, - 608, 608, 131, 132, 277, 276, 131, 132, 278, 608, 608, 608, 608, 608, 608, - 608, 608, 608, 283, 596, 608, 608, 284, 279, 608, - - 282, 285, 608, 131, 132, 608, 608, 289, 608, 582, 582, 582, 582, 608, 608, - 288, 131, 132, 283, 592, 131, 132, 608, 284, 608, 131, 132, 285, 608, 608, - 240, 240, 608, 289, 608, 131, 132, 290, 608, 608, 608, 288, 291, 291, 291, - 291, 131, 132, 605, 131, 132, 608, 131, 132, 608, 608, 608, 606, 608, 608, - 608, 608, 290, 608, 608, 235, 608, 608, 131, 132, 608, 608, 608, 542, 608, - 608, 608, 608, 608, 608, 608, 240, 608, 608, 608, 608, 608, 608, 608, 608, - 608, 129, 294, 608, 293, 556, 295, 297, 296, 608, - - 292, 608, 608, 608, 608, 608, 608, 129, 608, 608, 608, 298, 599, 599, 599, - 599, 608, 607, 294, 293, 608, 556, 295, 297, 296, 608, 131, 132, 608, 300, - 605, 299, 301, 608, 608, 608, 608, 298, 302, 606, 131, 132, 557, 608, 131, - 132, 608, 131, 132, 608, 131, 132, 608, 608, 608, 300, 299, 608, 301, 250, - 250, 131, 132, 302, 131, 132, 305, 307, 131, 132, 608, 303, 303, 303, 303, - 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 250, 608, 571, 608, - 608, 305, 608, 307, 608, 608, 131, 132, 608, 607, - - 608, 608, 608, 608, 608, 608, 608, 308, 306, 608, 579, 608, 129, 608, 179, - 180, 608, 608, 608, 608, 608, 311, 608, 608, 608, 309, 608, 608, 608, 304, - 608, 608, 310, 308, 306, 608, 579, 608, 608, 608, 608, 608, 313, 312, 608, - 179, 180, 311, 608, 179, 180, 309, 179, 180, 608, 608, 608, 580, 310, 608, - 315, 608, 179, 180, 314, 608, 179, 180, 313, 312, 608, 179, 180, 608, 608, - 608, 608, 316, 179, 180, 268, 268, 608, 608, 179, 180, 315, 608, 608, 314, - 215, 216, 317, 317, 317, 317, 608, 608, 608, 215, - - 216, 608, 608, 316, 608, 608, 608, 608, 608, 608, 608, 608, 270, 270, 323, - 268, 215, 216, 608, 608, 608, 608, 321, 608, 319, 319, 319, 319, 608, 608, - 608, 608, 608, 608, 608, 608, 131, 132, 608, 270, 608, 129, 608, 325, 608, - 608, 608, 608, 321, 322, 318, 608, 608, 608, 608, 608, 608, 608, 131, 132, - 608, 331, 608, 608, 608, 129, 608, 608, 608, 326, 608, 608, 608, 608, 322, - 608, 608, 280, 332, 332, 131, 132, 320, 324, 132, 334, 608, 331, 608, 330, - 608, 608, 608, 608, 326, 608, 608, 608, 608, 608, - - 131, 132, 608, 129, 131, 132, 608, 131, 132, 338, 334, 608, 608, 608, 330, - 608, 131, 132, 339, 339, 608, 336, 131, 132, 608, 337, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 338, 608, 608, 608, 608, 342, 608, 608, 608, 608, - 341, 336, 608, 333, 132, 337, 343, 131, 132, 345, 131, 132, 608, 608, 131, - 132, 608, 608, 608, 608, 342, 608, 608, 344, 608, 608, 341, 608, 131, 132, - 608, 608, 343, 608, 608, 345, 347, 348, 349, 608, 608, 608, 354, 340, 132, - 346, 131, 132, 344, 608, 357, 131, 132, 351, 351, - - 608, 131, 132, 608, 131, 132, 608, 608, 608, 608, 608, 608, 608, 354, 608, - 346, 350, 608, 608, 608, 357, 608, 608, 131, 132, 353, 179, 180, 608, 179, - 180, 608, 355, 608, 608, 608, 608, 356, 131, 132, 608, 350, 608, 608, 608, - 608, 131, 132, 608, 608, 608, 353, 358, 608, 608, 608, 608, 361, 355, 608, - 360, 608, 608, 356, 608, 608, 608, 608, 352, 132, 608, 131, 132, 359, 179, - 180, 608, 608, 358, 179, 180, 608, 608, 361, 608, 360, 608, 608, 608, 608, - 608, 608, 608, 179, 180, 608, 179, 180, 363, 359, - - 608, 608, 179, 180, 608, 215, 216, 608, 608, 608, 608, 608, 608, 608, 362, - 179, 180, 608, 364, 371, 365, 608, 608, 608, 363, 608, 608, 608, 608, 608, - 608, 608, 323, 608, 608, 608, 608, 608, 608, 362, 608, 608, 608, 364, 215, - 216, 365, 368, 215, 216, 608, 131, 132, 375, 375, 608, 608, 369, 129, 608, - 608, 608, 374, 608, 608, 608, 608, 370, 608, 608, 131, 132, 608, 368, 608, - 608, 608, 608, 608, 131, 132, 608, 608, 369, 608, 608, 608, 608, 374, 332, - 332, 608, 370, 608, 379, 131, 132, 608, 131, 132, - - 382, 377, 377, 377, 377, 608, 608, 608, 608, 608, 608, 608, 608, 608, 383, - 608, 332, 608, 339, 339, 379, 608, 608, 376, 132, 608, 382, 608, 608, 608, - 384, 384, 384, 384, 608, 381, 131, 132, 608, 388, 383, 608, 129, 608, 608, - 608, 608, 131, 132, 608, 608, 608, 608, 131, 132, 608, 386, 608, 391, 378, - 608, 381, 608, 608, 608, 388, 608, 608, 608, 608, 608, 387, 390, 339, 608, - 389, 608, 131, 132, 608, 608, 393, 386, 608, 391, 394, 608, 608, 385, 131, - 132, 608, 608, 395, 392, 608, 387, 608, 390, 129, - - 608, 389, 608, 131, 132, 608, 131, 132, 608, 608, 608, 608, 131, 132, 608, - 351, 351, 131, 132, 608, 392, 608, 608, 608, 608, 608, 396, 397, 397, 397, - 397, 608, 608, 608, 608, 608, 131, 132, 608, 399, 399, 131, 132, 608, 608, - 131, 132, 608, 608, 608, 608, 608, 396, 131, 132, 608, 608, 608, 402, 608, - 608, 608, 608, 608, 608, 608, 351, 608, 608, 608, 131, 132, 608, 608, 608, - 608, 608, 400, 608, 608, 608, 608, 608, 608, 402, 398, 608, 405, 403, 608, - 406, 608, 129, 608, 608, 179, 180, 608, 608, 608, - - 608, 608, 400, 608, 608, 408, 608, 404, 608, 401, 132, 608, 608, 405, 403, - 407, 406, 608, 409, 410, 608, 608, 608, 608, 608, 179, 180, 608, 608, 179, - 180, 408, 404, 608, 179, 180, 411, 608, 179, 180, 407, 608, 179, 180, 409, - 410, 608, 608, 608, 608, 608, 179, 180, 608, 608, 608, 608, 608, 608, 608, - 179, 180, 411, 131, 132, 608, 215, 216, 608, 608, 608, 412, 608, 608, 608, - 375, 375, 608, 608, 414, 608, 419, 608, 608, 215, 216, 608, 420, 420, 420, - 420, 608, 608, 608, 415, 608, 608, 412, 608, 608, - - 608, 416, 608, 608, 608, 414, 608, 419, 131, 132, 608, 608, 608, 608, 608, - 131, 132, 608, 131, 132, 415, 608, 422, 608, 608, 608, 416, 426, 608, 424, - 131, 132, 427, 608, 131, 132, 608, 608, 608, 425, 608, 608, 608, 608, 608, - 421, 608, 375, 422, 608, 608, 608, 608, 426, 608, 424, 608, 427, 131, 132, - 608, 608, 131, 132, 608, 425, 131, 132, 429, 608, 608, 608, 608, 129, 131, - 132, 608, 430, 608, 428, 608, 608, 608, 608, 608, 131, 132, 608, 608, 608, - 608, 608, 432, 608, 429, 608, 608, 608, 608, 431, - - 608, 608, 608, 430, 428, 608, 131, 132, 399, 399, 434, 131, 132, 608, 131, - 132, 608, 608, 432, 433, 435, 435, 435, 435, 431, 437, 437, 608, 608, 608, - 608, 131, 132, 608, 608, 608, 434, 608, 131, 132, 608, 608, 608, 608, 433, - 439, 608, 608, 608, 608, 131, 132, 608, 131, 132, 608, 608, 608, 440, 608, - 608, 608, 608, 608, 608, 608, 399, 441, 608, 608, 608, 439, 608, 608, 608, - 608, 608, 608, 436, 608, 608, 608, 608, 608, 440, 608, 447, 608, 442, 179, - 180, 608, 129, 441, 443, 438, 132, 444, 608, 608, - - 608, 608, 179, 180, 608, 446, 608, 608, 608, 179, 180, 608, 447, 445, 442, - 448, 608, 608, 608, 608, 443, 608, 608, 444, 608, 179, 180, 608, 608, 608, - 608, 446, 215, 216, 608, 449, 179, 180, 445, 179, 180, 448, 179, 180, 457, - 179, 180, 608, 608, 608, 608, 451, 608, 608, 608, 608, 608, 608, 608, 608, - 449, 215, 216, 608, 608, 452, 131, 132, 608, 608, 457, 456, 608, 453, 608, - 608, 459, 451, 131, 132, 608, 131, 132, 608, 608, 608, 608, 608, 608, 131, - 132, 452, 608, 462, 608, 460, 608, 456, 608, 453, - - 608, 461, 459, 608, 608, 608, 608, 608, 608, 131, 132, 608, 131, 132, 463, - 131, 132, 608, 131, 132, 608, 460, 608, 465, 465, 608, 461, 608, 608, 437, - 437, 608, 608, 608, 131, 132, 608, 608, 608, 608, 463, 467, 467, 467, 467, - 131, 132, 608, 131, 132, 608, 608, 608, 608, 131, 132, 464, 608, 608, 608, - 131, 132, 608, 608, 608, 131, 132, 608, 131, 132, 608, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 464, 131, 132, 437, 608, 608, 179, 180, 608, - 608, 608, 608, 466, 132, 469, 608, 608, 608, 468, - - 608, 608, 608, 608, 608, 608, 608, 608, 470, 608, 129, 608, 179, 180, 608, - 608, 608, 608, 608, 608, 608, 469, 608, 471, 215, 216, 608, 608, 472, 608, - 608, 608, 179, 180, 470, 475, 475, 473, 474, 608, 608, 608, 608, 608, 608, - 608, 608, 479, 608, 471, 608, 608, 179, 180, 472, 608, 608, 608, 608, 608, - 179, 180, 473, 608, 474, 179, 180, 478, 608, 179, 180, 483, 608, 479, 608, - 608, 215, 216, 484, 480, 608, 608, 179, 180, 608, 608, 485, 608, 608, 131, - 132, 608, 608, 478, 608, 608, 608, 483, 608, 608, - - 608, 608, 131, 132, 480, 476, 132, 608, 488, 608, 131, 132, 608, 608, 608, - 608, 608, 131, 132, 608, 608, 608, 608, 490, 608, 465, 465, 608, 608, 489, - 437, 437, 491, 608, 488, 608, 608, 493, 493, 493, 493, 608, 467, 467, 467, - 467, 608, 486, 132, 490, 608, 608, 492, 608, 489, 608, 131, 132, 491, 608, - 131, 132, 608, 608, 608, 608, 608, 608, 608, 131, 132, 608, 608, 608, 131, - 132, 608, 492, 608, 608, 495, 131, 132, 496, 131, 132, 608, 608, 608, 497, - 608, 608, 608, 608, 608, 494, 608, 465, 608, 608, - - 468, 608, 608, 515, 608, 608, 495, 608, 608, 496, 608, 608, 608, 179, 180, - 497, 504, 475, 475, 608, 608, 608, 608, 129, 179, 180, 608, 179, 180, 498, - 498, 498, 498, 179, 180, 608, 608, 608, 179, 180, 503, 608, 504, 499, 608, - 500, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 179, 180, 475, 608, - 508, 131, 132, 608, 608, 608, 503, 608, 608, 499, 608, 500, 516, 132, 608, - 505, 608, 608, 608, 608, 608, 608, 131, 132, 129, 511, 508, 501, 608, 608, - 608, 513, 608, 608, 608, 608, 514, 131, 132, 484, - - 505, 608, 608, 608, 608, 608, 131, 132, 608, 608, 608, 511, 608, 608, 608, - 608, 608, 513, 517, 608, 608, 608, 514, 608, 608, 129, 608, 131, 132, 608, - 131, 132, 608, 608, 608, 608, 608, 608, 131, 132, 608, 131, 132, 608, 517, - 608, 608, 521, 608, 608, 608, 523, 522, 608, 608, 608, 608, 608, 528, 608, - 608, 608, 608, 608, 608, 131, 132, 608, 608, 608, 179, 180, 608, 521, 179, - 180, 608, 523, 522, 526, 608, 179, 180, 608, 528, 608, 131, 132, 530, 608, - 608, 608, 540, 608, 131, 132, 608, 131, 132, 608, - - 608, 608, 608, 608, 526, 131, 132, 538, 608, 531, 131, 132, 608, 530, 608, - 131, 132, 539, 540, 131, 132, 608, 608, 608, 608, 608, 608, 608, 608, 131, - 132, 542, 515, 538, 608, 531, 608, 608, 608, 608, 608, 608, 608, 539, 608, - 131, 132, 608, 608, 608, 608, 608, 608, 131, 132, 608, 608, 608, 129, 549, - 608, 608, 548, 131, 132, 554, 608, 608, 608, 608, 608, 608, 608, 608, 131, - 132, 608, 608, 608, 608, 608, 555, 608, 571, 608, 549, 608, 608, 548, 608, - 608, 554, 608, 608, 608, 608, 131, 132, 608, 608, - - 543, 132, 608, 608, 131, 132, 559, 555, 608, 131, 132, 608, 131, 132, 608, - 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 542, 608, 608, 131, 132, - 608, 608, 559, 131, 132, 608, 608, 608, 131, 132, 608, 608, 131, 132, 608, - 608, 131, 132, 608, 565, 608, 129, 572, 132, 608, 608, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 571, 574, 574, 608, 608, 595, 595, 608, 608, 608, - 565, 608, 608, 582, 582, 582, 582, 599, 599, 599, 599, 131, 132, 608, 608, - 608, 129, 608, 608, 608, 608, 608, 608, 608, 608, - - 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 575, 608, 608, 608, 596, 45, 45, 45, 93, - 93, 93, 120, 608, 120, 122, 608, 122, 160, 608, 160, 162, 608, 162, 164, - 608, 164, 166, 608, 166, 168, 608, 168, 171, 608, 171, 173, 608, 173, 194, - 608, 194, 196, 608, 196, 207, 608, 207, 209, 608, 209, 220, 608, 220, 253, - 608, 253, 254, 608, 254, 255, 608, 255, 11, 608, - - 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608}; - -static const flex_int16_t yy_chk[3774] = { - 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 2, 3, 27, 6, 27, 2, 327, 3, 6, 4, 2, 2, 2, 2, 2, - 4, 10, 627, 624, 621, 4, 10, 20, 286, 20, 613, - - 20, 20, 20, 20, 23, 327, 23, 607, 23, 23, 23, 23, 58, 596, 58, - 328, 58, 58, 58, 58, 61, 592, 61, 286, 61, 61, 61, 61, 86, 580, - 86, 575, 86, 86, 86, 86, 557, 547, 27, 27, 328, 536, 533, 2, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 158, 158, 158, 158, 14, 21, - 21, 25, 25, 52, 63, 63, 82, 21, 100, 21, 335, 21, 21, 21, 21, - 118, 22, 510, 22, 7, 22, 22, 22, 22, 24, 40, 24, 127, 24, 24, - 24, 24, 133, 501, 494, 335, 40, 40, 40, 40, 65, 468, 65, 169, 7, - 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, - - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 14, 413, 21, - 65, 25, 52, 436, 63, 82, 421, 100, 22, 22, 272, 272, 272, 272, 118, - 398, 24, 24, 291, 291, 291, 291, 8, 413, 40, 65, 127, 303, 303, 303, - 303, 133, 65, 65, 89, 385, 89, 378, 89, 89, 89, 89, 169, 317, 317, - 317, 317, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 26, 367, 26, 29, 329, 29, 192, - 28, 205, 28, 366, 91, 91, 320, 372, 29, 318, 30, 423, 30, 104, 373, - 104, 26, 104, 104, 104, 104, 304, 26, 26, 292, 26, 28, 109, 109, 366, - 287, 30, 157, 372, 29, 30, 423, 31, 235, 31, 373, 273, 26, 157, 157, - 157, 157, 26, 26, 31, 26, 66, 28, 66, 454, - - 26, 26, 30, 29, 29, 235, 30, 28, 28, 455, 32, 31, 32, 192, 31, - 205, 209, 30, 30, 91, 31, 34, 477, 34, 454, 32, 33, 380, 33, 529, - 207, 235, 66, 206, 455, 32, 31, 34, 529, 31, 32, 36, 109, 36, 31, - 31, 157, 477, 35, 33, 35, 32, 235, 380, 37, 33, 37, 66, 66, 66, - 36, 32, 500, 34, 35, 32, 37, 36, 417, 196, 35, 194, 32, 32, 193, - 33, 319, 319, 319, 319, 33, 173, 171, 34, 34, 170, 36, 500, 33, 33, - 35, 159, 37, 36, 417, 43, 35, 43, 529, 43, - - 43, 43, 43, 36, 36, 377, 377, 377, 377, 134, 35, 35, 384, 384, 384, - 384, 37, 37, 38, 38, 38, 128, 38, 38, 38, 38, 39, 39, 39, 38, - 39, 39, 39, 39, 44, 44, 44, 39, 44, 44, 44, 44, 60, 418, 60, - 44, 60, 60, 60, 60, 122, 450, 59, 59, 67, 38, 67, 43, 43, 527, - 59, 458, 59, 39, 59, 59, 59, 59, 62, 418, 62, 44, 62, 62, 62, - 62, 68, 450, 68, 120, 69, 481, 69, 70, 527, 70, 71, 458, 71, 482, - 72, 119, 72, 73, 487, 73, 116, 499, 103, 70, - - 280, 68, 102, 71, 60, 60, 69, 481, 74, 73, 74, 502, 75, 101, 75, - 482, 67, 67, 96, 72, 487, 506, 59, 499, 280, 70, 93, 68, 93, 71, - 62, 62, 69, 92, 280, 73, 85, 502, 68, 68, 74, 75, 69, 69, 72, - 70, 70, 506, 71, 71, 280, 84, 72, 72, 550, 73, 73, 76, 76, 76, - 280, 76, 76, 76, 76, 74, 75, 83, 76, 280, 74, 74, 78, 64, 75, - 75, 77, 77, 77, 550, 77, 77, 77, 77, 558, 87, 87, 77, 93, 93, - 57, 54, 507, 87, 76, 87, 509, 87, 87, 87, - - 87, 88, 512, 88, 563, 88, 88, 88, 88, 558, 90, 53, 90, 77, 90, - 90, 90, 90, 507, 94, 94, 94, 509, 94, 94, 94, 94, 48, 512, 563, - 94, 95, 95, 95, 518, 95, 95, 95, 95, 105, 105, 110, 95, 110, 129, - 520, 129, 105, 47, 105, 41, 105, 105, 105, 105, 87, 94, 524, 19, 111, - 518, 111, 16, 88, 88, 519, 519, 532, 95, 15, 11, 520, 90, 90, 106, - 534, 106, 566, 106, 106, 106, 106, 107, 524, 107, 111, 107, 107, 107, 107, - 108, 0, 108, 532, 108, 108, 108, 108, 112, 537, - - 112, 534, 566, 110, 110, 577, 129, 129, 113, 105, 113, 111, 124, 544, 124, - 0, 124, 124, 124, 124, 0, 111, 111, 112, 113, 537, 0, 114, 114, 114, - 577, 114, 114, 114, 114, 519, 106, 106, 114, 544, 115, 115, 115, 0, 115, - 115, 115, 115, 586, 112, 113, 115, 108, 108, 223, 223, 397, 397, 397, 397, - 112, 112, 0, 323, 114, 0, 223, 223, 223, 223, 113, 113, 0, 586, 125, - 551, 125, 115, 125, 125, 125, 125, 130, 0, 130, 323, 130, 130, 130, 130, - 131, 131, 131, 552, 131, 131, 131, 131, 132, 132, - - 132, 551, 132, 132, 132, 132, 135, 545, 135, 132, 136, 323, 136, 137, 137, - 138, 545, 138, 140, 552, 140, 137, 556, 137, 223, 560, 136, 131, 561, 135, - 562, 564, 323, 598, 139, 132, 139, 141, 0, 141, 143, 568, 143, 0, 130, - 130, 138, 0, 556, 140, 0, 560, 136, 141, 561, 135, 562, 564, 598, 139, - 142, 139, 142, 143, 144, 569, 144, 568, 135, 135, 0, 138, 136, 136, 140, - 142, 545, 138, 138, 141, 140, 140, 0, 137, 137, 139, 145, 139, 145, 143, - 144, 569, 152, 142, 152, 0, 139, 139, 146, 141, - - 141, 142, 143, 143, 570, 146, 152, 146, 535, 535, 147, 145, 147, 149, 0, - 149, 144, 150, 142, 150, 573, 146, 142, 142, 147, 0, 144, 144, 148, 148, - 570, 153, 152, 153, 535, 0, 148, 145, 148, 156, 147, 156, 154, 150, 154, - 149, 573, 146, 145, 145, 147, 153, 0, 0, 152, 152, 155, 155, 0, 151, - 535, 151, 156, 0, 155, 147, 155, 146, 146, 150, 149, 154, 147, 147, 151, - 149, 149, 153, 535, 150, 150, 576, 177, 151, 177, 163, 151, 163, 156, 163, - 163, 163, 163, 153, 153, 0, 154, 578, 148, 148, - - 151, 156, 156, 0, 154, 154, 0, 576, 182, 151, 182, 174, 151, 174, 0, - 174, 174, 174, 174, 0, 579, 151, 151, 578, 0, 0, 155, 155, 175, 183, - 175, 183, 175, 175, 175, 175, 178, 0, 178, 0, 178, 178, 178, 178, 177, - 177, 579, 163, 163, 179, 179, 179, 0, 179, 179, 179, 179, 180, 180, 180, - 0, 180, 180, 180, 180, 184, 0, 184, 180, 581, 182, 182, 0, 185, 0, - 185, 186, 0, 186, 187, 0, 187, 420, 420, 420, 420, 179, 188, 186, 188, - 0, 183, 183, 185, 180, 581, 187, 0, 178, 178, - - 200, 0, 200, 188, 189, 0, 189, 188, 583, 191, 0, 191, 567, 567, 186, - 435, 435, 435, 435, 185, 584, 191, 187, 493, 493, 493, 493, 184, 184, 188, - 587, 189, 589, 188, 583, 185, 185, 0, 186, 186, 0, 187, 187, 190, 0, - 190, 584, 191, 593, 188, 188, 498, 498, 498, 498, 585, 587, 189, 589, 0, - 190, 0, 200, 200, 585, 597, 189, 189, 601, 0, 190, 191, 191, 197, 593, - 197, 602, 197, 197, 197, 197, 0, 567, 198, 603, 198, 190, 198, 198, 198, - 198, 597, 0, 201, 601, 201, 190, 201, 201, 201, - - 201, 213, 602, 213, 0, 190, 190, 202, 202, 202, 603, 202, 202, 202, 202, - 203, 203, 203, 0, 203, 203, 203, 203, 210, 585, 210, 203, 210, 210, 210, - 210, 211, 217, 211, 217, 211, 211, 211, 211, 0, 0, 214, 230, 214, 202, - 214, 214, 214, 214, 230, 0, 230, 203, 0, 0, 201, 201, 0, 0, 217, - 219, 484, 219, 213, 213, 215, 215, 215, 515, 215, 215, 215, 215, 216, 216, - 216, 0, 216, 216, 216, 216, 221, 221, 484, 216, 217, 218, 219, 218, 221, - 515, 221, 0, 0, 217, 217, 0, 222, 222, 225, - - 218, 225, 215, 214, 214, 222, 0, 222, 0, 484, 216, 230, 230, 219, 0, - 226, 515, 226, 225, 227, 0, 227, 219, 219, 588, 588, 218, 224, 224, 224, - 484, 224, 224, 224, 224, 0, 0, 515, 224, 0, 0, 228, 0, 228, 225, - 226, 0, 0, 218, 218, 590, 221, 221, 228, 231, 227, 231, 228, 229, 590, - 229, 225, 225, 232, 224, 232, 0, 222, 222, 0, 226, 0, 229, 233, 231, - 233, 0, 226, 226, 228, 227, 227, 227, 228, 238, 0, 238, 234, 0, 234, - 236, 0, 236, 232, 588, 0, 0, 233, 229, 0, - - 231, 234, 0, 228, 228, 0, 239, 238, 239, 582, 582, 582, 582, 0, 0, - 236, 231, 231, 232, 590, 229, 229, 0, 233, 0, 232, 232, 234, 0, 0, - 240, 240, 0, 238, 0, 233, 233, 239, 0, 0, 0, 236, 240, 240, 240, - 240, 238, 238, 604, 234, 234, 0, 236, 236, 237, 237, 237, 604, 237, 237, - 237, 237, 239, 0, 242, 237, 242, 0, 239, 239, 241, 241, 241, 542, 241, - 241, 241, 241, 243, 0, 243, 241, 244, 0, 244, 245, 0, 245, 246, 0, - 246, 237, 243, 0, 242, 542, 243, 245, 244, 247, - - 240, 247, 248, 0, 248, 0, 249, 241, 249, 0, 0, 246, 599, 599, 599, - 599, 0, 604, 243, 242, 0, 542, 243, 245, 244, 0, 242, 242, 0, 248, - 605, 247, 249, 0, 252, 0, 252, 246, 249, 605, 243, 243, 542, 0, 244, - 244, 0, 245, 245, 0, 246, 246, 257, 0, 257, 248, 247, 0, 249, 250, - 250, 247, 247, 249, 248, 248, 252, 257, 249, 249, 0, 250, 250, 250, 250, - 251, 251, 251, 0, 251, 251, 251, 251, 256, 0, 256, 251, 258, 571, 258, - 259, 252, 259, 257, 0, 0, 252, 252, 0, 605, - - 260, 0, 260, 0, 262, 0, 262, 259, 256, 261, 571, 261, 251, 0, 257, - 257, 263, 0, 263, 0, 0, 262, 264, 0, 264, 260, 0, 0, 265, 250, - 265, 0, 261, 259, 256, 0, 571, 266, 0, 266, 0, 0, 264, 263, 0, - 256, 256, 262, 0, 258, 258, 260, 259, 259, 267, 0, 267, 571, 261, 0, - 266, 0, 260, 260, 265, 0, 262, 262, 264, 263, 0, 261, 261, 0, 276, - 0, 276, 267, 263, 263, 268, 268, 0, 0, 264, 264, 266, 0, 0, 265, - 265, 265, 268, 268, 268, 268, 274, 0, 274, 266, - - 266, 0, 0, 267, 269, 269, 269, 0, 269, 269, 269, 269, 270, 270, 277, - 269, 267, 267, 275, 0, 275, 277, 274, 277, 270, 270, 270, 270, 271, 271, - 271, 0, 271, 271, 271, 271, 276, 276, 279, 271, 279, 269, 278, 278, 278, - 283, 0, 283, 274, 275, 268, 0, 0, 0, 285, 0, 285, 0, 274, 274, - 282, 283, 282, 0, 0, 271, 281, 281, 281, 279, 281, 281, 281, 281, 275, - 0, 0, 281, 284, 284, 275, 275, 270, 277, 277, 285, 284, 283, 284, 282, - 288, 0, 288, 289, 279, 289, 0, 290, 0, 290, - - 279, 279, 0, 281, 278, 278, 0, 283, 283, 290, 285, 295, 0, 295, 282, - 0, 285, 285, 293, 293, 0, 288, 282, 282, 0, 289, 293, 0, 293, 294, - 0, 294, 0, 0, 296, 290, 296, 0, 0, 297, 295, 297, 298, 0, 298, - 294, 288, 0, 284, 284, 289, 296, 288, 288, 298, 289, 289, 0, 0, 290, - 290, 299, 0, 299, 309, 295, 309, 306, 297, 306, 0, 294, 0, 295, 295, - 0, 300, 296, 300, 0, 298, 300, 300, 300, 301, 0, 301, 306, 293, 293, - 299, 294, 294, 297, 0, 309, 296, 296, 302, 302, - - 0, 297, 297, 0, 298, 298, 302, 0, 302, 305, 0, 305, 307, 306, 307, - 299, 301, 308, 0, 308, 309, 0, 0, 299, 299, 305, 309, 309, 0, 306, - 306, 312, 307, 312, 313, 0, 313, 308, 300, 300, 310, 301, 310, 314, 0, - 314, 301, 301, 0, 0, 0, 305, 310, 311, 0, 311, 0, 313, 307, 0, - 312, 0, 0, 308, 0, 0, 0, 0, 302, 302, 0, 305, 305, 311, 307, - 307, 0, 0, 310, 308, 308, 0, 315, 313, 315, 312, 316, 0, 316, 321, - 0, 321, 0, 312, 312, 0, 313, 313, 316, 311, - - 0, 0, 310, 310, 0, 314, 314, 0, 322, 0, 322, 0, 0, 0, 315, - 311, 311, 326, 321, 326, 322, 324, 324, 324, 316, 324, 324, 324, 324, 0, - 0, 0, 324, 325, 0, 325, 330, 0, 330, 315, 0, 0, 0, 321, 315, - 315, 322, 325, 316, 316, 0, 321, 321, 331, 331, 0, 0, 325, 324, 0, - 0, 331, 330, 331, 0, 0, 0, 325, 0, 0, 322, 322, 0, 325, 334, - 0, 334, 0, 0, 326, 326, 0, 0, 325, 0, 337, 0, 337, 330, 332, - 332, 338, 325, 338, 334, 325, 325, 0, 330, 330, - - 337, 332, 332, 332, 332, 333, 333, 333, 0, 333, 333, 333, 333, 0, 338, - 336, 333, 336, 339, 339, 334, 0, 0, 331, 331, 0, 337, 342, 0, 342, - 339, 339, 339, 339, 0, 336, 334, 334, 0, 342, 338, 341, 333, 341, 345, - 0, 345, 337, 337, 0, 344, 0, 344, 338, 338, 343, 341, 343, 345, 332, - 0, 336, 340, 340, 340, 342, 340, 340, 340, 340, 0, 341, 344, 340, 346, - 343, 346, 336, 336, 347, 0, 347, 341, 348, 345, 348, 0, 0, 339, 342, - 342, 349, 0, 349, 346, 0, 341, 0, 344, 340, - - 0, 343, 0, 341, 341, 0, 345, 345, 350, 0, 350, 0, 344, 344, 0, - 351, 351, 343, 343, 0, 346, 0, 0, 0, 0, 0, 350, 351, 351, 351, - 351, 0, 0, 354, 0, 354, 346, 346, 0, 353, 353, 347, 347, 0, 0, - 348, 348, 353, 0, 353, 0, 0, 350, 349, 349, 352, 352, 352, 354, 352, - 352, 352, 352, 355, 0, 355, 352, 357, 0, 357, 350, 350, 356, 0, 356, - 0, 358, 353, 358, 0, 359, 0, 359, 0, 354, 351, 0, 357, 355, 360, - 358, 360, 352, 0, 0, 354, 354, 0, 361, 0, - - 361, 364, 353, 364, 362, 360, 362, 356, 0, 353, 353, 0, 0, 357, 355, - 359, 358, 0, 361, 362, 0, 0, 363, 0, 363, 355, 355, 0, 0, 357, - 357, 360, 356, 0, 356, 356, 363, 0, 358, 358, 359, 0, 359, 359, 361, - 362, 365, 0, 365, 0, 0, 360, 360, 368, 0, 368, 374, 0, 374, 0, - 361, 361, 363, 364, 364, 0, 362, 362, 369, 0, 369, 365, 370, 0, 370, - 375, 375, 0, 0, 368, 0, 374, 0, 0, 363, 363, 0, 375, 375, 375, - 375, 0, 0, 0, 369, 0, 379, 365, 379, 0, - - 386, 370, 386, 0, 383, 368, 383, 374, 365, 365, 0, 0, 381, 0, 381, - 368, 368, 0, 374, 374, 369, 0, 379, 382, 0, 382, 370, 383, 0, 381, - 369, 369, 386, 0, 370, 370, 376, 376, 376, 382, 376, 376, 376, 376, 388, - 375, 388, 376, 379, 387, 0, 387, 389, 383, 389, 381, 0, 386, 379, 379, - 0, 0, 386, 386, 0, 382, 383, 383, 388, 390, 0, 390, 0, 376, 381, - 381, 391, 389, 391, 387, 0, 0, 0, 0, 0, 382, 382, 0, 392, 0, - 392, 396, 391, 396, 388, 0, 0, 0, 0, 390, - - 0, 0, 0, 389, 387, 0, 388, 388, 399, 399, 396, 387, 387, 0, 389, - 389, 0, 0, 391, 392, 399, 399, 399, 399, 390, 400, 400, 402, 0, 402, - 0, 390, 390, 400, 0, 400, 396, 0, 391, 391, 403, 0, 403, 0, 392, - 402, 0, 404, 0, 404, 392, 392, 0, 396, 396, 401, 401, 401, 403, 401, - 401, 401, 401, 405, 0, 405, 401, 404, 0, 0, 410, 402, 410, 0, 406, - 0, 406, 407, 399, 407, 409, 0, 409, 408, 403, 408, 410, 0, 405, 402, - 402, 0, 401, 404, 406, 400, 400, 407, 0, 411, - - 0, 411, 403, 403, 412, 409, 412, 0, 0, 404, 404, 0, 410, 408, 405, - 411, 425, 0, 425, 422, 406, 422, 0, 407, 0, 405, 405, 414, 0, 414, - 0, 409, 410, 410, 0, 412, 406, 406, 408, 407, 407, 411, 409, 409, 422, - 408, 408, 419, 0, 419, 415, 414, 415, 416, 0, 416, 424, 0, 424, 0, - 412, 411, 411, 0, 0, 415, 412, 412, 0, 0, 422, 419, 427, 416, 427, - 0, 424, 414, 425, 425, 0, 422, 422, 426, 0, 426, 428, 0, 428, 414, - 414, 415, 429, 429, 429, 426, 0, 419, 430, 416, - - 430, 427, 424, 431, 0, 431, 432, 0, 432, 419, 419, 0, 415, 415, 430, - 416, 416, 0, 424, 424, 433, 426, 433, 434, 434, 439, 427, 439, 0, 437, - 437, 434, 0, 434, 427, 427, 0, 0, 0, 0, 430, 437, 437, 437, 437, - 426, 426, 0, 428, 428, 440, 0, 440, 0, 429, 429, 433, 0, 0, 0, - 430, 430, 447, 0, 447, 431, 431, 0, 432, 432, 441, 0, 441, 438, 438, - 438, 0, 438, 438, 438, 438, 433, 433, 433, 438, 0, 0, 439, 439, 0, - 442, 0, 442, 434, 434, 441, 0, 0, 443, 437, - - 443, 0, 0, 444, 0, 444, 0, 445, 442, 445, 438, 0, 440, 440, 448, - 0, 448, 0, 0, 0, 446, 441, 446, 443, 447, 447, 0, 452, 444, 452, - 0, 0, 441, 441, 442, 449, 449, 445, 446, 0, 451, 0, 451, 449, 0, - 449, 0, 452, 453, 443, 453, 0, 442, 442, 444, 456, 0, 456, 0, 0, - 443, 443, 445, 0, 446, 444, 444, 451, 0, 445, 445, 456, 0, 452, 0, - 0, 448, 448, 457, 453, 0, 0, 446, 446, 0, 457, 457, 457, 0, 452, - 452, 0, 0, 451, 459, 0, 459, 456, 460, 0, - - 460, 0, 451, 451, 453, 449, 449, 461, 459, 461, 453, 453, 462, 0, 462, - 0, 0, 456, 456, 464, 0, 464, 463, 461, 463, 465, 465, 0, 0, 460, - 467, 467, 462, 0, 459, 0, 0, 465, 465, 465, 465, 0, 467, 467, 467, - 467, 0, 457, 457, 461, 0, 470, 463, 470, 460, 0, 459, 459, 462, 0, - 460, 460, 469, 0, 469, 471, 0, 471, 0, 461, 461, 472, 0, 472, 462, - 462, 473, 463, 473, 0, 469, 464, 464, 471, 463, 463, 466, 466, 466, 472, - 466, 466, 466, 466, 474, 465, 474, 466, 0, 479, - - 467, 479, 0, 490, 0, 0, 469, 0, 0, 471, 490, 0, 490, 470, 470, - 472, 479, 475, 475, 0, 478, 0, 478, 466, 469, 469, 0, 471, 471, 475, - 475, 475, 475, 472, 472, 483, 0, 483, 473, 473, 478, 0, 479, 475, 480, - 475, 480, 476, 476, 476, 0, 476, 476, 476, 476, 0, 474, 474, 476, 0, - 483, 479, 479, 0, 0, 485, 478, 485, 492, 475, 492, 475, 490, 490, 0, - 480, 489, 0, 489, 488, 0, 488, 478, 478, 476, 485, 483, 475, 486, 486, - 486, 488, 486, 486, 486, 486, 489, 483, 483, 486, - - 480, 0, 0, 491, 0, 491, 480, 480, 495, 0, 495, 485, 496, 0, 496, - 0, 0, 488, 491, 497, 0, 497, 489, 0, 503, 486, 503, 485, 485, 0, - 492, 492, 504, 0, 504, 505, 0, 505, 489, 489, 0, 488, 488, 511, 491, - 511, 0, 503, 508, 0, 508, 505, 504, 517, 0, 517, 0, 513, 511, 513, - 0, 0, 0, 0, 0, 491, 491, 523, 0, 523, 495, 495, 0, 503, 496, - 496, 0, 505, 504, 508, 0, 497, 497, 514, 511, 514, 503, 503, 513, 0, - 0, 521, 523, 521, 504, 504, 0, 505, 505, 0, - - 0, 522, 0, 522, 508, 511, 511, 521, 0, 514, 508, 508, 528, 513, 528, - 517, 517, 522, 523, 513, 513, 516, 516, 516, 0, 516, 516, 516, 516, 523, - 523, 526, 516, 521, 531, 514, 531, 0, 526, 0, 526, 0, 530, 522, 530, - 514, 514, 540, 0, 540, 538, 0, 538, 521, 521, 0, 0, 0, 516, 531, - 0, 0, 530, 522, 522, 538, 539, 0, 539, 0, 0, 549, 0, 549, 528, - 528, 554, 0, 554, 0, 548, 539, 548, 565, 555, 531, 555, 0, 530, 0, - 565, 538, 565, 0, 0, 0, 531, 531, 0, 0, - - 526, 526, 0, 0, 530, 530, 548, 539, 0, 540, 540, 0, 538, 538, 543, - 543, 543, 0, 543, 543, 543, 543, 0, 0, 559, 543, 559, 0, 539, 539, - 0, 0, 548, 549, 549, 0, 0, 0, 554, 554, 0, 0, 548, 548, 0, - 0, 555, 555, 0, 559, 0, 543, 565, 565, 572, 572, 572, 0, 572, 572, - 572, 572, 0, 0, 0, 572, 574, 574, 0, 0, 595, 595, 0, 0, 0, - 559, 0, 0, 574, 574, 574, 574, 595, 595, 595, 595, 559, 559, 0, 0, - 0, 572, 0, 0, 0, 0, 0, 0, 0, 0, - - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 574, 0, 0, 0, 595, 609, 609, 609, 610, - 610, 610, 611, 0, 611, 612, 0, 612, 614, 0, 614, 615, 0, 615, 616, - 0, 616, 617, 0, 617, 618, 0, 618, 619, 0, 619, 620, 0, 620, 622, - 0, 622, 623, 0, 623, 625, 0, 625, 626, 0, 626, 628, 0, 628, 629, - 0, 629, 630, 0, 630, 631, 0, 631, 608, 608, - - 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, - 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608}; +struct yy_trans_info + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static const flex_int16_t yy_accept[791] = + { 0, + 0, 0, 16, 16, 0, 0, 0, 0, 0, 0, + 100, 98, 73, 74, 98, 98, 76, 77, 98, 98, + 98, 95, 94, 95, 98, 95, 95, 95, 95, 95, + 95, 95, 95, 95, 95, 95, 95, 98, 98, 98, + 98, 98, 98, 98, 98, 98, 98, 74, 12, 13, + 93, 98, 16, 15, 16, 12, 13, 44, 20, 21, + 44, 44, 24, 25, 44, 44, 44, 41, 22, 41, + 44, 44, 41, 41, 41, 41, 41, 41, 41, 41, + 41, 41, 41, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 12, 13, 51, 45, 46, 51, 51, + + 51, 51, 51, 48, 51, 48, 51, 51, 48, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 12, + 13, 60, 55, 56, 60, 60, 60, 60, 60, 57, + 60, 57, 60, 57, 57, 57, 57, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 12, 13, 74, + 0, 0, 97, 0, 1, 0, 96, 73, 75, 0, + 95, 95, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 74, 0, 95, 95, 95, 95, 95, 95, + 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, + 95, 95, 95, 95, 95, 95, 0, 0, 0, 0, + + 0, 0, 0, 0, 0, 0, 74, 93, 0, 12, + 1, 13, 93, 0, 16, 1, 12, 1, 13, 21, + 0, 0, 43, 0, 0, 42, 20, 41, 41, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, + 36, 26, 27, 41, 41, 28, 41, 41, 41, 41, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 46, 0, 0, 50, 0, 0, 49, 45, 48, 48, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 56, 0, 0, 59, 0, 0, 58, 55, 57, + + 57, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 57, 57, 57, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 0, 0, 0, 95, + 95, 0, 0, 95, 95, 95, 95, 95, 95, 95, + 95, 95, 95, 0, 95, 0, 95, 95, 0, 0, + 95, 95, 95, 95, 95, 95, 95, 95, 0, 0, + 95, 95, 95, 0, 0, 0, 0, 1, 1, 1, + 0, 0, 41, 41, 29, 41, 41, 41, 41, 41, + 41, 41, 41, 0, 0, 0, 0, 0, 48, 48, + 0, 0, 0, 0, 0, 57, 57, 57, 57, 57, + + 0, 0, 0, 0, 0, 0, 0, 89, 0, 0, + 95, 95, 17, 95, 95, 95, 0, 0, 95, 95, + 95, 95, 0, 0, 95, 0, 95, 95, 80, 0, + 0, 95, 95, 95, 95, 95, 95, 95, 95, 95, + 95, 92, 0, 0, 95, 41, 41, 41, 41, 41, + 41, 41, 41, 52, 57, 57, 82, 0, 0, 81, + 0, 0, 0, 95, 95, 0, 0, 95, 69, 0, + 0, 0, 0, 95, 95, 0, 0, 95, 0, 0, + 95, 95, 95, 0, 0, 0, 95, 95, 95, 95, + 95, 95, 70, 71, 72, 95, 0, 0, 0, 95, + + 41, 41, 41, 41, 41, 41, 41, 41, 57, 57, + 0, 0, 62, 95, 0, 0, 0, 95, 95, 95, + 69, 0, 0, 0, 95, 0, 0, 91, 0, 0, + 95, 0, 95, 95, 95, 90, 0, 0, 95, 95, + 95, 95, 95, 95, 95, 70, 71, 72, 95, 84, + 0, 0, 0, 95, 0, 41, 41, 37, 41, 41, + 38, 41, 41, 57, 57, 95, 0, 0, 95, 95, + 95, 0, 0, 95, 85, 0, 0, 0, 95, 0, + 95, 18, 95, 0, 95, 14, 95, 95, 67, 19, + 95, 95, 0, 78, 0, 0, 0, 0, 35, 33, + + 41, 41, 41, 41, 41, 41, 53, 54, 95, 0, + 95, 95, 95, 0, 0, 95, 0, 95, 0, 95, + 95, 95, 95, 95, 68, 0, 0, 0, 79, 0, + 0, 41, 31, 41, 41, 30, 34, 0, 0, 0, + 95, 95, 95, 0, 0, 95, 0, 95, 0, 0, + 95, 95, 95, 95, 61, 83, 0, 0, 0, 39, + 32, 40, 86, 0, 0, 0, 0, 0, 95, 95, + 95, 0, 0, 95, 0, 0, 95, 0, 0, 95, + 95, 0, 0, 5, 0, 0, 0, 0, 0, 95, + 95, 95, 0, 10, 95, 0, 0, 6, 0, 95, + + 95, 0, 0, 0, 0, 0, 0, 0, 95, 95, + 63, 11, 0, 0, 0, 0, 3, 0, 95, 66, + 0, 0, 0, 0, 0, 8, 65, 64, 0, 0, + 0, 0, 0, 95, 0, 0, 0, 0, 0, 0, + 95, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 87, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, + 0, 0, 9, 0, 0, 0, 0, 0, 88, 0, + 7, 0, 0, 0, 0, 0, 2, 0, 0, 0 + } ; + +static const 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, 3, 1, 4, 1, 1, 1, 1, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 14, 14, 14, 14, 14, 14, 1, 18, 1, + 19, 20, 1, 1, 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, 37, + 1, 1, 1, 1, 37, 1, 46, 47, 48, 49, + + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 37, 62, 63, 64, 65, 66, 67, 68, + 69, 37, 1, 1, 1, 1, 1, 70, 71, 71, + 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, + 71, 71, 71, 72, 72, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, 72, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 1, 1, 74, 74, 74, 74, 74, 74, 74, + + 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, + 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, + 74, 74, 74, 75, 76, 76, 77, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 79, 80, 80, 81, + 82, 82, 82, 83, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static const YY_CHAR yy_meta[84] = + { 0, + 1, 2, 1, 1, 1, 1, 1, 1, 1, 3, + 3, 3, 1, 3, 3, 3, 3, 1, 1, 1, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, + 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3 + } ; + +static const flex_int16_t yy_base[813] = + { 0, + 0, 81, 83, 91, 158, 79, 241, 92, 324, 93, + 1770, 4855, 4855, 405, 1764, 1693, 4855, 4855, 1670, 97, + 407, 475, 105, 549, 409, 623, 113, 415, 423, 442, + 442, 474, 478, 557, 586, 631, 450, 61, 1615, 65, + 69, 73, 77, 80, 30, 84, 343, 511, 1662, 0, + 431, 474, 0, 4855, 1660, 1640, 0, 4855, 4855, 417, + 1644, 1642, 4855, 4855, 1626, 569, 655, 723, 577, 797, + 500, 1610, 680, 604, 688, 696, 706, 732, 744, 777, + 806, 769, 826, 580, 1527, 604, 654, 680, 371, 692, + 343, 701, 407, 1572, 0, 4855, 4855, 423, 1553, 1539, + + 1516, 834, 851, 919, 875, 993, 518, 1476, 883, 705, + 1420, 754, 787, 811, 534, 831, 457, 835, 505, 1457, + 0, 4855, 4855, 465, 1471, 1469, 1453, 899, 935, 1067, + 907, 1141, 606, 943, 951, 1003, 964, 869, 1394, 899, + 912, 951, 697, 955, 540, 959, 608, 1445, 0, 545, + 1340, 1404, 4855, 1402, 0, 1024, 1032, 4855, 557, 1325, + 1040, 0, 988, 1307, 993, 1015, 1019, 758, 1023, 609, + 1027, 644, 567, 1309, 1095, 1104, 1120, 1149, 1166, 1189, + 1216, 1228, 1178, 1244, 1257, 1272, 1291, 1309, 1317, 1328, + 1336, 1361, 1157, 1386, 1402, 1411, 1031, 1176, 1192, 1294, + + 1319, 1359, 1363, 1367, 1374, 1379, 1439, 1443, 1291, 0, + 0, 0, 1447, 1399, 0, 0, 0, 0, 0, 577, + 1289, 1343, 4855, 1323, 1466, 1474, 4855, 1482, 0, 1430, + 1247, 1434, 1438, 1442, 855, 1447, 656, 1451, 762, 4855, + 1515, 1523, 1531, 1539, 1548, 1560, 1573, 1589, 1598, 1616, + 1508, 1546, 1568, 1572, 1581, 1585, 1593, 1597, 1601, 1605, + 612, 1243, 1279, 4855, 1245, 1669, 1677, 4855, 1685, 0, + 1633, 1163, 1637, 1641, 1645, 920, 1649, 797, 1653, 873, + 4855, 1657, 1661, 1665, 1669, 1673, 1677, 1681, 1685, 1689, + 1693, 657, 1164, 1194, 4855, 1191, 1757, 1765, 4855, 1773, + + 0, 1721, 1118, 1725, 1729, 1733, 1054, 1737, 915, 1741, + 1068, 1805, 1813, 1823, 1772, 1776, 1780, 1784, 1792, 1797, + 1801, 1805, 1809, 1815, 1114, 0, 1109, 1136, 1107, 1887, + 1903, 1893, 1821, 1912, 1920, 1929, 1941, 1961, 1978, 1987, + 1996, 2005, 2013, 1338, 2030, 1877, 2055, 2063, 2079, 1961, + 2090, 2099, 2118, 2145, 2155, 2163, 2178, 2186, 2122, 1978, + 2201, 2219, 2233, 2013, 2047, 2111, 1105, 0, 0, 0, + 1100, 1227, 2242, 2253, 2268, 2277, 2295, 2303, 2322, 2330, + 2341, 2362, 2370, 2135, 2152, 2201, 1098, 1264, 2382, 2390, + 2225, 2251, 2291, 1058, 1284, 2398, 2406, 2414, 2425, 2435, + + 2383, 2387, 2402, 2462, 2410, 2482, 2416, 2476, 1047, 2430, + 2494, 2502, 2510, 2518, 2533, 2541, 2510, 2492, 2558, 2568, + 2587, 2596, 399, 1043, 2607, 2555, 2625, 2634, 2615, 1010, + 2586, 2660, 2669, 2683, 2691, 2708, 2717, 2737, 2699, 2745, + 2762, 2752, 981, 2710, 2775, 2791, 2799, 2807, 2817, 2834, + 2848, 2856, 2872, 2881, 2891, 2899, 2779, 975, 2770, 2907, + 973, 2855, 965, 2921, 2932, 1558, 2890, 2954, 2974, 45, + 411, 963, 2902, 2984, 3001, 3020, 2909, 3014, 413, 946, + 3035, 3043, 3059, 936, 3079, 2935, 3088, 3103, 3116, 3124, + 3148, 3162, 3171, 3183, 3191, 3203, 3207, 2968, 934, 3223, + + 3231, 3242, 3254, 3263, 3279, 3293, 3304, 3316, 3324, 3341, + 907, 905, 3362, 3370, 407, 894, 3013, 3378, 3386, 3395, + 4855, 436, 458, 892, 3408, 3433, 3036, 3152, 876, 3295, + 3444, 480, 3454, 3471, 3483, 3400, 842, 3402, 3497, 3508, + 3516, 3527, 3536, 3553, 3567, 4855, 4855, 4855, 3577, 3475, + 785, 3484, 3594, 3610, 3544, 3622, 3630, 3638, 3646, 3669, + 3679, 3687, 3697, 3705, 3722, 3747, 496, 782, 3759, 3767, + 3783, 645, 810, 3791, 3661, 777, 3670, 775, 3811, 624, + 3819, 3840, 3848, 765, 3862, 3870, 3881, 3889, 3901, 3911, + 3919, 3935, 749, 3737, 747, 3939, 3695, 3768, 3951, 3959, + + 3967, 3975, 3983, 3994, 4008, 4021, 4029, 4040, 4060, 919, + 4068, 4076, 4084, 667, 848, 4096, 738, 4124, 1024, 4135, + 4145, 4153, 4165, 4174, 4183, 4208, 3837, 726, 4212, 720, + 3887, 4224, 4232, 4240, 4248, 4256, 4267, 4288, 3988, 855, + 4296, 4304, 4312, 1077, 1087, 4322, 1930, 4331, 3994, 1080, + 4347, 4357, 4380, 4388, 4403, 4100, 718, 4101, 710, 4411, + 4419, 4428, 4190, 1128, 857, 675, 4160, 1133, 4436, 4444, + 4455, 1177, 1181, 4467, 1222, 666, 4475, 4223, 1221, 4494, + 4502, 2161, 4307, 4511, 647, 1233, 1293, 639, 1250, 4526, + 4538, 4555, 1256, 4855, 4563, 888, 631, 4580, 1306, 4588, + + 4596, 1263, 629, 4336, 1346, 3247, 586, 1340, 4608, 4619, + 4634, 4855, 2237, 4424, 1352, 1408, 4855, 540, 4644, 4655, + 890, 529, 1420, 1502, 527, 4855, 4666, 4674, 1513, 520, + 4430, 1218, 508, 4682, 1537, 1539, 1549, 1236, 498, 1566, + 4697, 1487, 1619, 1614, 1829, 1863, 2385, 4474, 1871, 4703, + 462, 1917, 1489, 1908, 1931, 454, 4511, 1926, 4707, 452, + 1957, 1989, 1410, 1531, 441, 2003, 2054, 2031, 2142, 4855, + 381, 2045, 4855, 4723, 364, 2042, 348, 1933, 4713, 56, + 4855, 2069, 2086, 2115, 2229, 2250, 4855, 54, 48, 4855, + 4800, 4803, 4806, 113, 4809, 4812, 4815, 4818, 4821, 4824, + + 4827, 105, 4830, 4833, 87, 4836, 4839, 85, 4842, 4845, + 4848, 4851 + } ; + +static const flex_int16_t yy_def[813] = + { 0, + 790, 1, 791, 791, 790, 5, 790, 7, 790, 9, + 790, 790, 790, 790, 792, 793, 790, 790, 790, 790, + 790, 794, 790, 794, 790, 24, 24, 24, 24, 24, + 26, 26, 26, 24, 24, 24, 24, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, 795, 796, + 24, 790, 797, 790, 797, 798, 799, 790, 790, 790, + 800, 801, 790, 790, 790, 790, 790, 802, 790, 802, + 790, 790, 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 795, 796, 790, 790, 790, 803, 804, + + 790, 790, 790, 805, 790, 805, 790, 790, 106, 790, + 790, 790, 790, 790, 790, 790, 790, 790, 790, 795, + 796, 790, 790, 790, 806, 807, 790, 790, 790, 808, + 790, 808, 790, 132, 132, 132, 132, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 795, 796, 790, + 790, 792, 790, 793, 809, 790, 790, 790, 790, 790, + 24, 24, 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 790, 790, 790, 790, + + 790, 790, 790, 790, 790, 790, 790, 790, 790, 795, + 810, 796, 24, 790, 797, 811, 798, 812, 799, 790, + 790, 800, 790, 801, 790, 790, 790, 70, 70, 790, + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 803, 790, 804, 790, 790, 790, 106, 106, + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 806, 790, 807, 790, 790, 790, 132, + + 132, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 790, 132, 132, 132, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 809, 790, 790, 790, 24, + 24, 790, 790, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 790, 24, 790, 24, 24, 790, 790, + 24, 24, 24, 24, 24, 24, 24, 24, 790, 790, + 24, 24, 24, 790, 790, 790, 790, 810, 811, 812, + 790, 790, 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 790, 790, 790, 790, 790, 106, 106, + 790, 790, 790, 790, 790, 132, 132, 132, 132, 132, + + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 24, 24, 24, 24, 24, 24, 790, 790, 24, 24, + 24, 24, 790, 790, 24, 790, 24, 24, 790, 790, + 790, 24, 24, 24, 24, 24, 24, 24, 24, 24, + 24, 790, 790, 790, 24, 70, 70, 70, 70, 70, + 70, 70, 70, 132, 132, 132, 790, 790, 790, 790, + 790, 790, 790, 24, 24, 790, 790, 24, 24, 790, + 790, 790, 790, 24, 24, 790, 790, 24, 790, 790, + 24, 24, 24, 790, 790, 790, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 790, 790, 790, 24, + + 70, 70, 70, 70, 70, 70, 70, 70, 132, 132, + 790, 790, 24, 24, 790, 790, 790, 24, 24, 24, + 790, 790, 790, 790, 24, 790, 790, 790, 790, 790, + 24, 790, 24, 24, 24, 790, 790, 790, 24, 24, + 24, 24, 24, 24, 24, 790, 790, 790, 24, 790, + 790, 790, 790, 24, 790, 70, 70, 70, 70, 70, + 70, 70, 70, 132, 132, 24, 790, 790, 24, 24, + 24, 790, 790, 24, 790, 790, 790, 790, 24, 790, + 24, 24, 24, 790, 24, 24, 24, 24, 24, 24, + 24, 24, 790, 790, 790, 790, 790, 790, 70, 70, + + 70, 70, 70, 70, 70, 70, 132, 132, 24, 790, + 24, 24, 24, 790, 790, 24, 790, 24, 790, 24, + 24, 24, 24, 24, 24, 790, 790, 790, 790, 790, + 790, 70, 70, 70, 70, 70, 70, 790, 790, 790, + 24, 24, 24, 790, 790, 24, 790, 24, 790, 790, + 24, 24, 24, 24, 24, 790, 790, 790, 790, 70, + 70, 70, 790, 790, 790, 790, 790, 790, 24, 24, + 24, 790, 790, 24, 790, 790, 24, 790, 790, 24, + 24, 790, 790, 24, 790, 790, 790, 790, 790, 24, + 24, 24, 790, 790, 24, 790, 790, 24, 790, 24, + + 24, 790, 790, 790, 790, 790, 790, 790, 24, 24, + 24, 790, 790, 790, 790, 790, 790, 790, 24, 24, + 790, 790, 790, 790, 790, 790, 24, 24, 790, 790, + 790, 790, 790, 24, 790, 790, 790, 790, 790, 790, + 24, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, 790, 0, + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790 + } ; + +static const flex_int16_t yy_nxt[4939] = + { 0, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 12, 24, 24, 24, 24, 25, 12, 12, + 26, 27, 28, 29, 30, 31, 27, 27, 32, 27, + 27, 27, 27, 27, 27, 33, 27, 34, 35, 36, + 27, 37, 27, 27, 27, 26, 27, 28, 29, 30, + 31, 27, 27, 32, 27, 27, 27, 27, 27, 27, + 33, 34, 35, 36, 27, 37, 27, 27, 27, 12, + 12, 12, 12, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 54, 522, 94, 300, 49, 269, + 55, 95, 54, 50, 51, 51, 51, 51, 56, 120, + + 148, 204, 204, 57, 121, 149, 156, 228, 156, 522, + 157, 157, 157, 157, 156, 161, 156, 786, 157, 157, + 157, 157, 790, 789, 790, 774, 161, 161, 161, 161, + 161, 161, 161, 161, 198, 198, 198, 198, 199, 200, + 200, 200, 201, 201, 201, 201, 202, 202, 202, 203, + 203, 203, 203, 205, 205, 205, 205, 52, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 58, 70, 70, 70, 70, 71, 72, 58, 73, 74, + 75, 75, 75, 75, 75, 75, 76, 77, 75, 78, + 75, 75, 79, 80, 75, 81, 82, 83, 75, 75, + + 75, 75, 75, 73, 74, 75, 75, 75, 75, 75, + 75, 76, 77, 75, 78, 75, 75, 79, 80, 81, + 82, 83, 75, 75, 75, 75, 75, 58, 58, 58, + 58, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 93, 96, 97, 98, 99, 100, 96, 96, 101, 102, + 103, 104, 105, 96, 106, 106, 106, 106, 107, 108, + 96, 109, 109, 109, 109, 109, 109, 109, 109, 109, + 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, + 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, + 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, + + 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, + 96, 96, 96, 96, 110, 111, 112, 113, 114, 115, + 116, 117, 118, 119, 122, 123, 124, 125, 126, 122, + 122, 127, 128, 129, 130, 131, 122, 132, 132, 132, + 132, 133, 122, 122, 134, 134, 135, 134, 134, 134, + 134, 134, 136, 134, 134, 134, 134, 134, 134, 134, + 134, 137, 134, 134, 134, 134, 134, 134, 134, 134, + 134, 135, 134, 134, 134, 134, 134, 136, 134, 134, + 134, 134, 134, 134, 134, 137, 134, 134, 134, 134, + 134, 134, 134, 122, 122, 122, 122, 138, 139, 140, + + 141, 142, 143, 144, 145, 146, 147, 150, 158, 159, + 158, 173, 206, 206, 258, 258, 156, 769, 156, 220, + 157, 157, 157, 157, 790, 261, 790, 479, 161, 161, + 161, 161, 790, 780, 790, 567, 161, 161, 161, 161, + 256, 256, 256, 180, 213, 213, 213, 213, 523, 179, + 777, 790, 479, 790, 532, 161, 161, 161, 161, 790, + 567, 790, 183, 161, 161, 161, 161, 292, 180, 572, + 196, 181, 523, 161, 179, 182, 260, 260, 532, 184, + 161, 151, 185, 160, 156, 174, 156, 183, 162, 162, + 162, 162, 573, 221, 572, 196, 181, 186, 161, 262, + + 182, 227, 220, 184, 161, 161, 185, 187, 580, 189, + 747, 161, 188, 207, 161, 190, 161, 573, 161, 268, + 261, 750, 186, 765, 208, 208, 208, 208, 289, 289, + 161, 760, 187, 580, 189, 161, 188, 610, 161, 190, + 161, 293, 161, 214, 200, 200, 200, 150, 163, 164, + 165, 166, 167, 168, 169, 170, 171, 172, 156, 159, + 156, 610, 162, 162, 162, 162, 790, 713, 790, 173, + 161, 161, 161, 161, 291, 291, 221, 716, 225, 220, + 225, 191, 226, 226, 226, 226, 225, 209, 225, 739, + 226, 226, 226, 226, 262, 790, 706, 790, 682, 161, + + 161, 161, 161, 287, 287, 287, 191, 299, 292, 733, + 192, 322, 322, 790, 261, 790, 193, 228, 228, 228, + 228, 151, 163, 164, 165, 166, 167, 168, 169, 170, + 171, 172, 790, 160, 790, 192, 161, 161, 161, 161, + 790, 193, 790, 174, 161, 161, 161, 161, 242, 228, + 228, 228, 228, 221, 175, 725, 227, 220, 194, 292, + 176, 177, 619, 178, 225, 195, 225, 614, 226, 226, + 226, 226, 242, 252, 252, 252, 252, 324, 324, 175, + 204, 204, 293, 194, 176, 177, 619, 178, 262, 790, + 195, 790, 614, 228, 228, 228, 228, 790, 722, 790, + + 647, 228, 228, 228, 228, 790, 644, 790, 638, 228, + 228, 228, 228, 206, 206, 790, 626, 790, 241, 228, + 228, 228, 228, 253, 254, 254, 254, 258, 258, 243, + 644, 221, 225, 293, 225, 697, 229, 229, 229, 229, + 244, 790, 241, 790, 688, 228, 228, 228, 228, 255, + 255, 255, 255, 790, 243, 790, 245, 228, 228, 228, + 228, 257, 257, 257, 257, 244, 320, 320, 320, 246, + 259, 259, 259, 259, 269, 269, 269, 269, 790, 596, + 790, 245, 228, 228, 228, 228, 790, 685, 790, 659, + 228, 228, 228, 228, 246, 553, 230, 231, 232, 233, + + 234, 235, 236, 237, 238, 239, 225, 526, 225, 249, + 229, 229, 229, 229, 247, 790, 628, 790, 497, 228, + 228, 228, 228, 283, 283, 283, 283, 202, 202, 202, + 248, 260, 260, 249, 485, 790, 615, 790, 247, 228, + 228, 228, 228, 266, 476, 266, 617, 267, 267, 267, + 267, 466, 268, 261, 593, 248, 284, 285, 285, 285, + 266, 615, 266, 250, 267, 267, 267, 267, 289, 289, + 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 286, 286, 286, 286, 266, 645, 266, 250, 267, 267, + 267, 267, 790, 668, 790, 687, 269, 269, 269, 269, + + 288, 288, 288, 288, 290, 290, 290, 290, 297, 645, + 297, 584, 298, 298, 298, 298, 297, 668, 297, 687, + 298, 298, 298, 298, 256, 256, 256, 262, 266, 715, + 266, 735, 270, 270, 270, 270, 299, 292, 300, 300, + 300, 300, 291, 291, 297, 578, 297, 640, 298, 298, + 298, 298, 790, 715, 790, 735, 300, 300, 300, 300, + 790, 417, 790, 568, 300, 300, 300, 300, 316, 316, + 316, 316, 640, 790, 406, 790, 404, 300, 300, 300, + 300, 317, 318, 318, 318, 312, 322, 322, 314, 287, + 287, 287, 271, 272, 273, 274, 275, 276, 277, 278, + + 279, 280, 266, 359, 266, 349, 270, 270, 270, 270, + 312, 293, 790, 314, 790, 344, 300, 300, 300, 300, + 319, 319, 319, 319, 321, 321, 321, 321, 323, 323, + 323, 323, 524, 156, 332, 156, 313, 157, 157, 157, + 157, 156, 512, 156, 511, 157, 157, 157, 157, 790, + 499, 790, 650, 161, 161, 161, 161, 161, 161, 161, + 161, 313, 198, 198, 198, 198, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 297, 650, 297, 484, + 301, 301, 301, 301, 328, 200, 200, 200, 201, 201, + 201, 201, 203, 203, 203, 203, 205, 205, 205, 205, + + 161, 161, 161, 161, 790, 672, 790, 673, 161, 161, + 161, 161, 480, 790, 679, 790, 463, 161, 161, 161, + 161, 332, 332, 320, 320, 320, 330, 292, 331, 790, + 672, 790, 673, 161, 161, 161, 161, 324, 324, 679, + 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, + 297, 330, 297, 331, 301, 301, 301, 301, 790, 686, + 790, 689, 161, 161, 161, 161, 790, 261, 790, 220, + 161, 161, 161, 161, 207, 790, 173, 790, 159, 161, + 161, 161, 161, 150, 686, 357, 689, 790, 334, 790, + 315, 161, 161, 161, 161, 295, 333, 295, 790, 335, + + 790, 336, 161, 161, 161, 161, 362, 362, 362, 341, + 357, 693, 334, 694, 302, 303, 304, 305, 306, 307, + 308, 309, 310, 311, 335, 790, 336, 790, 337, 161, + 161, 161, 161, 394, 341, 282, 693, 790, 694, 790, + 338, 161, 161, 161, 161, 362, 362, 362, 362, 264, + 696, 339, 337, 790, 699, 790, 740, 161, 161, 161, + 161, 150, 362, 362, 362, 338, 790, 705, 790, 340, + 161, 161, 161, 161, 344, 696, 339, 745, 342, 699, + 740, 790, 264, 790, 708, 161, 161, 161, 161, 712, + 343, 721, 705, 340, 706, 706, 345, 382, 382, 382, + + 790, 745, 790, 342, 161, 161, 161, 161, 716, 708, + 349, 349, 387, 347, 712, 343, 721, 717, 790, 251, + 790, 345, 161, 161, 161, 161, 790, 223, 790, 348, + 161, 161, 161, 161, 389, 389, 389, 790, 347, 790, + 344, 161, 161, 161, 161, 790, 223, 790, 346, 161, + 161, 161, 161, 348, 399, 399, 399, 351, 371, 353, + 367, 423, 352, 362, 363, 363, 363, 723, 354, 707, + 790, 355, 790, 726, 161, 161, 161, 161, 329, 197, + 732, 351, 718, 356, 353, 350, 423, 352, 362, 362, + 362, 362, 723, 354, 327, 790, 355, 790, 726, 161, + + 161, 161, 161, 359, 359, 732, 153, 153, 356, 325, + 716, 790, 769, 790, 424, 161, 161, 161, 161, 717, + 790, 770, 790, 358, 161, 161, 161, 161, 161, 161, + 161, 161, 161, 161, 161, 161, 364, 364, 364, 364, + 736, 207, 361, 365, 365, 365, 365, 358, 366, 366, + 366, 366, 208, 208, 208, 208, 208, 208, 208, 208, + 213, 213, 213, 213, 211, 736, 315, 361, 207, 362, + 362, 362, 155, 295, 295, 225, 211, 225, 360, 226, + 226, 226, 226, 225, 718, 225, 771, 226, 226, 226, + 226, 790, 282, 790, 281, 228, 228, 228, 228, 228, + + 228, 228, 228, 252, 252, 252, 252, 372, 254, 254, + 254, 255, 255, 255, 255, 209, 257, 257, 257, 257, + 259, 259, 259, 259, 790, 749, 790, 762, 228, 228, + 228, 228, 790, 737, 790, 155, 228, 228, 228, 228, + 790, 738, 790, 264, 228, 228, 228, 228, 790, 749, + 790, 762, 228, 228, 228, 228, 264, 790, 737, 790, + 466, 228, 228, 228, 228, 742, 738, 373, 374, 790, + 743, 790, 772, 228, 228, 228, 228, 228, 228, 228, + 228, 515, 790, 744, 790, 375, 228, 228, 228, 228, + 742, 211, 373, 374, 746, 743, 772, 376, 790, 251, + + 790, 377, 228, 228, 228, 228, 515, 790, 744, 790, + 375, 228, 228, 228, 228, 382, 382, 382, 382, 746, + 750, 750, 376, 379, 378, 790, 377, 790, 240, 228, + 228, 228, 228, 380, 516, 752, 381, 220, 382, 382, + 382, 382, 383, 383, 383, 155, 223, 223, 379, 378, + 382, 382, 382, 382, 228, 228, 228, 228, 380, 218, + 752, 381, 228, 228, 228, 228, 384, 384, 384, 384, + 385, 385, 385, 385, 386, 386, 386, 386, 266, 216, + 266, 211, 267, 267, 267, 267, 266, 197, 266, 155, + 267, 267, 267, 267, 790, 751, 790, 153, 269, 269, + + 269, 269, 269, 269, 269, 269, 283, 283, 283, 283, + 388, 285, 285, 285, 286, 286, 286, 286, 288, 288, + 288, 288, 290, 290, 290, 290, 269, 269, 269, 269, + 389, 389, 389, 389, 261, 389, 389, 389, 389, 390, + 390, 390, 389, 389, 389, 389, 269, 269, 269, 269, + 269, 269, 269, 269, 391, 391, 391, 391, 392, 392, + 392, 392, 393, 393, 393, 393, 297, 153, 297, 790, + 298, 298, 298, 298, 297, 790, 297, 790, 298, 298, + 298, 298, 790, 790, 790, 790, 300, 300, 300, 300, + 300, 300, 300, 300, 316, 316, 316, 316, 395, 318, + + 318, 318, 319, 319, 319, 319, 321, 321, 321, 321, + 323, 323, 323, 323, 790, 790, 790, 790, 300, 300, + 300, 300, 790, 790, 790, 790, 300, 300, 300, 300, + 790, 790, 790, 790, 790, 397, 300, 300, 300, 300, + 396, 300, 300, 300, 300, 399, 399, 399, 399, 292, + 399, 399, 399, 399, 400, 400, 400, 753, 398, 790, + 397, 399, 399, 399, 399, 396, 300, 300, 300, 300, + 300, 300, 300, 300, 401, 401, 401, 401, 402, 402, + 402, 402, 753, 398, 403, 403, 403, 403, 404, 404, + 410, 200, 200, 200, 332, 332, 790, 754, 790, 758, + + 161, 161, 161, 161, 406, 406, 408, 408, 408, 408, + 790, 790, 790, 790, 790, 790, 161, 161, 161, 161, + 790, 790, 754, 790, 758, 161, 161, 161, 161, 790, + 790, 790, 647, 161, 161, 161, 161, 761, 790, 411, + 790, 763, 161, 161, 161, 161, 426, 200, 200, 200, + 790, 790, 790, 675, 161, 161, 161, 161, 412, 764, + 766, 414, 761, 405, 411, 415, 763, 790, 790, 409, + 790, 782, 790, 413, 161, 161, 161, 161, 675, 407, + 417, 790, 412, 416, 764, 766, 414, 790, 767, 790, + 415, 161, 161, 161, 161, 782, 790, 413, 790, 790, + + 161, 161, 161, 161, 790, 790, 676, 790, 416, 161, + 161, 161, 161, 767, 790, 419, 790, 768, 161, 161, + 161, 161, 790, 790, 790, 790, 161, 161, 161, 161, + 431, 200, 200, 200, 420, 422, 773, 421, 790, 790, + 419, 790, 768, 161, 161, 161, 161, 444, 200, 200, + 200, 790, 790, 790, 418, 774, 774, 790, 420, 790, + 422, 773, 421, 425, 790, 776, 790, 790, 161, 161, + 161, 161, 790, 778, 790, 781, 161, 161, 161, 161, + 349, 349, 161, 161, 161, 161, 427, 790, 425, 790, + 776, 790, 429, 429, 429, 429, 790, 783, 778, 790, + + 781, 790, 428, 161, 161, 161, 161, 790, 790, 790, + 790, 427, 161, 161, 161, 161, 161, 161, 161, 161, + 784, 433, 783, 359, 359, 434, 428, 790, 432, 790, + 775, 161, 161, 161, 161, 442, 442, 442, 442, 790, + 790, 790, 435, 790, 769, 784, 433, 790, 785, 790, + 434, 790, 432, 770, 790, 430, 790, 790, 161, 161, + 161, 161, 790, 682, 790, 436, 790, 435, 161, 161, + 161, 161, 790, 785, 790, 790, 161, 161, 161, 161, + 161, 161, 161, 161, 702, 790, 437, 790, 790, 790, + 436, 161, 161, 161, 161, 790, 790, 790, 443, 161, + + 161, 161, 161, 438, 228, 228, 228, 228, 790, 702, + 790, 437, 790, 439, 161, 161, 161, 161, 771, 790, + 440, 228, 228, 228, 228, 790, 441, 438, 790, 790, + 790, 786, 161, 161, 161, 161, 790, 703, 439, 713, + 787, 445, 790, 790, 790, 440, 161, 161, 161, 161, + 441, 790, 786, 790, 790, 228, 228, 228, 228, 790, + 729, 787, 790, 790, 790, 445, 228, 228, 228, 228, + 228, 228, 228, 228, 790, 446, 447, 790, 790, 790, + 790, 228, 228, 228, 228, 729, 790, 790, 790, 790, + 228, 228, 228, 228, 269, 269, 269, 269, 790, 790, + + 446, 447, 448, 790, 790, 788, 790, 790, 228, 228, + 228, 228, 790, 730, 790, 790, 228, 228, 228, 228, + 269, 269, 269, 269, 790, 790, 788, 448, 449, 790, + 790, 790, 790, 790, 450, 228, 228, 228, 228, 790, + 790, 790, 790, 228, 228, 228, 228, 451, 790, 790, + 790, 790, 790, 449, 228, 228, 228, 228, 790, 450, + 269, 269, 269, 269, 790, 452, 790, 790, 790, 453, + 790, 790, 451, 790, 790, 228, 228, 228, 228, 790, + 790, 790, 790, 228, 228, 228, 228, 747, 790, 790, + 452, 790, 790, 790, 453, 269, 269, 269, 269, 790, + + 790, 790, 790, 269, 269, 269, 269, 790, 755, 790, + 790, 300, 300, 300, 300, 790, 790, 790, 790, 300, + 300, 300, 300, 790, 790, 790, 790, 300, 300, 300, + 300, 790, 790, 755, 790, 790, 790, 455, 300, 300, + 300, 300, 454, 790, 790, 456, 790, 790, 300, 300, + 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, + 790, 756, 455, 404, 404, 790, 454, 790, 790, 790, + 456, 300, 300, 300, 300, 457, 457, 457, 457, 459, + 200, 200, 200, 406, 406, 462, 200, 200, 200, 408, + 408, 408, 408, 790, 790, 460, 460, 460, 460, 332, + + 362, 362, 362, 790, 790, 790, 790, 161, 161, 161, + 161, 790, 417, 790, 790, 161, 161, 161, 161, 790, + 466, 790, 790, 161, 161, 161, 161, 790, 464, 790, + 790, 161, 161, 161, 161, 470, 790, 790, 458, 790, + 790, 465, 790, 468, 790, 471, 161, 161, 161, 161, + 790, 790, 790, 464, 161, 161, 161, 161, 461, 790, + 470, 473, 200, 200, 200, 465, 790, 790, 790, 790, + 471, 161, 161, 161, 161, 790, 790, 790, 790, 790, + 469, 161, 161, 161, 161, 790, 472, 790, 476, 476, + 790, 790, 475, 790, 467, 474, 790, 790, 790, 790, + + 161, 161, 161, 161, 469, 790, 790, 790, 790, 161, + 161, 161, 161, 790, 790, 790, 790, 475, 790, 474, + 161, 161, 161, 161, 344, 362, 362, 362, 429, 429, + 429, 429, 790, 790, 790, 478, 790, 790, 161, 161, + 161, 161, 790, 790, 790, 790, 481, 161, 161, 161, + 161, 790, 790, 790, 483, 349, 362, 362, 362, 478, + 790, 485, 485, 477, 790, 482, 790, 790, 790, 790, + 481, 790, 790, 161, 161, 161, 161, 790, 790, 483, + 790, 790, 161, 161, 161, 161, 790, 790, 790, 482, + 790, 790, 790, 487, 790, 790, 161, 161, 161, 161, + + 790, 790, 790, 790, 161, 161, 161, 161, 790, 790, + 790, 790, 161, 493, 494, 495, 489, 790, 487, 790, + 488, 161, 161, 161, 161, 790, 790, 790, 790, 790, + 161, 161, 161, 161, 790, 790, 486, 491, 790, 790, + 790, 489, 790, 790, 488, 490, 790, 790, 790, 790, + 161, 161, 161, 161, 790, 790, 790, 790, 161, 161, + 161, 161, 491, 497, 497, 442, 442, 442, 442, 490, + 790, 790, 790, 790, 492, 161, 161, 161, 161, 359, + 362, 362, 362, 790, 790, 496, 790, 790, 161, 161, + 161, 161, 457, 457, 457, 457, 790, 790, 492, 500, + + 790, 790, 790, 790, 228, 228, 228, 228, 790, 496, + 790, 790, 228, 228, 228, 228, 790, 790, 790, 501, + 228, 228, 228, 228, 500, 790, 790, 502, 790, 790, + 228, 228, 228, 228, 790, 503, 790, 790, 498, 404, + 362, 362, 362, 790, 501, 790, 790, 228, 228, 228, + 228, 790, 502, 790, 505, 790, 504, 790, 790, 790, + 503, 228, 228, 228, 228, 790, 790, 790, 790, 228, + 228, 228, 228, 790, 790, 790, 506, 790, 790, 505, + 504, 790, 790, 790, 790, 228, 228, 228, 228, 790, + 790, 790, 790, 507, 300, 300, 300, 300, 790, 790, + + 790, 506, 790, 508, 300, 300, 300, 300, 790, 790, + 790, 790, 300, 300, 300, 300, 790, 507, 790, 510, + 460, 460, 460, 460, 406, 362, 362, 362, 508, 790, + 790, 509, 790, 790, 161, 161, 161, 161, 790, 790, + 790, 790, 790, 790, 510, 161, 161, 161, 161, 790, + 790, 790, 514, 790, 790, 509, 790, 790, 513, 517, + 200, 200, 200, 790, 790, 790, 790, 161, 161, 161, + 161, 417, 362, 362, 362, 790, 518, 514, 530, 200, + 200, 200, 513, 790, 790, 521, 519, 161, 161, 161, + 161, 790, 790, 790, 790, 790, 520, 161, 161, 161, + + 161, 518, 526, 526, 538, 200, 200, 200, 790, 790, + 790, 519, 790, 790, 161, 161, 161, 161, 525, 790, + 520, 476, 476, 790, 790, 790, 790, 161, 161, 161, + 161, 790, 790, 528, 528, 528, 528, 552, 200, 200, + 200, 790, 531, 525, 790, 790, 790, 790, 161, 161, + 161, 161, 790, 790, 790, 790, 161, 161, 161, 161, + 790, 790, 790, 533, 790, 790, 534, 531, 790, 790, + 790, 790, 161, 161, 161, 161, 790, 527, 790, 790, + 485, 485, 466, 362, 362, 362, 790, 790, 533, 790, + 535, 534, 536, 536, 536, 536, 529, 790, 790, 790, + + 790, 161, 161, 161, 161, 577, 200, 200, 200, 790, + 790, 539, 790, 790, 790, 535, 161, 161, 161, 161, + 790, 790, 790, 541, 790, 790, 540, 790, 790, 161, + 161, 161, 161, 790, 790, 790, 539, 161, 161, 161, + 161, 790, 790, 790, 542, 790, 790, 790, 541, 790, + 540, 790, 790, 790, 543, 537, 790, 790, 790, 790, + 790, 161, 161, 161, 161, 528, 528, 528, 528, 542, + 544, 790, 790, 790, 790, 161, 161, 161, 161, 543, + 790, 790, 546, 790, 161, 161, 161, 161, 790, 790, + 545, 790, 790, 790, 547, 544, 161, 161, 161, 161, + + 790, 790, 548, 790, 161, 161, 161, 161, 497, 497, + 790, 790, 790, 790, 790, 545, 161, 161, 161, 161, + 550, 550, 550, 550, 553, 553, 790, 790, 790, 549, + 790, 790, 790, 790, 790, 790, 161, 161, 161, 161, + 790, 790, 790, 790, 228, 228, 228, 228, 706, 706, + 790, 790, 790, 790, 549, 228, 228, 228, 228, 790, + 790, 554, 790, 790, 556, 790, 790, 228, 228, 228, + 228, 790, 790, 724, 790, 557, 228, 228, 228, 228, + 790, 790, 790, 551, 790, 554, 790, 790, 790, 556, + 790, 559, 228, 228, 228, 228, 790, 558, 724, 555, + + 557, 560, 790, 790, 790, 790, 228, 228, 228, 228, + 790, 790, 790, 790, 790, 790, 559, 228, 228, 228, + 228, 558, 790, 707, 790, 790, 560, 790, 562, 228, + 228, 228, 228, 790, 790, 790, 561, 300, 300, 300, + 300, 790, 790, 790, 563, 790, 790, 564, 790, 790, + 790, 790, 790, 562, 300, 300, 300, 300, 790, 790, + 561, 790, 790, 565, 476, 362, 362, 362, 790, 563, + 790, 790, 564, 790, 790, 161, 161, 161, 161, 790, + 790, 790, 790, 161, 161, 161, 161, 790, 565, 790, + 790, 161, 161, 161, 161, 790, 790, 790, 790, 161, + + 161, 161, 161, 566, 790, 790, 790, 790, 161, 161, + 161, 161, 569, 536, 536, 536, 536, 790, 790, 790, + 570, 161, 161, 161, 161, 790, 790, 790, 566, 790, + 790, 790, 571, 790, 526, 526, 790, 569, 790, 790, + 790, 574, 790, 790, 790, 570, 575, 575, 575, 575, + 790, 790, 790, 790, 790, 790, 571, 161, 161, 161, + 161, 790, 790, 790, 790, 790, 574, 161, 161, 161, + 161, 485, 362, 362, 362, 790, 790, 790, 579, 581, + 790, 790, 790, 790, 161, 161, 161, 161, 550, 550, + 550, 550, 790, 790, 790, 582, 161, 161, 161, 161, + + 790, 790, 790, 579, 581, 790, 790, 790, 790, 576, + 161, 161, 161, 161, 583, 790, 790, 790, 790, 790, + 582, 161, 161, 161, 161, 790, 790, 790, 790, 161, + 161, 161, 161, 790, 790, 790, 790, 585, 790, 583, + 161, 161, 161, 161, 790, 790, 586, 790, 587, 161, + 161, 161, 161, 497, 362, 362, 362, 790, 790, 790, + 588, 585, 790, 790, 790, 790, 161, 161, 161, 161, + 586, 790, 790, 587, 589, 790, 790, 590, 790, 790, + 161, 161, 161, 161, 790, 588, 790, 790, 790, 790, + 161, 161, 161, 161, 790, 553, 553, 790, 589, 790, + + 790, 790, 590, 790, 592, 790, 591, 594, 594, 594, + 594, 596, 596, 598, 200, 200, 200, 790, 790, 790, + 790, 790, 790, 161, 161, 161, 161, 790, 790, 592, + 591, 790, 790, 790, 790, 228, 228, 228, 228, 790, + 790, 790, 790, 228, 228, 228, 228, 790, 599, 790, + 790, 228, 228, 228, 228, 790, 600, 790, 790, 228, + 228, 228, 228, 790, 790, 790, 601, 790, 790, 790, + 595, 790, 790, 599, 575, 575, 575, 575, 790, 602, + 790, 600, 228, 228, 228, 228, 597, 790, 790, 790, + 790, 601, 228, 228, 228, 228, 790, 603, 790, 790, + + 228, 228, 228, 228, 602, 790, 790, 604, 790, 790, + 228, 228, 228, 228, 790, 790, 790, 790, 300, 300, + 300, 300, 603, 790, 790, 605, 790, 790, 790, 607, + 606, 790, 604, 790, 790, 300, 300, 300, 300, 526, + 362, 362, 362, 790, 790, 790, 608, 790, 790, 605, + 594, 594, 594, 594, 607, 606, 790, 790, 790, 790, + 161, 161, 161, 161, 631, 200, 200, 200, 790, 790, + 790, 608, 161, 161, 161, 161, 790, 790, 790, 790, + 161, 161, 161, 161, 790, 790, 609, 790, 790, 790, + 612, 611, 790, 790, 790, 790, 161, 161, 161, 161, + + 790, 790, 790, 790, 161, 161, 161, 161, 790, 790, + 609, 613, 790, 790, 790, 612, 611, 790, 790, 790, + 790, 790, 790, 616, 161, 161, 161, 161, 790, 790, + 790, 790, 161, 161, 161, 161, 613, 553, 362, 362, + 362, 790, 790, 790, 618, 790, 790, 620, 616, 790, + 790, 790, 790, 161, 161, 161, 161, 790, 790, 790, + 790, 161, 161, 161, 161, 790, 790, 790, 621, 618, + 790, 790, 620, 790, 790, 161, 161, 161, 161, 790, + 790, 790, 790, 161, 161, 161, 161, 790, 790, 790, + 790, 623, 790, 621, 161, 161, 161, 161, 790, 622, + + 790, 790, 161, 161, 161, 161, 658, 200, 200, 200, + 790, 790, 790, 624, 161, 161, 161, 161, 790, 790, + 790, 790, 790, 622, 161, 161, 161, 161, 790, 790, + 790, 790, 161, 161, 161, 161, 626, 626, 624, 790, + 596, 596, 790, 790, 790, 790, 790, 790, 161, 161, + 161, 161, 629, 629, 629, 629, 596, 362, 362, 362, + 790, 790, 790, 625, 228, 228, 228, 228, 790, 790, + 790, 790, 228, 228, 228, 228, 790, 790, 790, 790, + 228, 228, 228, 228, 790, 790, 790, 625, 228, 228, + 228, 228, 790, 790, 790, 790, 228, 228, 228, 228, + + 632, 633, 790, 790, 790, 790, 790, 228, 228, 228, + 228, 627, 790, 790, 790, 630, 634, 790, 790, 790, + 790, 228, 228, 228, 228, 632, 633, 635, 790, 790, + 790, 790, 790, 790, 228, 228, 228, 228, 790, 790, + 790, 634, 300, 300, 300, 300, 636, 637, 790, 790, + 790, 790, 635, 300, 300, 300, 300, 667, 200, 200, + 200, 638, 638, 678, 200, 200, 200, 790, 790, 790, + 636, 790, 637, 161, 161, 161, 161, 790, 790, 790, + 790, 161, 161, 161, 161, 790, 790, 790, 790, 161, + 161, 161, 161, 790, 790, 790, 790, 161, 161, 161, + + 161, 790, 790, 641, 642, 790, 790, 790, 790, 161, + 161, 161, 161, 656, 656, 656, 656, 790, 790, 790, + 646, 790, 790, 643, 790, 790, 647, 790, 641, 642, + 790, 790, 790, 790, 648, 790, 639, 161, 161, 161, + 161, 790, 790, 790, 790, 646, 790, 643, 161, 161, + 161, 161, 790, 790, 790, 790, 790, 651, 161, 161, + 161, 161, 790, 790, 790, 790, 161, 161, 161, 161, + 626, 362, 362, 362, 790, 790, 790, 653, 161, 161, + 161, 161, 651, 790, 652, 790, 790, 161, 161, 161, + 161, 790, 790, 654, 790, 790, 161, 161, 161, 161, + + 649, 790, 653, 663, 663, 663, 663, 790, 652, 626, + 626, 790, 655, 596, 596, 790, 790, 790, 654, 790, + 790, 656, 656, 656, 656, 629, 629, 629, 629, 638, + 362, 362, 362, 790, 790, 790, 655, 228, 228, 228, + 228, 790, 790, 790, 790, 228, 228, 228, 228, 790, + 660, 790, 790, 228, 228, 228, 228, 790, 790, 790, + 790, 228, 228, 228, 228, 790, 661, 790, 790, 228, + 228, 228, 228, 790, 662, 660, 790, 790, 790, 790, + 228, 228, 228, 228, 657, 790, 790, 790, 630, 638, + 638, 661, 647, 362, 362, 362, 790, 790, 790, 662, + + 790, 663, 663, 663, 663, 790, 790, 790, 790, 161, + 161, 161, 161, 790, 664, 790, 665, 161, 161, 161, + 161, 790, 790, 790, 669, 161, 161, 161, 161, 670, + 790, 790, 790, 790, 790, 161, 161, 161, 161, 664, + 790, 665, 790, 790, 161, 161, 161, 161, 790, 669, + 790, 671, 790, 790, 670, 674, 790, 790, 790, 677, + 161, 161, 161, 161, 666, 790, 790, 680, 790, 790, + 161, 161, 161, 161, 790, 671, 704, 200, 200, 200, + 674, 790, 682, 790, 677, 681, 790, 790, 790, 790, + 790, 790, 680, 161, 161, 161, 161, 790, 790, 790, + + 790, 161, 161, 161, 161, 682, 362, 362, 362, 790, + 681, 684, 790, 790, 790, 790, 161, 161, 161, 161, + 790, 790, 790, 790, 228, 228, 228, 228, 790, 790, + 790, 790, 228, 228, 228, 228, 684, 790, 790, 790, + 790, 228, 228, 228, 228, 790, 790, 790, 790, 161, + 161, 161, 161, 790, 790, 790, 683, 161, 161, 161, + 161, 790, 790, 790, 790, 790, 790, 690, 161, 161, + 161, 161, 691, 790, 790, 790, 790, 790, 790, 692, + 161, 161, 161, 161, 790, 790, 790, 790, 161, 161, + 161, 161, 690, 731, 200, 200, 200, 691, 698, 713, + + 362, 362, 362, 790, 692, 790, 695, 161, 161, 161, + 161, 790, 790, 790, 790, 161, 161, 161, 161, 790, + 790, 790, 790, 698, 161, 161, 161, 161, 790, 790, + 695, 790, 790, 700, 790, 790, 701, 790, 790, 161, + 161, 161, 161, 757, 200, 200, 200, 790, 790, 790, + 709, 161, 161, 161, 161, 790, 790, 700, 790, 790, + 790, 701, 710, 790, 790, 713, 790, 790, 161, 161, + 161, 161, 790, 790, 790, 709, 161, 161, 161, 161, + 747, 362, 362, 362, 790, 790, 790, 710, 711, 790, + 790, 790, 790, 161, 161, 161, 161, 790, 790, 790, + + 790, 161, 161, 161, 161, 790, 790, 790, 790, 161, + 161, 161, 161, 711, 790, 790, 719, 790, 790, 790, + 790, 161, 161, 161, 161, 790, 790, 790, 790, 720, + 790, 727, 161, 161, 161, 161, 790, 790, 790, 714, + 790, 719, 728, 790, 790, 790, 790, 161, 161, 161, + 161, 790, 790, 790, 720, 790, 727, 161, 161, 161, + 161, 790, 790, 790, 790, 790, 790, 728, 161, 161, + 161, 161, 790, 790, 790, 790, 790, 790, 734, 161, + 161, 161, 161, 790, 790, 790, 790, 161, 161, 161, + 161, 790, 790, 790, 790, 161, 161, 161, 161, 747, + + 790, 790, 790, 734, 750, 750, 790, 790, 790, 790, + 161, 161, 161, 161, 790, 741, 759, 759, 759, 759, + 759, 759, 759, 759, 774, 774, 779, 779, 779, 779, + 790, 790, 790, 790, 790, 790, 779, 779, 779, 779, + 741, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 748, 790, 790, 790, 790, 790, 751, + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, 790, 775, + + 53, 53, 53, 152, 790, 152, 154, 790, 154, 210, + 790, 210, 212, 790, 212, 215, 790, 215, 217, 790, + 217, 219, 790, 219, 222, 790, 222, 224, 790, 224, + 263, 790, 263, 265, 790, 265, 294, 790, 294, 296, + 790, 296, 326, 790, 326, 368, 790, 368, 369, 790, + 369, 370, 790, 370, 11, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790 + } ; + +static const flex_int16_t yy_chk[4939] = + { 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, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 2, 3, 470, 6, 808, 2, 805, + 3, 6, 4, 2, 2, 2, 2, 2, 4, 8, + + 10, 45, 45, 4, 8, 10, 20, 802, 20, 470, + 20, 20, 20, 20, 23, 794, 23, 789, 23, 23, + 23, 23, 27, 788, 27, 780, 27, 27, 27, 27, + 38, 38, 38, 38, 40, 40, 40, 40, 41, 41, + 41, 41, 42, 42, 42, 42, 43, 43, 43, 44, + 44, 44, 44, 46, 46, 46, 46, 2, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + + 9, 9, 9, 9, 9, 9, 9, 14, 21, 21, + 25, 25, 47, 47, 91, 91, 21, 777, 21, 60, + 21, 21, 21, 21, 28, 98, 28, 423, 28, 28, + 28, 28, 29, 775, 29, 515, 29, 29, 29, 29, + 89, 89, 89, 29, 51, 51, 51, 51, 471, 28, + 771, 30, 423, 30, 479, 30, 30, 30, 30, 37, + 515, 37, 31, 37, 37, 37, 37, 124, 29, 522, + 37, 30, 471, 31, 28, 30, 93, 93, 479, 31, + 31, 14, 31, 21, 22, 25, 22, 31, 22, 22, + 22, 22, 523, 60, 522, 37, 30, 32, 31, 98, + + 30, 71, 71, 31, 31, 32, 31, 32, 532, 33, + 765, 32, 32, 48, 32, 33, 33, 523, 33, 107, + 107, 760, 32, 756, 48, 48, 48, 48, 117, 117, + 32, 751, 32, 532, 33, 32, 32, 567, 32, 33, + 33, 124, 33, 52, 52, 52, 52, 150, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, 24, 159, + 24, 567, 24, 24, 24, 24, 34, 739, 34, 173, + 34, 34, 34, 34, 119, 119, 71, 733, 66, 220, + 66, 34, 66, 66, 66, 66, 69, 48, 69, 730, + 69, 69, 69, 69, 107, 35, 725, 35, 722, 35, + + 35, 35, 35, 115, 115, 115, 34, 133, 133, 718, + 35, 145, 145, 74, 261, 74, 35, 74, 74, 74, + 74, 150, 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 26, 159, 26, 35, 26, 26, 26, 26, + 36, 35, 36, 173, 36, 36, 36, 36, 74, 84, + 84, 84, 84, 220, 26, 707, 67, 67, 36, 292, + 26, 26, 580, 26, 67, 36, 67, 572, 67, 67, + 67, 67, 74, 86, 86, 86, 86, 147, 147, 26, + 170, 170, 133, 36, 26, 26, 580, 26, 261, 73, + 36, 73, 572, 73, 73, 73, 73, 75, 703, 75, + + 697, 75, 75, 75, 75, 76, 614, 76, 688, 76, + 76, 76, 76, 172, 172, 77, 685, 77, 73, 77, + 77, 77, 77, 87, 87, 87, 87, 237, 237, 76, + 614, 67, 68, 292, 68, 676, 68, 68, 68, 68, + 77, 78, 73, 78, 666, 78, 78, 78, 78, 88, + 88, 88, 88, 79, 76, 79, 78, 79, 79, 79, + 79, 90, 90, 90, 90, 77, 143, 143, 143, 79, + 92, 92, 92, 92, 110, 110, 110, 110, 82, 659, + 82, 78, 82, 82, 82, 82, 80, 657, 80, 630, + 80, 80, 80, 80, 79, 628, 68, 68, 68, 68, + + 68, 68, 68, 68, 68, 68, 70, 617, 70, 82, + 70, 70, 70, 70, 80, 81, 595, 81, 593, 81, + 81, 81, 81, 112, 112, 112, 112, 168, 168, 168, + 81, 239, 239, 82, 584, 83, 573, 83, 80, 83, + 83, 83, 83, 102, 578, 102, 576, 102, 102, 102, + 102, 568, 103, 103, 551, 81, 113, 113, 113, 113, + 103, 573, 103, 83, 103, 103, 103, 103, 278, 278, + 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, + 114, 114, 114, 114, 105, 615, 105, 83, 105, 105, + 105, 105, 109, 640, 109, 665, 109, 109, 109, 109, + + 116, 116, 116, 116, 118, 118, 118, 118, 128, 615, + 128, 537, 128, 128, 128, 128, 131, 640, 131, 665, + 131, 131, 131, 131, 235, 235, 235, 103, 104, 696, + 104, 721, 104, 104, 104, 104, 129, 129, 138, 138, + 138, 138, 280, 280, 129, 529, 129, 610, 129, 129, + 129, 129, 134, 696, 134, 721, 134, 134, 134, 134, + 135, 524, 135, 516, 135, 135, 135, 135, 140, 140, + 140, 140, 610, 137, 512, 137, 511, 137, 137, 137, + 137, 141, 141, 141, 141, 135, 309, 309, 137, 276, + 276, 276, 104, 104, 104, 104, 104, 104, 104, 104, + + 104, 104, 106, 499, 106, 484, 106, 106, 106, 106, + 135, 129, 136, 137, 136, 480, 136, 136, 136, 136, + 142, 142, 142, 142, 144, 144, 144, 144, 146, 146, + 146, 146, 472, 156, 463, 156, 136, 156, 156, 156, + 156, 157, 461, 157, 458, 157, 157, 157, 157, 161, + 443, 161, 619, 161, 161, 161, 161, 163, 163, 163, + 163, 136, 165, 165, 165, 165, 106, 106, 106, 106, + 106, 106, 106, 106, 106, 106, 130, 619, 130, 430, + 130, 130, 130, 130, 166, 166, 166, 166, 167, 167, + 167, 167, 169, 169, 169, 169, 171, 171, 171, 171, + + 197, 197, 197, 197, 175, 644, 175, 645, 175, 175, + 175, 175, 424, 176, 650, 176, 409, 176, 176, 176, + 176, 177, 177, 307, 307, 307, 175, 394, 176, 177, + 644, 177, 645, 177, 177, 177, 177, 311, 311, 650, + 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, + 132, 175, 132, 176, 132, 132, 132, 132, 178, 664, + 178, 668, 178, 178, 178, 178, 193, 387, 193, 371, + 193, 193, 193, 193, 367, 179, 329, 179, 327, 179, + 179, 179, 179, 325, 664, 193, 668, 183, 178, 183, + 303, 183, 183, 183, 183, 296, 177, 294, 180, 179, + + 180, 179, 180, 180, 180, 180, 328, 328, 328, 183, + 193, 672, 178, 673, 132, 132, 132, 132, 132, 132, + 132, 132, 132, 132, 179, 181, 179, 181, 180, 181, + 181, 181, 181, 293, 183, 272, 672, 182, 673, 182, + 181, 182, 182, 182, 182, 198, 198, 198, 198, 265, + 675, 182, 180, 184, 679, 184, 732, 184, 184, 184, + 184, 199, 199, 199, 199, 181, 185, 686, 185, 182, + 185, 185, 185, 185, 186, 675, 182, 738, 184, 679, + 732, 186, 263, 186, 689, 186, 186, 186, 186, 693, + 185, 702, 686, 182, 687, 687, 186, 372, 372, 372, + + 187, 738, 187, 184, 187, 187, 187, 187, 699, 689, + 188, 188, 262, 187, 693, 185, 702, 699, 188, 231, + 188, 186, 188, 188, 188, 188, 189, 224, 189, 187, + 189, 189, 189, 189, 388, 388, 388, 190, 187, 190, + 344, 190, 190, 190, 190, 191, 222, 191, 186, 191, + 191, 191, 191, 187, 395, 395, 395, 189, 221, 191, + 209, 344, 190, 200, 200, 200, 200, 705, 191, 687, + 192, 191, 192, 708, 192, 192, 192, 192, 174, 164, + 715, 189, 699, 192, 191, 188, 344, 190, 201, 201, + 201, 201, 705, 191, 160, 194, 191, 194, 708, 194, + + 194, 194, 194, 195, 195, 715, 154, 152, 192, 151, + 716, 195, 763, 195, 344, 195, 195, 195, 195, 716, + 196, 763, 196, 194, 196, 196, 196, 196, 202, 202, + 202, 202, 203, 203, 203, 203, 204, 204, 204, 204, + 723, 207, 196, 205, 205, 205, 205, 194, 206, 206, + 206, 206, 207, 207, 207, 207, 208, 208, 208, 208, + 213, 213, 213, 213, 148, 723, 139, 196, 214, 214, + 214, 214, 127, 126, 125, 225, 120, 225, 195, 225, + 225, 225, 225, 226, 716, 226, 763, 226, 226, 226, + 226, 228, 111, 228, 108, 228, 228, 228, 228, 230, + + 230, 230, 230, 232, 232, 232, 232, 233, 233, 233, + 233, 234, 234, 234, 234, 207, 236, 236, 236, 236, + 238, 238, 238, 238, 241, 742, 241, 753, 241, 241, + 241, 241, 242, 724, 242, 101, 242, 242, 242, 242, + 243, 729, 243, 100, 243, 243, 243, 243, 244, 742, + 244, 753, 244, 244, 244, 244, 99, 245, 724, 245, + 466, 245, 245, 245, 245, 735, 729, 244, 245, 246, + 736, 246, 764, 246, 246, 246, 246, 251, 251, 251, + 251, 466, 247, 737, 247, 246, 247, 247, 247, 247, + 735, 94, 244, 245, 740, 736, 764, 247, 248, 85, + + 248, 247, 248, 248, 248, 248, 466, 249, 737, 249, + 246, 249, 249, 249, 249, 252, 252, 252, 252, 740, + 743, 743, 247, 249, 248, 250, 247, 250, 72, 250, + 250, 250, 250, 249, 466, 744, 250, 253, 253, 253, + 253, 254, 254, 254, 254, 65, 62, 61, 249, 248, + 255, 255, 255, 255, 256, 256, 256, 256, 249, 56, + 744, 250, 257, 257, 257, 257, 258, 258, 258, 258, + 259, 259, 259, 259, 260, 260, 260, 260, 266, 55, + 266, 49, 266, 266, 266, 266, 267, 39, 267, 19, + 267, 267, 267, 267, 269, 743, 269, 16, 269, 269, + + 269, 269, 271, 271, 271, 271, 273, 273, 273, 273, + 274, 274, 274, 274, 275, 275, 275, 275, 277, 277, + 277, 277, 279, 279, 279, 279, 282, 282, 282, 282, + 283, 283, 283, 283, 284, 284, 284, 284, 285, 285, + 285, 285, 286, 286, 286, 286, 287, 287, 287, 287, + 288, 288, 288, 288, 289, 289, 289, 289, 290, 290, + 290, 290, 291, 291, 291, 291, 297, 15, 297, 11, + 297, 297, 297, 297, 298, 0, 298, 0, 298, 298, + 298, 298, 300, 0, 300, 0, 300, 300, 300, 300, + 302, 302, 302, 302, 304, 304, 304, 304, 305, 305, + + 305, 305, 306, 306, 306, 306, 308, 308, 308, 308, + 310, 310, 310, 310, 312, 0, 312, 0, 312, 312, + 312, 312, 313, 0, 313, 0, 313, 313, 313, 313, + 0, 0, 314, 0, 314, 313, 314, 314, 314, 314, + 312, 315, 315, 315, 315, 316, 316, 316, 316, 317, + 317, 317, 317, 318, 318, 318, 318, 745, 314, 0, + 313, 319, 319, 319, 319, 312, 320, 320, 320, 320, + 321, 321, 321, 321, 322, 322, 322, 322, 323, 323, + 323, 323, 745, 314, 324, 324, 324, 324, 330, 330, + 333, 333, 333, 333, 332, 332, 330, 746, 330, 749, + + 330, 330, 330, 330, 331, 331, 332, 332, 332, 332, + 0, 0, 331, 0, 331, 0, 331, 331, 331, 331, + 0, 334, 746, 334, 749, 334, 334, 334, 334, 335, + 0, 335, 647, 335, 335, 335, 335, 752, 336, 334, + 336, 754, 336, 336, 336, 336, 346, 346, 346, 346, + 337, 0, 337, 647, 337, 337, 337, 337, 335, 755, + 758, 337, 752, 330, 334, 337, 754, 0, 0, 332, + 338, 778, 338, 336, 338, 338, 338, 338, 647, 331, + 339, 0, 335, 338, 755, 758, 337, 339, 761, 339, + 337, 339, 339, 339, 339, 778, 340, 336, 340, 0, + + 340, 340, 340, 340, 0, 341, 647, 341, 338, 341, + 341, 341, 341, 761, 342, 340, 342, 762, 342, 342, + 342, 342, 343, 0, 343, 0, 343, 343, 343, 343, + 350, 350, 350, 350, 341, 343, 766, 342, 0, 345, + 340, 345, 762, 345, 345, 345, 345, 360, 360, 360, + 360, 0, 0, 0, 339, 767, 767, 0, 341, 0, + 343, 766, 342, 345, 347, 768, 347, 0, 347, 347, + 347, 347, 348, 772, 348, 776, 348, 348, 348, 348, + 349, 349, 364, 364, 364, 364, 347, 0, 345, 0, + 768, 0, 349, 349, 349, 349, 0, 782, 772, 351, + + 776, 351, 348, 351, 351, 351, 351, 0, 352, 0, + 352, 347, 352, 352, 352, 352, 365, 365, 365, 365, + 783, 352, 782, 359, 359, 352, 348, 353, 351, 353, + 767, 353, 353, 353, 353, 359, 359, 359, 359, 0, + 0, 0, 353, 0, 769, 783, 352, 0, 784, 0, + 352, 0, 351, 769, 354, 349, 354, 0, 354, 354, + 354, 354, 0, 682, 355, 354, 355, 353, 355, 355, + 355, 355, 356, 784, 356, 0, 356, 356, 356, 356, + 366, 366, 366, 366, 682, 0, 355, 357, 0, 357, + 354, 357, 357, 357, 357, 358, 0, 358, 359, 358, + + 358, 358, 358, 356, 384, 384, 384, 384, 0, 682, + 361, 355, 361, 357, 361, 361, 361, 361, 769, 0, + 358, 385, 385, 385, 385, 0, 358, 356, 362, 0, + 362, 785, 362, 362, 362, 362, 0, 682, 357, 713, + 785, 361, 363, 0, 363, 358, 363, 363, 363, 363, + 358, 373, 786, 373, 0, 373, 373, 373, 373, 0, + 713, 786, 374, 0, 374, 361, 374, 374, 374, 374, + 386, 386, 386, 386, 0, 373, 374, 375, 0, 375, + 0, 375, 375, 375, 375, 713, 376, 0, 376, 0, + 376, 376, 376, 376, 391, 391, 391, 391, 0, 0, + + 373, 374, 376, 0, 377, 785, 377, 0, 377, 377, + 377, 377, 378, 713, 378, 0, 378, 378, 378, 378, + 392, 392, 392, 392, 0, 0, 786, 376, 377, 0, + 0, 379, 0, 379, 378, 379, 379, 379, 379, 380, + 0, 380, 0, 380, 380, 380, 380, 379, 0, 0, + 381, 0, 381, 377, 381, 381, 381, 381, 0, 378, + 393, 393, 393, 393, 0, 380, 0, 0, 0, 381, + 0, 382, 379, 382, 0, 382, 382, 382, 382, 383, + 0, 383, 0, 383, 383, 383, 383, 747, 0, 0, + 380, 389, 0, 389, 381, 389, 389, 389, 389, 390, + + 0, 390, 0, 390, 390, 390, 390, 396, 747, 396, + 0, 396, 396, 396, 396, 397, 0, 397, 0, 397, + 397, 397, 397, 398, 0, 398, 0, 398, 398, 398, + 398, 0, 0, 747, 399, 0, 399, 397, 399, 399, + 399, 399, 396, 0, 400, 398, 400, 0, 400, 400, + 400, 400, 401, 401, 401, 401, 402, 402, 402, 402, + 0, 747, 397, 404, 404, 0, 396, 0, 0, 0, + 398, 403, 403, 403, 403, 404, 404, 404, 404, 405, + 405, 405, 405, 406, 406, 407, 407, 407, 407, 408, + 408, 408, 408, 0, 0, 406, 406, 406, 406, 410, + + 410, 410, 410, 411, 0, 411, 0, 411, 411, 411, + 411, 412, 417, 412, 0, 412, 412, 412, 412, 413, + 414, 413, 0, 413, 413, 413, 413, 414, 411, 414, + 0, 414, 414, 414, 414, 417, 0, 0, 404, 0, + 0, 412, 415, 415, 415, 417, 415, 415, 415, 415, + 416, 0, 416, 411, 416, 416, 416, 416, 406, 0, + 417, 418, 418, 418, 418, 412, 0, 419, 0, 419, + 417, 419, 419, 419, 419, 0, 0, 420, 0, 420, + 416, 420, 420, 420, 420, 0, 417, 0, 421, 421, + 0, 0, 420, 0, 414, 419, 421, 0, 421, 0, + + 421, 421, 421, 421, 416, 422, 0, 422, 0, 422, + 422, 422, 422, 0, 0, 0, 425, 420, 425, 419, + 425, 425, 425, 425, 426, 426, 426, 426, 429, 429, + 429, 429, 0, 0, 427, 422, 427, 0, 427, 427, + 427, 427, 0, 428, 0, 428, 425, 428, 428, 428, + 428, 0, 0, 0, 428, 431, 431, 431, 431, 422, + 0, 432, 432, 421, 0, 427, 0, 0, 0, 432, + 425, 432, 0, 432, 432, 432, 432, 0, 433, 428, + 433, 0, 433, 433, 433, 433, 0, 0, 0, 427, + 0, 0, 434, 433, 434, 0, 434, 434, 434, 434, + + 435, 0, 435, 0, 435, 435, 435, 435, 439, 0, + 439, 0, 439, 439, 439, 439, 435, 436, 433, 436, + 434, 436, 436, 436, 436, 0, 437, 0, 437, 0, + 437, 437, 437, 437, 0, 0, 432, 437, 0, 0, + 0, 435, 0, 0, 434, 436, 438, 0, 438, 0, + 438, 438, 438, 438, 440, 0, 440, 0, 440, 440, + 440, 440, 437, 441, 441, 442, 442, 442, 442, 436, + 0, 441, 0, 441, 438, 441, 441, 441, 441, 444, + 444, 444, 444, 0, 445, 440, 445, 0, 445, 445, + 445, 445, 457, 457, 457, 457, 0, 0, 438, 445, + + 446, 0, 446, 0, 446, 446, 446, 446, 447, 440, + 447, 0, 447, 447, 447, 447, 448, 0, 448, 446, + 448, 448, 448, 448, 445, 0, 449, 447, 449, 0, + 449, 449, 449, 449, 0, 448, 0, 0, 441, 459, + 459, 459, 459, 450, 446, 450, 0, 450, 450, 450, + 450, 0, 447, 0, 450, 0, 449, 451, 0, 451, + 448, 451, 451, 451, 451, 452, 0, 452, 0, 452, + 452, 452, 452, 0, 0, 0, 451, 0, 0, 450, + 449, 453, 0, 453, 0, 453, 453, 453, 453, 0, + 454, 0, 454, 452, 454, 454, 454, 454, 0, 0, + + 455, 451, 455, 453, 455, 455, 455, 455, 456, 0, + 456, 0, 456, 456, 456, 456, 0, 452, 0, 456, + 460, 460, 460, 460, 462, 462, 462, 462, 453, 0, + 464, 455, 464, 0, 464, 464, 464, 464, 0, 0, + 0, 465, 0, 465, 456, 465, 465, 465, 465, 0, + 0, 0, 465, 0, 0, 455, 0, 0, 464, 467, + 467, 467, 467, 468, 0, 468, 0, 468, 468, 468, + 468, 473, 473, 473, 473, 0, 468, 465, 477, 477, + 477, 477, 464, 469, 0, 469, 468, 469, 469, 469, + 469, 0, 0, 474, 0, 474, 468, 474, 474, 474, + + 474, 468, 475, 475, 486, 486, 486, 486, 0, 0, + 475, 468, 475, 0, 475, 475, 475, 475, 474, 0, + 468, 476, 476, 478, 0, 478, 0, 478, 478, 478, + 478, 0, 0, 476, 476, 476, 476, 498, 498, 498, + 498, 0, 478, 474, 481, 0, 481, 0, 481, 481, + 481, 481, 482, 0, 482, 0, 482, 482, 482, 482, + 0, 0, 0, 481, 0, 0, 482, 478, 483, 0, + 483, 0, 483, 483, 483, 483, 0, 475, 0, 0, + 485, 485, 517, 517, 517, 517, 0, 0, 481, 0, + 483, 482, 485, 485, 485, 485, 476, 487, 0, 487, + + 0, 487, 487, 487, 487, 527, 527, 527, 527, 0, + 0, 487, 488, 0, 488, 483, 488, 488, 488, 488, + 0, 0, 0, 488, 0, 489, 487, 489, 0, 489, + 489, 489, 489, 490, 0, 490, 487, 490, 490, 490, + 490, 0, 0, 0, 489, 0, 0, 0, 488, 0, + 487, 0, 0, 0, 490, 485, 0, 491, 0, 491, + 0, 491, 491, 491, 491, 528, 528, 528, 528, 489, + 491, 492, 0, 492, 0, 492, 492, 492, 492, 490, + 493, 0, 493, 0, 493, 493, 493, 493, 0, 0, + 492, 0, 494, 0, 494, 491, 494, 494, 494, 494, + + 495, 0, 495, 0, 495, 495, 495, 495, 497, 497, + 0, 0, 496, 0, 496, 492, 496, 496, 496, 496, + 497, 497, 497, 497, 500, 500, 0, 0, 0, 496, + 0, 0, 500, 0, 500, 0, 500, 500, 500, 500, + 501, 0, 501, 0, 501, 501, 501, 501, 706, 706, + 0, 502, 0, 502, 496, 502, 502, 502, 502, 0, + 0, 500, 0, 503, 501, 503, 0, 503, 503, 503, + 503, 0, 504, 706, 504, 502, 504, 504, 504, 504, + 0, 0, 0, 497, 0, 500, 0, 0, 505, 501, + 505, 504, 505, 505, 505, 505, 0, 503, 706, 500, + + 502, 505, 506, 0, 506, 0, 506, 506, 506, 506, + 0, 0, 0, 507, 0, 507, 504, 507, 507, 507, + 507, 503, 0, 706, 0, 508, 505, 508, 507, 508, + 508, 508, 508, 509, 0, 509, 506, 509, 509, 509, + 509, 0, 0, 0, 508, 0, 0, 509, 0, 0, + 510, 0, 510, 507, 510, 510, 510, 510, 0, 0, + 506, 0, 0, 510, 530, 530, 530, 530, 0, 508, + 0, 513, 509, 513, 0, 513, 513, 513, 513, 514, + 0, 514, 0, 514, 514, 514, 514, 518, 510, 518, + 0, 518, 518, 518, 518, 519, 0, 519, 0, 519, + + 519, 519, 519, 514, 520, 0, 520, 0, 520, 520, + 520, 520, 518, 536, 536, 536, 536, 525, 0, 525, + 519, 525, 525, 525, 525, 0, 0, 0, 514, 0, + 0, 0, 520, 0, 526, 526, 0, 518, 0, 0, + 0, 525, 0, 0, 0, 519, 526, 526, 526, 526, + 0, 0, 0, 531, 0, 531, 520, 531, 531, 531, + 531, 0, 0, 533, 0, 533, 525, 533, 533, 533, + 533, 538, 538, 538, 538, 0, 0, 0, 531, 533, + 534, 0, 534, 0, 534, 534, 534, 534, 550, 550, + 550, 550, 535, 0, 535, 534, 535, 535, 535, 535, + + 0, 0, 0, 531, 533, 0, 539, 0, 539, 526, + 539, 539, 539, 539, 535, 0, 0, 540, 0, 540, + 534, 540, 540, 540, 540, 541, 0, 541, 0, 541, + 541, 541, 541, 0, 0, 0, 542, 539, 542, 535, + 542, 542, 542, 542, 0, 543, 540, 543, 541, 543, + 543, 543, 543, 552, 552, 552, 552, 0, 0, 0, + 542, 539, 544, 0, 544, 0, 544, 544, 544, 544, + 540, 0, 0, 541, 543, 0, 545, 544, 545, 0, + 545, 545, 545, 545, 0, 542, 549, 0, 549, 0, + 549, 549, 549, 549, 0, 553, 553, 0, 543, 0, + + 0, 0, 544, 0, 549, 0, 545, 553, 553, 553, + 553, 554, 554, 555, 555, 555, 555, 0, 0, 554, + 0, 554, 0, 554, 554, 554, 554, 0, 0, 549, + 545, 556, 0, 556, 0, 556, 556, 556, 556, 557, + 0, 557, 0, 557, 557, 557, 557, 558, 556, 558, + 0, 558, 558, 558, 558, 559, 557, 559, 0, 559, + 559, 559, 559, 0, 0, 0, 558, 0, 0, 0, + 553, 0, 0, 556, 575, 575, 575, 575, 560, 559, + 560, 557, 560, 560, 560, 560, 554, 0, 561, 0, + 561, 558, 561, 561, 561, 561, 562, 560, 562, 0, + + 562, 562, 562, 562, 559, 0, 563, 561, 563, 0, + 563, 563, 563, 563, 564, 0, 564, 0, 564, 564, + 564, 564, 560, 0, 0, 562, 0, 0, 0, 564, + 563, 565, 561, 565, 0, 565, 565, 565, 565, 577, + 577, 577, 577, 0, 0, 0, 565, 0, 0, 562, + 594, 594, 594, 594, 564, 563, 566, 0, 566, 0, + 566, 566, 566, 566, 597, 597, 597, 597, 569, 0, + 569, 565, 569, 569, 569, 569, 570, 0, 570, 0, + 570, 570, 570, 570, 0, 0, 566, 0, 0, 0, + 570, 569, 571, 0, 571, 0, 571, 571, 571, 571, + + 574, 0, 574, 0, 574, 574, 574, 574, 0, 0, + 566, 571, 0, 0, 0, 570, 569, 0, 0, 0, + 579, 0, 579, 574, 579, 579, 579, 579, 581, 0, + 581, 0, 581, 581, 581, 581, 571, 598, 598, 598, + 598, 0, 0, 0, 579, 0, 0, 581, 574, 582, + 0, 582, 0, 582, 582, 582, 582, 583, 0, 583, + 0, 583, 583, 583, 583, 0, 0, 0, 583, 579, + 0, 585, 581, 585, 0, 585, 585, 585, 585, 586, + 0, 586, 0, 586, 586, 586, 586, 0, 0, 0, + 587, 587, 587, 583, 587, 587, 587, 587, 588, 585, + + 588, 0, 588, 588, 588, 588, 627, 627, 627, 627, + 589, 0, 589, 588, 589, 589, 589, 589, 0, 0, + 590, 0, 590, 585, 590, 590, 590, 590, 591, 0, + 591, 0, 591, 591, 591, 591, 592, 592, 588, 0, + 596, 596, 0, 0, 592, 0, 592, 0, 592, 592, + 592, 592, 596, 596, 596, 596, 631, 631, 631, 631, + 599, 0, 599, 591, 599, 599, 599, 599, 600, 0, + 600, 0, 600, 600, 600, 600, 601, 0, 601, 0, + 601, 601, 601, 601, 602, 0, 602, 591, 602, 602, + 602, 602, 603, 0, 603, 0, 603, 603, 603, 603, + + 601, 602, 0, 604, 0, 604, 0, 604, 604, 604, + 604, 592, 0, 0, 0, 596, 603, 605, 0, 605, + 0, 605, 605, 605, 605, 601, 602, 604, 0, 0, + 606, 0, 606, 0, 606, 606, 606, 606, 607, 0, + 607, 603, 607, 607, 607, 607, 605, 606, 0, 608, + 0, 608, 604, 608, 608, 608, 608, 639, 639, 639, + 639, 609, 609, 649, 649, 649, 649, 0, 0, 609, + 605, 609, 606, 609, 609, 609, 609, 611, 0, 611, + 0, 611, 611, 611, 611, 612, 0, 612, 0, 612, + 612, 612, 612, 613, 0, 613, 0, 613, 613, 613, + + 613, 0, 0, 611, 612, 616, 0, 616, 0, 616, + 616, 616, 616, 656, 656, 656, 656, 0, 0, 0, + 616, 0, 0, 613, 0, 0, 618, 0, 611, 612, + 0, 0, 0, 618, 618, 618, 609, 618, 618, 618, + 618, 0, 0, 0, 620, 616, 620, 613, 620, 620, + 620, 620, 0, 0, 621, 0, 621, 620, 621, 621, + 621, 621, 622, 0, 622, 0, 622, 622, 622, 622, + 658, 658, 658, 658, 623, 0, 623, 622, 623, 623, + 623, 623, 620, 624, 621, 624, 0, 624, 624, 624, + 624, 0, 625, 623, 625, 0, 625, 625, 625, 625, + + 618, 0, 622, 663, 663, 663, 663, 0, 621, 626, + 626, 0, 624, 629, 629, 0, 0, 0, 623, 0, + 0, 626, 626, 626, 626, 629, 629, 629, 629, 667, + 667, 667, 667, 632, 0, 632, 624, 632, 632, 632, + 632, 633, 0, 633, 0, 633, 633, 633, 633, 634, + 632, 634, 0, 634, 634, 634, 634, 635, 0, 635, + 0, 635, 635, 635, 635, 636, 634, 636, 0, 636, + 636, 636, 636, 0, 635, 632, 637, 0, 637, 0, + 637, 637, 637, 637, 626, 0, 0, 0, 629, 638, + 638, 634, 678, 678, 678, 678, 0, 0, 0, 635, + + 0, 638, 638, 638, 638, 641, 0, 641, 0, 641, + 641, 641, 641, 642, 638, 642, 638, 642, 642, 642, + 642, 643, 0, 643, 641, 643, 643, 643, 643, 642, + 0, 646, 0, 646, 0, 646, 646, 646, 646, 638, + 648, 638, 648, 0, 648, 648, 648, 648, 0, 641, + 0, 643, 0, 0, 642, 646, 651, 0, 651, 648, + 651, 651, 651, 651, 638, 0, 652, 651, 652, 0, + 652, 652, 652, 652, 0, 643, 683, 683, 683, 683, + 646, 0, 653, 0, 648, 652, 0, 0, 0, 653, + 0, 653, 651, 653, 653, 653, 653, 654, 0, 654, + + 0, 654, 654, 654, 654, 704, 704, 704, 704, 0, + 652, 654, 655, 0, 655, 0, 655, 655, 655, 655, + 660, 0, 660, 0, 660, 660, 660, 660, 661, 0, + 661, 0, 661, 661, 661, 661, 654, 662, 0, 662, + 0, 662, 662, 662, 662, 669, 0, 669, 0, 669, + 669, 669, 669, 670, 0, 670, 653, 670, 670, 670, + 670, 0, 0, 0, 671, 0, 671, 669, 671, 671, + 671, 671, 670, 0, 0, 0, 674, 0, 674, 671, + 674, 674, 674, 674, 677, 0, 677, 0, 677, 677, + 677, 677, 669, 714, 714, 714, 714, 670, 677, 731, + + 731, 731, 731, 680, 671, 680, 674, 680, 680, 680, + 680, 681, 0, 681, 0, 681, 681, 681, 681, 0, + 684, 0, 684, 677, 684, 684, 684, 684, 0, 0, + 674, 0, 0, 680, 0, 690, 681, 690, 0, 690, + 690, 690, 690, 748, 748, 748, 748, 691, 0, 691, + 690, 691, 691, 691, 691, 0, 0, 680, 0, 0, + 0, 681, 691, 0, 692, 695, 692, 0, 692, 692, + 692, 692, 695, 0, 695, 690, 695, 695, 695, 695, + 757, 757, 757, 757, 0, 0, 0, 691, 692, 698, + 0, 698, 0, 698, 698, 698, 698, 700, 0, 700, + + 0, 700, 700, 700, 700, 701, 0, 701, 0, 701, + 701, 701, 701, 692, 0, 0, 700, 709, 0, 709, + 0, 709, 709, 709, 709, 0, 0, 0, 710, 701, + 710, 709, 710, 710, 710, 710, 0, 0, 0, 695, + 0, 700, 710, 711, 0, 711, 0, 711, 711, 711, + 711, 0, 0, 719, 701, 719, 709, 719, 719, 719, + 719, 0, 0, 0, 720, 0, 720, 710, 720, 720, + 720, 720, 0, 0, 0, 727, 0, 727, 719, 727, + 727, 727, 727, 728, 0, 728, 0, 728, 728, 728, + 728, 734, 0, 734, 0, 734, 734, 734, 734, 741, + + 0, 0, 0, 719, 750, 750, 741, 0, 741, 0, + 741, 741, 741, 741, 0, 734, 750, 750, 750, 750, + 759, 759, 759, 759, 774, 774, 779, 779, 779, 779, + 0, 0, 0, 0, 0, 0, 774, 774, 774, 774, + 734, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 741, 0, 0, 0, 0, 0, 750, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 774, + + 791, 791, 791, 792, 0, 792, 793, 0, 793, 795, + 0, 795, 796, 0, 796, 797, 0, 797, 798, 0, + 798, 799, 0, 799, 800, 0, 800, 801, 0, 801, + 803, 0, 803, 804, 0, 804, 806, 0, 806, 807, + 0, 807, 809, 0, 809, 810, 0, 810, 811, 0, + 811, 812, 0, 812, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790 + } ; static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; @@ -1451,7 +2082,7 @@ char *yytext; #include #include #include -#ifdef HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H #include #endif #include @@ -1463,72 +2094,73 @@ char *yytext; #include "ppparse.h" enum { - CB_COMPILE_STATUS_NONE, - CB_COMPILE_STATUS_TRUE, - CB_COMPILE_STATUS_FALSE, - CB_COMPILE_STATUS_FALSE_END, - CB_COMPILE_STATUS_TRUE_ELSE, - CB_COMPILE_STATUS_FALSE_ELSE, - CB_COMPILE_STATUS_ERROR + CB_COMPILE_STATUS_NONE, + CB_COMPILE_STATUS_TRUE, + CB_COMPILE_STATUS_FALSE, + CB_COMPILE_STATUS_FALSE_END, + CB_COMPILE_STATUS_TRUE_ELSE, + CB_COMPILE_STATUS_FALSE_ELSE, + CB_COMPILE_STATUS_ERROR }; -static char *plexbuff1 = NULL; -static char *plexbuff2 = NULL; -static size_t newline_count = 0; -static size_t within_comment = 0; -static size_t inside_bracket = 0; -static size_t consecutive_quotation = 0; -static int quotation_mark = 0; -static int last_line_1 = -1; -static int last_line_2 = -1; +static char *plexbuff1 = NULL; +static char *plexbuff2 = NULL; +static size_t newline_count = 0; +static size_t within_comment = 0; +static size_t inside_bracket = 0; +static size_t consecutive_quotation = 0; +static int quotation_mark = 0; +static int last_line_1 = -1; +static int last_line_2 = -1; /* for COBOL68 style COPY in data description entry */ -static int suppress_echo = 0; -static int current_division = PP_OUT_OF_DIVISION; -static int omit_data_entry_name = 0; -static int omit_data_redef_name = 0; +static int suppress_echo = 0; +static int current_division = PP_OUT_OF_DIVISION; +static int omit_data_entry_name = 0; +static int omit_data_redef_name = 0; #define MAX_DEPTH 10 -static int cb_compile_status = CB_COMPILE_STATUS_NONE; -static int cb_compile_status_list[MAX_DEPTH]; -static int compile_directive_depth = -1; +static int cb_compile_status = CB_COMPILE_STATUS_NONE; +static int cb_compile_status_list[MAX_DEPTH]; +static int compile_directive_depth = -1; + -static struct cb_replace_list *current_replace_list = NULL; +static struct cb_replace_list *current_replace_list = NULL; -static struct cb_replace_list *current_copy_replace_list = NULL; +static struct cb_replace_list *current_copy_replace_list = NULL; -static struct cb_joining_ext *current_joining_ext = NULL; +static struct cb_joining_ext *current_joining_ext = NULL; -static struct cb_text_list *text_queue1 = NULL; /* for COPY REPLACING */ -static struct cb_text_list *text_queue2 = NULL; /* for REPLACE */ +static struct cb_text_list *text_queue1 = NULL; /* for COPY REPLACING */ +static struct cb_text_list *text_queue2 = NULL; /* for REPLACE */ static struct copy_info { - struct copy_info *next; - char *file; - int line; - int replacing; - int joining; - int quotation_mark; - YY_BUFFER_STATE buffer; + struct copy_info *next; + char *file; + int line; + int replacing; + int joining; + int quotation_mark; + YY_BUFFER_STATE buffer; } *copy_stack = NULL; -#define YY_INPUT(buf, result, max_size) result = ppinput(buf, max_size); +#define YY_INPUT(buf, result, max_size) result = ppinput (buf, max_size); -static int ppinput(char *buf, int max_size); -static void ppecho(const char *text); +static int ppinput (char *buf, int max_size); +static void ppecho (const char *text); -#ifdef I18N_UTF8 -static void convert_ucs_hyphen_minus(char *namebuf); +#ifdef I18N_UTF8 +static void convert_ucs_hyphen_minus (char *namebuf); #endif /*I18N_UTF8*/ -static void ppecho_dataname(char *datanamebuf); +static void ppecho_dataname (char *datanamebuf); -static void switch_to_buffer(const int lineno, const char *filename, - YY_BUFFER_STATE buffer); +static void switch_to_buffer (const int lineno, const char *filename, + YY_BUFFER_STATE buffer); -#line 1846 "pplex.c" +#line 2161 "pplex.c" -#line 1848 "pplex.c" +#line 2163 "pplex.c" #define INITIAL 0 #define PROCESS_STATE 1 @@ -1540,36 +2172,36 @@ static void switch_to_buffer(const int lineno, const char *filename, #define YY_EXTRA_TYPE void * #endif -static int yy_init_globals(void); +static int yy_init_globals ( void ); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int yylex_destroy(void); +int yylex_destroy ( void ); -int yyget_debug(void); +int yyget_debug ( void ); -void yyset_debug(int debug_flag); +void yyset_debug ( int debug_flag ); -YY_EXTRA_TYPE yyget_extra(void); +YY_EXTRA_TYPE yyget_extra ( void ); -void yyset_extra(YY_EXTRA_TYPE user_defined); +void yyset_extra ( YY_EXTRA_TYPE user_defined ); -FILE *yyget_in(void); +FILE *yyget_in ( void ); -void yyset_in(FILE *_in_str); +void yyset_in ( FILE * _in_str ); -FILE *yyget_out(void); +FILE *yyget_out ( void ); -void yyset_out(FILE *_out_str); +void yyset_out ( FILE * _out_str ); -int yyget_leng(void); + int yyget_leng ( void ); -char *yyget_text(void); +char *yyget_text ( void ); -int yyget_lineno(void); +int yyget_lineno ( void ); -void yyset_lineno(int _line_number); +void yyset_lineno ( int _line_number ); /* Macros after this point can all be overridden by user definitions in * section 1. @@ -1577,31 +2209,31 @@ void yyset_lineno(int _line_number); #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap(void); +extern "C" int yywrap ( void ); #else -extern int yywrap(void); +extern int yywrap ( void ); #endif #endif #ifndef YY_NO_UNPUT - -static void yyunput(int c, char *buf_ptr); - + + static void yyunput ( int c, char *buf_ptr ); + #endif #ifndef yytext_ptr -static void yy_flex_strncpy(char *, const char *, int); +static void yy_flex_strncpy ( char *, const char *, int ); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen(const char *); +static int yy_flex_strlen ( const char * ); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus -static int yyinput(void); +static int yyinput ( void ); #else -static int input(void); +static int input ( void ); #endif #endif @@ -1621,40 +2253,42 @@ static int input(void); /* 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) +#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 = '*'; \ - int 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, (yy_size_t)max_size, yyin)) == 0 && \ - ferror(yyin)) { \ - if (errno != EINTR) { \ - YY_FATAL_ERROR("input in flex scanner failed"); \ - break; \ - } \ - errno = 0; \ - clearerr(yyin); \ - } \ - } +#define YY_INPUT(buf,result,max_size) \ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ + { \ + int c = '*'; \ + int 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, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(yyin); \ + } \ + }\ +\ #endif @@ -1673,7 +2307,7 @@ static int input(void); /* Report a fatal error. */ #ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error(msg) +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) #endif /* end tables serialization structures and prototypes */ @@ -1684,9 +2318,9 @@ static int input(void); #ifndef YY_DECL #define YY_DECL_IS_OURS 1 -extern int yylex(void); +extern int yylex (void); -#define YY_DECL int yylex(void) +#define YY_DECL int yylex (void) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after yytext and yyleng @@ -1698,942 +2332,839 @@ extern int yylex(void); /* Code executed at the end of each rule. */ #ifndef YY_BREAK -#define YY_BREAK /*LINTED*/ 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 +#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; - - if (!(yy_init)) { - (yy_init) = 1; +YY_DECL +{ + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; + + if ( !(yy_init) ) + { + (yy_init) = 1; #ifdef YY_USER_INIT - YY_USER_INIT; + YY_USER_INIT; #endif - if (!(yy_start)) - (yy_start) = 1; /* first start state */ + if ( ! (yy_start) ) + (yy_start) = 1; /* first start state */ - if (!yyin) - yyin = stdin; + if ( ! yyin ) + yyin = stdin; - if (!yyout) - yyout = stdout; + if ( ! yyout ) + yyout = stdout; - if (!YY_CURRENT_BUFFER) { - yyensure_buffer_stack(); - YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE); - } + if ( ! YY_CURRENT_BUFFER ) { + yyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer( yyin, YY_BUF_SIZE ); + } - yy_load_buffer_state(); - } + yy_load_buffer_state( ); + } - { -#line 126 "pplex.l" - -#line 2070 "pplex.c" - - while (/*CONSTCOND*/ 1) /* loops until end-of-file is reached */ - { - yy_cp = (yy_c_buf_p); - - /* Support of yytext. */ - *yy_cp = (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 = (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]) { - (yy_last_accepting_state) = yy_current_state; - (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 >= 609) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - ++yy_cp; - } while (yy_current_state != 608); - yy_cp = (yy_last_accepting_cpos); - yy_current_state = (yy_last_accepting_state); - - yy_find_action: - 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 = (yy_hold_char); - yy_cp = (yy_last_accepting_cpos); - yy_current_state = (yy_last_accepting_state); - goto yy_find_action; - - case 1: - YY_RULE_SETUP -#line 131 "pplex.l" - { - ppecho(" "); - } - YY_BREAK - case 2: - YY_RULE_SETUP + { #line 135 "pplex.l" - { - identification_division_line_number = cb_source_line; - ppecho("IDENTIFICATION DIVISION."); - } - YY_BREAK - case 3: - YY_RULE_SETUP -#line 139 "pplex.l" - { - ppecho("ID DIVISION."); - } - YY_BREAK - case 4: - YY_RULE_SETUP + + + + + +#line 2385 "pplex.c" + + while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ + { + yy_cp = (yy_c_buf_p); + + /* Support of yytext. */ + *yy_cp = (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 = (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] ) + { + (yy_last_accepting_state) = yy_current_state; + (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 >= 791 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + ++yy_cp; + } + while ( yy_current_state != 790 ); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + +yy_find_action: + 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 = (yy_hold_char); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + goto yy_find_action; + +case 1: +YY_RULE_SETUP #line 140 "pplex.l" - { - ppecho("FUNCTION DIVISION."); - } - YY_BREAK - case 5: - YY_RULE_SETUP -#line 141 "pplex.l" - { - ppecho(yytext); - return PROGRAM_ID; - } - YY_BREAK - case 6: - YY_RULE_SETUP -#line 142 "pplex.l" - { - ppecho(yytext); - return FUNCTION_ID; - } - YY_BREAK - case 7: - YY_RULE_SETUP -#line 143 "pplex.l" - { - ppecho("ENVIRONMENT DIVISION"); - return ENVIRONMENT_DIVISION; - } - YY_BREAK - case 8: - YY_RULE_SETUP +{ + ppecho (" "); +} + YY_BREAK +case 2: +YY_RULE_SETUP #line 144 "pplex.l" - { - position_in_source_code = POSITION_AFTER_WORKING_STORAGE; - ppecho("DATA DIVISION"); - return DATA_DIVISION; - } - YY_BREAK - case 9: - YY_RULE_SETUP +{ + identification_division_line_number = cb_source_line; + ppecho ("IDENTIFICATION DIVISION."); +} + YY_BREAK +case 3: +YY_RULE_SETUP +#line 148 "pplex.l" +{ ppecho ("ID DIVISION."); } + YY_BREAK +case 4: +YY_RULE_SETUP #line 149 "pplex.l" - { - if (copy_stack->next == NULL) { - procedure_division_line_number = cb_source_line; - position_in_source_code = POSITION_AFTER_PROCEDURE_DIVISION; - } - ppecho("PROCEDURE DIVISION"); - return PROCEDURE_DIVISION; - } - YY_BREAK - case 10: - YY_RULE_SETUP -#line 157 "pplex.l" - { - ppecho("END PROGRAM"); - return END_PROGRAM; - } - YY_BREAK - case 11: - YY_RULE_SETUP +{ ppecho ("FUNCTION DIVISION."); } + YY_BREAK +case 5: +YY_RULE_SETUP +#line 150 "pplex.l" +{ ppecho (yytext); return PROGRAM_ID; } + YY_BREAK +case 6: +YY_RULE_SETUP +#line 151 "pplex.l" +{ ppecho (yytext); return FUNCTION_ID; } + YY_BREAK +case 7: +YY_RULE_SETUP +#line 152 "pplex.l" +{ ppecho ("ENVIRONMENT DIVISION"); return ENVIRONMENT_DIVISION; } + YY_BREAK +case 8: +YY_RULE_SETUP +#line 153 "pplex.l" +{ + position_in_source_code = POSITION_AFTER_WORKING_STORAGE; + ppecho ("DATA DIVISION"); + return DATA_DIVISION; +} + YY_BREAK +case 9: +YY_RULE_SETUP #line 158 "pplex.l" - { - ppecho("END FUNCTION"); - return END_FUNCTION; - } - YY_BREAK - case 12: -#line 161 "pplex.l" - case 13: - YY_RULE_SETUP -#line 161 "pplex.l" - { - ppecho(" "); - if (cb_source_format != CB_FORMAT_FIXED) { - ppecho(yytext); - } - } - YY_BREAK - case 14: - YY_RULE_SETUP -#line 168 "pplex.l" - { - BEGIN PROCESS_STATE; - } - YY_BREAK - - case 15: - /* rule 15 can match eol */ - YY_RULE_SETUP -#line 171 "pplex.l" - { - BEGIN INITIAL; - unput('\n'); - } - YY_BREAK - case 16: - YY_RULE_SETUP -#line 172 "pplex.l" - { - cb_warning(_("PROCESS statement is ignored")); - } - YY_BREAK - - case 17: - YY_RULE_SETUP -#line 175 "pplex.l" - { - BEGIN COPY_STATE; - return COPY; - } - YY_BREAK - case 18: - YY_RULE_SETUP -#line 176 "pplex.l" - { - BEGIN COPY_STATE; - return COPY; - } - YY_BREAK - case 19: - YY_RULE_SETUP +{ + if(copy_stack->next == NULL) { + procedure_division_line_number = cb_source_line; + position_in_source_code = POSITION_AFTER_PROCEDURE_DIVISION; + } + ppecho ("PROCEDURE DIVISION"); + return PROCEDURE_DIVISION; +} + YY_BREAK +case 10: +YY_RULE_SETUP +#line 166 "pplex.l" +{ ppecho ("END PROGRAM"); return END_PROGRAM; } + YY_BREAK +case 11: +YY_RULE_SETUP +#line 167 "pplex.l" +{ ppecho ("END FUNCTION"); return END_FUNCTION; } + YY_BREAK +case 12: +#line 170 "pplex.l" +case 13: +YY_RULE_SETUP +#line 170 "pplex.l" +{ + ppecho (" "); + if (cb_source_format != CB_FORMAT_FIXED) { + ppecho (yytext); + } +} + YY_BREAK +case 14: +YY_RULE_SETUP #line 177 "pplex.l" - { - BEGIN COPY_STATE; - return REPLACE; - } - YY_BREAK - - case 20: - /* rule 20 can match eol */ - YY_RULE_SETUP +{ BEGIN PROCESS_STATE; } + YY_BREAK + +case 15: +/* rule 15 can match eol */ +YY_RULE_SETUP #line 180 "pplex.l" - { - ECHO; - cb_source_line++; - } - YY_BREAK - case 21: - YY_RULE_SETUP +{ BEGIN INITIAL; unput ('\n'); } + YY_BREAK +case 16: +YY_RULE_SETUP #line 181 "pplex.l" - { /* ignore */ - } - YY_BREAK - case 22: - YY_RULE_SETUP -#line 182 "pplex.l" - { - BEGIN INITIAL; - return '.'; - } - YY_BREAK - case 23: - YY_RULE_SETUP -#line 183 "pplex.l" - { - BEGIN PSEUDO_STATE; - return EQEQ; - } - YY_BREAK - case 24: - YY_RULE_SETUP +{ cb_warning (_("PROCESS statement is ignored")); } + YY_BREAK + +case 17: +YY_RULE_SETUP #line 184 "pplex.l" - { - return '('; - } - YY_BREAK - case 25: - YY_RULE_SETUP +{ BEGIN COPY_STATE; return COPY; } + YY_BREAK +case 18: +YY_RULE_SETUP #line 185 "pplex.l" - { - return ')'; - } - YY_BREAK - case 26: - YY_RULE_SETUP +{ BEGIN COPY_STATE; return COPY; } + YY_BREAK +case 19: +YY_RULE_SETUP #line 186 "pplex.l" - { - return BY; - } - YY_BREAK - case 27: - YY_RULE_SETUP -#line 187 "pplex.l" - { - return IN; - } - YY_BREAK - case 28: - YY_RULE_SETUP -#line 188 "pplex.l" - { - return OF; - } - YY_BREAK - case 29: - YY_RULE_SETUP +{ BEGIN COPY_STATE; return REPLACE; } + YY_BREAK + +case 20: +/* rule 20 can match eol */ +YY_RULE_SETUP #line 189 "pplex.l" - { - return OFF; - } - YY_BREAK - case 30: - YY_RULE_SETUP +{ ECHO; cb_source_line++; } + YY_BREAK +case 21: +YY_RULE_SETUP #line 190 "pplex.l" - { - return SUPPRESS; - } - YY_BREAK - case 31: - YY_RULE_SETUP +{ /* ignore */ } + YY_BREAK +case 22: +YY_RULE_SETUP #line 191 "pplex.l" - { - return PRINTING; - } - YY_BREAK - case 32: - YY_RULE_SETUP +{ BEGIN INITIAL; return '.'; } + YY_BREAK +case 23: +YY_RULE_SETUP #line 192 "pplex.l" - { - return REPLACING; - } - YY_BREAK - case 33: - YY_RULE_SETUP +{ BEGIN PSEUDO_STATE; return EQEQ; } + YY_BREAK +case 24: +YY_RULE_SETUP #line 193 "pplex.l" - { - return LEADING; - } - YY_BREAK - case 34: - YY_RULE_SETUP +{ return '('; } + YY_BREAK +case 25: +YY_RULE_SETUP #line 194 "pplex.l" - { - return TRAILING; - } - YY_BREAK - case 35: - YY_RULE_SETUP +{ return ')'; } + YY_BREAK +case 26: +YY_RULE_SETUP #line 195 "pplex.l" - { - return JOINING; - } - YY_BREAK - case 36: - YY_RULE_SETUP +{ return BY; } + YY_BREAK +case 27: +YY_RULE_SETUP #line 196 "pplex.l" - { - return AS; - } - YY_BREAK - case 37: - YY_RULE_SETUP +{ return IN; } + YY_BREAK +case 28: +YY_RULE_SETUP #line 197 "pplex.l" - { - return PREFIX; - } - YY_BREAK - case 38: - YY_RULE_SETUP +{ return OF; } + YY_BREAK +case 29: +YY_RULE_SETUP #line 198 "pplex.l" - { - return SUFFIX; - } - YY_BREAK - case 39: - YY_RULE_SETUP +{ return OFF; } + YY_BREAK +case 30: +YY_RULE_SETUP #line 199 "pplex.l" - { - return PREFIXING; - } - YY_BREAK - case 40: - YY_RULE_SETUP +{ return SUPPRESS; } + YY_BREAK +case 31: +YY_RULE_SETUP #line 200 "pplex.l" - { - return SUFFIXING; - } - YY_BREAK - case 41: - YY_RULE_SETUP +{ return PRINTING; } + YY_BREAK +case 32: +YY_RULE_SETUP #line 201 "pplex.l" - { -#ifdef I18N_UTF8 - convert_ucs_hyphen_minus(yytext); -#endif /*I18N_UTF8*/ - pplval.s = strdup(yytext); - return TOKEN; - } - YY_BREAK - case 42: +{ return REPLACING; } + YY_BREAK +case 33: +YY_RULE_SETUP +#line 202 "pplex.l" +{ return LEADING; } + YY_BREAK +case 34: +YY_RULE_SETUP +#line 203 "pplex.l" +{ return TRAILING; } + YY_BREAK +case 35: +YY_RULE_SETUP +#line 204 "pplex.l" +{ return JOINING; } + YY_BREAK +case 36: +YY_RULE_SETUP +#line 205 "pplex.l" +{ return AS; } + YY_BREAK +case 37: +YY_RULE_SETUP +#line 206 "pplex.l" +{ return PREFIX; } + YY_BREAK +case 38: +YY_RULE_SETUP #line 207 "pplex.l" - case 43: -#line 208 "pplex.l" - case 44: - YY_RULE_SETUP +{ return SUFFIX; } + YY_BREAK +case 39: +YY_RULE_SETUP #line 208 "pplex.l" - { - pplval.s = strdup(yytext); - return TOKEN; - } - YY_BREAK - - case 45: - /* rule 45 can match eol */ - YY_RULE_SETUP -#line 212 "pplex.l" - { - ECHO; - cb_source_line++; - } - YY_BREAK - case 46: - YY_RULE_SETUP -#line 213 "pplex.l" - { - pplval.s = strdup(" "); - return TOKEN; - } - YY_BREAK - case 47: - YY_RULE_SETUP -#line 214 "pplex.l" - { - BEGIN COPY_STATE; - return EQEQ; - } - YY_BREAK - case 48: - YY_RULE_SETUP -#line 215 "pplex.l" - { -#ifdef I18N_UTF8 - convert_ucs_hyphen_minus(yytext); +{ return PREFIXING; } + YY_BREAK +case 40: +YY_RULE_SETUP +#line 209 "pplex.l" +{ return SUFFIXING; } + YY_BREAK +case 41: +YY_RULE_SETUP +#line 210 "pplex.l" +{ +#ifdef I18N_UTF8 + convert_ucs_hyphen_minus (yytext); #endif /*I18N_UTF8*/ - pplval.s = strdup(yytext); - return TOKEN; - } - YY_BREAK - case 49: + pplval.s = strdup (yytext); return TOKEN; } + YY_BREAK +case 42: +#line 216 "pplex.l" +case 43: +#line 217 "pplex.l" +case 44: +YY_RULE_SETUP +#line 217 "pplex.l" +{ pplval.s = strdup (yytext); return TOKEN; } + YY_BREAK + + +case 45: +/* rule 45 can match eol */ +YY_RULE_SETUP #line 221 "pplex.l" - case 50: -#line 222 "pplex.l" - case 51: - YY_RULE_SETUP +{ ECHO; cb_source_line++; } + YY_BREAK +case 46: +YY_RULE_SETUP #line 222 "pplex.l" - { - pplval.s = strdup(yytext); - return TOKEN; - } - YY_BREAK - - case 52: - YY_RULE_SETUP -#line 226 "pplex.l" - { - suppress_echo = 0; - BEGIN COPY_STATE; - return COPY; - } - YY_BREAK - case 53: - YY_RULE_SETUP -#line 227 "pplex.l" - { - suppress_echo = 0; - BEGIN COPY_STATE; - return COPY; - } - YY_BREAK - case 54: - YY_RULE_SETUP -#line 228 "pplex.l" - { - suppress_echo = 0; - BEGIN COPY_STATE; - return REPLACE; - } - YY_BREAK - case 55: - /* rule 55 can match eol */ - YY_RULE_SETUP -#line 229 "pplex.l" - { - ECHO; - cb_source_line++; - } - YY_BREAK - case 56: - YY_RULE_SETUP +{ pplval.s = strdup (" "); return TOKEN; } + YY_BREAK +case 47: +YY_RULE_SETUP +#line 223 "pplex.l" +{ BEGIN COPY_STATE; return EQEQ; } + YY_BREAK +case 48: +YY_RULE_SETUP +#line 224 "pplex.l" +{ +#ifdef I18N_UTF8 + convert_ucs_hyphen_minus (yytext); +#endif /*I18N_UTF8*/ + pplval.s = strdup (yytext); return TOKEN; } + YY_BREAK +case 49: #line 230 "pplex.l" - { - ppecho(" "); - } - YY_BREAK - case 57: - YY_RULE_SETUP +case 50: #line 231 "pplex.l" - { - BEGIN INITIAL; - if (!strcasecmp(yytext, "FILLER")) { - ppecho(yytext); - } else { - ppecho_dataname(yytext); - } - suppress_echo = 0; - if (cb_cobol68_copy_in_data_description) { - pplval.s = strdup(yytext); - return TOKEN; - } - } - YY_BREAK - case 58: -#line 245 "pplex.l" - case 59: -#line 246 "pplex.l" - case 60: - YY_RULE_SETUP -#line 246 "pplex.l" - { - suppress_echo = 0; - BEGIN INITIAL; - ppecho(yytext); - } - YY_BREAK - - case 61: - YY_RULE_SETUP -#line 249 "pplex.l" - { - suppress_echo = (omit_data_redef_name) ? 1 : 0; - ppecho(yytext); - BEGIN DATANAME_JOIN_STATE; - if (cb_cobol68_copy_in_data_description) { - return REDEFINES; - } - } - YY_BREAK - case 62: -#line 259 "pplex.l" - case 63: -#line 260 "pplex.l" - case 64: -#line 261 "pplex.l" - case 65: -#line 262 "pplex.l" - case 66: -#line 263 "pplex.l" - case 67: -#line 264 "pplex.l" - case 68: - YY_RULE_SETUP -#line 264 "pplex.l" - { - /* these words are treated as comments */ - if (cb_verify(cb_author_paragraph, yytext)) { - /* skip comments until the end of line */ - int c; - - within_comment = 1; - while ((c = input()) != EOF) { - if (c == '\n') { - break; - } - } - unput(c); - } - } - YY_BREAK - case 69: -#line 281 "pplex.l" - case 70: -#line 282 "pplex.l" - case 71: -#line 283 "pplex.l" - case 72: - YY_RULE_SETUP -#line 283 "pplex.l" - { - /* these words are comments in IBM COBOL */ - if (cb_verify(cb_eject_statement, yytext)) { - /* do nothing for now */ - } else { - /* ECHO; */ /* comment should be suppressed, shouldn't it? */ - } - } - YY_BREAK - case 73: - /* rule 73 can match eol */ - YY_RULE_SETUP +case 51: +YY_RULE_SETUP +#line 231 "pplex.l" +{ pplval.s = strdup (yytext); return TOKEN; } + YY_BREAK + + +case 52: +YY_RULE_SETUP +#line 235 "pplex.l" +{ suppress_echo = 0; BEGIN COPY_STATE; return COPY; } + YY_BREAK +case 53: +YY_RULE_SETUP +#line 236 "pplex.l" +{ suppress_echo = 0; BEGIN COPY_STATE; return COPY; } + YY_BREAK +case 54: +YY_RULE_SETUP +#line 237 "pplex.l" +{ suppress_echo = 0; BEGIN COPY_STATE; return REPLACE; } + YY_BREAK +case 55: +/* rule 55 can match eol */ +YY_RULE_SETUP +#line 238 "pplex.l" +{ ECHO; cb_source_line++; } + YY_BREAK +case 56: +YY_RULE_SETUP +#line 239 "pplex.l" +{ ppecho (" "); } + YY_BREAK +case 57: +YY_RULE_SETUP +#line 240 "pplex.l" +{ + BEGIN INITIAL; + if (!strcasecmp (yytext, "FILLER")) { + ppecho (yytext); + } else { + ppecho_dataname (yytext); + } + suppress_echo = 0; + if (cb_cobol68_copy_in_data_description) { + pplval.s = strdup (yytext); + return TOKEN; + } + } + YY_BREAK +case 58: +#line 254 "pplex.l" +case 59: +#line 255 "pplex.l" +case 60: +YY_RULE_SETUP +#line 255 "pplex.l" +{ suppress_echo = 0; BEGIN INITIAL; ppecho (yytext); } + YY_BREAK + +case 61: +YY_RULE_SETUP +#line 258 "pplex.l" +{ + suppress_echo = (omit_data_redef_name) ? 1 : 0; + ppecho (yytext); + BEGIN DATANAME_JOIN_STATE; + if (cb_cobol68_copy_in_data_description) { + return REDEFINES; + } +} + YY_BREAK +case 62: +#line 268 "pplex.l" +case 63: +#line 269 "pplex.l" +case 64: +#line 270 "pplex.l" +case 65: +#line 271 "pplex.l" +case 66: +#line 272 "pplex.l" +case 67: +#line 273 "pplex.l" +case 68: +YY_RULE_SETUP +#line 273 "pplex.l" +{ + /* these words are treated as comments */ + if (cb_verify (cb_author_paragraph, yytext)) { + /* skip comments until the end of line */ + int c; + + within_comment = 1; + while ((c = input ()) != EOF) { + if (c == '\n') { + break; + } + } + unput (c); + } +} + YY_BREAK +case 69: +#line 290 "pplex.l" +case 70: +#line 291 "pplex.l" +case 71: +#line 292 "pplex.l" +case 72: +YY_RULE_SETUP #line 292 "pplex.l" - { - ppecho("\n"); - cb_source_line++; - } - YY_BREAK - case 74: - YY_RULE_SETUP -#line 294 "pplex.l" - { - ppecho(" "); - } - YY_BREAK - case 75: - YY_RULE_SETUP -#line 296 "pplex.l" - { - if (inside_bracket) { - ppecho(", "); - } else { - ppecho(" "); - } - } - YY_BREAK - case 76: - YY_RULE_SETUP -#line 304 "pplex.l" - { - inside_bracket++; - ppecho("("); - } - YY_BREAK - case 77: - YY_RULE_SETUP -#line 309 "pplex.l" - { - if (inside_bracket) { - inside_bracket--; - } - ppecho(")"); - } - YY_BREAK - case 78: +{ + /* these words are comments in IBM COBOL */ + if (cb_verify (cb_eject_statement, yytext)) { + /* do nothing for now */ + } else { + /* ECHO; */ /* comment should be suppressed, shouldn't it? */ + } +} + YY_BREAK +case 73: +/* rule 73 can match eol */ +YY_RULE_SETUP +#line 301 "pplex.l" +{ ppecho ("\n"); cb_source_line++; } + YY_BREAK +case 74: +YY_RULE_SETUP +#line 303 "pplex.l" +{ ppecho (" "); } + YY_BREAK +case 75: +YY_RULE_SETUP +#line 305 "pplex.l" +{ + if (inside_bracket) { + ppecho (", "); + } else { + ppecho (" "); + } +} + YY_BREAK +case 76: +YY_RULE_SETUP +#line 313 "pplex.l" +{ + inside_bracket++; + ppecho ("("); +} + YY_BREAK +case 77: +YY_RULE_SETUP +#line 318 "pplex.l" +{ + if (inside_bracket) { + inside_bracket--; + } + ppecho (")"); +} + YY_BREAK +case 78: /* rule 78 can match eol */ -#line 317 "pplex.l" - case 79: +#line 326 "pplex.l" +case 79: /* rule 79 can match eol */ -#line 318 "pplex.l" - case 80: +#line 327 "pplex.l" +case 80: /* rule 80 can match eol */ -#line 319 "pplex.l" - case 81: +#line 328 "pplex.l" +case 81: /* rule 81 can match eol */ -#line 320 "pplex.l" - case 82: +#line 329 "pplex.l" +case 82: /* rule 82 can match eol */ -#line 321 "pplex.l" - case 83: +#line 330 "pplex.l" +case 83: /* rule 83 can match eol */ -#line 322 "pplex.l" - case 84: +#line 331 "pplex.l" +case 84: /* rule 84 can match eol */ -#line 323 "pplex.l" - case 85: +#line 332 "pplex.l" +case 85: /* rule 85 can match eol */ -#line 324 "pplex.l" - case 86: +#line 333 "pplex.l" +case 86: /* rule 86 can match eol */ -#line 325 "pplex.l" - case 87: +#line 334 "pplex.l" +case 87: /* rule 87 can match eol */ -#line 326 "pplex.l" - case 88: +#line 335 "pplex.l" +case 88: /* rule 88 can match eol */ -#line 327 "pplex.l" - case 89: +#line 336 "pplex.l" +case 89: /* rule 89 can match eol */ -#line 328 "pplex.l" - case 90: +#line 337 "pplex.l" +case 90: /* rule 90 can match eol */ -#line 329 "pplex.l" - case 91: +#line 338 "pplex.l" +case 91: /* rule 91 can match eol */ -#line 330 "pplex.l" - case 92: - /* rule 92 can match eol */ - YY_RULE_SETUP -#line 330 "pplex.l" - { - /* each numeric is not a level-number */ - char *p, *pcrnt; - cobc_mbspc2ascii(yytext); - pcrnt = yytext; - while (*pcrnt) { - for (p = pcrnt; *p && *p != ' ' && *p != '\n'; p++) - ; - for (; *p == ' ' || *p == '\n'; p++) { - if (*p == '\n') { - cb_source_line++; - } - *p = '\0'; - } - ppecho(pcrnt); - if (*p) { - ppecho(" "); - } - pcrnt = p; - } - } - YY_BREAK - case 93: - YY_RULE_SETUP -#line 352 "pplex.l" - { - char *p = yytext; - cobc_mbspc2ascii(yytext); - while (*p == ' ') { - p++; - } - suppress_echo = (omit_data_entry_name) ? 1 : 0; - ppecho(p); - if (current_division == PP_DATA_DIVISION) { - BEGIN DATANAME_JOIN_STATE; - if (cb_cobol68_copy_in_data_description) { - return LEVEL_NUMBER; - } - } - } - YY_BREAK - case 94: - YY_RULE_SETUP -#line 368 "pplex.l" - { - ppecho(yytext); - return yytext[0]; - } - YY_BREAK - case 95: - YY_RULE_SETUP -#line 373 "pplex.l" - { -#ifdef I18N_UTF8 - convert_ucs_hyphen_minus(yytext); -#endif /*I18N_UTF8*/ - ppecho(yytext); - } - YY_BREAK - case 96: -#line 379 "pplex.l" - case 97: -#line 380 "pplex.l" - case 98: - YY_RULE_SETUP -#line 380 "pplex.l" - { - ppecho(yytext); - } - YY_BREAK - case YY_STATE_EOF(INITIAL): - case YY_STATE_EOF(PROCESS_STATE): - case YY_STATE_EOF(COPY_STATE): - case YY_STATE_EOF(PSEUDO_STATE): - case YY_STATE_EOF(DATANAME_JOIN_STATE): +#line 339 "pplex.l" +case 92: +/* rule 92 can match eol */ +YY_RULE_SETUP +#line 339 "pplex.l" +{ + /* each numeric is not a level-number */ + char *p, *pcrnt; + cobc_mbspc2ascii (yytext); + pcrnt = yytext; + while (*pcrnt) { + for (p = pcrnt; *p && *p != ' ' && *p != '\n' ; p++) + ; + for ( ; *p == ' ' || *p == '\n'; p++) { + if (*p == '\n') { + cb_source_line++; + } + *p = '\0'; + } + ppecho (pcrnt); + if (*p) { + ppecho (" "); + } + pcrnt = p; + } +} + YY_BREAK +case 93: +YY_RULE_SETUP +#line 361 "pplex.l" +{ + char *p = yytext; + cobc_mbspc2ascii (yytext); + while (*p == ' ') { + p++; + } + suppress_echo = (omit_data_entry_name) ? 1 : 0; + ppecho (p); + if (current_division == PP_DATA_DIVISION) { + BEGIN DATANAME_JOIN_STATE; + if (cb_cobol68_copy_in_data_description) { + return LEVEL_NUMBER; + } + } +} + YY_BREAK +case 94: +YY_RULE_SETUP +#line 377 "pplex.l" +{ + ppecho (yytext); + return yytext[0]; +} + YY_BREAK +case 95: +YY_RULE_SETUP #line 382 "pplex.l" - { - struct copy_info *p; - - p = copy_stack; - - yy_delete_buffer(YY_CURRENT_BUFFER); - - /* Terminate at the end of all input */ - if (p->next == NULL) { - within_comment = 0; - newline_count = 0; - inside_bracket = 0; - current_replace_list = NULL; - current_copy_replace_list = NULL; - current_joining_ext = NULL; - text_queue1 = text_queue2 = NULL; - copy_stack = NULL; - quotation_mark = 0; - consecutive_quotation = 0; - last_line_1 = -1; - last_line_2 = -1; - yyterminate(); - } - - /* Close the current file */ - fclose(ppin); - - /* Switch to the last buffer */ - if (p->replacing) { - pp_set_copy_replace_list(NULL); - } - if (p->joining) { - pp_set_joining_ext(NULL); - } - switch_to_buffer(p->line, p->file, p->buffer); - quotation_mark = p->quotation_mark; - - copy_stack = p->next; - free(p); - } - YY_BREAK - case 99: - YY_RULE_SETUP -#line 423 "pplex.l" - YY_FATAL_ERROR("flex scanner jammed"); - YY_BREAK -#line 2722 "pplex.c" - - case YY_END_OF_BUFFER: { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int)(yy_cp - (yytext_ptr)) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = (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 - * 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. - */ - (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 ((yy_c_buf_p) <= - &YY_CURRENT_BUFFER_LVALUE - ->yy_ch_buf[(yy_n_chars)]) { /* This was really a NUL. */ - yy_state_type yy_next_state; - - (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state(); - - /* 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); - - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - - if (yy_next_state) { - /* Consume the NUL. */ - yy_cp = ++(yy_c_buf_p); - yy_current_state = yy_next_state; - goto yy_match; - } - - else { - yy_cp = (yy_last_accepting_cpos); - yy_current_state = (yy_last_accepting_state); - goto yy_find_action; - } - } - - else - switch (yy_get_next_buffer()) { - case EOB_ACT_END_OF_FILE: { - (yy_did_buffer_switch_on_eof) = 0; - - if (yywrap()) { - /* 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. - */ - (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else { - if (!(yy_did_buffer_switch_on_eof)) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state(); - - yy_cp = (yy_c_buf_p); - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - (yy_c_buf_p) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; - - yy_current_state = yy_get_previous_state(); - - yy_cp = (yy_c_buf_p); - yy_bp = (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 */ +{ +#ifdef I18N_UTF8 + convert_ucs_hyphen_minus (yytext); +#endif /*I18N_UTF8*/ + ppecho (yytext); } + YY_BREAK +case 96: +#line 388 "pplex.l" +case 97: +#line 389 "pplex.l" +case 98: +YY_RULE_SETUP +#line 389 "pplex.l" +{ ppecho (yytext); } + YY_BREAK +case YY_STATE_EOF(INITIAL): +case YY_STATE_EOF(PROCESS_STATE): +case YY_STATE_EOF(COPY_STATE): +case YY_STATE_EOF(PSEUDO_STATE): +case YY_STATE_EOF(DATANAME_JOIN_STATE): +#line 391 "pplex.l" +{ + struct copy_info *p; + + p = copy_stack; + + yy_delete_buffer (YY_CURRENT_BUFFER); + + /* Terminate at the end of all input */ + if (p->next == NULL) { + within_comment = 0; + newline_count = 0; + inside_bracket = 0; + current_replace_list = NULL; + current_copy_replace_list = NULL; + current_joining_ext = NULL; + text_queue1 = text_queue2 = NULL; + copy_stack = NULL; + quotation_mark = 0; + consecutive_quotation = 0; + last_line_1 = -1; + last_line_2 = -1; + yyterminate (); + } + + /* Close the current file */ + fclose (ppin); + + /* Switch to the last buffer */ + if (p->replacing) { + pp_set_copy_replace_list (NULL); + } + if (p->joining) { + pp_set_joining_ext (NULL); + } + switch_to_buffer (p->line, p->file, p->buffer); + quotation_mark = p->quotation_mark; + + copy_stack = p->next; + free (p); +} + YY_BREAK +case 99: +YY_RULE_SETUP +#line 432 "pplex.l" +YY_FATAL_ERROR( "flex scanner jammed" ); + YY_BREAK +#line 3037 "pplex.c" + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = (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 + * 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. + */ + (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 ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + /* 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 ); + + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++(yy_c_buf_p); + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_END_OF_FILE: + { + (yy_did_buffer_switch_on_eof) = 0; + + if ( yywrap( ) ) + { + /* 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. + */ + (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = + (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + (yy_c_buf_p) = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (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 yylex */ /* yy_get_next_buffer - try to read in a new buffer @@ -2643,149 +3174,170 @@ YY_DECL { * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ -static int yy_get_next_buffer(void) { - char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - char *source = (yytext_ptr); - int number_to_move, i; - int ret_val; - - if ((yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(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 ((yy_c_buf_p) - (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 = (int)((yy_c_buf_p) - (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 = (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)((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. */ - yyrealloc((void *)b->yy_ch_buf, (yy_size_t)(b->yy_buf_size + 2)); - } 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"); - - (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]), - (yy_n_chars), num_to_read); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - if ((yy_n_chars) == 0) { - if (number_to_move == YY_MORE_ADJ) { - ret_val = EOB_ACT_END_OF_FILE; - yyrestart(yyin); - } - - 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 (((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 = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *)yyrealloc( - (void *)YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t)new_size); - if (!YY_CURRENT_BUFFER_LVALUE->yy_ch_buf) - YY_FATAL_ERROR("out of dynamic memory in yy_get_next_buffer()"); - /* "- 2" to take care of EOB's */ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int)(new_size - 2); - } - - (yy_n_chars) += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; - - (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; +static int yy_get_next_buffer (void) +{ + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = (yytext_ptr); + int number_to_move, i; + int ret_val; + + if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(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 ( (yy_c_buf_p) - (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 = (int) ((yy_c_buf_p) - (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 = (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) ((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. */ + yyrealloc( (void *) b->yy_ch_buf, + (yy_size_t) (b->yy_buf_size + 2) ); + } + 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" ); + + (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]), + (yy_n_chars), num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + if ( (yy_n_chars) == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart( yyin ); + } + + 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 (((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 = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( + (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + /* "- 2" to take care of EOB's */ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); + } + + (yy_n_chars) += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; + + (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(void) { - yy_state_type yy_current_state; - char *yy_cp; - - yy_current_state = (yy_start); - yy_current_state += YY_AT_BOL(); - - for (yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (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]) { - (yy_last_accepting_state) = yy_current_state; - (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 >= 609) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - } - - return yy_current_state; + static yy_state_type yy_get_previous_state (void) +{ + yy_state_type yy_current_state; + char *yy_cp; + + yy_current_state = (yy_start); + yy_current_state += YY_AT_BOL(); + + for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (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] ) + { + (yy_last_accepting_state) = yy_current_state; + (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 >= 791 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + } + + return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character @@ -2793,589 +3345,650 @@ static yy_state_type yy_get_previous_state(void) { * synopsis * next_state = yy_try_NUL_trans( current_state ); */ -static yy_state_type yy_try_NUL_trans(yy_state_type yy_current_state) { - int yy_is_jam; - char *yy_cp = (yy_c_buf_p); - - YY_CHAR yy_c = 1; - if (yy_accept[yy_current_state]) { - (yy_last_accepting_state) = yy_current_state; - (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 >= 609) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 608); - - return yy_is_jam ? 0 : yy_current_state; + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) +{ + int yy_is_jam; + char *yy_cp = (yy_c_buf_p); + + YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (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 >= 791 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + yy_is_jam = (yy_current_state == 790); + + return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_UNPUT -static void yyunput(int c, char *yy_bp) { - char *yy_cp; - - yy_cp = (yy_c_buf_p); - - /* undo effects of setting up yytext */ - *yy_cp = (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 = (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 = (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; - - (yytext_ptr) = yy_bp; - (yy_hold_char) = *yy_cp; - (yy_c_buf_p) = yy_cp; + static void yyunput (int c, char * yy_bp ) +{ + char *yy_cp; + + yy_cp = (yy_c_buf_p); + + /* undo effects of setting up yytext */ + *yy_cp = (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 = (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 = + (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; + + (yytext_ptr) = yy_bp; + (yy_hold_char) = *yy_cp; + (yy_c_buf_p) = yy_cp; } #endif #ifndef YY_NO_INPUT #ifdef __cplusplus -static int yyinput(void) + static int yyinput (void) #else -static int input(void) + static int input (void) #endif { - int c; - - *(yy_c_buf_p) = (yy_hold_char); - - if (*(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 ((yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]) - /* This was really a NUL. */ - *(yy_c_buf_p) = '\0'; - - else { /* need more input */ - int offset = (int)((yy_c_buf_p) - (yytext_ptr)); - ++(yy_c_buf_p); - - switch (yy_get_next_buffer()) { - 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. */ - yyrestart(yyin); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: { - if (yywrap()) - return 0; - - if (!(yy_did_buffer_switch_on_eof)) - YY_NEW_FILE; + int c; + + *(yy_c_buf_p) = (yy_hold_char); + + if ( *(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 ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + /* This was really a NUL. */ + *(yy_c_buf_p) = '\0'; + + else + { /* need more input */ + int offset = (int) ((yy_c_buf_p) - (yytext_ptr)); + ++(yy_c_buf_p); + + switch ( yy_get_next_buffer( ) ) + { + 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. */ + yyrestart( yyin ); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( yywrap( ) ) + return 0; + + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; #ifdef __cplusplus - return yyinput(); + return yyinput(); #else - return input(); + return input(); #endif - } + } - case EOB_ACT_CONTINUE_SCAN: - (yy_c_buf_p) = (yytext_ptr) + offset; - break; - } - } - } + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = (yytext_ptr) + offset; + break; + } + } + } - c = *(unsigned char *)(yy_c_buf_p); /* cast for 8-bit char's */ - *(yy_c_buf_p) = '\0'; /* preserve yytext */ - (yy_hold_char) = *++(yy_c_buf_p); + c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ + *(yy_c_buf_p) = '\0'; /* preserve yytext */ + (yy_hold_char) = *++(yy_c_buf_p); - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); - return c; + return c; } -#endif /* ifndef YY_NO_INPUT */ +#endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. - * + * * @note This function does not reset the start condition to @c INITIAL . */ -void yyrestart(FILE *input_file) { - - if (!YY_CURRENT_BUFFER) { - yyensure_buffer_stack(); - YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE); - } - - yy_init_buffer(YY_CURRENT_BUFFER, input_file); - yy_load_buffer_state(); + void yyrestart (FILE * input_file ) +{ + + if ( ! YY_CURRENT_BUFFER ){ + yyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer( yyin, YY_BUF_SIZE ); + } + + yy_init_buffer( YY_CURRENT_BUFFER, input_file ); + yy_load_buffer_state( ); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. - * + * */ -void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer) { - - /* TODO. We should be able to replace this entire function body - * with - * yypop_buffer_state(); - * yypush_buffer_state(new_buffer); - */ - yyensure_buffer_stack(); - if (YY_CURRENT_BUFFER == new_buffer) - return; - - if (YY_CURRENT_BUFFER) { - /* Flush out information for old buffer. */ - *(yy_c_buf_p) = (yy_hold_char); - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - yy_load_buffer_state(); - - /* We don't actually know whether we did this switch during - * EOF (yywrap()) processing, but the only time this flag - * is looked at is after yywrap() is called, so it's safe - * to go ahead and always set it. - */ - (yy_did_buffer_switch_on_eof) = 1; + void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) +{ + + /* TODO. We should be able to replace this entire function body + * with + * yypop_buffer_state(); + * yypush_buffer_state(new_buffer); + */ + yyensure_buffer_stack (); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + yy_load_buffer_state( ); + + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + (yy_did_buffer_switch_on_eof) = 1; } -static void yy_load_buffer_state(void) { - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - (yy_hold_char) = *(yy_c_buf_p); +static void yy_load_buffer_state (void) +{ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + (yy_hold_char) = *(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 size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. + * * @return the allocated buffer state. */ -YY_BUFFER_STATE yy_create_buffer(FILE *file, int size) { - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE)yyalloc(sizeof(struct yy_buffer_state)); - if (!b) - YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()"); + YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) +{ + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - b->yy_buf_size = size; + b->yy_buf_size = 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 *)yyalloc((yy_size_t)(b->yy_buf_size + 2)); - if (!b->yy_ch_buf) - YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()"); + /* 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 *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - b->yy_is_our_buffer = 1; + b->yy_is_our_buffer = 1; - yy_init_buffer(b, file); + yy_init_buffer( b, file ); - return b; + return b; } /** Destroy the buffer. * @param b a buffer created with yy_create_buffer() - * + * */ -void yy_delete_buffer(YY_BUFFER_STATE b) { - - if (!b) - return; + void yy_delete_buffer (YY_BUFFER_STATE b ) +{ + + 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_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; - if (b->yy_is_our_buffer) - yyfree((void *)b->yy_ch_buf); + if ( b->yy_is_our_buffer ) + yyfree( (void *) b->yy_ch_buf ); - yyfree((void *)b); + yyfree( (void *) b ); } /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a yyrestart() or at EOF. */ -static void yy_init_buffer(YY_BUFFER_STATE b, FILE *file) + static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) { - int oerrno = errno; + int oerrno = errno; + + yy_flush_buffer( b ); - yy_flush_buffer(b); + b->yy_input_file = file; + b->yy_fill_buffer = 1; - b->yy_input_file = file; - b->yy_fill_buffer = 1; - - /* If b is the current buffer, then yy_init_buffer was _probably_ - * called from 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 = 0; + /* If b is the current buffer, then yy_init_buffer was _probably_ + * called from 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; + } - errno = oerrno; + b->yy_is_interactive = 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. - * + * */ -void yy_flush_buffer(YY_BUFFER_STATE b) { - if (!b) - return; + void yy_flush_buffer (YY_BUFFER_STATE b ) +{ + if ( ! b ) + return; - b->yy_n_chars = 0; + 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; + /* 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_buf_pos = &b->yy_ch_buf[0]; - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; - if (b == YY_CURRENT_BUFFER) - yy_load_buffer_state(); + if ( b == YY_CURRENT_BUFFER ) + yy_load_buffer_state( ); } /** 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. - * + * */ -void yypush_buffer_state(YY_BUFFER_STATE new_buffer) { - if (new_buffer == NULL) - return; - - yyensure_buffer_stack(); - - /* This block is copied from yy_switch_to_buffer. */ - if (YY_CURRENT_BUFFER) { - /* Flush out information for old buffer. */ - *(yy_c_buf_p) = (yy_hold_char); - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - (yy_buffer_stack_top)++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from yy_switch_to_buffer. */ - yy_load_buffer_state(); - (yy_did_buffer_switch_on_eof) = 1; +void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) +{ + if (new_buffer == NULL) + return; + + yyensure_buffer_stack(); + + /* This block is copied from yy_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + (yy_buffer_stack_top)++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from yy_switch_to_buffer. */ + yy_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. - * + * */ -void yypop_buffer_state(void) { - if (!YY_CURRENT_BUFFER) - return; - - yy_delete_buffer(YY_CURRENT_BUFFER); - YY_CURRENT_BUFFER_LVALUE = NULL; - if ((yy_buffer_stack_top) > 0) - --(yy_buffer_stack_top); - - if (YY_CURRENT_BUFFER) { - yy_load_buffer_state(); - (yy_did_buffer_switch_on_eof) = 1; - } +void yypop_buffer_state (void) +{ + if (!YY_CURRENT_BUFFER) + return; + + yy_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + if ((yy_buffer_stack_top) > 0) + --(yy_buffer_stack_top); + + if (YY_CURRENT_BUFFER) { + yy_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; + } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ -static void yyensure_buffer_stack(void) { - yy_size_t num_to_alloc; - - if (!(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... */ - (yy_buffer_stack) = (struct yy_buffer_state **)yyalloc( - num_to_alloc * sizeof(struct yy_buffer_state *)); - if (!(yy_buffer_stack)) - YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()"); - - memset((yy_buffer_stack), 0, - num_to_alloc * sizeof(struct yy_buffer_state *)); - - (yy_buffer_stack_max) = num_to_alloc; - (yy_buffer_stack_top) = 0; - return; - } - - if ((yy_buffer_stack_top) >= ((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 = (yy_buffer_stack_max) + grow_size; - (yy_buffer_stack) = (struct yy_buffer_state **)yyrealloc( - (yy_buffer_stack), num_to_alloc * sizeof(struct yy_buffer_state *)); - if (!(yy_buffer_stack)) - YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()"); +static void yyensure_buffer_stack (void) +{ + yy_size_t num_to_alloc; + + if (!(yy_buffer_stack)) { - /* zero only the new slots.*/ - memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, - grow_size * sizeof(struct yy_buffer_state *)); - (yy_buffer_stack_max) = num_to_alloc; - } + /* 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... */ + (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + (yy_buffer_stack_max) = num_to_alloc; + (yy_buffer_stack_top) = 0; + return; + } + + if ((yy_buffer_stack_top) >= ((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 = (yy_buffer_stack_max) + grow_size; + (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc + ((yy_buffer_stack), + num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + /* zero only the new slots.*/ + memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); + (yy_buffer_stack_max) = num_to_alloc; + } } -/** Setup the input buffer state to scan directly from a user-specified - * character buffer. +/** 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 - * + * * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size) { - 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)yyalloc(sizeof(struct yy_buffer_state)); - if (!b) - YY_FATAL_ERROR("out of dynamic memory in yy_scan_buffer()"); - - b->yy_buf_size = (int)(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; - - yy_switch_to_buffer(b); - - return b; +YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) +{ + 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) yyalloc( sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); + + b->yy_buf_size = (int) (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; + + yy_switch_to_buffer( b ); + + return b; } /** Setup the input buffer state to scan a string. The next call to yylex() will * scan from a @e copy of @a str. * @param yystr a NUL-terminated string to scan - * + * * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use * yy_scan_bytes() instead. */ -YY_BUFFER_STATE yy_scan_string(const char *yystr) { - - return yy_scan_bytes(yystr, (int)strlen(yystr)); +YY_BUFFER_STATE yy_scan_string (const char * yystr ) +{ + + return yy_scan_bytes( yystr, (int) strlen(yystr) ); } -/** Setup the input buffer state to scan the given bytes. The next call to - * yylex() will scan from a @e copy of @a bytes. +/** Setup the input buffer state to scan the given bytes. The next call to 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. - * + * * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_bytes(const char *yybytes, int _yybytes_len) { - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - int i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = (yy_size_t)(_yybytes_len + 2); - buf = (char *)yyalloc(n); - if (!buf) - YY_FATAL_ERROR("out of dynamic memory in yy_scan_bytes()"); - - for (i = 0; i < _yybytes_len; ++i) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len + 1] = YY_END_OF_BUFFER_CHAR; - - b = yy_scan_buffer(buf, n); - if (!b) - YY_FATAL_ERROR("bad buffer in 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; +YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len ) +{ + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + int i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = (yy_size_t) (_yybytes_len + 2); + buf = (char *) yyalloc( n ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); + + for ( i = 0; i < _yybytes_len; ++i ) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; + + b = yy_scan_buffer( buf, n ); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in 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(const char *msg) { - fprintf(stderr, "%s\n", msg); - exit(YY_EXIT_FAILURE); +static void yynoreturn yy_fatal_error (const char* msg ) +{ + 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] = (yy_hold_char); \ - (yy_c_buf_p) = yytext + yyless_macro_arg; \ - (yy_hold_char) = *(yy_c_buf_p); \ - *(yy_c_buf_p) = '\0'; \ - yyleng = yyless_macro_arg; \ - } while (0) +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + yytext[yyleng] = (yy_hold_char); \ + (yy_c_buf_p) = yytext + yyless_macro_arg; \ + (yy_hold_char) = *(yy_c_buf_p); \ + *(yy_c_buf_p) = '\0'; \ + yyleng = yyless_macro_arg; \ + } \ + while ( 0 ) /* Accessor methods (get/set functions) to struct members. */ /** Get the current line number. - * + * */ -int yyget_lineno(void) { return yylineno; } +int yyget_lineno (void) +{ + + return yylineno; +} /** Get the input stream. - * + * */ -FILE *yyget_in(void) { return yyin; } +FILE *yyget_in (void) +{ + return yyin; +} /** Get the output stream. - * + * */ -FILE *yyget_out(void) { return yyout; } +FILE *yyget_out (void) +{ + return yyout; +} /** Get the length of the current token. - * + * */ -int yyget_leng(void) { return yyleng; } +int yyget_leng (void) +{ + return yyleng; +} /** Get the current token. - * + * */ -char *yyget_text(void) { return yytext; } +char *yyget_text (void) +{ + return yytext; +} /** Set the current line number. * @param _line_number line number - * + * */ -void yyset_lineno(int _line_number) { yylineno = _line_number; } +void yyset_lineno (int _line_number ) +{ + + yylineno = _line_number; +} /** Set the input stream. This does not discard the current * input buffer. * @param _in_str A readable stream. - * + * * @see yy_switch_to_buffer */ -void yyset_in(FILE *_in_str) { yyin = _in_str; } +void yyset_in (FILE * _in_str ) +{ + yyin = _in_str ; +} -void yyset_out(FILE *_out_str) { yyout = _out_str; } +void yyset_out (FILE * _out_str ) +{ + yyout = _out_str ; +} -int yyget_debug(void) { return yy_flex_debug; } +int yyget_debug (void) +{ + return yy_flex_debug; +} -void yyset_debug(int _bdebug) { yy_flex_debug = _bdebug; } +void yyset_debug (int _bdebug ) +{ + yy_flex_debug = _bdebug ; +} -static int yy_init_globals(void) { - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from yylex_destroy(), so don't allocate here. - */ +static int yy_init_globals (void) +{ + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from yylex_destroy(), so don't allocate here. + */ - (yy_buffer_stack) = NULL; - (yy_buffer_stack_top) = 0; - (yy_buffer_stack_max) = 0; - (yy_c_buf_p) = NULL; - (yy_init) = 0; - (yy_start) = 0; + (yy_buffer_stack) = NULL; + (yy_buffer_stack_top) = 0; + (yy_buffer_stack_max) = 0; + (yy_c_buf_p) = NULL; + (yy_init) = 0; + (yy_start) = 0; /* Defined in main.c */ #ifdef YY_STDINIT - yyin = stdin; - yyout = stdout; + yyin = stdin; + yyout = stdout; #else - yyin = NULL; - yyout = NULL; + yyin = NULL; + yyout = NULL; #endif - /* For future reference: Set errno on error, since we are called by - * yylex_init() - */ - return 0; + /* For future reference: Set errno on error, since we are called by + * yylex_init() + */ + return 0; } /* yylex_destroy is for both reentrant and non-reentrant scanners. */ -int yylex_destroy(void) { - - /* Pop the buffer stack, destroying each element. */ - while (YY_CURRENT_BUFFER) { - yy_delete_buffer(YY_CURRENT_BUFFER); - YY_CURRENT_BUFFER_LVALUE = NULL; - yypop_buffer_state(); - } - - /* Destroy the stack itself. */ - yyfree((yy_buffer_stack)); - (yy_buffer_stack) = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner so the next - * time yylex() is called, initialization will occur. */ - yy_init_globals(); - - return 0; +int yylex_destroy (void) +{ + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + yy_delete_buffer( YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + yypop_buffer_state(); + } + + /* Destroy the stack itself. */ + yyfree((yy_buffer_stack) ); + (yy_buffer_stack) = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * yylex() is called, initialization will occur. */ + yy_init_globals( ); + + return 0; } /* @@ -3383,1033 +3996,1072 @@ int yylex_destroy(void) { */ #ifndef yytext_ptr -static void yy_flex_strncpy(char *s1, const char *s2, int n) { - - int i; - for (i = 0; i < n; ++i) - s1[i] = s2[i]; +static void yy_flex_strncpy (char* s1, const char * s2, int n ) +{ + + int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen(const char *s) { - int n; - for (n = 0; s[n]; ++n) - ; +static int yy_flex_strlen (const char * s ) +{ + int n; + for ( n = 0; s[n]; ++n ) + ; - return n; + return n; } #endif -void *yyalloc(yy_size_t size) { return malloc(size); } - -void *yyrealloc(void *ptr, yy_size_t size) { +void *yyalloc (yy_size_t size ) +{ + return malloc(size); +} - /* 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 *yyrealloc (void * ptr, yy_size_t size ) +{ + + /* 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 yyfree(void *ptr) { - free((char *)ptr); /* see yyrealloc() for (char *) cast */ +void yyfree (void * ptr ) +{ + free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" -#line 423 "pplex.l" +#line 432 "pplex.l" -void pp_set_replace_list(struct cb_replace_list *list) { - current_replace_list = list; + +void +pp_set_replace_list (struct cb_replace_list *list) +{ + current_replace_list = list; } -void pp_set_copy_replace_list(struct cb_replace_list *list) { - current_copy_replace_list = list; +void +pp_set_copy_replace_list (struct cb_replace_list *list) +{ + current_copy_replace_list = list; } -void pp_set_joining_ext(struct cb_joining_ext *ext) { - current_joining_ext = ext; +void +pp_set_joining_ext (struct cb_joining_ext *ext) +{ + current_joining_ext = ext; } -#ifdef I18N_UTF8 -#define UTF8_FULLWIDTH_HYPHEN_MINUS "\xEF\xBC\x8D" -#define UTF8_MINUS_SIGN "\xE2\x88\x92" +#ifdef I18N_UTF8 +# define UTF8_FULLWIDTH_HYPHEN_MINUS "\xEF\xBC\x8D" +# define UTF8_MINUS_SIGN "\xE2\x88\x92" #else /*!I18N_UTF8*/ -#define SJIS_MINUS_SIGN "\x81\x7c" +# define SJIS_MINUS_SIGN "\x81\x7c" #endif /*I18N_UTF8*/ -#ifdef I18N_UTF8 -static void convert_ucs_hyphen_minus(char *namebuf) { - char *p = namebuf; - while (NULL != (p = strstr(p, UTF8_MINUS_SIGN))) { - memcpy(p, UTF8_FULLWIDTH_HYPHEN_MINUS, 3); - p += 3; - } - return; +#ifdef I18N_UTF8 +static void +convert_ucs_hyphen_minus (char *namebuf) +{ + char *p = namebuf; + while (NULL != (p = strstr (p, UTF8_MINUS_SIGN))) { + *p = '_'; + memmove(p+1, p+3, strlen(p+3)+1); + p++; + } + + p = namebuf; + while (NULL != (p = strstr (p, UTF8_FULLWIDTH_HYPHEN_MINUS))) { + *p = '_'; + memmove(p+1, p+3, strlen(p+3)+1); + p++; + } + return; } #endif /*I18N_UTF8*/ -static void ppecho_dataname(char *namebuf) { - int extlen, namelen, seplen; - const char *ext; - const char *sep; +static void +ppecho_dataname (char *namebuf) +{ + int extlen, namelen, seplen; + const char *ext; + const char *sep; -#ifdef I18N_UTF8 - convert_ucs_hyphen_minus(namebuf); +#ifdef I18N_UTF8 + convert_ucs_hyphen_minus (namebuf); #endif /*I18N_UTF8*/ - if (!current_joining_ext) { - ppecho(namebuf); - } else { - ext = current_joining_ext->ext; - if (!plexbuff1) { - plexbuff1 = cobc_malloc(COB_SMALL_BUFF); - } - extlen = strlen(ext); - namelen = strlen(namebuf); -#ifdef I18N_UTF8 - if (!utf8_ext_pick((unsigned char *)ext)) { - sep = "-"; - seplen = 1; - } else { - sep = UTF8_FULLWIDTH_HYPHEN_MINUS; - seplen = 3; - } -#else /*!I18N_UTF8*/ - if (!sjis_pick((unsigned char *)ext)) { - sep = "-"; - seplen = 1; - } else { - sep = SJIS_MINUS_SIGN; - seplen = 2; - } + if (!current_joining_ext) { + ppecho (namebuf); + } else { + ext = current_joining_ext->ext; + if (!plexbuff1) { + plexbuff1 = cobc_malloc (COB_SMALL_BUFF); + } + extlen = strlen (ext); + namelen = strlen (namebuf); +#ifdef I18N_UTF8 + if (!utf8_ext_pick ((unsigned char*) ext)) { + sep = "-"; + seplen = 1; + } else { + sep = UTF8_FULLWIDTH_HYPHEN_MINUS; + seplen = 3; + } +#else /*!I18N_UTF8*/ + if (!sjis_pick ((unsigned char*) ext)) { + sep = "-"; + seplen = 1; + } else { + sep = SJIS_MINUS_SIGN; + seplen = 2; + } #endif /*I18N_UTF8*/ - if (current_joining_ext->type == joining_as_prefix) { - memcpy(plexbuff1, ext, extlen); - memcpy(&(plexbuff1[extlen]), sep, seplen); - memcpy(&(plexbuff1[extlen + seplen]), &(namebuf[0]), namelen + 1); - } else if (current_joining_ext->type == joining_as_suffix) { - memcpy(plexbuff1, &(namebuf[0]), namelen); - memcpy(&(plexbuff1[namelen]), sep, seplen); - memcpy(&(plexbuff1[namelen + seplen]), ext, extlen + 1); - } else if (current_joining_ext->type == prefixing) { - memcpy(plexbuff1, ext, extlen); - memcpy(&(plexbuff1[extlen]), &(namebuf[0]), namelen + 1); - } else if (current_joining_ext->type == suffixing) { - memcpy(plexbuff1, &(namebuf[0]), namelen); - memcpy(&(plexbuff1[namelen]), ext, extlen + 1); - } - ppecho(plexbuff1); - } + if (current_joining_ext->type == joining_as_prefix) { + memcpy (plexbuff1, ext, extlen); + memcpy (&(plexbuff1[extlen]), sep, seplen); + memcpy (&(plexbuff1[extlen+seplen]), &(namebuf[0]), namelen+1); + } else if (current_joining_ext->type == joining_as_suffix) { + memcpy (plexbuff1, &(namebuf[0]), namelen); + memcpy (&(plexbuff1[namelen]), sep, seplen); + memcpy (&(plexbuff1[namelen+seplen]), ext, extlen+1); + } else if (current_joining_ext->type == prefixing) { + memcpy (plexbuff1, ext, extlen); + memcpy (&(plexbuff1[extlen]), &(namebuf[0]), namelen+1); + } else if (current_joining_ext->type == suffixing) { + memcpy (plexbuff1, &(namebuf[0]), namelen); + memcpy (&(plexbuff1[namelen]), ext, extlen+1); + } + ppecho (plexbuff1); + } } -static void switch_to_buffer(const int line, const char *file, - YY_BUFFER_STATE buffer) { - char *p; - - cb_source_line = line; - cb_source_file = strdup(file); - for (p = cb_source_file; *p; p++) { - if (*p == '\\') { - *p = '/'; - } - } - yy_switch_to_buffer(buffer); - fprintf(yyout, "# %d \"%s\"\n", line, cb_source_file); +static void +switch_to_buffer (const int line, const char *file, YY_BUFFER_STATE buffer) +{ + char *p; + + cb_source_line = line; + cb_source_file = strdup (file); + for (p = cb_source_file; *p; p++) { + if (*p == '\\') { + *p = '/'; + } + } + yy_switch_to_buffer (buffer); + fprintf (yyout, "# %d \"%s\"\n", line, cb_source_file); } -int ppopen(const char *name, struct cb_joining_ext *joining_ext, - struct cb_replace_list *replace_list) { - struct copy_info *p; - - for (; newline_count > 0; newline_count--) { - ungetc('\n', ppin); - } - - /* Open the copy file */ - ppin = fopen(name, "rb"); - if (!ppin) { - if (cb_source_file) { - cb_error(_("%s: %s"), name, strerror(errno)); - } else { - perror(name); - } - return -1; - } - - /* Add to dependency list */ - if (cb_depend_file) { - cb_depend_list = cb_text_list_add(cb_depend_list, name); - } - - /* Preserve the current buffer */ - p = cobc_malloc(sizeof(struct copy_info)); - p->line = cb_source_line; - p->file = cb_source_file; - p->replacing = replace_list ? 1 : 0; - p->joining = joining_ext ? 1 : 0; - p->buffer = YY_CURRENT_BUFFER; - p->quotation_mark = quotation_mark; - p->next = copy_stack; - copy_stack = p; - - /* Switch to new buffer */ - if (replace_list) { - pp_set_copy_replace_list(replace_list); - } - if (joining_ext) { - pp_set_joining_ext(joining_ext); - } - switch_to_buffer(1, name, yy_create_buffer(ppin, YY_BUF_SIZE)); - return 0; +int +ppopen (const char *name, struct cb_joining_ext *joining_ext, struct cb_replace_list *replace_list) +{ + struct copy_info *p; + + for (; newline_count > 0; newline_count--) { + ungetc ('\n', ppin); + } + + /* Open the copy file */ + ppin = fopen (name, "rb"); + if (!ppin) { + if (cb_source_file) { + cb_error (_("%s: %s"), name, strerror (errno)); + } else { + perror (name); + } + return -1; + } + + /* Add to dependency list */ + if (cb_depend_file) { + cb_depend_list = cb_text_list_add (cb_depend_list, name); + } + + /* Preserve the current buffer */ + p = cobc_malloc (sizeof (struct copy_info)); + p->line = cb_source_line; + p->file = cb_source_file; + p->replacing = replace_list ? 1 : 0; + p->joining = joining_ext ? 1 : 0; + p->buffer = YY_CURRENT_BUFFER; + p->quotation_mark = quotation_mark; + p->next = copy_stack; + copy_stack = p; + + /* Switch to new buffer */ + if (replace_list) { + pp_set_copy_replace_list (replace_list); + } + if (joining_ext) { + pp_set_joining_ext (joining_ext); + } + switch_to_buffer (1, name, yy_create_buffer (ppin, YY_BUF_SIZE)); + return 0; } -int ppcopy(const char *name, const char *lib, - struct cb_joining_ext *joining_ext, - struct cb_replace_list *replace_list) { - struct cb_text_list *il; - struct cb_text_list *el; - char *s; - struct stat st; - - if (lib) { - if (!plexbuff1) { - plexbuff1 = cobc_malloc(COB_SMALL_BUFF); - } - snprintf(plexbuff1, COB_SMALL_MAX, "%s/%s", lib, name); - s = plexbuff1; - } else { - s = (char *)name; - } - - /* Find the file */ - if (stat(s, &st) == 0) { - return ppopen(s, joining_ext, replace_list); - } - if (!plexbuff2) { - plexbuff2 = cobc_malloc(COB_SMALL_BUFF); - } - for (el = cb_extension_list; el; el = el->next) { - snprintf(plexbuff2, COB_SMALL_MAX, "%s%s", s, el->text); - if (stat(plexbuff2, &st) == 0) { - return ppopen(plexbuff2, joining_ext, replace_list); - } - } - if (*s != '/') { - for (il = cb_include_list; il; il = il->next) { - for (el = cb_extension_list; el; el = el->next) { - snprintf(plexbuff2, COB_SMALL_MAX, "%s/%s%s", il->text, name, el->text); - if (stat(plexbuff2, &st) == 0) { - return ppopen(plexbuff2, joining_ext, replace_list); - } - } - } - } - cb_error(_("%s: %s"), name, strerror(errno)); - return -1; +int +ppcopy (const char *name, const char *lib, struct cb_joining_ext *joining_ext, struct cb_replace_list *replace_list) +{ + struct cb_text_list *il; + struct cb_text_list *el; + char *s; + struct stat st; + + if (lib) { + if (!plexbuff1) { + plexbuff1 = cobc_malloc (COB_SMALL_BUFF); + } + snprintf (plexbuff1, COB_SMALL_MAX, "%s/%s", lib, name); + s = plexbuff1; + } else { + s = (char *)name; + } + + /* Find the file */ + if (stat (s, &st) == 0) { + return ppopen (s, joining_ext, replace_list); + } + if (!plexbuff2) { + plexbuff2 = cobc_malloc (COB_SMALL_BUFF); + } + for (el = cb_extension_list; el; el = el->next) { + snprintf (plexbuff2, COB_SMALL_MAX, "%s%s", s, el->text); + if (stat (plexbuff2, &st) == 0) { + return ppopen (plexbuff2, joining_ext, replace_list); + } + } + if (*s != '/') { + for (il = cb_include_list; il; il = il->next) { + for (el = cb_extension_list; el; el = el->next) { + snprintf (plexbuff2, COB_SMALL_MAX, "%s/%s%s", + il->text, name, el->text); + if (stat (plexbuff2, &st) == 0) { + return ppopen (plexbuff2, joining_ext, replace_list); + } + } + } + } + cb_error (_("%s: %s"), name, strerror (errno)); + return -1; } /* Check directives */ /* This is horrible but we have to parse directives directly after the read */ /* as flex buffers up input and it is then too late to use the flex parser */ -static void check_directive(char *buff, int *line_size) { - char *s; - char *dirptr; - size_t cnt; - int n; - char sbuff[5][256]; - - if (cb_source_format == CB_FORMAT_FIXED) { - if (*line_size < 8) { - return; - } - if (buff[6] != ' ') { - return; - } - s = &buff[7]; - } else { - s = buff; - } - for (; *s == ' '; s++) { - ; - } - dirptr = s; - if (*s != '>') { - return; - } - s++; - if (*s != '>') { - return; - } - s++; - if (*s == 'D') { - if (cb_flag_debugging_line) { - memset(dirptr, ' ', 3); - } else { - for (cnt = 0; cnt < newline_count; cnt++) { - buff[cnt] = '\n'; - } - buff[cnt] = 0; - strcat(buff, " *> DEBUG\n"); - *line_size = strlen(buff); - newline_count = 0; - } - return; - } - memset(sbuff[0], 0, sizeof(sbuff)); - n = sscanf(s, "%255s %255s %255s %255s %255s", sbuff[0], sbuff[1], sbuff[2], - sbuff[3], sbuff[4]); - for (cnt = 0; cnt < newline_count; cnt++) { - buff[cnt] = '\n'; - } - buff[cnt] = 0; - newline_count = 0; - strcat(buff, " *> DIRECTIVE\n"); - *line_size = strlen(buff); - if (n < 2 || strcasecmp(sbuff[0], "SOURCE")) { - cb_warning(_("Invalid directive - ignored")); - return; - } - switch (n) { - case 2: - if (!strcasecmp(sbuff[1], "FIXED")) { - cb_source_format = CB_FORMAT_FIXED; - return; - } - if (!strcasecmp(sbuff[1], "FREE")) { - cb_source_format = CB_FORMAT_FREE; - return; - } - if (!strcasecmp(sbuff[1], "FREE_1COL_ASTER")) { - cb_source_format = CB_FORMAT_FREE_1COL_ASTER; - cb_source_format1 = 1; - return; - } - break; - case 3: - if (strcasecmp(sbuff[1], "FORMAT") && strcasecmp(sbuff[1], "IS")) { - break; - } - if (!strcasecmp(sbuff[2], "FIXED")) { - cb_source_format = CB_FORMAT_FIXED; - return; - } - if (!strcasecmp(sbuff[2], "FREE")) { - cb_source_format = CB_FORMAT_FREE; - return; - } - if (!strcasecmp(sbuff[2], "FREE_1COL_ASTER")) { - cb_source_format = CB_FORMAT_FREE_1COL_ASTER; - cb_source_format1 = 1; - return; - } - if (!strcasecmp(sbuff[2], "VARIABLE")) { - cb_source_format = CB_FORMAT_VARIABLE; - } - break; - default: - if (strcasecmp(sbuff[1], "FORMAT")) { - break; - } - if (strcasecmp(sbuff[2], "IS")) { - break; - } - if (!strcasecmp(sbuff[3], "FIXED")) { - cb_source_format = CB_FORMAT_FIXED; - return; - } - if (!strcasecmp(sbuff[3], "FREE")) { - cb_source_format = CB_FORMAT_FREE; - return; - } - if (!strcasecmp(sbuff[3], "FREE_1COL_ASTER")) { - cb_source_format = CB_FORMAT_FREE_1COL_ASTER; - cb_source_format1 = 1; - return; - } - if (!strcasecmp(sbuff[3], "VARIABLE")) { - cb_source_format = CB_FORMAT_VARIABLE; - } - break; - } - cb_warning(_("Invalid directive - ignored")); +static void +check_directive (char *buff, int *line_size) +{ + char *s; + char *dirptr; + size_t cnt; + int n; + char sbuff[5][256]; + + if (cb_source_format == CB_FORMAT_FIXED) { + if (*line_size < 8) { + return; + } + if (buff[6] != ' ') { + return; + } + s = &buff[7]; + } else { + s = buff; + } + for (; *s == ' '; s++) { + ; + } + dirptr = s; + if (*s != '>') { + return; + } + s++; + if (*s != '>') { + return; + } + s++; + if (*s == 'D') { + if (cb_flag_debugging_line) { + memset (dirptr, ' ', 3); + } else { + for (cnt = 0; cnt < newline_count; cnt++) { + buff[cnt] = '\n'; + } + buff[cnt] = 0; + strcat (buff, " *> DEBUG\n"); + *line_size = strlen (buff); + newline_count = 0; + } + return; + } + memset (sbuff[0], 0, sizeof (sbuff)); + n = sscanf (s, "%255s %255s %255s %255s %255s", + sbuff[0], sbuff[1], sbuff[2], sbuff[3], sbuff[4]); + for (cnt = 0; cnt < newline_count; cnt++) { + buff[cnt] = '\n'; + } + buff[cnt] = 0; + newline_count = 0; + strcat (buff, " *> DIRECTIVE\n"); + *line_size = strlen (buff); + if (n < 2 || strcasecmp (sbuff[0], "SOURCE")) { + cb_warning (_("Invalid directive - ignored")); + return; + } + switch (n) { + case 2: + if (!strcasecmp (sbuff[1], "FIXED")) { + cb_source_format = CB_FORMAT_FIXED; + return; + } + if (!strcasecmp (sbuff[1], "FREE")) { + cb_source_format = CB_FORMAT_FREE; + return; + } + if (!strcasecmp (sbuff[1], "FREE_1COL_ASTER")) { + cb_source_format = CB_FORMAT_FREE_1COL_ASTER; + cb_source_format1 = 1; + return; + } + break; + case 3: + if (strcasecmp (sbuff[1], "FORMAT") && + strcasecmp (sbuff[1], "IS")) { + break; + } + if (!strcasecmp (sbuff[2], "FIXED")) { + cb_source_format = CB_FORMAT_FIXED; + return; + } + if (!strcasecmp (sbuff[2], "FREE")) { + cb_source_format = CB_FORMAT_FREE; + return; + } + if (!strcasecmp (sbuff[2], "FREE_1COL_ASTER")) { + cb_source_format = CB_FORMAT_FREE_1COL_ASTER; + cb_source_format1 = 1; + return; + } + if (!strcasecmp (sbuff[2], "VARIABLE")){ + cb_source_format = CB_FORMAT_VARIABLE; + } + break; + default: + if (strcasecmp (sbuff[1], "FORMAT")) { + break; + } + if (strcasecmp (sbuff[2], "IS")) { + break; + } + if (!strcasecmp (sbuff[3], "FIXED")) { + cb_source_format = CB_FORMAT_FIXED; + return; + } + if (!strcasecmp (sbuff[3], "FREE")) { + cb_source_format = CB_FORMAT_FREE; + return; + } + if (!strcasecmp (sbuff[3], "FREE_1COL_ASTER")) { + cb_source_format = CB_FORMAT_FREE_1COL_ASTER; + cb_source_format1 = 1; + return; + } + if (!strcasecmp (sbuff[3], "VARIABLE")){ + cb_source_format = CB_FORMAT_VARIABLE; + } + break; + } + cb_warning (_("Invalid directive - ignored")); } -static void check_dollar_directive(char *buff, int *line_size) { - struct cb_constant_list *l; - char *s; - size_t cnt; - int n; - char sbuff[5][256]; - int isDEFINED, isNOT; - int i; - COB_UNUSED(n); - - if (cb_source_format == CB_FORMAT_FIXED) { - if (*line_size < 8) { - return; - } - if (buff[6] != '$') { - return; - } - if (*line_size > cb_text_column + 1) { - strcpy(buff + cb_text_column, "\n"); - } - s = &buff[6]; - } else { - if (buff[1] != '$') { - return; - } - s = buff; - } - - memset(sbuff[0], 0, sizeof(sbuff)); - n = sscanf(s, "%255s %255s %255s %255s %255s", sbuff[0], sbuff[1], sbuff[2], - sbuff[3], sbuff[4]); - for (cnt = 0; cnt < newline_count; cnt++) { - buff[cnt] = '\n'; - } - buff[cnt] = 0; - newline_count = 0; - strcat(buff, " *> DIRECTIVE\n"); - *line_size = strlen(buff); - - if (strcasecmp(sbuff[0], "$IF") == 0) { - compile_directive_depth++; - if (compile_directive_depth >= MAX_DEPTH) { - compile_directive_depth = -1; - cb_compile_status = CB_COMPILE_STATUS_ERROR; - cb_error(_("$IF is nested more than 10 times")); - return; - } - if (compile_directive_depth < 0) { - compile_directive_depth = -1; - cb_compile_status = CB_COMPILE_STATUS_ERROR; - cb_error(_("Fatal error in $IF statement")); - return; - } - if (strlen(sbuff[1]) <= 0) { - cb_compile_status = CB_COMPILE_STATUS_ERROR; - cb_error(_("Arguments not enough to $IF statemen")); - return; - } - - isDEFINED = 0; - isNOT = 0; - cb_compile_status_list[compile_directive_depth] = CB_COMPILE_STATUS_FALSE; - if (strcasecmp(sbuff[2], "NOT") == 0) { - isNOT = 1; - cb_compile_status_list[compile_directive_depth] = CB_COMPILE_STATUS_TRUE; - } - if (strcasecmp(sbuff[2 + isNOT], "DEFINED") == 0) { - isDEFINED = 1; - } else if (strcasecmp(sbuff[2 + isNOT], "=") != 0 || - strlen(sbuff[3 + isNOT]) <= 0) { - cb_compile_status = CB_COMPILE_STATUS_ERROR; - cb_error(_("Invalid argument $IF statemen")); - return; - } - l = cb_const_list; - while (l) { - if (strcasecmp(l->name, sbuff[1]) == 0) { - if (isDEFINED) { - if (isNOT) - cb_compile_status_list[compile_directive_depth] = - CB_COMPILE_STATUS_FALSE; - else - cb_compile_status_list[compile_directive_depth] = - CB_COMPILE_STATUS_TRUE; - break; - } else { - switch (l->type) { - case CB_CONSTANT_TYPE_ALPANUM: - if (strlen(sbuff[3 + isNOT]) < 3 || - sbuff[3 + isNOT] != strchr(sbuff[3 + isNOT], '\"') || - sbuff[3 + isNOT] == strrchr(sbuff[3 + isNOT], '\"') || - strlen(strchr(sbuff[3 + isNOT] + 1, '\"')) > 1) { - cb_compile_status = CB_COMPILE_STATUS_ERROR; - cb_error(_("%s is not a string"), sbuff[3 + isNOT]); - return; - } - strcpy(strchr(sbuff[3 + isNOT] + 1, '\"'), ""); - if (strcasecmp(sbuff[3 + isNOT] + 1, l->alphavalue) == 0) { - if (isNOT) - cb_compile_status_list[compile_directive_depth] = - CB_COMPILE_STATUS_FALSE; - else - cb_compile_status_list[compile_directive_depth] = - CB_COMPILE_STATUS_TRUE; - } - break; - case CB_CONSTANT_TYPE_NUMERIC: - // TODO - break; - default: - break; - } - break; - } - } - l = l->next; - } - } else if (strcasecmp(sbuff[0], "$ELSE") == 0) { - if (compile_directive_depth >= MAX_DEPTH) { - compile_directive_depth = -1; - cb_compile_status = CB_COMPILE_STATUS_ERROR; - cb_error(_("Fatal error in $ELSE statement")); - return; - } - if (compile_directive_depth < 0) { - compile_directive_depth = -1; - cb_compile_status = CB_COMPILE_STATUS_ERROR; - cb_error(_("$IF has no defined before the $ELSE")); - return; - } - if (cb_compile_status_list[compile_directive_depth] == - CB_COMPILE_STATUS_TRUE_ELSE || - cb_compile_status_list[compile_directive_depth] == - CB_COMPILE_STATUS_FALSE_ELSE) { - compile_directive_depth = -1; - cb_compile_status = CB_COMPILE_STATUS_ERROR; - cb_error(_("$ELSE has continued")); - return; - } - if (cb_compile_status_list[compile_directive_depth] == - CB_COMPILE_STATUS_FALSE) - cb_compile_status_list[compile_directive_depth] = - CB_COMPILE_STATUS_TRUE_ELSE; - else - cb_compile_status_list[compile_directive_depth] = - CB_COMPILE_STATUS_FALSE_ELSE; - } else if (strcasecmp(sbuff[0], "$END") == 0) { - if (compile_directive_depth >= MAX_DEPTH) { - compile_directive_depth = -1; - cb_compile_status = CB_COMPILE_STATUS_ERROR; - cb_error(_("Fatal error in $END statement")); - return; - } - if (compile_directive_depth < 0) { - compile_directive_depth = -1; - cb_compile_status = CB_COMPILE_STATUS_ERROR; - cb_error(_("$IF has no defined before the $END")); - return; - } - cb_compile_status_list[compile_directive_depth] = CB_COMPILE_STATUS_NONE; - compile_directive_depth--; - } else if (strcasecmp(sbuff[0], "$SET") == 0) { - if (strcasecmp(sbuff[1], "SOURCEFORMAT(FREE)") == 0) { - cb_source_format = CB_FORMAT_FREE; - return; - } else if (strcasecmp(sbuff[1], "SOURCEFORMAT(FIXED)") == 0) { - cb_source_format = CB_FORMAT_FIXED; - return; - } else if (strcasecmp(sbuff[1], "SOURCEFORMAT(FREE_1COL_ASTER)") == 0) { - cb_source_format = CB_FORMAT_FREE_1COL_ASTER; - cb_source_format1 = 1; - return; - } else if (strcasecmp(sbuff[1], "SOURCEFORMAT(VARIABLE)") == 0) { - cb_source_format = CB_FORMAT_VARIABLE; - } else { - cb_compile_status = CB_COMPILE_STATUS_ERROR; - cb_error(_("Invalid $SET")); - return; - } - } else { - cb_compile_status = CB_COMPILE_STATUS_ERROR; - cb_error(_("Invalid $ statements")); - return; - } - - if (compile_directive_depth > -1) { - for (i = 0; i <= compile_directive_depth; i++) { - if (cb_compile_status_list[i] != CB_COMPILE_STATUS_TRUE && - cb_compile_status_list[i] != CB_COMPILE_STATUS_TRUE_ELSE) { - cb_compile_status = CB_COMPILE_STATUS_FALSE; - return; - } - } - } - if (*buff == '\n') { - cb_compile_status = CB_COMPILE_STATUS_FALSE_END; - } else { - cb_compile_status = CB_COMPILE_STATUS_TRUE; - } +static void +check_dollar_directive (char *buff, int *line_size) +{ + struct cb_constant_list *l; + char *s; + size_t cnt; + int n; + char sbuff[5][256]; + int isDEFINED, isNOT; + int i; + COB_UNUSED(n); + + if (cb_source_format == CB_FORMAT_FIXED) { + if (*line_size < 8) { + return; + } + if (buff[6] != '$') { + return; + } + if (*line_size > cb_text_column + 1) { + strcpy (buff + cb_text_column, "\n"); + } + s = &buff[6]; + } else { + if (buff[1] != '$') { + return; + } + s = buff; + } + + memset (sbuff[0], 0, sizeof (sbuff)); + n = sscanf (s, "%255s %255s %255s %255s %255s", + sbuff[0], sbuff[1], sbuff[2], sbuff[3], sbuff[4]); + for (cnt = 0; cnt < newline_count; cnt++) { + buff[cnt] = '\n'; + } + buff[cnt] = 0; + newline_count = 0; + strcat (buff, " *> DIRECTIVE\n"); + *line_size = strlen (buff); + + if (strcasecmp (sbuff[0], "$IF") == 0) { + compile_directive_depth++; + if (compile_directive_depth >= MAX_DEPTH) { + compile_directive_depth = -1; + cb_compile_status = CB_COMPILE_STATUS_ERROR; + cb_error (_("$IF is nested more than 10 times")); + return; + } + if (compile_directive_depth < 0) { + compile_directive_depth = -1; + cb_compile_status = CB_COMPILE_STATUS_ERROR; + cb_error (_("Fatal error in $IF statement")); + return; + } + if (strlen (sbuff[1]) <= 0) { + cb_compile_status = CB_COMPILE_STATUS_ERROR; + cb_error (_("Arguments not enough to $IF statemen")); + return; + } + + isDEFINED = 0; + isNOT = 0; + cb_compile_status_list[compile_directive_depth] = CB_COMPILE_STATUS_FALSE; + if (strcasecmp (sbuff[2], "NOT") == 0) { + isNOT = 1; + cb_compile_status_list[compile_directive_depth] = CB_COMPILE_STATUS_TRUE; + } + if (strcasecmp (sbuff[2+isNOT], "DEFINED") == 0) { + isDEFINED = 1; + } else if (strcasecmp (sbuff[2+isNOT], "=") != 0 || + strlen (sbuff[3+isNOT]) <= 0) { + cb_compile_status = CB_COMPILE_STATUS_ERROR; + cb_error (_("Invalid argument $IF statemen")); + return; + } + l = cb_const_list; + while (l) { + if (strcasecmp (l->name, sbuff[1]) == 0) { + if (isDEFINED) { + if (isNOT) cb_compile_status_list[compile_directive_depth] = CB_COMPILE_STATUS_FALSE; + else cb_compile_status_list[compile_directive_depth] = CB_COMPILE_STATUS_TRUE; + break; + } else { + switch (l->type) { + case CB_CONSTANT_TYPE_ALPANUM: + if (strlen (sbuff[3+isNOT]) < 3 || + sbuff[3+isNOT] != strchr (sbuff[3+isNOT], '\"') || + sbuff[3+isNOT] == strrchr (sbuff[3+isNOT], '\"') || + strlen (strchr (sbuff[3+isNOT]+1, '\"')) > 1) { + cb_compile_status = CB_COMPILE_STATUS_ERROR; + cb_error (_("%s is not a string"), sbuff[3+isNOT]); + return; + } + strcpy (strchr (sbuff[3+isNOT]+1, '\"'), ""); + if (strcasecmp (sbuff[3+isNOT]+1, l->alphavalue) == 0) { + if (isNOT) cb_compile_status_list[compile_directive_depth] = CB_COMPILE_STATUS_FALSE; + else cb_compile_status_list[compile_directive_depth] = CB_COMPILE_STATUS_TRUE; + } + break; + case CB_CONSTANT_TYPE_NUMERIC: + //TODO + break; + default: + break; + } + break; + } + } + l = l->next; + } + } else if (strcasecmp (sbuff[0], "$ELSE") == 0) { + if (compile_directive_depth >= MAX_DEPTH) { + compile_directive_depth = -1; + cb_compile_status = CB_COMPILE_STATUS_ERROR; + cb_error (_("Fatal error in $ELSE statement")); + return; + } + if (compile_directive_depth < 0) { + compile_directive_depth = -1; + cb_compile_status = CB_COMPILE_STATUS_ERROR; + cb_error (_("$IF has no defined before the $ELSE")); + return; + } + if (cb_compile_status_list[compile_directive_depth] == CB_COMPILE_STATUS_TRUE_ELSE || + cb_compile_status_list[compile_directive_depth] == CB_COMPILE_STATUS_FALSE_ELSE) { + compile_directive_depth = -1; + cb_compile_status = CB_COMPILE_STATUS_ERROR; + cb_error (_("$ELSE has continued")); + return; + } + if (cb_compile_status_list[compile_directive_depth] == CB_COMPILE_STATUS_FALSE) + cb_compile_status_list[compile_directive_depth] = CB_COMPILE_STATUS_TRUE_ELSE; + else cb_compile_status_list[compile_directive_depth] = CB_COMPILE_STATUS_FALSE_ELSE; + } else if (strcasecmp (sbuff[0], "$END") == 0) { + if (compile_directive_depth >= MAX_DEPTH) { + compile_directive_depth = -1; + cb_compile_status = CB_COMPILE_STATUS_ERROR; + cb_error (_("Fatal error in $END statement")); + return; + } + if (compile_directive_depth < 0) { + compile_directive_depth = -1; + cb_compile_status = CB_COMPILE_STATUS_ERROR; + cb_error (_("$IF has no defined before the $END")); + return; + } + cb_compile_status_list[compile_directive_depth] = CB_COMPILE_STATUS_NONE; + compile_directive_depth--; + } else if (strcasecmp (sbuff[0], "$SET") == 0) { + if (strcasecmp (sbuff[1], "SOURCEFORMAT(FREE)") == 0) { + cb_source_format = CB_FORMAT_FREE; + return; + } else if (strcasecmp (sbuff[1], "SOURCEFORMAT(FIXED)") == 0) { + cb_source_format = CB_FORMAT_FIXED; + return; + } else if (strcasecmp (sbuff[1], "SOURCEFORMAT(FREE_1COL_ASTER)") == 0) { + cb_source_format = CB_FORMAT_FREE_1COL_ASTER; + cb_source_format1 = 1; + return; + } else if (strcasecmp (sbuff[1], "SOURCEFORMAT(VARIABLE)") == 0){ + cb_source_format = CB_FORMAT_VARIABLE; + } else { + cb_compile_status = CB_COMPILE_STATUS_ERROR; + cb_error (_("Invalid $SET")); + return; + } + } else { + cb_compile_status = CB_COMPILE_STATUS_ERROR; + cb_error (_("Invalid $ statements")); + return; + } + + if (compile_directive_depth > -1) { + for (i = 0; i <= compile_directive_depth; i++) { + if (cb_compile_status_list[i] != CB_COMPILE_STATUS_TRUE && + cb_compile_status_list[i] != CB_COMPILE_STATUS_TRUE_ELSE) { + cb_compile_status = CB_COMPILE_STATUS_FALSE; + return; + } + } + } + if (*buff == '\n') { + cb_compile_status = CB_COMPILE_STATUS_FALSE_END; + } else { + cb_compile_status = CB_COMPILE_STATUS_TRUE; + } } /* * Read line */ -static int ppinput(char *buff, int max_size) { +static int +ppinput (char *buff, int max_size) +{ - char *bp; - size_t gotcr; - size_t continuation = 0; - int ipchar; - int i; - int n; - int coln; - char *str1 = NULL; - char *str2 = NULL; - int comment_counter = 0; + char *bp; + size_t gotcr; + size_t continuation = 0; + int ipchar; + int i; + int n; + int coln; + char *str1 = NULL; + char *str2 = NULL; + int comment_counter = 0; start: - /* read a line */ - gotcr = 0; - ipchar = 0; - for (n = 0; n < 256 && ipchar != '\n';) { - ipchar = getc(ppin); - if (ipchar == EOF) { - if (n > 0) { - break; - } - if (newline_count == 0) { - return 0; - } - memset(buff, '\n', newline_count); - buff[newline_count] = 0; - newline_count = 0; - return strlen(buff); - } - if (n == 0 && cb_source_format != CB_FORMAT_FIXED && - cb_source_format1 != 1 && cb_source_format != CB_FORMAT_VARIABLE) { - if (ipchar != ' ' && ipchar != '\n') { - buff[n++] = ' '; - } - } - if (gotcr) { - if (ipchar != '\n') { - buff[n++] = '\r'; - } - gotcr = 0; - } - if (ipchar == '\r') { - gotcr = 1; - } else if (ipchar == '\t') { - buff[n++] = ' '; - while (n % cb_tab_width != 0) { - buff[n++] = ' '; - } - } else { - buff[n++] = ipchar; - } - } - - if (buff[n - 1] != '\n') { - cb_warning(_("Line not terminated by a newline")); - buff[n++] = '\n'; - } - buff[n] = 0; - if (cb_source_format1 == 1 && buff[0] == '*' && buff[1] != '>') { - strcpy(buff, "\n"); - return strlen(buff); - } - str1 = strstr(buff, "*>"); - if (str1 != NULL) { - if ((str1 - buff) >= 7) { - str2 = strstr(str1, "\""); - if (str2 == NULL) { - buff[str1 - buff] = '\n'; - buff[str1 - buff + 1] = '\0'; - n = strlen(buff); - } - } - } - check_directive(buff, &n); - check_dollar_directive(buff, &n); - if (cb_compile_status == CB_COMPILE_STATUS_ERROR) { - return YY_NULL; - } - if (cb_compile_status == CB_COMPILE_STATUS_FALSE) { - newline_count++; - comment_counter++; - goto start; - } - if (cb_compile_status == CB_COMPILE_STATUS_FALSE_END) { - cb_compile_status = CB_COMPILE_STATUS_NONE; - newline_count++; - comment_counter++; - goto start; - } - - /* nothing more to do with free format */ - if (cb_source_format != CB_FORMAT_FIXED && - cb_source_format != CB_FORMAT_VARIABLE) { - return n; - } - - /* line too short */ - if (n < 8) { - newline_count++; - comment_counter++; - goto start; - } - - if (cb_flag_mfcomment) { - if (buff[0] == '*' || buff[0] == '/') { - /*if(!cb_flag_no_cobol_comment) { - register_comment(0, buff, comment_counter++); - }*/ - newline_count++; - goto start; - } - } - /* check the indicator (column 7) */ - bp = buff + 7; - switch (buff[6]) { - case ' ': - break; - case '-': - continuation = 1; - break; - case 'd': - case 'D': - /* debugging line */ - if (cb_flag_debugging_line) { - break; - } - newline_count++; - comment_counter++; - goto start; - case '*': - case '/': - /* comment line */ - /*if(!cb_flag_no_cobol_comment) { - register_comment(6, buff, comment_counter++); - }*/ - newline_count++; - goto start; - default: - /* invalid indicator */ - cb_error(_("Invalid indicator '%c' at column 7"), buff[6]); - return YY_NULL; - } - - /* skip comments that follow after AUTHORS, etc. */ - if (within_comment) { - /* Check all of "Area A" */ - switch (n) { - case 8: - if (buff[7] == ' ') { - newline_count++; - comment_counter++; - goto start; - } - break; - case 9: - if (!memcmp(&buff[7], " ", 2)) { - newline_count++; - comment_counter++; - goto start; - } - break; - case 10: - if (!memcmp(&buff[7], " ", 3)) { - newline_count++; - comment_counter++; - goto start; - } - break; - default: - if (!memcmp(&buff[7], " ", 4)) { - newline_count++; - comment_counter++; - goto start; - } - break; - } - within_comment = 0; - } - - /* check the text that is longer than cb_text_column */ - if (n > cb_text_column + 1 && cb_source_format != CB_FORMAT_VARIABLE) { - - /* show warning if it is not whitespaces */ - if (cb_warn_column_overflow && last_line_2 < cb_source_line - 1) { - for (coln = cb_text_column; coln < n; coln++) { - if (buff[coln] != ' ' && buff[coln] != '\n') { - cb_warning(_("Source text after column %d"), cb_text_column); - break; - } - } - } - - /* remove it */ - strcpy(buff + cb_text_column, "\n"); - last_line_2 = cb_source_line; - n = cb_text_column + 1; - } - - /* skip blank lines */ - for (i = 7; buff[i] == ' '; i++) - ; - if (buff[i] == '\n') { - newline_count++; - comment_counter++; - goto start; - } - - if (continuation) { - /* line continuation */ - for (; *bp == ' '; bp++) - ; - - /* validate concatenation */ - if (consecutive_quotation) { - if (bp[0] == quotation_mark && bp[1] == quotation_mark) { - bp++; - } else { - cb_error(_("Invalid line continuation")); - return YY_NULL; - } - quotation_mark = 0; - consecutive_quotation = 0; - } else if (quotation_mark) { - /* literal concatenation */ - if (*bp == quotation_mark) { - bp++; - } else { - cb_error(_("Invalid line continuation")); - return YY_NULL; - } - } - } else { - /* normal line */ - quotation_mark = 0; - consecutive_quotation = 0; - } - - /* check if string literal is to be continued */ - for (i = bp - buff; buff[i] != '\n'; i++) { - if (buff[i] == '\'' || buff[i] == '\"') { - if (quotation_mark == 0) { - /* literal start */ - quotation_mark = buff[i]; - } else if (quotation_mark == buff[i]) { - if (i == cb_text_column - 1) { - /* consecutive quotation */ - consecutive_quotation = 1; - } else { - /* literal end */ - quotation_mark = 0; - } - } - } - } - - /* truncate trailing spaces, including the newline */ - if (quotation_mark) { - for (; i < 72;) { - buff[i++] = ' '; - } - buff[i] = 0; - } else { - for (i--; buff[i] == ' '; i--) - ; - if (buff[i] == '\'' || buff[i] == '\"') { - buff[++i] = ' '; - } - buff[i + 1] = 0; - } - - if (continuation) { - memmove(buff, bp, strlen(bp) + 1); - newline_count++; - comment_counter++; - } else { - /* insert newlines at the start of the buffer */ - memmove(buff + newline_count, bp, strlen(bp) + 1); - memset(buff, '\n', newline_count); - newline_count = 1; - } - - return strlen(buff); + /* read a line */ + gotcr = 0; + ipchar = 0; + for (n = 0; n < 256 && ipchar != '\n';) { + ipchar = getc (ppin); + if (ipchar == EOF) { + if (n > 0) { + break; + } + if (newline_count == 0) { + return 0; + } + memset (buff, '\n', newline_count); + buff[newline_count] = 0; + newline_count = 0; + return strlen (buff); + } + if (n == 0 && cb_source_format != CB_FORMAT_FIXED && cb_source_format1 != 1 + && cb_source_format != CB_FORMAT_VARIABLE) { + if (ipchar != ' ' && ipchar != '\n') { + buff[n++] = ' '; + } + } + if (gotcr) { + if (ipchar != '\n') { + buff[n++] = '\r'; + } + gotcr = 0; + } + if (ipchar == '\r') { + gotcr = 1; + } else if (ipchar == '\t') { + buff[n++] = ' '; + while (n % cb_tab_width != 0) { + buff[n++] = ' '; + } + } else { + buff[n++] = ipchar; + } + } + + if (buff[n - 1] != '\n') { + cb_warning (_("Line not terminated by a newline")); + buff[n++] = '\n'; + } + buff[n] = 0; + if (cb_source_format1 == 1 && buff[0] == '*' && buff[1] != '>') { + strcpy (buff, "\n"); + return strlen (buff); + } + str1 = strstr (buff, "*>"); + if (str1 != NULL) { + if ((str1-buff) >= 7) { + str2 = strstr (str1, "\""); + if (str2 == NULL) { + buff[str1-buff] = '\n'; + buff[str1-buff +1] = '\0'; + n = strlen (buff); + } + } + } + check_directive (buff, &n); + check_dollar_directive (buff, &n); + if (cb_compile_status == CB_COMPILE_STATUS_ERROR) { + return YY_NULL; + } + if (cb_compile_status == CB_COMPILE_STATUS_FALSE) { + newline_count++; + comment_counter++; + goto start; + } + if (cb_compile_status == CB_COMPILE_STATUS_FALSE_END) { + cb_compile_status = CB_COMPILE_STATUS_NONE; + newline_count++; + comment_counter++; + goto start; + } + + /* nothing more to do with free format */ + if (cb_source_format != CB_FORMAT_FIXED && cb_source_format != CB_FORMAT_VARIABLE) { + return n; + } + + /* line too short */ + if (n < 8) { + newline_count++; + comment_counter++; + goto start; + } + + if (cb_flag_mfcomment) { + if (buff[0] == '*' || buff[0] == '/') { + /*if(!cb_flag_no_cobol_comment) { + register_comment(0, buff, comment_counter++); + }*/ + newline_count++; + goto start; + } + } + /* check the indicator (column 7) */ + bp = buff + 7; + switch (buff[6]) { + case ' ': + break; + case '-': + continuation = 1; + break; + case 'd': + case 'D': + /* debugging line */ + if (cb_flag_debugging_line) { + break; + } + newline_count++; + comment_counter++; + goto start; + case '*': + case '/': + /* comment line */ + /*if(!cb_flag_no_cobol_comment) { + register_comment(6, buff, comment_counter++); + }*/ + newline_count++; + goto start; + default: + /* invalid indicator */ + cb_error (_("Invalid indicator '%c' at column 7"), buff[6]); + return YY_NULL; + } + + /* skip comments that follow after AUTHORS, etc. */ + if (within_comment) { + /* Check all of "Area A" */ + switch (n) { + case 8: + if (buff[7] == ' ') { + newline_count++; + comment_counter++; + goto start; + } + break; + case 9: + if (!memcmp (&buff[7], " ", 2)) { + newline_count++; + comment_counter++; + goto start; + } + break; + case 10: + if (!memcmp (&buff[7], " ", 3)) { + newline_count++; + comment_counter++; + goto start; + } + break; + default: + if (!memcmp (&buff[7], " ", 4)) { + newline_count++; + comment_counter++; + goto start; + } + break; + } + within_comment = 0; + } + + /* check the text that is longer than cb_text_column */ + if (n > cb_text_column + 1 && cb_source_format != CB_FORMAT_VARIABLE) { + + /* show warning if it is not whitespaces */ + if (cb_warn_column_overflow && last_line_2 < cb_source_line - 1) { + for (coln = cb_text_column; coln < n; coln++) { + if (buff[coln] != ' ' && buff[coln] != '\n') { + cb_warning (_("Source text after column %d"), + cb_text_column); + break; + } + } + } + + /* remove it */ + strcpy (buff + cb_text_column, "\n"); + last_line_2 = cb_source_line; + n = cb_text_column + 1; + } + + /* skip blank lines */ + for (i = 7; buff[i] == ' '; i++) ; + if (buff[i] == '\n') { + newline_count++; + comment_counter++; + goto start; + } + + if (continuation) { + /* line continuation */ + for (; *bp == ' '; bp++) ; + + /* validate concatenation */ + if (consecutive_quotation) { + if (bp[0] == quotation_mark && bp[1] == quotation_mark) { + bp++; + } else { + cb_error (_("Invalid line continuation")); + return YY_NULL; + } + quotation_mark = 0; + consecutive_quotation = 0; + } else if (quotation_mark) { + /* literal concatenation */ + if (*bp == quotation_mark) { + bp++; + } else { + cb_error (_("Invalid line continuation")); + return YY_NULL; + } + } + } else { + /* normal line */ + quotation_mark = 0; + consecutive_quotation = 0; + } + + /* check if string literal is to be continued */ + for (i = bp - buff; buff[i] != '\n'; i++) { + if (buff[i] == '\'' || buff[i] == '\"') { + if (quotation_mark == 0) { + /* literal start */ + quotation_mark = buff[i]; + } else if (quotation_mark == buff[i]) { + if (i == cb_text_column - 1) { + /* consecutive quotation */ + consecutive_quotation = 1; + } else { + /* literal end */ + quotation_mark = 0; + } + } + } + } + + /* truncate trailing spaces, including the newline */ + if (quotation_mark) { + for (; i < 72;) { + buff[i++] = ' '; + } + buff[i] = 0; + } else { + for (i--; buff[i] == ' '; i--) ; + if (buff[i] == '\'' || buff[i] == '\"') { + buff[++i] = ' '; + } + buff[i + 1] = 0; + } + + if (continuation) { + memmove (buff, bp, strlen (bp) + 1); + newline_count++; + comment_counter++; + } else { + /* insert newlines at the start of the buffer */ + memmove (buff + newline_count, bp, strlen (bp) + 1); + memset (buff, '\n', newline_count); + newline_count = 1; + } + + return strlen (buff); } -static void ppecho_0(const char *text, struct cb_text_list **pqueue, - struct cb_replace_list **preplace, - void(ppecho_proc)(const char *)) { - - struct cb_replace_list *r; - struct cb_text_list *l; - struct cb_text_list *queue; - - if (suppress_echo) { - /* generate no output */ - } else if (*pqueue == NULL && (text[0] == ' ' || text[0] == '\n')) { - ppecho_proc(text); - } else if (!*preplace) { - for (; *pqueue; *pqueue = (*pqueue)->next) { - ppecho_proc((*pqueue)->text); - } - ppecho_proc(text); - } else { - /* Do replacement */ - - *pqueue = cb_text_list_add(*pqueue, text); - - while (*pqueue) { - for (r = *preplace; r; r = r->next) { - queue = *pqueue; - for (l = r->old_text; l; l = l->next) { - while (l && (l->text[0] == ' ' || l->text[0] == '\n')) { - l = l->next; - } - if (l == NULL) { - break; - } - while (queue && (queue->text[0] == ' ' || queue->text[0] == '\n')) { - queue = queue->next; - } - if (queue == NULL) { - return; /* partial match */ - } - if (r->replace_type == CB_REPLACE_LEADING) { - break; - } else if (r->replace_type == CB_REPLACE_TRAILING) { - break; - } else if (r->replace_type == CB_REPLACE_OTHER) { - if (strcasecmp(l->text, queue->text) != 0) { - break; - } - } - queue = queue->next; - } - if (r->replace_type == CB_REPLACE_LEADING) { - if (!l || !queue) { - continue; - } - if (strncasecmp(l->text, queue->text, strlen(l->text)) == 0) { - break; - } - } else if (r->replace_type == CB_REPLACE_TRAILING) { - if (!l || !queue || strlen(queue->text) < strlen(r->old_text->text)) { - continue; - } - if (strcasecmp(queue->text + strlen(queue->text) - - strlen(r->old_text->text), - r->old_text->text) == 0) { - break; - } - } else if (l == NULL) { - /* match */ - break; - } - } - - /* match */ - if (r && r->replace_type == CB_REPLACE_LEADING) { - int oldlen = strlen(l->text); - for (l = *pqueue; l != queue; l = l->next) { - ppecho_proc(l->text); - } - l = r->new_text; - while (l && (l->text[0] == ' ' || l->text[0] == '\n')) { - l = l->next; - } - if (l) { - ppecho_proc(l->text); - } - ppecho_proc(queue->text + oldlen); - queue = queue->next; - } else if (r && r->replace_type == CB_REPLACE_TRAILING) { - int i; - int oldlen = strlen(l->text); - for (l = *pqueue; l != queue; l = l->next) { - ppecho_proc(l->text); - } - for (i = 0; i < strlen(queue->text) - oldlen; i++) { - fputc(queue->text[i], ppout); - } - l = r->new_text; - while (l && (l->text[0] == ' ' || l->text[0] == '\n')) { - l = l->next; - } - if (l) { - ppecho_proc(l->text); - } - queue = queue->next; - } else if (r && l == NULL) { - for (l = r->new_text; l; l = l->next) { - ppecho_proc(l->text); - } - } else { - /* no match */ - if (!*pqueue) { - break; - } - ppecho_proc((*pqueue)->text); - queue = (*pqueue)->next; - } - - while (*pqueue != queue) { - if (!*pqueue) - break; - - l = (*pqueue)->next; - free(*pqueue); - *pqueue = l; - } - } - } +static void +ppecho_0 (const char *text, + struct cb_text_list **pqueue, + struct cb_replace_list **preplace, + void (ppecho_proc)(const char *)) { + + struct cb_replace_list *r; + struct cb_text_list *l; + struct cb_text_list *queue; + + if (suppress_echo) { + /* generate no output */ + } else if (*pqueue == NULL && (text[0] == ' ' || text[0] == '\n')) { + ppecho_proc (text); + } else if (!*preplace) { + for (; *pqueue; *pqueue = (*pqueue)->next) { + ppecho_proc ((*pqueue)->text); + } + ppecho_proc (text); + } else { + /* Do replacement */ + + *pqueue = cb_text_list_add (*pqueue, text); + + while (*pqueue) { + for (r = *preplace; r; r = r->next) { + queue = *pqueue; + for (l = r->old_text; l; l = l->next) { + while (l && (l->text[0] == ' ' || l->text[0] == '\n')) { + l = l->next; + } + if (l == NULL) { + break; + } + while (queue && (queue->text[0] == ' ' || + queue->text[0] == '\n')) { + queue = queue->next; + } + if (queue == NULL) { + return; /* partial match */ + } + if (r->replace_type == CB_REPLACE_LEADING) { + break; + } else if (r->replace_type == CB_REPLACE_TRAILING) { + break; + } else if (r->replace_type == CB_REPLACE_OTHER) { + if (strcasecmp (l->text, queue->text) != 0) { + break; + } + } + queue = queue->next; + } + if (r->replace_type == CB_REPLACE_LEADING) { + if (!l || !queue) { + continue; + } + if (strncasecmp (l->text, queue->text, strlen (l->text)) == 0) { + break; + } + } else if (r->replace_type == CB_REPLACE_TRAILING) { + if (!l || !queue || strlen (queue->text) < strlen (r->old_text->text)) { + continue; + } + if (strcasecmp (queue->text + strlen (queue->text) - strlen (r->old_text->text), r->old_text->text) == 0) { + break; + } + } else if (l == NULL) { + /* match */ + break; + } + } + + /* match */ + if (r && r->replace_type == CB_REPLACE_LEADING) { + int oldlen = strlen (l->text); + for (l = *pqueue; l != queue; l = l->next) { + ppecho_proc (l->text); + } + l = r->new_text; + while (l && (l->text[0] == ' ' || l->text[0] == '\n')) { + l = l->next; + } + if (l) { + ppecho_proc (l->text); + } + ppecho_proc (queue->text + oldlen); + queue = queue->next; + } else if (r && r->replace_type == CB_REPLACE_TRAILING) { + int i; + int oldlen = strlen (l->text); + for (l = *pqueue; l != queue; l = l->next) { + ppecho_proc (l->text); + } + for (i = 0; i < strlen (queue->text) - oldlen; i++) { + fputc (queue->text[i], ppout); + } + l = r->new_text; + while (l && (l->text[0] == ' ' || l->text[0] == '\n')) { + l = l->next; + } + if (l) { + ppecho_proc (l->text); + } + queue = queue->next; + } else if (r && l == NULL) { + for (l = r->new_text; l; l = l->next) { + ppecho_proc (l->text); + } + } else { + /* no match */ + if (!*pqueue) { + break; + } + ppecho_proc ((*pqueue)->text); + queue = (*pqueue)->next; + } + + while (*pqueue != queue) { + if (!*pqueue) break; + + l = (*pqueue)->next; + free (*pqueue); + *pqueue = l; + } + } + } } -static void ppecho_final(const char *text) { fputs(text, ppout); } - -static void ppecho_2(const char *text) { - /* process REPLACE */ - ppecho_0(text, &text_queue2, ¤t_replace_list, ppecho_final); +static void +ppecho_final (const char *text) +{ + fputs (text, ppout); } -static void ppecho_1(const char *text) { - /* process COPY REPLACING */ - ppecho_0(text, &text_queue1, ¤t_copy_replace_list, ppecho_2); +static void +ppecho_2 (const char *text) +{ + /* process REPLACE */ + ppecho_0 (text, &text_queue2, ¤t_replace_list, ppecho_final); } -static void ppecho(const char *text) { ppecho_1(text); } +static void +ppecho_1 (const char *text) +{ + /* process COPY REPLACING */ + ppecho_0 (text, &text_queue1, ¤t_copy_replace_list, ppecho_2); +} -void pp_set_current_division(int divno) { current_division = divno; } +static void +ppecho (const char *text) +{ + ppecho_1 (text); +} -void pp_omit_data_entry_name(int on_off) { omit_data_entry_name = on_off; } +void pp_set_current_division (int divno) +{ + current_division = divno; +} -void pp_omit_data_redef_name(int on_off) { omit_data_redef_name = on_off; } +void pp_omit_data_entry_name (int on_off) +{ + omit_data_entry_name = on_off; +} -void register_comment(int comment_mark_index, char *buffer, int delta) { - struct comment_info *p = malloc(sizeof(struct comment_info)); - p->file = cb_source_file; - p->line = cb_source_line + delta + 1; +void pp_omit_data_redef_name (int on_off) +{ + omit_data_redef_name = on_off; +} - // Remove the unnecessary part of the comment - int str_len_original_line = strlen(buffer); - int comment_end_index; - if (buffer[str_len_original_line - 1] == '\n') { - if (str_len_original_line >= 2 && - buffer[str_len_original_line - 1] == '\r') { - comment_end_index = str_len_original_line - 2; - } else { - comment_end_index = str_len_original_line - 1; - } - } else { - comment_end_index = str_len_original_line; - } - int comment_len = comment_end_index - comment_mark_index - 1; - p->comment = malloc(comment_len + 1); - memcpy(p->comment, buffer + comment_mark_index + 1, comment_len); - p->comment[comment_len] = '\0'; - - p->prev = comment_info_list_last; - p->next = NULL; - p->is_base_cobol_file = copy_stack->next == NULL; - p->position_in_source_code = position_in_source_code; - if (comment_info_list_last != NULL) { - comment_info_list_last->next = p; - } - comment_info_list_last = p; - if (comment_info_list_head == NULL) { - comment_info_list_head = p; - } +void register_comment(int comment_mark_index, char* buffer, int delta) { + struct comment_info* p = malloc(sizeof(struct comment_info)); + p->file = cb_source_file; + p->line = cb_source_line + delta + 1; + + // Remove the unnecessary part of the comment + int str_len_original_line = strlen(buffer); + int comment_end_index; + if(buffer[str_len_original_line - 1] == '\n') { + if(str_len_original_line >= 2 && buffer[str_len_original_line - 1] == '\r') { + comment_end_index = str_len_original_line - 2; + } else { + comment_end_index = str_len_original_line - 1; + } + } else { + comment_end_index = str_len_original_line; + } + int comment_len = comment_end_index - comment_mark_index - 1; + p->comment = malloc(comment_len + 1); + memcpy(p->comment, buffer + comment_mark_index + 1, comment_len); + p->comment[comment_len] = '\0'; + + p->prev = comment_info_list_last; + p->next = NULL; + p->is_base_cobol_file = copy_stack->next == NULL; + p->position_in_source_code = position_in_source_code; + if(comment_info_list_last != NULL) { + comment_info_list_last->next = p; + } + comment_info_list_last = p; + if(comment_info_list_head == NULL) { + comment_info_list_head = p; + } } diff --git a/cobj/pplex.l b/cobj/pplex.l index 76bd67c9..e087042a 100644 --- a/cobj/pplex.l +++ b/cobj/pplex.l @@ -112,11 +112,20 @@ static void switch_to_buffer (const int lineno, const char *filename, %} -ZENSPC [\x81][\x40] -SJIS [\x81-\x9F\xE0-\xFC][\x40-\x7E\x80-\xFC] -SJIS_EX_ZENSPC [\x82-\x9F\xE0-\xFC][\x40-\x7E\x80-\xFC]|[\x81][\x40-\x7E\x80-\xFC]{-}[\x40] -JPNWORD [\xA0-\xDF]|{SJIS_EX_ZENSPC} -WORD ([_0-9A-Z-]|{JPNWORD})+ +ZENSPC [\xE3][\x80][\x80] +U00_7F [\x00-\x7F] +U80_7FF [\xC2-\xDF][\x80-\xBF] +U800_FFF [\xE0][\xA0-\xBF][\x80-\xBF] +U1000_CFFF [\xE1-\xEC][\x80-\xBF][\x80-\xBF] +U1000_EX_ZENSPC [\xE1-\xE2][\x80-\xBF][\x80-\xBF]|[\xE3][\x80-\xBF][\x81-\xBF]|[\xE3][\x81-\xBF][\x80-\xBF]|[\xE4-\xEC][\x80-\xBF][\x80-\xBF] +UD000_D7FF [\xED][\x80-\x9F][\x80-\xBF] +UE000_FFFF [\xEE-\xEF][\x80-\xBF][\x80-\xBF] +U10000_3FFFF [\xF0][\x90-\xBF][\x80-\xBF][\x80-\xBF] +U30000_FFFFF [\xF1-\xF3][\x80-\xBF][\x80-\xBF][\x80-\xBF] +U100000_10FFFF [\xF4][\x80-\x8F][\x80-\xBF][\x80-\xBF] +UTF8_EXT {U80_7FF}|{U800_FFF}|{U1000_EX_ZENSPC}|{UD000_D7FF}|{UE000_FFFF}|{U10000_3FFFF}|{U30000_FFFFF}|{U100000_10FFFF} +UTF8 {U00_7F}|{UTF8_EXT} +WORD ({UTF8_EXT}|[_0-9A-Z-])+ NUMRIC_LITERAL [+-]?[0-9,.]*[0-9] ALNUM_LITERAL \"[^\"\n]*\"|\'[^\'\n]*\' @@ -453,8 +462,16 @@ convert_ucs_hyphen_minus (char *namebuf) { char *p = namebuf; while (NULL != (p = strstr (p, UTF8_MINUS_SIGN))) { - memcpy (p, UTF8_FULLWIDTH_HYPHEN_MINUS, 3); - p += 3; + *p = '_'; + memmove(p+1, p+3, strlen(p+3)+1); + p++; + } + + p = namebuf; + while (NULL != (p = strstr (p, UTF8_FULLWIDTH_HYPHEN_MINUS))) { + *p = '_'; + memmove(p+1, p+3, strlen(p+3)+1); + p++; } return; } diff --git a/cobj/pplex.l.m4 b/cobj/pplex.l.m4 index 52edf9be..6ffb8ab5 100644 --- a/cobj/pplex.l.m4 +++ b/cobj/pplex.l.m4 @@ -468,8 +468,16 @@ convert_ucs_hyphen_minus (char *namebuf) { char *p = namebuf; while (NULL != (p = strstr (p, UTF8_MINUS_SIGN))) { - memcpy (p, UTF8_FULLWIDTH_HYPHEN_MINUS, 3); - p += 3; + *p = '_'; + memmove(p+1, p+3, strlen(p+3)+1); + p++; + } + + p = namebuf; + while (NULL != (p = strstr (p, UTF8_FULLWIDTH_HYPHEN_MINUS))) { + *p = '_'; + memmove(p+1, p+3, strlen(p+3)+1); + p++; } return; } diff --git a/cobj/tree.c b/cobj/tree.c index 495d0f88..6ca181a0 100644 --- a/cobj/tree.c +++ b/cobj/tree.c @@ -92,6 +92,7 @@ cb_tree cb_true; cb_tree cb_false; cb_tree cb_null; cb_tree cb_zero; +cb_tree cb_zen_zero; cb_tree cb_one; cb_tree cb_space; cb_tree cb_blank; @@ -764,6 +765,7 @@ void cb_init_constants(void) { cb_false = make_constant(CB_CATEGORY_BOOLEAN, "0"); cb_null = make_constant(CB_CATEGORY_DATA_POINTER, "0"); cb_zero = make_constant(CB_CATEGORY_NUMERIC, "CobolConstant.zero"); + cb_zen_zero = make_constant(CB_CATEGORY_NUMERIC, "CobolConstant.zenZero"); cb_one = make_constant(CB_CATEGORY_NUMERIC, "CobolConstant.One"); cb_space = make_constant(CB_CATEGORY_ALPHANUMERIC, "CobolConstant.space"); cb_blank = make_constant(CB_CATEGORY_ALPHANUMERIC, "CobolConstant.blank"); @@ -1465,12 +1467,7 @@ cb_tree cb_build_picture(const char *str) { size += n; } else if (c == 'N' || (category == PIC_NATIONAL_EDITED && (c == '0' || c == 'B' || c == '/'))) { -#ifdef I18N_UTF8 - /* I18N_UTF8: 3bytes for BMP. */ - size += n * 2; -#else /*!I18N_UTF8*/ size += n; -#endif /*I18N_UTF8*/ } /* store in the buffer */ @@ -1514,14 +1511,15 @@ cb_tree cb_build_picture(const char *str) { break; case PIC_NATIONAL: pic->category = CB_CATEGORY_NATIONAL; -#ifdef I18N_UTF8 - /* I18N_UTF8: NATIONAL allocates 3bytes/char for BMP. */ - CHECK_CHARACTER_LENGTH(cb_max_utf8_character_data_size, - "National field cannot be larger than %d digits"); -#else /*!I18N_UTF8*/ + // #ifdef I18N_UTF8 + // /* I18N_UTF8: NATIONAL allocates 3bytes/char for BMP. */ + // CHECK_CHARACTER_LENGTH(cb_max_utf8_character_data_size, + // "National field cannot be larger than %d + // digits"); + // #else /*!I18N_UTF8*/ CHECK_CHARACTER_LENGTH(cb_max_sjis_character_data_size, "National field cannot be larger than %d digits"); -#endif /*I18N_UTF8*/ + // #endif /*I18N_UTF8*/ break; case PIC_NUMERIC_EDITED: pic->str = cobc_malloc(idx + 1); @@ -1547,16 +1545,16 @@ cb_tree cb_build_picture(const char *str) { memcpy(pic->str, buff, idx); pic->category = CB_CATEGORY_NATIONAL_EDITED; pic->lenstr = idx; -#ifdef I18N_UTF8 - /* I18N_UTF8: NATIONAL allocates 3bytes/char for BMP. */ - CHECK_CHARACTER_LENGTH( - cb_max_utf8_character_data_size, - "NationalEdit field cannot be larger than %d digits"); -#else /*!I18N_UTF8*/ + // #ifdef I18N_UTF8 + // /* I18N_UTF8: NATIONAL allocates 3bytes/char for BMP. */ + // CHECK_CHARACTER_LENGTH( + // cb_max_utf8_character_data_size, + // "NationalEdit field cannot be larger than %d digits"); + // #else /*!I18N_UTF8*/ CHECK_CHARACTER_LENGTH( cb_max_sjis_character_data_size, "NationalEdit field cannot be larger than %d digits"); -#endif /*I18N_UTF8*/ + // #endif /*I18N_UTF8*/ break; default: goto error; @@ -2731,22 +2729,31 @@ cb_tree cb_build_intrinsic(cb_tree name, cb_tree args, cb_tree refmod) { char *cb_get_hexword(char *name) { unsigned char *p; - int non_sjis = 0; + int non_sjis_utf8 = 0; char *rt = NULL; for (p = (unsigned char *)name; *p;) { unsigned char c = *p; +#ifdef I18N_UTF8 + int n; + if ((n = COB_U8BYTE_1(c))) { + p += n; + } else { + non_sjis_utf8 = 1; + break; + } +#else /*!I18N_UTF8*/ if (c < 0x80) { p++; } else if ((0x81 <= c && c <= 0x9F) || (0xE0 <= c && c <= 0xEF)) { p += 2; } else { - non_sjis = 1; + non_sjis_utf8 = 1; break; } +#endif /*I18N_UTF8*/ } - - if (!non_sjis) { + if (!non_sjis_utf8) { rt = strdup(name); } else { rt = cobc_malloc(strlen(name) * 2 + 7); diff --git a/cobj/tree.h b/cobj/tree.h index b251eb23..647827ee 100644 --- a/cobj/tree.h +++ b/cobj/tree.h @@ -273,6 +273,7 @@ extern cb_tree cb_true; extern cb_tree cb_false; extern cb_tree cb_null; extern cb_tree cb_zero; +extern cb_tree cb_zen_zero; extern cb_tree cb_one; extern cb_tree cb_space; extern cb_tree cb_blank; diff --git a/cobj/typeck.c b/cobj/typeck.c index 7f45804d..7acff062 100644 --- a/cobj/typeck.c +++ b/cobj/typeck.c @@ -375,6 +375,26 @@ char *cb_encode_program_id(const char *name) { p += sprintf((char *)p, "_%02X", *s++); } /* encode invalid letters */ +#ifdef I18N_UTF8 + int n, i; + + for (; *s; s++) { + if (isalnum(*s) || *s == '_') { + *p++ = *s; + } else if (*s == '-') { + *p++ = '_'; + *p++ = '_'; + } else if ((n = COB_U8BYTE_1(*s))) { + p += sprintf((char *)p, "_"); + for (i = 0; i < n; i++) { + p += sprintf((char *)p, "%02X", s[i]); + } + s += n - 1; + } else { + p += sprintf((char *)p, "_%02X", *s); + } + } +#else /*!I18N_UTF8*/ for (; *s; s++) { if (isalnum(*s) || *s == '_') { *p++ = *s; @@ -385,7 +405,9 @@ char *cb_encode_program_id(const char *name) { p += sprintf((char *)p, "_%02X", *s); } } +#endif *p = 0; + return strdup((char *)buff); } @@ -661,6 +683,7 @@ cb_tree cb_build_identifier(cb_tree x) { cb_tree sub; int size; int n; + int name_size; if (x == cb_error_node) { return cb_error_node; @@ -741,6 +764,13 @@ cb_tree cb_build_identifier(cb_tree x) { } } +#ifdef I18N_UTF8 + name_size = + utf8_calc_sjis_size((const unsigned char *)name, strlen(name)); +#else /*!I18N_UTF8*/ + name_size = strlen(name); +#endif /*I18N_UTF8*/ + /* run-time check */ if (CB_EXCEPTION_ENABLE(COB_EC_BOUND_SUBSCRIPT)) { if (p->occurs_depending) { @@ -754,7 +784,7 @@ cb_tree cb_build_identifier(cb_tree x) { e2 = cb_build_funcall_5( "CobolCheck.checkSubscript", cb_build_cast_integer(sub), cb_int1, cb_build_cast_integer(p->occurs_depending), - cb_build_string0((ucharptr)name), cb_int(strlen(name))); + cb_build_string0((ucharptr)name), cb_int(name_size)); } else { e1 = cb_build_funcall_4( "CobolCheck.checkOdo", cb_int(p->occurs_max), @@ -764,7 +794,7 @@ cb_tree cb_build_identifier(cb_tree x) { e2 = cb_build_funcall_5( "CobolCheck.checkSubscript", cb_build_cast_integer(sub), cb_int1, cb_int(p->occurs_max), - cb_build_string0((ucharptr)name), cb_int(strlen(name))); + cb_build_string0((ucharptr)name), cb_int(name_size)); } r->check = cb_list_add(r->check, e1); r->check = cb_list_add(r->check, e2); @@ -773,7 +803,7 @@ cb_tree cb_build_identifier(cb_tree x) { e1 = cb_build_funcall_5( "CobolCheck.checkSubscript", cb_build_cast_integer(sub), cb_int1, cb_int(p->occurs_max), - cb_build_string0((ucharptr)name), cb_int(strlen(name))); + cb_build_string0((ucharptr)name), cb_int(name_size)); r->check = cb_list_add(r->check, e1); } } @@ -820,18 +850,6 @@ cb_tree cb_build_identifier(cb_tree x) { #endif /*I18N_UTF8*/ /* run-time check */ -#ifdef I18N_UTF8 - /* I18N_UTF8: No wide char support. */ - if (CB_EXCEPTION_ENABLE(COB_EC_BOUND_REF_MOD)) { - if (!CB_LITERAL_P(r->offset) || (r->length && !CB_LITERAL_P(r->length))) { - e1 = cb_build_funcall_4( - "CobolUtil.cobCheckRefMod", cb_build_cast_integer(r->offset), - r->length ? cb_build_cast_integer(r->length) : cb_int1, - cb_int(f->size), cb_build_string0((ucharptr)f->name)); - r->check = cb_list_add(r->check, e1); - } - } -#else /*!I18N_UTF8*/ if (CB_EXCEPTION_ENABLE(COB_EC_BOUND_REF_MOD)) { if (!CB_LITERAL_P(r->offset) || (r->length && !CB_LITERAL_P(r->length))) { if (cb_tree_category(CB_TREE(r)) == CB_CATEGORY_NATIONAL || @@ -851,7 +869,6 @@ cb_tree cb_build_identifier(cb_tree x) { r->check = cb_list_add(r->check, e1); } } -#endif /*I18N_UTF8*/ } if (f->storage == CB_STORAGE_CONSTANT) { @@ -3976,17 +3993,17 @@ static int check_equal_data_size(cb_tree x, cb_tree y) { return rt; } -static int cb_validate_inspect_replaceable(cb_tree x, cb_tree y) { - int rt = 0; - - if (y == cb_zero || y == cb_space || y == cb_quote || y == cb_high || - y == cb_low) { - /* always replaceable */ - } else if (check_equal_data_size(x, y)) { - rt = 1; - } - return rt; -} +// static int cb_validate_inspect_replaceable(cb_tree x, cb_tree y) { +// int rt = 0; +// +// if (y == cb_zero || y == cb_space || y == cb_quote || y == cb_high || +// y == cb_low) { +// /* always replaceable */ +// } else if (check_equal_data_size(x, y)) { +// rt = 1; +// } +// return rt; +// } static int cb_validate_inspect_convertible(cb_tree x, cb_tree y) { unsigned char *data1; @@ -4160,7 +4177,14 @@ cb_tree cb_build_replacing_characters(cb_tree x, cb_tree l, cb_tree var) { cb_tree cb_build_replacing_all(cb_tree x, cb_tree y, cb_tree l, cb_tree var) { #ifdef I18N_UTF8 - cb_validate_inspect_replaceable(x, y); + // cb_validate_inspect_replaceable(x, y); + + if (CB_LITERAL_P(x)) { + const unsigned char *p = CB_LITERAL(x)->data; + if (COB_U8BYTE_1(*p) == 3 && y == cb_zero) { + y = cb_zen_zero; + } + } #else /*I18N_UTF8*/ /* * caution: cb_validate_inspect() never returns error (<0) @@ -4237,6 +4261,7 @@ static int move_error(cb_tree src, cb_tree dst, const size_t value_flag, return 0; } loc = src->source_line ? src : dst; + if (value_flag) { /* VALUE clause */ cb_warning_x(loc, msg); @@ -4691,10 +4716,8 @@ int validate_move(cb_tree src, cb_tree dst, size_t is_value) { if ((int)i < 0) { goto invalid_national; } - if (size >= 0 && i > size) { - goto size_overflow; - } - } else if (size >= 0 && (int)l->size > size) { + } + if (size >= 0 && utf8_calc_sjis_size(l->data, l->size) > size) { goto size_overflow; } #else /*!I18N_UTF8*/ @@ -5240,6 +5263,7 @@ static cb_tree cb_build_move_literal(cb_tree src, cb_tree dst) { int val; int n; unsigned char bbyte; + size_t dst_size; l = CB_LITERAL(src); f = cb_field(dst); @@ -5297,17 +5321,34 @@ static cb_tree cb_build_move_literal(cb_tree src, cb_tree dst) { ((cat == CB_CATEGORY_ALPHABETIC || cat == CB_CATEGORY_ALPHANUMERIC) && f->size < (int)(l->size + 16) && !cb_field_variable_size(f))) { - buff = cobc_malloc((size_t)f->size); +#ifdef I18N_UTF8 + if (!utf8_ext_pick(l->data)) { + diff = (int)(f->size - l->size); + dst_size = f->size; + } else { + diff = (int)(f->size - utf8_calc_sjis_size(l->data, l->size)); + if (diff > 0) { + dst_size = strlen((char *)l->data) + diff; + } else { + dst_size = strlen((char *)l->data); + } + } + buff = cobc_malloc(dst_size); +#else /*!I18N_UTF8*/ diff = (int)(f->size - l->size); + dst_size = (size_t)f->size; + buff = cobc_malloc(dst_size); +#endif /*I18N_UTF8*/ + if (cat == CB_CATEGORY_NUMERIC) { if (diff <= 0) { - memcpy(buff, l->data - diff, (size_t)f->size); + memcpy(buff, l->data - diff, dst_size); } else { memset(buff, '0', (size_t)diff); memcpy(buff + diff, l->data, (size_t)l->size); } if (f->pic->have_sign) { - p = &buff[f->size - 1]; + p = &buff[dst_size - 1]; if (cb_display_sign) { cob_put_sign_ebcdic(p, l->sign); } else if (l->sign < 0) { @@ -5321,14 +5362,14 @@ static cb_tree cb_build_move_literal(cb_tree src, cb_tree dst) { } else { if (f->flag_justified) { if (diff <= 0) { - memcpy(buff, l->data - diff, (size_t)f->size); + memcpy(buff, l->data - diff, dst_size); } else { memset(buff, ' ', (size_t)diff); memcpy(buff + diff, l->data, (size_t)l->size); } } else { if (diff <= 0) { - memcpy(buff, l->data, (size_t)f->size); + memcpy(buff, l->data, dst_size); } else { memcpy(buff, l->data, (size_t)l->size); memset(buff + l->size, ' ', (size_t)diff); @@ -5336,22 +5377,22 @@ static cb_tree cb_build_move_literal(cb_tree src, cb_tree dst) { } } bbyte = *buff; - if (f->size == 1) { + if (dst_size == 1) { free(buff); return cb_build_funcall_2("$E", dst, cb_int(bbyte)); } - for (i = 0; i < f->size; i++) { + for (i = 0; i < dst_size; i++) { if (bbyte != buff[i]) { break; } } - if (i == f->size) { + if (i == dst_size) { free(buff); return cb_build_method_call_3("fillBytes", cb_build_cast_address(dst), cb_int(bbyte), cb_build_cast_length(dst)); } return cb_build_method_call_3("setBytes", cb_build_cast_address(dst), - cb_build_string(buff, f->size), + cb_build_string(buff, dst_size), cb_build_cast_length(dst)); } else if (cb_fits_int(src) && f->size <= 8 && (f->usage == CB_USAGE_BINARY || f->usage == CB_USAGE_COMP_5 || diff --git a/configure b/configure index 199f2538..c204c6ef 100755 --- a/configure +++ b/configure @@ -22834,7 +22834,7 @@ esac if test "`basename $CC`" = "gcc" then - CFLAGS="$CFLAGS -fsigned-char -Wall -Wwrite-strings -Wmissing-prototypes -Wno-format-security" + CFLAGS="$CFLAGS -fsigned-char -Wall -Wwrite-strings -Wmissing-prototypes -Wno-format-security -Wno-parentheses" fi if test "x$lt_cv_dlopen_self" != "xyes" diff --git a/configure.ac b/configure.ac index 59c3756f..f8edc10a 100644 --- a/configure.ac +++ b/configure.ac @@ -407,7 +407,7 @@ esac if test "`basename $CC`" = "gcc" then - CFLAGS="$CFLAGS -fsigned-char -Wall -Wwrite-strings -Wmissing-prototypes -Wno-format-security" + CFLAGS="$CFLAGS -fsigned-char -Wall -Wwrite-strings -Wmissing-prototypes -Wno-format-security -Wno-parentheses" fi if test "x$lt_cv_dlopen_self" != "xyes" diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/call/CobolSystemRoutine.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/call/CobolSystemRoutine.java index 6c421c14..e8a9a773 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/call/CobolSystemRoutine.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/call/CobolSystemRoutine.java @@ -72,7 +72,7 @@ public static int CBL_ERROR_PROC(CobolDataStorage x, CobolDataStorage pptr) { */ public static int SYSTEM(CobolDataStorage cmd) throws CobolStopRunException { int size = SYSTEM_getParameterSize(); - String cmdStr = new String(cmd.getByteArray(0, size)); + String cmdStr = new String(cmd.getByteArray(0, size), AbstractCobolField.charSetSJIS); return SYSTEM_main(cmdStr); } @@ -696,7 +696,10 @@ public static int CBL_TOLOWER(CobolDataStorage data, int length) { for (int n = 0; n < length; ++n) { byte b = data.getByte(n); byte[] bytes = {b}; - byte result = new String(bytes).toLowerCase().getBytes()[0]; + byte result = + new String(bytes, AbstractCobolField.charSetSJIS) + .toLowerCase() + .getBytes(AbstractCobolField.charSetSJIS)[0]; data.setByte(n, result); } return 0; @@ -729,7 +732,10 @@ public static int CBL_TOUPPER(CobolDataStorage data, int length) { for (int n = 0; n < length; ++n) { byte b = data.getByte(n); byte[] bytes = {b}; - byte result = new String(bytes).toUpperCase().getBytes()[0]; + byte result = + new String(bytes, AbstractCobolField.charSetSJIS) + .toUpperCase() + .getBytes(AbstractCobolField.charSetSJIS)[0]; data.setByte(n, result); } return 0; @@ -871,7 +877,7 @@ private static int listDirNext( Path filePath = dirList.get(0); dirList.remove(0); - byte[] filePathBytes = filePath.toString().getBytes(); + byte[] filePathBytes = filePath.toString().getBytes(AbstractCobolField.charSetSJIS); int filePathStringLength = filePathBytes.length; int copySize = Math.min(fieldSize, filePathStringLength); storage.memcpy(filePathBytes, copySize); diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolInspect.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolInspect.java index 00c13114..d540d9f3 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolInspect.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolInspect.java @@ -223,7 +223,9 @@ public static void before(AbstractCobolField str) { n = n * 10 + (b >= 0x70 ? b - 0x70 : b - 0x30); fig++; } - p2 = new CobolDataStorage(String.format("%d", n).getBytes()); + p2 = + new CobolDataStorage( + String.format("%d", n).getBytes(AbstractCobolField.charSetSJIS)); break; default: fig = str.getSize(); diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolIntrinsic.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolIntrinsic.java index c3af28ff..6fa42814 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolIntrinsic.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolIntrinsic.java @@ -52,7 +52,7 @@ public class CobolIntrinsic { private static AbstractCobolField[] calcField = new AbstractCobolField[DEPTH_LEVEL]; private static Random random = new Random(); private static byte[] localeBuff; - private static final byte[] byteArray00 = "00".getBytes(); + private static final byte[] byteArray00 = "00".getBytes(AbstractCobolField.charSetSJIS); /** libcob/intrinsicのmake_double_entryの実装 */ private static void makeDoubleEntry() { @@ -416,7 +416,7 @@ public static AbstractCobolField funcCurrentDate(int offset, int length) { CobolUtil.cal.get(Calendar.MINUTE), CobolUtil.cal.get(Calendar.SECOND), CobolUtil.cal.get(Calendar.MILLISECOND) / 10); - currField.getDataStorage().memcpy(dateString.getBytes()); + currField.getDataStorage().memcpy(dateString.getBytes(AbstractCobolField.charSetSJIS)); if (offset > 0) { calcRefMod(currField, offset, length); @@ -514,7 +514,7 @@ public static AbstractCobolField funcDateOfInteger(AbstractCobolField srcdays) { } } String dateString = String.format("%04d%02d%02d", baseyear, i, days); - currField.getDataStorage().memcpy(dateString.getBytes()); + currField.getDataStorage().memcpy(dateString.getBytes(AbstractCobolField.charSetSJIS)); return currField; } @@ -554,7 +554,7 @@ public static AbstractCobolField funcDayOfInteger(AbstractCobolField srcdays) { } } String dateString = String.format("%04d%03d", baseyear, days); - currField.getDataStorage().memcpy(dateString.getBytes()); + currField.getDataStorage().memcpy(dateString.getBytes(AbstractCobolField.charSetSJIS)); return currField; } @@ -1905,7 +1905,7 @@ public static AbstractCobolField funcCombinedDatetime( return currField; } str = String.format("%7d%5d", srdays, srtime); - byte[] buff = str.getBytes(); + byte[] buff = str.getBytes(AbstractCobolField.charSetSJIS); for (int i = 0; i < buff.length; i++) { if (buff[i] == ' ') { buff[i] = '0'; @@ -2105,7 +2105,12 @@ public static AbstractCobolField funcExceptionFile() { makeFieldEntry(field); data = new byte[2 + flen]; System.arraycopy(CobolFile.errorFile.getFileStatus(), 0, data, 0, 2); - System.arraycopy(CobolFile.errorFile.getSelectName().getBytes(), 0, data, 2, flen); + System.arraycopy( + CobolFile.errorFile.getSelectName().getBytes(AbstractCobolField.charSetSJIS), + 0, + data, + 2, + flen); currField.setDataStorage(new CobolDataStorage(data)); } return currField; @@ -2162,7 +2167,7 @@ public static AbstractCobolField funcExceptionLocation() { CobolRuntimeException.getOrigProgramId(), CobolRuntimeException.getOrigLine()); } - localeBuff = buff.getBytes(); + localeBuff = buff.getBytes(AbstractCobolField.charSetSJIS); field.setSize(localeBuff.length); currField.setDataStorage(new CobolDataStorage(localeBuff)); return currField; @@ -2183,15 +2188,18 @@ public static AbstractCobolField funcExceptionStatement() { byte[] data; if (CobolRuntimeException.getExceptionCode() != 0 && CobolRuntimeException.getOrigStatement() != null) { - data = String.format("%-31s", CobolRuntimeException.getOrigStatement()).getBytes(); + data = + String.format("%-31s", CobolRuntimeException.getOrigStatement()) + .getBytes(AbstractCobolField.charSetSJIS); } else { - data = String.format("%-31s", "").getBytes(); + data = String.format("%-31s", "").getBytes(AbstractCobolField.charSetSJIS); } currField.setDataStorage(new CobolDataStorage(data)); return currField; } - private static final byte[] CONST_STRING_EXCEPTION_OBJECT = "EXCEPTION-OBJECT".getBytes(); + private static final byte[] CONST_STRING_EXCEPTION_OBJECT = + "EXCEPTION-OBJECT".getBytes(AbstractCobolField.charSetSJIS); // cob_intr_exception_statusの実装 /** @@ -2207,14 +2215,14 @@ public static AbstractCobolField funcExceptionStatus() { AbstractCobolField field = CobolFieldFactory.makeCobolField(31, (CobolDataStorage) null, attr); makeFieldEntry(field); - byte[] data = String.format("%-31s", "").getBytes(); + byte[] data = String.format("%-31s", "").getBytes(AbstractCobolField.charSetSJIS); currField.setDataStorage(new CobolDataStorage(data)); if (CobolRuntimeException.getExceptionCode() != 0) { try { exceptName = CobolRuntimeException.getExceptionName( CobolRuntimeException.getExceptionCode()) - .getBytes(); + .getBytes(AbstractCobolField.charSetSJIS); } catch (Exception e) { exceptName = CONST_STRING_EXCEPTION_OBJECT; } @@ -2282,22 +2290,34 @@ public static AbstractCobolField funcSecondsFromFormattedTime( CobolDataStorage valueData = value.getDataStorage(); for (n = 0; n < format.getSize() - 1; n++) { - p1 = new String(formatData.getByteArray(n, 2)); + p1 = new String(formatData.getByteArray(n, 2), AbstractCobolField.charSetSJIS); if ("hh".equals(p1) && !hoursSeen) { - p2 = Integer.parseInt(new String(valueData.getByteArray(n, 2))); + p2 = + Integer.parseInt( + new String( + valueData.getByteArray(n, 2), + AbstractCobolField.charSetSJIS)); hours = p2; hoursSeen = true; continue; } if ("mm".equals(p1) && !minutesSeen) { - p2 = Integer.parseInt(new String(valueData.getByteArray(n, 2))); + p2 = + Integer.parseInt( + new String( + valueData.getByteArray(n, 2), + AbstractCobolField.charSetSJIS)); minutes = p2; minutesSeen = true; continue; } if ("ss".equals(p1) && !secondsSeen) { - p2 = Integer.parseInt(new String(valueData.getByteArray(n, 2))); + p2 = + Integer.parseInt( + new String( + valueData.getByteArray(n, 2), + AbstractCobolField.charSetSJIS)); seconds = p2; secondsSeen = true; continue; @@ -2661,7 +2681,7 @@ public static AbstractCobolField funcLocaleDate( // Return the result field.setSize(dateString.length()); makeFieldEntry(field); - currField.getDataStorage().memcpy(dateString.getBytes()); + currField.getDataStorage().memcpy(dateString.getBytes(AbstractCobolField.charSetSJIS)); if (offset > 0) { calcRefMod(field, offset, length); } @@ -2761,7 +2781,7 @@ public static AbstractCobolField funcLocaleTime( // Return the result field.setSize(timeString.length()); makeFieldEntry(field); - currField.getDataStorage().memcpy(timeString.getBytes()); + currField.getDataStorage().memcpy(timeString.getBytes(AbstractCobolField.charSetSJIS)); if (offset > 0) { calcRefMod(field, offset, length); } @@ -2830,7 +2850,7 @@ public static AbstractCobolField funcLocaleTimeFromSeconds( // Return the result field.setSize(timeString.length()); makeFieldEntry(field); - currField.getDataStorage().memcpy(timeString.getBytes()); + currField.getDataStorage().memcpy(timeString.getBytes(AbstractCobolField.charSetSJIS)); if (offset > 0) { calcRefMod(field, offset, length); } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolUtil.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolUtil.java index 7f1546e9..5c67989b 100755 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolUtil.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/common/CobolUtil.java @@ -18,7 +18,6 @@ */ package jp.osscons.opensourcecobol.libcobj.common; -import java.io.UnsupportedEncodingException; import java.time.DateTimeException; import java.time.LocalDateTime; import java.util.Calendar; @@ -214,11 +213,8 @@ public static void cobCheckRefMod(int offset, long length, int size, byte[] name */ public static void cobCheckRefMod(int offset, long length, int size, byte[] name) throws CobolStopRunException { - try { - CobolUtil.cobCheckRefMod(offset, length, size, new String(name, "Shift_JIS")); - } catch (UnsupportedEncodingException e) { - CobolUtil.cobCheckRefMod(offset, length, size, ""); - } + CobolUtil.cobCheckRefMod( + offset, length, size, new String(name, AbstractCobolField.charSetSJIS)); } /** @@ -636,11 +632,7 @@ public static void setEnv(AbstractCobolField envVarName, AbstractCobolField envV * @return TODO: 準備中 */ public static byte[] stringToBytes(String s) { - try { - return s.getBytes("Shift_JIS"); - } catch (UnsupportedEncodingException e) { - return null; - } + return s.getBytes(AbstractCobolField.charSetSJIS); } /** diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/AbstractCobolField.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/AbstractCobolField.java index 9f28e2d6..251a7356 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/AbstractCobolField.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/AbstractCobolField.java @@ -1122,7 +1122,7 @@ public void memcpy(byte[] src) { * @param size TODO: 準備中 */ public void memcpy(String src, int size) { - byte[] bytes = src.getBytes(); + byte[] bytes = src.getBytes(AbstractCobolField.charSetSJIS); this.memcpy(bytes, size); } @@ -1132,7 +1132,7 @@ public void memcpy(String src, int size) { * @param src TODO: 準備中 */ public void memcpy(String src) { - this.memcpy(src.getBytes()); + this.memcpy(src.getBytes(AbstractCobolField.charSetSJIS)); } /** diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolAlphanumericEditedField.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolAlphanumericEditedField.java index bd833521..92bf3c7d 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolAlphanumericEditedField.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolAlphanumericEditedField.java @@ -124,7 +124,7 @@ public static void moveAlphanumToEdited(AbstractCobolField dst, AbstractCobolFie int max = src.getFieldSize(); int srcp = src.getFirstDataIndex(); int dstp = 0; - byte[] picBytes = dst.getAttribute().getPic().getBytes(); + byte[] picBytes = dst.getAttribute().getPic().getBytes(AbstractCobolField.charSetSJIS); final int sizeOfInt = 4; for (int p = 0; p < picBytes.length; ) { diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolAlphanumericField.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolAlphanumericField.java index e8519c29..c678ef52 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolAlphanumericField.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolAlphanumericField.java @@ -18,7 +18,6 @@ */ package jp.osscons.opensourcecobol.libcobj.data; -import java.io.UnsupportedEncodingException; import java.math.BigDecimal; import jp.osscons.opensourcecobol.libcobj.exceptions.CobolRuntimeException; @@ -44,11 +43,8 @@ public byte[] getBytes() { @Override public String getString() { - try { - return new String(dataStorage.getByteArray(0, this.getSize()), "SJIS"); - } catch (UnsupportedEncodingException e) { - return ""; - } + return new String( + dataStorage.getByteArray(0, this.getSize()), AbstractCobolField.charSetSJIS); } @Override @@ -183,19 +179,15 @@ public void moveFrom(byte[] bytes) { @Override public void moveFrom(String string) { - try { - byte[] bytes = string.getBytes("SJIS"); - int length = Math.min(bytes.length, this.getSize()); - CobolDataStorage data = this.getDataStorage(); - // ' '埋め - for (int i = 0; i < this.getSize(); ++i) { - data.setByte(i, (byte) 0x20); - } - for (int i = 0; i < length; ++i) { - data.setByte(i, bytes[i]); - } - } catch (UnsupportedEncodingException e) { - return; + byte[] bytes = string.getBytes(AbstractCobolField.charSetSJIS); + int length = Math.min(bytes.length, this.getSize()); + CobolDataStorage data = this.getDataStorage(); + // ' '埋め + for (int i = 0; i < this.getSize(); ++i) { + data.setByte(i, (byte) 0x20); + } + for (int i = 0; i < length; ++i) { + data.setByte(i, bytes[i]); } } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolDataStorage.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolDataStorage.java index d69ba6fa..dff54357 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolDataStorage.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolDataStorage.java @@ -18,7 +18,6 @@ */ package jp.osscons.opensourcecobol.libcobj.data; -import java.io.UnsupportedEncodingException; import java.nio.ByteBuffer; import java.nio.ByteOrder; import jp.osscons.opensourcecobol.libcobj.common.CobolModule; @@ -180,7 +179,7 @@ public static CobolDataStorage primitiveToDataStorage(String s) { */ public CobolDataStorage(String str) { try { - byte[] bytes = str.getBytes("SHIFT-JIS"); + byte[] bytes = str.getBytes(AbstractCobolField.charSetSJIS); this.data = bytes; this.index = 0; } catch (Exception e) { @@ -269,11 +268,7 @@ public void memcpy(byte[] buf, int size) { * @param size TODO: 準備中 */ public void memcpy(String str, int size) { - try { - this.memcpy(str.getBytes("SJIS"), size); - } catch (UnsupportedEncodingException e) { - this.memcpy(str.getBytes(), size); - } + this.memcpy(str.getBytes(AbstractCobolField.charSetSJIS), size); } /** @@ -394,7 +389,7 @@ public int memcmp(byte[] buf, int size) { * @return TODO: 準備中 */ public int memcmp(String buf, int size) { - return this.memcmp(buf.getBytes(), size); + return this.memcmp(buf.getBytes(AbstractCobolField.charSetSJIS), size); } /** @@ -611,6 +606,23 @@ public void setBytes(byte[] bytes) { } } + /** + * TODO: 準備中 + * + * @param bytes コピー元のバイト配列 + * @param length コピーする最大バイト数 + */ + public void setByByteArrayAndPaddingSpaces(byte[] bytes, int length) { + int copyLength = Math.min(bytes.length, length); + int i; + for (i = 0; i < copyLength; ++i) { + this.setByte(i, bytes[i]); + } + for (; i < length; ++i) { + this.setByte(i, (byte) ' '); + } + } + /** * TODO: 準備中 * @@ -644,7 +656,7 @@ public void setBytes(int index, byte[] bytes, int length) { */ public void setBytes(String str, int length) { try { - this.setBytes(str.getBytes("SHIFT-JIS"), length); + this.setBytes(str.getBytes(AbstractCobolField.charSetSJIS), length); } catch (Exception e) { e.printStackTrace(); } @@ -693,7 +705,7 @@ public void setBytes(CobolDataStorage data, int length, int dstIndex, int srcInd public void setString(String str) { this.fillBytes((byte) 0x20, this.data.length); try { - this.setBytes(str.getBytes("SHIFT-JIS")); + this.setBytes(str.getBytes(AbstractCobolField.charSetSJIS)); } catch (Exception e) { e.printStackTrace(); } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolDecimal.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolDecimal.java index a5f32b07..95e4be1d 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolDecimal.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolDecimal.java @@ -579,7 +579,7 @@ public int getDisplayField(AbstractCobolField f, int opt) throws CobolStopRunExc String numString = this.value.toPlainString(); int dPointIndex = numString.indexOf('.'); numString = numString.replace(".", ""); - byte[] numBuffPtr = numString.getBytes(); + byte[] numBuffPtr = numString.getBytes(AbstractCobolField.charSetSJIS); if (dPointIndex < 0) { dPointIndex = numBuffPtr.length; } @@ -626,7 +626,7 @@ public int getPackedField(AbstractCobolField f, int opt) { String numString = this.value.toPlainString(); int dPointIndex = numString.indexOf('.'); numString = numString.replace(".", ""); - byte[] numBuffPtr = numString.getBytes(); + byte[] numBuffPtr = numString.getBytes(AbstractCobolField.charSetSJIS); if (dPointIndex < 0) { dPointIndex = numBuffPtr.length; } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolFieldFactory.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolFieldFactory.java index f341163d..51ee6933 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolFieldFactory.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolFieldFactory.java @@ -18,7 +18,6 @@ */ package jp.osscons.opensourcecobol.libcobj.data; -import java.io.UnsupportedEncodingException; import jp.osscons.opensourcecobol.libcobj.exceptions.CobolRuntimeException; /** AbstractCobolFieldのサブクラスを生成するためのメソッドを定義するクラス */ @@ -51,6 +50,18 @@ public static AbstractCobolField makeCobolField( return CobolFieldFactory.makeCobolField(size, new CobolDataStorage(bytes), attr); } + /** + * TODO: 準備中 + * + * @param size TODO: 準備中 + * @param bytes TODO: 準備中 + * @param attr TODO: 準備中 + * @return TODO: 準備中 + */ + public static AbstractCobolField makeCobolField(byte[] bytes, CobolFieldAttribute attr) { + return CobolFieldFactory.makeCobolField(bytes.length, new CobolDataStorage(bytes), attr); + } + /** * 引数に応じて適切なAbstractCobolFieldクラスのサブクラスを生成する。 * 特にattrに設定された値に応じて適切なAbstractCobolFieldのサブクラスのインスタンスを生成する。 @@ -113,11 +124,7 @@ public static AbstractCobolField makeCobolField( */ public static AbstractCobolField makeCobolField(String str) { byte[] bytes; - try { - bytes = str.getBytes("SJIS"); - } catch (UnsupportedEncodingException e) { - return null; - } + bytes = str.getBytes(AbstractCobolField.charSetSJIS); CobolFieldAttribute attr = new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 0, 0, 0, null); return new CobolAlphanumericField(bytes.length, new CobolDataStorage(bytes), attr); diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolGroupField.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolGroupField.java index 3ea6f26d..a9172d10 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolGroupField.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolGroupField.java @@ -18,7 +18,6 @@ */ package jp.osscons.opensourcecobol.libcobj.data; -import java.io.UnsupportedEncodingException; import java.math.BigDecimal; import jp.osscons.opensourcecobol.libcobj.exceptions.CobolRuntimeException; @@ -43,11 +42,7 @@ public byte[] getBytes() { @Override public String getString() { - try { - return new String(dataStorage.getData(), "SJIS"); - } catch (UnsupportedEncodingException e) { - return ""; - } + return new String(dataStorage.getData(), AbstractCobolField.charSetSJIS); } @Override @@ -89,11 +84,7 @@ public void moveFrom(byte[] bytes) { @Override public void moveFrom(String string) { byte[] bytes; - try { - bytes = string.getBytes("SJIS"); - } catch (UnsupportedEncodingException e) { - return; - } + bytes = string.getBytes(AbstractCobolField.charSetSJIS); this.moveFrom(bytes); } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNationalEditedField.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNationalEditedField.java index 3ba8cb2a..d832f73c 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNationalEditedField.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNationalEditedField.java @@ -93,7 +93,7 @@ private void moveAlphanumToNationalEdited(AbstractCobolField src) { final int sizeOfInt = 4; - byte[] picBytes = this.getAttribute().getPic().getBytes(); + byte[] picBytes = this.getAttribute().getPic().getBytes(AbstractCobolField.charSetSJIS); for (int p = 0; p < picBytes.length; ) { byte c = picBytes[p++]; ByteBuffer buf = ByteBuffer.wrap(picBytes, p, sizeOfInt); diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNationalField.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNationalField.java index 1025e3ad..95c8de22 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNationalField.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNationalField.java @@ -18,7 +18,6 @@ */ package jp.osscons.opensourcecobol.libcobj.data; -import java.io.UnsupportedEncodingException; import java.math.BigDecimal; import jp.osscons.opensourcecobol.libcobj.exceptions.CobolRuntimeException; @@ -47,11 +46,7 @@ public byte[] getBytes() { @Override public String getString() { - try { - return new String(dataStorage.getData(), "SJIS"); - } catch (UnsupportedEncodingException e) { - return ""; - } + return new String(dataStorage.getData(), AbstractCobolField.charSetSJIS); } @Override @@ -1045,17 +1040,12 @@ public void moveFrom(byte[] bytes) { @Override public void moveFrom(String string) { - try { - byte[] bytes = string.getBytes("SJIS"); - CobolDataStorage data = new CobolDataStorage(bytes); - CobolFieldAttribute a = - new CobolFieldAttribute( - CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 0, 0, 0, null); - CobolAlphanumericField f = new CobolAlphanumericField(bytes.length, data, a); - this.moveFrom(f); - } catch (UnsupportedEncodingException e) { - return; - } + byte[] bytes = string.getBytes(AbstractCobolField.charSetSJIS); + CobolDataStorage data = new CobolDataStorage(bytes); + CobolFieldAttribute a = + new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_ALPHANUMERIC, 0, 0, 0, null); + CobolAlphanumericField f = new CobolAlphanumericField(bytes.length, data, a); + this.moveFrom(f); } @Override diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericEditedField.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericEditedField.java index ad0566bb..4e26f04c 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericEditedField.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericEditedField.java @@ -92,7 +92,7 @@ private static void moveDisplayToEdited(AbstractCobolField dst, AbstractCobolFie int sign = src.getSign(); src.putSign(+1); boolean neg = sign < 0; - byte[] picBytes = dst.getAttribute().getPic().getBytes(); + byte[] picBytes = dst.getAttribute().getPic().getBytes(AbstractCobolField.charSetSJIS); int count = 0; int countSign = 1; int countCurr = 1; diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericField.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericField.java index b05705b0..3f2b37cb 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericField.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericField.java @@ -18,7 +18,6 @@ */ package jp.osscons.opensourcecobol.libcobj.data; -import java.io.UnsupportedEncodingException; import java.math.BigDecimal; import java.nio.ByteBuffer; import java.nio.ByteOrder; @@ -163,7 +162,7 @@ public int getInt() { @Override public void setDecimal(BigDecimal decimal) { - byte[] decimalBytes = decimal.toPlainString().getBytes(); + byte[] decimalBytes = decimal.toPlainString().getBytes(AbstractCobolField.charSetSJIS); int length = Math.min(this.size, decimalBytes.length); for (int i = 0; i < length; ++i) { @@ -427,7 +426,7 @@ private void moveEditedToDisplay(AbstractCobolField field) { } } - byte[] picBytes = field.getAttribute().getPic().getBytes(); + byte[] picBytes = field.getAttribute().getPic().getBytes(AbstractCobolField.charSetSJIS); int count = 0; if (scale == 0) { for (int p1 = 0; p1 < picBytes.length; p1 += 5) { @@ -588,11 +587,7 @@ public void moveFrom(byte[] bytes) { @Override public void moveFrom(String string) { - try { - this.dataStorage.setData(string.getBytes("SJIS")); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } + this.dataStorage.setData(string.getBytes(AbstractCobolField.charSetSJIS)); } @Override diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericPackedField.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericPackedField.java index 122a0fd2..e55c62b2 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericPackedField.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericPackedField.java @@ -18,7 +18,6 @@ */ package jp.osscons.opensourcecobol.libcobj.data; -import java.io.UnsupportedEncodingException; import java.math.BigDecimal; import jp.osscons.opensourcecobol.libcobj.exceptions.CobolRuntimeException; @@ -186,7 +185,7 @@ public String getString() { @Override public void setDecimal(BigDecimal decimal) { - byte[] decimalBytes = decimal.toPlainString().getBytes(); + byte[] decimalBytes = decimal.toPlainString().getBytes(AbstractCobolField.charSetSJIS); int length = Math.min(this.size, decimalBytes.length); for (int i = 0; i < length; ++i) { @@ -308,11 +307,7 @@ public void moveFrom(byte[] bytes) { @Override public void moveFrom(String string) { - try { - this.dataStorage.setData(string.getBytes("SJIS")); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } + this.dataStorage.setData(string.getBytes(AbstractCobolField.charSetSJIS)); } @Override diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolFile.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolFile.java index 69550d21..9877b5b4 100755 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolFile.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/file/CobolFile.java @@ -961,7 +961,7 @@ public void open(int mode, int sharing, AbstractCobolField fnstatus) { byte[] dst; boolean simple; if (CobolModule.getCurrentModule().flag_filename_mapping != 0) { - src = file_open_name.getBytes(); + src = file_open_name.getBytes(AbstractCobolField.charSetSJIS); dst = file_open_buff; simple = true; int srcI = 0; @@ -985,9 +985,11 @@ public void open(int mode, int sharing, AbstractCobolField fnstatus) { file_open_env[i - 1] = 0; String p = CobolUtil.getEnv( - new String(Arrays.copyOfRange(file_open_env, 0, i - 1))); + new String( + Arrays.copyOfRange(file_open_env, 0, i - 1), + AbstractCobolField.charSetSJIS)); if (p != null) { - byte[] pbytes = p.getBytes(); + byte[] pbytes = p.getBytes(AbstractCobolField.charSetSJIS); for (int j = 0; j < pbytes.length; ++j) { dst[dstI + j] = pbytes[j]; } @@ -999,30 +1001,36 @@ public void open(int mode, int sharing, AbstractCobolField fnstatus) { } } - file_open_name = new String(Arrays.copyOfRange(dst, 0, dstI)); + file_open_name = + new String(Arrays.copyOfRange(dst, 0, dstI), AbstractCobolField.charSetSJIS); - byte[] fileOpenNameBytes = file_open_name.getBytes(); + byte[] fileOpenNameBytes = file_open_name.getBytes(AbstractCobolField.charSetSJIS); cb_get_jisword_buff(file_open_buff, fileOpenNameBytes, COB_SMALL_BUFF); if (simple) { int i; for (i = 0; i < NUM_PREFIX; i++) { - byte[] fileOpenBuff = concatString(prefix[i], file_open_name).getBytes(); - String p = CobolUtil.getEnv(new String(fileOpenBuff)); + byte[] fileOpenBuff = + concatString(prefix[i], file_open_name) + .getBytes(AbstractCobolField.charSetSJIS); + String p = + CobolUtil.getEnv( + new String(fileOpenBuff, AbstractCobolField.charSetSJIS)); if (p != null) { - fileOpenNameBytes = p.getBytes(); + fileOpenNameBytes = p.getBytes(AbstractCobolField.charSetSJIS); break; } } if (i == NUM_PREFIX && cob_file_path != null) { byte[] fileOpenBuff = - concatString(cob_file_path, "/", file_open_name).getBytes(); + concatString(cob_file_path, "/", file_open_name) + .getBytes(AbstractCobolField.charSetSJIS); fileOpenNameBytes = fileOpenBuff; } } - file_open_name = new String(fileOpenNameBytes); + file_open_name = new String(fileOpenNameBytes, AbstractCobolField.charSetSJIS); } boolean wasNotExist = false; @@ -1376,7 +1384,7 @@ public void read(AbstractCobolField key, AbstractCobolField fnstatus, int readOp for (int i = 0; i < 2; ++i) { sbuff[i] = fnstatus.getDataStorage().getByte(i); } - int status = Integer.parseInt(new String(sbuff)); + int status = Integer.parseInt(new String(sbuff, AbstractCobolField.charSetSJIS)); saveStatus(status, fnstatus); return; } @@ -1962,7 +1970,7 @@ public void cob_delete_file(AbstractCobolField fnstatus) { byte[] dst; boolean simple; if (CobolModule.getCurrentModule().flag_filename_mapping != 0) { - src = file_open_name.getBytes(); + src = file_open_name.getBytes(AbstractCobolField.charSetSJIS); dst = file_open_buff; simple = true; int srcI = 0; @@ -1986,9 +1994,11 @@ public void cob_delete_file(AbstractCobolField fnstatus) { file_open_env[i - 1] = 0; String p = CobolUtil.getEnv( - new String(Arrays.copyOfRange(file_open_env, 0, i - 1))); + new String( + Arrays.copyOfRange(file_open_env, 0, i - 1), + AbstractCobolField.charSetSJIS)); if (p != null) { - byte[] pbytes = p.getBytes(); + byte[] pbytes = p.getBytes(AbstractCobolField.charSetSJIS); for (int j = 0; j < pbytes.length; ++j) { dst[dstI + j] = pbytes[j]; } @@ -2000,30 +2010,36 @@ public void cob_delete_file(AbstractCobolField fnstatus) { } } - file_open_name = new String(Arrays.copyOfRange(dst, 0, dstI)); + file_open_name = + new String(Arrays.copyOfRange(dst, 0, dstI), AbstractCobolField.charSetSJIS); - byte[] fileOpenNameBytes = file_open_name.getBytes(); + byte[] fileOpenNameBytes = file_open_name.getBytes(AbstractCobolField.charSetSJIS); cb_get_jisword_buff(file_open_buff, fileOpenNameBytes, COB_SMALL_BUFF); if (simple) { int i; for (i = 0; i < NUM_PREFIX; i++) { - byte[] fileOpenBuff = concatString(prefix[i], file_open_name).getBytes(); - String p = CobolUtil.getEnv(new String(fileOpenBuff)); + byte[] fileOpenBuff = + concatString(prefix[i], file_open_name) + .getBytes(AbstractCobolField.charSetSJIS); + String p = + CobolUtil.getEnv( + new String(fileOpenBuff, AbstractCobolField.charSetSJIS)); if (p != null) { - fileOpenNameBytes = p.getBytes(); + fileOpenNameBytes = p.getBytes(AbstractCobolField.charSetSJIS); break; } } if (i == NUM_PREFIX && cob_file_path != null) { byte[] fileOpenBuff = - concatString(cob_file_path, "/", file_open_name).getBytes(); + concatString(cob_file_path, "/", file_open_name) + .getBytes(AbstractCobolField.charSetSJIS); fileOpenNameBytes = fileOpenBuff; } } - file_open_name = new String(fileOpenNameBytes); + file_open_name = new String(fileOpenNameBytes, AbstractCobolField.charSetSJIS); } Path filePath; diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/IndexedFileUtilMain.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/IndexedFileUtilMain.java index 5e84d4af..2c394ab4 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/IndexedFileUtilMain.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/IndexedFileUtilMain.java @@ -508,7 +508,7 @@ private static Optional createCobolFileFromIndexedFilePath(String ind // Construct a CobolFile instance byte[] fileStatus = new byte[4]; - byte[] indxedFilePathBytes = indexedFilePath.getBytes(); + byte[] indxedFilePathBytes = indexedFilePath.getBytes(AbstractCobolField.charSetSJIS); AbstractCobolField assignField = CobolFieldFactory.makeCobolField( indxedFilePathBytes.length, diff --git a/tests/Makefile.am b/tests/Makefile.am index 60a44e3a..51a5de03 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -26,7 +26,7 @@ TESTS = syntax \ run-O \ data-rep \ data-rep-O \ - i18n_utf8 \ + cobol_utf8 \ jp-compat \ command-line-options \ cobj-idx \ @@ -109,6 +109,22 @@ i18n_sjis_DEPENDENCIES = \ i18n_sjis.src/national.at \ i18n_sjis.src/mb-space.at +cobol_utf8_DEPENDENCIES = \ + cobol_utf8.at \ + cobol_utf8.src/user-defined-word.at \ + cobol_utf8.src/pic-x.at \ + cobol_utf8.src/pic-n.at \ + cobol_utf8.src/program-id.at \ + cobol_utf8.src/error-print.at \ + cobol_utf8.src/limits.at \ + cobol_utf8.src/national.at \ + cobol_utf8.src/mb-space.at \ + cobol_utf8.src/compare-national-diff-size.at \ + cobol_utf8.src/compare-national.at \ + cobol_utf8.src/file-handler-japanese.at \ + cobol_utf8.src/japanese-char-section-var.at \ + cobol_utf8.src/java-interface.at + jp_compat_DEPENDENCIES = \ jp-compat.at \ jp-compat.src/split-keys.at \ @@ -264,6 +280,7 @@ $(srcdir)/syntax: $(syntax_DEPENDENCIES) $(srcdir)/run: $(run_DEPENDENCIES) $(srcdir)/data-rep: $(data_rep_DEPENDENCIES) $(srcdir)/i18n_utf8: $(i18n_utf8_DEPENDENCIES) +$(srcdir)/cobol_utf8: $(cobol_utf8_DEPENDENCIES) $(srcdir)/i18n_sjis: $(i18n_sjis_DEPENDENCIES) $(srcdir)/jp-compat: $(jp_compat_DEPENDENCIES) $(srcdir)/command-line-options: $(command_line_options_DEPENDENCIES) diff --git a/tests/Makefile.in b/tests/Makefile.in index 377dde6a..ee116d8d 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -577,7 +577,7 @@ SUBDIRS = cobol85 @I18N_UTF8_TRUE@ run-O \ @I18N_UTF8_TRUE@ data-rep \ @I18N_UTF8_TRUE@ data-rep-O \ -@I18N_UTF8_TRUE@ i18n_utf8 \ +@I18N_UTF8_TRUE@ cobol_utf8 \ @I18N_UTF8_TRUE@ jp-compat \ @I18N_UTF8_TRUE@ command-line-options \ @I18N_UTF8_TRUE@ cobj-idx \ @@ -648,6 +648,22 @@ i18n_sjis_DEPENDENCIES = \ i18n_sjis.src/national.at \ i18n_sjis.src/mb-space.at +cobol_utf8_DEPENDENCIES = \ + cobol_utf8.at \ + cobol_utf8.src/user-defined-word.at \ + cobol_utf8.src/pic-x.at \ + cobol_utf8.src/pic-n.at \ + cobol_utf8.src/program-id.at \ + cobol_utf8.src/error-print.at \ + cobol_utf8.src/limits.at \ + cobol_utf8.src/national.at \ + cobol_utf8.src/mb-space.at \ + cobol_utf8.src/compare-national-diff-size.at \ + cobol_utf8.src/compare-national.at \ + cobol_utf8.src/file-handler-japanese.at \ + cobol_utf8.src/japanese-char-section-var.at \ + cobol_utf8.src/java-interface.at + jp_compat_DEPENDENCIES = \ jp-compat.at \ jp-compat.src/split-keys.at \ @@ -1130,9 +1146,9 @@ misc.log: misc --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) -i18n_utf8.log: i18n_utf8 - @p='i18n_utf8'; \ - b='i18n_utf8'; \ +cobol_utf8.log: cobol_utf8 + @p='cobol_utf8'; \ + b='cobol_utf8'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ @@ -1359,6 +1375,7 @@ $(srcdir)/syntax: $(syntax_DEPENDENCIES) $(srcdir)/run: $(run_DEPENDENCIES) $(srcdir)/data-rep: $(data_rep_DEPENDENCIES) $(srcdir)/i18n_utf8: $(i18n_utf8_DEPENDENCIES) +$(srcdir)/cobol_utf8: $(cobol_utf8_DEPENDENCIES) $(srcdir)/i18n_sjis: $(i18n_sjis_DEPENDENCIES) $(srcdir)/jp-compat: $(jp_compat_DEPENDENCIES) $(srcdir)/command-line-options: $(command_line_options_DEPENDENCIES) diff --git a/tests/a.sh b/tests/a.sh new file mode 100644 index 00000000..3453fc86 --- /dev/null +++ b/tests/a.sh @@ -0,0 +1,15 @@ +LANG=C.utf8 \ +LC_CTYPE="C.utf8" \ +LC_NUMERIC="C.utf8" \ +LC_TIME="C.utf8" \ +LC_COLLATE="C.utf8" \ +LC_MONETARY="C.utf8" \ +LC_MESSAGES="C.utf8" \ +LC_PAPER="C.utf8" \ +LC_NAME="C.utf8" \ +LC_ADDRESS="C.utf8" \ +LC_TELEPHONE="C.utf8" \ +LC_MEASUREMENT="C.utf8" \ +LC_IDENTIFICATION="C.utf8" \ +LC_ALL="" \ +./cobol_utf8 \ No newline at end of file diff --git a/tests/a.txt b/tests/a.txt new file mode 100644 index 00000000..05009d66 --- /dev/null +++ b/tests/a.txt @@ -0,0 +1 @@ +���{�� diff --git a/tests/cobol_utf8.at b/tests/cobol_utf8.at new file mode 100644 index 00000000..fca53cf8 --- /dev/null +++ b/tests/cobol_utf8.at @@ -0,0 +1,37 @@ +### OpenCOBOL Test Suite -*- m4 -*- + +# Copyright (C) 2003-2009 Keisuke Nishida +# Copyright (C) 2007-2009 Roger While +# Copyright (C) 2021-2022 TOKYO SYSTEM HOUSE Co., Ltd. +# +# 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, 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 software; see the file COPYING. If not, write to +# the Free Software Foundation, 51 Franklin Street, Fifth Floor +# Boston, MA 02110-1301 USA + +AT_INIT([I18n Shift_JIS Tests]) + +m4_include([user-defined-word.at]) +m4_include([pic-x.at]) +m4_include([pic-n.at]) +m4_include([program-id.at]) +m4_include([error-print.at]) +m4_include([limits.at]) +m4_include([national.at]) +m4_include([mb-space.at]) + +m4_include([compare-national-diff-size.at]) +m4_include([compare-national.at]) +m4_include([file-handler-japanese.at]) +m4_include([japanese-char-section-var.at]) +m4_include([java-interface.at]) diff --git a/tests/cobol_utf8.src/compare-national-diff-size.at b/tests/cobol_utf8.src/compare-national-diff-size.at new file mode 100644 index 00000000..063768fb --- /dev/null +++ b/tests/cobol_utf8.src/compare-national-diff-size.at @@ -0,0 +1,55 @@ +AT_SETUP([Compare national of different sizes]) +export LC_ALL='' + +AT_DATA([prog.cbl],[ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + ENVIRONMENT DIVISION. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 WK-STR1-1 PIC N(04) value "猫". + 01 WK-STR1-2 PIC N(02) value "猫". + 01 WK-STR2-1 PIC N(04) value "猫犬". + 01 WK-STR2-2 PIC N(02) value "猫犬". + 01 WK-STR3-1 PIC N(04). + 01 WK-STR3-2 PIC N(02). + 01 WK-STR4-1 PIC N(04) VALUE SPACE. + 01 WK-STR4-2 PIC N(02) VALUE SPACE. + 01 WK-STR5-1 PIC N(100) value "猫". + 01 WK-STR5-2 PIC N(1) value "猫". + PROCEDURE DIVISION. + IF WK-STR1-1 NOT = WK-STR1-2 + DISPLAY "NG" + END-IF. + IF WK-STR1-2 NOT = WK-STR1-1 + DISPLAY "NG" + END-IF. + IF WK-STR2-1 NOT = WK-STR2-2 + DISPLAY "NG" + END-IF. + IF WK-STR2-2 NOT = WK-STR2-1 + DISPLAY "NG" + END-IF. + IF WK-STR3-1 NOT = WK-STR3-2 + DISPLAY "NG" + END-IF. + IF WK-STR3-2 NOT = WK-STR3-1 + DISPLAY "NG" + END-IF. + IF WK-STR4-1 NOT = WK-STR4-2 + DISPLAY "NG" + END-IF. + IF WK-STR4-2 NOT = WK-STR4-1 + DISPLAY "NG" + END-IF. + IF WK-STR5-1 NOT = WK-STR5-2 + DISPLAY "NG" + END-IF. + IF WK-STR5-2 NOT = WK-STR5-1 + DISPLAY "NG" + END-IF. +]) +AT_CHECK([cobj prog.cbl]) +AT_CHECK([java prog]) + +AT_CLEANUP diff --git a/tests/cobol_utf8.src/compare-national.at b/tests/cobol_utf8.src/compare-national.at new file mode 100644 index 00000000..3c3d19bf --- /dev/null +++ b/tests/cobol_utf8.src/compare-national.at @@ -0,0 +1,44 @@ +AT_SETUP([compare national]) +export LC_ALL='' + +AT_DATA([prog.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 A PIC N VALUE N"あ". + 01 I PIC N VALUE N"い". + 01 X1 PIC N VALUE "丘". + 01 X2 PIC N VALUE "岡". + 01 X3 PIC N VALUE "花". + 01 X4 PIC N VALUE "鼻". + PROCEDURE DIVISION. + IF A = I + DISPLAY "A = I" + ELSE + DISPLAY "A != I" + END-IF. + + IF X1 = X2 + DISPLAY "X1 = X2" + ELSE + DISPLAY "X1 != X2" + END-IF. + + IF X3 = X4 + DISPLAY "X3 = X4" + ELSE + DISPLAY "X3 != X4" + END-IF. + + STOP RUN. +]) + +AT_CHECK([${COBJ} prog.cbl]) +AT_CHECK([${RUN_MODULE} prog], [0], +[A != I +X1 != X2 +X3 != X4 +]) + +AT_CLEANUP diff --git a/tests/cobol_utf8.src/error-print.at b/tests/cobol_utf8.src/error-print.at new file mode 100644 index 00000000..fe3f0718 --- /dev/null +++ b/tests/cobol_utf8.src/error-print.at @@ -0,0 +1,82 @@ +AT_SETUP([undefined not message]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + identification division. + program-id. prog. + data division. + working-storage section. + 01 wk-01. + 03 wk-02 pic x(2). + 03 wk−03 redefines wk-02 pic n(2). + 01 cnt pic 9(1). + procedure division. + inspect wk−03 tallying cnt + for characters before initial space. + stop run. +]) + +AT_CHECK([${COMPILE} -x prog.cob], [1], [], +[prog.cob:8: Error: Size of 'wk_03' larger than size of 'wk-02' +]) + +AT_CLEANUP + +AT_SETUP([Encoding alphanumeric name item]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + PROCEDURE DIVISION. + DISPLAY A___82A0___A. + STOP RUN. +]) + +AT_CHECK([${COMPILE} -x prog.cob], [1], [], +[prog.cob:6: Error: 'A___82A0___A' undefined +]) + +AT_CLEANUP + +AT_SETUP([Encoding national name item]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + PROCEDURE DIVISION. + DISPLAY A___あ___A. + STOP RUN. +]) + +AT_CHECK([${COMPILE} -x prog.cob], [1], [], +[prog.cob:6: Error: 'A___あ___A' undefined +]) + +AT_CLEANUP + +AT_SETUP([Decoding national section name]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + PROCEDURE DIVISION. + テスト SECTION. + MOVE 1 TO 項目1. + テスト段落. + MOVE 1 TO 項目2. +]) + +AT_CHECK([${COMPILE} -x prog.cob], [1], [], +[prog.cob: In section 'テスト': +prog.cob:7: Error: '項目1' undefined +prog.cob: In paragraph 'テスト段落': +prog.cob:9: Error: '項目2' undefined +]) + +AT_CLEANUP diff --git a/tests/cobol_utf8.src/file-handler-japanese.at b/tests/cobol_utf8.src/file-handler-japanese.at new file mode 100644 index 00000000..18a8b71f --- /dev/null +++ b/tests/cobol_utf8.src/file-handler-japanese.at @@ -0,0 +1,26 @@ +AT_SETUP([file-handler-japanese]) +export LC_ALL='' + +# This test verifies that Issue 539 is fixed. + +AT_DATA([prog.cbl], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + ENVIRONMENT DIVISION. + INPUT-OUTPUT SECTION. + FILE-CONTROL. + SELECT テストファイル + ORGANIZATION IS SEQUENTIAL. + DATA DIVISION. + FILE SECTION. + FD テストファイル. + 01 REC PIC X(10). + PROCEDURE DIVISION. + STOP RUN. +]) + +AT_CHECK([${COBJ} prog.cbl]) +AT_CHECK([grep 'h_テストファイル' prog.java > /dev/null]) +AT_CHECK([grep 'h_ウスエサァイル' prog.java], [1]) + +AT_CLEANUP \ No newline at end of file diff --git a/tests/cobol_utf8.src/japanese-char-section-var.at b/tests/cobol_utf8.src/japanese-char-section-var.at new file mode 100644 index 00000000..2fa32ec8 --- /dev/null +++ b/tests/cobol_utf8.src/japanese-char-section-var.at @@ -0,0 +1,48 @@ +AT_SETUP([japanese word section variable]) +export LC_ALL='' + +AT_DATA([prog.cbl], [ IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 新宿 PIC x(5) VALUE "00000". + 01 横浜−1 PIC x(5) VALUE "11111". + 01 甲府−2 PIC x(5) VALUE "22222". + 01 宇都宮1 PIC x(5) VALUE "33333". + 01 仙台2 PIC x(5) VALUE "44444". + PROCEDURE DIVISION. + 東京ラベル. + DISPLAY 新宿. + 神奈川−1ラベル. + DISPLAY 横浜−1. + 山梨−2ラベル. + DISPLAY 甲府−2. + 栃木1ラベル. + DISPLAY 宇都宮1. + 宮城2ラベル. + DISPLAY 仙台2. +]) + + +AT_CHECK([${COMPILE} prog.cbl]) +AT_CHECK([${RUN_MODULE} prog], [0], +[00000 +11111 +22222 +33333 +44444 +]) +AT_CHECK([cat prog.java | grep "新宿" > /dev/null]) +AT_CHECK([cat prog.java | grep "横浜_1" > /dev/null]) +AT_CHECK([cat prog.java | grep "甲府_2" > /dev/null]) +AT_CHECK([cat prog.java | grep "宇都宮1" > /dev/null]) +AT_CHECK([cat prog.java | grep "仙台2" > /dev/null]) + +AT_CHECK([cat prog.java | grep "東京ラベル" > /dev/null]) +AT_CHECK([cat prog.java | grep "神奈川_1ラベル" > /dev/null]) +AT_CHECK([cat prog.java | grep "山梨_2ラベル" > /dev/null]) +AT_CHECK([cat prog.java | grep "栃木1ラベル" > /dev/null]) +AT_CHECK([cat prog.java | grep "宮城2ラベル" > /dev/null]) + +AT_CLEANUP diff --git a/tests/cobol_utf8.src/java-interface.at b/tests/cobol_utf8.src/java-interface.at new file mode 100644 index 00000000..38f020e2 --- /dev/null +++ b/tests/cobol_utf8.src/java-interface.at @@ -0,0 +1,600 @@ +AT_SETUP([no-argument]) +export LC_ALL='' + +AT_DATA([b.cbl], [ + identification division. + program-id. b. + data division. + linkage section. + procedure division. + display " b". +]) + +AT_DATA([a.java], [ +import jp.osscons.opensourcecobol.libcobj.ui.*; +public class a { + public static void main(String@<:@@:>@ args) { + b prog = new b(); + CobolResultSet rs = prog.execute(); + } +} +]) + +AT_CHECK([cobj b.cbl]) +AT_CHECK([javac a.java]) +AT_CHECK([java a], [0], +[ b +]) + +AT_CLEANUP + +AT_SETUP([PIC 9(3)]) +export LC_ALL='' + +AT_DATA([b.cbl], [ + identification division. + program-id. b. + data division. + linkage section. + 01 arg pic 9(3). + procedure division using arg. + display " arg: " arg. + add 1 to arg. +]) + +AT_DATA([a.java], [ +import jp.osscons.opensourcecobol.libcobj.ui.*; +public class a { + public static void main(String@<:@@:>@ args) { + b prog = new b(); + CobolResultSet rs; + int@<:@@:>@ data_list = {0, 1, 2, 998}; + try{ + for(int data : data_list) { + rs = prog.execute(data); + System.out.println(" arg: " + rs.getInt(1)); + } + } catch(CobolResultSetException e) { + e.printStackTrace(); + } + } +} +]) + +AT_CHECK([cobj b.cbl]) +AT_CHECK([javac a.java]) +AT_CHECK([java a], [0], +[ arg: 000 + arg: 1 + arg: 001 + arg: 2 + arg: 002 + arg: 3 + arg: 998 + arg: 999 +]) + +AT_CLEANUP + +AT_SETUP([PIC S9(3)]) +export LC_ALL='' + +AT_DATA([b.cbl], [ + identification division. + program-id. b. + data division. + linkage section. + 01 arg pic S9(3). + procedure division using arg. + display " arg: " arg. + add 1 to arg. +]) + +AT_DATA([a.java], [ +import jp.osscons.opensourcecobol.libcobj.ui.*; +public class a { + public static void main(String@<:@@:>@ args) { + b prog = new b(); + CobolResultSet rs; + int@<:@@:>@ data_list = {-999, -2, -1, 0, 1, 2, 998}; + try{ + for(int data : data_list) { + rs = prog.execute(data); + System.out.println(" arg: " + rs.getInt(1)); + } + } catch(CobolResultSetException e) { + e.printStackTrace(); + } + } +} +]) + +AT_CHECK([cobj b.cbl]) +AT_CHECK([javac a.java]) +AT_CHECK([java a], [0], +[ arg: -999 + arg: -998 + arg: -002 + arg: -1 + arg: -001 + arg: 0 + arg: +000 + arg: 1 + arg: +001 + arg: 2 + arg: +002 + arg: 3 + arg: +998 + arg: 999 +]) + +AT_CLEANUP + +AT_SETUP([PIC S9(3)V99]) +export LC_ALL='' + +AT_DATA([b.cbl], [ + identification division. + program-id. b. + data division. + linkage section. + 01 arg pic S9(3)V99. + procedure division using arg. + display " arg: " arg. + add 1 to arg. +]) + +AT_DATA([a.java], [ +import jp.osscons.opensourcecobol.libcobj.ui.*; +public class a { + public static void main(String@<:@@:>@ args) { + b prog = new b(); + CobolResultSet rs; + double@<:@@:>@ data_list = {-999.99, -2.01, -1.01, -1.00, 0, 1.01, 2.01, 998.99}; + try{ + for(double data : data_list) { + rs = prog.execute(data); + System.out.println(" arg: " + rs.getDouble(1)); + } + } catch(CobolResultSetException e) { + e.printStackTrace(); + } + } +} +]) + +AT_CHECK([cobj b.cbl]) +AT_CHECK([javac a.java]) +AT_CHECK([java a], [0], +[ arg: -999.99 + arg: -998.99 + arg: -002.01 + arg: -1.01 + arg: -001.01 + arg: -0.01 + arg: -001.00 + arg: 0.0 + arg: +000.00 + arg: 1.0 + arg: +001.01 + arg: 2.01 + arg: +002.01 + arg: 3.01 + arg: +998.99 + arg: 999.99 +]) + +AT_CLEANUP + + +AT_SETUP([PIC 9(3) USAGE COMP-3]) +export LC_ALL='' + +AT_DATA([b.cbl], [ + identification division. + program-id. b. + data division. + linkage section. + 01 arg pic 9(3) USAGE COMP-3. + procedure division using arg. + display " arg: " arg. + add 1 to arg. +]) + +AT_DATA([a.java], [ +import jp.osscons.opensourcecobol.libcobj.ui.*; +public class a { + public static void main(String@<:@@:>@ args) { + b prog = new b(); + CobolResultSet rs; + int@<:@@:>@ data_list = {0, 1, 2, 998}; + try{ + for(int data : data_list) { + rs = prog.execute(data); + System.out.println(" arg: " + rs.getInt(1)); + } + } catch(CobolResultSetException e) { + e.printStackTrace(); + } + } +} +]) + +AT_CHECK([cobj b.cbl]) +AT_CHECK([javac a.java]) +AT_CHECK([java a], [0], +[ arg: 000 + arg: 1 + arg: 001 + arg: 2 + arg: 002 + arg: 3 + arg: 998 + arg: 999 +]) + +AT_CLEANUP + +AT_SETUP([PIC S9(3) USAGE COMP-3]) +export LC_ALL='' + +AT_DATA([b.cbl], [ + identification division. + program-id. b. + data division. + linkage section. + 01 arg pic S9(3) USAGE COMP-3. + procedure division using arg. + display " arg: " arg. + add 1 to arg. +]) + +AT_DATA([a.java], [ +import jp.osscons.opensourcecobol.libcobj.ui.*; +public class a { + public static void main(String@<:@@:>@ args) { + b prog = new b(); + CobolResultSet rs; + int@<:@@:>@ data_list = {-999, -2, -1, 0, 1, 2, 998}; + try{ + for(int data : data_list) { + rs = prog.execute(data); + System.out.println(" arg: " + rs.getInt(1)); + } + } catch(CobolResultSetException e) { + e.printStackTrace(); + } + } +} +]) + +AT_CHECK([cobj b.cbl]) +AT_CHECK([javac a.java]) +AT_CHECK([java a], [0], +[ arg: -999 + arg: -998 + arg: -002 + arg: -1 + arg: -001 + arg: 0 + arg: +000 + arg: 1 + arg: +001 + arg: 2 + arg: +002 + arg: 3 + arg: +998 + arg: 999 +]) + +AT_CLEANUP + +AT_SETUP([PIC S9(3)V99 USAGE COMP-3]) +export LC_ALL='' + +AT_DATA([b.cbl], [ + identification division. + program-id. b. + data division. + linkage section. + 01 arg pic S9(3)V99 USAGE COMP-3. + procedure division using arg. + display " arg: " arg. + add 1 to arg. +]) + +AT_DATA([a.java], [ +import jp.osscons.opensourcecobol.libcobj.ui.*; +public class a { + public static void main(String@<:@@:>@ args) { + b prog = new b(); + CobolResultSet rs; + double@<:@@:>@ data_list = {-999.99, -2.01, -1.01, -1.00, 0, 1.01, 2.01, 998.99}; + try{ + for(double data : data_list) { + rs = prog.execute(data); + System.out.println(" arg: " + rs.getDouble(1)); + } + } catch(CobolResultSetException e) { + e.printStackTrace(); + } + } +} +]) + +AT_CHECK([cobj b.cbl]) +AT_CHECK([javac a.java]) +AT_CHECK([java a], [0], +[ arg: -999.99 + arg: -998.99 + arg: -002.01 + arg: -1.01 + arg: -001.01 + arg: -0.01 + arg: -001.00 + arg: 0.0 + arg: +000.00 + arg: 1.0 + arg: +001.01 + arg: 2.01 + arg: +002.01 + arg: 3.01 + arg: +998.99 + arg: 999.99 +]) + +AT_CLEANUP + +AT_SETUP([PIC X(3)]) +export LC_ALL='' + +AT_DATA([b.cbl], [ + identification division. + program-id. b. + data division. + linkage section. + 01 arg pic X(3). + procedure division using arg. + display " arg: " arg. + MOVE "123" TO arg. +]) + +AT_DATA([a.java], [ +import jp.osscons.opensourcecobol.libcobj.ui.*; +public class a { + public static void main(String@<:@@:>@ args) { + b prog = new b(); + CobolResultSet rs; + try{ + rs = prog.execute("abc"); + System.out.println(" arg: " + rs.getString(1)); + } catch(CobolResultSetException e) { + e.printStackTrace(); + } + } +} +]) + +AT_CHECK([cobj b.cbl]) +AT_CHECK([javac a.java]) +AT_CHECK([java a], [0], +[ arg: abc + arg: 123 +]) + +AT_CLEANUP + +AT_SETUP([Out of range]) +export LC_ALL='' + +AT_DATA([b.cbl], [ + identification division. + program-id. b. + data division. + linkage section. + 01 arg pic 9(3). + procedure division using arg. + add 1 to arg. +]) + +AT_DATA([a.java], [ +import jp.osscons.opensourcecobol.libcobj.ui.*; +public class a { + public static void main(String@<:@@:>@ args) { + b prog = new b(); + CobolResultSet rs; + try{ + rs = prog.execute(0); + System.out.println(" arg: " + rs.getInt(2)); + } catch(CobolResultSetException e) { + e.printStackTrace(); + } + } +} +]) + +AT_CHECK([cobj b.cbl]) +AT_CHECK([javac a.java]) +AT_CHECK([java a 2>&1 | grep 'The index is out of range' > /dev/null], [0]) +AT_CLEANUP + +AT_SETUP([Type mismatch]) +export LC_ALL='' + +AT_DATA([b.cbl], [ + identification division. + program-id. b. + data division. + linkage section. + 01 arg-i pic 9(3). + 01 arg-d pic 9(3)V9. + 01 arg-s pic X(3). + procedure division using arg-i arg-d arg-s. +]) + +AT_DATA([a.java], [ +import jp.osscons.opensourcecobol.libcobj.ui.*; +public class a { + public static void main(String@<:@@:>@ args) { + b prog = new b(); + CobolResultSet rs = prog.execute(1, 1.1, "abc"); + try{ + rs.getDouble(1); + } catch(CobolResultSetException e) { + e.printStackTrace(); + } + try{ + rs.getString(1); + } catch(CobolResultSetException e) { + e.printStackTrace(); + } + try{ + rs.getInt(2); + } catch(CobolResultSetException e) { + e.printStackTrace(); + } + try{ + rs.getString(2); + } catch(CobolResultSetException e) { + e.printStackTrace(); + } + try{ + rs.getInt(3); + } catch(CobolResultSetException e) { + e.printStackTrace(); + } + try{ + rs.getDouble(3); + } catch(CobolResultSetException e) { + e.printStackTrace(); + } + } +} +]) + +AT_CHECK([cobj b.cbl]) +AT_CHECK([javac a.java]) +AT_CHECK([java a 2>&1 | grep 'jp.osscons.opensourcecobol.libcobj.ui.CobolResultSetException'], [0], +[jp.osscons.opensourcecobol.libcobj.ui.CobolResultSetException: The result type is not 'double' +jp.osscons.opensourcecobol.libcobj.ui.CobolResultSetException: The result type is not 'String' +jp.osscons.opensourcecobol.libcobj.ui.CobolResultSetException: The result type is not 'int' +jp.osscons.opensourcecobol.libcobj.ui.CobolResultSetException: The result type is not 'String' +jp.osscons.opensourcecobol.libcobj.ui.CobolResultSetException: The result type is not 'int' +jp.osscons.opensourcecobol.libcobj.ui.CobolResultSetException: The result type is not 'double' +]) +AT_CLEANUP + +AT_SETUP([Japanese]) +export LC_ALL='' + +AT_DATA([b.cbl], [ + identification division. + program-id. b. + data division. + linkage section. + 01 arg-1 pic 9(3). + 01 arg-2 pic N(5). + procedure division using arg-1 arg-2. + display arg-1. + display arg-2. + add 1 to arg-1. + move N"かきくけこ" to arg-2. +]) + +AT_DATA([a.java], [ +import jp.osscons.opensourcecobol.libcobj.ui.*; +public class a { + public static void main(String@<:@@:>@ args) { + b prog = new b(); + CobolResultSet rs = prog.execute(100, "あいうえお"); + try{ + int ret1 = rs.getInt(1); + String ret2 = rs.getString(2); + System.out.println("ret1: " + ret1); + System.out.println("ret2: " + ret2); + } catch(CobolResultSetException e){ + e.printStackTrace(); + } + } +} +]) + +AT_CHECK([cobj b.cbl]) +AT_CHECK([javac -encoding UTF8 a.java]) +AT_CHECK([java -Dfile.encoding=SJIS a > out1.txt]) +AT_CHECK([echo -n '100 +あいうえお +ret1: 101 +ret2: かきくけこ +' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) +AT_CLEANUP + + +AT_SETUP([COMP-3 Integer.MIN_VALUE]) +export LC_ALL='' + +AT_DATA([b.cbl], [ + identification division. + program-id. b. + data division. + linkage section. + 01 k1 pic S9(1) usage comp-3 value zero. + 01 k2 pic S9(2) usage comp-3 value zero. + 01 k3 pic S9(3) usage comp-3 value zero. + 01 k4 pic S9(4) usage comp-3 value zero. + 01 k5 pic S9(5) usage comp-3 value zero. + 01 k6 pic S9(6) usage comp-3 value zero. + 01 k7 pic S9(7) usage comp-3 value zero. + 01 k8 pic S9(8) usage comp-3 value zero. + 01 k9 pic S9(9) usage comp-3 value zero. + 01 k10 pic S9(10) usage comp-3 value zero. + 01 k11 pic S9(11) usage comp-3 value zero. + 01 k12 pic S9(12) usage comp-3 value zero. + 01 k13 pic S9(13) usage comp-3 value zero. + procedure division + using k1 k2 k3 k4 k5 k6 k7 k8 k9 k10 k11 k12 k13. + + display k1. + display k2. + display k3. + display k4. + display k5. + display k6. + display k7. + display k8. + display k9. + display k10. + display k11. + display k12. + display k13. +]) + +AT_DATA([a.java], [ +public class a { + public static void main(String@<:@@:>@ args) { + int v = Integer.MIN_VALUE; + b prog = new b(); + prog.execute(v, v, v, v, v, v, v, v, v, v, v, v, v); + } +} +]) + +AT_CHECK([cobj b.cbl]) +AT_CHECK([javac a.java]) +AT_CHECK([java a], [0], +[-8 +-48 +-648 +-3648 +-83648 +-483648 +-7483648 +-47483648 +-147483648 +-2147483648 +-02147483648 +-002147483648 +-0002147483648 +]) +AT_CLEANUP \ No newline at end of file diff --git a/tests/cobol_utf8.src/limits.at b/tests/cobol_utf8.src/limits.at new file mode 100644 index 00000000..9355959f --- /dev/null +++ b/tests/cobol_utf8.src/limits.at @@ -0,0 +1,289 @@ +AT_SETUP([Field length limit PIC A/VALID]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 VALID-X PIC A(16777216). + PROCEDURE DIVISION. + STOP RUN. +]) + +AT_CHECK([${COMPILE_LIMIT_TEST} prog.cob], [0]) + +AT_CLEANUP + +AT_SETUP([Field length limit PIC A/TOO LONG]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 VALID-X PIC A(16777217). + PROCEDURE DIVISION. + STOP RUN. +]) + +AT_CHECK([${COMPILE_LIMIT_TEST} prog.cob], [1], [], +[prog.cob:6: Error: Alphabetic field cannot be larger than 16777216 digits +]) + +AT_CLEANUP + +AT_SETUP([Field length limit PIC X/VALID]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 VALID-X PIC X(16777216). + PROCEDURE DIVISION. + STOP RUN. +]) + +AT_CHECK([${COMPILE_LIMIT_TEST} prog.cob], [0]) + +AT_CLEANUP + +AT_SETUP([Field length limit PIC X/TOO LONG]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 VALID-X PIC X(16777217). + PROCEDURE DIVISION. + STOP RUN. +]) + +AT_CHECK([${COMPILE_LIMIT_TEST} prog.cob], [1], [], +[prog.cob:6: Error: AlphaNumeric field cannot be larger than 16777216 digits +]) + +AT_CLEANUP + +AT_SETUP([Field length limit PIC B9/VALID]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 VALID-X PIC B9(159). + PROCEDURE DIVISION. + STOP RUN. +]) + +AT_CHECK([${COMPILE_LIMIT_TEST} prog.cob], [0]) + +AT_CLEANUP + +AT_SETUP([Field length limit PIC B9/TOO LONG]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 VALID-X PIC B9(160). + PROCEDURE DIVISION. + STOP RUN. +]) + +AT_CHECK([${COMPILE_LIMIT_TEST} prog.cob], [1], [], +[prog.cob:6: Error: NumericEdit field cannot be larger than 160 digits +]) + +AT_CLEANUP + +AT_SETUP([Field length limit PIC B/VALID]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 VALID-X PIC B(16777216). + PROCEDURE DIVISION. + STOP RUN. +]) + +AT_CHECK([${COMPILE_LIMIT_TEST} prog.cob], [0]) + +AT_CLEANUP + +AT_SETUP([Field length limit PIC B/TOO LONG]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 VALID-X PIC B(16777217). + PROCEDURE DIVISION. + STOP RUN. +]) + +AT_CHECK([${COMPILE_LIMIT_TEST} prog.cob], [1], [], + +[prog.cob:6: Error: AlphaNumericEdit field cannot be larger than 16777216 digits +]) + +AT_CLEANUP + +AT_SETUP([Field length limit PIC BA/VALID]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 VALID-X PIC BA(16777215). + PROCEDURE DIVISION. + STOP RUN. +]) + +AT_CHECK([${COMPILE_LIMIT_TEST} prog.cob], [0]) + +AT_CLEANUP + +AT_SETUP([Field length limit PIC BA/TOO LONG]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 VALID-X PIC BA(16777216). + PROCEDURE DIVISION. + STOP RUN. +]) + +AT_CHECK([${COMPILE_LIMIT_TEST} prog.cob], [1], [], +[prog.cob:6: Error: AlphaNumericEdit field cannot be larger than 16777216 digits +]) + +AT_CLEANUP + +AT_SETUP([Field length limit PIC BX/VALID]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 VALID-X PIC BX(16777215). + PROCEDURE DIVISION. + STOP RUN. +]) + +AT_CHECK([${COMPILE_LIMIT_TEST} prog.cob], [0]) + +AT_CLEANUP + +AT_SETUP([Field length limit PIC BX/TOO LONG]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 VALID-X PIC BX(16777216). + PROCEDURE DIVISION. + STOP RUN. +]) + +AT_CHECK([${COMPILE_LIMIT_TEST} prog.cob], [1], [], +[prog.cob:6: Error: AlphaNumericEdit field cannot be larger than 16777216 digits +]) + +AT_CLEANUP + +AT_SETUP([Field length limit PIC N/VALID (SJIS)]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 VALID-N PIC N(8388608). + PROCEDURE DIVISION. + STOP RUN. +]) + +AT_CHECK([${COMPILE_LIMIT_TEST} prog.cob], [0]) + +AT_CLEANUP + +AT_SETUP([Field length limit PIC N/TOO LONG (SJIS)]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 INVALID-N PIC N(8388609). + PROCEDURE DIVISION. + STOP RUN. +]) + +AT_CHECK([${COMPILE_LIMIT_TEST} prog.cob], [1], [], +[prog.cob:6: Error: National field cannot be larger than 8388608 digits +]) + +AT_CLEANUP + +AT_SETUP([Field length limit PIC BN/VALID (SJIS)]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 VALID-BN PIC BN(8388607). + PROCEDURE DIVISION. + STOP RUN. +]) + +AT_CHECK([${COMPILE_LIMIT_TEST} prog.cob], [0]) + +AT_CLEANUP + +AT_SETUP([Field length limit PIC BN/TOO LONG (SJIS)]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 INVALID-BN PIC BN(8388608). + PROCEDURE DIVISION. + STOP RUN. +]) + +AT_CHECK([${COMPILE_LIMIT_TEST} prog.cob], [1], [], +[prog.cob:6: Error: NationalEdit field cannot be larger than 8388608 digits +]) + +AT_CLEANUP + diff --git a/tests/cobol_utf8.src/mb-space.at b/tests/cobol_utf8.src/mb-space.at new file mode 100644 index 00000000..869e87f1 --- /dev/null +++ b/tests/cobol_utf8.src/mb-space.at @@ -0,0 +1,71 @@ +AT_SETUP([Zenkaku SPC delims in headings]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA       DIVISION. + WORKING-STORAGE  SECTION. + 01 項目 PIC X. + PROCEDURE   DIVISION. + DISPLAY "OK" WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([${COMPILE} prog.cob]) +AT_CHECK([java prog], [0], [OK]) + +AT_CLEANUP + +AT_SETUP([Zenkaku SPC delims in record def]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 項目 PIC X(40) VALUE + "Zen SPC between item name and PIC clause". +  01 F00 PIC X. +   01 F01 PIC X. + 01 F02 PIC X. + 01 F03 PIC X. + 01 F04 PIC X . + PROCEDURE DIVISION. + DISPLAY 項目 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([${COMPILE} prog.cob]) +AT_CHECK([java prog], [0], [Zen SPC between item name and PIC clause]) + +AT_CLEANUP + +AT_SETUP([Zenkaku SPC delims in COPY stmt]) +export LC_ALL='' + +AT_DATA([inc.cpy], [ + 01 項目 PIC X(2) VALUE "OK". +  01 F00 PIC X. +   01 F01 PIC X. + 01 F02 PIC X. + 01 F03 PIC X. + 01 F04 PIC X . +]) + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + COPY  inc. + PROCEDURE DIVISION. + DISPLAY 項目 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([${COMPILE} prog.cob]) +AT_CHECK([java prog], [0], [OK]) + +AT_CLEANUP diff --git a/tests/cobol_utf8.src/national.at b/tests/cobol_utf8.src/national.at new file mode 100644 index 00000000..2f8a8e65 --- /dev/null +++ b/tests/cobol_utf8.src/national.at @@ -0,0 +1,271 @@ +AT_SETUP([FUNCTION NATIONAL single-byte]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 I-STR PIC X(5). + 01 O-STR PIC X(10). + PROCEDURE DIVISION. + MOVE "ABCDZ" TO I-STR. + MOVE FUNCTION NATIONAL(I-STR) TO O-STR. + DISPLAY O-STR WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj ${FLAGS_JP_COMPAT} prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n 'ABCDZ'| nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([FUNCTION NATIONAL multi-byte]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 I-STR PIC X(9). + 01 O-STR PIC X(12). + PROCEDURE DIVISION. + MOVE "ABC123" TO I-STR. + MOVE FUNCTION NATIONAL(I-STR) TO O-STR. + DISPLAY O-STR WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj ${FLAGS_JP_COMPAT} prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n 'ABC123'| nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + + +AT_CLEANUP + +AT_SETUP([FUNCTION NATIONAL KIGOU-exclamation]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 I-STR PIC X(5). + 01 O-STR PIC X(10). + PROCEDURE DIVISION. + MOVE "!!!!!" TO I-STR. + MOVE FUNCTION NATIONAL(I-STR) TO O-STR. + DISPLAY O-STR WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj ${FLAGS_JP_COMPAT} prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '!!!!!' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([FUNCTION NATIONAL KIGOU-yen]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 I-STR PIC X(1). + 01 O-STR PIC X(10). + PROCEDURE DIVISION. + MOVE "¥" TO I-STR. + MOVE FUNCTION NATIONAL(I-STR) TO O-STR. + DISPLAY O-STR WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj ${FLAGS_JP_COMPAT} prog.cob], [0], [], +[prog.cob:9: Warning: Value size exceeds data size +prog.cob:6: Warning: 'I-STR' defined here as PIC X(1) +]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '¥ ' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([FUNCTION NATIONAL KIGOU-plus]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 I-STR PIC X(2). + 01 O-STR PIC X(10). + PROCEDURE DIVISION. + MOVE "+ " TO I-STR. + MOVE FUNCTION NATIONAL(I-STR) TO O-STR. + DISPLAY O-STR WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj ${FLAGS_JP_COMPAT} prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '+  ' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([FUNCTION NATIONAL (HanKana w/ Daku-on)]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 I-STR PIC X(16). + 01 O-STR PIC X(16). + PROCEDURE DIVISION. + MOVE "レディガガ" TO I-STR. + MOVE FUNCTION NATIONAL(I-STR) TO O-STR. + DISPLAY O-STR WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj ${FLAGS_JP_COMPAT} prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n 'レディガガ   ' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([FUNCTION NATIONAL (HanKana w/ Han-daku-on)]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 I-STR PIC X(10). + 01 O-STR PIC X(10). + PROCEDURE DIVISION. + MOVE "ポピン" TO I-STR. + MOVE FUNCTION NATIONAL(I-STR) TO O-STR. + DISPLAY O-STR WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj ${FLAGS_JP_COMPAT} prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n 'ポピン  ' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([N Literal (NO zenakaku conversion)]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + PROCEDURE DIVISION. + DISPLAY N"いろは". + DISPLAY N"イロハ". + DISPLAY N"ポピン". + DISPLAY N"ABC". + DISPLAY N"#$%". + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n 'いろは +イロハ +ポピン +ABC +#$% +'| nkf -x --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([NC Literal (NO zenakaku conversion)]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + PROCEDURE DIVISION. + DISPLAY NC"いろは". + DISPLAY NC"イロハ". + DISPLAY NC"ポピン". + DISPLAY NC"ABC". + DISPLAY NC"#$%". + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n 'いろは +イロハ +ポピン +ABC +#$% +'| nkf -x --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([ND Literal (NO zenakaku conversion)]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + PROCEDURE DIVISION. + DISPLAY ND"いろは". + DISPLAY ND"イロハ". + DISPLAY ND"ポピン". + DISPLAY ND"ABC". + DISPLAY ND"#$%". + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n 'いろは +イロハ +ポピン +ABC +#$% +'| nkf -x --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([NX Literal]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + PROCEDURE DIVISION. + DISPLAY NX"E38184E3828DE381AF". + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n 'いろは +' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP diff --git a/tests/cobol_utf8.src/pic-n.at b/tests/cobol_utf8.src/pic-n.at new file mode 100644 index 00000000..57f4b1e0 --- /dev/null +++ b/tests/cobol_utf8.src/pic-n.at @@ -0,0 +1,522 @@ +AT_SETUP([PIC N Value clause]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC N(7) VALUE "日本語の文字列". + PROCEDURE DIVISION. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '日本語の文字列' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([PIC N Move]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC N(7). + PROCEDURE DIVISION. + MOVE "日本語の文字列" TO F0. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '日本語の文字列' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([PIC N Move with trunc]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC N(3). + PROCEDURE DIVISION. + MOVE "日本語の文字列" TO F0. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '日本語' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([PIC N Move with padding by full-width SPC]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC N(9). + PROCEDURE DIVISION. + MOVE "日本語の文字列" TO F0. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '日本語の文字列  ' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([PIC N Move with justify]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC N(9) JUSTIFIED RIGHT. + PROCEDURE DIVISION. + MOVE "日本語の文字列" TO F0. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '  日本語の文字列' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([PIC N EDITED w/ VALUE]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC NN/NNBNN0 VALUE '日本/中国 文字0'. + PROCEDURE DIVISION. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '日本/中国 文字0' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([INITIALIZE PIC N EDITED]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC NN/NNBNN0 VALUE '日本/中国 文字0'. + PROCEDURE DIVISION. + MOVE "春夏秋冬寒暖" TO F0. + INITIALIZE F0. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '  /     0' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([INITIALIZE PIC N EDITED TO VALUE]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC NN/NNBNN0 VALUE '日本/中国 文字0'. + PROCEDURE DIVISION. + MOVE "春夏秋冬寒暖" TO F0. + INITIALIZE F0 NATIONAL TO VALUE. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '日本/中国 文字0' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([PIC N Move to NATIONAL EDITED]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC NN/NNBNN0. + PROCEDURE DIVISION. + MOVE "日本中国文字" TO F0. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '日本/中国 文字0' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([PIC N Move with half-width alnum conv.]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC N(7). + PROCEDURE DIVISION. + MOVE "ABC0123" TO F0. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n 'ABC0123' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([PIC N Move with half-width kana conv.]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC N(7). + PROCEDURE DIVISION. + MOVE "コメダコーヒー" TO F0. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob], [0]) +AT_CHECK([java prog | od -tx1 -An | sed -e 's/ */ /g' -e 's/ *$//'], [0], [ 83 52 83 81 83 5f 83 52 81 5b 83 71 81 5b +]) + +AT_CLEANUP + +AT_SETUP([PIC N Ref mod(n:)]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC N(7). + PROCEDURE DIVISION. + MOVE "日本語の文字列" TO F0. + DISPLAY F0(5:) WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '文字列' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([PIC N Ref mod(n:m)]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC N(7). + PROCEDURE DIVISION. + MOVE "日本語の文字列" TO F0. + DISPLAY F0(5:2) WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '文字' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([PIC N STRING by size]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC N(2) VALUE "私の". + 01 F1 PIC N(3) VALUE "名前は". + 01 F2 PIC N(5) VALUE "ありません". + 01 FF PIC N(10). + PROCEDURE DIVISION. + STRING F0 F1 F2 DELIMITED BY SIZE + INTO FF. + DISPLAY FF WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '私の名前はありません' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([PIC N STRING with delimiter (causes warn)]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC N(2) VALUE "私の". + 01 F1 PIC N(4) VALUE "名前△は". + 01 F2 PIC N(6) VALUE "△ありません". + 01 FF PIC N(4). + PROCEDURE DIVISION. + STRING F0 F1 F2 DELIMITED BY "△" + INTO FF. + DISPLAY FF WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '私の名前' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([PIC N STRING with NATIONAL delimiter]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC N(2) VALUE "私の". + 01 F1 PIC N(4) VALUE "名前△は". + 01 F2 PIC N(6) VALUE "△ありません". + 01 FF PIC N(4). + PROCEDURE DIVISION. + STRING F0 F1 F2 DELIMITED BY N"△" + INTO FF. + DISPLAY FF WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '私の名前' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([PIC N STRING with pointer]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC N(2) VALUE "私の". + 01 F1 PIC N(3) VALUE "名前は". + 01 F2 PIC N(5) VALUE "ありません". + 01 FF PIC N(10) VALUE "言えません○※△■×". + 01 FP PIC 99 VALUE 6. + PROCEDURE DIVISION. + STRING F0 F1 F2 DELIMITED BY SIZE + INTO FF WITH POINTER FP. + DISPLAY FF WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '言えません私の名前は' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([PIC N INSPECT REPLACING]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC N(10) VALUE "1234512345". + PROCEDURE DIVISION. + INSPECT F0 REPLACING ALL "5" BY "0". + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '1234012340' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([PIC N INSPECT REPLACING by ZERO]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC N(10) VALUE "1234512345". + PROCEDURE DIVISION. + INSPECT F0 REPLACING ALL "5" BY ZERO. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '1234012340' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([PIC N INSPECT REPLACING by NATIONAL ZERO]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC N(10) VALUE "1234512345". + PROCEDURE DIVISION. + INSPECT F0 REPLACING ALL N"5" BY ZERO. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '1234012340' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([PIC N INSPECT TALLYING]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC N(10) VALUE "1234512345". + 01 CN PIC 99. + PROCEDURE DIVISION. + INSPECT F0 TALLYING CN FOR ALL "45". + DISPLAY CN WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '02' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([PIC N Move with half-width dakuten kana.]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC N(7). + PROCEDURE DIVISION. + MOVE "゙ダ・ヴィンチ" TO F0. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '゛ダ・ヴィンチ' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([PIC N Move with half-width han-dakuten kana.]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC N(7). + PROCEDURE DIVISION. + MOVE "゚ポンデリング" TO F0. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '゜ポンデリング' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP diff --git a/tests/cobol_utf8.src/pic-x.at b/tests/cobol_utf8.src/pic-x.at new file mode 100644 index 00000000..bdbe1199 --- /dev/null +++ b/tests/cobol_utf8.src/pic-x.at @@ -0,0 +1,585 @@ +AT_SETUP([Value clause]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC X(14) VALUE "日本語の文字列". + PROCEDURE DIVISION. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob 2> /dev/null]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n 日本語の文字列 | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([Move]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC X(14). + PROCEDURE DIVISION. + MOVE "日本語の文字列" TO F0. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n 日本語の文字列 | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([Move with trunc]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC X(6). + PROCEDURE DIVISION. + MOVE "日本語の文字列" TO F0. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n 日本語 | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([Move ALL with trunc and trimming]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC X(7). + PROCEDURE DIVISION. + MOVE ALL "喜" TO F0. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob], [0]) +AT_CHECK([java prog | od -tx1 -An | sed -e 's/ */ /g' -e 's/ *$//'], [0], [ 8a ec 8a ec 8a ec 20 +]) + +AT_CLEANUP + +AT_SETUP([Move with trunc and trimming 1]) +export LC_ALL='' +AT_CHECK([${SKIP_TEST}]) + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC X(7). + PROCEDURE DIVISION. + MOVE "日本語の文字列" TO F0. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog | od -tx1 -An | sed -e 's/ */ /g' -e 's/ *$//'], [0], [ 93 fa 96 7b 8c ea 82 +]) + +AT_CLEANUP + +AT_SETUP([Move from field with trunc and trimming 1]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 FS PIC X(14) VALUE "日本語の文字列". + 01 F0 PIC X(7). + PROCEDURE DIVISION. + MOVE FS TO F0. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob], [0]) +AT_CHECK([java prog | od -tx1 -An | sed -e 's/ */ /g' -e 's/ *$//'], [0], [ 93 fa 96 7b 8c ea 82 +]) + +AT_CLEANUP + +AT_SETUP([Move with padding]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC X(16). + PROCEDURE DIVISION. + MOVE "日本語の文字列" TO F0. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '日本語の文字列 ' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([Move with justify]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC X(15) JUSTIFIED RIGHT. + PROCEDURE DIVISION. + MOVE "日本語の文字列" TO F0. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n ' 日本語の文字列' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([Move to alnum EDITED]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC XXXX/XXXXBXXXX0. + PROCEDURE DIVISION. + MOVE "日本中国文字" TO F0. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '日本/中国 文字0' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([Move to alnum EDITED (pic too short)]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC XX/XXBXX0. + PROCEDURE DIVISION. + MOVE "日本中国文字" TO F0. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '日/本 中0' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([Move to alnum EDITED (pic too long)]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC XX/XXBXX0. + PROCEDURE DIVISION. + MOVE "日本" TO F0. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '日/本 0' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([Move to alnum EDITED (No char break)]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC X(2)BX(2). + PROCEDURE DIVISION. + MOVE "日本" TO F0. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '日 本' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([Move to alnum EDITED (char break & junk chars)]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC X(1)BX(3). + PROCEDURE DIVISION. + MOVE "日本" TO F0. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob], [0]) +AT_CHECK([java prog | od -tx1 -An | sed -e 's/ */ /g' -e 's/ *$//'], [0], [ 93 20 fa 96 7b +]) + +AT_CLEANUP + +AT_SETUP([Move group to group in bad alignment]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0. + 03 XX0 PIC X(4) VALUE "日本". + 01 F1. + 03 XX1 PIC X(3). + 03 FILLER PIC X(1). + + PROCEDURE DIVISION. + MOVE F0 TO F1. + DISPLAY XX1 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob], [0]) +AT_CHECK([java prog | od -tx1 -An | sed -e 's/ */ /g' -e 's/ *$//'], [0], [ 93 fa 96 +]) + +AT_CLEANUP + +AT_SETUP([Redifinition breaking char pos.]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0. + 03 XX0 PIC X(4) VALUE "日本". + 01 F1 REDEFINES F0. + 03 XX1 PIC X(3). + 03 FILLER PIC X(1). + + PROCEDURE DIVISION. + DISPLAY XX1 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob], [0]) +AT_CHECK([java prog | od -tx1 -An | sed -e 's/ */ /g' -e 's/ *$//'], [0], [ 93 fa 96 +]) + +AT_CLEANUP + + +AT_SETUP([Ref mod(n:)]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC X(14). + PROCEDURE DIVISION. + MOVE "日本語の文字列" TO F0. + DISPLAY F0(9:) WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '文字列' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([Ref mod(n:m)]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC X(14). + PROCEDURE DIVISION. + MOVE "日本語の文字列" TO F0. + DISPLAY F0(9:4) WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '文字' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([STRING by size]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC X(4) VALUE "私の". + 01 F1 PIC X(6) VALUE "名前は". + 01 F2 PIC X(10) VALUE "ありません". + 01 FF PIC X(20). + PROCEDURE DIVISION. + STRING F0 F1 F2 DELIMITED BY SIZE + INTO FF. + DISPLAY FF WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '私の名前はありません' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([STRING with delimiter]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC X(4) VALUE "私の". + 01 F1 PIC X(8) VALUE "名前△は". + 01 F2 PIC X(12) VALUE "△ありません". + 01 FF PIC X(8). + PROCEDURE DIVISION. + STRING F0 F1 F2 DELIMITED BY "△" + INTO FF. + DISPLAY FF WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '私の名前' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([STRING with pointer]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC X(4) VALUE "私の". + 01 F1 PIC X(6) VALUE "名前は". + 01 F2 PIC X(10) VALUE "ありません". + 01 FF PIC X(20) VALUE "言えません○※△■×". + 01 FP PIC 99 VALUE 11. + PROCEDURE DIVISION. + STRING F0 F1 F2 DELIMITED BY SIZE + INTO FF WITH POINTER FP. + DISPLAY FF WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '言えません私の名前は' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([INSPECT REPLACING]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC X(20) VALUE "1234512345". + PROCEDURE DIVISION. + INSPECT F0 REPLACING ALL "5" BY "0". + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '1234012340' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([INSPECT REPLACING by ZERO]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC X(20) VALUE "1234512345". + PROCEDURE DIVISION. + INSPECT F0 REPLACING ALL "5" BY ZERO. + DISPLAY F0 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '1234012340' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([INSPECT TALLYING]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 F0 PIC X(30) VALUE "1234512345". + 01 CN PIC 99. + PROCEDURE DIVISION. + INSPECT F0 TALLYING CN FOR ALL "45". + DISPLAY CN WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([cobj prog.cob]) +AT_CHECK([java prog > out1.txt]) +AT_CHECK([echo -n '02' | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +#AT_SETUP([Readable string literals]) +#export LC_ALL='' +## Older compilers converts string literals "日本語" in COBOL source code +## to `CobolUtil.toBytes((byte)0x93, (byte)0xfa, (byte)0x96, (byte)0x7b, (byte)0x8c, (byte)0xea)` in Java source code. +## The following tests check that the compiler converts the string literals to readable ones. +# +#AT_DATA([prog1.cob], [ +# IDENTIFICATION DIVISION. +# PROGRAM-ID. prog1. +# DATA DIVISION. +# WORKING-STORAGE SECTION. +# 01 F0 PIC X(30) VALUE "東京1". +# PROCEDURE DIVISION. +# MOVE "東京2" TO F0. +# DISPLAY "東京3". +#]) +# +#AT_CHECK([cobj prog1.cob]) +#AT_CHECK([grep '東京1' < prog1.java > /dev/null]) +#AT_CHECK([grep '東京2' < prog1.java > /dev/null]) +#AT_CHECK([grep '東京3' < prog1.java > /dev/null]) +# +## ' ' is the first multi-byte Shift-JIS character with respect to the byte order +## see http://charset.7jp.net/sjis.html +#AT_DATA([prog2.cob], [ +# IDENTIFICATION DIVISION. +# PROGRAM-ID. prog2. +# DATA DIVISION. +# WORKING-STORAGE SECTION. +# 01 F0 PIC X(30) VALUE " 1". +# PROCEDURE DIVISION. +# MOVE " 2" TO F0. +# DISPLAY " 3". +#]) +# +#AT_CHECK([cobj prog2.cob]) +#AT_CHECK([grep ' 1' < prog2.java > /dev/null]) +#AT_CHECK([grep ' 2' < prog2.java > /dev/null]) +#AT_CHECK([grep ' 3' < prog2.java > /dev/null]) +# +## '熙' is the last printable Shift-JIS character with respect to the byte order. +## See http://charset.7jp.net/sjis.html +#AT_DATA([prog3.cob], [ +# IDENTIFICATION DIVISION. +# PROGRAM-ID. prog3. +# DATA DIVISION. +# WORKING-STORAGE SECTION. +# 01 F0 PIC X(30) VALUE "熙1". +# PROCEDURE DIVISION. +# MOVE "熙2" TO F0. +# DISPLAY "熙3". +#]) +# +#AT_CHECK([cobj prog3.cob]) +#AT_CHECK([grep '熙1' < prog3.java > /dev/null]) +#AT_CHECK([grep '熙2' < prog3.java > /dev/null]) +#AT_CHECK([grep '熙3' < prog3.java > /dev/null]) +# +#AT_CLEANUP \ No newline at end of file diff --git a/tests/cobol_utf8.src/program-id.at b/tests/cobol_utf8.src/program-id.at new file mode 100644 index 00000000..14ddc3f5 --- /dev/null +++ b/tests/cobol_utf8.src/program-id.at @@ -0,0 +1,94 @@ +AT_SETUP([PROGRAM-ID NATIONAL C89 no warning]) +export LC_ALL='' + +AT_DATA([test.conf], [ +include "default.conf" +c89-identifier-length-check: yes +]) + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. 東京都. + DATA DIVISION. + PROCEDURE DIVISION. + END PROGRAM 東京都. +]) + +AT_CHECK([${COMPILE} -conf=test.conf prog.cob], [0]) + +AT_CLEANUP + + +AT_SETUP([PROGRAM-ID NATIONAL C89 warning]) +export LC_ALL='' +AT_CHECK([${SKIP_TEST}]) +AT_DATA([test.conf], [ +include "default.conf" +c89-identifier-length-check: yes +]) + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. 東京湾岸港湾局. + DATA DIVISION. + PROCEDURE DIVISION. + END PROGRAM 東京湾岸港湾局. +]) + +AT_CHECK([${COMPILE} -conf=test.conf prog.cob], [0], [], +[prog.cob:3: Warning: PROGRAM-ID length exceeds C89 function name limit +prog.cob:6: Warning: PROGRAM-ID length exceeds C89 function name limit +]) + +AT_CLEANUP + +AT_SETUP([PROGRAM-ID NATIONAL C89 ignore]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. 東京湾岸港湾局. + DATA DIVISION. + PROCEDURE DIVISION. + END PROGRAM 東京湾岸港湾局. +]) + +AT_CHECK([${COMPILE} prog.cob], [0]) + + +AT_CLEANUP + +AT_SETUP([PROGRAM-ID NATIONAL 32 character no over]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. あいうえおかきくけこさしすせそ + -たちつてとなにぬねのはひふへほ. + DATA DIVISION. + PROCEDURE DIVISION. + STOP RUN. +]) + +AT_CHECK([${COMPILE} prog.cob], [0]) + +AT_CLEANUP + +AT_SETUP([PROGRAM-ID NATIONAL 32 character over]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. あいうえおかきくけこさしすせそ + -たちつてとなにぬねのはひふへほまみ. + DATA DIVISION. + PROCEDURE DIVISION. + STOP RUN. +]) + +AT_CHECK([${COMPILE} prog.cob], [1], [], +[prog.cob:3: Error: User defined name must be less than 32 characters +]) + +AT_CLEANUP + diff --git a/tests/cobol_utf8.src/user-defined-word.at b/tests/cobol_utf8.src/user-defined-word.at new file mode 100644 index 00000000..36f0ccbd --- /dev/null +++ b/tests/cobol_utf8.src/user-defined-word.at @@ -0,0 +1,515 @@ +AT_SETUP([Program name]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. 日本語のプログラム名. + PROCEDURE DIVISION. + STOP RUN. +]) + +AT_CHECK([${COMPILE} prog.cob]) + +AT_CLEANUP + +AT_SETUP([Field name]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 O−文字列 PIC X(7) USAGE DISPLAY. + PROCEDURE DIVISION. + MOVE "Unicode" TO O−文字列. + DISPLAY O−文字列 WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([${COMPILE} prog.cob]) +AT_CHECK([java prog], [0], [Unicode]) + +AT_CLEANUP + +AT_SETUP([Long field name]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 項目ABCDEFGH012345 + PIC X(7). + PROCEDURE DIVISION. + MOVE "Unicode" + TO + 項目ABCDEFGH012345. + DISPLAY + 項目ABCDEFGH012345 + WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([${COMPILE} prog.cob]) +AT_CHECK([java prog], [0], [Unicode]) + +AT_CLEANUP + + +AT_SETUP([Field lookup]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 項目2 PIC X(1) VALUE "A". + 01 項目R PIC X(1) VALUE "B". + PROCEDURE DIVISION. + DISPLAY 項目2 項目R WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([${COMPILE} prog.cob]) +AT_CHECK([java prog], [0], [AB]) + +AT_CLEANUP + +AT_SETUP([Section name]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + PROCEDURE DIVISION. + PERFORM S−初期化. + PERFORM S−終了. + S−初期化 SECTION. + DISPLAY "Hello, " WITH NO ADVANCING. + S−終了 SECTION. + DISPLAY "and good bye." WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([${COMPILE} prog.cob]) +AT_CHECK([java prog], [0], [Hello, and good bye.]) + +AT_CLEANUP + +AT_SETUP([Long section name]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + PROCEDURE DIVISION. + PERFORM s12345678901234567890. + PERFORM S−終了. + s12345678901234567890 SECTION. + DISPLAY "Hello, " WITH NO ADVANCING. + S−終了 SECTION. + DISPLAY "and good bye." WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([${COMPILE} prog.cob]) +AT_CHECK([java prog], [0], [Hello, and good bye.]) + +AT_CLEANUP + +AT_SETUP([Too long section name]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + PROCEDURE DIVISION. + PERFORM s1234567890123456789012345678901. + PERFORM S−終了. + s1234567890123456789012345678901 SECTION. + DISPLAY "Hello, " WITH NO ADVANCING. + S−終了 SECTION. + DISPLAY "and good bye." WITH NO ADVANCING. + STOP RUN. +]) + +AT_CHECK([${COMPILE} prog.cob], [1], [], +[prog.cob:7: Error: User defined name must be less than 32 characters +prog.cob:9: Error: User defined name must be less than 32 characters +]) + +AT_CLEANUP + +AT_SETUP([Nihongo Filename]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + ENVIRONMENT DIVISION. + INPUT-OUTPUT SECTION. + FILE-CONTROL. + SELECT テストファイル ASSIGN TO "./テスト_ファイル" + ORGANIZATION IS INDEXED + ACCESS MODE IS SEQUENTIAL + RECORD KEY IS TEST-KEY. + DATA DIVISION. + FILE SECTION. + FD テストファイル. + 01 TEST-KEY PIC X(10). + PROCEDURE DIVISION. + OPEN OUTPUT テストファイル. + MOVE "TEST000000" TO TEST-KEY. + WRITE TEST-KEY. + CLOSE テストファイル. + OPEN INPUT テストファイル. + READ テストファイル + NOT AT END + DISPLAY "OK" NO ADVANCING + END-READ. + CLOSE テストファイル. + STOP RUN. +]) + +AT_CHECK([${COMPILE} prog.cob]) +AT_CHECK([java prog], [0], [OK]) + +AT_CLEANUP + +AT_SETUP([Nihongo field name in numeric test msg.]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 TEST-REC. + 03 U項目 PIC 9(4) VALUE 1000. + 01 X項目 PIC X(4) VALUE 'ABCD'. + PROCEDURE DIVISION. + MOVE X項目 TO TEST-REC. + ADD 1 TO U項目. + GOBACK. +]) + +AT_CHECK([${COMPILE} -debug prog.cob]) +AT_CHECK([java prog 2> out1.txt], [1]) +AT_CHECK([echo "prog.cob:11: libcobj: 'U項目' not numeric: 'ABCD'" | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([Nihongo field name in BASED test msg.]) +export LC_ALL='' +AT_CHECK([${SKIP_TEST}]) + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 X項目 PIC X(4) VALUE 'ABCD'. + 01 Y項目 PIC X(4) BASED. + PROCEDURE DIVISION. + MOVE X項目 TO Y項目. + GOBACK. +]) + +AT_CHECK([${COMPILE} -debug prog.cob]) + +AT_CHECK([java prog 2> out1.txt], [1]) +AT_CHECK([echo "prog.cob:9: libcobj: BASED/LINKAGE item 'Y項目' has NULL address" | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([Nihongo field name in ODO test msg.]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 I項目 PIC 9 VALUE 4. + 01 X. + 03 Y項目 PIC 9 OCCURS 1 TO 3 DEPENDING ON I項目. + PROCEDURE DIVISION. + MOVE 1 TO Y項目(3). + GOBACK. +]) + +AT_CHECK([${COMPILE} -debug prog.cob]) + +AT_CHECK([java prog 2> out1.txt], [1]) +AT_CHECK([echo "prog.cob:10: libcobj: OCCURS DEPENDING ON 'I項目' out of bounds: 4" | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([Nihongo field name in Subscript test msg.]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 I項目 PIC 9 VALUE 2. + 01 X. + 03 Y項目 PIC 9 OCCURS 1 TO 3 DEPENDING ON I項目. + PROCEDURE DIVISION. + MOVE 1 TO Y項目(3). + GOBACK. +]) + +AT_CHECK([${COMPILE} -debug prog.cob]) + +AT_CHECK([java prog 2> out1.txt], [1]) +AT_CHECK([echo "prog.cob:10: libcobj: Subscript of 'Y項目' out of bounds: 3" | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([Nihongo field name in length of ref_mod test msg.]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 I PIC 9 VALUE 2. + 01 J PIC 9 VALUE 6. + 01 X項目 PIC X(5) VALUE "ABCDE". + PROCEDURE DIVISION. + DISPLAY X項目(I:J). + GOBACK. +]) + +AT_CHECK([${COMPILE} -debug prog.cob]) + +AT_CHECK([java prog 2> out1.txt], [1]) +AT_CHECK([echo "prog.cob:10: libcobj: Length of 'X項目' out of bounds: 6" | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([Nihongo field name in offset of ref_mod test msg.]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 I PIC 9 VALUE 6. + 01 J PIC 9 VALUE 2. + 01 X項目 PIC X(5) VALUE "ABCDE". + PROCEDURE DIVISION. + DISPLAY X項目(I:J). + GOBACK. +]) + +AT_CHECK([${COMPILE} -debug prog.cob]) + +AT_CHECK([java prog 2> out1.txt], [1]) +AT_CHECK([echo "prog.cob:10: libcobj: Offset of 'X項目' out of bounds: 6" | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([Nihongo field name in length of N_refmod test msg.]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 I PIC 9 VALUE 2. + 01 J PIC 99 VALUE 18. + 01 X項目 PIC N(5) VALUE "ABCDE". + PROCEDURE DIVISION. + DISPLAY X項目(I:J). + GOBACK. +]) + +AT_CHECK([${COMPILE} -debug prog.cob]) + +AT_CHECK([java prog 2> out1.txt], [1]) +AT_CHECK([echo "prog.cob:10: libcobj: Length of 'X項目' out of bounds: 18" | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([Nihongo field name in offset of N_refmod test msg.]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 I PIC 99 VALUE 18. + 01 J PIC 9 VALUE 2. + 01 X項目 PIC N(5) VALUE "ABCDE". + PROCEDURE DIVISION. + DISPLAY X項目(I:J). + GOBACK. +]) + +AT_CHECK([${COMPILE} -debug prog.cob]) + +AT_CHECK([java prog 2> out1.txt], [1]) +AT_CHECK([echo "prog.cob:10: libcobj: Offset of 'X項目' out of bounds: 18" | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([Nihongo field name in extaddr test msg.]) +export LC_ALL='' +AT_CHECK([${SKIP_TEST}]) + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. check1. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 X項目 PIC X(5) EXTERNAL. + PROCEDURE DIVISION. + CALL 'check2'. + + IDENTIFICATION DIVISION. + PROGRAM-ID. check2. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 X項目 PIC X(6) EXTERNAL. + PROCEDURE DIVISION. + END PROGRAM check2. + END PROGRAM check1. +]) + +AT_CHECK([${COMPILE} -debug prog.cob]) + +AT_CHECK([java prog 2> out1.txt], [1]) +AT_CHECK([echo "prog.cob:8: libcobj: EXTERNAL item 'X項目' has size > 6" | nkf --ic=UTF-8 --oc=Shift_JIS > out2.txt]) +AT_CHECK([diff out1.txt out2.txt]) + +AT_CLEANUP + +AT_SETUP([Nihongo field name in undefined error msg.]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 G集団項目. + 03 A項目 PIC X. + PROCEDURE DIVISION. +001009 DISPLAY NO-FLD. +001010 DISPLAY NO-FLD IN G-GRP. +001011 DISPLAY NO-FLD IN NO-GRP. +001012 DISPLAY NO項目. +001013 DISPLAY NO項目 IN G集団項目. +001014 DISPLAY NO項目 IN NO集団項目. +001015 DISPLAY NO-FLD IN G集団項目. +001016 DISPLAY NO-FLD IN NO集団項目. +001017 DISPLAY NO項目 IN G-GRP. +001018 DISPLAY NO項目 IN NO-GRP. +001019 DISPLAY NO項目 IN G集団項目 IN NO集団項目. +]) + +AT_CHECK([${COMPILE} -debug prog.cob], [1], [], +[prog.cob:9: Error: 'NO-FLD' undefined +prog.cob:10: Error: 'NO-FLD' in 'G-GRP' undefined +prog.cob:11: Error: 'NO-FLD' in 'NO-GRP' undefined +prog.cob:12: Error: 'NO項目' undefined +prog.cob:13: Error: 'NO項目' in 'G集団項目' undefined +prog.cob:14: Error: 'NO項目' in 'NO集団項目' undefined +prog.cob:15: Error: 'NO-FLD' in 'G集団項目' undefined +prog.cob:16: Error: 'NO-FLD' in 'NO集団項目' undefined +prog.cob:17: Error: 'NO項目' in 'G-GRP' undefined +prog.cob:18: Error: 'NO項目' in 'NO-GRP' undefined +prog.cob:19: Error: 'NO項目' in 'G集団項目' in 'NO集団項目' undefined +]) + +AT_CLEANUP + +AT_SETUP([Nihongo field name in ambiguous error msg.]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 A項目 PIC X. + 01 G1集団. + 03 A項目 PIC X. + 03 B項目 PIC X. + 03 G2集団. + 05 A項目 PIC X. + 05 B項目 PIC X. + PROCEDURE DIVISION. +001014 DISPLAY A項目. +001015 DISPLAY B項目 IN G1集団. + GOBACK. +]) + +AT_CHECK([${COMPILE_ONLY} prog.cob], [1], [], +[prog.cob:8: Warning: Redefinition of 'A項目' +prog.cob:6: Warning: 'A項目' previously defined here +prog.cob:11: Warning: Redefinition of 'A項目' +prog.cob:6: Warning: 'A項目' previously defined here +prog.cob:14: Error: 'A項目' ambiguous; need qualification +prog.cob:6: Error: 'A項目' defined here +prog.cob:8: Error: 'A項目' in 'G1集団' defined here +prog.cob:11: Error: 'A項目' in 'G2集団' in 'G1集団' defined here +prog.cob:15: Error: 'B項目' in 'G1集団' ambiguous; need qualification +prog.cob:9: Error: 'B項目' in 'G1集団' defined here +prog.cob:12: Error: 'B項目' in 'G2集団' in 'G1集団' defined here +]) + +AT_CLEANUP + +AT_SETUP([Nihongo label name in ambiguous error msg.]) +export LC_ALL='' + +AT_DATA([prog.cob], [ + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + PROCEDURE DIVISION. +001006 L0見出し. +001007 GO TO L1見出し. +001008 GO TO L2見出し IN S1節. +001009 L1見出し. GOBACK. +001010 L1見出し. GOBACK. +001011 S1節 SECTION. +001012 L2見出し. GOBACK. +001013 L2見出し. GOBACK. +]) + +AT_CHECK([${COMPILE_ONLY} prog.cob], [1], [], +[prog.cob:7: Error: 'L1見出し' ambiguous; need qualification +prog.cob:9: Error: 'L1見出し' in 'MAIN SECTION' defined here +prog.cob:10: Error: 'L1見出し' in 'MAIN SECTION' defined here +prog.cob:8: Error: 'L2見出し' in 'S1節' ambiguous; need qualification +prog.cob:12: Error: 'L2見出し' in 'S1節' defined here +prog.cob:13: Error: 'L2見出し' in 'S1節' defined here +]) + +AT_CLEANUP