Skip to content

Commit

Permalink
Converted tabs to spaces in .re files and autogenerated files.
Browse files Browse the repository at this point in the history
  • Loading branch information
skvadrik committed Aug 30, 2018
1 parent 15e02fc commit 848ef0b
Show file tree
Hide file tree
Showing 10 changed files with 1,686 additions and 1,686 deletions.
694 changes: 347 additions & 347 deletions re2c/bootstrap/src/ast/lex.cc

Large diffs are not rendered by default.

142 changes: 71 additions & 71 deletions re2c/bootstrap/src/ast/lex_conf.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Generated by re2c 1.1 on Mon Aug 27 22:43:09 2018 */
/* Generated by re2c 1.1 on Thu Aug 30 23:07:01 2018 */
#line 1 "../src/ast/lex_conf.re"
#include "src/util/c99_stdint.h"
#include <string>
Expand All @@ -18,8 +18,8 @@ namespace re2c

void Scanner::lex_conf(Opt &opts)
{
tok = cur;
const uint32_t l = get_cline(), c = get_column();
tok = cur;
const uint32_t l = get_cline(), c = get_column();

#line 25 "src/ast/lex_conf.cc"
{
Expand Down Expand Up @@ -104,9 +104,9 @@ void Scanner::lex_conf(Opt &opts)
yy2:
#line 161 "../src/ast/lex_conf.re"
{
fatal_lc(l, c, "unrecognized configuration '%.*s'",
static_cast<int>(cur - tok), tok);
}
fatal_lc(l, c, "unrecognized configuration '%.*s'",
static_cast<int>(cur - tok), tok);
}
#line 111 "src/ast/lex_conf.cc"
yy3:
++cur;
Expand Down Expand Up @@ -1303,14 +1303,14 @@ void Scanner::lex_conf(Opt &opts)
}
#line 128 "../src/ast/lex_conf.re"
{
const int32_t n = lex_conf_number ();
if (n < 0)
{
fatal_lc(l, c, "configuration 'indent:top' must be nonnegative");
}
opts.set_topIndent (static_cast<uint32_t> (n));
return;
}
const int32_t n = lex_conf_number ();
if (n < 0)
{
fatal_lc(l, c, "configuration 'indent:top' must be nonnegative");
}
opts.set_topIndent (static_cast<uint32_t> (n));
return;
}
#line 1315 "src/ast/lex_conf.cc"
yy254:
yych = (unsigned char)*++cur;
Expand Down Expand Up @@ -2364,14 +2364,14 @@ void Scanner::lex_conf(Opt &opts)
}
#line 94 "../src/ast/lex_conf.re"
{
const int32_t n = lex_conf_number ();
if (n < 0)
{
fatal_lc(l, c, "configuration 'cgoto:threshold' must be nonnegative");
}
opts.set_cGotoThreshold (static_cast<uint32_t> (n));
return;
}
const int32_t n = lex_conf_number ();
if (n < 0)
{
fatal_lc(l, c, "configuration 'cgoto:threshold' must be nonnegative");
}
opts.set_cGotoThreshold (static_cast<uint32_t> (n));
return;
}
#line 2376 "src/ast/lex_conf.cc"
yy501:
yych = (unsigned char)*++cur;
Expand Down Expand Up @@ -3320,7 +3320,7 @@ void Scanner::lex_conf(Opt &opts)

void Scanner::lex_conf_encoding_policy(Opt &opts)
{
lex_conf_assign ();
lex_conf_assign ();

#line 3326 "src/ast/lex_conf.cc"
{
Expand All @@ -3337,7 +3337,7 @@ void Scanner::lex_conf_encoding_policy(Opt &opts)
yy718:
#line 172 "../src/ast/lex_conf.re"
{ fatal_lc(get_cline(), get_column(),
"bad configuration value (expected: 'ignore', 'substitute', 'fail')"); }
"bad configuration value (expected: 'ignore', 'substitute', 'fail')"); }
#line 3342 "src/ast/lex_conf.cc"
yy719:
yych = (unsigned char)*(mar = ++cur);
Expand Down Expand Up @@ -3420,12 +3420,12 @@ void Scanner::lex_conf_encoding_policy(Opt &opts)
#line 177 "../src/ast/lex_conf.re"

end:
lex_conf_semicolon();
lex_conf_semicolon();
}

void Scanner::lex_conf_input(Opt &opts)
{
lex_conf_assign ();
lex_conf_assign ();

#line 3431 "src/ast/lex_conf.cc"
{
Expand All @@ -3440,7 +3440,7 @@ void Scanner::lex_conf_input(Opt &opts)
yy746:
#line 186 "../src/ast/lex_conf.re"
{ fatal_lc(get_cline(), get_column(),
"bad configuration value (expected: 'default', 'custom')"); }
"bad configuration value (expected: 'default', 'custom')"); }
#line 3445 "src/ast/lex_conf.cc"
yy747:
yych = (unsigned char)*(mar = ++cur);
Expand Down Expand Up @@ -3500,12 +3500,12 @@ void Scanner::lex_conf_input(Opt &opts)
#line 190 "../src/ast/lex_conf.re"

