From: Ulya Trofimovich Date: Fri, 12 Jul 2019 12:35:40 +0000 (+0100) Subject: Fixed includes using include-what-you-use. X-Git-Tag: 1.2~43 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3e0e62ced83d8cdde3a8a37b5d3218589c21488c;p=re2c Fixed includes using include-what-you-use. --- diff --git a/lib/bench.cc b/lib/bench.cc index 86730f64..4d1511ab 100644 --- a/lib/bench.cc +++ b/lib/bench.cc @@ -8,7 +8,6 @@ #include "lib/regex.h" #include -#include #include #include #include diff --git a/lib/regcomp.cc b/lib/regcomp.cc index db504d24..9851f160 100644 --- a/lib/regcomp.cc +++ b/lib/regcomp.cc @@ -1,9 +1,22 @@ +#include +#include "src/util/c99_stdint.h" +#include +#include +#include + #include "lib/lex.h" #include "lib/regex.h" #include "lib/regex_impl.h" -#include "src/options/opt.h" -#include "src/nfa/nfa.h" +#include "src/debug/debug.h" #include "src/dfa/dfa.h" +#include "src/msg/location.h" +#include "src/msg/msg.h" +#include "src/nfa/nfa.h" +#include "src/options/opt.h" +#include "src/parse/ast.h" +#include "src/regexp/re.h" +#include "src/regexp/rule.h" +#include "src/util/range.h" namespace re2c { diff --git a/lib/regex.h b/lib/regex.h index 22e7f366..7c5bed13 100644 --- a/lib/regex.h +++ b/lib/regex.h @@ -2,6 +2,7 @@ #define _RE2C_LIB_REGEX_ #include +#include "src/util/c99_stdint.h" #include diff --git a/lib/regexec.cc b/lib/regexec.cc index 2b721ba1..06e21262 100644 --- a/lib/regexec.cc +++ b/lib/regexec.cc @@ -1,6 +1,8 @@ -#include "lib/lex.h" +#include + #include "lib/regex.h" #include "lib/regex_impl.h" +#include "src/msg/location.h" using namespace re2c; diff --git a/lib/regexec_dfa.cc b/lib/regexec_dfa.cc index b204c6a1..9e2c1ba3 100644 --- a/lib/regexec_dfa.cc +++ b/lib/regexec_dfa.cc @@ -1,9 +1,14 @@ -#include "lib/lex.h" +#include +#include +#include + #include "lib/regex.h" #include "lib/regex_impl.h" -#include "src/options/opt.h" #include "src/debug/debug.h" #include "src/dfa/dfa.h" +#include "src/dfa/tcmd.h" +#include "src/regexp/rule.h" +#include "src/regexp/tag.h" namespace re2c { diff --git a/lib/regexec_nfa_leftmost.cc b/lib/regexec_nfa_leftmost.cc index 1c87cafb..d848ecfe 100644 --- a/lib/regexec_nfa_leftmost.cc +++ b/lib/regexec_nfa_leftmost.cc @@ -1,11 +1,16 @@ -#include "lib/lex.h" +#include +#include +#include +#include + #include "lib/regex.h" #include "lib/regex_impl.h" -#include "src/options/opt.h" #include "src/debug/debug.h" #include "src/dfa/closure_leftmost.h" -#include "src/dfa/determinization.h" +#include "src/dfa/tag_history.h" #include "src/nfa/nfa.h" +#include "src/regexp/rule.h" +#include "src/util/range.h" namespace re2c { diff --git a/lib/regexec_nfa_leftmost_trie.cc b/lib/regexec_nfa_leftmost_trie.cc index acbdfc44..6428e2bf 100644 --- a/lib/regexec_nfa_leftmost_trie.cc +++ b/lib/regexec_nfa_leftmost_trie.cc @@ -1,11 +1,14 @@ -#include "lib/lex.h" +#include +#include +#include + #include "lib/regex.h" #include "lib/regex_impl.h" -#include "src/options/opt.h" #include "src/debug/debug.h" #include "src/dfa/closure_leftmost.h" -#include "src/dfa/determinization.h" +#include "src/dfa/tag_history.h" #include "src/nfa/nfa.h" +#include "src/util/range.h" namespace re2c { diff --git a/lib/regexec_nfa_posix.cc b/lib/regexec_nfa_posix.cc index 9562573a..35945ee7 100644 --- a/lib/regexec_nfa_posix.cc +++ b/lib/regexec_nfa_posix.cc @@ -1,15 +1,17 @@ -#include #include +#include +#include +#include -#include "lib/lex.h" #include "lib/regex.h" #include "lib/regex_impl.h" -#include "src/options/opt.h" #include "src/debug/debug.h" #include "src/dfa/closure_posix.h" -#include "src/dfa/determinization.h" #include "src/dfa/posix_precedence.h" +#include "src/dfa/tag_history.h" #include "src/nfa/nfa.h" +#include "src/regexp/rule.h" +#include "src/util/range.h" namespace re2c { diff --git a/lib/regexec_nfa_posix_backward.cc b/lib/regexec_nfa_posix_backward.cc index 6a0f5f59..42713ca4 100644 --- a/lib/regexec_nfa_posix_backward.cc +++ b/lib/regexec_nfa_posix_backward.cc @@ -1,16 +1,17 @@ -#include #include #include +#include +#include -#include "lib/lex.h" #include "lib/regex.h" #include "lib/regex_impl.h" -#include "src/options/opt.h" #include "src/debug/debug.h" #include "src/dfa/closure_posix.h" -#include "src/dfa/determinization.h" -#include "src/dfa/posix_precedence.h" +#include "src/dfa/tag_history.h" #include "src/nfa/nfa.h" +#include "src/regexp/rule.h" +#include "src/regexp/tag.h" +#include "src/util/range.h" namespace re2c { diff --git a/lib/regexec_nfa_posix_kuklewicz.cc b/lib/regexec_nfa_posix_kuklewicz.cc index df738a89..d00fd948 100644 --- a/lib/regexec_nfa_posix_kuklewicz.cc +++ b/lib/regexec_nfa_posix_kuklewicz.cc @@ -1,15 +1,17 @@ -#include #include +#include +#include +#include -#include "lib/lex.h" #include "lib/regex.h" #include "lib/regex_impl.h" -#include "src/options/opt.h" #include "src/debug/debug.h" #include "src/dfa/closure_posix.h" -#include "src/dfa/determinization.h" -#include "src/dfa/posix_precedence.h" +#include "src/dfa/tag_history.h" #include "src/nfa/nfa.h" +#include "src/regexp/rule.h" +#include "src/regexp/tag.h" +#include "src/util/range.h" /* note [POSIX orbit tags] diff --git a/lib/regexec_nfa_posix_trie.cc b/lib/regexec_nfa_posix_trie.cc index 4b4fb1cc..ce062098 100644 --- a/lib/regexec_nfa_posix_trie.cc +++ b/lib/regexec_nfa_posix_trie.cc @@ -1,12 +1,14 @@ -#include "lib/lex.h" +#include +#include +#include + #include "lib/regex.h" #include "lib/regex_impl.h" -#include "src/options/opt.h" #include "src/debug/debug.h" #include "src/dfa/closure_posix.h" -#include "src/dfa/determinization.h" -#include "src/dfa/posix_precedence.h" +#include "src/dfa/tag_history.h" #include "src/nfa/nfa.h" +#include "src/util/range.h" namespace re2c { diff --git a/lib/regfree.cc b/lib/regfree.cc index 2779b672..19f6e7c5 100644 --- a/lib/regfree.cc +++ b/lib/regfree.cc @@ -1,8 +1,19 @@ +#include +#include +#include +#include + #include "lib/regex.h" #include "lib/regex_impl.h" #include "src/dfa/dfa.h" +#include "src/dfa/tcmd.h" #include "src/encoding/range_suffix.h" #include "src/nfa/nfa.h" +#include "src/parse/ast.h" +#include "src/regexp/rule.h" +#include "src/regexp/tag.h" +#include "src/util/free_list.h" +#include "src/util/range.h" using namespace re2c; diff --git a/src/adfa/action.h b/src/adfa/action.h index c6937b7d..d190696a 100644 --- a/src/adfa/action.h +++ b/src/adfa/action.h @@ -9,8 +9,8 @@ #include "src/util/c99_stdint.h" #include "src/util/uniq_vector.h" -namespace re2c -{ + +namespace re2c { class Output; struct State; diff --git a/src/adfa/adfa.cc b/src/adfa/adfa.cc index 02429589..18557bfe 100644 --- a/src/adfa/adfa.cc +++ b/src/adfa/adfa.cc @@ -9,10 +9,13 @@ #include "src/codegen/go.h" #include "src/debug/debug.h" #include "src/dfa/dfa.h" +#include "src/options/opt.h" #include "src/util/allocate.h" -namespace re2c -{ + +namespace re2c { + +class Msg; const size_t Initial::NOSAVE = std::numeric_limits::max(); diff --git a/src/adfa/adfa.h b/src/adfa/adfa.h index c4421d4a..f50ae9b7 100644 --- a/src/adfa/adfa.h +++ b/src/adfa/adfa.h @@ -13,16 +13,17 @@ #include "src/codegen/go.h" #include "src/codegen/label.h" #include "src/dfa/tcmd.h" +#include "src/msg/location.h" #include "src/regexp/rule.h" #include "src/regexp/tag.h" #include "src/util/forbid_copy.h" -namespace re2c -{ +namespace re2c { + +class Msg; struct opt_t; class Output; -struct Output; struct dfa_t; struct State diff --git a/src/adfa/prepare.cc b/src/adfa/prepare.cc index 1ec4d9e0..f87ea55c 100644 --- a/src/adfa/prepare.cc +++ b/src/adfa/prepare.cc @@ -9,12 +9,14 @@ #include "src/adfa/adfa.h" #include "src/codegen/bitmap.h" #include "src/codegen/go.h" -#include "src/options/opt.h" #include "src/debug/debug.h" #include "src/dfa/tcmd.h" +#include "src/msg/msg.h" +#include "src/options/opt.h" #include "src/regexp/rule.h" #include "src/util/allocate.h" + namespace re2c { void DFA::split(State *s) diff --git a/src/cfg/cfg.cc b/src/cfg/cfg.cc index e3a7c724..82576cee 100644 --- a/src/cfg/cfg.cc +++ b/src/cfg/cfg.cc @@ -6,12 +6,12 @@ #include "src/cfg/cfg.h" #include "src/dfa/dfa.h" +#include "src/regexp/rule.h" #include "src/util/allocate.h" -namespace re2c -{ -struct Rule; +namespace re2c { + struct tcmd_t; static void map_arcs_to_bblocks(const dfa_t &dfa, cfg_ix_t *arc2bb, cfg_ix_t &nbbarc, cfg_ix_t &nbbfin, cfg_ix_t &nbbfall); diff --git a/src/cfg/cfg.h b/src/cfg/cfg.h index 2e6593d8..026ce3ff 100644 --- a/src/cfg/cfg.h +++ b/src/cfg/cfg.h @@ -3,11 +3,10 @@ #include "src/util/c99_stdint.h" -#include "src/options/opt.h" -#include "src/dfa/dfa.h" #include "src/regexp/tag.h" #include "src/util/forbid_copy.h" + namespace re2c { struct Rule; diff --git a/src/cfg/compact.cc b/src/cfg/compact.cc index f99af79b..aebbcc8e 100644 --- a/src/cfg/compact.cc +++ b/src/cfg/compact.cc @@ -7,8 +7,8 @@ #include "src/dfa/tcmd.h" #include "src/regexp/tag.h" -namespace re2c -{ + +namespace re2c { tagver_t cfg_t::compact(const cfg_t &cfg, tagver_t *ver2new) { diff --git a/src/cfg/dce.cc b/src/cfg/dce.cc index 9683eb86..36d8b8d0 100644 --- a/src/cfg/dce.cc +++ b/src/cfg/dce.cc @@ -3,8 +3,8 @@ #include "src/dfa/tcmd.h" #include "src/regexp/tag.h" -namespace re2c -{ + +namespace re2c { void cfg_t::dead_code_elimination(cfg_t &cfg, const bool *live) { diff --git a/src/cfg/freeze.cc b/src/cfg/freeze.cc index aa4d15ff..898090e4 100644 --- a/src/cfg/freeze.cc +++ b/src/cfg/freeze.cc @@ -4,8 +4,8 @@ #include "src/dfa/dfa.h" #include "src/dfa/tcmd.h" -namespace re2c -{ + +namespace re2c { /* note [tag freezing] * diff --git a/src/cfg/interfere.cc b/src/cfg/interfere.cc index 19e03358..3e15c27e 100644 --- a/src/cfg/interfere.cc +++ b/src/cfg/interfere.cc @@ -7,8 +7,8 @@ #include "src/dfa/tcmd.h" #include "src/regexp/tag.h" -namespace re2c -{ + +namespace re2c { typedef std::vector vals_t; static void interfere(const tcmd_t *cmd, const bool *live, bool *interf, bool *buf, vals_t *vals, size_t nver); diff --git a/src/cfg/liveanal.cc b/src/cfg/liveanal.cc index 7cd316e1..f2cfe8b2 100644 --- a/src/cfg/liveanal.cc +++ b/src/cfg/liveanal.cc @@ -8,8 +8,8 @@ #include "src/regexp/rule.h" #include "src/regexp/tag.h" -namespace re2c -{ + +namespace re2c { // calculates deep-first search postorder of transition nodes, // skips final and fallback nodes (they have no successors anyway) diff --git a/src/cfg/normalize.cc b/src/cfg/normalize.cc index 53e83915..94879cfc 100644 --- a/src/cfg/normalize.cc +++ b/src/cfg/normalize.cc @@ -1,6 +1,6 @@ #include "src/util/c99_stdint.h" #include -#include +#include #include "src/debug/debug.h" #include "src/cfg/cfg.h" @@ -8,8 +8,8 @@ #include "src/dfa/tcmd.h" #include "src/regexp/tag.h" -namespace re2c -{ + +namespace re2c { template void normalize(cmd_t *cmd); diff --git a/src/cfg/optimize.cc b/src/cfg/optimize.cc index 1345ccb0..e65ef5dc 100644 --- a/src/cfg/optimize.cc +++ b/src/cfg/optimize.cc @@ -3,10 +3,12 @@ #include "src/cfg/cfg.h" #include "src/dfa/dfa.h" +#include "src/debug/debug.h" +#include "src/options/opt.h" #include "src/regexp/tag.h" -namespace re2c -{ + +namespace re2c { void compact_and_optimize_tags(const opt_t *opts, dfa_t &dfa) { diff --git a/src/cfg/rename.cc b/src/cfg/rename.cc index e77b51ea..b8e597a1 100644 --- a/src/cfg/rename.cc +++ b/src/cfg/rename.cc @@ -7,8 +7,8 @@ #include "src/dfa/tcmd.h" #include "src/regexp/tag.h" -namespace re2c -{ + +namespace re2c { void cfg_t::renaming(cfg_t &cfg, const tagver_t *ver2new, tagver_t maxver) { diff --git a/src/cfg/varalloc.cc b/src/cfg/varalloc.cc index 8e82acdf..75963448 100644 --- a/src/cfg/varalloc.cc +++ b/src/cfg/varalloc.cc @@ -6,8 +6,8 @@ #include "src/dfa/tcmd.h" #include "src/regexp/tag.h" -namespace re2c -{ + +namespace re2c { /* We have a binary relation on the set of all tags * and must construct set decomposition into subsets such that diff --git a/src/codegen/bitmap.cc b/src/codegen/bitmap.cc index 71260a00..50fb35a5 100644 --- a/src/codegen/bitmap.cc +++ b/src/codegen/bitmap.cc @@ -7,8 +7,8 @@ #include "src/options/opt.h" #include "src/dfa/tcmd.h" -namespace re2c -{ + +namespace re2c { static bool matches(const Go *go1, const State *s1, const Go *go2, const State *s2); static void doGen(const Go *g, const State *s, uint32_t *bm, uint32_t f, uint32_t m); diff --git a/src/codegen/bitmap.h b/src/codegen/bitmap.h index 8258e68f..30552923 100644 --- a/src/codegen/bitmap.h +++ b/src/codegen/bitmap.h @@ -2,15 +2,16 @@ #define _RE2C_CODE_BITMAP_ #include "src/util/c99_stdint.h" +#include #include #include "src/util/forbid_copy.h" + namespace re2c { class Output; struct Go; -struct Span; struct State; struct bitmap_t diff --git a/src/codegen/emit.h b/src/codegen/emit.h index 2b0971bf..078d3836 100644 --- a/src/codegen/emit.h +++ b/src/codegen/emit.h @@ -4,6 +4,7 @@ #include "src/codegen/output.h" #include "src/adfa/adfa.h" + namespace re2c { typedef std::vector code_lines_t; diff --git a/src/codegen/emit_action.cc b/src/codegen/emit_action.cc index b25370b2..930c491f 100644 --- a/src/codegen/emit_action.cc +++ b/src/codegen/emit_action.cc @@ -1,6 +1,8 @@ #include #include "src/util/c99_stdint.h" +#include #include +#include #include #include #include @@ -22,8 +24,8 @@ #include "src/skeleton/skeleton.h" #include "src/util/string_utils.h" -namespace re2c -{ + +namespace re2c { static void need (Output &o, uint32_t ind, size_t some); static void gen_rescan_label (Output &o, const State *s); diff --git a/src/codegen/emit_dfa.cc b/src/codegen/emit_dfa.cc index f81b8e4c..85a41a2b 100644 --- a/src/codegen/emit_dfa.cc +++ b/src/codegen/emit_dfa.cc @@ -1,5 +1,6 @@ #include #include "src/util/c99_stdint.h" +#include #include #include #include @@ -15,6 +16,8 @@ #include "src/codegen/input_api.h" #include "src/codegen/label.h" #include "src/codegen/output.h" +#include "src/msg/location.h" +#include "src/msg/msg.h" #include "src/options/opt.h" #include "src/regexp/rule.h" #include "src/regexp/tag.h" @@ -22,8 +25,8 @@ #include "src/util/counter.h" #include "src/util/string_utils.h" -namespace re2c -{ + +namespace re2c { static void emit_state(Output & o, uint32_t ind, const State * s, bool used_label); static void emit_eof(Output &, uint32_t, const Code*); diff --git a/src/codegen/go.h b/src/codegen/go.h index 469a5038..82c98e83 100644 --- a/src/codegen/go.h +++ b/src/codegen/go.h @@ -10,8 +10,8 @@ #include "src/util/c99_stdint.h" #include "src/util/forbid_copy.h" -namespace re2c -{ + +namespace re2c { struct DFA; struct bitmap_t; diff --git a/src/codegen/go_construct.cc b/src/codegen/go_construct.cc index dc74282a..559a4638 100644 --- a/src/codegen/go_construct.cc +++ b/src/codegen/go_construct.cc @@ -13,8 +13,8 @@ #include "src/dfa/tcmd.h" #include "src/util/allocate.h" -namespace re2c -{ + +namespace re2c { static uint32_t unmap(Span*, const Span*, uint32_t, const State*); static bool is_eof(uint32_t, uint32_t); diff --git a/src/codegen/go_destruct.cc b/src/codegen/go_destruct.cc index 026f9772..fc3f2cc8 100644 --- a/src/codegen/go_destruct.cc +++ b/src/codegen/go_destruct.cc @@ -2,8 +2,8 @@ #include "src/codegen/go.h" -namespace re2c -{ + +namespace re2c { Cases::~Cases () { diff --git a/src/codegen/go_emit.cc b/src/codegen/go_emit.cc index b781335c..1e98250f 100644 --- a/src/codegen/go_emit.cc +++ b/src/codegen/go_emit.cc @@ -15,8 +15,8 @@ #include "src/dfa/tcmd.h" #include "src/encoding/enc.h" -namespace re2c -{ + +namespace re2c { static void output_if (Output & o, uint32_t ind, const std::string & compare, uint32_t value); static std::string output_hgo (Output & o, uint32_t ind, const DFA &dfa, SwitchIf * hgo, const State *from); diff --git a/src/codegen/go_used_labels.cc b/src/codegen/go_used_labels.cc index 7b53240f..508cdea1 100644 --- a/src/codegen/go_used_labels.cc +++ b/src/codegen/go_used_labels.cc @@ -4,11 +4,10 @@ #include "src/adfa/adfa.h" #include "src/codegen/go.h" +#include "src/codegen/label.h" -namespace re2c -{ -class label_t; +namespace re2c { void Cases::used_labels (std::set & used) const { diff --git a/src/codegen/input_api.cc b/src/codegen/input_api.cc index d590e0de..6760711d 100644 --- a/src/codegen/input_api.cc +++ b/src/codegen/input_api.cc @@ -5,8 +5,8 @@ #include "src/options/opt.h" #include "src/debug/debug.h" -namespace re2c -{ + +namespace re2c { std::string output_expr_peek(const opt_t *opts) { diff --git a/src/codegen/input_api.h b/src/codegen/input_api.h index 5c92a45d..0b8c3e48 100644 --- a/src/codegen/input_api.h +++ b/src/codegen/input_api.h @@ -6,8 +6,8 @@ #include #include -namespace re2c -{ + +namespace re2c { struct opt_t; diff --git a/src/codegen/label.cc b/src/codegen/label.cc index f8d1ebd9..2b2e8e06 100644 --- a/src/codegen/label.cc +++ b/src/codegen/label.cc @@ -2,6 +2,7 @@ #include "src/codegen/label.h" + namespace re2c { const uint32_t label_t::FIRST = 0; diff --git a/src/codegen/label.h b/src/codegen/label.h index 0eecf0cf..6c407633 100644 --- a/src/codegen/label.h +++ b/src/codegen/label.h @@ -2,7 +2,8 @@ #define _RE2C_CODE_LABEL_ #include "src/util/c99_stdint.h" -#include // ostream +#include + namespace re2c { diff --git a/src/codegen/output.cc b/src/codegen/output.cc index aa1684e5..bbd97647 100644 --- a/src/codegen/output.cc +++ b/src/codegen/output.cc @@ -1,3 +1,4 @@ +#include #include #include #include @@ -8,14 +9,15 @@ #include "src/codegen/output.h" #include "src/codegen/print.h" #include "src/msg/msg.h" +#include "src/msg/warn.h" #include "src/options/opt.h" #include "src/encoding/enc.h" #include "src/util/string_utils.h" #include "src/util/temp_file.h" #include "src/util/uniq_vector.h" -namespace re2c -{ + +namespace re2c { OutputFragment::OutputFragment (type_t t, uint32_t i) : type (t) diff --git a/src/codegen/output.h b/src/codegen/output.h index 54935762..b3c24ee2 100644 --- a/src/codegen/output.h +++ b/src/codegen/output.h @@ -3,21 +3,20 @@ #include #include "src/util/c99_stdint.h" -#include #include #include -#include #include +#include #include #include "src/codegen/label.h" -#include "src/options/opt.h" +#include "src/msg/location.h" #include "src/util/counter.h" #include "src/util/forbid_copy.h" #include "src/util/uniq_vector.h" -namespace re2c -{ + +namespace re2c { class Msg; struct Opt; diff --git a/src/codegen/print.cc b/src/codegen/print.cc index fca7b777..8452ab40 100644 --- a/src/codegen/print.cc +++ b/src/codegen/print.cc @@ -2,8 +2,8 @@ #include "src/codegen/print.h" -namespace re2c -{ + +namespace re2c { static bool is_space(uint32_t c) { diff --git a/src/codegen/print.h b/src/codegen/print.h index 444441b0..cca9e7f2 100644 --- a/src/codegen/print.h +++ b/src/codegen/print.h @@ -4,8 +4,8 @@ #include "src/util/c99_stdint.h" #include -namespace re2c -{ + +namespace re2c { bool is_print (uint32_t c); void prtHex (std::ostream &o, uint32_t c, uint32_t szcunit); diff --git a/src/compile.cc b/src/compile.cc index f5fd20ac..97b49069 100644 --- a/src/compile.cc +++ b/src/compile.cc @@ -6,25 +6,25 @@ #include #include "src/adfa/adfa.h" -#include "src/parse/ast.h" -#include "src/parse/parse.h" -#include "src/parse/scanner.h" -#include "src/codegen/label.h" #include "src/codegen/output.h" #include "src/compile.h" -#include "src/options/opt.h" #include "src/debug/debug.h" #include "src/dfa/dfa.h" -#include "src/nfa/nfa.h" #include "src/encoding/range_suffix.h" +#include "src/msg/location.h" +#include "src/nfa/nfa.h" +#include "src/options/opt.h" +#include "src/parse/ast.h" +#include "src/parse/parse.h" +#include "src/parse/scanner.h" #include "src/regexp/re.h" #include "src/regexp/rule.h" #include "src/skeleton/skeleton.h" -#include "src/util/counter.h" #include "src/util/free_list.h" #include "src/util/range.h" #include "src/util/smart_ptr.h" + namespace re2c { class Msg; diff --git a/src/compile.h b/src/compile.h index e8d6a79b..1371b7de 100644 --- a/src/compile.h +++ b/src/compile.h @@ -1,12 +1,8 @@ #ifndef _RE2C_COMPILE_ #define _RE2C_COMPILE_ -#include "src/parse/scanner.h" -#include "src/codegen/output.h" -#include "src/options/opt.h" -namespace re2c -{ +namespace re2c { class Scanner; struct Opt; diff --git a/src/debug/dump_adfa.cc b/src/debug/dump_adfa.cc index 5c4a4ffe..4701109d 100644 --- a/src/debug/dump_adfa.cc +++ b/src/debug/dump_adfa.cc @@ -16,8 +16,8 @@ #include "src/regexp/rule.h" #include "src/regexp/tag.h" -namespace re2c -{ + +namespace re2c { static void dump_adfa_range(uint32_t lower, uint32_t upper) { diff --git a/src/debug/dump_cfg.cc b/src/debug/dump_cfg.cc index a7fd3aa2..ceeba359 100644 --- a/src/debug/dump_cfg.cc +++ b/src/debug/dump_cfg.cc @@ -3,13 +3,14 @@ #include #include "src/cfg/cfg.h" +#include "src/debug/debug.h" #include "src/dfa/dfa.h" #include "src/dfa/tcmd.h" #include "src/regexp/rule.h" #include "src/regexp/tag.h" -namespace re2c -{ + +namespace re2c { void dump_cfg(const cfg_t &cfg, const bool *live) { diff --git a/src/debug/dump_dfa.cc b/src/debug/dump_dfa.cc index 1708573a..a36ef00c 100644 --- a/src/debug/dump_dfa.cc +++ b/src/debug/dump_dfa.cc @@ -2,7 +2,10 @@ #include #include +#include #include +#include +#include #include "src/options/opt.h" #include "src/debug/debug.h" @@ -15,8 +18,8 @@ #include "src/regexp/rule.h" #include "src/regexp/tag.h" -namespace re2c -{ + +namespace re2c { template void dump_history(const dfa_t &, const typename ctx_t::history_t &, hidx_t); template void dump_tags(const tagver_table_t &, const typename ctx_t::history_t &, hidx_t, uint32_t); diff --git a/src/debug/dump_interf.cc b/src/debug/dump_interf.cc index 03222bfe..05e59fc9 100644 --- a/src/debug/dump_interf.cc +++ b/src/debug/dump_interf.cc @@ -4,10 +4,11 @@ #include "src/cfg/cfg.h" #include "src/dfa/dfa.h" -#include "src/dfa/tcmd.h" +#include "src/debug/debug.h" +#include "src/regexp/tag.h" -namespace re2c -{ + +namespace re2c { void dump_interf(const cfg_t &cfg, const bool *interf) { diff --git a/src/debug/dump_nfa.cc b/src/debug/dump_nfa.cc index d5d83d1f..f19170e9 100644 --- a/src/debug/dump_nfa.cc +++ b/src/debug/dump_nfa.cc @@ -2,15 +2,17 @@ #include "src/util/c99_stdint.h" #include +#include #include #include +#include "src/debug/debug.h" #include "src/nfa/nfa.h" #include "src/regexp/tag.h" #include "src/util/range.h" -namespace re2c -{ + +namespace re2c { static uint32_t index(const nfa_t &nfa, const nfa_state_t *s) { diff --git a/src/dfa/closure.cc b/src/dfa/closure.cc index 42d68acc..c1af732c 100644 --- a/src/dfa/closure.cc +++ b/src/dfa/closure.cc @@ -1,25 +1,28 @@ #include "src/util/c99_stdint.h" #include -#include #include +#include #include -#include #include #include +#include -#include "src/options/opt.h" #include "src/dfa/determinization.h" #include "src/dfa/dfa.h" #include "src/dfa/closure_leftmost.h" #include "src/dfa/closure_posix.h" #include "src/dfa/posix_precedence.h" +#include "src/dfa/tag_history.h" +#include "src/dfa/tagver_table.h" #include "src/dfa/tcmd.h" +#include "src/msg/location.h" +#include "src/msg/warn.h" #include "src/nfa/nfa.h" #include "src/regexp/rule.h" +#include "src/regexp/tag.h" -namespace re2c -{ +namespace re2c { /* note [epsilon-closures in tagged NFA] * diff --git a/src/dfa/closure_posix.h b/src/dfa/closure_posix.h index ffaea282..e4245e02 100644 --- a/src/dfa/closure_posix.h +++ b/src/dfa/closure_posix.h @@ -8,8 +8,7 @@ #include "src/nfa/nfa.h" -namespace re2c -{ +namespace re2c { /* * States of in-degree less than 2 are not joint points; diff --git a/src/dfa/dead_rules.cc b/src/dfa/dead_rules.cc index d7f5e971..a1aa447e 100644 --- a/src/dfa/dead_rules.cc +++ b/src/dfa/dead_rules.cc @@ -1,16 +1,19 @@ +#include "src/util/c99_stdint.h" #include #include #include #include #include -#include "src/msg/msg.h" #include "src/dfa/dfa.h" +#include "src/msg/msg.h" +#include "src/msg/location.h" +#include "src/msg/warn.h" #include "src/regexp/rule.h" #include "src/util/forbid_copy.h" -namespace re2c -{ + +namespace re2c { struct tcmd_t; diff --git a/src/dfa/determinization.cc b/src/dfa/determinization.cc index e59e7dc1..5134998f 100644 --- a/src/dfa/determinization.cc +++ b/src/dfa/determinization.cc @@ -1,7 +1,6 @@ #include "src/util/c99_stdint.h" -#include #include -#include +#include #include #include #include @@ -12,15 +11,14 @@ #include "src/dfa/dfa.h" #include "src/dfa/determinization.h" #include "src/dfa/tcmd.h" -#include "src/msg/msg.h" +#include "src/msg/warn.h" #include "src/nfa/nfa.h" #include "src/regexp/rule.h" #include "src/regexp/tag.h" #include "src/util/range.h" -namespace re2c -{ +namespace re2c { template static void determinization(ctx_t &ctx); template static void clear_caches(ctx_t &ctx); diff --git a/src/dfa/determinization.h b/src/dfa/determinization.h index 42f37773..57bf1a15 100644 --- a/src/dfa/determinization.h +++ b/src/dfa/determinization.h @@ -3,8 +3,8 @@ #include #include "src/util/c99_stdint.h" +#include #include -#include #include #include #include @@ -13,6 +13,7 @@ #include "src/debug/debug.h" #include "src/dfa/tagver_table.h" #include "src/dfa/tag_history.h" +#include "src/regexp/tag.h" #include "src/util/forbid_copy.h" #include "src/util/lookup.h" #include "src/util/slab_allocator.h" diff --git a/src/dfa/dfa.h b/src/dfa/dfa.h index 66dcc9f9..1b1dc0f5 100644 --- a/src/dfa/dfa.h +++ b/src/dfa/dfa.h @@ -13,8 +13,8 @@ #include "src/regexp/tag.h" #include "src/util/forbid_copy.h" -namespace re2c -{ + +namespace re2c { struct nfa_t; struct opt_t; diff --git a/src/dfa/fallback_tags.cc b/src/dfa/fallback_tags.cc index 9cc36398..c22c3dab 100644 --- a/src/dfa/fallback_tags.cc +++ b/src/dfa/fallback_tags.cc @@ -6,8 +6,8 @@ #include "src/dfa/tcmd.h" #include "src/regexp/tag.h" -namespace re2c -{ + +namespace re2c { /* note [fallback tags] * diff --git a/src/dfa/fillpoints.cc b/src/dfa/fillpoints.cc index 419ad38d..472a77d3 100644 --- a/src/dfa/fillpoints.cc +++ b/src/dfa/fillpoints.cc @@ -5,8 +5,8 @@ #include "src/dfa/dfa.h" -namespace re2c -{ + +namespace re2c { /* * node [finding strongly connected components of DFA] diff --git a/src/dfa/find_state.cc b/src/dfa/find_state.cc index 464da642..34c1ec6a 100644 --- a/src/dfa/find_state.cc +++ b/src/dfa/find_state.cc @@ -1,18 +1,22 @@ #include #include #include +#include +#include +#include #include "src/debug/debug.h" #include "src/dfa/determinization.h" #include "src/dfa/dfa.h" +#include "src/dfa/tag_history.h" #include "src/dfa/tcmd.h" #include "src/nfa/nfa.h" +#include "src/regexp/tag.h" #include "src/regexp/rule.h" #include "src/util/hash32.h" -namespace re2c -{ +namespace re2c { /* note [mapping ignores items with lookahead tags] * diff --git a/src/dfa/minimization.cc b/src/dfa/minimization.cc index 1a42d37f..c069af5f 100644 --- a/src/dfa/minimization.cc +++ b/src/dfa/minimization.cc @@ -6,8 +6,8 @@ #include "src/dfa/dfa.h" #include "src/dfa/tcmd.h" -namespace re2c -{ + +namespace re2c { /* * note [DFA minimization: table filling algorithm] diff --git a/src/dfa/tag_history.h b/src/dfa/tag_history.h index a370fd11..c14aebb4 100644 --- a/src/dfa/tag_history.h +++ b/src/dfa/tag_history.h @@ -10,8 +10,8 @@ #include "src/regexp/tag.h" #include "src/util/forbid_copy.h" -namespace re2c -{ + +namespace re2c { typedef int32_t hidx_t; typedef std::vector tag_path_t; diff --git a/src/dfa/tagver_table.cc b/src/dfa/tagver_table.cc index 8e9e225f..7d559259 100644 --- a/src/dfa/tagver_table.cc +++ b/src/dfa/tagver_table.cc @@ -5,8 +5,8 @@ #include "src/dfa/tagver_table.h" #include "src/util/hash32.h" -namespace re2c -{ + +namespace re2c { struct eqtag_t { diff --git a/src/dfa/tagver_table.h b/src/dfa/tagver_table.h index 8b392b38..243763ef 100644 --- a/src/dfa/tagver_table.h +++ b/src/dfa/tagver_table.h @@ -9,8 +9,7 @@ #include "src/util/lookup.h" -namespace re2c -{ +namespace re2c { static const size_t ZERO_TAGS = 0; diff --git a/src/dfa/tcmd.cc b/src/dfa/tcmd.cc index 20385c92..530c1c3c 100644 --- a/src/dfa/tcmd.cc +++ b/src/dfa/tcmd.cc @@ -4,8 +4,8 @@ #include "src/dfa/tcmd.h" #include "src/util/hash32.h" -namespace re2c -{ + +namespace re2c { /* note [topological ordering of copy commands] * diff --git a/src/dfa/tcmd.h b/src/dfa/tcmd.h index 159b8ac1..816e82d4 100644 --- a/src/dfa/tcmd.h +++ b/src/dfa/tcmd.h @@ -9,8 +9,8 @@ #include "src/util/lookup.h" #include "src/util/slab_allocator.h" -namespace re2c -{ + +namespace re2c { struct tcmd_t { diff --git a/src/encoding/case.h b/src/encoding/case.h index e33ababd..f85eefd3 100644 --- a/src/encoding/case.h +++ b/src/encoding/case.h @@ -3,6 +3,7 @@ #include "src/util/c99_stdint.h" + namespace re2c { // TODO: support non-ASCII encodings diff --git a/src/encoding/ebcdic/ebcdic_regexp.cc b/src/encoding/ebcdic/ebcdic_regexp.cc index f35d36d0..8cb5b17b 100644 --- a/src/encoding/ebcdic/ebcdic_regexp.cc +++ b/src/encoding/ebcdic/ebcdic_regexp.cc @@ -1,5 +1,9 @@ +#include +#include "src/util/c99_stdint.h" + #include "src/encoding/ebcdic/ebcdic.h" #include "src/encoding/ebcdic/ebcdic_regexp.h" +#include "src/regexp/re.h" #include "src/util/range.h" diff --git a/src/encoding/ebcdic/ebcdic_regexp.h b/src/encoding/ebcdic/ebcdic_regexp.h index d16d1fd3..27abcb60 100644 --- a/src/encoding/ebcdic/ebcdic_regexp.h +++ b/src/encoding/ebcdic/ebcdic_regexp.h @@ -2,11 +2,13 @@ #define _RE2C_RE_ENCODING_EBCDIC_REGEXP_ #include "src/util/c99_stdint.h" -#include "src/regexp/re.h" + namespace re2c { class Range; +struct RE; +struct RESpec; RE *EBCDICRange(RESpec &spec, const Range *r); diff --git a/src/encoding/enc.cc b/src/encoding/enc.cc index 94071bc8..d86a4986 100644 --- a/src/encoding/enc.cc +++ b/src/encoding/enc.cc @@ -4,6 +4,7 @@ #include "src/encoding/enc.h" #include "src/util/range.h" + namespace re2c { const uint32_t Enc::SURR_MIN = 0xD800; diff --git a/src/encoding/enc.h b/src/encoding/enc.h index 1318ce2f..4e56c339 100644 --- a/src/encoding/enc.h +++ b/src/encoding/enc.h @@ -3,6 +3,7 @@ #include "src/util/c99_stdint.h" + namespace re2c { class Range; diff --git a/src/encoding/range_suffix.cc b/src/encoding/range_suffix.cc index 9e63441c..915bdecb 100644 --- a/src/encoding/range_suffix.cc +++ b/src/encoding/range_suffix.cc @@ -1,4 +1,5 @@ #include "src/encoding/range_suffix.h" +#include "src/regexp/re.h" #include "src/util/range.h" diff --git a/src/encoding/range_suffix.h b/src/encoding/range_suffix.h index bc2112db..5fea2369 100644 --- a/src/encoding/range_suffix.h +++ b/src/encoding/range_suffix.h @@ -1,15 +1,18 @@ #ifndef _RE2C_RE_ENCODING_RANGE_SUFFIX_ #define _RE2C_RE_ENCODING_RANGE_SUFFIX_ -#include // NULL +#include #include "src/util/c99_stdint.h" -#include "src/regexp/re.h" #include "src/util/forbid_copy.h" #include "src/util/free_list.h" + namespace re2c { +struct RE; +struct RESpec; + struct RangeSuffix { static free_list freeList; diff --git a/src/encoding/utf16/utf16.cc b/src/encoding/utf16/utf16.cc index b0b16588..4df86157 100644 --- a/src/encoding/utf16/utf16.cc +++ b/src/encoding/utf16/utf16.cc @@ -1,5 +1,6 @@ #include "src/encoding/utf16/utf16.h" + namespace re2c { const uint32_t utf16::MAX_1WORD_RUNE = 0xFFFFu; diff --git a/src/encoding/utf16/utf16.h b/src/encoding/utf16/utf16.h index b1238c05..f4a06890 100644 --- a/src/encoding/utf16/utf16.h +++ b/src/encoding/utf16/utf16.h @@ -3,6 +3,7 @@ #include "src/util/c99_stdint.h" + namespace re2c { class utf16 diff --git a/src/encoding/utf16/utf16_regexp.cc b/src/encoding/utf16/utf16_regexp.cc index 0263b083..dbc7759f 100644 --- a/src/encoding/utf16/utf16_regexp.cc +++ b/src/encoding/utf16/utf16_regexp.cc @@ -2,7 +2,9 @@ #include "src/util/c99_stdint.h" #include "src/encoding/range_suffix.h" +#include "src/encoding/utf16/utf16.h" #include "src/encoding/utf16/utf16_regexp.h" +#include "src/regexp/re.h" #include "src/util/range.h" diff --git a/src/encoding/utf16/utf16_regexp.h b/src/encoding/utf16/utf16_regexp.h index 6dd99a1a..44c05dd0 100644 --- a/src/encoding/utf16/utf16_regexp.h +++ b/src/encoding/utf16/utf16_regexp.h @@ -1,13 +1,12 @@ #ifndef _RE2C_RE_ENCODING_UTF16_REGEXP_ #define _RE2C_RE_ENCODING_UTF16_REGEXP_ -#include "src/regexp/re.h" -#include "src/encoding/utf16/utf16.h" - namespace re2c { class Range; +struct RE; +struct RESpec; RE *UTF16Range(RESpec &spec, const Range *r); diff --git a/src/encoding/utf8/utf8.cc b/src/encoding/utf8/utf8.cc index b9906d99..dfbe4286 100644 --- a/src/encoding/utf8/utf8.cc +++ b/src/encoding/utf8/utf8.cc @@ -1,5 +1,6 @@ #include "src/encoding/utf8/utf8.h" + namespace re2c { const uint32_t utf8::ERROR = 0xFFFDu; diff --git a/src/encoding/utf8/utf8.h b/src/encoding/utf8/utf8.h index 1f593e2e..42e490c3 100644 --- a/src/encoding/utf8/utf8.h +++ b/src/encoding/utf8/utf8.h @@ -3,6 +3,7 @@ #include "src/util/c99_stdint.h" + namespace re2c { class utf8 diff --git a/src/encoding/utf8/utf8_regexp.cc b/src/encoding/utf8/utf8_regexp.cc index 47388b99..8ba720dc 100644 --- a/src/encoding/utf8/utf8_regexp.cc +++ b/src/encoding/utf8/utf8_regexp.cc @@ -2,7 +2,9 @@ #include "src/util/c99_stdint.h" #include "src/encoding/range_suffix.h" +#include "src/encoding/utf8/utf8.h" #include "src/encoding/utf8/utf8_regexp.h" +#include "src/regexp/re.h" #include "src/util/range.h" diff --git a/src/encoding/utf8/utf8_regexp.h b/src/encoding/utf8/utf8_regexp.h index 2a88dcc5..d89f7d88 100644 --- a/src/encoding/utf8/utf8_regexp.h +++ b/src/encoding/utf8/utf8_regexp.h @@ -1,13 +1,12 @@ #ifndef _RE2C_RE_ENCODING_UTF8_REGEXP_ #define _RE2C_RE_ENCODING_UTF8_REGEXP_ -#include "src/regexp/re.h" -#include "src/encoding/utf8/utf8.h" - namespace re2c { class Range; +struct RE; +struct RESpec; RE *UTF8Range(RESpec &spec, const Range *r); diff --git a/src/main.cc b/src/main.cc index be6ae619..d2d5b8fe 100644 --- a/src/main.cc +++ b/src/main.cc @@ -1,9 +1,13 @@ -#include "src/parse/input.h" -#include "src/parse/scanner.h" +#include + #include "src/codegen/output.h" #include "src/compile.h" #include "src/msg/msg.h" +#include "src/msg/warn.h" #include "src/options/opt.h" +#include "src/parse/input.h" +#include "src/parse/scanner.h" + using namespace re2c; diff --git a/src/msg/msg.cc b/src/msg/msg.cc index 044a5b38..6c6045c5 100644 --- a/src/msg/msg.cc +++ b/src/msg/msg.cc @@ -1,12 +1,14 @@ #include #include #include +#include #include #include "config.h" #include "src/msg/msg.h" #include "src/msg/ver_to_vernum.h" + extern const char *help; // autogenerated namespace re2c { diff --git a/src/msg/msg.h b/src/msg/msg.h index 9cd7e084..3905c8c5 100644 --- a/src/msg/msg.h +++ b/src/msg/msg.h @@ -1,6 +1,7 @@ #ifndef _RE2C_MSG_MSG_ #define _RE2C_MSG_MSG_ +#include #include "src/util/c99_stdint.h" #include #include diff --git a/src/msg/ver_to_vernum.h b/src/msg/ver_to_vernum.h index e573489d..dec2b38e 100644 --- a/src/msg/ver_to_vernum.h +++ b/src/msg/ver_to_vernum.h @@ -3,6 +3,7 @@ #include + namespace re2c { std::string ver_to_vernum(const char *ver); diff --git a/src/msg/ver_to_vernum.re b/src/msg/ver_to_vernum.re index 0f4fa36f..7d167011 100644 --- a/src/msg/ver_to_vernum.re +++ b/src/msg/ver_to_vernum.re @@ -1,9 +1,11 @@ +#include #include "src/util/c99_stdint.h" #include #include "config.h" #include "src/msg/ver_to_vernum.h" + namespace re2c { std::string ver_to_vernum(const char *ver) diff --git a/src/msg/warn.cc b/src/msg/warn.cc index 5634d92f..174f54e3 100644 --- a/src/msg/warn.cc +++ b/src/msg/warn.cc @@ -3,13 +3,17 @@ #include #include +#include "src/msg/msg.h" #include "src/msg/warn.h" #include "src/regexp/rule.h" -#include "src/skeleton/path.h" #include "src/skeleton/skeleton.h" +#include "src/skeleton/path.h" + namespace re2c { +struct loc_t; + const uint32_t Warn::SILENT = 0; const uint32_t Warn::WARNING = 1u << 0; const uint32_t Warn::ERROR = 1u << 1; diff --git a/src/msg/warn.h b/src/msg/warn.h index 90b60734..bfa06bc5 100644 --- a/src/msg/warn.h +++ b/src/msg/warn.h @@ -6,11 +6,10 @@ #include #include -#include "src/msg/location.h" -#include "src/regexp/rule.h" namespace re2c { +struct loc_t; class Msg; class path_t; struct Rule; diff --git a/src/nfa/estimate_size.cc b/src/nfa/estimate_size.cc index 45109f5b..1ea66327 100644 --- a/src/nfa/estimate_size.cc +++ b/src/nfa/estimate_size.cc @@ -1,10 +1,11 @@ - #include #include +#include "src/debug/debug.h" #include "src/parse/ast.h" #include "src/regexp/re.h" + namespace re2c { static size_t estimate(const RE *re) diff --git a/src/nfa/nfa.h b/src/nfa/nfa.h index b06a6f27..9c16de4b 100644 --- a/src/nfa/nfa.h +++ b/src/nfa/nfa.h @@ -12,8 +12,8 @@ #include "src/regexp/tag.h" #include "src/util/forbid_copy.h" -namespace re2c -{ + +namespace re2c { struct clos_t; diff --git a/src/nfa/re_to_nfa.cc b/src/nfa/re_to_nfa.cc index cc84d6d5..ef512b5d 100644 --- a/src/nfa/re_to_nfa.cc +++ b/src/nfa/re_to_nfa.cc @@ -4,9 +4,11 @@ #include "src/parse/ast.h" #include "src/nfa/nfa.h" +#include "src/options/opt.h" #include "src/regexp/re.h" #include "src/regexp/tag.h" + namespace re2c { /* diff --git a/src/options/opt.cc b/src/options/opt.cc index 7dea858a..a8e1743b 100644 --- a/src/options/opt.cc +++ b/src/options/opt.cc @@ -1,7 +1,8 @@ +#include "src/msg/msg.h" #include "src/options/opt.h" -namespace re2c -{ + +namespace re2c { void conopt_t::fix() { diff --git a/src/options/opt.h b/src/options/opt.h index 1b146013..efc407f9 100644 --- a/src/options/opt.h +++ b/src/options/opt.h @@ -4,6 +4,7 @@ #include #include "src/util/c99_stdint.h" #include +#include #include "src/codegen/input_api.h" #include "src/dfa/dfa.h" @@ -11,8 +12,8 @@ #include "src/encoding/enc.h" #include "src/util/forbid_copy.h" -namespace re2c -{ + +namespace re2c { class Msg; diff --git a/src/options/parse_opts.re b/src/options/parse_opts.re index e420536c..f01c7d8e 100644 --- a/src/options/parse_opts.re +++ b/src/options/parse_opts.re @@ -1,11 +1,19 @@ +#include +#include +#include +#include + #include "src/codegen/input_api.h" +#include "src/dfa/dfa.h" +#include "src/encoding/enc.h" +#include "src/msg/location.h" +#include "src/msg/msg.h" +#include "src/msg/warn.h" #include "src/options/opt.h" #include "src/regexp/empty_class_policy.h" -#include "src/encoding/enc.h" -#include "src/util/string_utils.h" -namespace re2c -{ + +namespace re2c { static inline bool next (char * & arg, char ** & argv) { diff --git a/src/parse/ast.cc b/src/parse/ast.cc index ab1be2ec..ad9ba847 100644 --- a/src/parse/ast.cc +++ b/src/parse/ast.cc @@ -3,8 +3,8 @@ #include "src/parse/ast.h" #include "src/util/free_list.h" -namespace re2c -{ + +namespace re2c { free_list AST::flist; diff --git a/src/parse/ast.h b/src/parse/ast.h index 36b979bc..a59fd43b 100644 --- a/src/parse/ast.h +++ b/src/parse/ast.h @@ -7,12 +7,9 @@ #include #include "src/msg/location.h" -#include "src/regexp/rule.h" -#include "src/util/free_list.h" -#include "src/util/range.h" -namespace re2c -{ + +namespace re2c { struct Code; template class free_list; diff --git a/src/parse/input.cc b/src/parse/input.cc index 60fb70c7..2b5a3f55 100644 --- a/src/parse/input.cc +++ b/src/parse/input.cc @@ -1,8 +1,10 @@ +#include "src/msg/msg.h" #include "src/parse/input.h" #include "src/parse/scanner.h" #include "src/util/get_dir.h" #include "src/util/string_utils.h" + namespace re2c { Input::Input(size_t fidx) diff --git a/src/parse/input.h b/src/parse/input.h index f8d63fbc..010d9003 100644 --- a/src/parse/input.h +++ b/src/parse/input.h @@ -7,6 +7,7 @@ #include "src/util/c99_stdint.h" #include "src/util/forbid_copy.h" + namespace re2c { struct Input diff --git a/src/parse/lex.re b/src/parse/lex.re index 518b891c..70850782 100644 --- a/src/parse/lex.re +++ b/src/parse/lex.re @@ -1,22 +1,29 @@ +#include #include "src/util/c99_stdint.h" -#include -#include #include #include #include +#include +#include #include "src/codegen/output.h" #include "src/encoding/enc.h" -#include "src/parse/input.h" +#include "src/msg/location.h" +#include "src/msg/msg.h" +#include "src/msg/warn.h" +#include "src/options/opt.h" #include "src/parse/ast.h" +#include "src/parse/input.h" +#include "src/parse/lex.h" #include "src/parse/scanner.h" #include "src/parse/parse.h" // needed by "parser.h" #include "src/parse/unescape.h" -#include "src/util/range.h" +#include "src/regexp/rule.h" #include "src/util/s_to_n32_unsafe.h" #include "src/util/string_utils.h" #include "parser.h" + extern YYSTYPE yylval; namespace re2c { @@ -54,6 +61,7 @@ namespace re2c { */ /*!header:re2c:on*/ +#include #include #include "src/util/forbid_copy.h" diff --git a/src/parse/lex_conf.re b/src/parse/lex_conf.re index c9385033..e52ddcd6 100644 --- a/src/parse/lex_conf.re +++ b/src/parse/lex_conf.re @@ -1,15 +1,18 @@ #include "src/util/c99_stdint.h" #include -#include "src/codegen/output.h" +#include "src/codegen/input_api.h" #include "src/encoding/enc.h" +#include "src/msg/msg.h" +#include "src/options/opt.h" #include "src/parse/ast.h" #include "src/parse/scanner.h" +#include "src/regexp/empty_class_policy.h" #include "src/util/s_to_n32_unsafe.h" #include "src/util/string_utils.h" -namespace re2c -{ + +namespace re2c { #define YYFILL(n) { if (!fill (n)) fatal("unexpected end of input"); } diff --git a/src/parse/normalize.cc b/src/parse/normalize.cc index bee4cc10..a4c8699d 100644 --- a/src/parse/normalize.cc +++ b/src/parse/normalize.cc @@ -4,6 +4,7 @@ #include "src/parse/ast.h" #include "src/regexp/rule.h" + namespace re2c { void normalize_ast(specs_t &specs) diff --git a/src/parse/parse.h b/src/parse/parse.h index d6e2b40d..45ea7c9c 100644 --- a/src/parse/parse.h +++ b/src/parse/parse.h @@ -8,8 +8,8 @@ #include "src/parse/scanner.h" #include "src/options/opt.h" -namespace re2c -{ + +namespace re2c { class Scanner; struct Opt; diff --git a/src/parse/parser.ypp b/src/parse/parser.ypp index 54e6ca58..a374326c 100644 --- a/src/parse/parser.ypp +++ b/src/parse/parser.ypp @@ -222,8 +222,7 @@ int yylex(context_t &context) } // extern "C" -namespace re2c -{ +namespace re2c { void parse(Scanner &input, specs_t &specs, symtab_t &symtab, Opt &opts) { diff --git a/src/parse/scanner.cc b/src/parse/scanner.cc index 96da5691..1d6e9efa 100644 --- a/src/parse/scanner.cc +++ b/src/parse/scanner.cc @@ -1,6 +1,10 @@ +#include +#include #include "src/util/c99_stdint.h" #include #include + +#include "src/msg/msg.h" #include "src/parse/scanner.h" #include "src/debug/debug.h" diff --git a/src/parse/scanner.h b/src/parse/scanner.h index 051e80ad..87bec434 100644 --- a/src/parse/scanner.h +++ b/src/parse/scanner.h @@ -3,28 +3,23 @@ #include #include "src/util/c99_stdint.h" -#include #include #include +#include "src/debug/debug.h" #include "src/msg/location.h" -#include "src/msg/msg.h" #include "src/parse/input.h" #include "src/parse/lex.h" #include "src/options/opt.h" #include "src/encoding/enc.h" #include "src/encoding/utf8/utf8.h" -#include "src/util/attribute.h" #include "src/util/forbid_copy.h" -namespace re2c -{ + +namespace re2c { class Msg; -struct Opt; -struct conopt_t; class Output; -class Range; struct AST; struct ASTChar; diff --git a/src/parse/unescape.cc b/src/parse/unescape.cc index 97161a4c..dea689b6 100644 --- a/src/parse/unescape.cc +++ b/src/parse/unescape.cc @@ -1,5 +1,6 @@ #include "src/parse/unescape.h" + namespace re2c { // expected characters: [0-9a-zA-Z] diff --git a/src/parse/unescape.h b/src/parse/unescape.h index a37e6da8..eced9d43 100644 --- a/src/parse/unescape.h +++ b/src/parse/unescape.h @@ -3,6 +3,7 @@ #include "src/util/c99_stdint.h" + namespace re2c { uint32_t unesc_hex (const char * s, const char * s_end); diff --git a/src/parse/validate.cc b/src/parse/validate.cc index 0e2fd2a4..2796bb85 100644 --- a/src/parse/validate.cc +++ b/src/parse/validate.cc @@ -1,11 +1,16 @@ #include "src/util/c99_stdint.h" +#include #include #include +#include "src/msg/location.h" +#include "src/msg/msg.h" +#include "src/options/opt.h" #include "src/parse/ast.h" #include "src/parse/scanner.h" #include "src/regexp/rule.h" + namespace re2c { void validate_mode(Scanner::ParseMode mode, bool rflag, bool rules diff --git a/src/regexp/ast_to_re.cc b/src/regexp/ast_to_re.cc index 113eae5a..ac94630e 100644 --- a/src/regexp/ast_to_re.cc +++ b/src/regexp/ast_to_re.cc @@ -1,28 +1,34 @@ #include #include "src/util/c99_stdint.h" #include +#include #include #include #include #include #include -#include "src/parse/ast.h" -#include "src/options/opt.h" +#include "src/debug/debug.h" #include "src/encoding/case.h" #include "src/encoding/enc.h" #include "src/encoding/ebcdic/ebcdic_regexp.h" #include "src/encoding/utf16/utf16_regexp.h" #include "src/encoding/utf8/utf8_regexp.h" #include "src/msg/msg.h" +#include "src/msg/warn.h" +#include "src/options/opt.h" +#include "src/parse/ast.h" #include "src/regexp/empty_class_policy.h" #include "src/regexp/re.h" #include "src/regexp/rule.h" #include "src/regexp/tag.h" #include "src/util/range.h" + namespace re2c { +struct loc_t; + /* note [default regexp] * * Create a byte range that includes all possible input characters. diff --git a/src/regexp/default_tags.cc b/src/regexp/default_tags.cc index f6225541..0370ea01 100644 --- a/src/regexp/default_tags.cc +++ b/src/regexp/default_tags.cc @@ -1,7 +1,13 @@ #include +#include +#include #include +#include "src/debug/debug.h" +#include "src/options/opt.h" #include "src/regexp/re.h" +#include "src/regexp/tag.h" + namespace re2c { diff --git a/src/regexp/empty_class_policy.h b/src/regexp/empty_class_policy.h index 14ef8ade..5f5dd3d0 100644 --- a/src/regexp/empty_class_policy.h +++ b/src/regexp/empty_class_policy.h @@ -1,6 +1,7 @@ #ifndef _RE2C_RE_EMPTY_CLASS_POLICY_ #define _RE2C_RE_EMPTY_CLASS_POLICY_ + namespace re2c { enum empty_class_policy_t diff --git a/src/regexp/fixed_tags.cc b/src/regexp/fixed_tags.cc index 3ed8b5a6..133546de 100644 --- a/src/regexp/fixed_tags.cc +++ b/src/regexp/fixed_tags.cc @@ -6,6 +6,7 @@ #include "src/regexp/re.h" #include "src/regexp/tag.h" + namespace re2c { /* note [fixed and variable tags] diff --git a/src/regexp/nullable.cc b/src/regexp/nullable.cc index 31a099b2..8156b47e 100644 --- a/src/regexp/nullable.cc +++ b/src/regexp/nullable.cc @@ -4,10 +4,12 @@ #include #include "src/msg/msg.h" +#include "src/msg/warn.h" #include "src/regexp/re.h" #include "src/regexp/rule.h" #include "src/regexp/tag.h" + namespace re2c { static bool nullable(const RESpec &spec, const RE *re, bool &trail) diff --git a/src/regexp/re.h b/src/regexp/re.h index 3d1eeda1..c1580c2b 100644 --- a/src/regexp/re.h +++ b/src/regexp/re.h @@ -10,8 +10,8 @@ #include "src/util/range.h" #include "src/util/slab_allocator.h" -namespace re2c -{ + +namespace re2c { struct RE { diff --git a/src/regexp/rule.cc b/src/regexp/rule.cc index 87355cd2..ae1a3edb 100644 --- a/src/regexp/rule.cc +++ b/src/regexp/rule.cc @@ -2,8 +2,8 @@ #include "src/regexp/rule.h" -namespace re2c -{ + +namespace re2c { free_list Code::flist; diff --git a/src/regexp/rule.h b/src/regexp/rule.h index 485420a2..e6006d32 100644 --- a/src/regexp/rule.h +++ b/src/regexp/rule.h @@ -7,11 +7,10 @@ #include #include "src/msg/location.h" -#include "src/regexp/tag.h" #include "src/util/free_list.h" -namespace re2c -{ + +namespace re2c { struct Code { diff --git a/src/regexp/split_charset.cc b/src/regexp/split_charset.cc index 3cfb31ee..6b1a9c6a 100644 --- a/src/regexp/split_charset.cc +++ b/src/regexp/split_charset.cc @@ -8,6 +8,7 @@ #include "src/regexp/re.h" #include "src/util/range.h" + namespace re2c { /* The original set of code units (charset) might be very large. diff --git a/src/regexp/tag.cc b/src/regexp/tag.cc index 56d5e9b1..4bbecf4f 100644 --- a/src/regexp/tag.cc +++ b/src/regexp/tag.cc @@ -1,8 +1,8 @@ #include "src/regexp/tag.h" #include -namespace re2c -{ + +namespace re2c { const size_t Tag::RIGHTMOST = std::numeric_limits::max(); const size_t Tag::VARDIST = std::numeric_limits::max(); diff --git a/src/regexp/tag.h b/src/regexp/tag.h index afb70950..ae8df5a3 100644 --- a/src/regexp/tag.h +++ b/src/regexp/tag.h @@ -7,8 +7,8 @@ #include #include -namespace re2c -{ + +namespace re2c { typedef int32_t tagver_t; diff --git a/src/skeleton/control_flow.cc b/src/skeleton/control_flow.cc index d23cc6b4..b7a3f8cf 100644 --- a/src/skeleton/control_flow.cc +++ b/src/skeleton/control_flow.cc @@ -1,18 +1,21 @@ #include "src/util/c99_stdint.h" #include +#include #include +#include #include #include #include #include "src/msg/msg.h" +#include "src/msg/warn.h" #include "src/regexp/rule.h" #include "src/skeleton/path.h" #include "src/skeleton/skeleton.h" #include "src/util/u32lim.h" -namespace re2c -{ + +namespace re2c { // See note [counting skeleton edges]. // Type for counting arcs in paths that cause undefined behaviour. diff --git a/src/skeleton/generate_code.cc b/src/skeleton/generate_code.cc index c4986e33..8862f3c1 100644 --- a/src/skeleton/generate_code.cc +++ b/src/skeleton/generate_code.cc @@ -15,8 +15,8 @@ #include "src/regexp/tag.h" #include "src/skeleton/skeleton.h" -namespace re2c -{ + +namespace re2c { static void exact_uint(Output &o, size_t width) { diff --git a/src/skeleton/generate_data.cc b/src/skeleton/generate_data.cc index 0333ea55..fdff5d73 100644 --- a/src/skeleton/generate_data.cc +++ b/src/skeleton/generate_data.cc @@ -12,6 +12,7 @@ #include "src/debug/debug.h" #include "src/dfa/tcmd.h" #include "src/encoding/enc.h" +#include "src/msg/msg.h" #include "src/regexp/rule.h" #include "src/regexp/tag.h" #include "src/skeleton/path.h" @@ -20,8 +21,8 @@ #include "src/util/u32lim.h" #include "src/util/wrap_iter.h" -namespace re2c -{ + +namespace re2c { /* * note [counting skeleton edges] diff --git a/src/skeleton/maxpath.cc b/src/skeleton/maxpath.cc index f0e42a87..5fbaec70 100644 --- a/src/skeleton/maxpath.cc +++ b/src/skeleton/maxpath.cc @@ -8,10 +8,11 @@ #include #include "src/debug/debug.h" +#include "src/msg/msg.h" #include "src/skeleton/skeleton.h" -namespace re2c -{ + +namespace re2c { // 0 < DIST_MAX < DIST_ERROR <= std::numeric_limits::max() static const uint32_t DIST_ERROR = std::numeric_limits::max(); diff --git a/src/skeleton/path.h b/src/skeleton/path.h index 681e0e28..81730777 100644 --- a/src/skeleton/path.h +++ b/src/skeleton/path.h @@ -6,8 +6,8 @@ #include "src/skeleton/skeleton.h" -namespace re2c -{ + +namespace re2c { struct suffix_t { diff --git a/src/skeleton/skeleton.cc b/src/skeleton/skeleton.cc index e7a6a123..b59c2099 100644 --- a/src/skeleton/skeleton.cc +++ b/src/skeleton/skeleton.cc @@ -4,8 +4,8 @@ #include "src/dfa/dfa.h" #include "src/skeleton/skeleton.h" -namespace re2c -{ + +namespace re2c { struct opt_t; struct tcmd_t; diff --git a/src/skeleton/skeleton.h b/src/skeleton/skeleton.h index d723ba01..e8191ee2 100644 --- a/src/skeleton/skeleton.h +++ b/src/skeleton/skeleton.h @@ -3,25 +3,23 @@ #include "src/util/c99_stdint.h" #include +#include #include #include #include #include -#include #include #include -#include "src/codegen/bitmap.h" -#include "src/options/opt.h" -#include "src/dfa/tcmd.h" +#include "src/msg/location.h" #include "src/regexp/rule.h" #include "src/regexp/tag.h" #include "src/util/forbid_copy.h" #include "src/util/local_increment.h" #include "src/util/wrap_iter.h" -namespace re2c -{ + +namespace re2c { class Output; class path_t; diff --git a/src/test/range/test.cc b/src/test/range/test.cc index d5821dc4..cab65b00 100644 --- a/src/test/range/test.cc +++ b/src/test/range/test.cc @@ -3,6 +3,7 @@ #include "src/test/range/test.h" #include "src/test/range/test-impl.h" + namespace re2c_test { static bool equal (const re2c::Range * r1, const re2c::Range * r2) diff --git a/src/test/s_to_n32_unsafe/test.cc b/src/test/s_to_n32_unsafe/test.cc index ba4acaa0..488dab1f 100644 --- a/src/test/s_to_n32_unsafe/test.cc +++ b/src/test/s_to_n32_unsafe/test.cc @@ -3,6 +3,7 @@ #include "src/util/s_to_n32_unsafe.h" + namespace re2c_test { static const uint32_t DIGITS = 256; diff --git a/src/test/ver_to_vernum/test.cc b/src/test/ver_to_vernum/test.cc index e4e8f56a..ac1300f4 100644 --- a/src/test/ver_to_vernum/test.cc +++ b/src/test/ver_to_vernum/test.cc @@ -2,6 +2,7 @@ #include #include "src/msg/ver_to_vernum.h" /* re2c::ver_to_vernum() */ + namespace re2c_test { struct examples_t { diff --git a/src/util/allocate.h b/src/util/allocate.h index 47eaf887..a606e471 100644 --- a/src/util/allocate.h +++ b/src/util/allocate.h @@ -3,6 +3,7 @@ #include // size_t + namespace re2c { // useful fof allocation of arrays of POD objects diff --git a/src/util/counter.h b/src/util/counter.h index c8e83389..a00dc0b2 100644 --- a/src/util/counter.h +++ b/src/util/counter.h @@ -1,6 +1,7 @@ #ifndef _RE2C_UTIL_COUNTER_ #define _RE2C_UTIL_COUNTER_ + namespace re2c { template diff --git a/src/util/free_list.h b/src/util/free_list.h index f2ad1eac..eb609d30 100644 --- a/src/util/free_list.h +++ b/src/util/free_list.h @@ -3,8 +3,8 @@ #include -namespace re2c -{ + +namespace re2c { template class free_list: protected std::set<_Ty> diff --git a/src/util/get_dir.cc b/src/util/get_dir.cc index fa006e4f..90c742ae 100644 --- a/src/util/get_dir.cc +++ b/src/util/get_dir.cc @@ -1,5 +1,8 @@ +#include + #include "src/util/get_dir.h" + namespace re2c { void get_dir(std::string &path) diff --git a/src/util/get_dir.h b/src/util/get_dir.h index 063227fc..469788b6 100644 --- a/src/util/get_dir.h +++ b/src/util/get_dir.h @@ -3,6 +3,7 @@ #include + namespace re2c { void get_dir(std::string &path); diff --git a/src/util/hash32.h b/src/util/hash32.h index 2d57c8c0..235aa069 100644 --- a/src/util/hash32.h +++ b/src/util/hash32.h @@ -4,8 +4,8 @@ #include #include "src/util/c99_stdint.h" -namespace re2c -{ + +namespace re2c { static inline uint32_t hash4(uint32_t h, uint32_t k) { diff --git a/src/util/local_increment.h b/src/util/local_increment.h index e93a57be..8bcf2d5b 100644 --- a/src/util/local_increment.h +++ b/src/util/local_increment.h @@ -1,8 +1,8 @@ #ifndef _RE2C_UTIL_LOCAL_INCREMENT_ #define _RE2C_UTIL_LOCAL_INCREMENT_ -namespace re2c -{ + +namespace re2c { template struct local_increment_t diff --git a/src/util/lookup.h b/src/util/lookup.h index 9d4c3b79..69909d24 100644 --- a/src/util/lookup.h +++ b/src/util/lookup.h @@ -9,8 +9,8 @@ #include "src/debug/debug.h" -namespace re2c -{ + +namespace re2c { /* * O(1) random access diff --git a/src/util/range.cc b/src/util/range.cc index 2b6d25a7..674c2eb6 100644 --- a/src/util/range.cc +++ b/src/util/range.cc @@ -1,7 +1,7 @@ #include "src/util/range.h" -namespace re2c -{ + +namespace re2c { void RangeMgr::append_overlapping(Range *&head, Range *&tail, const Range *r) { diff --git a/src/util/range.h b/src/util/range.h index 2d86440e..218a444a 100644 --- a/src/util/range.h +++ b/src/util/range.h @@ -4,7 +4,6 @@ #include // NULL #include "src/util/c99_stdint.h" -#include "src/debug/debug.h" #include "src/test/range/test.h" #include "src/util/fixed_allocator.h" #include "src/util/forbid_copy.h" diff --git a/src/util/s_to_n32_unsafe.cc b/src/util/s_to_n32_unsafe.cc index 6aaabe37..f9b060e0 100644 --- a/src/util/s_to_n32_unsafe.cc +++ b/src/util/s_to_n32_unsafe.cc @@ -2,6 +2,9 @@ #include "src/util/s_to_n32_unsafe.h" + +namespace re2c { + // assumes that string matches regexp [0-9]+ // returns false on overflow bool s_to_u32_unsafe (const char * s, const char * s_end, uint32_t & number) @@ -53,3 +56,5 @@ bool s_to_i32_unsafe (const char * s, const char * s_end, int32_t & number) number = static_cast (i); return true; } + +} // namespace re2c diff --git a/src/util/s_to_n32_unsafe.h b/src/util/s_to_n32_unsafe.h index 27c1e1cc..924850fc 100644 --- a/src/util/s_to_n32_unsafe.h +++ b/src/util/s_to_n32_unsafe.h @@ -5,7 +5,12 @@ #include "src/util/attribute.h" + +namespace re2c { + bool s_to_u32_unsafe (const char * s, const char * s_end, uint32_t & number) RE2C_GXX_ATTRIBUTE ((warn_unused_result)); bool s_to_i32_unsafe (const char * s, const char * s_end, int32_t & number) RE2C_GXX_ATTRIBUTE ((warn_unused_result)); +} // namespace re2c + #endif // _RE2C_UTIL_S_TO_N32_UNSAFE_ diff --git a/src/util/slab_allocator.h b/src/util/slab_allocator.h index d441857f..1c0eb203 100644 --- a/src/util/slab_allocator.h +++ b/src/util/slab_allocator.h @@ -9,6 +9,8 @@ #include "src/util/forbid_copy.h" +namespace re2c { + /* * Works nice for tiny POD objects (~30 bytes and lower) * WARNING: Does not free memory for distinct objects! @@ -74,4 +76,6 @@ public: FORBID_COPY(slab_allocator_t); }; +} // namespace re2c + #endif // _RE2C_UTIL_SLAB_ALLOCATOR_ diff --git a/src/util/smart_ptr.h b/src/util/smart_ptr.h index b1b775b7..3d02e1e5 100644 --- a/src/util/smart_ptr.h +++ b/src/util/smart_ptr.h @@ -1,69 +1,56 @@ #ifndef _RE2C_UTIL_SMART_PTR_ #define _RE2C_UTIL_SMART_PTR_ -namespace re2c + +namespace re2c { + +template +class smart_ptr { +private: + T* ptr; + long* count; // shared number of owners - template - class smart_ptr - { - private: - T* ptr; - long* count; // shared number of owners +public: + explicit smart_ptr (T* p=0) + : ptr(p), count(new long(1)) {} - public: - explicit smart_ptr (T* p=0) - : ptr(p), count(new long(1)) {} + smart_ptr(const smart_ptr& p) throw() + : ptr(p.ptr), count(p.count) { ++*count; } - smart_ptr (const smart_ptr& p) throw() - : ptr(p.ptr), count(p.count) - { - ++*count; - } + ~smart_ptr() { dispose(); } - ~smart_ptr () - { + smart_ptr& operator=(const smart_ptr& p) + { + if (this != &p) { dispose(); + ptr = p.ptr; + count = p.count; + ++*count; } + return *this; + } - smart_ptr& operator= (const smart_ptr& p) - { - if (this != &p) - { - dispose(); - ptr = p.ptr; - count = p.count; - ++*count; - } - return *this; - } - - T& operator*() const - { - return *ptr; - } + T& operator*() const { return *ptr; } - T* operator->() const - { - return ptr; - } + T* operator->() const { return ptr; } - private: - void dispose() - { - if (--*count == 0) - { - delete count; - delete ptr; - } +private: + void dispose() + { + if (--*count == 0) { + delete count; + delete ptr; } }; +}; - template - smart_ptr make_smart_ptr(T* p) - { - return smart_ptr(p); - } +template +smart_ptr make_smart_ptr(T* p) +{ + return smart_ptr(p); } +} // namespace re2c + #endif // _RE2C_UTIL_SMART_PTR_ diff --git a/src/util/static_assert.h b/src/util/static_assert.h index c2a1327d..ee81ecf9 100644 --- a/src/util/static_assert.h +++ b/src/util/static_assert.h @@ -1,6 +1,7 @@ #ifndef _RE2C_UTIL_STATIC_ASSERT_ #define _RE2C_UTIL_STATIC_ASSERT_ + namespace re2c { template struct static_assert_t; diff --git a/src/util/string_utils.h b/src/util/string_utils.h index 8d8bff00..d0266639 100644 --- a/src/util/string_utils.h +++ b/src/util/string_utils.h @@ -4,8 +4,8 @@ #include #include -namespace re2c -{ + +namespace re2c { template void strrreplace( std::string &s, diff --git a/src/util/u32lim.h b/src/util/u32lim.h index f9d03701..df9757ac 100644 --- a/src/util/u32lim.h +++ b/src/util/u32lim.h @@ -3,6 +3,9 @@ #include "src/util/c99_stdint.h" + +namespace re2c { + // uint32_t truncated to LIMIT // any overflow (either result of a binary operation // or conversion from another type) results in LIMIT @@ -69,4 +72,6 @@ public: } }; +} // namespace re2c + #endif // _RE2C_UTIL_U32LIM_ diff --git a/src/util/uniq_vector.h b/src/util/uniq_vector.h index 2841c1b7..91c5d452 100644 --- a/src/util/uniq_vector.h +++ b/src/util/uniq_vector.h @@ -3,6 +3,7 @@ #include + namespace re2c { // wrapper over std::vector diff --git a/src/util/wrap_iter.h b/src/util/wrap_iter.h index bf58a867..5c70bbf2 100644 --- a/src/util/wrap_iter.h +++ b/src/util/wrap_iter.h @@ -1,8 +1,8 @@ #ifndef _RE2C_UTIL_WRAP_ITER_ #define _RE2C_UTIL_WRAP_ITER_ -namespace re2c -{ + +namespace re2c { // immutable containter template