From: Ulya Trofimovich Date: Wed, 23 Sep 2015 16:32:36 +0000 (+0100) Subject: Merged 'DFlag' and 'flag_skeleton' into one option 'target'. X-Git-Tag: 0.15~46 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a72a824bbeaed71a65e590362193669dc77eb7eb;p=re2c Merged 'DFlag' and 'flag_skeleton' into one option 'target'. The nature of these options makes them mutually exclusive; so instead of checking that they are not both set just make them a single option. --- diff --git a/re2c/bootstrap/src/conf/parse_opts.cc b/re2c/bootstrap/src/conf/parse_opts.cc index b9daf36d..98306458 100644 --- a/re2c/bootstrap/src/conf/parse_opts.cc +++ b/re2c/bootstrap/src/conf/parse_opts.cc @@ -1,4 +1,4 @@ -/* Generated by re2c 0.14.3 on Wed Sep 23 14:13:43 2015 */ +/* Generated by re2c 0.14.3 on Wed Sep 23 17:21:05 2015 */ #line 1 "../src/conf/parse_opts.re" #include @@ -499,7 +499,7 @@ opt_short: { YYCTYPE yych; yych = (YYCTYPE)*YYCURSOR; - if (yych <= 'c') { + if (yych <= 'b') { if (yych <= 'C') { if (yych <= '7') { if (yych <= 0x00) goto yy163; @@ -511,43 +511,51 @@ opt_short: goto yy165; } } else { - if (yych <= 'U') { + if (yych <= 'R') { if (yych <= 'D') goto yy173; if (yych == 'F') goto yy175; goto yy165; } else { - if (yych <= 'V') goto yy177; - if (yych <= 'a') goto yy165; - if (yych <= 'b') goto yy179; - goto yy181; + if (yych <= 'U') { + if (yych <= 'S') goto yy177; + goto yy165; + } else { + if (yych <= 'V') goto yy179; + if (yych <= 'a') goto yy165; + goto yy181; + } } } } else { if (yych <= 'o') { - if (yych <= 'g') { - if (yych <= 'd') goto yy183; - if (yych <= 'e') goto yy185; - if (yych <= 'f') goto yy187; + if (yych <= 'f') { + if (yych <= 'c') goto yy183; + if (yych <= 'd') goto yy185; + if (yych <= 'e') goto yy187; goto yy189; } else { - if (yych <= 'h') goto yy171; - if (yych <= 'i') goto yy191; - if (yych <= 'n') goto yy165; - goto yy193; + if (yych <= 'h') { + if (yych <= 'g') goto yy191; + goto yy171; + } else { + if (yych <= 'i') goto yy193; + if (yych <= 'n') goto yy165; + goto yy195; + } } } else { if (yych <= 't') { if (yych <= 'q') goto yy165; - if (yych <= 'r') goto yy195; - if (yych <= 's') goto yy197; - goto yy199; + if (yych <= 'r') goto yy197; + if (yych <= 's') goto yy199; + goto yy201; } else { if (yych <= 'v') { - if (yych <= 'u') goto yy201; - goto yy203; + if (yych <= 'u') goto yy203; + goto yy205; } else { - if (yych <= 'w') goto yy205; - if (yych <= 'x') goto yy207; + if (yych <= 'w') goto yy207; + if (yych <= 'x') goto yy209; goto yy165; } } @@ -557,7 +565,7 @@ yy163: ++YYCURSOR; #line 94 "../src/conf/parse_opts.re" { goto opt; } -#line 561 "src/conf/parse_opts.cc" +#line 569 "src/conf/parse_opts.cc" yy165: ++YYCURSOR; #line 90 "../src/conf/parse_opts.re" @@ -565,895 +573,900 @@ yy165: error ("bad short option: %s", *argv); return EXIT_FAIL; } -#line 569 "src/conf/parse_opts.cc" +#line 577 "src/conf/parse_opts.cc" yy167: ++YYCURSOR; -#line 117 "../src/conf/parse_opts.re" +#line 118 "../src/conf/parse_opts.re" { goto opt_short; } -#line 574 "src/conf/parse_opts.cc" +#line 582 "src/conf/parse_opts.cc" yy169: ++YYCURSOR; -#line 112 "../src/conf/parse_opts.re" +#line 113 "../src/conf/parse_opts.re" { if (!opts.utf_8 ()) { error_encoding (); return EXIT_FAIL; } goto opt_short; } -#line 579 "src/conf/parse_opts.cc" +#line 587 "src/conf/parse_opts.cc" yy171: ++YYCURSOR; #line 95 "../src/conf/parse_opts.re" { usage (); return EXIT_OK; } -#line 584 "src/conf/parse_opts.cc" +#line 592 "src/conf/parse_opts.cc" yy173: ++YYCURSOR; #line 101 "../src/conf/parse_opts.re" - { opts.emit_dot (); goto opt_short; } -#line 589 "src/conf/parse_opts.cc" + { opts.set_target (opt_t::DOT); goto opt_short; } +#line 597 "src/conf/parse_opts.cc" yy175: ++YYCURSOR; #line 103 "../src/conf/parse_opts.re" - { opts.flex_syntax (); goto opt_short; } -#line 594 "src/conf/parse_opts.cc" + { opts.flex_syntax (); goto opt_short; } +#line 602 "src/conf/parse_opts.cc" yy177: ++YYCURSOR; +#line 108 "../src/conf/parse_opts.re" + { opts.set_target (opt_t::SKELETON); goto opt_short; } +#line 607 "src/conf/parse_opts.cc" +yy179: + ++YYCURSOR; #line 97 "../src/conf/parse_opts.re" { vernum (); return EXIT_OK; } -#line 599 "src/conf/parse_opts.cc" -yy179: +#line 612 "src/conf/parse_opts.cc" +yy181: ++YYCURSOR; #line 98 "../src/conf/parse_opts.re" - { opts.bit_vectors (); goto opt_short; } -#line 604 "src/conf/parse_opts.cc" -yy181: + { opts.bit_vectors (); goto opt_short; } +#line 617 "src/conf/parse_opts.cc" +yy183: ++YYCURSOR; #line 99 "../src/conf/parse_opts.re" - { opts.start_conditions (); goto opt_short; } -#line 609 "src/conf/parse_opts.cc" -yy183: + { opts.start_conditions (); goto opt_short; } +#line 622 "src/conf/parse_opts.cc" +yy185: ++YYCURSOR; #line 100 "../src/conf/parse_opts.re" - { opts.debug_output (); goto opt_short; } -#line 614 "src/conf/parse_opts.cc" -yy185: + { opts.debug_output (); goto opt_short; } +#line 627 "src/conf/parse_opts.cc" +yy187: ++YYCURSOR; -#line 108 "../src/conf/parse_opts.re" +#line 109 "../src/conf/parse_opts.re" { if (!opts.ecb ()) { error_encoding (); return EXIT_FAIL; } goto opt_short; } -#line 619 "src/conf/parse_opts.cc" -yy187: +#line 632 "src/conf/parse_opts.cc" +yy189: ++YYCURSOR; #line 102 "../src/conf/parse_opts.re" - { opts.storable_state (); goto opt_short; } -#line 624 "src/conf/parse_opts.cc" -yy189: + { opts.storable_state (); goto opt_short; } +#line 637 "src/conf/parse_opts.cc" +yy191: ++YYCURSOR; #line 104 "../src/conf/parse_opts.re" - { opts.computed_gotos (); goto opt_short; } -#line 629 "src/conf/parse_opts.cc" -yy191: + { opts.computed_gotos (); goto opt_short; } +#line 642 "src/conf/parse_opts.cc" +yy193: ++YYCURSOR; #line 105 "../src/conf/parse_opts.re" - { opts.no_debug_info (); goto opt_short; } -#line 634 "src/conf/parse_opts.cc" -yy193: + { opts.no_debug_info (); goto opt_short; } +#line 647 "src/conf/parse_opts.cc" +yy195: ++YYCURSOR; - if ((yych = (YYCTYPE)*YYCURSOR) <= 0x00) goto yy211; -#line 114 "../src/conf/parse_opts.re" + if ((yych = (YYCTYPE)*YYCURSOR) <= 0x00) goto yy213; +#line 115 "../src/conf/parse_opts.re" { *argv = YYCURSOR; goto opt_output; } -#line 640 "src/conf/parse_opts.cc" -yy195: +#line 653 "src/conf/parse_opts.cc" +yy197: ++YYCURSOR; #line 106 "../src/conf/parse_opts.re" - { opts.reusable (); goto opt_short; } -#line 645 "src/conf/parse_opts.cc" -yy197: + { opts.reusable (); goto opt_short; } +#line 658 "src/conf/parse_opts.cc" +yy199: ++YYCURSOR; #line 107 "../src/conf/parse_opts.re" - { opts.nested_ifs (); goto opt_short; } -#line 650 "src/conf/parse_opts.cc" -yy199: + { opts.nested_ifs (); goto opt_short; } +#line 663 "src/conf/parse_opts.cc" +yy201: ++YYCURSOR; - if ((yych = (YYCTYPE)*YYCURSOR) <= 0x00) goto yy209; -#line 116 "../src/conf/parse_opts.re" + if ((yych = (YYCTYPE)*YYCURSOR) <= 0x00) goto yy211; +#line 117 "../src/conf/parse_opts.re" { *argv = YYCURSOR; goto opt_header; } -#line 656 "src/conf/parse_opts.cc" -yy201: +#line 669 "src/conf/parse_opts.cc" +yy203: ++YYCURSOR; -#line 109 "../src/conf/parse_opts.re" +#line 110 "../src/conf/parse_opts.re" { if (!opts.unicode ()) { error_encoding (); return EXIT_FAIL; } goto opt_short; } -#line 661 "src/conf/parse_opts.cc" -yy203: +#line 674 "src/conf/parse_opts.cc" +yy205: ++YYCURSOR; #line 96 "../src/conf/parse_opts.re" { version (); return EXIT_OK; } -#line 666 "src/conf/parse_opts.cc" -yy205: - ++YYCURSOR; -#line 110 "../src/conf/parse_opts.re" - { if (!opts.wide_chars ()) { error_encoding (); return EXIT_FAIL; } goto opt_short; } -#line 671 "src/conf/parse_opts.cc" +#line 679 "src/conf/parse_opts.cc" yy207: ++YYCURSOR; #line 111 "../src/conf/parse_opts.re" - { if (!opts.utf_16 ()) { error_encoding (); return EXIT_FAIL; } goto opt_short; } -#line 676 "src/conf/parse_opts.cc" + { if (!opts.wide_chars ()) { error_encoding (); return EXIT_FAIL; } goto opt_short; } +#line 684 "src/conf/parse_opts.cc" yy209: ++YYCURSOR; -#line 115 "../src/conf/parse_opts.re" - { if (!next (YYCURSOR, argv)) { error_arg ("-t, --type-header"); return EXIT_FAIL; } goto opt_header; } -#line 681 "src/conf/parse_opts.cc" +#line 112 "../src/conf/parse_opts.re" + { if (!opts.utf_16 ()) { error_encoding (); return EXIT_FAIL; } goto opt_short; } +#line 689 "src/conf/parse_opts.cc" yy211: ++YYCURSOR; -#line 113 "../src/conf/parse_opts.re" +#line 116 "../src/conf/parse_opts.re" + { if (!next (YYCURSOR, argv)) { error_arg ("-t, --type-header"); return EXIT_FAIL; } goto opt_header; } +#line 694 "src/conf/parse_opts.cc" +yy213: + ++YYCURSOR; +#line 114 "../src/conf/parse_opts.re" { if (!next (YYCURSOR, argv)) { error_arg ("-o, --output"); return EXIT_FAIL; } goto opt_output; } -#line 686 "src/conf/parse_opts.cc" +#line 699 "src/conf/parse_opts.cc" } -#line 118 "../src/conf/parse_opts.re" +#line 119 "../src/conf/parse_opts.re" opt_long: -#line 693 "src/conf/parse_opts.cc" +#line 706 "src/conf/parse_opts.cc" { YYCTYPE yych; yych = (YYCTYPE)*YYCURSOR; switch (yych) { - case 'b': goto yy217; - case 'c': goto yy218; - case 'd': goto yy219; - case 'e': goto yy220; - case 'f': goto yy221; - case 'h': goto yy222; - case 'i': goto yy223; - case 'n': goto yy224; - case 'o': goto yy225; - case 'r': goto yy226; - case 's': goto yy227; - case 't': goto yy228; - case 'u': goto yy229; - case 'v': goto yy230; - case 'w': goto yy231; - default: goto yy215; + case 'b': goto yy219; + case 'c': goto yy220; + case 'd': goto yy221; + case 'e': goto yy222; + case 'f': goto yy223; + case 'h': goto yy224; + case 'i': goto yy225; + case 'n': goto yy226; + case 'o': goto yy227; + case 'r': goto yy228; + case 's': goto yy229; + case 't': goto yy230; + case 'u': goto yy231; + case 'v': goto yy232; + case 'w': goto yy233; + default: goto yy217; } -yy215: +yy217: ++YYCURSOR; -yy216: -#line 123 "../src/conf/parse_opts.re" +yy218: +#line 124 "../src/conf/parse_opts.re" { error ("bad long option: %s", *argv); return EXIT_FAIL; } -#line 723 "src/conf/parse_opts.cc" -yy217: - yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych == 'i') goto yy513; - goto yy216; -yy218: - yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych == 'a') goto yy473; - if (yych == 'o') goto yy474; - goto yy216; +#line 736 "src/conf/parse_opts.cc" yy219: yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych == 'e') goto yy460; - goto yy216; + if (yych == 'i') goto yy515; + goto yy218; yy220: yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych <= 'l') { - if (yych == 'c') goto yy422; - goto yy216; - } else { - if (yych <= 'm') goto yy420; - if (yych <= 'n') goto yy421; - goto yy216; - } + if (yych == 'a') goto yy475; + if (yych == 'o') goto yy476; + goto yy218; yy221: yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych == 'l') goto yy408; - goto yy216; + if (yych == 'e') goto yy462; + goto yy218; yy222: yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych == 'e') goto yy403; - goto yy216; + if (yych <= 'l') { + if (yych == 'c') goto yy424; + goto yy218; + } else { + if (yych <= 'm') goto yy422; + if (yych <= 'n') goto yy423; + goto yy218; + } yy223: yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych == 'n') goto yy397; - goto yy216; + if (yych == 'l') goto yy410; + goto yy218; yy224: yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych == 'e') goto yy356; - if (yych == 'o') goto yy355; - goto yy216; + if (yych == 'e') goto yy405; + goto yy218; yy225: yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych == 'u') goto yy348; - goto yy216; + if (yych == 'n') goto yy399; + goto yy218; yy226: yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych == 'e') goto yy339; - goto yy216; + if (yych == 'e') goto yy358; + if (yych == 'o') goto yy357; + goto yy218; yy227: yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych <= 'j') { - if (yych == 'i') goto yy287; - goto yy216; - } else { - if (yych <= 'k') goto yy288; - if (yych == 't') goto yy289; - goto yy216; - } + if (yych == 'u') goto yy350; + goto yy218; yy228: yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych == 'y') goto yy275; - goto yy216; + if (yych == 'e') goto yy341; + goto yy218; yy229: yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych == 'n') goto yy258; - if (yych == 't') goto yy257; - goto yy216; + if (yych <= 'j') { + if (yych == 'i') goto yy289; + goto yy218; + } else { + if (yych <= 'k') goto yy290; + if (yych == 't') goto yy291; + goto yy218; + } yy230: yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych == 'e') goto yy244; - goto yy216; + if (yych == 'y') goto yy277; + goto yy218; yy231: yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych != 'i') goto yy216; - yych = (YYCTYPE)*++YYCURSOR; - if (yych == 'd') goto yy234; + if (yych == 'n') goto yy260; + if (yych == 't') goto yy259; + goto yy218; +yy232: + yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); + if (yych == 'e') goto yy246; + goto yy218; yy233: + yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); + if (yych != 'i') goto yy218; + yych = (YYCTYPE)*++YYCURSOR; + if (yych == 'd') goto yy236; +yy235: YYCURSOR = YYMARKER; - goto yy216; -yy234: + goto yy218; +yy236: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'e') goto yy233; + if (yych != 'e') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != '-') goto yy233; + if (yych != '-') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'c') goto yy233; + if (yych != 'c') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'h') goto yy233; + if (yych != 'h') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'a') goto yy233; + if (yych != 'a') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'r') goto yy233; + if (yych != 'r') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 's') goto yy233; + if (yych != 's') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych >= 0x01) goto yy233; + if (yych >= 0x01) goto yy235; ++YYCURSOR; -#line 146 "../src/conf/parse_opts.re" +#line 147 "../src/conf/parse_opts.re" { if (!opts.wide_chars ()) { error_encoding (); return EXIT_FAIL; } goto opt; } -#line 823 "src/conf/parse_opts.cc" -yy244: +#line 836 "src/conf/parse_opts.cc" +yy246: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'r') goto yy233; + if (yych != 'r') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych == 'n') goto yy246; - if (yych == 's') goto yy247; - goto yy233; -yy246: + if (yych == 'n') goto yy248; + if (yych == 's') goto yy249; + goto yy235; +yy248: yych = (YYCTYPE)*++YYCURSOR; - if (yych == 'u') goto yy253; - goto yy233; -yy247: + if (yych == 'u') goto yy255; + goto yy235; +yy249: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'i') goto yy233; + if (yych != 'i') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'o') goto yy233; + if (yych != 'o') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'n') goto yy233; + if (yych != 'n') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych >= 0x01) goto yy233; + if (yych >= 0x01) goto yy235; ++YYCURSOR; -#line 128 "../src/conf/parse_opts.re" +#line 129 "../src/conf/parse_opts.re" { version (); return EXIT_OK; } -#line 847 "src/conf/parse_opts.cc" -yy253: +#line 860 "src/conf/parse_opts.cc" +yy255: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'm') goto yy233; + if (yych != 'm') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych >= 0x01) goto yy233; + if (yych >= 0x01) goto yy235; ++YYCURSOR; -#line 129 "../src/conf/parse_opts.re" +#line 130 "../src/conf/parse_opts.re" { vernum (); return EXIT_OK; } -#line 856 "src/conf/parse_opts.cc" -yy257: +#line 869 "src/conf/parse_opts.cc" +yy259: yych = (YYCTYPE)*++YYCURSOR; - if (yych == 'f') goto yy266; - goto yy233; -yy258: + if (yych == 'f') goto yy268; + goto yy235; +yy260: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'i') goto yy233; + if (yych != 'i') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'c') goto yy233; + if (yych != 'c') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'o') goto yy233; + if (yych != 'o') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'd') goto yy233; + if (yych != 'd') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'e') goto yy233; + if (yych != 'e') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych >= 0x01) goto yy233; + if (yych >= 0x01) goto yy235; ++YYCURSOR; -#line 145 "../src/conf/parse_opts.re" +#line 146 "../src/conf/parse_opts.re" { if (!opts.unicode ()) { error_encoding (); return EXIT_FAIL; } goto opt; } -#line 877 "src/conf/parse_opts.cc" -yy266: +#line 890 "src/conf/parse_opts.cc" +yy268: yych = (YYCTYPE)*++YYCURSOR; - if (yych != '-') goto yy233; + if (yych != '-') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych == '1') goto yy268; - if (yych == '8') goto yy269; - goto yy233; -yy268: + if (yych == '1') goto yy270; + if (yych == '8') goto yy271; + goto yy235; +yy270: yych = (YYCTYPE)*++YYCURSOR; - if (yych == '6') goto yy272; - goto yy233; -yy269: + if (yych == '6') goto yy274; + goto yy235; +yy271: yych = (YYCTYPE)*++YYCURSOR; - if (yych >= 0x01) goto yy233; + if (yych >= 0x01) goto yy235; ++YYCURSOR; -#line 148 "../src/conf/parse_opts.re" +#line 149 "../src/conf/parse_opts.re" { if (!opts.utf_8 ()) { error_encoding (); return EXIT_FAIL; } goto opt; } -#line 895 "src/conf/parse_opts.cc" -yy272: +#line 908 "src/conf/parse_opts.cc" +yy274: yych = (YYCTYPE)*++YYCURSOR; - if (yych >= 0x01) goto yy233; + if (yych >= 0x01) goto yy235; ++YYCURSOR; -#line 147 "../src/conf/parse_opts.re" +#line 148 "../src/conf/parse_opts.re" { if (!opts.utf_16 ()) { error_encoding (); return EXIT_FAIL; } goto opt; } -#line 902 "src/conf/parse_opts.cc" -yy275: +#line 915 "src/conf/parse_opts.cc" +yy277: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'p') goto yy233; + if (yych != 'p') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'e') goto yy233; + if (yych != 'e') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != '-') goto yy233; + if (yych != '-') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'h') goto yy233; + if (yych != 'h') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'e') goto yy233; + if (yych != 'e') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'a') goto yy233; + if (yych != 'a') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'd') goto yy233; + if (yych != 'd') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'e') goto yy233; + if (yych != 'e') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'r') goto yy233; + if (yych != 'r') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych >= 0x01) goto yy233; + if (yych >= 0x01) goto yy235; ++YYCURSOR; -#line 150 "../src/conf/parse_opts.re" +#line 151 "../src/conf/parse_opts.re" { if (!next (YYCURSOR, argv)) { error_arg ("-t, --type-header"); return EXIT_FAIL; } goto opt_header; } -#line 927 "src/conf/parse_opts.cc" -yy287: - yych = (YYCTYPE)*++YYCURSOR; - if (yych == 'n') goto yy328; - goto yy233; -yy288: - yych = (YYCTYPE)*++YYCURSOR; - if (yych == 'e') goto yy320; - goto yy233; +#line 940 "src/conf/parse_opts.cc" yy289: yych = (YYCTYPE)*++YYCURSOR; - if (yych == 'a') goto yy290; - if (yych == 'o') goto yy291; - goto yy233; + if (yych == 'n') goto yy330; + goto yy235; yy290: yych = (YYCTYPE)*++YYCURSOR; - if (yych == 'r') goto yy305; - goto yy233; + if (yych == 'e') goto yy322; + goto yy235; yy291: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'r') goto yy233; + if (yych == 'a') goto yy292; + if (yych == 'o') goto yy293; + goto yy235; +yy292: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == 'r') goto yy307; + goto yy235; +yy293: + yych = (YYCTYPE)*++YYCURSOR; + if (yych != 'r') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'a') goto yy233; + if (yych != 'a') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'b') goto yy233; + if (yych != 'b') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'l') goto yy233; + if (yych != 'l') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'e') goto yy233; + if (yych != 'e') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != '-') goto yy233; + if (yych != '-') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 's') goto yy233; + if (yych != 's') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 't') goto yy233; + if (yych != 't') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'a') goto yy233; + if (yych != 'a') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 't') goto yy233; + if (yych != 't') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'e') goto yy233; + if (yych != 'e') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych >= 0x01) goto yy233; + if (yych >= 0x01) goto yy235; ++YYCURSOR; -#line 134 "../src/conf/parse_opts.re" - { opts.storable_state (); goto opt; } -#line 973 "src/conf/parse_opts.cc" -yy305: +#line 135 "../src/conf/parse_opts.re" + { opts.storable_state (); goto opt; } +#line 986 "src/conf/parse_opts.cc" +yy307: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 't') goto yy233; + if (yych != 't') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != '-') goto yy233; + if (yych != '-') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'c') goto yy233; + if (yych != 'c') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'o') goto yy233; + if (yych != 'o') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'n') goto yy233; + if (yych != 'n') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'd') goto yy233; + if (yych != 'd') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'i') goto yy233; + if (yych != 'i') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 't') goto yy233; + if (yych != 't') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'i') goto yy233; + if (yych != 'i') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'o') goto yy233; + if (yych != 'o') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'n') goto yy233; + if (yych != 'n') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 's') goto yy233; + if (yych != 's') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych >= 0x01) goto yy233; + if (yych >= 0x01) goto yy235; ++YYCURSOR; -#line 131 "../src/conf/parse_opts.re" - { opts.start_conditions (); goto opt; } -#line 1004 "src/conf/parse_opts.cc" -yy320: +#line 132 "../src/conf/parse_opts.re" + { opts.start_conditions (); goto opt; } +#line 1017 "src/conf/parse_opts.cc" +yy322: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'l') goto yy233; + if (yych != 'l') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'e') goto yy233; + if (yych != 'e') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 't') goto yy233; + if (yych != 't') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'o') goto yy233; + if (yych != 'o') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'n') goto yy233; + if (yych != 'n') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych >= 0x01) goto yy233; + if (yych >= 0x01) goto yy235; ++YYCURSOR; -#line 143 "../src/conf/parse_opts.re" - { opts.skeleton (); goto opt; } -#line 1021 "src/conf/parse_opts.cc" -yy328: +#line 144 "../src/conf/parse_opts.re" + { opts.set_target (opt_t::SKELETON); goto opt; } +#line 1034 "src/conf/parse_opts.cc" +yy330: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'g') goto yy233; + if (yych != 'g') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'l') goto yy233; + if (yych != 'l') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'e') goto yy233; + if (yych != 'e') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != '-') goto yy233; + if (yych != '-') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'p') goto yy233; + if (yych != 'p') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'a') goto yy233; + if (yych != 'a') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 's') goto yy233; + if (yych != 's') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 's') goto yy233; + if (yych != 's') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych >= 0x01) goto yy233; + if (yych >= 0x01) goto yy235; ++YYCURSOR; -#line 154 "../src/conf/parse_opts.re" +#line 155 "../src/conf/parse_opts.re" { goto opt; } -#line 1044 "src/conf/parse_opts.cc" -yy339: +#line 1057 "src/conf/parse_opts.cc" +yy341: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'u') goto yy233; + if (yych != 'u') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 's') goto yy233; + if (yych != 's') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'a') goto yy233; + if (yych != 'a') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'b') goto yy233; + if (yych != 'b') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'l') goto yy233; + if (yych != 'l') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'e') goto yy233; + if (yych != 'e') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych >= 0x01) goto yy233; + if (yych >= 0x01) goto yy235; ++YYCURSOR; -#line 138 "../src/conf/parse_opts.re" - { opts.reusable (); goto opt; } -#line 1063 "src/conf/parse_opts.cc" -yy348: +#line 139 "../src/conf/parse_opts.re" + { opts.reusable (); goto opt; } +#line 1076 "src/conf/parse_opts.cc" +yy350: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 't') goto yy233; + if (yych != 't') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'p') goto yy233; + if (yych != 'p') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'u') goto yy233; + if (yych != 'u') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 't') goto yy233; + if (yych != 't') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych >= 0x01) goto yy233; + if (yych >= 0x01) goto yy235; ++YYCURSOR; -#line 149 "../src/conf/parse_opts.re" +#line 150 "../src/conf/parse_opts.re" { if (!next (YYCURSOR, argv)) { error_arg ("-o, --output"); return EXIT_FAIL; } goto opt_output; } -#line 1078 "src/conf/parse_opts.cc" -yy355: +#line 1091 "src/conf/parse_opts.cc" +yy357: yych = (YYCTYPE)*++YYCURSOR; - if (yych == '-') goto yy367; - goto yy233; -yy356: + if (yych == '-') goto yy369; + goto yy235; +yy358: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 's') goto yy233; + if (yych != 's') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 't') goto yy233; + if (yych != 't') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'e') goto yy233; + if (yych != 'e') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'd') goto yy233; + if (yych != 'd') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != '-') goto yy233; + if (yych != '-') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'i') goto yy233; + if (yych != 'i') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'f') goto yy233; + if (yych != 'f') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 's') goto yy233; + if (yych != 's') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych >= 0x01) goto yy233; + if (yych >= 0x01) goto yy235; ++YYCURSOR; -#line 139 "../src/conf/parse_opts.re" - { opts.nested_ifs (); goto opt; } -#line 1105 "src/conf/parse_opts.cc" -yy367: +#line 140 "../src/conf/parse_opts.re" + { opts.nested_ifs (); goto opt; } +#line 1118 "src/conf/parse_opts.cc" +yy369: yych = (YYCTYPE)*++YYCURSOR; - if (yych == 'd') goto yy369; - if (yych != 'g') goto yy233; + if (yych == 'd') goto yy371; + if (yych != 'g') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych == 'e') goto yy381; - goto yy233; -yy369: + if (yych == 'e') goto yy383; + goto yy235; +yy371: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'e') goto yy233; + if (yych != 'e') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'b') goto yy233; + if (yych != 'b') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'u') goto yy233; + if (yych != 'u') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'g') goto yy233; + if (yych != 'g') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != '-') goto yy233; + if (yych != '-') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'i') goto yy233; + if (yych != 'i') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'n') goto yy233; + if (yych != 'n') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'f') goto yy233; + if (yych != 'f') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'o') goto yy233; + if (yych != 'o') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych >= 0x01) goto yy233; + if (yych >= 0x01) goto yy235; ++YYCURSOR; -#line 137 "../src/conf/parse_opts.re" - { opts.no_debug_info (); goto opt; } -#line 1137 "src/conf/parse_opts.cc" -yy381: +#line 138 "../src/conf/parse_opts.re" + { opts.no_debug_info (); goto opt; } +#line 1150 "src/conf/parse_opts.cc" +yy383: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'n') goto yy233; + if (yych != 'n') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'e') goto yy233; + if (yych != 'e') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'r') goto yy233; + if (yych != 'r') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'a') goto yy233; + if (yych != 'a') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 't') goto yy233; + if (yych != 't') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'i') goto yy233; + if (yych != 'i') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'o') goto yy233; + if (yych != 'o') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'n') goto yy233; + if (yych != 'n') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != '-') goto yy233; + if (yych != '-') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'd') goto yy233; + if (yych != 'd') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'a') goto yy233; + if (yych != 'a') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 't') goto yy233; + if (yych != 't') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'e') goto yy233; + if (yych != 'e') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych >= 0x01) goto yy233; + if (yych >= 0x01) goto yy235; ++YYCURSOR; -#line 140 "../src/conf/parse_opts.re" - { opts.no_generation_date (); goto opt; } -#line 1170 "src/conf/parse_opts.cc" -yy397: +#line 141 "../src/conf/parse_opts.re" + { opts.no_generation_date (); goto opt; } +#line 1183 "src/conf/parse_opts.cc" +yy399: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'p') goto yy233; + if (yych != 'p') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'u') goto yy233; + if (yych != 'u') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 't') goto yy233; + if (yych != 't') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych >= 0x01) goto yy233; + if (yych >= 0x01) goto yy235; ++YYCURSOR; -#line 152 "../src/conf/parse_opts.re" +#line 153 "../src/conf/parse_opts.re" { goto opt_input; } -#line 1183 "src/conf/parse_opts.cc" -yy403: +#line 1196 "src/conf/parse_opts.cc" +yy405: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'l') goto yy233; + if (yych != 'l') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'p') goto yy233; + if (yych != 'p') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych >= 0x01) goto yy233; + if (yych >= 0x01) goto yy235; ++YYCURSOR; -#line 127 "../src/conf/parse_opts.re" +#line 128 "../src/conf/parse_opts.re" { usage (); return EXIT_OK; } -#line 1194 "src/conf/parse_opts.cc" -yy408: +#line 1207 "src/conf/parse_opts.cc" +yy410: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'e') goto yy233; + if (yych != 'e') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'x') goto yy233; + if (yych != 'x') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != '-') goto yy233; + if (yych != '-') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 's') goto yy233; + if (yych != 's') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'y') goto yy233; + if (yych != 'y') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'n') goto yy233; + if (yych != 'n') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 't') goto yy233; + if (yych != 't') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'a') goto yy233; + if (yych != 'a') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'x') goto yy233; + if (yych != 'x') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych >= 0x01) goto yy233; + if (yych >= 0x01) goto yy235; ++YYCURSOR; -#line 135 "../src/conf/parse_opts.re" - { opts.flex_syntax (); goto opt; } -#line 1219 "src/conf/parse_opts.cc" -yy420: +#line 136 "../src/conf/parse_opts.re" + { opts.flex_syntax (); goto opt; } +#line 1232 "src/conf/parse_opts.cc" +yy422: yych = (YYCTYPE)*++YYCURSOR; - if (yych == 'i') goto yy441; - if (yych == 'p') goto yy442; - goto yy233; -yy421: + if (yych == 'i') goto yy443; + if (yych == 'p') goto yy444; + goto yy235; +yy423: yych = (YYCTYPE)*++YYCURSOR; - if (yych == 'c') goto yy426; - goto yy233; -yy422: + if (yych == 'c') goto yy428; + goto yy235; +yy424: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'b') goto yy233; + if (yych != 'b') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych >= 0x01) goto yy233; + if (yych >= 0x01) goto yy235; ++YYCURSOR; -#line 144 "../src/conf/parse_opts.re" +#line 145 "../src/conf/parse_opts.re" { if (!opts.ecb ()) { error_encoding (); return EXIT_FAIL; } goto opt; } -#line 1237 "src/conf/parse_opts.cc" -yy426: +#line 1250 "src/conf/parse_opts.cc" +yy428: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'o') goto yy233; + if (yych != 'o') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'd') goto yy233; + if (yych != 'd') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'i') goto yy233; + if (yych != 'i') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'n') goto yy233; + if (yych != 'n') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'g') goto yy233; + if (yych != 'g') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != '-') goto yy233; + if (yych != '-') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'p') goto yy233; + if (yych != 'p') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'o') goto yy233; + if (yych != 'o') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'l') goto yy233; + if (yych != 'l') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'i') goto yy233; + if (yych != 'i') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'c') goto yy233; + if (yych != 'c') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'y') goto yy233; + if (yych != 'y') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych >= 0x01) goto yy233; + if (yych >= 0x01) goto yy235; ++YYCURSOR; -#line 151 "../src/conf/parse_opts.re" +#line 152 "../src/conf/parse_opts.re" { goto opt_encoding_policy; } -#line 1268 "src/conf/parse_opts.cc" -yy441: +#line 1281 "src/conf/parse_opts.cc" +yy443: yych = (YYCTYPE)*++YYCURSOR; - if (yych == 't') goto yy453; - goto yy233; -yy442: + if (yych == 't') goto yy455; + goto yy235; +yy444: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 't') goto yy233; + if (yych != 't') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'y') goto yy233; + if (yych != 'y') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != '-') goto yy233; + if (yych != '-') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'c') goto yy233; + if (yych != 'c') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'l') goto yy233; + if (yych != 'l') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'a') goto yy233; + if (yych != 'a') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 's') goto yy233; + if (yych != 's') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 's') goto yy233; + if (yych != 's') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych >= 0x01) goto yy233; + if (yych >= 0x01) goto yy235; ++YYCURSOR; -#line 153 "../src/conf/parse_opts.re" +#line 154 "../src/conf/parse_opts.re" { goto opt_empty_class; } -#line 1295 "src/conf/parse_opts.cc" -yy453: +#line 1308 "src/conf/parse_opts.cc" +yy455: yych = (YYCTYPE)*++YYCURSOR; - if (yych != '-') goto yy233; + if (yych != '-') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'd') goto yy233; + if (yych != 'd') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'o') goto yy233; + if (yych != 'o') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 't') goto yy233; + if (yych != 't') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych >= 0x01) goto yy233; + if (yych >= 0x01) goto yy235; ++YYCURSOR; -#line 133 "../src/conf/parse_opts.re" - { opts.emit_dot (); goto opt; } -#line 1310 "src/conf/parse_opts.cc" -yy460: +#line 134 "../src/conf/parse_opts.re" + { opts.set_target (opt_t::DOT); goto opt; } +#line 1323 "src/conf/parse_opts.cc" +yy462: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'b') goto yy233; + if (yych != 'b') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'u') goto yy233; + if (yych != 'u') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'g') goto yy233; + if (yych != 'g') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != '-') goto yy233; + if (yych != '-') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'o') goto yy233; + if (yych != 'o') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'u') goto yy233; + if (yych != 'u') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 't') goto yy233; + if (yych != 't') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'p') goto yy233; + if (yych != 'p') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'u') goto yy233; + if (yych != 'u') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 't') goto yy233; + if (yych != 't') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych >= 0x01) goto yy233; + if (yych >= 0x01) goto yy235; ++YYCURSOR; -#line 132 "../src/conf/parse_opts.re" - { opts.debug_output (); goto opt; } -#line 1337 "src/conf/parse_opts.cc" -yy473: +#line 133 "../src/conf/parse_opts.re" + { opts.debug_output (); goto opt; } +#line 1350 "src/conf/parse_opts.cc" +yy475: yych = (YYCTYPE)*++YYCURSOR; - if (yych == 's') goto yy489; - goto yy233; -yy474: + if (yych == 's') goto yy491; + goto yy235; +yy476: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'm') goto yy233; + if (yych != 'm') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'p') goto yy233; + if (yych != 'p') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'u') goto yy233; + if (yych != 'u') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 't') goto yy233; + if (yych != 't') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'e') goto yy233; + if (yych != 'e') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'd') goto yy233; + if (yych != 'd') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != '-') goto yy233; + if (yych != '-') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'g') goto yy233; + if (yych != 'g') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'o') goto yy233; + if (yych != 'o') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 't') goto yy233; + if (yych != 't') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'o') goto yy233; + if (yych != 'o') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 's') goto yy233; + if (yych != 's') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych >= 0x01) goto yy233; + if (yych >= 0x01) goto yy235; ++YYCURSOR; -#line 136 "../src/conf/parse_opts.re" - { opts.computed_gotos (); goto opt; } -#line 1372 "src/conf/parse_opts.cc" -yy489: +#line 137 "../src/conf/parse_opts.re" + { opts.computed_gotos (); goto opt; } +#line 1385 "src/conf/parse_opts.cc" +yy491: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'e') goto yy233; + if (yych != 'e') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != '-') goto yy233; + if (yych != '-') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'i') goto yy233; + if (yych != 'i') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'n') goto yy233; + if (yych != 'n') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych == 's') goto yy495; - if (yych != 'v') goto yy233; + if (yych == 's') goto yy497; + if (yych != 'v') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych == 'e') goto yy506; - goto yy233; -yy495: + if (yych == 'e') goto yy508; + goto yy235; +yy497: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'e') goto yy233; + if (yych != 'e') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'n') goto yy233; + if (yych != 'n') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 's') goto yy233; + if (yych != 's') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'i') goto yy233; + if (yych != 'i') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 't') goto yy233; + if (yych != 't') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'i') goto yy233; + if (yych != 'i') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'v') goto yy233; + if (yych != 'v') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'e') goto yy233; + if (yych != 'e') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych >= 0x01) goto yy233; + if (yych >= 0x01) goto yy235; ++YYCURSOR; -#line 141 "../src/conf/parse_opts.re" - { opts.case_insensitive (); goto opt; } -#line 1410 "src/conf/parse_opts.cc" -yy506: +#line 142 "../src/conf/parse_opts.re" + { opts.case_insensitive (); goto opt; } +#line 1423 "src/conf/parse_opts.cc" +yy508: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'r') goto yy233; + if (yych != 'r') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 't') goto yy233; + if (yych != 't') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'e') goto yy233; + if (yych != 'e') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'd') goto yy233; + if (yych != 'd') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych >= 0x01) goto yy233; + if (yych >= 0x01) goto yy235; ++YYCURSOR; -#line 142 "../src/conf/parse_opts.re" - { opts.case_inverted (); goto opt; } -#line 1425 "src/conf/parse_opts.cc" -yy513: +#line 143 "../src/conf/parse_opts.re" + { opts.case_inverted (); goto opt; } +#line 1438 "src/conf/parse_opts.cc" +yy515: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 't') goto yy233; + if (yych != 't') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != '-') goto yy233; + if (yych != '-') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'v') goto yy233; + if (yych != 'v') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'e') goto yy233; + if (yych != 'e') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'c') goto yy233; + if (yych != 'c') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 't') goto yy233; + if (yych != 't') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'o') goto yy233; + if (yych != 'o') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'r') goto yy233; + if (yych != 'r') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 's') goto yy233; + if (yych != 's') goto yy235; yych = (YYCTYPE)*++YYCURSOR; - if (yych >= 0x01) goto yy233; + if (yych >= 0x01) goto yy235; ++YYCURSOR; -#line 130 "../src/conf/parse_opts.re" - { opts.bit_vectors (); goto opt; } -#line 1450 "src/conf/parse_opts.cc" +#line 131 "../src/conf/parse_opts.re" + { opts.bit_vectors (); goto opt; } +#line 1463 "src/conf/parse_opts.cc" } -#line 155 "../src/conf/parse_opts.re" +#line 156 "../src/conf/parse_opts.re" opt_output: -#line 1457 "src/conf/parse_opts.cc" +#line 1470 "src/conf/parse_opts.cc" { YYCTYPE yych; static const unsigned char yybm[] = { @@ -1491,37 +1504,37 @@ opt_output: 128, 128, 128, 128, 128, 128, 128, 128, }; yych = (YYCTYPE)*YYCURSOR; - if (yych <= 0x00) goto yy527; - if (yych != '-') goto yy529; -yy527: + if (yych <= 0x00) goto yy529; + if (yych != '-') goto yy531; +yy529: ++YYCURSOR; -#line 160 "../src/conf/parse_opts.re" +#line 161 "../src/conf/parse_opts.re" { error ("bad argument to option -o, --output: %s", *argv); return EXIT_FAIL; } -#line 1504 "src/conf/parse_opts.cc" -yy529: +#line 1517 "src/conf/parse_opts.cc" +yy531: yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - goto yy531; -yy530: + goto yy533; +yy532: ++YYCURSOR; yych = (YYCTYPE)*YYCURSOR; -yy531: +yy533: if (yybm[0+yych] & 128) { - goto yy530; + goto yy532; } ++YYCURSOR; -#line 164 "../src/conf/parse_opts.re" +#line 165 "../src/conf/parse_opts.re" { if (!opts.output (*argv)) return EXIT_FAIL; goto opt; } -#line 1518 "src/conf/parse_opts.cc" +#line 1531 "src/conf/parse_opts.cc" } -#line 165 "../src/conf/parse_opts.re" +#line 166 "../src/conf/parse_opts.re" opt_header: -#line 1525 "src/conf/parse_opts.cc" +#line 1538 "src/conf/parse_opts.cc" { YYCTYPE yych; static const unsigned char yybm[] = { @@ -1559,32 +1572,32 @@ opt_header: 128, 128, 128, 128, 128, 128, 128, 128, }; yych = (YYCTYPE)*YYCURSOR; - if (yych <= 0x00) goto yy536; - if (yych != '-') goto yy538; -yy536: + if (yych <= 0x00) goto yy538; + if (yych != '-') goto yy540; +yy538: ++YYCURSOR; -#line 170 "../src/conf/parse_opts.re" +#line 171 "../src/conf/parse_opts.re" { error ("bad argument to option -t, --type-header: %s", *argv); return EXIT_FAIL; } -#line 1572 "src/conf/parse_opts.cc" -yy538: +#line 1585 "src/conf/parse_opts.cc" +yy540: yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - goto yy540; -yy539: + goto yy542; +yy541: ++YYCURSOR; yych = (YYCTYPE)*YYCURSOR; -yy540: +yy542: if (yybm[0+yych] & 128) { - goto yy539; + goto yy541; } ++YYCURSOR; -#line 174 "../src/conf/parse_opts.re" +#line 175 "../src/conf/parse_opts.re" { if (!opts.type_header (*argv)) return EXIT_FAIL; goto opt; } -#line 1586 "src/conf/parse_opts.cc" +#line 1599 "src/conf/parse_opts.cc" } -#line 175 "../src/conf/parse_opts.re" +#line 176 "../src/conf/parse_opts.re" opt_encoding_policy: @@ -1594,89 +1607,89 @@ opt_encoding_policy: return EXIT_FAIL; } -#line 1598 "src/conf/parse_opts.cc" +#line 1611 "src/conf/parse_opts.cc" { YYCTYPE yych; yych = (YYCTYPE)*YYCURSOR; if (yych <= 'h') { - if (yych == 'f') goto yy547; + if (yych == 'f') goto yy549; } else { - if (yych <= 'i') goto yy548; - if (yych == 's') goto yy549; + if (yych <= 'i') goto yy550; + if (yych == 's') goto yy551; } ++YYCURSOR; -yy546: -#line 185 "../src/conf/parse_opts.re" +yy548: +#line 186 "../src/conf/parse_opts.re" { error ("bad argument to option --encoding-policy (expected: ignore | substitute | fail): %s", *argv); return EXIT_FAIL; } -#line 1615 "src/conf/parse_opts.cc" -yy547: +#line 1628 "src/conf/parse_opts.cc" +yy549: yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych == 'a') goto yy569; - goto yy546; -yy548: + if (yych == 'a') goto yy571; + goto yy548; +yy550: yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych == 'g') goto yy562; - goto yy546; -yy549: + if (yych == 'g') goto yy564; + goto yy548; +yy551: yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych != 'u') goto yy546; + if (yych != 'u') goto yy548; yych = (YYCTYPE)*++YYCURSOR; - if (yych == 'b') goto yy552; -yy551: + if (yych == 'b') goto yy554; +yy553: YYCURSOR = YYMARKER; - goto yy546; -yy552: + goto yy548; +yy554: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 's') goto yy551; + if (yych != 's') goto yy553; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 't') goto yy551; + if (yych != 't') goto yy553; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'i') goto yy551; + if (yych != 'i') goto yy553; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 't') goto yy551; + if (yych != 't') goto yy553; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'u') goto yy551; + if (yych != 'u') goto yy553; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 't') goto yy551; + if (yych != 't') goto yy553; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'e') goto yy551; + if (yych != 'e') goto yy553; yych = (YYCTYPE)*++YYCURSOR; - if (yych >= 0x01) goto yy551; + if (yych >= 0x01) goto yy553; ++YYCURSOR; -#line 190 "../src/conf/parse_opts.re" +#line 191 "../src/conf/parse_opts.re" { opts.encoding_policy (Enc::POLICY_SUBSTITUTE); goto opt; } -#line 1652 "src/conf/parse_opts.cc" -yy562: +#line 1665 "src/conf/parse_opts.cc" +yy564: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'n') goto yy551; + if (yych != 'n') goto yy553; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'o') goto yy551; + if (yych != 'o') goto yy553; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'r') goto yy551; + if (yych != 'r') goto yy553; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'e') goto yy551; + if (yych != 'e') goto yy553; yych = (YYCTYPE)*++YYCURSOR; - if (yych >= 0x01) goto yy551; + if (yych >= 0x01) goto yy553; ++YYCURSOR; -#line 189 "../src/conf/parse_opts.re" +#line 190 "../src/conf/parse_opts.re" { opts.encoding_policy (Enc::POLICY_IGNORE); goto opt; } -#line 1667 "src/conf/parse_opts.cc" -yy569: +#line 1680 "src/conf/parse_opts.cc" +yy571: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'i') goto yy551; + if (yych != 'i') goto yy553; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'l') goto yy551; + if (yych != 'l') goto yy553; yych = (YYCTYPE)*++YYCURSOR; - if (yych >= 0x01) goto yy551; + if (yych >= 0x01) goto yy553; ++YYCURSOR; -#line 191 "../src/conf/parse_opts.re" +#line 192 "../src/conf/parse_opts.re" { opts.encoding_policy (Enc::POLICY_FAIL); goto opt; } -#line 1678 "src/conf/parse_opts.cc" +#line 1691 "src/conf/parse_opts.cc" } -#line 192 "../src/conf/parse_opts.re" +#line 193 "../src/conf/parse_opts.re" opt_input: @@ -1686,66 +1699,66 @@ opt_input: return EXIT_FAIL; } -#line 1690 "src/conf/parse_opts.cc" +#line 1703 "src/conf/parse_opts.cc" { YYCTYPE yych; yych = (YYCTYPE)*YYCURSOR; - if (yych <= 'b') goto yy576; - if (yych <= 'c') goto yy578; - if (yych <= 'd') goto yy579; -yy576: + if (yych <= 'b') goto yy578; + if (yych <= 'c') goto yy580; + if (yych <= 'd') goto yy581; +yy578: ++YYCURSOR; -yy577: -#line 202 "../src/conf/parse_opts.re" +yy579: +#line 203 "../src/conf/parse_opts.re" { error ("bad argument to option --input (expected: default | custom): %s", *argv); return EXIT_FAIL; } -#line 1705 "src/conf/parse_opts.cc" -yy578: +#line 1718 "src/conf/parse_opts.cc" +yy580: yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych == 'u') goto yy589; - goto yy577; -yy579: + if (yych == 'u') goto yy591; + goto yy579; +yy581: yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych != 'e') goto yy577; + if (yych != 'e') goto yy579; yych = (YYCTYPE)*++YYCURSOR; - if (yych == 'f') goto yy582; -yy581: + if (yych == 'f') goto yy584; +yy583: YYCURSOR = YYMARKER; - goto yy577; -yy582: + goto yy579; +yy584: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'a') goto yy581; + if (yych != 'a') goto yy583; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'u') goto yy581; + if (yych != 'u') goto yy583; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'l') goto yy581; + if (yych != 'l') goto yy583; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 't') goto yy581; + if (yych != 't') goto yy583; yych = (YYCTYPE)*++YYCURSOR; - if (yych >= 0x01) goto yy581; + if (yych >= 0x01) goto yy583; ++YYCURSOR; -#line 206 "../src/conf/parse_opts.re" +#line 207 "../src/conf/parse_opts.re" { opts.input (InputAPI::DEFAULT); goto opt; } -#line 1732 "src/conf/parse_opts.cc" -yy589: +#line 1745 "src/conf/parse_opts.cc" +yy591: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 's') goto yy581; + if (yych != 's') goto yy583; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 't') goto yy581; + if (yych != 't') goto yy583; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'o') goto yy581; + if (yych != 'o') goto yy583; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'm') goto yy581; + if (yych != 'm') goto yy583; yych = (YYCTYPE)*++YYCURSOR; - if (yych >= 0x01) goto yy581; + if (yych >= 0x01) goto yy583; ++YYCURSOR; -#line 207 "../src/conf/parse_opts.re" +#line 208 "../src/conf/parse_opts.re" { opts.input (InputAPI::CUSTOM); goto opt; } -#line 1747 "src/conf/parse_opts.cc" +#line 1760 "src/conf/parse_opts.cc" } -#line 208 "../src/conf/parse_opts.re" +#line 209 "../src/conf/parse_opts.re" opt_empty_class: @@ -1755,95 +1768,91 @@ opt_empty_class: return EXIT_FAIL; } -#line 1759 "src/conf/parse_opts.cc" +#line 1772 "src/conf/parse_opts.cc" { YYCTYPE yych; yych = (YYCTYPE)*YYCURSOR; - if (yych == 'e') goto yy600; - if (yych == 'm') goto yy601; + if (yych == 'e') goto yy602; + if (yych == 'm') goto yy603; ++YYCURSOR; -yy599: -#line 218 "../src/conf/parse_opts.re" +yy601: +#line 219 "../src/conf/parse_opts.re" { error ("bad argument to option --empty-class (expected: match-empty | match-none | error): %s", *argv); return EXIT_FAIL; } -#line 1772 "src/conf/parse_opts.cc" -yy600: +#line 1785 "src/conf/parse_opts.cc" +yy602: yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych == 'r') goto yy621; - goto yy599; -yy601: + if (yych == 'r') goto yy623; + goto yy601; +yy603: yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych != 'a') goto yy599; + if (yych != 'a') goto yy601; yych = (YYCTYPE)*++YYCURSOR; - if (yych == 't') goto yy604; -yy603: + if (yych == 't') goto yy606; +yy605: YYCURSOR = YYMARKER; - goto yy599; -yy604: + goto yy601; +yy606: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'c') goto yy603; + if (yych != 'c') goto yy605; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'h') goto yy603; + if (yych != 'h') goto yy605; yych = (YYCTYPE)*++YYCURSOR; - if (yych != '-') goto yy603; + if (yych != '-') goto yy605; yych = (YYCTYPE)*++YYCURSOR; - if (yych == 'e') goto yy608; - if (yych == 'n') goto yy609; - goto yy603; -yy608: + if (yych == 'e') goto yy610; + if (yych == 'n') goto yy611; + goto yy605; +yy610: yych = (YYCTYPE)*++YYCURSOR; - if (yych == 'm') goto yy615; - goto yy603; -yy609: + if (yych == 'm') goto yy617; + goto yy605; +yy611: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'o') goto yy603; + if (yych != 'o') goto yy605; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'n') goto yy603; + if (yych != 'n') goto yy605; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'e') goto yy603; + if (yych != 'e') goto yy605; yych = (YYCTYPE)*++YYCURSOR; - if (yych >= 0x01) goto yy603; + if (yych >= 0x01) goto yy605; ++YYCURSOR; -#line 223 "../src/conf/parse_opts.re" +#line 224 "../src/conf/parse_opts.re" { opts.empty_class (EMPTY_CLASS_MATCH_NONE); goto opt; } -#line 1812 "src/conf/parse_opts.cc" -yy615: +#line 1825 "src/conf/parse_opts.cc" +yy617: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'p') goto yy603; + if (yych != 'p') goto yy605; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 't') goto yy603; + if (yych != 't') goto yy605; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'y') goto yy603; + if (yych != 'y') goto yy605; yych = (YYCTYPE)*++YYCURSOR; - if (yych >= 0x01) goto yy603; + if (yych >= 0x01) goto yy605; ++YYCURSOR; -#line 222 "../src/conf/parse_opts.re" +#line 223 "../src/conf/parse_opts.re" { opts.empty_class (EMPTY_CLASS_MATCH_EMPTY); goto opt; } -#line 1825 "src/conf/parse_opts.cc" -yy621: +#line 1838 "src/conf/parse_opts.cc" +yy623: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'r') goto yy603; + if (yych != 'r') goto yy605; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'o') goto yy603; + if (yych != 'o') goto yy605; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'r') goto yy603; + if (yych != 'r') goto yy605; yych = (YYCTYPE)*++YYCURSOR; - if (yych >= 0x01) goto yy603; + if (yych >= 0x01) goto yy605; ++YYCURSOR; -#line 224 "../src/conf/parse_opts.re" +#line 225 "../src/conf/parse_opts.re" { opts.empty_class (EMPTY_CLASS_ERROR); goto opt; } -#line 1838 "src/conf/parse_opts.cc" +#line 1851 "src/conf/parse_opts.cc" } -#line 225 "../src/conf/parse_opts.re" +#line 226 "../src/conf/parse_opts.re" end: - if (!opts.check ()) - { - return EXIT_FAIL; - } opts.sync (); if (!opts.source_file) diff --git a/re2c/bootstrap/src/parse/parser.cc b/re2c/bootstrap/src/parse/parser.cc index d91340e4..e5d05d36 100644 --- a/re2c/bootstrap/src/parse/parser.cc +++ b/re2c/bootstrap/src/parse/parser.cc @@ -2628,7 +2628,7 @@ void parse(Scanner& i, Output & o) o.source.write_version_time (); o.source.write_line_info (in->get_cline (), in->get_fname ().c_str ()); - if (opts.flag_skeleton ()) + if (opts.target () == opt_t::SKELETON) { Skeleton::emit_prolog (o.source); } @@ -2841,7 +2841,7 @@ void parse(Scanner& i, Output & o) } } - if (opts.flag_skeleton ()) + if (opts.target () == opt_t::SKELETON) { Skeleton::emit_epilog (o.source, o.names); } diff --git a/re2c/bootstrap/src/parse/scanner_lex.cc b/re2c/bootstrap/src/parse/scanner_lex.cc index 06eb5b1e..f78dc9ed 100644 --- a/re2c/bootstrap/src/parse/scanner_lex.cc +++ b/re2c/bootstrap/src/parse/scanner_lex.cc @@ -1,4 +1,4 @@ -/* Generated by re2c 0.14.3 on Wed Sep 23 13:14:09 2015 */ +/* Generated by re2c 0.14.3 on Wed Sep 23 17:19:32 2015 */ #line 1 "../src/parse/scanner_lex.re" #include #include @@ -109,7 +109,7 @@ echo: ++YYCURSOR; #line 199 "../src/parse/scanner_lex.re" { - if (!(ignore_eoc || opts.DFlag () || opts.flag_skeleton ())) + if (!ignore_eoc && opts.target () == opt_t::CODE) { out.write(tok, tok_len () - 1); // -1 so we don't write out the \0 @@ -142,7 +142,7 @@ yy7: { ignore_cnt++; } - else if (!(opts.DFlag () || opts.flag_skeleton ())) + else if (opts.target () == opt_t::CODE) { out.write(tok, tok_len ()); } @@ -259,7 +259,7 @@ yy32: { fatal("found standard 're2c' block while using -r flag"); } - if (!(opts.DFlag () || opts.flag_skeleton ())) + if (opts.target () == opt_t::CODE) { const size_t lexeme_len = cur[-1] == '{' ? sizeof ("%{") - 1 @@ -291,7 +291,7 @@ yy34: fatal("found 'use:re2c' block without -r flag"); } reuse(); - if (!(opts.DFlag () || opts.flag_skeleton ())) + if (opts.target () == opt_t::CODE) { const size_t lexeme_len = sizeof ("/*!use:re2c") - 1; out.write(tok, tok_len () - lexeme_len); @@ -316,7 +316,7 @@ yy42: ++YYCURSOR; #line 113 "../src/parse/scanner_lex.re" { - if (!opts.DFlag ()) + if (opts.target () != opt_t::DOT) { out.insert_yymaxfill (); } @@ -406,7 +406,7 @@ yy74: { tok = pos = cur; ignore_eoc = true; - if (!opts.DFlag ()) + if (opts.target () != opt_t::DOT) { out.insert_line_info (); out << "\n"; @@ -435,7 +435,7 @@ yy85: ignore_eoc = false; ignore_cnt = 0; } - else if (!(opts.DFlag () || opts.flag_skeleton ())) + else if (opts.target () == opt_t::CODE) { out.write(tok, tok_len ()); } @@ -460,7 +460,7 @@ yy87: ignore_eoc = false; ignore_cnt = 0; } - else if (!(opts.DFlag () || opts.flag_skeleton ())) + else if (opts.target () == opt_t::CODE) { out.write(tok, tok_len ()); } diff --git a/re2c/src/codegen/emit_action.cc b/re2c/src/codegen/emit_action.cc index 029483a2..4e9e6978 100644 --- a/re2c/src/codegen/emit_action.cc +++ b/re2c/src/codegen/emit_action.cc @@ -54,7 +54,7 @@ void emit_action void emit_match (OutputFile & o, uint32_t ind, bool & readCh, const State * const s) { - if (opts.DFlag ()) + if (opts.target () == opt_t::DOT) { return; } @@ -86,7 +86,7 @@ void emit_match (OutputFile & o, uint32_t ind, bool & readCh, const State * cons void emit_initial (OutputFile & o, uint32_t ind, bool & readCh, const State * const s, const Initial & initial, const std::set & used_labels) { - if (opts.DFlag ()) + if (opts.target () == opt_t::DOT) { return; } @@ -129,7 +129,7 @@ void emit_initial (OutputFile & o, uint32_t ind, bool & readCh, const State * co void emit_save (OutputFile & o, uint32_t ind, bool & readCh, const State * const s, uint32_t save, bool save_yyaccept) { - if (opts.DFlag ()) + if (opts.target () == opt_t::DOT) { return; } @@ -173,7 +173,7 @@ void emit_accept (OutputFile & o, uint32_t ind, bool & readCh, const State * con const uint32_t accepts_size = static_cast (accepts.size ()); if (accepts_size > 0) { - if (!opts.DFlag ()) + if (opts.target () != opt_t::DOT) { o << opts.input_api ().stmt_restore (ind); } @@ -198,11 +198,11 @@ void emit_accept (OutputFile & o, uint32_t ind, bool & readCh, const State * con o << indent(ind) << "goto *" << opts.mapCodeName ()["yytarget"] << "[" << opts.mapCodeName ()["yyaccept"] << "];\n"; o << indent(--ind) << "}\n"; } - else if (opts.sFlag () || (accepts_size == 2 && !opts.DFlag ())) + else if (opts.sFlag () || (accepts_size == 2 && opts.target () != opt_t::DOT)) { emit_accept_binary (o, ind, readCh, s, accepts, 0, accepts_size - 1); } - else if (opts.DFlag ()) + else if (opts.target () == opt_t::DOT) { for (uint32_t i = 0; i < accepts_size; ++i) { @@ -233,7 +233,7 @@ void emit_accept (OutputFile & o, uint32_t ind, bool & readCh, const State * con void emit_rule (OutputFile & o, uint32_t ind, const State * const s, const RuleOp * const rule, const std::string & condName, const std::string & name) { - if (opts.DFlag ()) + if (opts.target () == opt_t::DOT) { o << s->label; if (rule->code) @@ -245,12 +245,12 @@ void emit_rule (OutputFile & o, uint32_t ind, const State * const s, const RuleO } uint32_t back = rule->ctx->fixedLength(); - if (back != 0u && !opts.DFlag ()) + if (back != 0u && opts.target () != opt_t::DOT) { o << opts.input_api ().stmt_restorectx (ind); } - if (opts.flag_skeleton ()) + if (opts.target () == opt_t::SKELETON) { Skeleton::emit_action (o, ind, rule->rank, name); } @@ -280,7 +280,7 @@ void emit_rule (OutputFile & o, uint32_t ind, const State * const s, const RuleO void need (OutputFile & o, uint32_t ind, bool & readCh, uint32_t n, bool bSetMarker) { - if (opts.DFlag ()) + if (opts.target () == opt_t::DOT) { return; } diff --git a/re2c/src/codegen/emit_dfa.cc b/re2c/src/codegen/emit_dfa.cc index 96e43697..93a76aa2 100644 --- a/re2c/src/codegen/emit_dfa.cc +++ b/re2c/src/codegen/emit_dfa.cc @@ -30,7 +30,7 @@ std::string genGetCondition() void genGoTo(OutputFile & o, uint32_t ind, const State *from, const State *to, bool & readCh) { - if (opts.DFlag ()) + if (opts.target () == opt_t::DOT) { o << from->label << " -> " << to->label << "\n"; return; @@ -47,7 +47,7 @@ void genGoTo(OutputFile & o, uint32_t ind, const State *from, const State *to, b void emit_state (OutputFile & o, uint32_t ind, const State * s, bool used_label) { - if (!opts.DFlag ()) + if (opts.target () != opt_t::DOT) { if (used_label) { @@ -128,7 +128,7 @@ void DFA::emit(Output & output, uint32_t& ind, bool isLastCond, bool& bPrologBra skeleton->warn_undefined_control_flow (); - if (opts.flag_skeleton ()) + if (opts.target () == opt_t::SKELETON) { skeleton->emit_data (o.file_name); skeleton->emit_start (o, max_fill, need_backup, need_backupctx, need_accept); @@ -143,7 +143,7 @@ void DFA::emit(Output & output, uint32_t& ind, bool isLastCond, bool& bPrologBra { o << "\n"; o.insert_line_info (); - if (opts.DFlag ()) + if (opts.target () == opt_t::DOT) { bPrologBrace = true; o << "digraph re2c {\n"; @@ -162,7 +162,7 @@ void DFA::emit(Output & output, uint32_t& ind, bool isLastCond, bool& bPrologBra { ind = 1; } - if (!opts.fFlag () && !opts.DFlag ()) + if (!opts.fFlag () && opts.target () != opt_t::DOT) { if (opts.bEmitYYCh ()) { @@ -186,7 +186,7 @@ void DFA::emit(Output & output, uint32_t& ind, bool isLastCond, bool& bPrologBra genCondTable(o, ind, output.types); } o.insert_state_goto (ind); - if (opts.cFlag () && !opts.DFlag ()) + if (opts.cFlag () && opts.target () != opt_t::DOT) { if (used_labels.count(start_label)) { @@ -205,7 +205,7 @@ void DFA::emit(Output & output, uint32_t& ind, bool isLastCond, bool& bPrologBra { o << replaceParam(opts.condDivider (), opts.condDividerParam (), cond) << "\n"; } - if (opts.DFlag ()) + if (opts.target () == opt_t::DOT) { o << cond << " -> " << head->label << "\n"; } @@ -302,7 +302,7 @@ void genCondGotoSub(OutputFile & o, uint32_t ind, const std::vector void genCondGoto(OutputFile & o, uint32_t ind, const std::vector & condnames) { const size_t conds = condnames.size (); - if (opts.DFlag ()) + if (opts.target () == opt_t::DOT) { o.warn_condition_order = false; // see note [condition order] for (size_t i = 0; i < conds; ++i) diff --git a/re2c/src/codegen/go_construct.cc b/re2c/src/codegen/go_construct.cc index b2643ef6..953c6937 100644 --- a/re2c/src/codegen/go_construct.cc +++ b/re2c/src/codegen/go_construct.cc @@ -216,7 +216,7 @@ void Go::init (const State * from) } const uint32_t dSpans = nSpans - hSpans - nBitmaps; - if (opts.DFlag ()) + if (opts.target () == opt_t::DOT) { type = DOT; info.dot = new Dot (span, nSpans, from); diff --git a/re2c/src/codegen/indent.h b/re2c/src/codegen/indent.h index 8f052556..059c23a8 100644 --- a/re2c/src/codegen/indent.h +++ b/re2c/src/codegen/indent.h @@ -12,7 +12,7 @@ inline std::string indent (uint32_t ind) { std::string str; - while (!opts.DFlag () && ind-- > 0) + while (opts.target () != opt_t::DOT && ind-- > 0) { str += opts.indString (); } diff --git a/re2c/src/codegen/print.cc b/re2c/src/codegen/print.cc index 58f4c936..06dc739d 100644 --- a/re2c/src/codegen/print.cc +++ b/re2c/src/codegen/print.cc @@ -70,42 +70,44 @@ void prtHex(std::ostream& o, uint32_t c) void prtCh(std::ostream& o, uint32_t c) { + const bool dot = opts.target () == opt_t::DOT; + switch (c) { case '\'': - o << (opts.DFlag () ? "'" : "\\'"); + o << (dot ? "'" : "\\'"); break; case '"': - o << (opts.DFlag () ? "\\\"" : "\""); + o << (dot ? "\\\"" : "\""); break; case '\n': - o << (opts.DFlag () ? "\\\\n" : "\\n"); + o << (dot ? "\\\\n" : "\\n"); break; case '\t': - o << (opts.DFlag () ? "\\\\t" : "\\t"); + o << (dot ? "\\\\t" : "\\t"); break; case '\v': - o << (opts.DFlag () ? "\\\\v" : "\\v"); + o << (dot ? "\\\\v" : "\\v"); break; case '\b': - o << (opts.DFlag () ? "\\\\b" : "\\b"); + o << (dot ? "\\\\b" : "\\b"); break; case '\r': - o << (opts.DFlag () ? "\\\\r" : "\\r"); + o << (dot ? "\\\\r" : "\\r"); break; case '\f': - o << (opts.DFlag () ? "\\\\f" : "\\f"); + o << (dot ? "\\\\f" : "\\f"); break; case '\a': - o << (opts.DFlag () ? "\\\\a" :"\\a"); + o << (dot ? "\\\\a" :"\\a"); break; case '\\': diff --git a/re2c/src/conf/opt.cc b/re2c/src/conf/opt.cc index 0d3123e9..07359177 100644 --- a/re2c/src/conf/opt.cc +++ b/re2c/src/conf/opt.cc @@ -7,10 +7,10 @@ namespace re2c Opt opts; opt_t::opt_t () - : bFlag (false) + : target (CODE) + , bFlag (false) , cFlag (false) , dFlag (false) - , DFlag (false) , fFlag (false) , FFlag (false) , gFlag (false) @@ -19,7 +19,6 @@ opt_t::opt_t () , sFlag (false) , tFlag (false) , header_file (NULL) - , flag_skeleton (false) , bNoGenerationDate (false) , bEmitYYCh (true) , yychConversion (false) @@ -57,10 +56,10 @@ opt_t::opt_t () {} opt_t::opt_t (const opt_t & opt) - : bFlag (opt.bFlag) + : target (opt.target) + , bFlag (opt.bFlag) , cFlag (opt.cFlag) , dFlag (opt.dFlag) - , DFlag (opt.DFlag) , fFlag (opt.fFlag) , FFlag (opt.FFlag) , gFlag (opt.gFlag) @@ -69,7 +68,6 @@ opt_t::opt_t (const opt_t & opt) , sFlag (opt.sFlag) , tFlag (opt.tFlag) , header_file (opt.header_file) - , flag_skeleton (opt.flag_skeleton) , bNoGenerationDate (opt.bNoGenerationDate) , bEmitYYCh (opt.bEmitYYCh) , yychConversion (opt.yychConversion) @@ -112,100 +110,68 @@ opt_t & opt_t::operator = (const opt_t & opt) return *this; } -bool opt_t::check () -{ - // check groups of mutually exclusive options - if (DFlag && flag_skeleton) - { - error ("incompatible options: '-D, --emit-dot' and '--skeleton'"); - return false; - } - return true; -} - void opt_t::fix () { - // some options don't make sense in current configuration - // reset them to default - if (DFlag) - { - bFlag = Opt::baseopt.bFlag; - dFlag = Opt::baseopt.dFlag; - fFlag = Opt::baseopt.fFlag; - gFlag = Opt::baseopt.gFlag; - iFlag = Opt::baseopt.iFlag; - sFlag = Opt::baseopt.sFlag; - tFlag = Opt::baseopt.tFlag; - header_file = Opt::baseopt.header_file; - bEmitYYCh = Opt::baseopt.bEmitYYCh; - bUseStateNext = Opt::baseopt.bUseStateNext; - bUseYYFill = Opt::baseopt.bUseYYFill; - bUseYYFillParam = Opt::baseopt.bUseYYFillParam; - bUseYYFillCheck = Opt::baseopt.bUseYYFillCheck; - bUseYYFillNaked = Opt::baseopt.bUseYYFillNaked; - bUseYYSetConditionParam = Opt::baseopt.bUseYYSetConditionParam; - bUseYYGetConditionNaked = Opt::baseopt.bUseYYGetConditionNaked; - bUseYYSetStateParam = Opt::baseopt.bUseYYSetStateParam; - bUseYYSetStateNaked = Opt::baseopt.bUseYYSetStateNaked; - bUseYYGetStateNaked = Opt::baseopt.bUseYYGetStateNaked; - yybmHexTable = Opt::baseopt.yybmHexTable; - bUseStateAbort = Opt::baseopt.bUseStateAbort; - cGotoThreshold = Opt::baseopt.cGotoThreshold; - topIndent = Opt::baseopt.topIndent; - indString = Opt::baseopt.indString; - labelPrefix = Opt::baseopt.labelPrefix; - condPrefix = Opt::baseopt.condPrefix; - condEnumPrefix = Opt::baseopt.condEnumPrefix; - condDivider = Opt::baseopt.condDivider; - condDividerParam = Opt::baseopt.condDividerParam; - condGoto = Opt::baseopt.condGoto; - condGotoParam = Opt::baseopt.condGotoParam; - yychConversion = Opt::baseopt.yychConversion; - yyFillLength = Opt::baseopt.yyFillLength; - yySetConditionParam = Opt::baseopt.yySetConditionParam; - yySetStateParam = Opt::baseopt.yySetStateParam; - mapCodeName = Opt::baseopt.mapCodeName; - input_api = Opt::baseopt.input_api; - } - if (flag_skeleton) + // some options either make no sense or must have fixed value + // with current target: reset them to default + switch (target) { - dFlag = Opt::baseopt.dFlag; - fFlag = Opt::baseopt.fFlag; - iFlag = Opt::baseopt.iFlag; - tFlag = Opt::baseopt.tFlag; - header_file = Opt::baseopt.header_file; - bEmitYYCh = Opt::baseopt.bEmitYYCh; - bUseStateNext = Opt::baseopt.bUseStateNext; - bUseYYFill = Opt::baseopt.bUseYYFill; - bUseYYFillParam = Opt::baseopt.bUseYYFillParam; - bUseYYFillCheck = Opt::baseopt.bUseYYFillCheck; - bUseYYFillNaked = Opt::baseopt.bUseYYFillNaked; - bUseYYSetConditionParam = Opt::baseopt.bUseYYSetConditionParam; - bUseYYGetConditionNaked = Opt::baseopt.bUseYYGetConditionNaked; - bUseYYSetStateParam = Opt::baseopt.bUseYYSetStateParam; - bUseYYSetStateNaked = Opt::baseopt.bUseYYSetStateNaked; - bUseYYGetStateNaked = Opt::baseopt.bUseYYGetStateNaked; - bUseStateAbort = Opt::baseopt.bUseStateAbort; - topIndent = Opt::baseopt.topIndent; - indString = Opt::baseopt.indString; - labelPrefix = Opt::baseopt.labelPrefix; - condPrefix = Opt::baseopt.condPrefix; - condEnumPrefix = Opt::baseopt.condEnumPrefix; - condDivider = Opt::baseopt.condDivider; - condDividerParam = Opt::baseopt.condDividerParam; - condGoto = Opt::baseopt.condGoto; - condGotoParam = Opt::baseopt.condGotoParam; - yychConversion = Opt::baseopt.yychConversion; - yyFillLength = Opt::baseopt.yyFillLength; - yySetConditionParam = Opt::baseopt.yySetConditionParam; - yySetStateParam = Opt::baseopt.yySetStateParam; - mapCodeName = Opt::baseopt.mapCodeName; - input_api = Opt::baseopt.input_api; + case DOT: + // default code generation options + bFlag = Opt::baseopt.bFlag; + gFlag = Opt::baseopt.gFlag; + cGotoThreshold = Opt::baseopt.cGotoThreshold; + sFlag = Opt::baseopt.sFlag; + // default environment-insensitive formatting + yybmHexTable = Opt::baseopt.yybmHexTable; + // fallthrough + case SKELETON: + // default line information + iFlag = Opt::baseopt.iFlag; + // default environment-sensitive formatting + topIndent = Opt::baseopt.topIndent; + indString = Opt::baseopt.indString; + condDivider = Opt::baseopt.condDivider; + condDividerParam = Opt::baseopt.condDividerParam; + // default environment bindings + input_api = Opt::baseopt.input_api; + mapCodeName = Opt::baseopt.mapCodeName; + dFlag = Opt::baseopt.dFlag; + fFlag = Opt::baseopt.fFlag; + tFlag = Opt::baseopt.tFlag; + header_file = Opt::baseopt.header_file; + bEmitYYCh = Opt::baseopt.bEmitYYCh; + bUseStateNext = Opt::baseopt.bUseStateNext; + bUseYYFill = Opt::baseopt.bUseYYFill; + bUseYYFillParam = Opt::baseopt.bUseYYFillParam; + bUseYYFillCheck = Opt::baseopt.bUseYYFillCheck; + bUseYYFillNaked = Opt::baseopt.bUseYYFillNaked; + bUseYYSetConditionParam = Opt::baseopt.bUseYYSetConditionParam; + bUseYYGetConditionNaked = Opt::baseopt.bUseYYGetConditionNaked; + bUseYYSetStateParam = Opt::baseopt.bUseYYSetStateParam; + bUseYYSetStateNaked = Opt::baseopt.bUseYYSetStateNaked; + bUseYYGetStateNaked = Opt::baseopt.bUseYYGetStateNaked; + bUseStateAbort = Opt::baseopt.bUseStateAbort; + labelPrefix = Opt::baseopt.labelPrefix; + condPrefix = Opt::baseopt.condPrefix; + condEnumPrefix = Opt::baseopt.condEnumPrefix; + condGoto = Opt::baseopt.condGoto; + condGotoParam = Opt::baseopt.condGotoParam; + yychConversion = Opt::baseopt.yychConversion; + yyFillLength = Opt::baseopt.yyFillLength; + yySetConditionParam = Opt::baseopt.yySetConditionParam; + yySetStateParam = Opt::baseopt.yySetStateParam; + break; + default: + break; } + if (bCaseInsensitive) { bCaseInverted = Opt::baseopt.bCaseInverted; } + + // respect hierarchy if (!cFlag) { tFlag = Opt::baseopt.tFlag; @@ -271,28 +237,29 @@ void opt_t::fix () } // force individual options - if (DFlag) + switch (target) { - iFlag = true; + case DOT: + iFlag = true; + break; + case SKELETON: + iFlag = true; + input_api.set (InputAPI::CUSTOM); + indString = " "; + topIndent = 2; + break; + default: + break; } - if (flag_skeleton) + switch (encoding.type ()) { - iFlag = true; - input_api.set (InputAPI::CUSTOM); - indString = " "; - topIndent = 2; - } - if (encoding.type () == Enc::UCS2) - { - sFlag = true; - } - if (encoding.type () == Enc::UTF16) - { - sFlag = true; - } - if (encoding.type () == Enc::UTF32) - { - sFlag = true; + case Enc::UCS2: + case Enc::UTF16: + case Enc::UTF32: + sFlag = true; + break; + default: + break; } if (bFlag) { @@ -307,21 +274,20 @@ void opt_t::fix () const opt_t Opt::baseopt; -bool Opt::check () -{ - return useropt.check (); -} - void Opt::sync () { realopt = useropt; realopt.fix (); } +void Opt::set_target (opt_t::target_t tgt) +{ + useropt.target = tgt; +} + void Opt::bit_vectors () { useropt.bFlag = true; - useropt.sFlag = true; } void Opt::start_conditions () @@ -334,12 +300,6 @@ void Opt::debug_output () useropt.dFlag = true; } -void Opt::emit_dot () -{ - useropt.DFlag = true; - useropt.iFlag = true; -} - void Opt::storable_state () { useropt.fFlag = true; @@ -353,8 +313,6 @@ void Opt::flex_syntax () void Opt::computed_gotos () { useropt.gFlag = true; - useropt.bFlag = true; - useropt.sFlag = true; } void Opt::no_debug_info () @@ -387,13 +345,6 @@ void Opt::case_inverted () useropt.bCaseInverted = true; } -void Opt::skeleton () -{ - useropt.flag_skeleton = true; - useropt.iFlag = true; - useropt.input_api.set (InputAPI::CUSTOM); -} - void Opt::encoding_policy (Enc::policy_t p) { useropt.encoding.setPolicy (p); @@ -459,19 +410,16 @@ bool Opt::ecb () bool Opt::unicode () { - useropt.sFlag = true; return useropt.encoding.set(Enc::UTF32); } bool Opt::wide_chars () { - useropt.sFlag = true; return useropt.encoding.set(Enc::UCS2); } bool Opt::utf_16 () { - useropt.sFlag = true; return useropt.encoding.set(Enc::UTF16); } diff --git a/re2c/src/conf/opt.h b/re2c/src/conf/opt.h index b9182e25..c8eed62d 100644 --- a/re2c/src/conf/opt.h +++ b/re2c/src/conf/opt.h @@ -13,10 +13,15 @@ namespace re2c struct opt_t { + enum target_t + { + CODE, + DOT, + SKELETON + } target; bool bFlag; bool cFlag; bool dFlag; - bool DFlag; bool fFlag; bool FFlag; bool gFlag; @@ -25,7 +30,6 @@ struct opt_t bool sFlag; bool tFlag; const char * header_file; - bool flag_skeleton; bool bNoGenerationDate; bool bEmitYYCh; bool yychConversion; @@ -64,7 +68,6 @@ struct opt_t opt_t (); opt_t (const opt_t & opt); opt_t & operator = (const opt_t & opt); - bool check (); void fix (); }; @@ -87,13 +90,12 @@ public: , realopt () {} - bool check (); void sync (); + void set_target (opt_t::target_t tgt); void bit_vectors (); void start_conditions (); void debug_output (); - void emit_dot (); void storable_state (); void flex_syntax (); void computed_gotos (); @@ -103,7 +105,6 @@ public: void no_generation_date (); void case_insensitive (); void case_inverted (); - void skeleton (); void encoding_policy (Enc::policy_t); void input (InputAPI::type_t); void empty_class (empty_class_policy_t); @@ -152,10 +153,10 @@ public: void sync_reset_encoding (const Enc & enc); void sync_reset_mapCodeName (); + opt_t::target_t target () const { return realopt.target; } bool bFlag () const { return realopt.bFlag; } bool cFlag () const { return realopt.cFlag; } bool dFlag () const { return realopt.dFlag; } - bool DFlag () const { return realopt.DFlag; } bool fFlag () const { return realopt.fFlag; } bool FFlag () const { return realopt.FFlag; } bool gFlag () const { return realopt.gFlag; } @@ -164,7 +165,6 @@ public: bool sFlag () const { return realopt.sFlag; } bool tFlag () const { return realopt.tFlag; } const char * header_file () const { return realopt.header_file; } - bool flag_skeleton () const { return realopt.flag_skeleton; } bool bNoGenerationDate () const { return realopt.bNoGenerationDate; } bool bEmitYYCh () const { return realopt.bEmitYYCh; } std::string yychConversion () const diff --git a/re2c/src/conf/parse_opts.re b/re2c/src/conf/parse_opts.re index 60a5b4ef..5e3da448 100644 --- a/re2c/src/conf/parse_opts.re +++ b/re2c/src/conf/parse_opts.re @@ -95,16 +95,17 @@ opt_short: [?h] { usage (); return EXIT_OK; } "v" { version (); return EXIT_OK; } "V" { vernum (); return EXIT_OK; } - "b" { opts.bit_vectors (); goto opt_short; } - "c" { opts.start_conditions (); goto opt_short; } - "d" { opts.debug_output (); goto opt_short; } - "D" { opts.emit_dot (); goto opt_short; } - "f" { opts.storable_state (); goto opt_short; } - "F" { opts.flex_syntax (); goto opt_short; } - "g" { opts.computed_gotos (); goto opt_short; } - "i" { opts.no_debug_info (); goto opt_short; } - "r" { opts.reusable (); goto opt_short; } - "s" { opts.nested_ifs (); goto opt_short; } + "b" { opts.bit_vectors (); goto opt_short; } + "c" { opts.start_conditions (); goto opt_short; } + "d" { opts.debug_output (); goto opt_short; } + "D" { opts.set_target (opt_t::DOT); goto opt_short; } + "f" { opts.storable_state (); goto opt_short; } + "F" { opts.flex_syntax (); goto opt_short; } + "g" { opts.computed_gotos (); goto opt_short; } + "i" { opts.no_debug_info (); goto opt_short; } + "r" { opts.reusable (); goto opt_short; } + "s" { opts.nested_ifs (); goto opt_short; } + "S" { opts.set_target (opt_t::SKELETON); goto opt_short; } "e" { if (!opts.ecb ()) { error_encoding (); return EXIT_FAIL; } goto opt_short; } "u" { if (!opts.unicode ()) { error_encoding (); return EXIT_FAIL; } goto opt_short; } "w" { if (!opts.wide_chars ()) { error_encoding (); return EXIT_FAIL; } goto opt_short; } @@ -127,20 +128,20 @@ opt_long: "help" end { usage (); return EXIT_OK; } "version" end { version (); return EXIT_OK; } "vernum" end { vernum (); return EXIT_OK; } - "bit-vectors" end { opts.bit_vectors (); goto opt; } - "start-conditions" end { opts.start_conditions (); goto opt; } - "debug-output" end { opts.debug_output (); goto opt; } - "emit-dot" end { opts.emit_dot (); goto opt; } - "storable-state" end { opts.storable_state (); goto opt; } - "flex-syntax" end { opts.flex_syntax (); goto opt; } - "computed-gotos" end { opts.computed_gotos (); goto opt; } - "no-debug-info" end { opts.no_debug_info (); goto opt; } - "reusable" end { opts.reusable (); goto opt; } - "nested-ifs" end { opts.nested_ifs (); goto opt; } - "no-generation-date" end { opts.no_generation_date (); goto opt; } - "case-insensitive" end { opts.case_insensitive (); goto opt; } - "case-inverted" end { opts.case_inverted (); goto opt; } - "skeleton" end { opts.skeleton (); goto opt; } + "bit-vectors" end { opts.bit_vectors (); goto opt; } + "start-conditions" end { opts.start_conditions (); goto opt; } + "debug-output" end { opts.debug_output (); goto opt; } + "emit-dot" end { opts.set_target (opt_t::DOT); goto opt; } + "storable-state" end { opts.storable_state (); goto opt; } + "flex-syntax" end { opts.flex_syntax (); goto opt; } + "computed-gotos" end { opts.computed_gotos (); goto opt; } + "no-debug-info" end { opts.no_debug_info (); goto opt; } + "reusable" end { opts.reusable (); goto opt; } + "nested-ifs" end { opts.nested_ifs (); goto opt; } + "no-generation-date" end { opts.no_generation_date (); goto opt; } + "case-insensitive" end { opts.case_insensitive (); goto opt; } + "case-inverted" end { opts.case_inverted (); goto opt; } + "skeleton" end { opts.set_target (opt_t::SKELETON); goto opt; } "ecb" end { if (!opts.ecb ()) { error_encoding (); return EXIT_FAIL; } goto opt; } "unicode" end { if (!opts.unicode ()) { error_encoding (); return EXIT_FAIL; } goto opt; } "wide-chars" end { if (!opts.wide_chars ()) { error_encoding (); return EXIT_FAIL; } goto opt; } @@ -225,10 +226,6 @@ opt_empty_class: */ end: - if (!opts.check ()) - { - return EXIT_FAIL; - } opts.sync (); if (!opts.source_file) diff --git a/re2c/src/parse/parser.ypp b/re2c/src/parse/parser.ypp index 94bc39f7..92314f3f 100644 --- a/re2c/src/parse/parser.ypp +++ b/re2c/src/parse/parser.ypp @@ -763,7 +763,7 @@ void parse(Scanner& i, Output & o) o.source.write_version_time (); o.source.write_line_info (in->get_cline (), in->get_fname ().c_str ()); - if (opts.flag_skeleton ()) + if (opts.target () == opt_t::SKELETON) { Skeleton::emit_prolog (o.source); } @@ -976,7 +976,7 @@ void parse(Scanner& i, Output & o) } } - if (opts.flag_skeleton ()) + if (opts.target () == opt_t::SKELETON) { Skeleton::emit_epilog (o.source, o.names); } diff --git a/re2c/src/parse/scanner_lex.re b/re2c/src/parse/scanner_lex.re index c72decc4..2d647871 100644 --- a/re2c/src/parse/scanner_lex.re +++ b/re2c/src/parse/scanner_lex.re @@ -74,7 +74,7 @@ echo: { fatal("found standard 're2c' block while using -r flag"); } - if (!(opts.DFlag () || opts.flag_skeleton ())) + if (opts.target () == opt_t::CODE) { const size_t lexeme_len = cur[-1] == '{' ? sizeof ("%{") - 1 @@ -102,7 +102,7 @@ echo: fatal("found 'use:re2c' block without -r flag"); } reuse(); - if (!(opts.DFlag () || opts.flag_skeleton ())) + if (opts.target () == opt_t::CODE) { const size_t lexeme_len = sizeof ("/*!use:re2c") - 1; out.write(tok, tok_len () - lexeme_len); @@ -111,7 +111,7 @@ echo: return Reuse; } "/*!max:re2c" { - if (!opts.DFlag ()) + if (opts.target () != opt_t::DOT) { out.insert_yymaxfill (); } @@ -133,7 +133,7 @@ echo: "/*!types:re2c" { tok = pos = cur; ignore_eoc = true; - if (!opts.DFlag ()) + if (opts.target () != opt_t::DOT) { out.insert_line_info (); out << "\n"; @@ -154,7 +154,7 @@ echo: ignore_eoc = false; ignore_cnt = 0; } - else if (!(opts.DFlag () || opts.flag_skeleton ())) + else if (opts.target () == opt_t::CODE) { out.write(tok, tok_len ()); } @@ -172,7 +172,7 @@ echo: ignore_eoc = false; ignore_cnt = 0; } - else if (!(opts.DFlag () || opts.flag_skeleton ())) + else if (opts.target () == opt_t::CODE) { out.write(tok, tok_len ()); } @@ -188,7 +188,7 @@ echo: { ignore_cnt++; } - else if (!(opts.DFlag () || opts.flag_skeleton ())) + else if (opts.target () == opt_t::CODE) { out.write(tok, tok_len ()); } @@ -197,7 +197,7 @@ echo: goto echo; } zero { - if (!(ignore_eoc || opts.DFlag () || opts.flag_skeleton ())) + if (!ignore_eoc && opts.target () == opt_t::CODE) { out.write(tok, tok_len () - 1); // -1 so we don't write out the \0