diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2016-11-21 16:19:27 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2016-11-21 16:19:29 +0900 |
commit | 918b647f9f238513a420f378f3d6167d769c60ff (patch) | |
tree | 4f6b328d2153b4815e1393630dc2f9ba382e133f /bootstrap | |
parent | 11a9c1544728cea3ecf080562fbe9977a3896d68 (diff) | |
download | re2c-918b647f9f238513a420f378f3d6167d769c60ff.tar.gz re2c-918b647f9f238513a420f378f3d6167d769c60ff.tar.bz2 re2c-918b647f9f238513a420f378f3d6167d769c60ff.zip |
Imported Upstream version 0.15.3
Change-Id: Iac860f5f67d794cbc8f9e6f99bbff73e830ffdee
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'bootstrap')
-rw-r--r-- | bootstrap/doc/re2c.1 | 8 | ||||
-rw-r--r-- | bootstrap/src/conf/parse_opts.cc | 735 | ||||
-rw-r--r-- | bootstrap/src/parse/lex.cc | 581 | ||||
-rw-r--r-- | bootstrap/src/parse/lex_conf.cc | 290 | ||||
-rw-r--r-- | bootstrap/src/parse/parser.cc | 72 | ||||
-rw-r--r-- | bootstrap/src/parse/y.tab.h | 22 |
6 files changed, 882 insertions, 826 deletions
diff --git a/bootstrap/doc/re2c.1 b/bootstrap/doc/re2c.1 index 7d8af250..fa278933 100644 --- a/bootstrap/doc/re2c.1 +++ b/bootstrap/doc/re2c.1 @@ -162,8 +162,10 @@ strings. With this switch single quotes are case sensitive and double quotes are case insensitive. .TP .B \fB\-\-no\-generation\-date\fP -Suppress date output in the generated output so -that it only shows the \fBre2c\fP version. +Suppress date output in the generated file. +.TP +.B \fB\-\-no\-generation\-date\fP +Suppress version output in the generated file. .TP .B \fB\-\-encoding\-policy POLICY\fP Specify how \fBre2c\fP must treat Unicode @@ -1041,6 +1043,6 @@ Emmanuel Mogenet \fI\%mgix@mgix.com\fP Ulya Trofimovich \fI\%skvadrik@gmail.com\fP .SH VERSION INFORMATION .sp -This manpage describes \fBre2c\fP version 0.15.2, package date 23 Nov 2015. +This manpage describes \fBre2c\fP version 0.15.3, package date 02 Dec 2015. .\" Generated by docutils manpage writer. . diff --git a/bootstrap/src/conf/parse_opts.cc b/bootstrap/src/conf/parse_opts.cc index 449b1487..a453a10d 100644 --- a/bootstrap/src/conf/parse_opts.cc +++ b/bootstrap/src/conf/parse_opts.cc @@ -1,10 +1,12 @@ -/* Generated by re2c 0.14.3 on Mon Nov 23 21:19:03 2015 */ +/* Generated by re2c 0.15.3 on Wed Dec 2 12:10:03 2015 */ #line 1 "../src/conf/parse_opts.re" -#include <stdio.h> - +#include "src/codegen/input_api.h" #include "src/conf/msg.h" #include "src/conf/opt.h" +#include "src/conf/warn.h" #include "src/globals.h" +#include "src/ir/regexp/empty_class_policy.h" +#include "src/ir/regexp/encoding/enc.h" namespace re2c { @@ -22,7 +24,7 @@ parse_opts_t parse_opts (char ** argv, Opt & opts) char * YYMARKER; Warn::option_t option; -#line 29 "../src/conf/parse_opts.re" +#line 31 "../src/conf/parse_opts.re" opt: @@ -31,7 +33,7 @@ opt: goto end; } -#line 35 "src/conf/parse_opts.cc" +#line 37 "src/conf/parse_opts.cc" { YYCTYPE yych; unsigned int yyaccept = 0; @@ -69,7 +71,6 @@ opt: 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, }; - yych = (YYCTYPE)*YYCURSOR; if (yych <= 0x00) goto yy2; if (yych == '-') goto yy5; @@ -77,12 +78,12 @@ opt: yy2: ++YYCURSOR; yy3: -#line 38 "../src/conf/parse_opts.re" +#line 40 "../src/conf/parse_opts.re" { error ("bad option: %s", *argv); return EXIT_FAIL; } -#line 86 "src/conf/parse_opts.cc" +#line 87 "src/conf/parse_opts.cc" yy4: yyaccept = 0; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); @@ -95,9 +96,9 @@ yy5: } else { if (yych == 'W') goto yy7; } -#line 61 "../src/conf/parse_opts.re" +#line 63 "../src/conf/parse_opts.re" { goto opt_short; } -#line 101 "src/conf/parse_opts.cc" +#line 102 "src/conf/parse_opts.cc" yy7: yyaccept = 1; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); @@ -108,23 +109,23 @@ yy7: if (yych == 'n') goto yy19; } yy8: -#line 66 "../src/conf/parse_opts.re" +#line 68 "../src/conf/parse_opts.re" { option = Warn::W; goto opt_warn; } -#line 114 "src/conf/parse_opts.cc" +#line 115 "src/conf/parse_opts.cc" yy9: ++YYCURSOR; if ((yych = (YYCTYPE)*YYCURSOR) <= 0x00) goto yy13; -#line 62 "../src/conf/parse_opts.re" +#line 64 "../src/conf/parse_opts.re" { goto opt_long; } -#line 120 "src/conf/parse_opts.cc" +#line 121 "src/conf/parse_opts.cc" yy11: ++YYCURSOR; -#line 58 "../src/conf/parse_opts.re" +#line 60 "../src/conf/parse_opts.re" { if (!opts.source ("<stdin>")) return EXIT_FAIL; goto opt; } -#line 125 "src/conf/parse_opts.cc" +#line 126 "src/conf/parse_opts.cc" yy13: ++YYCURSOR; -#line 44 "../src/conf/parse_opts.re" +#line 46 "../src/conf/parse_opts.re" { // all remaining arguments are non-options // so they must be input files @@ -138,12 +139,12 @@ yy13: } goto end; } -#line 142 "src/conf/parse_opts.cc" +#line 143 "src/conf/parse_opts.cc" yy15: ++YYCURSOR; -#line 64 "../src/conf/parse_opts.re" +#line 66 "../src/conf/parse_opts.re" { warn.set_all (); goto opt; } -#line 147 "src/conf/parse_opts.cc" +#line 148 "src/conf/parse_opts.cc" yy17: yych = (YYCTYPE)*++YYCURSOR; if (yych == 'r') goto yy30; @@ -167,9 +168,9 @@ yy19: yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); if (yych == 'e') goto yy23; yy22: -#line 67 "../src/conf/parse_opts.re" +#line 69 "../src/conf/parse_opts.re" { option = Warn::WNO; goto opt_warn; } -#line 173 "src/conf/parse_opts.cc" +#line 174 "src/conf/parse_opts.cc" yy23: yych = (YYCTYPE)*++YYCURSOR; if (yych != 'r') goto yy18; @@ -182,9 +183,9 @@ yy23: yych = (YYCTYPE)*++YYCURSOR; if (yych != '-') goto yy18; ++YYCURSOR; -#line 69 "../src/conf/parse_opts.re" +#line 71 "../src/conf/parse_opts.re" { option = Warn::WNOERROR; goto opt_warn; } -#line 188 "src/conf/parse_opts.cc" +#line 189 "src/conf/parse_opts.cc" yy30: yych = (YYCTYPE)*++YYCURSOR; if (yych != 'r') goto yy18; @@ -196,14 +197,14 @@ yy30: if (yych <= 0x00) goto yy36; if (yych != '-') goto yy18; ++YYCURSOR; -#line 68 "../src/conf/parse_opts.re" +#line 70 "../src/conf/parse_opts.re" { option = Warn::WERROR; goto opt_warn; } -#line 202 "src/conf/parse_opts.cc" +#line 203 "src/conf/parse_opts.cc" yy36: ++YYCURSOR; -#line 65 "../src/conf/parse_opts.re" +#line 67 "../src/conf/parse_opts.re" { warn.set_all_error (); goto opt; } -#line 207 "src/conf/parse_opts.cc" +#line 208 "src/conf/parse_opts.cc" yy38: ++YYCURSOR; yych = (YYCTYPE)*YYCURSOR; @@ -212,16 +213,16 @@ yy39: goto yy38; } ++YYCURSOR; -#line 59 "../src/conf/parse_opts.re" +#line 61 "../src/conf/parse_opts.re" { if (!opts.source (*argv)) return EXIT_FAIL; goto opt; } -#line 218 "src/conf/parse_opts.cc" +#line 219 "src/conf/parse_opts.cc" } -#line 70 "../src/conf/parse_opts.re" +#line 72 "../src/conf/parse_opts.re" opt_warn: -#line 225 "src/conf/parse_opts.cc" +#line 226 "src/conf/parse_opts.cc" { YYCTYPE yych; yych = (YYCTYPE)*YYCURSOR; @@ -236,12 +237,12 @@ opt_warn: yy44: ++YYCURSOR; yy45: -#line 75 "../src/conf/parse_opts.re" +#line 77 "../src/conf/parse_opts.re" { error ("bad warning: %s", *argv); return EXIT_FAIL; } -#line 245 "src/conf/parse_opts.cc" +#line 246 "src/conf/parse_opts.cc" yy46: yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); if (yych == 'o') goto yy162; @@ -308,9 +309,9 @@ yy55: yych = (YYCTYPE)*++YYCURSOR; if (yych >= 0x01) goto yy52; ++YYCURSOR; -#line 84 "../src/conf/parse_opts.re" +#line 86 "../src/conf/parse_opts.re" { warn.set (Warn::UNREACHABLE_RULES, option); goto opt; } -#line 314 "src/conf/parse_opts.cc" +#line 315 "src/conf/parse_opts.cc" yy72: yych = (YYCTYPE)*++YYCURSOR; if (yych != 'f') goto yy52; @@ -351,9 +352,9 @@ yy72: yych = (YYCTYPE)*++YYCURSOR; if (yych >= 0x01) goto yy52; ++YYCURSOR; -#line 83 "../src/conf/parse_opts.re" +#line 85 "../src/conf/parse_opts.re" { warn.set (Warn::UNDEFINED_CONTROL_FLOW, option); goto opt; } -#line 357 "src/conf/parse_opts.cc" +#line 358 "src/conf/parse_opts.cc" yy93: yych = (YYCTYPE)*++YYCURSOR; if (yych != 'l') goto yy52; @@ -380,9 +381,9 @@ yy93: yych = (YYCTYPE)*++YYCURSOR; if (yych >= 0x01) goto yy52; ++YYCURSOR; -#line 85 "../src/conf/parse_opts.re" +#line 87 "../src/conf/parse_opts.re" { warn.set (Warn::USELESS_ESCAPE, option); goto opt; } -#line 386 "src/conf/parse_opts.cc" +#line 387 "src/conf/parse_opts.cc" yy107: yych = (YYCTYPE)*++YYCURSOR; if (yych != 'a') goto yy52; @@ -409,9 +410,9 @@ yy107: yych = (YYCTYPE)*++YYCURSOR; if (yych >= 0x01) goto yy52; ++YYCURSOR; -#line 82 "../src/conf/parse_opts.re" +#line 84 "../src/conf/parse_opts.re" { warn.set (Warn::SWAPPED_RANGE, option); goto opt; } -#line 415 "src/conf/parse_opts.cc" +#line 416 "src/conf/parse_opts.cc" yy121: yych = (YYCTYPE)*++YYCURSOR; if (yych != 't') goto yy52; @@ -448,9 +449,9 @@ yy121: yych = (YYCTYPE)*++YYCURSOR; if (yych >= 0x01) goto yy52; ++YYCURSOR; -#line 81 "../src/conf/parse_opts.re" +#line 83 "../src/conf/parse_opts.re" { warn.set (Warn::MATCH_EMPTY_STRING, option); goto opt; } -#line 454 "src/conf/parse_opts.cc" +#line 455 "src/conf/parse_opts.cc" yy140: yych = (YYCTYPE)*++YYCURSOR; if (yych != 'p') goto yy52; @@ -493,9 +494,9 @@ yy140: yych = (YYCTYPE)*++YYCURSOR; if (yych >= 0x01) goto yy52; ++YYCURSOR; -#line 80 "../src/conf/parse_opts.re" +#line 82 "../src/conf/parse_opts.re" { warn.set (Warn::EMPTY_CHARACTER_CLASS, option); goto opt; } -#line 499 "src/conf/parse_opts.cc" +#line 500 "src/conf/parse_opts.cc" yy162: yych = (YYCTYPE)*++YYCURSOR; if (yych != 'n') goto yy52; @@ -526,16 +527,16 @@ yy162: yych = (YYCTYPE)*++YYCURSOR; if (yych >= 0x01) goto yy52; ++YYCURSOR; -#line 79 "../src/conf/parse_opts.re" +#line 81 "../src/conf/parse_opts.re" { warn.set (Warn::CONDITION_ORDER, option); goto opt; } -#line 532 "src/conf/parse_opts.cc" +#line 533 "src/conf/parse_opts.cc" } -#line 86 "../src/conf/parse_opts.re" +#line 88 "../src/conf/parse_opts.re" opt_short: -#line 539 "src/conf/parse_opts.cc" +#line 540 "src/conf/parse_opts.cc" { YYCTYPE yych; yych = (YYCTYPE)*YYCURSOR; @@ -603,146 +604,146 @@ opt_short: } yy180: ++YYCURSOR; -#line 95 "../src/conf/parse_opts.re" +#line 97 "../src/conf/parse_opts.re" { goto opt; } -#line 609 "src/conf/parse_opts.cc" +#line 610 "src/conf/parse_opts.cc" yy182: ++YYCURSOR; -#line 91 "../src/conf/parse_opts.re" +#line 93 "../src/conf/parse_opts.re" { error ("bad short option: %s", *argv); return EXIT_FAIL; } -#line 617 "src/conf/parse_opts.cc" +#line 618 "src/conf/parse_opts.cc" yy184: ++YYCURSOR; -#line 119 "../src/conf/parse_opts.re" +#line 121 "../src/conf/parse_opts.re" { goto opt_short; } -#line 622 "src/conf/parse_opts.cc" +#line 623 "src/conf/parse_opts.cc" yy186: ++YYCURSOR; -#line 114 "../src/conf/parse_opts.re" +#line 116 "../src/conf/parse_opts.re" { if (!opts.set_encoding (Enc::UTF8)) { error_encoding (); return EXIT_FAIL; } goto opt_short; } -#line 627 "src/conf/parse_opts.cc" +#line 628 "src/conf/parse_opts.cc" yy188: ++YYCURSOR; -#line 96 "../src/conf/parse_opts.re" +#line 98 "../src/conf/parse_opts.re" { usage (); return EXIT_OK; } -#line 632 "src/conf/parse_opts.cc" +#line 633 "src/conf/parse_opts.cc" yy190: ++YYCURSOR; -#line 102 "../src/conf/parse_opts.re" +#line 104 "../src/conf/parse_opts.re" { opts.set_target (opt_t::DOT); goto opt_short; } -#line 637 "src/conf/parse_opts.cc" +#line 638 "src/conf/parse_opts.cc" yy192: ++YYCURSOR; -#line 104 "../src/conf/parse_opts.re" +#line 106 "../src/conf/parse_opts.re" { opts.set_FFlag (true); goto opt_short; } -#line 642 "src/conf/parse_opts.cc" +#line 643 "src/conf/parse_opts.cc" yy194: ++YYCURSOR; -#line 109 "../src/conf/parse_opts.re" +#line 111 "../src/conf/parse_opts.re" { opts.set_target (opt_t::SKELETON); goto opt_short; } -#line 647 "src/conf/parse_opts.cc" +#line 648 "src/conf/parse_opts.cc" yy196: ++YYCURSOR; -#line 98 "../src/conf/parse_opts.re" +#line 100 "../src/conf/parse_opts.re" { vernum (); return EXIT_OK; } -#line 652 "src/conf/parse_opts.cc" +#line 653 "src/conf/parse_opts.cc" yy198: ++YYCURSOR; -#line 99 "../src/conf/parse_opts.re" +#line 101 "../src/conf/parse_opts.re" { opts.set_bFlag (true); goto opt_short; } -#line 657 "src/conf/parse_opts.cc" +#line 658 "src/conf/parse_opts.cc" yy200: ++YYCURSOR; -#line 100 "../src/conf/parse_opts.re" +#line 102 "../src/conf/parse_opts.re" { opts.set_cFlag (true); goto opt_short; } -#line 662 "src/conf/parse_opts.cc" +#line 663 "src/conf/parse_opts.cc" yy202: ++YYCURSOR; -#line 101 "../src/conf/parse_opts.re" +#line 103 "../src/conf/parse_opts.re" { opts.set_dFlag (true); goto opt_short; } -#line 667 "src/conf/parse_opts.cc" +#line 668 "src/conf/parse_opts.cc" yy204: ++YYCURSOR; -#line 110 "../src/conf/parse_opts.re" +#line 112 "../src/conf/parse_opts.re" { if (!opts.set_encoding (Enc::EBCDIC)) { error_encoding (); return EXIT_FAIL; } goto opt_short; } -#line 672 "src/conf/parse_opts.cc" +#line 673 "src/conf/parse_opts.cc" yy206: ++YYCURSOR; -#line 103 "../src/conf/parse_opts.re" +#line 105 "../src/conf/parse_opts.re" { opts.set_fFlag (true); goto opt_short; } -#line 677 "src/conf/parse_opts.cc" +#line 678 "src/conf/parse_opts.cc" yy208: ++YYCURSOR; -#line 105 "../src/conf/parse_opts.re" +#line 107 "../src/conf/parse_opts.re" { opts.set_gFlag (true); goto opt_short; } -#line 682 "src/conf/parse_opts.cc" +#line 683 "src/conf/parse_opts.cc" yy210: ++YYCURSOR; -#line 106 "../src/conf/parse_opts.re" +#line 108 "../src/conf/parse_opts.re" { opts.set_iFlag (true); goto opt_short; } -#line 687 "src/conf/parse_opts.cc" +#line 688 "src/conf/parse_opts.cc" yy212: ++YYCURSOR; if ((yych = (YYCTYPE)*YYCURSOR) <= 0x00) goto yy230; -#line 116 "../src/conf/parse_opts.re" +#line 118 "../src/conf/parse_opts.re" { *argv = YYCURSOR; goto opt_output; } -#line 693 "src/conf/parse_opts.cc" +#line 694 "src/conf/parse_opts.cc" yy214: ++YYCURSOR; -#line 107 "../src/conf/parse_opts.re" +#line 109 "../src/conf/parse_opts.re" { opts.set_rFlag (true); goto opt_short; } -#line 698 "src/conf/parse_opts.cc" +#line 699 "src/conf/parse_opts.cc" yy216: ++YYCURSOR; -#line 108 "../src/conf/parse_opts.re" +#line 110 "../src/conf/parse_opts.re" { opts.set_sFlag (true); goto opt_short; } -#line 703 "src/conf/parse_opts.cc" +#line 704 "src/conf/parse_opts.cc" yy218: ++YYCURSOR; if ((yych = (YYCTYPE)*YYCURSOR) <= 0x00) goto yy228; -#line 118 "../src/conf/parse_opts.re" +#line 120 "../src/conf/parse_opts.re" { *argv = YYCURSOR; goto opt_header; } -#line 709 "src/conf/parse_opts.cc" +#line 710 "src/conf/parse_opts.cc" yy220: ++YYCURSOR; -#line 111 "../src/conf/parse_opts.re" +#line 113 "../src/conf/parse_opts.re" { if (!opts.set_encoding (Enc::UTF32)) { error_encoding (); return EXIT_FAIL; } goto opt_short; } -#line 714 "src/conf/parse_opts.cc" +#line 715 "src/conf/parse_opts.cc" yy222: ++YYCURSOR; -#line 97 "../src/conf/parse_opts.re" +#line 99 "../src/conf/parse_opts.re" { version (); return EXIT_OK; } -#line 719 "src/conf/parse_opts.cc" +#line 720 "src/conf/parse_opts.cc" yy224: ++YYCURSOR; -#line 112 "../src/conf/parse_opts.re" +#line 114 "../src/conf/parse_opts.re" { if (!opts.set_encoding (Enc::UCS2)) { error_encoding (); return EXIT_FAIL; } goto opt_short; } -#line 724 "src/conf/parse_opts.cc" +#line 725 "src/conf/parse_opts.cc" yy226: ++YYCURSOR; -#line 113 "../src/conf/parse_opts.re" +#line 115 "../src/conf/parse_opts.re" { if (!opts.set_encoding (Enc::UTF16)) { error_encoding (); return EXIT_FAIL; } goto opt_short; } -#line 729 "src/conf/parse_opts.cc" +#line 730 "src/conf/parse_opts.cc" yy228: ++YYCURSOR; -#line 117 "../src/conf/parse_opts.re" +#line 119 "../src/conf/parse_opts.re" { if (!next (YYCURSOR, argv)) { error_arg ("-t, --type-header"); return EXIT_FAIL; } goto opt_header; } -#line 734 "src/conf/parse_opts.cc" +#line 735 "src/conf/parse_opts.cc" yy230: ++YYCURSOR; -#line 115 "../src/conf/parse_opts.re" +#line 117 "../src/conf/parse_opts.re" { if (!next (YYCURSOR, argv)) { error_arg ("-o, --output"); return EXIT_FAIL; } goto opt_output; } -#line 739 "src/conf/parse_opts.cc" +#line 740 "src/conf/parse_opts.cc" } -#line 120 "../src/conf/parse_opts.re" +#line 122 "../src/conf/parse_opts.re" opt_long: -#line 746 "src/conf/parse_opts.cc" +#line 747 "src/conf/parse_opts.cc" { YYCTYPE yych; yych = (YYCTYPE)*YYCURSOR; @@ -767,46 +768,46 @@ opt_long: yy234: ++YYCURSOR; yy235: -#line 125 "../src/conf/parse_opts.re" +#line 127 "../src/conf/parse_opts.re" { error ("bad long option: %s", *argv); return EXIT_FAIL; } -#line 776 "src/conf/parse_opts.cc" +#line 777 "src/conf/parse_opts.cc" yy236: yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych == 'i') goto yy532; + if (yych == 'i') goto yy541; goto yy235; yy237: yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych == 'a') goto yy492; - if (yych == 'o') goto yy493; + if (yych == 'a') goto yy501; + if (yych == 'o') goto yy502; goto yy235; yy238: yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych == 'e') goto yy479; + if (yych == 'e') goto yy488; goto yy235; yy239: yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); if (yych <= 'l') { - if (yych == 'c') goto yy441; + if (yych == 'c') goto yy450; goto yy235; } else { - if (yych <= 'm') goto yy439; - if (yych <= 'n') goto yy440; + if (yych <= 'm') goto yy448; + if (yych <= 'n') goto yy449; goto yy235; } yy240: yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych == 'l') goto yy427; + if (yych == 'l') goto yy436; goto yy235; yy241: yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych == 'e') goto yy422; + if (yych == 'e') goto yy431; goto yy235; yy242: yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych == 'n') goto yy416; + if (yych == 'n') goto yy425; goto yy235; yy243: yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); @@ -870,9 +871,9 @@ yy253: yych = (YYCTYPE)*++YYCURSOR; if (yych >= 0x01) goto yy252; ++YYCURSOR; -#line 148 "../src/conf/parse_opts.re" +#line 151 "../src/conf/parse_opts.re" { if (!opts.set_encoding (Enc::UCS2)) { error_encoding (); return EXIT_FAIL; } goto opt; } -#line 876 "src/conf/parse_opts.cc" +#line 877 "src/conf/parse_opts.cc" yy263: yych = (YYCTYPE)*++YYCURSOR; if (yych != 'r') goto yy252; @@ -894,18 +895,18 @@ yy266: yych = (YYCTYPE)*++YYCURSOR; if (yych >= 0x01) goto yy252; ++YYCURSOR; -#line 130 "../src/conf/parse_opts.re" +#line 132 "../src/conf/parse_opts.re" { version (); return EXIT_OK; } -#line 900 "src/conf/parse_opts.cc" +#line 901 "src/conf/parse_opts.cc" yy272: yych = (YYCTYPE)*++YYCURSOR; if (yych != 'm') goto yy252; yych = (YYCTYPE)*++YYCURSOR; if (yych >= 0x01) goto yy252; ++YYCURSOR; -#line 131 "../src/conf/parse_opts.re" +#line 133 "../src/conf/parse_opts.re" { vernum (); return EXIT_OK; } -#line 909 "src/conf/parse_opts.cc" +#line 910 "src/conf/parse_opts.cc" yy276: yych = (YYCTYPE)*++YYCURSOR; if (yych == 'f') goto yy285; @@ -924,9 +925,9 @@ yy277: yych = (YYCTYPE)*++YYCURSOR; if (yych >= 0x01) goto yy252; ++YYCURSOR; -#line 147 "../src/conf/parse_opts.re" +#line 150 "../src/conf/parse_opts.re" { if (!opts.set_encoding (Enc::UTF32)) { error_encoding (); return EXIT_FAIL; } goto opt; } -#line 930 "src/conf/parse_opts.cc" +#line 931 "src/conf/parse_opts.cc" yy285: yych = (YYCTYPE)*++YYCURSOR; if (yych != '-') goto yy252; @@ -942,16 +943,16 @@ yy288: yych = (YYCTYPE)*++YYCURSOR; if (yych >= 0x01) goto yy252; ++YYCURSOR; -#line 150 "../src/conf/parse_opts.re" +#line 153 "../src/conf/parse_opts.re" { if (!opts.set_encoding (Enc::UTF8)) { error_encoding (); return EXIT_FAIL; } goto opt; } -#line 948 "src/conf/parse_opts.cc" +#line 949 "src/conf/parse_opts.cc" yy291: yych = (YYCTYPE)*++YYCURSOR; if (yych >= 0x01) goto yy252; ++YYCURSOR; -#line 149 "../src/conf/parse_opts.re" +#line 152 "../src/conf/parse_opts.re" { if (!opts.set_encoding (Enc::UTF16)) { error_encoding (); return EXIT_FAIL; } goto opt; } -#line 955 "src/conf/parse_opts.cc" +#line 956 "src/conf/parse_opts.cc" yy294: yych = (YYCTYPE)*++YYCURSOR; if (yych != 'p') goto yy252; @@ -974,9 +975,9 @@ yy294: yych = (YYCTYPE)*++YYCURSOR; if (yych >= 0x01) goto yy252; ++YYCURSOR; -#line 152 "../src/conf/parse_opts.re" +#line 155 "../src/conf/parse_opts.re" { if (!next (YYCURSOR, argv)) { error_arg ("-t, --type-header"); return EXIT_FAIL; } goto opt_header; } -#line 980 "src/conf/parse_opts.cc" +#line 981 "src/conf/parse_opts.cc" yy306: yych = (YYCTYPE)*++YYCURSOR; if (yych == 'n') goto yy347; @@ -1020,9 +1021,9 @@ yy310: yych = (YYCTYPE)*++YYCURSOR; if (yych >= 0x01) goto yy252; ++YYCURSOR; -#line 136 "../src/conf/parse_opts.re" +#line 138 "../src/conf/parse_opts.re" { opts.set_fFlag (true); goto opt; } -#line 1026 "src/conf/parse_opts.cc" +#line 1027 "src/conf/parse_opts.cc" yy324: yych = (YYCTYPE)*++YYCURSOR; if (yych != 't') goto yy252; @@ -1051,9 +1052,9 @@ yy324: yych = (YYCTYPE)*++YYCURSOR; if (yych >= 0x01) goto yy252; ++YYCURSOR; -#line 133 "../src/conf/parse_opts.re" +#line 135 "../src/conf/parse_opts.re" { opts.set_cFlag (true); goto opt; } -#line 1057 "src/conf/parse_opts.cc" +#line 1058 "src/conf/parse_opts.cc" yy339: yych = (YYCTYPE)*++YYCURSOR; if (yych != 'l') goto yy252; @@ -1068,9 +1069,9 @@ yy339: yych = (YYCTYPE)*++YYCURSOR; if (yych >= 0x01) goto yy252; ++YYCURSOR; -#line 145 "../src/conf/parse_opts.re" +#line 148 "../src/conf/parse_opts.re" { opts.set_target (opt_t::SKELETON); goto opt; } -#line 1074 "src/conf/parse_opts.cc" +#line 1075 "src/conf/parse_opts.cc" yy347: yych = (YYCTYPE)*++YYCURSOR; if (yych != 'g') goto yy252; @@ -1091,9 +1092,9 @@ yy347: yych = (YYCTYPE)*++YYCURSOR; if (yych >= 0x01) goto yy252; ++YYCURSOR; -#line 156 "../src/conf/parse_opts.re" +#line 159 "../src/conf/parse_opts.re" { goto opt; } -#line 1097 "src/conf/parse_opts.cc" +#line 1098 "src/conf/parse_opts.cc" yy358: yych = (YYCTYPE)*++YYCURSOR; if (yych != 'u') goto yy252; @@ -1110,9 +1111,9 @@ yy358: yych = (YYCTYPE)*++YYCURSOR; if (yych >= 0x01) goto yy252; ++YYCURSOR; -#line 140 "../src/conf/parse_opts.re" +#line 142 "../src/conf/parse_opts.re" { opts.set_rFlag (true); goto opt; } -#line 1116 "src/conf/parse_opts.cc" +#line 1117 "src/conf/parse_opts.cc" yy367: yych = (YYCTYPE)*++YYCURSOR; if (yych != 't') goto yy252; @@ -1125,9 +1126,9 @@ yy367: yych = (YYCTYPE)*++YYCURSOR; if (yych >= 0x01) goto yy252; ++YYCURSOR; -#line 151 "../src/conf/parse_opts.re" +#line 154 "../src/conf/parse_opts.re" { if (!next (YYCURSOR, argv)) { error_arg ("-o, --output"); return EXIT_FAIL; } goto opt_output; } -#line 1131 "src/conf/parse_opts.cc" +#line 1132 "src/conf/parse_opts.cc" yy374: yych = (YYCTYPE)*++YYCURSOR; if (yych == '-') goto yy386; @@ -1152,18 +1153,27 @@ yy375: yych = (YYCTYPE)*++YYCURSOR; if (yych >= 0x01) goto yy252; ++YYCURSOR; -#line 141 "../src/conf/parse_opts.re" +#line 143 "../src/conf/parse_opts.re" { opts.set_sFlag (true); goto opt; } -#line 1158 "src/conf/parse_opts.cc" +#line 1159 "src/conf/parse_opts.cc" yy386: yych = (YYCTYPE)*++YYCURSOR; - if (yych == 'd') goto yy388; - if (yych != 'g') goto yy252; + if (yych <= 'f') { + if (yych == 'd') goto yy389; + goto yy252; + } else { + if (yych <= 'g') goto yy388; + if (yych != 'v') goto yy252; + } yych = (YYCTYPE)*++YYCURSOR; - if (yych == 'e') goto yy400; + if (yych == 'e') goto yy417; goto yy252; yy388: yych = (YYCTYPE)*++YYCURSOR; + if (yych == 'e') goto yy401; + goto yy252; +yy389: + yych = (YYCTYPE)*++YYCURSOR; if (yych != 'e') goto yy252; yych = (YYCTYPE)*++YYCURSOR; if (yych != 'b') goto yy252; @@ -1184,10 +1194,10 @@ yy388: yych = (YYCTYPE)*++YYCURSOR; if (yych >= 0x01) goto yy252; ++YYCURSOR; -#line 139 "../src/conf/parse_opts.re" +#line 141 "../src/conf/parse_opts.re" { opts.set_iFlag (true); goto opt; } -#line 1190 "src/conf/parse_opts.cc" -yy400: +#line 1200 "src/conf/parse_opts.cc" +yy401: yych = (YYCTYPE)*++YYCURSOR; if (yych != 'n') goto yy252; yych = (YYCTYPE)*++YYCURSOR; @@ -1217,10 +1227,27 @@ yy400: yych = (YYCTYPE)*++YYCURSOR; if (yych >= 0x01) goto yy252; ++YYCURSOR; -#line 142 "../src/conf/parse_opts.re" +#line 144 "../src/conf/parse_opts.re" { opts.set_bNoGenerationDate (true); goto opt; } -#line 1223 "src/conf/parse_opts.cc" -yy416: +#line 1233 "src/conf/parse_opts.cc" +yy417: + yych = (YYCTYPE)*++YYCURSOR; + if (yych != 'r') goto yy252; + yych = (YYCTYPE)*++YYCURSOR; + if (yych != 's') goto yy252; + yych = (YYCTYPE)*++YYCURSOR; + if (yych != 'i') goto yy252; + yych = (YYCTYPE)*++YYCURSOR; + if (yych != 'o') goto yy252; + yych = (YYCTYPE)*++YYCURSOR; + if (yych != 'n') goto yy252; + yych = (YYCTYPE)*++YYCURSOR; + if (yych >= 0x01) goto yy252; + ++YYCURSOR; +#line 145 "../src/conf/parse_opts.re" + { opts.set_version (false); goto opt; } +#line 1250 "src/conf/parse_opts.cc" +yy425: yych = (YYCTYPE)*++YYCURSOR; if (yych != 'p') goto yy252; yych = (YYCTYPE)*++YYCURSOR; @@ -1230,10 +1257,10 @@ yy416: yych = (YYCTYPE)*++YYCURSOR; if (yych >= 0x01) goto yy252; ++YYCURSOR; -#line 154 "../src/conf/parse_opts.re" +#line 157 "../src/conf/parse_opts.re" { goto opt_input; } -#line 1236 "src/conf/parse_opts.cc" -yy422: +#line 1263 "src/conf/parse_opts.cc" +yy431: yych = (YYCTYPE)*++YYCURSOR; if (yych != 'l') goto yy252; yych = (YYCTYPE)*++YYCURSOR; @@ -1241,10 +1268,10 @@ yy422: yych = (YYCTYPE)*++YYCURSOR; if (yych >= 0x01) goto yy252; ++YYCURSOR; -#line 129 "../src/conf/parse_opts.re" +#line 131 "../src/conf/parse_opts.re" { usage (); return EXIT_OK; } -#line 1247 "src/conf/parse_opts.cc" -yy427: +#line 1274 "src/conf/parse_opts.cc" +yy436: yych = (YYCTYPE)*++YYCURSOR; if (yych != 'e') goto yy252; yych = (YYCTYPE)*++YYCURSOR; @@ -1266,28 +1293,28 @@ yy427: yych = (YYCTYPE)*++YYCURSOR; if (yych >= 0x01) goto yy252; ++YYCURSOR; -#line 137 "../src/conf/parse_opts.re" +#line 139 "../src/conf/parse_opts.re" { opts.set_FFlag (true); goto opt; } -#line 1272 "src/conf/parse_opts.cc" -yy439: +#line 1299 "src/conf/parse_opts.cc" +yy448: yych = (YYCTYPE)*++YYCURSOR; - if (yych == 'i') goto yy460; - if (yych == 'p') goto yy461; + if (yych == 'i') goto yy469; + if (yych == 'p') goto yy470; goto yy252; -yy440: +yy449: yych = (YYCTYPE)*++YYCURSOR; - if (yych == 'c') goto yy445; + if (yych == 'c') goto yy454; goto yy252; -yy441: +yy450: yych = (YYCTYPE)*++YYCURSOR; if (yych != 'b') goto yy252; yych = (YYCTYPE)*++YYCURSOR; if (yych >= 0x01) goto yy252; ++YYCURSOR; -#line 146 "../src/conf/parse_opts.re" +#line 149 "../src/conf/parse_opts.re" { if (!opts.set_encoding (Enc::EBCDIC)) { error_encoding (); return EXIT_FAIL; } goto opt; } -#line 1290 "src/conf/parse_opts.cc" -yy445: +#line 1317 "src/conf/parse_opts.cc" +yy454: yych = (YYCTYPE)*++YYCURSOR; if (yych != 'o') goto yy252; yych = (YYCTYPE)*++YYCURSOR; @@ -1315,14 +1342,14 @@ yy445: yych = (YYCTYPE)*++YYCURSOR; if (yych >= 0x01) goto yy252; ++YYCURSOR; -#line 153 "../src/conf/parse_opts.re" +#line 156 "../src/conf/parse_opts.re" { goto opt_encoding_policy; } -#line 1321 "src/conf/parse_opts.cc" -yy460: +#line 1348 "src/conf/parse_opts.cc" +yy469: yych = (YYCTYPE)*++YYCURSOR; - if (yych == 't') goto yy472; + if (yych == 't') goto yy481; goto yy252; -yy461: +yy470: yych = (YYCTYPE)*++YYCURSOR; if (yych != 't') goto yy252; yych = (YYCTYPE)*++YYCURSOR; @@ -1342,10 +1369,10 @@ yy461: yych = (YYCTYPE)*++YYCURSOR; if (yych >= 0x01) goto yy252; ++YYCURSOR; -#line 155 "../src/conf/parse_opts.re" +#line 158 "../src/conf/parse_opts.re" { goto opt_empty_class; } -#line 1348 "src/conf/parse_opts.cc" -yy472: +#line 1375 "src/conf/parse_opts.cc" +yy481: yych = (YYCTYPE)*++YYCURSOR; if (yych != '-') goto yy252; yych = (YYCTYPE)*++YYCURSOR; @@ -1357,10 +1384,10 @@ yy472: yych = (YYCTYPE)*++YYCURSOR; if (yych >= 0x01) goto yy252; ++YYCURSOR; -#line 135 "../src/conf/parse_opts.re" +#line 137 "../src/conf/parse_opts.re" { opts.set_target (opt_t::DOT); goto opt; } -#line 1363 "src/conf/parse_opts.cc" -yy479: +#line 1390 "src/conf/parse_opts.cc" +yy488: yych = (YYCTYPE)*++YYCURSOR; if (yych != 'b') goto yy252; yych = (YYCTYPE)*++YYCURSOR; @@ -1384,14 +1411,14 @@ yy479: yych = (YYCTYPE)*++YYCURSOR; if (yych >= 0x01) goto yy252; ++YYCURSOR; -#line 134 "../src/conf/parse_opts.re" +#line 136 "../src/conf/parse_opts.re" { opts.set_dFlag (true); goto opt; } -#line 1390 "src/conf/parse_opts.cc" -yy492: +#line 1417 "src/conf/parse_opts.cc" +yy501: yych = (YYCTYPE)*++YYCURSOR; - if (yych == 's') goto yy508; + if (yych == 's') goto yy517; goto yy252; -yy493: +yy502: yych = (YYCTYPE)*++YYCURSOR; if (yych != 'm') goto yy252; yych = (YYCTYPE)*++YYCURSOR; @@ -1419,10 +1446,10 @@ yy493: yych = (YYCTYPE)*++YYCURSOR; if (yych >= 0x01) goto yy252; ++YYCURSOR; -#line 138 "../src/conf/parse_opts.re" +#line 140 "../src/conf/parse_opts.re" { opts.set_gFlag (true); goto opt; } -#line 1425 "src/conf/parse_opts.cc" -yy508: +#line 1452 "src/conf/parse_opts.cc" +yy517: yych = (YYCTYPE)*++YYCURSOR; if (yych != 'e') goto yy252; yych = (YYCTYPE)*++YYCURSOR; @@ -1432,12 +1459,12 @@ yy508: yych = (YYCTYPE)*++YYCURSOR; if (yych != 'n') goto yy252; yych = (YYCTYPE)*++YYCURSOR; - if (yych == 's') goto yy514; + if (yych == 's') goto yy523; if (yych != 'v') goto yy252; yych = (YYCTYPE)*++YYCURSOR; - if (yych == 'e') goto yy525; + if (yych == 'e') goto yy534; goto yy252; -yy514: +yy523: yych = (YYCTYPE)*++YYCURSOR; if (yych != 'e') goto yy252; yych = (YYCTYPE)*++YYCURSOR; @@ -1457,10 +1484,10 @@ yy514: yych = (YYCTYPE)*++YYCURSOR; if (yych >= 0x01) goto yy252; ++YYCURSOR; -#line 143 "../src/conf/parse_opts.re" +#line 146 "../src/conf/parse_opts.re" { opts.set_bCaseInsensitive (true); goto opt; } -#line 1463 "src/conf/parse_opts.cc" -yy525: +#line 1490 "src/conf/parse_opts.cc" +yy534: yych = (YYCTYPE)*++YYCURSOR; if (yych != 'r') goto yy252; yych = (YYCTYPE)*++YYCURSOR; @@ -1472,10 +1499,10 @@ yy525: yych = (YYCTYPE)*++YYCURSOR; if (yych >= 0x01) goto yy252; ++YYCURSOR; -#line 144 "../src/conf/parse_opts.re" +#line 147 "../src/conf/parse_opts.re" { opts.set_bCaseInverted (true); goto opt; } -#line 1478 "src/conf/parse_opts.cc" -yy532: +#line 1505 "src/conf/parse_opts.cc" +yy541: yych = (YYCTYPE)*++YYCURSOR; if (yych != 't') goto yy252; yych = (YYCTYPE)*++YYCURSOR; @@ -1497,16 +1524,16 @@ yy532: yych = (YYCTYPE)*++YYCURSOR; if (yych >= 0x01) goto yy252; ++YYCURSOR; -#line 132 "../src/conf/parse_opts.re" +#line 134 "../src/conf/parse_opts.re" { opts.set_bFlag (true); goto opt; } -#line 1503 "src/conf/parse_opts.cc" +#line 1530 "src/conf/parse_opts.cc" } -#line 157 "../src/conf/parse_opts.re" +#line 160 "../src/conf/parse_opts.re" opt_output: -#line 1510 "src/conf/parse_opts.cc" +#line 1537 "src/conf/parse_opts.cc" { YYCTYPE yych; static const unsigned char yybm[] = { @@ -1544,37 +1571,37 @@ opt_output: 128, 128, 128, 128, 128, 128, 128, 128, }; yych = (YYCTYPE)*YYCURSOR; - if (yych <= 0x00) goto yy546; - if (yych != '-') goto yy548; -yy546: + if (yych <= 0x00) goto yy555; + if (yych != '-') goto yy557; +yy555: ++YYCURSOR; -#line 162 "../src/conf/parse_opts.re" +#line 165 "../src/conf/parse_opts.re" { error ("bad argument to option -o, --output: %s", *argv); return EXIT_FAIL; } -#line 1557 "src/conf/parse_opts.cc" -yy548: - yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - goto yy550; -yy549: +#line 1584 "src/conf/parse_opts.cc" +yy557: + yych = (YYCTYPE)*++YYCURSOR; + goto yy559; +yy558: ++YYCURSOR; yych = (YYCTYPE)*YYCURSOR; -yy550: +yy559: if (yybm[0+yych] & 128) { - goto yy549; + goto yy558; } ++YYCURSOR; -#line 166 "../src/conf/parse_opts.re" +#line 169 "../src/conf/parse_opts.re" { if (!opts.output (*argv)) return EXIT_FAIL; goto opt; } -#line 1571 "src/conf/parse_opts.cc" +#line 1598 "src/conf/parse_opts.cc" } -#line 167 "../src/conf/parse_opts.re" +#line 170 "../src/conf/parse_opts.re" opt_header: -#line 1578 "src/conf/parse_opts.cc" +#line 1605 "src/conf/parse_opts.cc" { YYCTYPE yych; static const unsigned char yybm[] = { @@ -1612,32 +1639,32 @@ opt_header: 128, 128, 128, 128, 128, 128, 128, 128, }; yych = (YYCTYPE)*YYCURSOR; - if (yych <= 0x00) goto yy555; - if (yych != '-') goto yy557; -yy555: + if (yych <= 0x00) goto yy564; + if (yych != '-') goto yy566; +yy564: ++YYCURSOR; -#line 172 "../src/conf/parse_opts.re" +#line 175 "../src/conf/parse_opts.re" { error ("bad argument to option -t, --type-header: %s", *argv); return EXIT_FAIL; } -#line 1625 "src/conf/parse_opts.cc" -yy557: - yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - goto yy559; -yy558: +#line 1652 "src/conf/parse_opts.cc" +yy566: + yych = (YYCTYPE)*++YYCURSOR; + goto yy568; +yy567: ++YYCURSOR; yych = (YYCTYPE)*YYCURSOR; -yy559: +yy568: if (yybm[0+yych] & 128) { - goto yy558; + goto yy567; } ++YYCURSOR; -#line 176 "../src/conf/parse_opts.re" +#line 179 "../src/conf/parse_opts.re" { opts.set_header_file (*argv); goto opt; } -#line 1639 "src/conf/parse_opts.cc" +#line 1666 "src/conf/parse_opts.cc" } -#line 177 "../src/conf/parse_opts.re" +#line 180 "../src/conf/parse_opts.re" opt_encoding_policy: @@ -1647,89 +1674,89 @@ opt_encoding_policy: return EXIT_FAIL; } -#line 1651 "src/conf/parse_opts.cc" +#line 1678 "src/conf/parse_opts.cc" { YYCTYPE yych; yych = (YYCTYPE)*YYCURSOR; if (yych <= 'h') { - if (yych == 'f') goto yy566; + if (yych == 'f') goto yy575; } else { - if (yych <= 'i') goto yy567; - if (yych == 's') goto yy568; + if (yych <= 'i') goto yy576; + if (yych == 's') goto yy577; } ++YYCURSOR; -yy565: -#line 187 "../src/conf/parse_opts.re" +yy574: +#line 190 "../src/conf/parse_opts.re" { error ("bad argument to option --encoding-policy (expected: ignore | substitute | fail): %s", *argv); return EXIT_FAIL; } -#line 1668 "src/conf/parse_opts.cc" -yy566: +#line 1695 "src/conf/parse_opts.cc" +yy575: yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych == 'a') goto yy588; - goto yy565; -yy567: + if (yych == 'a') goto yy597; + goto yy574; +yy576: yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych == 'g') goto yy581; - goto yy565; -yy568: + if (yych == 'g') goto yy590; + goto yy574; +yy577: yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych != 'u') goto yy565; + if (yych != 'u') goto yy574; yych = (YYCTYPE)*++YYCURSOR; - if (yych == 'b') goto yy571; -yy570: + if (yych == 'b') goto yy580; +yy579: YYCURSOR = YYMARKER; - goto yy565; -yy571: + goto yy574; +yy580: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 's') goto yy570; + if (yych != 's') goto yy579; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 't') goto yy570; + if (yych != 't') goto yy579; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'i') goto yy570; + if (yych != 'i') goto yy579; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 't') goto yy570; + if (yych != 't') goto yy579; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'u') goto yy570; + if (yych != 'u') goto yy579; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 't') goto yy570; + if (yych != 't') goto yy579; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'e') goto yy570; + if (yych != 'e') goto yy579; yych = (YYCTYPE)*++YYCURSOR; - if (yych >= 0x01) goto yy570; + if (yych >= 0x01) goto yy579; ++YYCURSOR; -#line 192 "../src/conf/parse_opts.re" +#line 195 "../src/conf/parse_opts.re" { opts.set_encoding_policy (Enc::POLICY_SUBSTITUTE); goto opt; } -#line 1705 "src/conf/parse_opts.cc" -yy581: +#line 1732 "src/conf/parse_opts.cc" +yy590: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'n') goto yy570; + if (yych != 'n') goto yy579; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'o') goto yy570; + if (yych != 'o') goto yy579; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'r') goto yy570; + if (yych != 'r') goto yy579; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'e') goto yy570; + if (yych != 'e') goto yy579; yych = (YYCTYPE)*++YYCURSOR; - if (yych >= 0x01) goto yy570; + if (yych >= 0x01) goto yy579; ++YYCURSOR; -#line 191 "../src/conf/parse_opts.re" +#line 194 "../src/conf/parse_opts.re" { opts.set_encoding_policy (Enc::POLICY_IGNORE); goto opt; } -#line 1720 "src/conf/parse_opts.cc" -yy588: +#line 1747 "src/conf/parse_opts.cc" +yy597: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'i') goto yy570; + if (yych != 'i') goto yy579; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'l') goto yy570; + if (yych != 'l') goto yy579; yych = (YYCTYPE)*++YYCURSOR; - if (yych >= 0x01) goto yy570; + if (yych >= 0x01) goto yy579; ++YYCURSOR; -#line 193 "../src/conf/parse_opts.re" +#line 196 "../src/conf/parse_opts.re" { opts.set_encoding_policy (Enc::POLICY_FAIL); goto opt; } -#line 1731 "src/conf/parse_opts.cc" +#line 1758 "src/conf/parse_opts.cc" } -#line 194 "../src/conf/parse_opts.re" +#line 197 "../src/conf/parse_opts.re" opt_input: @@ -1739,66 +1766,66 @@ opt_input: return EXIT_FAIL; } -#line 1743 "src/conf/parse_opts.cc" +#line 1770 "src/conf/parse_opts.cc" { YYCTYPE yych; yych = (YYCTYPE)*YYCURSOR; - if (yych <= 'b') goto yy595; - if (yych <= 'c') goto yy597; - if (yych <= 'd') goto yy598; -yy595: + if (yych <= 'b') goto yy604; + if (yych <= 'c') goto yy606; + if (yych <= 'd') goto yy607; +yy604: ++YYCURSOR; -yy596: -#line 204 "../src/conf/parse_opts.re" +yy605: +#line 207 "../src/conf/parse_opts.re" { error ("bad argument to option --input (expected: default | custom): %s", *argv); return EXIT_FAIL; } -#line 1758 "src/conf/parse_opts.cc" -yy597: +#line 1785 "src/conf/parse_opts.cc" +yy606: yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych == 'u') goto yy608; - goto yy596; -yy598: + if (yych == 'u') goto yy617; + goto yy605; +yy607: yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych != 'e') goto yy596; + if (yych != 'e') goto yy605; yych = (YYCTYPE)*++YYCURSOR; - if (yych == 'f') goto yy601; -yy600: + if (yych == 'f') goto yy610; +yy609: YYCURSOR = YYMARKER; - goto yy596; -yy601: + goto yy605; +yy610: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'a') goto yy600; + if (yych != 'a') goto yy609; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'u') goto yy600; + if (yych != 'u') goto yy609; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'l') goto yy600; + if (yych != 'l') goto yy609; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 't') goto yy600; + if (yych != 't') goto yy609; yych = (YYCTYPE)*++YYCURSOR; - if (yych >= 0x01) goto yy600; + if (yych >= 0x01) goto yy609; ++YYCURSOR; -#line 208 "../src/conf/parse_opts.re" +#line 211 "../src/conf/parse_opts.re" { opts.set_input_api (InputAPI::DEFAULT); goto opt; } -#line 1785 "src/conf/parse_opts.cc" -yy608: +#line 1812 "src/conf/parse_opts.cc" +yy617: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 's') goto yy600; + if (yych != 's') goto yy609; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 't') goto yy600; + if (yych != 't') goto yy609; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'o') goto yy600; + if (yych != 'o') goto yy609; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'm') goto yy600; + if (yych != 'm') goto yy609; yych = (YYCTYPE)*++YYCURSOR; - if (yych >= 0x01) goto yy600; + if (yych >= 0x01) goto yy609; ++YYCURSOR; -#line 209 "../src/conf/parse_opts.re" +#line 212 "../src/conf/parse_opts.re" { opts.set_input_api (InputAPI::CUSTOM); goto opt; } -#line 1800 "src/conf/parse_opts.cc" +#line 1827 "src/conf/parse_opts.cc" } -#line 210 "../src/conf/parse_opts.re" +#line 213 "../src/conf/parse_opts.re" opt_empty_class: @@ -1808,88 +1835,88 @@ opt_empty_class: return EXIT_FAIL; } -#line 1812 "src/conf/parse_opts.cc" +#line 1839 "src/conf/parse_opts.cc" { YYCTYPE yych; yych = (YYCTYPE)*YYCURSOR; - if (yych == 'e') goto yy619; - if (yych == 'm') goto yy620; + if (yych == 'e') goto yy628; + if (yych == 'm') goto yy629; ++YYCURSOR; -yy618: -#line 220 "../src/conf/parse_opts.re" +yy627: +#line 223 "../src/conf/parse_opts.re" { error ("bad argument to option --empty-class (expected: match-empty | match-none | error): %s", *argv); return EXIT_FAIL; } -#line 1825 "src/conf/parse_opts.cc" -yy619: +#line 1852 "src/conf/parse_opts.cc" +yy628: yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych == 'r') goto yy640; - goto yy618; -yy620: + if (yych == 'r') goto yy649; + goto yy627; +yy629: yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych != 'a') goto yy618; + if (yych != 'a') goto yy627; yych = (YYCTYPE)*++YYCURSOR; - if (yych == 't') goto yy623; -yy622: + if (yych == 't') goto yy632; +yy631: YYCURSOR = YYMARKER; - goto yy618; -yy623: + goto yy627; +yy632: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'c') goto yy622; + if (yych != 'c') goto yy631; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'h') goto yy622; + if (yych != 'h') goto yy631; yych = (YYCTYPE)*++YYCURSOR; - if (yych != '-') goto yy622; + if (yych != '-') goto yy631; yych = (YYCTYPE)*++YYCURSOR; - if (yych == 'e') goto yy627; - if (yych == 'n') goto yy628; - goto yy622; -yy627: + if (yych == 'e') goto yy636; + if (yych == 'n') goto yy637; + goto yy631; +yy636: yych = (YYCTYPE)*++YYCURSOR; - if (yych == 'm') goto yy634; - goto yy622; -yy628: + if (yych == 'm') goto yy643; + goto yy631; +yy637: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'o') goto yy622; + if (yych != 'o') goto yy631; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'n') goto yy622; + if (yych != 'n') goto yy631; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'e') goto yy622; + if (yych != 'e') goto yy631; yych = (YYCTYPE)*++YYCURSOR; - if (yych >= 0x01) goto yy622; + if (yych >= 0x01) goto yy631; ++YYCURSOR; -#line 225 "../src/conf/parse_opts.re" +#line 228 "../src/conf/parse_opts.re" { opts.set_empty_class_policy (EMPTY_CLASS_MATCH_NONE); goto opt; } -#line 1865 "src/conf/parse_opts.cc" -yy634: +#line 1892 "src/conf/parse_opts.cc" +yy643: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'p') goto yy622; + if (yych != 'p') goto yy631; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 't') goto yy622; + if (yych != 't') goto yy631; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'y') goto yy622; + if (yych != 'y') goto yy631; yych = (YYCTYPE)*++YYCURSOR; - if (yych >= 0x01) goto yy622; + if (yych >= 0x01) goto yy631; ++YYCURSOR; -#line 224 "../src/conf/parse_opts.re" +#line 227 "../src/conf/parse_opts.re" { opts.set_empty_class_policy (EMPTY_CLASS_MATCH_EMPTY); goto opt; } -#line 1878 "src/conf/parse_opts.cc" -yy640: +#line 1905 "src/conf/parse_opts.cc" +yy649: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'r') goto yy622; + if (yych != 'r') goto yy631; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'o') goto yy622; + if (yych != 'o') goto yy631; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'r') goto yy622; + if (yych != 'r') goto yy631; yych = (YYCTYPE)*++YYCURSOR; - if (yych >= 0x01) goto yy622; + if (yych >= 0x01) goto yy631; ++YYCURSOR; -#line 226 "../src/conf/parse_opts.re" +#line 229 "../src/conf/parse_opts.re" { opts.set_empty_class_policy (EMPTY_CLASS_ERROR); goto opt; } -#line 1891 "src/conf/parse_opts.cc" +#line 1918 "src/conf/parse_opts.cc" } -#line 227 "../src/conf/parse_opts.re" +#line 230 "../src/conf/parse_opts.re" end: diff --git a/bootstrap/src/parse/lex.cc b/bootstrap/src/parse/lex.cc index 37a4cd14..9169c2a9 100644 --- a/bootstrap/src/parse/lex.cc +++ b/bootstrap/src/parse/lex.cc @@ -1,19 +1,28 @@ -/* Generated by re2c 0.14.3 on Mon Nov 23 21:19:03 2015 */ +/* Generated by re2c 0.15.3 on Wed Dec 2 12:10:03 2015 */ #line 1 "../src/parse/lex.re" -#include <stdlib.h> +#include "src/util/c99_stdint.h" +#include <stddef.h> #include <string.h> -#include <iostream> -#include <sstream> +#include <algorithm> +#include <limits> +#include <string> -#include "src/ir/dfa/dfa.h" -#include "src/ir/regexp/regexp_null.h" +#include "src/codegen/output.h" +#include "src/conf/opt.h" +#include "src/conf/warn.h" #include "src/globals.h" +#include "src/ir/regexp/encoding/enc.h" +#include "src/ir/regexp/regexp.h" +#include "src/ir/regexp/regexp_null.h" +#include "src/parse/code.h" #include "src/parse/extop.h" -#include "src/parse/parser.h" +#include "src/parse/input.h" #include "src/parse/scanner.h" +#include "src/parse/parser.h" // needed by "y.tab.h" #include "src/parse/unescape.h" -#include "y.tab.h" +#include "src/util/range.h" #include "src/util/s_to_n32_unsafe.h" +#include "y.tab.h" extern YYSTYPE yylval; @@ -30,10 +39,10 @@ namespace re2c // source code is in ASCII: pointers have type 'char *' // but re2c makes an implicit assumption that YYCTYPE is unsigned // when it generates comparisons -#line 33 "../src/parse/lex.re" +#line 42 "../src/parse/lex.re" -#line 53 "../src/parse/lex.re" +#line 62 "../src/parse/lex.re" Scanner::ParseMode Scanner::echo() @@ -49,7 +58,7 @@ Scanner::ParseMode Scanner::echo() tok = cur; echo: -#line 53 "src/parse/lex.cc" +#line 62 "src/parse/lex.cc" { YYCTYPE yych; unsigned int yyaccept = 0; @@ -87,7 +96,6 @@ echo: 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, }; - if ((YYLIMIT - YYCURSOR) < 16) YYFILL(16); yych = (YYCTYPE)*YYCURSOR; if (yych <= '%') { @@ -108,11 +116,11 @@ echo: } } ++YYCURSOR; -#line 196 "../src/parse/lex.re" +#line 202 "../src/parse/lex.re" { if (!ignore_eoc && opts->target == opt_t::CODE) { - out.write(tok, tok_len () - 1); + out.wraw(tok, tok_len () - 1); // -1 so we don't write out the \0 } if(cur == eof) @@ -120,15 +128,15 @@ echo: return Stop; } } -#line 124 "src/parse/lex.cc" +#line 132 "src/parse/lex.cc" yy4: ++YYCURSOR; yy5: -#line 207 "../src/parse/lex.re" +#line 213 "../src/parse/lex.re" { goto echo; } -#line 132 "src/parse/lex.cc" +#line 140 "src/parse/lex.cc" yy6: yyaccept = 0; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); @@ -137,7 +145,7 @@ yy6: } if (yych == '#') goto yy91; yy7: -#line 183 "../src/parse/lex.re" +#line 189 "../src/parse/lex.re" { if (ignore_eoc) { @@ -145,13 +153,13 @@ yy7: } else if (opts->target == opt_t::CODE) { - out.write(tok, tok_len ()); + out.wraw(tok, tok_len ()); } tok = pos = cur; cline++; goto echo; } -#line 155 "src/parse/lex.cc" +#line 163 "src/parse/lex.cc" yy8: yych = (YYCTYPE)*++YYCURSOR; if (yych == '{') goto yy32; @@ -235,7 +243,7 @@ yy21: yych = (YYCTYPE)*++YYCURSOR; if (yych != 'c') goto yy12; ++YYCURSOR; -#line 84 "../src/parse/lex.re" +#line 93 "../src/parse/lex.re" { if (opts->rFlag) { @@ -248,13 +256,13 @@ yy21: tok = cur; return Rules; } -#line 252 "src/parse/lex.cc" +#line 260 "src/parse/lex.cc" yy31: yych = (YYCTYPE)*++YYCURSOR; if (yych != 'c') goto yy12; yy32: ++YYCURSOR; -#line 69 "../src/parse/lex.re" +#line 78 "../src/parse/lex.re" { if (opts->rFlag) { @@ -265,12 +273,12 @@ yy32: const size_t lexeme_len = cur[-1] == '{' ? sizeof ("%{") - 1 : sizeof ("/*!re2c") - 1; - out.write(tok, tok_len () - lexeme_len); + out.wraw(tok, tok_len () - lexeme_len); } tok = cur; return Parse; } -#line 274 "src/parse/lex.cc" +#line 282 "src/parse/lex.cc" yy34: yych = (YYCTYPE)*++YYCURSOR; if (yych != 'e') goto yy12; @@ -285,7 +293,7 @@ yy34: yych = (YYCTYPE)*++YYCURSOR; if (yych != 'c') goto yy12; ++YYCURSOR; -#line 96 "../src/parse/lex.re" +#line 105 "../src/parse/lex.re" { if (!opts->rFlag) { @@ -295,12 +303,12 @@ yy34: if (opts->target == opt_t::CODE) { const size_t lexeme_len = sizeof ("/*!use:re2c") - 1; - out.write(tok, tok_len () - lexeme_len); + out.wraw(tok, tok_len () - lexeme_len); } tok = cur; return Reuse; } -#line 304 "src/parse/lex.cc" +#line 312 "src/parse/lex.cc" yy42: yych = (YYCTYPE)*++YYCURSOR; if (yych != 'x') goto yy12; @@ -315,17 +323,17 @@ yy42: yych = (YYCTYPE)*++YYCURSOR; if (yych != 'c') goto yy12; ++YYCURSOR; -#line 110 "../src/parse/lex.re" +#line 119 "../src/parse/lex.re" { if (opts->target != opt_t::DOT) { - out.insert_yymaxfill (); + out.wdelay_yymaxfill (); } tok = pos = cur; ignore_eoc = true; goto echo; } -#line 329 "src/parse/lex.cc" +#line 337 "src/parse/lex.cc" yy50: yych = (YYCTYPE)*++YYCURSOR; if (yych != 't') goto yy12; @@ -350,14 +358,14 @@ yy50: yych = (YYCTYPE)*++YYCURSOR; if (yych != 'c') goto yy12; ++YYCURSOR; -#line 119 "../src/parse/lex.re" +#line 128 "../src/parse/lex.re" { tok = pos = cur; - out.insert_state_goto (opts->topIndent); + out.wdelay_state_goto (opts->topIndent); ignore_eoc = true; goto echo; } -#line 361 "src/parse/lex.cc" +#line 369 "src/parse/lex.cc" yy63: yych = (YYCTYPE)*++YYCURSOR; if (yych != 'n') goto yy12; @@ -378,13 +386,13 @@ yy63: yych = (YYCTYPE)*++YYCURSOR; if (yych != 'c') goto yy12; ++YYCURSOR; -#line 125 "../src/parse/lex.re" +#line 134 "../src/parse/lex.re" { tok = pos = cur; ignore_eoc = true; goto echo; } -#line 388 "src/parse/lex.cc" +#line 396 "src/parse/lex.cc" yy74: yych = (YYCTYPE)*++YYCURSOR; if (yych != 'p') goto yy12; @@ -403,72 +411,69 @@ yy74: yych = (YYCTYPE)*++YYCURSOR; if (yych != 'c') goto yy12; ++YYCURSOR; -#line 130 "../src/parse/lex.re" +#line 139 "../src/parse/lex.re" { tok = pos = cur; ignore_eoc = true; if (opts->target != opt_t::DOT) { - out.insert_line_info (); - out << "\n"; - out.insert_types (); - out << "\n"; - out.write_line_info (cline, get_fname ().c_str ()); + out.wdelay_line_info ().ws("\n") + .wdelay_types ().ws("\n") + .wline_info (cline, get_fname ().c_str ()); } goto echo; } -#line 421 "src/parse/lex.cc" +#line 427 "src/parse/lex.cc" yy84: yyaccept = 2; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); if (yych == '\n') goto yy87; if (yych == '\r') goto yy86; yy85: -#line 161 "../src/parse/lex.re" +#line 168 "../src/parse/lex.re" { if (ignore_eoc) { if (ignore_cnt) { - out << "\n"; - out.write_line_info (cline, get_fname ().c_str ()); + out.ws("\n").wline_info (cline, get_fname ().c_str ()); } ignore_eoc = false; ignore_cnt = 0; } else if (opts->target == opt_t::CODE) { - out.write(tok, tok_len ()); + out.wraw(tok, tok_len ()); } tok = pos = cur; goto echo; } -#line 447 "src/parse/lex.cc" +#line 452 "src/parse/lex.cc" yy86: yych = (YYCTYPE)*++YYCURSOR; if (yych != '\n') goto yy12; yy87: ++YYCURSOR; -#line 143 "../src/parse/lex.re" +#line 150 "../src/parse/lex.re" { cline++; if (ignore_eoc) { if (ignore_cnt) { - out.write_line_info (cline, get_fname ().c_str ()); + out.wline_info (cline, get_fname ().c_str ()); } ignore_eoc = false; ignore_cnt = 0; } else if (opts->target == opt_t::CODE) { - out.write(tok, tok_len ()); + out.wraw(tok, tok_len ()); } tok = pos = cur; goto echo; } -#line 472 "src/parse/lex.cc" +#line 477 "src/parse/lex.cc" yy89: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); @@ -499,10 +504,10 @@ yy91: if (yych <= '9') goto yy12; goto yy98; yy97: - YYCTXMARKER = YYCURSOR + 1; ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; + YYCTXMARKER = YYCURSOR; yy98: if (yych <= 0x1F) { if (yych == '\t') goto yy97; @@ -543,12 +548,12 @@ yy101: yy103: ++YYCURSOR; YYCURSOR = YYCTXMARKER; -#line 179 "../src/parse/lex.re" +#line 185 "../src/parse/lex.re" { set_sourceline (); goto echo; } -#line 552 "src/parse/lex.cc" +#line 557 "src/parse/lex.cc" yy105: yych = (YYCTYPE)*++YYCURSOR; if (yych == '\n') goto yy103; @@ -573,7 +578,7 @@ yy109: if (yych == '\r') goto yy105; goto yy12; } -#line 210 "../src/parse/lex.re" +#line 216 "../src/parse/lex.re" } @@ -593,7 +598,7 @@ scan: start: -#line 597 "src/parse/lex.cc" +#line 602 "src/parse/lex.cc" { YYCTYPE yych; unsigned int yyaccept = 0; @@ -708,22 +713,22 @@ start: yy112: ++YYCURSOR; yy113: -#line 382 "../src/parse/lex.re" +#line 388 "../src/parse/lex.re" { fatalf("unexpected character: '%c'", *tok); goto scan; } -#line 717 "src/parse/lex.cc" +#line 722 "src/parse/lex.cc" yy114: ++YYCURSOR; yych = (YYCTYPE)*YYCURSOR; goto yy220; yy115: -#line 366 "../src/parse/lex.re" +#line 372 "../src/parse/lex.re" { goto scan; } -#line 727 "src/parse/lex.cc" +#line 732 "src/parse/lex.cc" yy116: yyaccept = 0; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); @@ -734,77 +739,77 @@ yy116: if (yych == '#') goto yy200; } yy117: -#line 375 "../src/parse/lex.re" +#line 381 "../src/parse/lex.re" { if (cur == eof) return 0; pos = cur; cline++; goto scan; } -#line 745 "src/parse/lex.cc" +#line 750 "src/parse/lex.cc" yy118: yych = (YYCTYPE)*++YYCURSOR; if (yych == '\n') goto yy197; goto yy113; yy119: ++YYCURSOR; -#line 259 "../src/parse/lex.re" - { yylval.regexp = lex_str('"', opts->bCaseInsensitive || opts->bCaseInverted); return REGEXP; } -#line 754 "src/parse/lex.cc" +#line 265 "../src/parse/lex.re" + { yylval.regexp = lex_str('"', opts->bCaseInsensitive || opts->bCaseInverted); return TOKEN_REGEXP; } +#line 759 "src/parse/lex.cc" yy121: yych = (YYCTYPE)*++YYCURSOR; if (yych == '}') goto yy195; goto yy113; yy122: ++YYCURSOR; -#line 258 "../src/parse/lex.re" - { yylval.regexp = lex_str('\'', opts->bCaseInsensitive || !opts->bCaseInverted); return REGEXP; } -#line 763 "src/parse/lex.cc" +#line 264 "../src/parse/lex.re" + { yylval.regexp = lex_str('\'', opts->bCaseInsensitive || !opts->bCaseInverted); return TOKEN_REGEXP; } +#line 768 "src/parse/lex.cc" yy124: ++YYCURSOR; yy125: -#line 269 "../src/parse/lex.re" +#line 275 "../src/parse/lex.re" { return *tok; } -#line 771 "src/parse/lex.cc" +#line 776 "src/parse/lex.cc" yy126: ++YYCURSOR; if ((yych = (YYCTYPE)*YYCURSOR) == '/') goto yy195; -#line 273 "../src/parse/lex.re" +#line 279 "../src/parse/lex.re" { yylval.op = *tok; - return STAR; + return TOKEN_STAR; } -#line 780 "src/parse/lex.cc" +#line 785 "src/parse/lex.cc" yy128: ++YYCURSOR; -#line 277 "../src/parse/lex.re" +#line 283 "../src/parse/lex.re" { yylval.op = *tok; - return CLOSE; + return TOKEN_CLOSE; } -#line 788 "src/parse/lex.cc" +#line 793 "src/parse/lex.cc" yy130: ++YYCURSOR; -#line 361 "../src/parse/lex.re" +#line 367 "../src/parse/lex.re" { yylval.regexp = mkDot(); - return REGEXP; + return TOKEN_REGEXP; } -#line 796 "src/parse/lex.cc" +#line 801 "src/parse/lex.cc" yy132: yych = (YYCTYPE)*++YYCURSOR; if (yych == '*') goto yy191; if (yych == '/') goto yy193; goto yy125; yy133: - YYCTXMARKER = YYCURSOR + 1; yych = (YYCTYPE)*++YYCURSOR; + YYCTXMARKER = YYCURSOR; goto yy165; yy134: - YYCTXMARKER = YYCURSOR + 1; yych = (YYCTYPE)*++YYCURSOR; + YYCTXMARKER = YYCURSOR; if (yych == '=') goto yy187; goto yy113; yy135: @@ -816,12 +821,12 @@ yy135: yy136: ++YYCURSOR; if ((yych = (YYCTYPE)*YYCURSOR) == '^') goto yy176; -#line 260 "../src/parse/lex.re" - { yylval.regexp = lex_cls(false); return REGEXP; } -#line 822 "src/parse/lex.cc" +#line 266 "../src/parse/lex.re" + { yylval.regexp = lex_cls(false); return TOKEN_REGEXP; } +#line 827 "src/parse/lex.cc" yy138: - YYCTXMARKER = YYCURSOR + 1; yych = (YYCTYPE)*++YYCURSOR; + YYCTXMARKER = YYCURSOR; if (yych == 'e') goto yy166; goto yy165; yy139: @@ -842,12 +847,12 @@ yy139: } } yy140: -#line 229 "../src/parse/lex.re" +#line 235 "../src/parse/lex.re" { depth = 1; goto code; } -#line 851 "src/parse/lex.cc" +#line 856 "src/parse/lex.cc" yy141: ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); @@ -896,34 +901,34 @@ yy144: yy146: ++YYCURSOR; yy147: -#line 313 "../src/parse/lex.re" +#line 319 "../src/parse/lex.re" { fatal("illegal closure form, use '{n}', '{n,}', '{n,m}' where n and m are numbers"); } -#line 904 "src/parse/lex.cc" +#line 909 "src/parse/lex.cc" yy148: ++YYCURSOR; -#line 317 "../src/parse/lex.re" +#line 323 "../src/parse/lex.re" { if (!opts->FFlag) { fatal("curly braces for names only allowed with -F switch"); } yylval.str = new std::string (tok + 1, tok_len () - 2); // -2 to omit braces - return ID; + return TOKEN_ID; } -#line 915 "src/parse/lex.cc" +#line 920 "src/parse/lex.cc" yy150: ++YYCURSOR; -#line 282 "../src/parse/lex.re" +#line 288 "../src/parse/lex.re" { if (!s_to_u32_unsafe (tok + 1, cur - 1, yylval.extop.min)) { fatal ("repetition count overflow"); } yylval.extop.max = yylval.extop.min; - return CLOSESIZE; + return TOKEN_CLOSESIZE; } -#line 927 "src/parse/lex.cc" +#line 932 "src/parse/lex.cc" yy152: yyaccept = 3; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); @@ -931,16 +936,16 @@ yy152: if (yych <= '9') goto yy155; if (yych != '}') goto yy147; ++YYCURSOR; -#line 304 "../src/parse/lex.re" +#line 310 "../src/parse/lex.re" { if (!s_to_u32_unsafe (tok + 1, cur - 2, yylval.extop.min)) { fatal ("repetition lower bound overflow"); } - yylval.extop.max = UINT32_MAX; - return CLOSESIZE; + yylval.extop.max = std::numeric_limits<uint32_t>::max(); + return TOKEN_CLOSESIZE; } -#line 944 "src/parse/lex.cc" +#line 949 "src/parse/lex.cc" yy155: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); @@ -949,7 +954,7 @@ yy155: if (yych <= '9') goto yy155; if (yych != '}') goto yy143; ++YYCURSOR; -#line 291 "../src/parse/lex.re" +#line 297 "../src/parse/lex.re" { const char * p = strchr (tok, ','); if (!s_to_u32_unsafe (tok + 1, p, yylval.extop.min)) @@ -960,17 +965,17 @@ yy155: { fatal ("repetition upper bound overflow"); } - return CLOSESIZE; + return TOKEN_CLOSESIZE; } -#line 966 "src/parse/lex.cc" +#line 971 "src/parse/lex.cc" yy159: ++YYCURSOR; YYCURSOR = YYCTXMARKER; -#line 345 "../src/parse/lex.re" +#line 351 "../src/parse/lex.re" { if (!opts->FFlag) { yylval.str = new std::string (tok, tok_len()); - return ID; + return TOKEN_ID; } else { RegExp *r = NULL; const bool casing = opts->bCaseInsensitive || opts->bCaseInverted; @@ -979,10 +984,10 @@ yy159: r = doCat(r, casing ? ichr(c) : schr(c)); } yylval.regexp = r ? r : new NullOp; - return REGEXP; + return TOKEN_REGEXP; } } -#line 986 "src/parse/lex.cc" +#line 991 "src/parse/lex.cc" yy161: yych = (YYCTYPE)*++YYCURSOR; goto yy174; @@ -990,17 +995,17 @@ yy162: ++YYCURSOR; yy163: YYCURSOR = YYCTXMARKER; -#line 340 "../src/parse/lex.re" +#line 346 "../src/parse/lex.re" { yylval.str = new std::string (tok, tok_len ()); - return ID; + return TOKEN_ID; } -#line 999 "src/parse/lex.cc" +#line 1004 "src/parse/lex.cc" yy164: - YYCTXMARKER = YYCURSOR + 1; ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); yych = (YYCTYPE)*YYCURSOR; + YYCTXMARKER = YYCURSOR; yy165: if (yych <= '9') { if (yych <= ' ') { @@ -1030,36 +1035,36 @@ yy165: } } yy166: - YYCTXMARKER = YYCURSOR + 1; yych = (YYCTYPE)*++YYCURSOR; + YYCTXMARKER = YYCURSOR; if (yych != '2') goto yy165; - YYCTXMARKER = YYCURSOR + 1; yych = (YYCTYPE)*++YYCURSOR; + YYCTXMARKER = YYCURSOR; if (yych != 'c') goto yy165; - YYCTXMARKER = YYCURSOR + 1; yych = (YYCTYPE)*++YYCURSOR; + YYCTXMARKER = YYCURSOR; if (yych != ':') goto yy165; ++YYCURSOR; -#line 325 "../src/parse/lex.re" - { lex_conf (); return CONF; } -#line 1046 "src/parse/lex.cc" +#line 331 "../src/parse/lex.re" + { lex_conf (); return TOKEN_CONF; } +#line 1051 "src/parse/lex.cc" yy171: ++YYCURSOR; YYCURSOR = YYCTXMARKER; -#line 327 "../src/parse/lex.re" +#line 333 "../src/parse/lex.re" { yylval.str = new std::string (tok, tok_len ()); if (opts->FFlag) { lexer_state = LEX_FLEX_NAME; - return FID; + return TOKEN_FID; } else { - return ID; + return TOKEN_ID; } } -#line 1063 "src/parse/lex.cc" +#line 1068 "src/parse/lex.cc" yy173: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); @@ -1076,19 +1081,19 @@ yy175: goto yy163; yy176: ++YYCURSOR; -#line 261 "../src/parse/lex.re" - { yylval.regexp = lex_cls(true); return REGEXP; } -#line 1082 "src/parse/lex.cc" +#line 267 "../src/parse/lex.re" + { yylval.regexp = lex_cls(true); return TOKEN_REGEXP; } +#line 1087 "src/parse/lex.cc" yy178: ++YYCURSOR; -#line 266 "../src/parse/lex.re" +#line 272 "../src/parse/lex.re" { - return SETUP; + return TOKEN_SETUP; } -#line 1089 "src/parse/lex.cc" +#line 1094 "src/parse/lex.cc" yy180: - YYCTXMARKER = YYCURSOR + 1; yych = (YYCTYPE)*++YYCURSOR; + YYCTXMARKER = YYCURSOR; goto yy182; yy181: ++YYCURSOR; @@ -1115,11 +1120,11 @@ yy182: yy183: ++YYCURSOR; YYCURSOR = YYCTXMARKER; -#line 263 "../src/parse/lex.re" +#line 269 "../src/parse/lex.re" { - return NOCOND; + return TOKEN_NOCOND; } -#line 1123 "src/parse/lex.cc" +#line 1128 "src/parse/lex.cc" yy185: yych = (YYCTYPE)*++YYCURSOR; if (yych == '>') goto yy183; @@ -1131,44 +1136,44 @@ yy186: yy187: ++YYCURSOR; if ((yych = (YYCTYPE)*YYCURSOR) == '>') goto yy189; -#line 238 "../src/parse/lex.re" +#line 244 "../src/parse/lex.re" { tok += 2; /* skip ":=" */ depth = 0; goto code; } -#line 1141 "src/parse/lex.cc" +#line 1146 "src/parse/lex.cc" yy189: ++YYCURSOR; YYCURSOR = YYCTXMARKER; -#line 234 "../src/parse/lex.re" +#line 240 "../src/parse/lex.re" { return *tok; } -#line 1149 "src/parse/lex.cc" +#line 1154 "src/parse/lex.cc" yy191: ++YYCURSOR; -#line 247 "../src/parse/lex.re" +#line 253 "../src/parse/lex.re" { depth = 1; goto comment; } -#line 1157 "src/parse/lex.cc" +#line 1162 "src/parse/lex.cc" yy193: ++YYCURSOR; -#line 244 "../src/parse/lex.re" +#line 250 "../src/parse/lex.re" { goto nextLine; } -#line 1164 "src/parse/lex.cc" +#line 1169 "src/parse/lex.cc" yy195: ++YYCURSOR; -#line 253 "../src/parse/lex.re" +#line 259 "../src/parse/lex.re" { tok = cur; return 0; } -#line 1172 "src/parse/lex.cc" +#line 1177 "src/parse/lex.cc" yy197: yyaccept = 0; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); @@ -1212,10 +1217,10 @@ yy200: if (yych <= '9') goto yy143; goto yy207; yy206: - YYCTXMARKER = YYCURSOR + 1; ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; + YYCTXMARKER = YYCURSOR; yy207: if (yych <= 0x1F) { if (yych == '\t') goto yy206; @@ -1261,12 +1266,12 @@ yy210: yy212: ++YYCURSOR; YYCURSOR = YYCTXMARKER; -#line 370 "../src/parse/lex.re" +#line 376 "../src/parse/lex.re" { set_sourceline (); goto scan; } -#line 1270 "src/parse/lex.cc" +#line 1275 "src/parse/lex.cc" yy214: yych = (YYCTYPE)*++YYCURSOR; if (yych == '\n') goto yy212; @@ -1299,12 +1304,12 @@ yy220: if (yych == ' ') goto yy219; goto yy115; } -#line 386 "../src/parse/lex.re" +#line 392 "../src/parse/lex.re" flex_name: -#line 1308 "src/parse/lex.cc" +#line 1313 "src/parse/lex.cc" { YYCTYPE yych; if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); @@ -1313,22 +1318,22 @@ flex_name: if (yych == '\r') goto yy227; ++YYCURSOR; yy224: -#line 397 "../src/parse/lex.re" +#line 403 "../src/parse/lex.re" { YYCURSOR = tok; goto start; } -#line 1322 "src/parse/lex.cc" +#line 1327 "src/parse/lex.cc" yy225: ++YYCURSOR; yy226: -#line 391 "../src/parse/lex.re" +#line 397 "../src/parse/lex.re" { YYCURSOR = tok; lexer_state = LEX_NORMAL; - return FID_END; + return TOKEN_FID_END; } -#line 1332 "src/parse/lex.cc" +#line 1337 "src/parse/lex.cc" yy227: yych = (YYCTYPE)*++YYCURSOR; if (yych != '\n') goto yy224; @@ -1336,12 +1341,12 @@ yy227: yych = (YYCTYPE)*YYCURSOR; goto yy226; } -#line 401 "../src/parse/lex.re" +#line 407 "../src/parse/lex.re" code: -#line 1345 "src/parse/lex.cc" +#line 1350 "src/parse/lex.cc" { YYCTYPE yych; unsigned int yyaccept = 0; @@ -1402,7 +1407,7 @@ code: } yy231: ++YYCURSOR; -#line 464 "../src/parse/lex.re" +#line 470 "../src/parse/lex.re" { if (cur == eof) { @@ -1414,19 +1419,19 @@ yy231: } goto code; } -#line 1418 "src/parse/lex.cc" +#line 1423 "src/parse/lex.cc" yy233: ++YYCURSOR; yy234: -#line 478 "../src/parse/lex.re" +#line 484 "../src/parse/lex.re" { goto code; } -#line 1426 "src/parse/lex.cc" +#line 1431 "src/parse/lex.cc" yy235: - YYCTXMARKER = YYCURSOR + 1; yyaccept = 0; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); + YYCTXMARKER = YYCURSOR; if (yych <= '\r') { if (yych <= '\t') { if (yych >= '\t') goto yy252; @@ -1442,7 +1447,7 @@ yy235: } } yy236: -#line 445 "../src/parse/lex.re" +#line 451 "../src/parse/lex.re" { if (depth == 0) { @@ -1452,7 +1457,7 @@ yy236: --cur; } yylval.code = new Code (tok, tok_len (), get_fname (), tline); - return CODE; + return TOKEN_CODE; } else if (cur == eof) { @@ -1462,7 +1467,7 @@ yy236: cline++; goto code; } -#line 1466 "src/parse/lex.cc" +#line 1471 "src/parse/lex.cc" yy237: yyaccept = 1; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); @@ -1475,7 +1480,7 @@ yy238: goto yy244; yy239: ++YYCURSOR; -#line 417 "../src/parse/lex.re" +#line 423 "../src/parse/lex.re" { if (depth == 0) { @@ -1487,10 +1492,10 @@ yy239: } goto code; } -#line 1491 "src/parse/lex.cc" +#line 1496 "src/parse/lex.cc" yy241: ++YYCURSOR; -#line 405 "../src/parse/lex.re" +#line 411 "../src/parse/lex.re" { if (depth == 0) { @@ -1499,11 +1504,11 @@ yy241: else if (--depth == 0) { yylval.code = new Code (tok, tok_len (), get_fname (), tline); - return CODE; + return TOKEN_CODE; } goto code; } -#line 1507 "src/parse/lex.cc" +#line 1512 "src/parse/lex.cc" yy243: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); @@ -1534,11 +1539,11 @@ yy246: goto yy243; yy247: ++YYCURSOR; -#line 475 "../src/parse/lex.re" +#line 481 "../src/parse/lex.re" { goto code; } -#line 1542 "src/parse/lex.cc" +#line 1547 "src/parse/lex.cc" yy249: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); @@ -1565,7 +1570,7 @@ yy252: } yy253: YYCURSOR = YYCTXMARKER; -#line 432 "../src/parse/lex.re" +#line 438 "../src/parse/lex.re" { if (depth == 0) { @@ -1579,7 +1584,7 @@ yy253: cline++; goto code; } -#line 1583 "src/parse/lex.cc" +#line 1588 "src/parse/lex.cc" yy254: yych = (YYCTYPE)*++YYCURSOR; goto yy253; @@ -1602,10 +1607,10 @@ yy255: if (yych <= '9') goto yy245; goto yy262; yy261: - YYCTXMARKER = YYCURSOR + 1; ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; + YYCTXMARKER = YYCURSOR; yy262: if (yych <= 0x1F) { if (yych == '\t') goto yy261; @@ -1646,12 +1651,12 @@ yy265: yy267: ++YYCURSOR; YYCURSOR = YYCTXMARKER; -#line 428 "../src/parse/lex.re" +#line 434 "../src/parse/lex.re" { set_sourceline (); goto code; } -#line 1655 "src/parse/lex.cc" +#line 1660 "src/parse/lex.cc" yy269: yych = (YYCTYPE)*++YYCURSOR; if (yych == '\n') goto yy267; @@ -1690,12 +1695,12 @@ yy274: goto yy245; } } -#line 481 "../src/parse/lex.re" +#line 487 "../src/parse/lex.re" comment: -#line 1699 "src/parse/lex.cc" +#line 1704 "src/parse/lex.cc" { YYCTYPE yych; static const unsigned char yybm[] = { @@ -1742,7 +1747,7 @@ comment: } ++YYCURSOR; yy279: -#line 513 "../src/parse/lex.re" +#line 519 "../src/parse/lex.re" { if (cur == eof) { @@ -1750,7 +1755,7 @@ yy279: } goto comment; } -#line 1754 "src/parse/lex.cc" +#line 1759 "src/parse/lex.cc" yy280: yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); if (yybm[0+yych] & 32) { @@ -1758,7 +1763,7 @@ yy280: } if (yych == '#') goto yy291; yy281: -#line 504 "../src/parse/lex.re" +#line 510 "../src/parse/lex.re" { if (cur == eof) { @@ -1768,7 +1773,7 @@ yy281: cline++; goto comment; } -#line 1772 "src/parse/lex.cc" +#line 1777 "src/parse/lex.cc" yy282: yych = (YYCTYPE)*++YYCURSOR; if (yych == '/') goto yy286; @@ -1777,16 +1782,16 @@ yy283: yych = (YYCTYPE)*++YYCURSOR; if (yych != '*') goto yy279; ++YYCURSOR; -#line 495 "../src/parse/lex.re" +#line 501 "../src/parse/lex.re" { ++depth; fatal("ambiguous /* found"); goto comment; } -#line 1787 "src/parse/lex.cc" +#line 1792 "src/parse/lex.cc" yy286: ++YYCURSOR; -#line 485 "../src/parse/lex.re" +#line 491 "../src/parse/lex.re" { if (--depth == 0) { @@ -1797,7 +1802,7 @@ yy286: goto comment; } } -#line 1801 "src/parse/lex.cc" +#line 1806 "src/parse/lex.cc" yy288: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); @@ -1831,10 +1836,10 @@ yy291: if (yych <= '9') goto yy290; goto yy298; yy297: - YYCTXMARKER = YYCURSOR + 1; ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; + YYCTXMARKER = YYCURSOR; yy298: if (yych <= 0x1F) { if (yych == '\t') goto yy297; @@ -1875,12 +1880,12 @@ yy301: yy303: ++YYCURSOR; YYCURSOR = YYCTXMARKER; -#line 500 "../src/parse/lex.re" +#line 506 "../src/parse/lex.re" { set_sourceline (); goto comment; } -#line 1884 "src/parse/lex.cc" +#line 1889 "src/parse/lex.cc" yy305: yych = (YYCTYPE)*++YYCURSOR; if (yych == '\n') goto yy303; @@ -1905,28 +1910,28 @@ yy309: if (yych == '\r') goto yy305; goto yy290; } -#line 520 "../src/parse/lex.re" +#line 526 "../src/parse/lex.re" nextLine: -#line 1914 "src/parse/lex.cc" +#line 1919 "src/parse/lex.cc" { YYCTYPE yych; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; if (yych == '\n') goto yy314; ++YYCURSOR; -#line 531 "../src/parse/lex.re" +#line 537 "../src/parse/lex.re" { if(cur == eof) { return 0; } goto nextLine; } -#line 1927 "src/parse/lex.cc" +#line 1932 "src/parse/lex.cc" yy314: ++YYCURSOR; -#line 524 "../src/parse/lex.re" +#line 530 "../src/parse/lex.re" { if(cur == eof) { return 0; } @@ -1934,9 +1939,9 @@ yy314: cline++; goto scan; } -#line 1938 "src/parse/lex.cc" +#line 1943 "src/parse/lex.cc" } -#line 536 "../src/parse/lex.re" +#line 542 "../src/parse/lex.re" } @@ -1960,45 +1965,45 @@ RegExp *Scanner::lex_cls(bool neg) uint32_t u, l; fst: -#line 1964 "src/parse/lex.cc" +#line 1969 "src/parse/lex.cc" { YYCTYPE yych; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; if (yych == ']') goto yy319; -#line 560 "../src/parse/lex.re" +#line 566 "../src/parse/lex.re" { l = lex_cls_chr(); goto snd; } -#line 1972 "src/parse/lex.cc" +#line 1977 "src/parse/lex.cc" yy319: ++YYCURSOR; -#line 559 "../src/parse/lex.re" +#line 565 "../src/parse/lex.re" { goto end; } -#line 1977 "src/parse/lex.cc" +#line 1982 "src/parse/lex.cc" } -#line 561 "../src/parse/lex.re" +#line 567 "../src/parse/lex.re" snd: -#line 1983 "src/parse/lex.cc" +#line 1988 "src/parse/lex.cc" { YYCTYPE yych; if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); yych = (YYCTYPE)*(YYMARKER = YYCURSOR); if (yych == '-') goto yy324; yy323: -#line 564 "../src/parse/lex.re" +#line 570 "../src/parse/lex.re" { u = l; goto add; } -#line 1992 "src/parse/lex.cc" +#line 1997 "src/parse/lex.cc" yy324: - YYCTXMARKER = YYCURSOR + 1; yych = (YYCTYPE)*++YYCURSOR; + YYCTXMARKER = YYCURSOR; if (yych != ']') goto yy326; YYCURSOR = YYMARKER; goto yy323; yy326: ++YYCURSOR; YYCURSOR = YYCTXMARKER; -#line 565 "../src/parse/lex.re" +#line 571 "../src/parse/lex.re" { u = lex_cls_chr(); if (l > u) { @@ -2007,9 +2012,9 @@ yy326: } goto add; } -#line 2011 "src/parse/lex.cc" +#line 2016 "src/parse/lex.cc" } -#line 573 "../src/parse/lex.re" +#line 579 "../src/parse/lex.re" add: if (!(s = opts->encoding.encodeRange(l, u))) { @@ -2028,7 +2033,7 @@ uint32_t Scanner::lex_cls_chr() { tok = cur; -#line 2032 "src/parse/lex.cc" +#line 2037 "src/parse/lex.cc" { YYCTYPE yych; unsigned int yyaccept = 0; @@ -2037,14 +2042,14 @@ uint32_t Scanner::lex_cls_chr() if (yych == '\n') goto yy332; if (yych == '\\') goto yy334; ++YYCURSOR; -#line 596 "../src/parse/lex.re" +#line 602 "../src/parse/lex.re" { return static_cast<uint8_t>(tok[0]); } -#line 2043 "src/parse/lex.cc" +#line 2048 "src/parse/lex.cc" yy332: ++YYCURSOR; -#line 591 "../src/parse/lex.re" +#line 597 "../src/parse/lex.re" { fatal ((tok - pos) - tchar, "syntax error"); } -#line 2048 "src/parse/lex.cc" +#line 2053 "src/parse/lex.cc" yy334: ++YYCURSOR; if ((yych = (YYCTYPE)*YYCURSOR) <= '`') { @@ -2093,31 +2098,31 @@ yy334: } } } -#line 594 "../src/parse/lex.re" +#line 600 "../src/parse/lex.re" { fatal ((tok - pos) - tchar, "syntax error in escape sequence"); } -#line 2099 "src/parse/lex.cc" +#line 2104 "src/parse/lex.cc" yy336: ++YYCURSOR; -#line 609 "../src/parse/lex.re" +#line 615 "../src/parse/lex.re" { warn.useless_escape(tline, tok - pos, tok[1]); return static_cast<uint8_t>(tok[1]); } -#line 2107 "src/parse/lex.cc" +#line 2112 "src/parse/lex.cc" yy338: ++YYCURSOR; -#line 607 "../src/parse/lex.re" +#line 613 "../src/parse/lex.re" { return static_cast<uint8_t>('-'); } -#line 2112 "src/parse/lex.cc" +#line 2117 "src/parse/lex.cc" yy340: yyaccept = 0; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); if (yych <= '/') goto yy341; if (yych <= '7') goto yy379; yy341: -#line 593 "../src/parse/lex.re" +#line 599 "../src/parse/lex.re" { fatal ((tok - pos) - tchar, "syntax error in octal escape sequence"); } -#line 2121 "src/parse/lex.cc" +#line 2126 "src/parse/lex.cc" yy342: yych = (YYCTYPE)*++YYCURSOR; goto yy341; @@ -2133,9 +2138,9 @@ yy343: if (yych <= 'f') goto yy372; } yy344: -#line 592 "../src/parse/lex.re" +#line 598 "../src/parse/lex.re" { fatal ((tok - pos) - tchar, "syntax error in hexadecimal escape sequence"); } -#line 2139 "src/parse/lex.cc" +#line 2144 "src/parse/lex.cc" yy345: yyaccept = 1; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); @@ -2151,49 +2156,49 @@ yy345: } yy346: ++YYCURSOR; -#line 606 "../src/parse/lex.re" +#line 612 "../src/parse/lex.re" { return static_cast<uint8_t>('\\'); } -#line 2157 "src/parse/lex.cc" +#line 2162 "src/parse/lex.cc" yy348: ++YYCURSOR; -#line 608 "../src/parse/lex.re" +#line 614 "../src/parse/lex.re" { return static_cast<uint8_t>(']'); } -#line 2162 "src/parse/lex.cc" +#line 2167 "src/parse/lex.cc" yy350: ++YYCURSOR; -#line 599 "../src/parse/lex.re" +#line 605 "../src/parse/lex.re" { return static_cast<uint8_t>('\a'); } -#line 2167 "src/parse/lex.cc" +#line 2172 "src/parse/lex.cc" yy352: ++YYCURSOR; -#line 600 "../src/parse/lex.re" +#line 606 "../src/parse/lex.re" { return static_cast<uint8_t>('\b'); } -#line 2172 "src/parse/lex.cc" +#line 2177 "src/parse/lex.cc" yy354: ++YYCURSOR; -#line 601 "../src/parse/lex.re" +#line 607 "../src/parse/lex.re" { return static_cast<uint8_t>('\f'); } -#line 2177 "src/parse/lex.cc" +#line 2182 "src/parse/lex.cc" yy356: ++YYCURSOR; -#line 602 "../src/parse/lex.re" +#line 608 "../src/parse/lex.re" { return static_cast<uint8_t>('\n'); } -#line 2182 "src/parse/lex.cc" +#line 2187 "src/parse/lex.cc" yy358: ++YYCURSOR; -#line 603 "../src/parse/lex.re" +#line 609 "../src/parse/lex.re" { return static_cast<uint8_t>('\r'); } -#line 2187 "src/parse/lex.cc" +#line 2192 "src/parse/lex.cc" yy360: ++YYCURSOR; -#line 604 "../src/parse/lex.re" +#line 610 "../src/parse/lex.re" { return static_cast<uint8_t>('\t'); } -#line 2192 "src/parse/lex.cc" +#line 2197 "src/parse/lex.cc" yy362: ++YYCURSOR; -#line 605 "../src/parse/lex.re" +#line 611 "../src/parse/lex.re" { return static_cast<uint8_t>('\v'); } -#line 2197 "src/parse/lex.cc" +#line 2202 "src/parse/lex.cc" yy364: yyaccept = 1; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); @@ -2224,9 +2229,9 @@ yy366: } yy367: ++YYCURSOR; -#line 597 "../src/parse/lex.re" +#line 603 "../src/parse/lex.re" { return unesc_hex(tok, cur); } -#line 2230 "src/parse/lex.cc" +#line 2235 "src/parse/lex.cc" yy369: yych = (YYCTYPE)*++YYCURSOR; if (yych <= '@') { @@ -2336,11 +2341,11 @@ yy379: if (yych <= '/') goto yy366; if (yych >= '8') goto yy366; ++YYCURSOR; -#line 598 "../src/parse/lex.re" +#line 604 "../src/parse/lex.re" { return unesc_oct(tok, cur); } -#line 2342 "src/parse/lex.cc" +#line 2347 "src/parse/lex.cc" } -#line 613 "../src/parse/lex.re" +#line 619 "../src/parse/lex.re" } @@ -2349,7 +2354,7 @@ uint32_t Scanner::lex_str_chr(char quote, bool &end) end = false; tok = cur; -#line 2353 "src/parse/lex.cc" +#line 2358 "src/parse/lex.cc" { YYCTYPE yych; unsigned int yyaccept = 0; @@ -2358,17 +2363,17 @@ uint32_t Scanner::lex_str_chr(char quote, bool &end) if (yych == '\n') goto yy386; if (yych == '\\') goto yy388; ++YYCURSOR; -#line 626 "../src/parse/lex.re" +#line 632 "../src/parse/lex.re" { end = tok[0] == quote; return static_cast<uint8_t>(tok[0]); } -#line 2367 "src/parse/lex.cc" +#line 2372 "src/parse/lex.cc" yy386: ++YYCURSOR; -#line 621 "../src/parse/lex.re" +#line 627 "../src/parse/lex.re" { fatal ((tok - pos) - tchar, "syntax error"); } -#line 2372 "src/parse/lex.cc" +#line 2377 "src/parse/lex.cc" yy388: ++YYCURSOR; if ((yych = (YYCTYPE)*YYCURSOR) <= 'a') { @@ -2414,28 +2419,28 @@ yy388: } } } -#line 624 "../src/parse/lex.re" +#line 630 "../src/parse/lex.re" { fatal ((tok - pos) - tchar, "syntax error in escape sequence"); } -#line 2420 "src/parse/lex.cc" +#line 2425 "src/parse/lex.cc" yy390: ++YYCURSOR; -#line 640 "../src/parse/lex.re" +#line 646 "../src/parse/lex.re" { if (tok[1] != quote) { warn.useless_escape(tline, tok - pos, tok[1]); } return static_cast<uint8_t>(tok[1]); } -#line 2430 "src/parse/lex.cc" +#line 2435 "src/parse/lex.cc" yy392: yyaccept = 0; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); if (yych <= '/') goto yy393; if (yych <= '7') goto yy429; yy393: -#line 623 "../src/parse/lex.re" +#line 629 "../src/parse/lex.re" { fatal ((tok - pos) - tchar, "syntax error in octal escape sequence"); } -#line 2439 "src/parse/lex.cc" +#line 2444 "src/parse/lex.cc" yy394: yych = (YYCTYPE)*++YYCURSOR; goto yy393; @@ -2451,9 +2456,9 @@ yy395: if (yych <= 'f') goto yy422; } yy396: -#line 622 "../src/parse/lex.re" +#line 628 "../src/parse/lex.re" { fatal ((tok - pos) - tchar, "syntax error in hexadecimal escape sequence"); } -#line 2457 "src/parse/lex.cc" +#line 2462 "src/parse/lex.cc" yy397: yyaccept = 1; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); @@ -2469,44 +2474,44 @@ yy397: } yy398: ++YYCURSOR; -#line 639 "../src/parse/lex.re" +#line 645 "../src/parse/lex.re" { return static_cast<uint8_t>('\\'); } -#line 2475 "src/parse/lex.cc" +#line 2480 "src/parse/lex.cc" yy400: ++YYCURSOR; -#line 632 "../src/parse/lex.re" +#line 638 "../src/parse/lex.re" { return static_cast<uint8_t>('\a'); } -#line 2480 "src/parse/lex.cc" +#line 2485 "src/parse/lex.cc" yy402: ++YYCURSOR; -#line 633 "../src/parse/lex.re" +#line 639 "../src/parse/lex.re" { return static_cast<uint8_t>('\b'); } -#line 2485 "src/parse/lex.cc" +#line 2490 "src/parse/lex.cc" yy404: ++YYCURSOR; -#line 634 "../src/parse/lex.re" +#line 640 "../src/parse/lex.re" { return static_cast<uint8_t>('\f'); } -#line 2490 "src/parse/lex.cc" +#line 2495 "src/parse/lex.cc" yy406: ++YYCURSOR; -#line 635 "../src/parse/lex.re" +#line 641 "../src/parse/lex.re" { return static_cast<uint8_t>('\n'); } -#line 2495 "src/parse/lex.cc" +#line 2500 "src/parse/lex.cc" yy408: ++YYCURSOR; -#line 636 "../src/parse/lex.re" +#line 642 "../src/parse/lex.re" { return static_cast<uint8_t>('\r'); } -#line 2500 "src/parse/lex.cc" +#line 2505 "src/parse/lex.cc" yy410: ++YYCURSOR; -#line 637 "../src/parse/lex.re" +#line 643 "../src/parse/lex.re" { return static_cast<uint8_t>('\t'); } -#line 2505 "src/parse/lex.cc" +#line 2510 "src/parse/lex.cc" yy412: ++YYCURSOR; -#line 638 "../src/parse/lex.re" +#line 644 "../src/parse/lex.re" { return static_cast<uint8_t>('\v'); } -#line 2510 "src/parse/lex.cc" +#line 2515 "src/parse/lex.cc" yy414: yyaccept = 1; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); @@ -2537,9 +2542,9 @@ yy416: } yy417: ++YYCURSOR; -#line 630 "../src/parse/lex.re" +#line 636 "../src/parse/lex.re" { return unesc_hex(tok, cur); } -#line 2543 "src/parse/lex.cc" +#line 2548 "src/parse/lex.cc" yy419: yych = (YYCTYPE)*++YYCURSOR; if (yych <= '@') { @@ -2649,11 +2654,11 @@ yy429: if (yych <= '/') goto yy416; if (yych >= '8') goto yy416; ++YYCURSOR; -#line 631 "../src/parse/lex.re" +#line 637 "../src/parse/lex.re" { return unesc_oct(tok, cur); } -#line 2655 "src/parse/lex.cc" +#line 2660 "src/parse/lex.cc" } -#line 646 "../src/parse/lex.re" +#line 652 "../src/parse/lex.re" } @@ -2674,7 +2679,7 @@ void Scanner::set_sourceline () sourceline: tok = cur; -#line 2678 "src/parse/lex.cc" +#line 2683 "src/parse/lex.cc" { YYCTYPE yych; static const unsigned char yybm[] = { @@ -2723,14 +2728,14 @@ sourceline: yy434: ++YYCURSOR; yy435: -#line 689 "../src/parse/lex.re" +#line 695 "../src/parse/lex.re" { goto sourceline; } -#line 2731 "src/parse/lex.cc" +#line 2736 "src/parse/lex.cc" yy436: ++YYCURSOR; -#line 677 "../src/parse/lex.re" +#line 683 "../src/parse/lex.re" { if (cur == eof) { @@ -2743,7 +2748,7 @@ yy436: tok = cur; return; } -#line 2747 "src/parse/lex.cc" +#line 2752 "src/parse/lex.cc" yy438: yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); if (yych == '\n') goto yy435; @@ -2753,7 +2758,7 @@ yy439: yych = (YYCTYPE)*YYCURSOR; goto yy442; yy440: -#line 666 "../src/parse/lex.re" +#line 672 "../src/parse/lex.re" { if (!s_to_u32_unsafe (tok, cur, cline)) { @@ -2761,7 +2766,7 @@ yy440: } goto sourceline; } -#line 2765 "src/parse/lex.cc" +#line 2770 "src/parse/lex.cc" yy441: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); @@ -2793,14 +2798,14 @@ yy446: goto yy443; yy447: ++YYCURSOR; -#line 673 "../src/parse/lex.re" +#line 679 "../src/parse/lex.re" { escape (in.file_name, std::string (tok + 1, tok_len () - 2)); // -2 to omit quotes goto sourceline; } -#line 2802 "src/parse/lex.cc" +#line 2807 "src/parse/lex.cc" } -#line 692 "../src/parse/lex.re" +#line 698 "../src/parse/lex.re" } diff --git a/bootstrap/src/parse/lex_conf.cc b/bootstrap/src/parse/lex_conf.cc index eb2779f7..2b1c6e3a 100644 --- a/bootstrap/src/parse/lex_conf.cc +++ b/bootstrap/src/parse/lex_conf.cc @@ -1,5 +1,12 @@ -/* Generated by re2c 0.14.3 on Mon Nov 23 21:19:03 2015 */ +/* Generated by re2c 0.15.3 on Wed Dec 2 12:10:03 2015 */ #line 1 "../src/parse/lex_conf.re" +#include "src/util/c99_stdint.h" +#include <string> + +#include "src/codegen/output.h" +#include "src/conf/opt.h" +#include "src/globals.h" +#include "src/ir/regexp/encoding/enc.h" #include "src/parse/scanner.h" #include "src/util/s_to_n32_unsafe.h" @@ -7,14 +14,14 @@ namespace re2c { // global re2c config (affects the whole file) -#line 29 "../src/parse/lex_conf.re" +#line 36 "../src/parse/lex_conf.re" void Scanner::lex_conf () { tok = cur; -#line 18 "src/parse/lex_conf.cc" +#line 25 "src/parse/lex_conf.cc" { unsigned char yych; unsigned int yyaccept = 0; @@ -52,7 +59,6 @@ void Scanner::lex_conf () 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; - if ((lim - cur) < 27) fill(27); yych = (unsigned char)*cur; switch (yych) { @@ -69,9 +75,9 @@ void Scanner::lex_conf () yy2: ++cur; yy3: -#line 35 "../src/parse/lex_conf.re" +#line 42 "../src/parse/lex_conf.re" { fatal ((tok - pos) - tchar, "unrecognized configuration"); } -#line 75 "src/parse/lex_conf.cc" +#line 81 "src/parse/lex_conf.cc" yy4: yyaccept = 0; yych = (unsigned char)*(ptr = ++cur); @@ -207,9 +213,9 @@ yy23: yych = (unsigned char)*++cur; if (yych != 'e') goto yy13; ++cur; -#line 134 "../src/parse/lex_conf.re" +#line 141 "../src/parse/lex_conf.re" { opts.set_fill_use (lex_conf_number () != 0); return; } -#line 213 "src/parse/lex_conf.cc" +#line 219 "src/parse/lex_conf.cc" yy30: yych = (unsigned char)*++cur; if (yych != 'r') goto yy13; @@ -226,9 +232,9 @@ yy30: yych = (unsigned char)*++cur; if (yych != 'r') goto yy13; ++cur; -#line 136 "../src/parse/lex_conf.re" +#line 143 "../src/parse/lex_conf.re" { opts.set_fill_arg_use (lex_conf_number () != 0); return; } -#line 232 "src/parse/lex_conf.cc" +#line 238 "src/parse/lex_conf.cc" yy39: yych = (unsigned char)*++cur; if (yych != 'e') goto yy13; @@ -237,9 +243,9 @@ yy39: yych = (unsigned char)*++cur; if (yych != 'k') goto yy13; ++cur; -#line 138 "../src/parse/lex_conf.re" +#line 145 "../src/parse/lex_conf.re" { opts.set_fill_check (lex_conf_number () != 0); return; } -#line 243 "src/parse/lex_conf.cc" +#line 249 "src/parse/lex_conf.cc" yy44: yych = (unsigned char)*++cur; if (yych != ':') goto yy13; @@ -269,18 +275,18 @@ yy47: yych = (unsigned char)*++cur; if (yych != 'n') goto yy13; ++cur; -#line 130 "../src/parse/lex_conf.re" +#line 137 "../src/parse/lex_conf.re" { opts.set_yychConversion (lex_conf_number () != 0); return; } -#line 275 "src/parse/lex_conf.cc" +#line 281 "src/parse/lex_conf.cc" yy58: yych = (unsigned char)*++cur; if (yych != 'i') goto yy13; yych = (unsigned char)*++cur; if (yych != 't') goto yy13; ++cur; -#line 131 "../src/parse/lex_conf.re" +#line 138 "../src/parse/lex_conf.re" { opts.set_bEmitYYCh (lex_conf_number () != 0); return; } -#line 284 "src/parse/lex_conf.cc" +#line 290 "src/parse/lex_conf.cc" yy62: yych = (unsigned char)*++cur; if (yych != ':') goto yy13; @@ -291,9 +297,9 @@ yy62: yych = (unsigned char)*++cur; if (yych != 'x') goto yy13; ++cur; -#line 88 "../src/parse/lex_conf.re" +#line 95 "../src/parse/lex_conf.re" { opts.set_yybmHexTable (lex_conf_number () != 0); return; } -#line 297 "src/parse/lex_conf.cc" +#line 303 "src/parse/lex_conf.cc" yy68: yych = (unsigned char)*++cur; if (yych != 'r') goto yy13; @@ -354,14 +360,14 @@ yy82: yych = (unsigned char)*++cur; if (yych != 't') goto yy13; ++cur; -#line 85 "../src/parse/lex_conf.re" +#line 92 "../src/parse/lex_conf.re" { opts.set_yyaccept (lex_conf_string ()); return; } -#line 360 "src/parse/lex_conf.cc" +#line 366 "src/parse/lex_conf.cc" yy89: ++cur; -#line 87 "../src/parse/lex_conf.re" +#line 94 "../src/parse/lex_conf.re" { opts.set_yybm (lex_conf_string ()); return; } -#line 365 "src/parse/lex_conf.cc" +#line 371 "src/parse/lex_conf.cc" yy91: yych = (unsigned char)*++cur; if (yych != 'r') goto yy13; @@ -372,18 +378,18 @@ yy91: yych = (unsigned char)*++cur; if (yych != 't') goto yy13; ++cur; -#line 99 "../src/parse/lex_conf.re" +#line 106 "../src/parse/lex_conf.re" { opts.set_yytarget (lex_conf_string ()); return; } -#line 378 "src/parse/lex_conf.cc" +#line 384 "src/parse/lex_conf.cc" yy97: yych = (unsigned char)*++cur; if (yych == 'a') goto yy100; goto yy13; yy98: ++cur; -#line 129 "../src/parse/lex_conf.re" +#line 136 "../src/parse/lex_conf.re" { opts.set_yych (lex_conf_string ()); return; } -#line 387 "src/parse/lex_conf.cc" +#line 393 "src/parse/lex_conf.cc" yy100: yych = (unsigned char)*++cur; if (yych != 'b') goto yy13; @@ -392,9 +398,9 @@ yy100: yych = (unsigned char)*++cur; if (yych != 'e') goto yy13; ++cur; -#line 74 "../src/parse/lex_conf.re" +#line 81 "../src/parse/lex_conf.re" { opts.set_yyctable (lex_conf_string ()); return; } -#line 398 "src/parse/lex_conf.cc" +#line 404 "src/parse/lex_conf.cc" yy105: yych = (unsigned char)*++cur; if (yych != 'a') goto yy13; @@ -405,9 +411,9 @@ yy105: yych = (unsigned char)*++cur; if (yych != 'e') goto yy13; ++cur; -#line 147 "../src/parse/lex_conf.re" +#line 154 "../src/parse/lex_conf.re" { lex_conf_string (); return; } -#line 411 "src/parse/lex_conf.cc" +#line 417 "src/parse/lex_conf.cc" yy111: yych = (unsigned char)*++cur; if (yych != 'a') goto yy13; @@ -450,9 +456,9 @@ yy118: yych = (unsigned char)*++cur; if (yych != 'l') goto yy13; ++cur; -#line 84 "../src/parse/lex_conf.re" +#line 91 "../src/parse/lex_conf.re" { opts.set_bUseStateNext (lex_conf_number () != 0); return; } -#line 456 "src/parse/lex_conf.cc" +#line 462 "src/parse/lex_conf.cc" yy128: yych = (unsigned char)*++cur; if (yych != 'o') goto yy13; @@ -461,9 +467,9 @@ yy128: yych = (unsigned char)*++cur; if (yych != 't') goto yy13; ++cur; -#line 83 "../src/parse/lex_conf.re" +#line 90 "../src/parse/lex_conf.re" { opts.set_bUseStateAbort (lex_conf_number () != 0); return; } -#line 467 "src/parse/lex_conf.cc" +#line 473 "src/parse/lex_conf.cc" yy133: yych = (unsigned char)*++cur; if (yych != 'l') goto yy13; @@ -475,17 +481,17 @@ yy133: if (yych != 'e') goto yy13; yych = (unsigned char)*++cur; if (yych != 'l') goto yy13; - ctx = cur + 1; yyaccept = 1; yych = (unsigned char)*(ptr = ++cur); + ctx = cur; if (yybm[0+yych] & 64) { goto yy140; } if (yych == '=') goto yy142; yy139: -#line 144 "../src/parse/lex_conf.re" +#line 151 "../src/parse/lex_conf.re" { out.set_user_start_label (lex_conf_string ()); return; } -#line 489 "src/parse/lex_conf.cc" +#line 495 "src/parse/lex_conf.cc" yy140: ++cur; if (lim <= cur) fill(1); @@ -520,9 +526,9 @@ yy144: ++cur; yy145: cur = ctx; -#line 143 "../src/parse/lex_conf.re" +#line 150 "../src/parse/lex_conf.re" { out.set_force_start_label (lex_conf_number () != 0); return; } -#line 526 "src/parse/lex_conf.cc" +#line 532 "src/parse/lex_conf.cc" yy146: yych = (unsigned char)*++cur; if (yych <= '0') goto yy13; @@ -569,9 +575,9 @@ yy158: yych = (unsigned char)*++cur; if (yych != 't') goto yy13; ++cur; -#line 82 "../src/parse/lex_conf.re" +#line 89 "../src/parse/lex_conf.re" { opts.set_yynext (lex_conf_string ()); return; } -#line 575 "src/parse/lex_conf.cc" +#line 581 "src/parse/lex_conf.cc" yy163: yych = (unsigned char)*++cur; if (yych != 'l') goto yy13; @@ -588,9 +594,9 @@ yy163: yych = (unsigned char)*++cur; if (yych != 'l') goto yy13; ++cur; -#line 81 "../src/parse/lex_conf.re" +#line 88 "../src/parse/lex_conf.re" { opts.set_yyfilllabel (lex_conf_string ()); return; } -#line 594 "src/parse/lex_conf.cc" +#line 600 "src/parse/lex_conf.cc" yy172: yych = (unsigned char)*++cur; if (yych != 'e') goto yy13; @@ -601,9 +607,9 @@ yy172: yych = (unsigned char)*++cur; if (yych != 'x') goto yy13; ++cur; -#line 140 "../src/parse/lex_conf.re" +#line 147 "../src/parse/lex_conf.re" { opts.set_labelPrefix (lex_conf_string ()); return; } -#line 607 "src/parse/lex_conf.cc" +#line 613 "src/parse/lex_conf.cc" yy178: yych = (unsigned char)*++cur; if (yych != 'd') goto yy13; @@ -634,14 +640,14 @@ yy185: yych = (unsigned char)*++cur; if (yych != 'g') goto yy13; ++cur; -#line 114 "../src/parse/lex_conf.re" +#line 121 "../src/parse/lex_conf.re" { opts.set_indString (lex_conf_string ()); return; } -#line 640 "src/parse/lex_conf.cc" +#line 646 "src/parse/lex_conf.cc" yy192: yych = (unsigned char)*++cur; if (yych != 'p') goto yy13; ++cur; -#line 116 "../src/parse/lex_conf.re" +#line 123 "../src/parse/lex_conf.re" { const int32_t n = lex_conf_number (); if (n < 0) @@ -651,7 +657,7 @@ yy192: opts.set_topIndent (static_cast<uint32_t> (n)); return; } -#line 655 "src/parse/lex_conf.cc" +#line 661 "src/parse/lex_conf.cc" yy195: yych = (unsigned char)*++cur; if (yych != 'a') goto yy13; @@ -675,7 +681,7 @@ yy195: } yy200: ++cur; -#line 38 "../src/parse/lex_conf.re" +#line 45 "../src/parse/lex_conf.re" { Enc::type_t enc = Enc::ASCII; switch (cur[-1]) @@ -699,7 +705,7 @@ yy200: } return; } -#line 703 "src/parse/lex_conf.cc" +#line 709 "src/parse/lex_conf.cc" yy202: yych = (unsigned char)*++cur; if (yych != 'f') goto yy13; @@ -799,9 +805,9 @@ yy223: yych = (unsigned char)*(ptr = ++cur); if (yych == ':') goto yy229; yy228: -#line 76 "../src/parse/lex_conf.re" +#line 83 "../src/parse/lex_conf.re" { opts.set_state_get (lex_conf_string ()); return; } -#line 805 "src/parse/lex_conf.cc" +#line 811 "src/parse/lex_conf.cc" yy229: yych = (unsigned char)*++cur; if (yych != 'n') goto yy13; @@ -814,9 +820,9 @@ yy229: yych = (unsigned char)*++cur; if (yych != 'd') goto yy13; ++cur; -#line 77 "../src/parse/lex_conf.re" +#line 84 "../src/parse/lex_conf.re" { opts.set_state_get_naked (lex_conf_number () != 0); return; } -#line 820 "src/parse/lex_conf.cc" +#line 826 "src/parse/lex_conf.cc" yy236: yych = (unsigned char)*++cur; if (yych != 'N') goto yy13; @@ -836,9 +842,9 @@ yy236: yych = (unsigned char)*(ptr = ++cur); if (yych == ':') goto yy245; yy244: -#line 63 "../src/parse/lex_conf.re" +#line 70 "../src/parse/lex_conf.re" { opts.set_cond_get (lex_conf_string ()); return; } -#line 842 "src/parse/lex_conf.cc" +#line 848 "src/parse/lex_conf.cc" yy245: yych = (unsigned char)*++cur; if (yych != 'n') goto yy13; @@ -851,9 +857,9 @@ yy245: yych = (unsigned char)*++cur; if (yych != 'd') goto yy13; ++cur; -#line 64 "../src/parse/lex_conf.re" +#line 71 "../src/parse/lex_conf.re" { opts.set_cond_get_naked (lex_conf_number () != 0); return; } -#line 857 "src/parse/lex_conf.cc" +#line 863 "src/parse/lex_conf.cc" yy252: yych = (unsigned char)*++cur; if (yych != 'R') goto yy13; @@ -864,18 +870,18 @@ yy252: yych = (unsigned char)*++cur; if (yych != 'R') goto yy13; ++cur; -#line 102 "../src/parse/lex_conf.re" +#line 109 "../src/parse/lex_conf.re" { opts.set_yymarker (lex_conf_string ()); return; } -#line 870 "src/parse/lex_conf.cc" +#line 876 "src/parse/lex_conf.cc" yy258: yych = (unsigned char)*++cur; if (yych != 'E') goto yy13; yych = (unsigned char)*++cur; if (yych != 'K') goto yy13; ++cur; -#line 106 "../src/parse/lex_conf.re" +#line 113 "../src/parse/lex_conf.re" { opts.set_yypeek (lex_conf_string ()); return; } -#line 879 "src/parse/lex_conf.cc" +#line 885 "src/parse/lex_conf.cc" yy262: yych = (unsigned char)*++cur; if (yych == 'T') goto yy267; @@ -886,9 +892,9 @@ yy263: yych = (unsigned char)*++cur; if (yych != 'P') goto yy13; ++cur; -#line 107 "../src/parse/lex_conf.re" +#line 114 "../src/parse/lex_conf.re" { opts.set_yyskip (lex_conf_string ()); return; } -#line 892 "src/parse/lex_conf.cc" +#line 898 "src/parse/lex_conf.cc" yy267: yych = (unsigned char)*++cur; if (yych == 'C') goto yy268; @@ -912,9 +918,9 @@ yy269: if (yych == ':') goto yy276; if (yych == '@') goto yy275; yy274: -#line 78 "../src/parse/lex_conf.re" +#line 85 "../src/parse/lex_conf.re" { opts.set_state_set (lex_conf_string ()); return; } -#line 918 "src/parse/lex_conf.cc" +#line 924 "src/parse/lex_conf.cc" yy275: yych = (unsigned char)*++cur; if (yych == 's') goto yy283; @@ -931,9 +937,9 @@ yy276: yych = (unsigned char)*++cur; if (yych != 'd') goto yy13; ++cur; -#line 79 "../src/parse/lex_conf.re" +#line 86 "../src/parse/lex_conf.re" { opts.set_state_set_naked (lex_conf_number () != 0); return; } -#line 937 "src/parse/lex_conf.cc" +#line 943 "src/parse/lex_conf.cc" yy283: yych = (unsigned char)*++cur; if (yych != 't') goto yy13; @@ -944,9 +950,9 @@ yy283: yych = (unsigned char)*++cur; if (yych != 'e') goto yy13; ++cur; -#line 80 "../src/parse/lex_conf.re" +#line 87 "../src/parse/lex_conf.re" { opts.set_state_set_arg (lex_conf_string ()); return; } -#line 950 "src/parse/lex_conf.cc" +#line 956 "src/parse/lex_conf.cc" yy289: yych = (unsigned char)*++cur; if (yych != 'N') goto yy13; @@ -967,9 +973,9 @@ yy289: if (yych == ':') goto yy298; if (yych == '@') goto yy299; yy297: -#line 65 "../src/parse/lex_conf.re" +#line 72 "../src/parse/lex_conf.re" { opts.set_cond_set (lex_conf_string ()); return; } -#line 973 "src/parse/lex_conf.cc" +#line 979 "src/parse/lex_conf.cc" yy298: yych = (unsigned char)*++cur; if (yych == 'n') goto yy305; @@ -984,9 +990,9 @@ yy299: yych = (unsigned char)*++cur; if (yych != 'd') goto yy13; ++cur; -#line 66 "../src/parse/lex_conf.re" +#line 73 "../src/parse/lex_conf.re" { opts.set_cond_set_arg (lex_conf_string ()); return; } -#line 990 "src/parse/lex_conf.cc" +#line 996 "src/parse/lex_conf.cc" yy305: yych = (unsigned char)*++cur; if (yych != 'a') goto yy13; @@ -997,9 +1003,9 @@ yy305: yych = (unsigned char)*++cur; if (yych != 'd') goto yy13; ++cur; -#line 67 "../src/parse/lex_conf.re" +#line 74 "../src/parse/lex_conf.re" { opts.set_cond_set_naked (lex_conf_number () != 0); return; } -#line 1003 "src/parse/lex_conf.cc" +#line 1009 "src/parse/lex_conf.cc" yy311: yych = (unsigned char)*++cur; if (yych != 'C') goto yy13; @@ -1013,18 +1019,18 @@ yy311: yych = (unsigned char)*(ptr = ++cur); if (yych == 'C') goto yy317; yy316: -#line 108 "../src/parse/lex_conf.re" +#line 115 "../src/parse/lex_conf.re" { opts.set_yybackup (lex_conf_string ()); return; } -#line 1019 "src/parse/lex_conf.cc" +#line 1025 "src/parse/lex_conf.cc" yy317: yych = (unsigned char)*++cur; if (yych != 'T') goto yy13; yych = (unsigned char)*++cur; if (yych != 'X') goto yy13; ++cur; -#line 109 "../src/parse/lex_conf.re" +#line 116 "../src/parse/lex_conf.re" { opts.set_yybackupctx (lex_conf_string ()); return; } -#line 1028 "src/parse/lex_conf.cc" +#line 1034 "src/parse/lex_conf.cc" yy321: yych = (unsigned char)*++cur; if (yych != 'S') goto yy13; @@ -1040,18 +1046,18 @@ yy321: yych = (unsigned char)*(ptr = ++cur); if (yych == 'C') goto yy328; yy327: -#line 110 "../src/parse/lex_conf.re" +#line 117 "../src/parse/lex_conf.re" { opts.set_yyrestore (lex_conf_string ()); return; } -#line 1046 "src/parse/lex_conf.cc" +#line 1052 "src/parse/lex_conf.cc" yy328: yych = (unsigned char)*++cur; if (yych != 'T') goto yy13; yych = (unsigned char)*++cur; if (yych != 'X') goto yy13; ++cur; -#line 111 "../src/parse/lex_conf.re" +#line 118 "../src/parse/lex_conf.re" { opts.set_yyrestorectx (lex_conf_string ()); return; } -#line 1055 "src/parse/lex_conf.cc" +#line 1061 "src/parse/lex_conf.cc" yy332: yych = (unsigned char)*++cur; if (yych == 'M') goto yy341; @@ -1070,18 +1076,18 @@ yy333: yych = (unsigned char)*++cur; if (yych != 'N') goto yy13; ++cur; -#line 112 "../src/parse/lex_conf.re" +#line 119 "../src/parse/lex_conf.re" { opts.set_yylessthan (lex_conf_string ()); return; } -#line 1076 "src/parse/lex_conf.cc" +#line 1082 "src/parse/lex_conf.cc" yy341: yych = (unsigned char)*++cur; if (yych != 'I') goto yy13; yych = (unsigned char)*++cur; if (yych != 'T') goto yy13; ++cur; -#line 104 "../src/parse/lex_conf.re" +#line 111 "../src/parse/lex_conf.re" { opts.set_yylimit (lex_conf_string ()); return; } -#line 1085 "src/parse/lex_conf.cc" +#line 1091 "src/parse/lex_conf.cc" yy345: yych = (unsigned char)*++cur; if (yych != 'B') goto yy13; @@ -1090,9 +1096,9 @@ yy345: yych = (unsigned char)*++cur; if (yych != 'G') goto yy13; ++cur; -#line 126 "../src/parse/lex_conf.re" +#line 133 "../src/parse/lex_conf.re" { opts.set_yydebug (lex_conf_string ()); return; } -#line 1096 "src/parse/lex_conf.cc" +#line 1102 "src/parse/lex_conf.cc" yy350: yych = (unsigned char)*++cur; if (yych == 'N') goto yy370; @@ -1123,16 +1129,16 @@ yy354: yych = (unsigned char)*++cur; if (yych != 'R') goto yy13; ++cur; -#line 103 "../src/parse/lex_conf.re" +#line 110 "../src/parse/lex_conf.re" { opts.set_yyctxmarker (lex_conf_string ()); return; } -#line 1129 "src/parse/lex_conf.cc" +#line 1135 "src/parse/lex_conf.cc" yy362: yych = (unsigned char)*++cur; if (yych != 'E') goto yy13; ++cur; -#line 128 "../src/parse/lex_conf.re" +#line 135 "../src/parse/lex_conf.re" { opts.set_yyctype (lex_conf_string ()); return; } -#line 1136 "src/parse/lex_conf.cc" +#line 1142 "src/parse/lex_conf.cc" yy365: yych = (unsigned char)*++cur; if (yych != 'S') goto yy13; @@ -1141,9 +1147,9 @@ yy365: yych = (unsigned char)*++cur; if (yych != 'R') goto yy13; ++cur; -#line 101 "../src/parse/lex_conf.re" +#line 108 "../src/parse/lex_conf.re" { opts.set_yycursor (lex_conf_string ()); return; } -#line 1147 "src/parse/lex_conf.cc" +#line 1153 "src/parse/lex_conf.cc" yy370: yych = (unsigned char)*++cur; if (yych != 'D') goto yy13; @@ -1156,9 +1162,9 @@ yy370: yych = (unsigned char)*++cur; if (yych != 'E') goto yy13; ++cur; -#line 62 "../src/parse/lex_conf.re" +#line 69 "../src/parse/lex_conf.re" { opts.set_yycondtype (lex_conf_string ()); return; } -#line 1162 "src/parse/lex_conf.cc" +#line 1168 "src/parse/lex_conf.cc" yy377: yych = (unsigned char)*++cur; if (yych != 'L') goto yy13; @@ -1169,9 +1175,9 @@ yy377: if (yych == ':') goto yy381; if (yych == '@') goto yy382; yy380: -#line 133 "../src/parse/lex_conf.re" +#line 140 "../src/parse/lex_conf.re" { opts.set_fill (lex_conf_string ()); return; } -#line 1175 "src/parse/lex_conf.cc" +#line 1181 "src/parse/lex_conf.cc" yy381: yych = (unsigned char)*++cur; if (yych == 'n') goto yy387; @@ -1184,9 +1190,9 @@ yy382: yych = (unsigned char)*++cur; if (yych != 'n') goto yy13; ++cur; -#line 135 "../src/parse/lex_conf.re" +#line 142 "../src/parse/lex_conf.re" { opts.set_fill_arg (lex_conf_string ()); return; } -#line 1190 "src/parse/lex_conf.cc" +#line 1196 "src/parse/lex_conf.cc" yy387: yych = (unsigned char)*++cur; if (yych != 'a') goto yy13; @@ -1197,9 +1203,9 @@ yy387: yych = (unsigned char)*++cur; if (yych != 'd') goto yy13; ++cur; -#line 137 "../src/parse/lex_conf.re" +#line 144 "../src/parse/lex_conf.re" { opts.set_fill_naked (lex_conf_number () != 0); return; } -#line 1203 "src/parse/lex_conf.cc" +#line 1209 "src/parse/lex_conf.cc" yy393: yych = (unsigned char)*++cur; if (yych == 'o') goto yy441; @@ -1248,9 +1254,9 @@ yy401: yych = (unsigned char)*(ptr = ++cur); if (yych == '@') goto yy409; yy408: -#line 70 "../src/parse/lex_conf.re" +#line 77 "../src/parse/lex_conf.re" { opts.set_condDivider (lex_conf_string ()); return; } -#line 1254 "src/parse/lex_conf.cc" +#line 1260 "src/parse/lex_conf.cc" yy409: yych = (unsigned char)*++cur; if (yych != 'c') goto yy13; @@ -1261,9 +1267,9 @@ yy409: yych = (unsigned char)*++cur; if (yych != 'd') goto yy13; ++cur; -#line 71 "../src/parse/lex_conf.re" +#line 78 "../src/parse/lex_conf.re" { opts.set_condDividerParam (lex_conf_string ()); return; } -#line 1267 "src/parse/lex_conf.cc" +#line 1273 "src/parse/lex_conf.cc" yy415: yych = (unsigned char)*++cur; if (yych != 't') goto yy13; @@ -1273,9 +1279,9 @@ yy415: yych = (unsigned char)*(ptr = ++cur); if (yych == '@') goto yy419; yy418: -#line 72 "../src/parse/lex_conf.re" +#line 79 "../src/parse/lex_conf.re" { opts.set_condGoto (lex_conf_string ()); return; } -#line 1279 "src/parse/lex_conf.cc" +#line 1285 "src/parse/lex_conf.cc" yy419: yych = (unsigned char)*++cur; if (yych != 'c') goto yy13; @@ -1286,9 +1292,9 @@ yy419: yych = (unsigned char)*++cur; if (yych != 'd') goto yy13; ++cur; -#line 73 "../src/parse/lex_conf.re" +#line 80 "../src/parse/lex_conf.re" { opts.set_condGotoParam (lex_conf_string ()); return; } -#line 1292 "src/parse/lex_conf.cc" +#line 1298 "src/parse/lex_conf.cc" yy425: yych = (unsigned char)*++cur; if (yych != 'u') goto yy13; @@ -1307,9 +1313,9 @@ yy425: yych = (unsigned char)*++cur; if (yych != 'x') goto yy13; ++cur; -#line 69 "../src/parse/lex_conf.re" +#line 76 "../src/parse/lex_conf.re" { opts.set_condEnumPrefix (lex_conf_string ()); return; } -#line 1313 "src/parse/lex_conf.cc" +#line 1319 "src/parse/lex_conf.cc" yy435: yych = (unsigned char)*++cur; if (yych != 'e') goto yy13; @@ -1320,9 +1326,9 @@ yy435: yych = (unsigned char)*++cur; if (yych != 'x') goto yy13; ++cur; -#line 68 "../src/parse/lex_conf.re" +#line 75 "../src/parse/lex_conf.re" { opts.set_condPrefix (lex_conf_string ()); return; } -#line 1326 "src/parse/lex_conf.cc" +#line 1332 "src/parse/lex_conf.cc" yy441: yych = (unsigned char)*++cur; if (yych != 't') goto yy13; @@ -1349,7 +1355,7 @@ yy441: yych = (unsigned char)*++cur; if (yych != 'd') goto yy13; ++cur; -#line 90 "../src/parse/lex_conf.re" +#line 97 "../src/parse/lex_conf.re" { const int32_t n = lex_conf_number (); if (n < 0) @@ -1359,16 +1365,16 @@ yy441: opts.set_cGotoThreshold (static_cast<uint32_t> (n)); return; } -#line 1363 "src/parse/lex_conf.cc" +#line 1369 "src/parse/lex_conf.cc" } -#line 148 "../src/parse/lex_conf.re" +#line 155 "../src/parse/lex_conf.re" } void Scanner::lex_conf_assign () { -#line 1372 "src/parse/lex_conf.cc" +#line 1378 "src/parse/lex_conf.cc" { unsigned char yych; static const unsigned char yybm[] = { @@ -1415,9 +1421,9 @@ void Scanner::lex_conf_assign () } ++cur; yy458: -#line 154 "../src/parse/lex_conf.re" +#line 161 "../src/parse/lex_conf.re" { fatal ("missing '=' in configuration"); } -#line 1421 "src/parse/lex_conf.cc" +#line 1427 "src/parse/lex_conf.cc" yy459: yych = (unsigned char)*(ptr = ++cur); if (yych <= 0x1F) { @@ -1433,9 +1439,9 @@ yy460: yych = (unsigned char)*cur; goto yy463; yy461: -#line 155 "../src/parse/lex_conf.re" +#line 162 "../src/parse/lex_conf.re" { return; } -#line 1439 "src/parse/lex_conf.cc" +#line 1445 "src/parse/lex_conf.cc" yy462: ++cur; if (lim <= cur) fill(1); @@ -1458,14 +1464,14 @@ yy464: cur = ptr; goto yy458; } -#line 156 "../src/parse/lex_conf.re" +#line 163 "../src/parse/lex_conf.re" } void Scanner::lex_conf_semicolon () { -#line 1469 "src/parse/lex_conf.cc" +#line 1475 "src/parse/lex_conf.cc" { unsigned char yych; static const unsigned char yybm[] = { @@ -1512,9 +1518,9 @@ void Scanner::lex_conf_semicolon () } ++cur; yy470: -#line 162 "../src/parse/lex_conf.re" +#line 169 "../src/parse/lex_conf.re" { fatal ("missing ending ';' in configuration"); } -#line 1518 "src/parse/lex_conf.cc" +#line 1524 "src/parse/lex_conf.cc" yy471: yych = (unsigned char)*(ptr = ++cur); if (yybm[0+yych] & 128) { @@ -1525,9 +1531,9 @@ yy471: yy472: ++cur; yy473: -#line 163 "../src/parse/lex_conf.re" +#line 170 "../src/parse/lex_conf.re" { return; } -#line 1531 "src/parse/lex_conf.cc" +#line 1537 "src/parse/lex_conf.cc" yy474: yych = (unsigned char)*++cur; goto yy473; @@ -1542,7 +1548,7 @@ yy475: cur = ptr; goto yy470; } -#line 164 "../src/parse/lex_conf.re" +#line 171 "../src/parse/lex_conf.re" } @@ -1551,7 +1557,7 @@ int32_t Scanner::lex_conf_number () lex_conf_assign (); tok = cur; -#line 1555 "src/parse/lex_conf.cc" +#line 1561 "src/parse/lex_conf.cc" { unsigned char yych; static const unsigned char yybm[] = { @@ -1600,7 +1606,7 @@ yy480: yy481: ++cur; yy482: -#line 173 "../src/parse/lex_conf.re" +#line 180 "../src/parse/lex_conf.re" { int32_t n = 0; if (!s_to_i32_unsafe (tok, cur, n)) @@ -1610,7 +1616,7 @@ yy482: lex_conf_semicolon (); return n; } -#line 1614 "src/parse/lex_conf.cc" +#line 1620 "src/parse/lex_conf.cc" yy483: yych = (unsigned char)*++cur; if (yych <= '0') goto yy480; @@ -1624,7 +1630,7 @@ yy484: } goto yy482; } -#line 182 "../src/parse/lex_conf.re" +#line 189 "../src/parse/lex_conf.re" } @@ -1634,7 +1640,7 @@ std::string Scanner::lex_conf_string () std::string s; tok = cur; -#line 1638 "src/parse/lex_conf.cc" +#line 1644 "src/parse/lex_conf.cc" { unsigned char yych; static const unsigned char yybm[] = { @@ -1689,15 +1695,15 @@ std::string Scanner::lex_conf_string () } } yy488: -#line 205 "../src/parse/lex_conf.re" +#line 212 "../src/parse/lex_conf.re" { s = std::string(tok, tok_len()); goto end; } -#line 1698 "src/parse/lex_conf.cc" +#line 1704 "src/parse/lex_conf.cc" yy489: ++cur; -#line 191 "../src/parse/lex_conf.re" +#line 198 "../src/parse/lex_conf.re" { const char quote = tok[0]; for (bool end;;) { @@ -1712,7 +1718,7 @@ yy489: } } } -#line 1716 "src/parse/lex_conf.cc" +#line 1722 "src/parse/lex_conf.cc" yy491: ++cur; if (lim <= cur) fill(1); @@ -1722,7 +1728,7 @@ yy491: } goto yy488; } -#line 209 "../src/parse/lex_conf.re" +#line 216 "../src/parse/lex_conf.re" end: lex_conf_semicolon (); diff --git a/bootstrap/src/parse/parser.cc b/bootstrap/src/parse/parser.cc index 700172ae..13190ce3 100644 --- a/bootstrap/src/parse/parser.cc +++ b/bootstrap/src/parse/parser.cc @@ -68,26 +68,41 @@ +#include "src/util/c99_stdint.h" #include <assert.h> -#include <time.h> -#include <string.h> +#include <stddef.h> #include <stdlib.h> -#include <iostream> +#include <limits> +#include <list> +#include <map> #include <set> +#include <string> +#include <utility> +#include <vector> -#include "config.h" +#include "src/codegen/output.h" #include "src/codegen/skeleton/skeleton.h" +#include "src/conf/opt.h" +#include "src/globals.h" #include "src/ir/bytecode/bytecode.h" +#include "src/ir/dfa/dfa.h" #include "src/ir/regexp/encoding/enc.h" #include "src/ir/regexp/encoding/range_suffix.h" +#include "src/ir/regexp/regexp.h" #include "src/ir/regexp/regexp_cat.h" #include "src/ir/regexp/regexp_close.h" #include "src/ir/regexp/regexp_null.h" -#include "src/globals.h" +#include "src/ir/regexp/regexp_rule.h" +#include "src/ir/rule_rank.h" #include "src/parse/code.h" #include "src/parse/extop.h" +#include "src/parse/loc.h" #include "src/parse/parser.h" -#include "src/util/c99_stdint.h" +#include "src/parse/scanner.h" +#include "src/parse/spec.h" +#include "src/util/counter.h" +#include "src/util/free_list.h" +#include "src/util/range.h" #include "src/util/smart_ptr.h" #define YYMALLOC malloc @@ -240,17 +255,17 @@ void default_rule(CondList *clist, const Code * code) /* Put the tokens into the symbol table, so that GDB and other debuggers know about them. */ enum yytokentype { - CLOSE = 258, - CLOSESIZE = 259, - CODE = 260, - CONF = 261, - ID = 262, - FID = 263, - FID_END = 264, - NOCOND = 265, - REGEXP = 266, - SETUP = 267, - STAR = 268 + TOKEN_CLOSE = 258, + TOKEN_CLOSESIZE = 259, + TOKEN_CODE = 260, + TOKEN_CONF = 261, + TOKEN_ID = 262, + TOKEN_FID = 263, + TOKEN_FID_END = 264, + TOKEN_NOCOND = 265, + TOKEN_REGEXP = 266, + TOKEN_SETUP = 267, + TOKEN_STAR = 268 }; #endif @@ -583,11 +598,11 @@ static const yytype_int8 yyrhs[] = /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 183, 183, 185, 189, 193, 202, 211, 215, 219, - 223, 240, 258, 262, 268, 273, 279, 283, 298, 315, - 320, 326, 342, 360, 380, 386, 394, 397, 404, 410, - 420, 423, 431, 434, 441, 445, 452, 456, 463, 467, - 474, 478, 493, 513, 517, 521, 525, 532, 542, 546 + 0, 198, 198, 200, 204, 208, 217, 226, 230, 234, + 238, 255, 273, 277, 283, 288, 294, 298, 313, 330, + 335, 341, 357, 375, 395, 401, 409, 412, 419, 425, + 435, 438, 446, 449, 456, 460, 467, 471, 478, 482, + 489, 493, 508, 528, 532, 536, 540, 547, 557, 561 }; #endif @@ -596,8 +611,9 @@ static const yytype_uint16 yyrline[] = First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { - "$end", "error", "$undefined", "CLOSE", "CLOSESIZE", "CODE", "CONF", - "ID", "FID", "FID_END", "NOCOND", "REGEXP", "SETUP", "STAR", "'='", + "$end", "error", "$undefined", "TOKEN_CLOSE", "TOKEN_CLOSESIZE", + "TOKEN_CODE", "TOKEN_CONF", "TOKEN_ID", "TOKEN_FID", "TOKEN_FID_END", + "TOKEN_NOCOND", "TOKEN_REGEXP", "TOKEN_SETUP", "TOKEN_STAR", "'='", "';'", "'/'", "'<'", "'>'", "':'", "','", "'|'", "'\\\\'", "'('", "')'", "$accept", "spec", "decl", "rule", "cond", "clist", "newcond", "look", "expr", "diff", "term", "factor", "close", "primary", 0 @@ -1953,7 +1969,7 @@ yyreduce: { (yyvsp[(1) - (2)].regexp)->ins_access = RegExp::PRIVATE; - if ((yyvsp[(2) - (2)].extop).max == UINT32_MAX) + if ((yyvsp[(2) - (2)].extop).max == std::numeric_limits<uint32_t>::max()) { (yyval.regexp) = repeat_from ((yyvsp[(1) - (2)].regexp), (yyvsp[(2) - (2)].extop).min); } @@ -2259,8 +2275,8 @@ void parse(Scanner& i, Output & o) in = &i; - o.source.write_version_time (); - o.source.write_line_info (in->get_cline (), in->get_fname ().c_str ()); + o.source.wversion_time () + .wline_info (in->get_cline (), in->get_fname ().c_str ()); if (opts->target == opt_t::SKELETON) { Skeleton::emit_prolog (o.source); @@ -2411,7 +2427,7 @@ void parse(Scanner& i, Output & o) } } } - o.source.write_line_info (in->get_cline (), in->get_fname ().c_str ()); + o.source.wline_info (in->get_cline (), in->get_fname ().c_str ()); /* restore original char handling mode*/ opts.reset_encoding (encodingOld); } diff --git a/bootstrap/src/parse/y.tab.h b/bootstrap/src/parse/y.tab.h index afb75933..5a876216 100644 --- a/bootstrap/src/parse/y.tab.h +++ b/bootstrap/src/parse/y.tab.h @@ -38,17 +38,17 @@ /* Put the tokens into the symbol table, so that GDB and other debuggers know about them. */ enum yytokentype { - CLOSE = 258, - CLOSESIZE = 259, - CODE = 260, - CONF = 261, - ID = 262, - FID = 263, - FID_END = 264, - NOCOND = 265, - REGEXP = 266, - SETUP = 267, - STAR = 268 + TOKEN_CLOSE = 258, + TOKEN_CLOSESIZE = 259, + TOKEN_CODE = 260, + TOKEN_CONF = 261, + TOKEN_ID = 262, + TOKEN_FID = 263, + TOKEN_FID_END = 264, + TOKEN_NOCOND = 265, + TOKEN_REGEXP = 266, + TOKEN_SETUP = 267, + TOKEN_STAR = 268 }; #endif |