-/* Generated by re2c 0.16 on Tue May 10 13:05:36 2016 */
+/* Generated by re2c 0.16 on Tue May 10 16:46:34 2016 */
#line 1 "../src/parse/lex_conf.re"
#include "src/util/c99_stdint.h"
#include <string>
yy771:
++cur;
#line 178 "../src/parse/lex_conf.re"
- { opts.set_encoding_policy(Enc::POLICY_FAIL); return; }
+ { opts.set_encoding_policy(Enc::POLICY_FAIL); goto end; }
#line 3210 "src/parse/lex_conf.cc"
yy773:
yych = (unsigned char)*++cur;
yy777:
++cur;
#line 176 "../src/parse/lex_conf.re"
- { opts.set_encoding_policy(Enc::POLICY_IGNORE); return; }
+ { opts.set_encoding_policy(Enc::POLICY_IGNORE); goto end; }
#line 3231 "src/parse/lex_conf.cc"
yy779:
yych = (unsigned char)*++cur;
if (yych != 'e') goto yy765;
++cur;
#line 177 "../src/parse/lex_conf.re"
- { opts.set_encoding_policy(Enc::POLICY_SUBSTITUTE); return; }
+ { opts.set_encoding_policy(Enc::POLICY_SUBSTITUTE); goto end; }
#line 3244 "src/parse/lex_conf.cc"
}
#line 179 "../src/parse/lex_conf.re"
+end:
+ lex_conf_semicolon();
}
void Scanner::lex_conf_input()
{
lex_conf_assign ();
-#line 3254 "src/parse/lex_conf.cc"
+#line 3256 "src/parse/lex_conf.cc"
{
unsigned char yych;
if ((lim - cur) < 7) fill(7);
yy787:
++cur;
yy788:
-#line 186 "../src/parse/lex_conf.re"
+#line 188 "../src/parse/lex_conf.re"
{ fatal("bad configuration value"
" (expected: 'default', 'custom')"); }
-#line 3268 "src/parse/lex_conf.cc"
+#line 3270 "src/parse/lex_conf.cc"
yy789:
yych = (unsigned char)*(ptr = ++cur);
if (yych == 'u') goto yy791;
goto yy792;
yy800:
++cur;
-#line 189 "../src/parse/lex_conf.re"
- { opts.set_input_api(InputAPI::CUSTOM); return; }
-#line 3315 "src/parse/lex_conf.cc"
+#line 191 "../src/parse/lex_conf.re"
+ { opts.set_input_api(InputAPI::CUSTOM); goto end; }
+#line 3317 "src/parse/lex_conf.cc"
yy802:
yych = (unsigned char)*++cur;
if (yych != 't') goto yy792;
++cur;
-#line 188 "../src/parse/lex_conf.re"
- { opts.set_input_api(InputAPI::DEFAULT); return; }
-#line 3322 "src/parse/lex_conf.cc"
-}
#line 190 "../src/parse/lex_conf.re"
+ { opts.set_input_api(InputAPI::DEFAULT); goto end; }
+#line 3324 "src/parse/lex_conf.cc"
+}
+#line 192 "../src/parse/lex_conf.re"
+end:
+ lex_conf_semicolon();
}
void Scanner::lex_conf_empty_class()
{
lex_conf_assign ();
-#line 3332 "src/parse/lex_conf.cc"
+#line 3336 "src/parse/lex_conf.cc"
{
unsigned char yych;
if ((lim - cur) < 11) fill(11);
if (yych == 'm') goto yy810;
++cur;
yy808:
-#line 197 "../src/parse/lex_conf.re"
+#line 201 "../src/parse/lex_conf.re"
{ fatal("bad configuration value"
" (expected: 'match-empty', 'match-none', 'error')"); }
-#line 3344 "src/parse/lex_conf.cc"
+#line 3348 "src/parse/lex_conf.cc"
yy809:
yych = (unsigned char)*(ptr = ++cur);
if (yych == 'r') goto yy811;
goto yy812;
yy818:
++cur;
-#line 201 "../src/parse/lex_conf.re"
- { opts.set_empty_class_policy(EMPTY_CLASS_ERROR); return; }
-#line 3383 "src/parse/lex_conf.cc"
+#line 205 "../src/parse/lex_conf.re"
+ { opts.set_empty_class_policy(EMPTY_CLASS_ERROR); goto end; }
+#line 3387 "src/parse/lex_conf.cc"
yy820:
yych = (unsigned char)*++cur;
if (yych != '-') goto yy812;
goto yy812;
yy829:
++cur;
-#line 200 "../src/parse/lex_conf.re"
- { opts.set_empty_class_policy(EMPTY_CLASS_MATCH_NONE); return; }
-#line 3423 "src/parse/lex_conf.cc"
+#line 204 "../src/parse/lex_conf.re"
+ { opts.set_empty_class_policy(EMPTY_CLASS_MATCH_NONE); goto end; }
+#line 3427 "src/parse/lex_conf.cc"
yy831:
++cur;
-#line 199 "../src/parse/lex_conf.re"
- { opts.set_empty_class_policy(EMPTY_CLASS_MATCH_EMPTY); return; }
-#line 3428 "src/parse/lex_conf.cc"
+#line 203 "../src/parse/lex_conf.re"
+ { opts.set_empty_class_policy(EMPTY_CLASS_MATCH_EMPTY); goto end; }
+#line 3432 "src/parse/lex_conf.cc"
}
-#line 202 "../src/parse/lex_conf.re"
+#line 206 "../src/parse/lex_conf.re"
+end:
+ lex_conf_semicolon();
}
void Scanner::lex_conf_dfa_minimization()
{
lex_conf_assign ();
-#line 3438 "src/parse/lex_conf.cc"
+#line 3444 "src/parse/lex_conf.cc"
{
unsigned char yych;
if ((lim - cur) < 5) fill(5);
if (yych == 't') goto yy838;
++cur;
yy836:
-#line 209 "../src/parse/lex_conf.re"
+#line 215 "../src/parse/lex_conf.re"
{ fatal("bad configuration value"
" (expected: 'table', 'moore')"); }
-#line 3450 "src/parse/lex_conf.cc"
+#line 3456 "src/parse/lex_conf.cc"
yy837:
yych = (unsigned char)*(ptr = ++cur);
if (yych == 'o') goto yy839;
goto yy840;
yy846:
++cur;
-#line 212 "../src/parse/lex_conf.re"
- { opts.set_dfa_minimization(DFA_MINIMIZATION_MOORE); return; }
-#line 3489 "src/parse/lex_conf.cc"
+#line 218 "../src/parse/lex_conf.re"
+ { opts.set_dfa_minimization(DFA_MINIMIZATION_MOORE); goto end; }
+#line 3495 "src/parse/lex_conf.cc"
yy848:
++cur;
-#line 211 "../src/parse/lex_conf.re"
- { opts.set_dfa_minimization(DFA_MINIMIZATION_TABLE); return; }
-#line 3494 "src/parse/lex_conf.cc"
+#line 217 "../src/parse/lex_conf.re"
+ { opts.set_dfa_minimization(DFA_MINIMIZATION_TABLE); goto end; }
+#line 3500 "src/parse/lex_conf.cc"
}
-#line 213 "../src/parse/lex_conf.re"
+#line 219 "../src/parse/lex_conf.re"
+end:
+ lex_conf_semicolon();
}
void Scanner::lex_conf_enc(Enc::type_t enc)
void Scanner::lex_conf_assign ()
{
-#line 3515 "src/parse/lex_conf.cc"
+#line 3523 "src/parse/lex_conf.cc"
{
unsigned char yych;
static const unsigned char yybm[] = {
}
++cur;
yy853:
-#line 231 "../src/parse/lex_conf.re"
+#line 239 "../src/parse/lex_conf.re"
{ fatal ("missing '=' in configuration"); }
-#line 3564 "src/parse/lex_conf.cc"
+#line 3572 "src/parse/lex_conf.cc"
yy854:
yych = (unsigned char)*(ptr = ++cur);
if (yych <= 0x1F) {
if (yybm[0+yych] & 128) {
goto yy855;
}
-#line 232 "../src/parse/lex_conf.re"
+#line 240 "../src/parse/lex_conf.re"
{ return; }
-#line 3583 "src/parse/lex_conf.cc"
+#line 3591 "src/parse/lex_conf.cc"
yy858:
++cur;
if (lim <= cur) fill(1);
cur = ptr;
goto yy853;
}
-#line 233 "../src/parse/lex_conf.re"
+#line 241 "../src/parse/lex_conf.re"
}
void Scanner::lex_conf_semicolon ()
{
-#line 3604 "src/parse/lex_conf.cc"
+#line 3612 "src/parse/lex_conf.cc"
{
unsigned char yych;
static const unsigned char yybm[] = {
}
++cur;
yy864:
-#line 239 "../src/parse/lex_conf.re"
+#line 247 "../src/parse/lex_conf.re"
{ fatal ("missing ending ';' in configuration"); }
-#line 3653 "src/parse/lex_conf.cc"
+#line 3661 "src/parse/lex_conf.cc"
yy865:
yych = (unsigned char)*(ptr = ++cur);
if (yybm[0+yych] & 128) {
if (yych != ';') goto yy864;
yy866:
++cur;
-#line 240 "../src/parse/lex_conf.re"
+#line 248 "../src/parse/lex_conf.re"
{ return; }
-#line 3664 "src/parse/lex_conf.cc"
+#line 3672 "src/parse/lex_conf.cc"
yy868:
++cur;
if (lim <= cur) fill(1);
cur = ptr;
goto yy864;
}
-#line 241 "../src/parse/lex_conf.re"
+#line 249 "../src/parse/lex_conf.re"
}
lex_conf_assign ();
tok = cur;
-#line 3690 "src/parse/lex_conf.cc"
+#line 3698 "src/parse/lex_conf.cc"
{
unsigned char yych;
static const unsigned char yybm[] = {
yy875:
++cur;
yy876:
-#line 255 "../src/parse/lex_conf.re"
+#line 263 "../src/parse/lex_conf.re"
{
int32_t n = 0;
if (!s_to_i32_unsafe (tok, cur, n))
lex_conf_semicolon ();
return n;
}
-#line 3754 "src/parse/lex_conf.cc"
+#line 3762 "src/parse/lex_conf.cc"
yy877:
++cur;
if (lim <= cur) fill(1);
}
goto yy876;
}
-#line 264 "../src/parse/lex_conf.re"
+#line 272 "../src/parse/lex_conf.re"
}
std::string s;
tok = cur;
-#line 3774 "src/parse/lex_conf.cc"
+#line 3782 "src/parse/lex_conf.cc"
{
unsigned char yych;
static const unsigned char yybm[] = {
if (yych != ';') goto yy882;
}
}
-#line 291 "../src/parse/lex_conf.re"
+#line 299 "../src/parse/lex_conf.re"
{ goto end; }
-#line 3830 "src/parse/lex_conf.cc"
+#line 3838 "src/parse/lex_conf.cc"
yy882:
++cur;
if (lim <= cur) fill(1);
if (yybm[0+yych] & 128) {
goto yy882;
}
-#line 287 "../src/parse/lex_conf.re"
+#line 295 "../src/parse/lex_conf.re"
{
s = std::string(tok, tok_len());
goto end;
}
-#line 3843 "src/parse/lex_conf.cc"
+#line 3851 "src/parse/lex_conf.cc"
yy885:
++cur;
-#line 273 "../src/parse/lex_conf.re"
+#line 281 "../src/parse/lex_conf.re"
{
const char quote = tok[0];
for (bool end;;) {
}
}
}
-#line 3861 "src/parse/lex_conf.cc"
+#line 3869 "src/parse/lex_conf.cc"
}
-#line 292 "../src/parse/lex_conf.re"
+#line 300 "../src/parse/lex_conf.re"
end:
lex_conf_semicolon ();
/*!re2c
* { fatal("bad configuration value"
" (expected: 'ignore', 'substitute', 'fail')"); }
- "ignore" { opts.set_encoding_policy(Enc::POLICY_IGNORE); return; }
- "substitute" { opts.set_encoding_policy(Enc::POLICY_SUBSTITUTE); return; }
- "fail" { opts.set_encoding_policy(Enc::POLICY_FAIL); return; }
+ "ignore" { opts.set_encoding_policy(Enc::POLICY_IGNORE); goto end; }
+ "substitute" { opts.set_encoding_policy(Enc::POLICY_SUBSTITUTE); goto end; }
+ "fail" { opts.set_encoding_policy(Enc::POLICY_FAIL); goto end; }
*/
+end:
+ lex_conf_semicolon();
}
void Scanner::lex_conf_input()
/*!re2c
* { fatal("bad configuration value"
" (expected: 'default', 'custom')"); }
- "default" { opts.set_input_api(InputAPI::DEFAULT); return; }
- "custom" { opts.set_input_api(InputAPI::CUSTOM); return; }
+ "default" { opts.set_input_api(InputAPI::DEFAULT); goto end; }
+ "custom" { opts.set_input_api(InputAPI::CUSTOM); goto end; }
*/
+end:
+ lex_conf_semicolon();
}
void Scanner::lex_conf_empty_class()
/*!re2c
* { fatal("bad configuration value"
" (expected: 'match-empty', 'match-none', 'error')"); }
- "match-empty" { opts.set_empty_class_policy(EMPTY_CLASS_MATCH_EMPTY); return; }
- "match-none" { opts.set_empty_class_policy(EMPTY_CLASS_MATCH_NONE); return; }
- "error" { opts.set_empty_class_policy(EMPTY_CLASS_ERROR); return; }
+ "match-empty" { opts.set_empty_class_policy(EMPTY_CLASS_MATCH_EMPTY); goto end; }
+ "match-none" { opts.set_empty_class_policy(EMPTY_CLASS_MATCH_NONE); goto end; }
+ "error" { opts.set_empty_class_policy(EMPTY_CLASS_ERROR); goto end; }
*/
+end:
+ lex_conf_semicolon();
}
void Scanner::lex_conf_dfa_minimization()
/*!re2c
* { fatal("bad configuration value"
" (expected: 'table', 'moore')"); }
- "table" { opts.set_dfa_minimization(DFA_MINIMIZATION_TABLE); return; }
- "moore" { opts.set_dfa_minimization(DFA_MINIMIZATION_MOORE); return; }
+ "table" { opts.set_dfa_minimization(DFA_MINIMIZATION_TABLE); goto end; }
+ "moore" { opts.set_dfa_minimization(DFA_MINIMIZATION_MOORE); goto end; }
*/
+end:
+ lex_conf_semicolon();
}
void Scanner::lex_conf_enc(Enc::type_t enc)