end:
lex_conf_semicolon();
lex_conf_semicolon();
}

void Scanner::lex_conf_empty_class(Opt &opts)
{
lex_conf_assign ();
lex_conf_assign ();

#line 3511 "src/ast/lex_conf.cc"
{
Expand All @@ -3518,7 +3518,7 @@ void Scanner::lex_conf_empty_class(Opt &opts)
yy766:
#line 199 "../src/ast/lex_conf.re"
{ fatal_lc(get_cline(), get_column(),
"bad configuration value (expected: 'match-empty', 'match-none', 'error')"); }
"bad configuration value (expected: 'match-empty', 'match-none', 'error')"); }
#line 3523 "src/ast/lex_conf.cc"
yy767:
yych = (unsigned char)*(mar = ++cur);
Expand Down Expand Up @@ -3608,12 +3608,12 @@ void Scanner::lex_conf_empty_class(Opt &opts)
#line 204 "../src/ast/lex_conf.re"

end:
lex_conf_semicolon();
lex_conf_semicolon();
}

void Scanner::lex_conf_dfa_minimization(Opt &opts)
{
lex_conf_assign ();
lex_conf_assign ();

#line 3619 "src/ast/lex_conf.cc"
{
Expand All @@ -3626,7 +3626,7 @@ void Scanner::lex_conf_dfa_minimization(Opt &opts)
yy794:
#line 213 "../src/ast/lex_conf.re"
{ fatal_lc(get_cline(), get_column(),
"bad configuration value (expected: 'table', 'moore')"); }
"bad configuration value (expected: 'table', 'moore')"); }
#line 3631 "src/ast/lex_conf.cc"
yy795:
yych = (unsigned char)*(mar = ++cur);
Expand Down Expand Up @@ -3676,16 +3676,16 @@ void Scanner::lex_conf_dfa_minimization(Opt &opts)
#line 217 "../src/ast/lex_conf.re"

end:
lex_conf_semicolon();
lex_conf_semicolon();
}

void Scanner::lex_conf_enc(Enc::type_t enc, Opt &opts)
{
if (lex_conf_bool()) {
opts.set_encoding(enc);
} else {
opts.unset_encoding(enc);
}
if (lex_conf_bool()) {
opts.set_encoding(enc);
} else {
opts.unset_encoding(enc);
}
}

void Scanner::lex_conf_assign ()
Expand Down Expand Up @@ -3858,13 +3858,13 @@ void Scanner::lex_conf_semicolon ()

bool Scanner::lex_conf_bool()
{
return lex_conf_number() != 0;
return lex_conf_number() != 0;
}

int32_t Scanner::lex_conf_number ()
{
lex_conf_assign ();
tok = cur;
lex_conf_assign ();
tok = cur;

#line 3870 "src/ast/lex_conf.cc"
{
Expand Down Expand Up @@ -3922,13 +3922,13 @@ int32_t Scanner::lex_conf_number ()
yy834:
#line 257 "../src/ast/lex_conf.re"
{
int32_t n = 0;
if (!s_to_i32_unsafe (tok, cur, n)) {
fatal_lc(get_cline(), get_column(), "configuration value overflow");
}
lex_conf_semicolon ();
return n;
}
int32_t n = 0;
if (!s_to_i32_unsafe (tok, cur, n)) {
fatal_lc(get_cline(), get_column(), "configuration value overflow");
}
lex_conf_semicolon ();
return n;
}
#line 3933 "src/ast/lex_conf.cc"
yy835:
++cur;
Expand All @@ -3945,9 +3945,9 @@ int32_t Scanner::lex_conf_number ()

std::string Scanner::lex_conf_string ()
{
lex_conf_assign ();
std::string s;
tok = cur;
lex_conf_assign ();
std::string s;
tok = cur;

#line 3953 "src/ast/lex_conf.cc"
{
Expand Down Expand Up @@ -4015,35 +4015,35 @@ std::string Scanner::lex_conf_string ()
}
#line 289 "../src/ast/lex_conf.re"
{
s = std::string(tok, tok_len());
goto end;
}
s = std::string(tok, tok_len());
goto end;
}
#line 4022 "src/ast/lex_conf.cc"
yy843:
++cur;
#line 274 "../src/ast/lex_conf.re"
{
const char quote = tok[0];
for (bool end;;) {
const uint32_t c = lex_str_chr(quote, end);
if (end) {
goto end;
}
if (c > 0xFF) {
fatal_lc(get_cline(), get_column(),
"multibyte character in configuration string: 0x%X", c);
} else {
s += static_cast<char>(c);
}
}
}
const char quote = tok[0];
for (bool end;;) {
const uint32_t c = lex_str_chr(quote, end);
if (end) {
goto end;
}
if (c > 0xFF) {
fatal_lc(get_cline(), get_column(),
"multibyte character in configuration string: 0x%X", c);
} else {
s += static_cast<char>(c);
}
}
}
#line 4041 "src/ast/lex_conf.cc"
}
#line 294 "../src/ast/lex_conf.re"

end:
lex_conf_semicolon ();
return s;
lex_conf_semicolon ();
return s;
}

} // end namespace re2c
Loading

0 comments on commit 848ef0b

Please sign in to comment.