]> granicus.if.org Git - re2c/commitdiff
Fixed includes using include-what-you-use.
authorUlya Trofimovich <skvadrik@gmail.com>
Fri, 12 Jul 2019 12:35:40 +0000 (13:35 +0100)
committerUlya Trofimovich <skvadrik@gmail.com>
Fri, 12 Jul 2019 12:35:40 +0000 (13:35 +0100)
149 files changed:
lib/bench.cc
lib/regcomp.cc
lib/regex.h
lib/regexec.cc
lib/regexec_dfa.cc
lib/regexec_nfa_leftmost.cc
lib/regexec_nfa_leftmost_trie.cc
lib/regexec_nfa_posix.cc
lib/regexec_nfa_posix_backward.cc
lib/regexec_nfa_posix_kuklewicz.cc
lib/regexec_nfa_posix_trie.cc
lib/regfree.cc
src/adfa/action.h
src/adfa/adfa.cc
src/adfa/adfa.h
src/adfa/prepare.cc
src/cfg/cfg.cc
src/cfg/cfg.h
src/cfg/compact.cc
src/cfg/dce.cc
src/cfg/freeze.cc
src/cfg/interfere.cc
src/cfg/liveanal.cc
src/cfg/normalize.cc
src/cfg/optimize.cc
src/cfg/rename.cc
src/cfg/varalloc.cc
src/codegen/bitmap.cc
src/codegen/bitmap.h
src/codegen/emit.h
src/codegen/emit_action.cc
src/codegen/emit_dfa.cc
src/codegen/go.h
src/codegen/go_construct.cc
src/codegen/go_destruct.cc
src/codegen/go_emit.cc
src/codegen/go_used_labels.cc
src/codegen/input_api.cc
src/codegen/input_api.h
src/codegen/label.cc
src/codegen/label.h
src/codegen/output.cc
src/codegen/output.h
src/codegen/print.cc
src/codegen/print.h
src/compile.cc
src/compile.h
src/debug/dump_adfa.cc
src/debug/dump_cfg.cc
src/debug/dump_dfa.cc
src/debug/dump_interf.cc
src/debug/dump_nfa.cc
src/dfa/closure.cc
src/dfa/closure_posix.h
src/dfa/dead_rules.cc
src/dfa/determinization.cc
src/dfa/determinization.h
src/dfa/dfa.h
src/dfa/fallback_tags.cc
src/dfa/fillpoints.cc
src/dfa/find_state.cc
src/dfa/minimization.cc
src/dfa/tag_history.h
src/dfa/tagver_table.cc
src/dfa/tagver_table.h
src/dfa/tcmd.cc
src/dfa/tcmd.h
src/encoding/case.h
src/encoding/ebcdic/ebcdic_regexp.cc
src/encoding/ebcdic/ebcdic_regexp.h
src/encoding/enc.cc
src/encoding/enc.h
src/encoding/range_suffix.cc
src/encoding/range_suffix.h
src/encoding/utf16/utf16.cc
src/encoding/utf16/utf16.h
src/encoding/utf16/utf16_regexp.cc
src/encoding/utf16/utf16_regexp.h
src/encoding/utf8/utf8.cc
src/encoding/utf8/utf8.h
src/encoding/utf8/utf8_regexp.cc
src/encoding/utf8/utf8_regexp.h
src/main.cc
src/msg/msg.cc
src/msg/msg.h
src/msg/ver_to_vernum.h
src/msg/ver_to_vernum.re
src/msg/warn.cc
src/msg/warn.h
src/nfa/estimate_size.cc
src/nfa/nfa.h
src/nfa/re_to_nfa.cc
src/options/opt.cc
src/options/opt.h
src/options/parse_opts.re
src/parse/ast.cc
src/parse/ast.h
src/parse/input.cc
src/parse/input.h
src/parse/lex.re
src/parse/lex_conf.re
src/parse/normalize.cc
src/parse/parse.h
src/parse/parser.ypp
src/parse/scanner.cc
src/parse/scanner.h
src/parse/unescape.cc
src/parse/unescape.h
src/parse/validate.cc
src/regexp/ast_to_re.cc
src/regexp/default_tags.cc
src/regexp/empty_class_policy.h
src/regexp/fixed_tags.cc
src/regexp/nullable.cc
src/regexp/re.h
src/regexp/rule.cc
src/regexp/rule.h
src/regexp/split_charset.cc
src/regexp/tag.cc
src/regexp/tag.h
src/skeleton/control_flow.cc
src/skeleton/generate_code.cc
src/skeleton/generate_data.cc
src/skeleton/maxpath.cc
src/skeleton/path.h
src/skeleton/skeleton.cc
src/skeleton/skeleton.h
src/test/range/test.cc
src/test/s_to_n32_unsafe/test.cc
src/test/ver_to_vernum/test.cc
src/util/allocate.h
src/util/counter.h
src/util/free_list.h
src/util/get_dir.cc
src/util/get_dir.h
src/util/hash32.h
src/util/local_increment.h
src/util/lookup.h
src/util/range.cc
src/util/range.h
src/util/s_to_n32_unsafe.cc
src/util/s_to_n32_unsafe.h
src/util/slab_allocator.h
src/util/smart_ptr.h
src/util/static_assert.h
src/util/string_utils.h
src/util/u32lim.h
src/util/uniq_vector.h
src/util/wrap_iter.h

index 86730f64e576f51444281c60d9b5d0e1b9e7b0c4..4d1511ab59967e334b259c4088861fb8f21ffe9f 100644 (file)
@@ -8,7 +8,6 @@
 #include "lib/regex.h"
 
 #include <assert.h>
-#include <stddef.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index db504d24c43d4c3ea99c5d6392de3084cba24d94..9851f16023f9703d4bfa65c4901d509a9ff6c00f 100644 (file)
@@ -1,9 +1,22 @@
+#include <stddef.h>
+#include "src/util/c99_stdint.h"
+#include <algorithm>
+#include <valarray>
+#include <vector>
+
 #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 {
index 22e7f366706805c8707297ca390f9fc720addf6e..7c5bed137cdf11cf90ea8a91aa88bbfcd10b3433 100644 (file)
@@ -2,6 +2,7 @@
 #define _RE2C_LIB_REGEX_
 
 #include <stddef.h>
+#include "src/util/c99_stdint.h"
 #include <limits.h>
 
 
index 2b721ba15217a7625a803ab9151d7c109f5eebf9..06e21262a03d74be018cd5b2bfcecdaf6381d529 100644 (file)
@@ -1,6 +1,8 @@
-#include "lib/lex.h"
+#include <stddef.h>
+
 #include "lib/regex.h"
 #include "lib/regex_impl.h"
+#include "src/msg/location.h"
 
 
 using namespace re2c;
index b204c6a1a80c83bd6caac891a1d1670f04b8f69c..9e2c1ba3a21275c05bd00e1b7f200697c8600a03 100644 (file)
@@ -1,9 +1,14 @@
-#include "lib/lex.h"
+#include <stddef.h>
+#include <valarray>
+#include <vector>
+
 #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 {
index 1c87cafb0d311a5dc459d2daa14650d3ec58855f..d848ecfe26616aded9b46c06c79f1f3636415d22 100644 (file)
@@ -1,11 +1,16 @@
-#include "lib/lex.h"
+#include <stddef.h>
+#include <algorithm>
+#include <utility>
+#include <vector>
+
 #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 {
index acbdfc44f59ea42122065c703517032c8c54b7d6..6428e2bf62649f425b8fe24590be6b7ac80164ac 100644 (file)
@@ -1,11 +1,14 @@
-#include "lib/lex.h"
+#include <stddef.h>
+#include <algorithm>
+#include <vector>
+
 #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 {
index 9562573a9d05f021573e95920494d223573e7e31..35945ee7ec4d152fd0099271b5c83619fca8ce31 100644 (file)
@@ -1,15 +1,17 @@
-#include <queue>
 #include <stdio.h>
+#include <algorithm>
+#include <utility>
+#include <vector>
 
-#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 {
index 6a0f5f5954d8ff91c431710df48708504d9e5461..42713ca47ca288b8743fb9d0f67dba99f679215c 100644 (file)
@@ -1,16 +1,17 @@
-#include <queue>
 #include <stdio.h>
 #include <string.h>
+#include <algorithm>
+#include <vector>
 
-#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 {
index df738a89fe96d14eca35052caca6cf3c117f9618..d00fd9487f30cfdd3e0205ab75d645bea21828c4 100644 (file)
@@ -1,15 +1,17 @@
-#include <queue>
 #include <stdio.h>
+#include <algorithm>
+#include <utility>
+#include <vector>
 
-#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]
index 4b4fb1cc0c941fdbaf2aea66f3a52faba841a691..ce0620984e17b520db48ea88f4bb1b9bfb0af021 100644 (file)
@@ -1,12 +1,14 @@
-#include "lib/lex.h"
+#include <stddef.h>
+#include <algorithm>
+#include <vector>
+
 #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 {
index 2779b672264c5fe32ef32e13b58ac7980a14634b..19f6e7c50c9800ad739afe4c290cf2c0d762e131 100644 (file)
@@ -1,8 +1,19 @@
+#include <stddef.h>
+#include <set>
+#include <valarray>
+#include <vector>
+
 #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;
index c6937b7dd6eb0a29bb6f89372ca778b7659243d4..d190696a846055378a0123e28da16afe36660db1 100644 (file)
@@ -9,8 +9,8 @@
 #include "src/util/c99_stdint.h"
 #include "src/util/uniq_vector.h"
 
-namespace re2c
-{
+
+namespace re2c {
 
 class Output;
 struct State;
index 024295898200983a31791d1600410725b289839c..18557bfeca459910ee7d6687298830f9bb6029ce 100644 (file)
@@ -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<size_t>::max();
 
index c4421d4a5e437b515387b72fd3eca70c928759b5..f50ae9b7d651886d09aadc49bb9e0ce6aa7f9654 100644 (file)
 #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
index 1ec4d9e03eaf198423c8585b069d42fa9a4c6eef..f87ea55c21d5c3f26dc3dcd89e88f08b01a8bcad 100644 (file)
@@ -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)
index e3a7c7248f750beb21407c641e2b72b9072ae359..82576ceec54ede3514f041fc1b753202ca8dfe26 100644 (file)
@@ -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);
index 2e6593d83e77180a80cb44e8ccd52f7de16f9543..026ce3ff29c2978f521f442e147940dd7bb902ee 100644 (file)
@@ -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;
index f99af79b125b0fbaceedbf58536fca5a2899ca6d..aebbcc8ebf4f3a1cb914498bb8938a3b13e668c9 100644 (file)
@@ -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)
 {
index 9683eb8633cc87159cbaa0bc3aeacfa5acf23cdd..36d8b8d046b025d9fe84fff00eed95573c94085a 100644 (file)
@@ -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)
 {
index aa4d15ff66122052817820711ae0d1b155d252fc..898090e41d323204bb7bdec2b55e4aecadda7ab8 100644 (file)
@@ -4,8 +4,8 @@
 #include "src/dfa/dfa.h"
 #include "src/dfa/tcmd.h"
 
-namespace re2c
-{
+
+namespace re2c {
 
 /* note [tag freezing]
  *
index 19e033589a780b8193c6e0a4348e2a68e326dce5..3e15c27ee751b9cd89d499501c010c44ab95ff70 100644 (file)
@@ -7,8 +7,8 @@
 #include "src/dfa/tcmd.h"
 #include "src/regexp/tag.h"
 
-namespace re2c
-{
+
+namespace re2c {
 
 typedef std::vector<tagver_t> vals_t;
 static void interfere(const tcmd_t *cmd, const bool *live, bool *interf, bool *buf, vals_t *vals, size_t nver);
index 7cd316e1cf8e59b356b8ac170fa2dba91f153ce7..f2cfe8b28c179c4d8d2774f2e0e85a4b1e631b3a 100644 (file)
@@ -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)
index 53e839152b6cda22f6ae7e8279ce2206200c7df0..94879cfc61ebbd0a6f5694c0af83b0801f8eb360 100644 (file)
@@ -1,6 +1,6 @@
 #include "src/util/c99_stdint.h"
 #include <string.h>
-#include <algorithm>
+#include <utility>
 
 #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<typename cmd_t> void normalize(cmd_t *cmd);
 
index 1345ccb00a0a71c930c478ff42c1049a10c8bbec..e65ef5dc140144538722998b85d6e433c5092712 100644 (file)
@@ -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)
 {
index e77b51ea94e1f111753eb2846bc6aca77dc66e4d..b8e597a177ab31ab51715f2471b6e4ab7f47e871 100644 (file)
@@ -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)
 {
index 8e82acdfaac2baa84b178b115dceb494d98ed398..75963448c8bc2a4becd35b427d9a2ee42c93711d 100644 (file)
@@ -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
index 71260a00fdaa09458ee643da974e35c3f8151d68..50fb35a5e40d113c750b055bcb62aa0ef0d88c9d 100644 (file)
@@ -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);
index 8258e68f1a152235c9e178c4cdc7b1c506812559..305529233eb591efcea259d73e4279ee6dd7e8dc 100644 (file)
@@ -2,15 +2,16 @@
 #define _RE2C_CODE_BITMAP_
 
 #include "src/util/c99_stdint.h"
+#include <algorithm>
 #include <vector>
 
 #include "src/util/forbid_copy.h"
 
+
 namespace re2c {
 
 class Output;
 struct Go;
-struct Span;
 struct State;
 
 struct bitmap_t
index 2b0971bf688d719b6b64f67fc9ec72de3d743575..078d3836ba80259f095d5d932e9f1f2394dce50e 100644 (file)
@@ -4,6 +4,7 @@
 #include "src/codegen/output.h"
 #include "src/adfa/adfa.h"
 
+
 namespace re2c {
 
 typedef std::vector<std::string> code_lines_t;
index b25370b2b39fcb0e7108313511813dc955ef7386..930c491fe183d2030b9ab1494789bea082dece6a 100644 (file)
@@ -1,6 +1,8 @@
 #include <stddef.h>
 #include "src/util/c99_stdint.h"
+#include <algorithm>
 #include <iosfwd>
+#include <ostream>
 #include <set>
 #include <string>
 #include <utility>
@@ -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);
index f81b8e4c1904026ab79cea0f43916a5c52fa4586..85a41a2b6dda5a20719d378e9e346d62988ca066 100644 (file)
@@ -1,5 +1,6 @@
 #include <stddef.h>
 #include "src/util/c99_stdint.h"
+#include <algorithm>
 #include <ostream>
 #include <set>
 #include <string>
@@ -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*);
index 469a5038443039ed8820fa65a0cbdff7e94bb399..82c98e83ada8f9c990b5979c01fd516773de4470 100644 (file)
@@ -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;
index dc74282af7871c8c9fa2cde9ee8fe68f02e6c0cc..559a4638cf3bb21adc46df81003348d010f6c453 100644 (file)
@@ -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);
index 026f9772069b5be9c81a12fdd6737b07434ef7fe..fc3f2cc8d64a75209d550d93f2edefbabd0a63db 100644 (file)
@@ -2,8 +2,8 @@
 
 #include "src/codegen/go.h"
 
-namespace re2c
-{
+
+namespace re2c {
 
 Cases::~Cases ()
 {
index b781335cc69019ed4db6854dd766314d5ae486e4..1e98250fe797c06a1c35623935ec3c023ed74a34 100644 (file)
@@ -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);
index 7b53240fde38f15ecac1ccafb6c090eb217e6838..508cdea1dbee9d092f3f88ad58a821343590707e 100644 (file)
@@ -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<label_t> & used) const
 {
index d590e0dea1faf769cef8346b43bb927fa14ca158..6760711d2ea1f4f984907d165387bae3b4e3cd20 100644 (file)
@@ -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)
 {
index 5c92a45ddb1eb24a44318ee91cc55f97b1d9099f..0b8c3e48f255a65f96a28000b798aa83460661df 100644 (file)
@@ -6,8 +6,8 @@
 #include <iosfwd>
 #include <string>
 
-namespace re2c
-{
+
+namespace re2c {
 
 struct opt_t;
 
index f8d1ebd94e0e5de6d6b2138f432e830fc7df74a2..2b2e8e06ed55f58cdd458d20ac53f81e52baac6c 100644 (file)
@@ -2,6 +2,7 @@
 
 #include "src/codegen/label.h"
 
+
 namespace re2c {
 
 const uint32_t label_t::FIRST = 0;
index 0eecf0cf6e7eb4586f2029105e0cf11ade1ae98e..6c4076337eaa08804749a8e9a3c47b6bdcb9b2ac 100644 (file)
@@ -2,7 +2,8 @@
 #define _RE2C_CODE_LABEL_
 
 #include "src/util/c99_stdint.h"
-#include <iosfwd> // ostream
+#include <iosfwd>
+
 
 namespace re2c {
 
index aa1684e5e240073a9a84b715a6328e8b0c9051af..bbd9764728d3231ffd581f5f5714fff0041a3946 100644 (file)
@@ -1,3 +1,4 @@
+#include <ctype.h>
 #include <stdio.h>
 #include <time.h>
 #include <iomanip>
@@ -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)
index 54935762d95cdf85fd86a838d4860c417fa1461e..b3c24ee2c6faaa0a55d8e5bd1dca090ed23d16d8 100644 (file)
@@ -3,21 +3,20 @@
 
 #include <stddef.h>
 #include "src/util/c99_stdint.h"
-#include <stdio.h>
 #include <fstream>
 #include <set>
-#include <sstream>
 #include <string>
+#include <sstream>
 #include <vector>
 
 #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;
index fca7b777ecbde7d67152b0f61dadf2cc92eed3ec..8452ab4042258dc207ee66a5a8d2a3c68cb0df1d 100644 (file)
@@ -2,8 +2,8 @@
 
 #include "src/codegen/print.h"
 
-namespace re2c
-{
+
+namespace re2c {
 
 static bool is_space(uint32_t c)
 {
index 444441b02d221ab4759781fe364fa2285d5c430d..cca9e7f26c31eee4e92c4e35121e751467b71def 100644 (file)
@@ -4,8 +4,8 @@
 #include "src/util/c99_stdint.h"
 #include <iosfwd>
 
-namespace re2c
-{
+
+namespace re2c {
 
 bool is_print   (uint32_t c);
 void prtHex     (std::ostream &o, uint32_t c, uint32_t szcunit);
index f5fd20acd46dd727ba43b10ceca09d4118ce5523..97b49069186aae867c4af792d9b00c62a56457d9 100644 (file)
@@ -6,25 +6,25 @@
 #include <vector>
 
 #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;
index e8d6a79b435b2935f6d1516254440cd9fbaba6e6..1371b7de922f92545154ad6374e451a505e16e7f 100644 (file)
@@ -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;
index 5c4a4ffebab10904c3e748938e5047b3e04020c5..4701109d9c06045843a12339e4d82d953a7326a3 100644 (file)
@@ -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)
 {
index a7fd3aa2179f6f2cc87fdc9969082a69862fbd9c..ceeba3597849686f368f9d9040e5c5e5c2b7edc3 100644 (file)
@@ -3,13 +3,14 @@
 #include <stdio.h>
 
 #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)
 {
index 1708573aaeb7fee82d1418a68740b6afe76eaf1c..a36ef00c5d6b85bdb2687ce8172b5a587dd3b60e 100644 (file)
@@ -2,7 +2,10 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <algorithm>
 #include <string>
+#include <valarray>
+#include <vector>
 
 #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<typename ctx_t> void dump_history(const dfa_t &, const typename ctx_t::history_t &, hidx_t);
 template<typename ctx_t> void dump_tags(const tagver_table_t &, const typename ctx_t::history_t &, hidx_t, uint32_t);
index 03222bfe4c45a45699bf5afb8166fe00b1f43c73..05e59fc969f28697e58b9ddd7f10038eb96ab27b 100644 (file)
@@ -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)
 {
index d5d83d1f7228eaf03570fe2c0c5e78d7af59ae79..f19170e9245aa61108eb0cc2dc486fc8bffa568e 100644 (file)
@@ -2,15 +2,17 @@
 
 #include "src/util/c99_stdint.h"
 #include <stdio.h>
+#include <memory>
 #include <string>
 #include <vector>
 
+#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)
 {
index 42d68accdaeb6594f4bf7ddc983715e2f917425b..c1af732c6b4dd01f6c0c4b6cf4424b5f9779644a 100644 (file)
@@ -1,25 +1,28 @@
 #include "src/util/c99_stdint.h"
 #include <stdlib.h>
-#include <string.h>
 #include <algorithm>
+#include <map>
 #include <set>
-#include <stack>
 #include <utility>
 #include <valarray>
+#include <vector>
 
-#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]
  *
index ffaea282c52ab6656378220d267942bc1972fb24..e4245e0207ce06af2a51932ca357a0980d1fba4c 100644 (file)
@@ -8,8 +8,7 @@
 #include "src/nfa/nfa.h"
 
 
-namespace re2c
-{
+namespace re2c {
 
 /*
  * States of in-degree less than 2 are not joint points;
index d7f5e971b9f22c4f3c7d9b4407399992aeb9098b..a1aa447e0f16d9c47e6d9b0de88617841e699d06 100644 (file)
@@ -1,16 +1,19 @@
+#include "src/util/c99_stdint.h"
 #include <string.h>
 #include <set>
 #include <string>
 #include <valarray>
 #include <vector>
 
-#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;
 
index e59e7dc1eb179fa76bb0d8fe42c39cd5bbb87fc5..5134998f88ae65649b06f3ad9bb2a661a117cd36 100644 (file)
@@ -1,7 +1,6 @@
 #include "src/util/c99_stdint.h"
-#include <string.h>
 #include <algorithm>
-#include <limits>
+#include <memory>
 #include <set>
 #include <string>
 #include <valarray>
 #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<typename ctx_t> static void determinization(ctx_t &ctx);
 template<typename ctx_t> static void clear_caches(ctx_t &ctx);
index 42f3777335b61edb798b89433bd21aed81dd5802..57bf1a15b811bb6abc40ac7a44f26f5ad04e881f 100644 (file)
@@ -3,8 +3,8 @@
 
 #include <stddef.h>
 #include "src/util/c99_stdint.h"
+#include <algorithm>
 #include <map>
-#include <stack>
 #include <string>
 #include <vector>
 #include <queue>
@@ -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"
index 66dcc9f9e9270114191fcd72e1ddce75ef2ed586..1b1dc0f52f28433967b24611294f1a7f1218e6ec 100644 (file)
@@ -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;
index 9cc3639869ef50560349995808e005fe37f9b11d..c22c3dabd7afb88c0872751e550a9e218c98bc07 100644 (file)
@@ -6,8 +6,8 @@
 #include "src/dfa/tcmd.h"
 #include "src/regexp/tag.h"
 
-namespace re2c
-{
+
+namespace re2c {
 
 /* note [fallback tags]
  *
index 419ad38dce3fc28cb581fa4bf0b9c42c7eb778a0..472a77d30fbbc2601888fb4997915467f8683c8d 100644 (file)
@@ -5,8 +5,8 @@
 
 #include "src/dfa/dfa.h"
 
-namespace re2c
-{
+
+namespace re2c {
 
 /*
  * node [finding strongly connected components of DFA]
index 464da642bc646db639bdf895ff4aa3ed881942d2..34c1ec6ae687b2e9cb2fcb00bede226861fb839b 100644 (file)
@@ -1,18 +1,22 @@
 #include <stdlib.h>
 #include <string.h>
 #include <algorithm>
+#include <memory>
+#include <valarray>
+#include <vector>
 
 #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]
  *
index 1a42d37f7690fbd303a3386d9d7e51fd65416a80..c069af5f8979c63b7d4c9578d8437672915ebc11 100644 (file)
@@ -6,8 +6,8 @@
 #include "src/dfa/dfa.h"
 #include "src/dfa/tcmd.h"
 
-namespace re2c
-{
+
+namespace re2c {
 
 /*
  * note [DFA minimization: table filling algorithm]
index a370fd1193164f9174bb8eedf803dd5ef089e6ff..c14aebb43ec7a98874b121859fcf2467e96d5eb9 100644 (file)
@@ -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_info_t> tag_path_t;
index 8e9e225f6a837b19f83146a8ec15ebf9e9311d9f..7d559259aba4b717bee3a892999cecc86f929a92 100644 (file)
@@ -5,8 +5,8 @@
 #include "src/dfa/tagver_table.h"
 #include "src/util/hash32.h"
 
-namespace re2c
-{
+
+namespace re2c {
 
 struct eqtag_t
 {
index 8b392b388227539e1afce7d6aba404b136a1f760..243763efe0b02262db77e2602c883dbc8c462ce4 100644 (file)
@@ -9,8 +9,7 @@
 #include "src/util/lookup.h"
 
 
-namespace re2c
-{
+namespace re2c {
 
 static const size_t ZERO_TAGS = 0;
 
index 20385c92891c38085a3bbb57ad84a4f3f064a574..530c1c3c70b288d1152357a02515fb95e2aff3f9 100644 (file)
@@ -4,8 +4,8 @@
 #include "src/dfa/tcmd.h"
 #include "src/util/hash32.h"
 
-namespace re2c
-{
+
+namespace re2c {
 
 /* note [topological ordering of copy commands]
  *
index 159b8ac1fed212933d3f7bbc8a17bdb5615ffa85..816e82d41d3afa71314928aa126ca1c5e90a26ca 100644 (file)
@@ -9,8 +9,8 @@
 #include "src/util/lookup.h"
 #include "src/util/slab_allocator.h"
 
-namespace re2c
-{
+
+namespace re2c {
 
 struct tcmd_t
 {
index e33ababd804563b58eeffea26e797750adcccd71..f85eefd3f6466c32c87b4b38c3fa9ca577be7ccb 100644 (file)
@@ -3,6 +3,7 @@
 
 #include "src/util/c99_stdint.h"
 
+
 namespace re2c {
 
 // TODO: support non-ASCII encodings
index f35d36d0519032398401cbba786fb94ce7bb5cc9..8cb5b17b8a9b1339096b050626455b15e2fa7682 100644 (file)
@@ -1,5 +1,9 @@
+#include <stddef.h>
+#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"
 
 
index d16d1fd36b0988c9efeed91cd17abd6042fd45c8..27abcb607a531e855e316dac817d068c302105a2 100644 (file)
@@ -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);
 
index 94071bc8217ea7029e4df47e5fd9c0eb29098e39..d86a4986903b74553dcb8822babd067f4f13199a 100644 (file)
@@ -4,6 +4,7 @@
 #include "src/encoding/enc.h"
 #include "src/util/range.h"
 
+
 namespace re2c {
 
 const uint32_t Enc::SURR_MIN = 0xD800;
index 1318ce2fe4bfa32e18a480bf4a0397ef4b300b42..4e56c339fa7c3f3b7cf343fc224b5084475d6eec 100644 (file)
@@ -3,6 +3,7 @@
 
 #include "src/util/c99_stdint.h"
 
+
 namespace re2c {
 
 class Range;
index 9e63441cc7e68ddcb7bb314a4cd17d8222588cdc..915bdecb5a8727eb8faeffa094e220eabbdc0532 100644 (file)
@@ -1,4 +1,5 @@
 #include "src/encoding/range_suffix.h"
+#include "src/regexp/re.h"
 #include "src/util/range.h"
 
 
index bc2112db02197761978eafd8308ae9737a654f8c..5fea23691b7479cf27e871fcfe6b7152a3daa0b0 100644 (file)
@@ -1,15 +1,18 @@
 #ifndef _RE2C_RE_ENCODING_RANGE_SUFFIX_
 #define _RE2C_RE_ENCODING_RANGE_SUFFIX_
 
-#include <stddef.h> // NULL
+#include <stddef.h>
 #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<RangeSuffix *> freeList;
index b0b16588516d230769ba520cd1ee0e0bd691d0a8..4df86157690f4332f1fe580b89cdf32a9e6ece8d 100644 (file)
@@ -1,5 +1,6 @@
 #include "src/encoding/utf16/utf16.h"
 
+
 namespace re2c {
 
 const uint32_t utf16::MAX_1WORD_RUNE    = 0xFFFFu;
index b1238c058cd6dcdf93bfd70b70a6f47df8872863..f4a068906e7ab1081ecb820336c63eb535106227 100644 (file)
@@ -3,6 +3,7 @@
 
 #include "src/util/c99_stdint.h"
 
+
 namespace re2c {
 
 class utf16
index 0263b08374592ed15a71aeea6526f74a94324218..dbc7759fe236027f340f299e5e3cfee838c4658c 100644 (file)
@@ -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"
 
 
index 6dd99a1a3901152794266e4becdbcc61ce544516..44c05dd01bcf5009204af1580e6810d72e67465f 100644 (file)
@@ -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);
 
index b9906d99d0ff9cb2320e5bfbbb2722c4bf71d194..dfbe4286f974220c0a1eb3ecfab1a126e36db621 100644 (file)
@@ -1,5 +1,6 @@
 #include "src/encoding/utf8/utf8.h"
 
+
 namespace re2c {
 
 const uint32_t utf8::ERROR = 0xFFFDu;
index 1f593e2e41cc999f790e1f62890a6bef6d53be6b..42e490c3aa263480ee3af12aed30b9d7b312a023 100644 (file)
@@ -3,6 +3,7 @@
 
 #include "src/util/c99_stdint.h"
 
+
 namespace re2c {
 
 class utf8
index 47388b9963b27d3a467234eef5ea29b393b24377..8ba720dcd8bee7bceff7600cef5feeff22dc7df5 100644 (file)
@@ -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"
 
 
index 2a88dcc56576ffe6b558232c6a852ae9f2b92d4f..d89f7d88b0afc8b80ceda1a8374c5dafdeebf7c9 100644 (file)
@@ -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);
 
index be6ae61948e0ada648caf06160d560e738c750d3..d2d5b8feb3baa80cef8d9631a8f14012ae884a98 100644 (file)
@@ -1,9 +1,13 @@
-#include "src/parse/input.h"
-#include "src/parse/scanner.h"
+#include <stdio.h>
+
 #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;
 
index 044a5b389c7d239da1bfe4129d0ddf36f92c4344..6c6045c5510f754c0dcc0450b258825229fa2342 100644 (file)
@@ -1,12 +1,14 @@
 #include <stdarg.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <memory>
 #include <string>
 
 #include "config.h"
 #include "src/msg/msg.h"
 #include "src/msg/ver_to_vernum.h"
 
+
 extern const char *help; // autogenerated
 
 namespace re2c {
index 9cd7e0845ba3a62c2a441f9f15243469f55ad5f2..3905c8c5955e7181c0c6f94983c5c339a7cc77db 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef _RE2C_MSG_MSG_
 #define _RE2C_MSG_MSG_
 
+#include <stddef.h>
 #include "src/util/c99_stdint.h"
 #include <string>
 #include <vector>
index e573489ddf6337055a8ad245267fa6e7b5419d8f..dec2b38e6b901676a3e88998c7564d0b4d67170c 100644 (file)
@@ -3,6 +3,7 @@
 
 #include <string>
 
+
 namespace re2c {
 
 std::string ver_to_vernum(const char *ver);
index 0f4fa36f84d2fce3f41f3ef36e052b28ad9bd314..7d16701169c4856efc3d1661711b250523cadcbb 100644 (file)
@@ -1,9 +1,11 @@
+#include <stddef.h>
 #include "src/util/c99_stdint.h"
 #include <string>
 
 #include "config.h"
 #include "src/msg/ver_to_vernum.h"
 
+
 namespace re2c {
 
 std::string ver_to_vernum(const char *ver)
index 5634d92f8cbdd2bdd7520b5043f54c024673640d..174f54e3bd8a607ae11802c00d26dbf04dd08675 100644 (file)
@@ -3,13 +3,17 @@
 #include <algorithm>
 #include <set>
 
+#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;
index 90b60734d44a3fde480947d24d52dff091b32482..bfa06bc5d5a972a328445c66ad6f68cdd845e5c6 100644 (file)
@@ -6,11 +6,10 @@
 #include <string>
 #include <vector>
 
-#include "src/msg/location.h"
-#include "src/regexp/rule.h"
 
 namespace re2c {
 
+struct loc_t;
 class Msg;
 class path_t;
 struct Rule;
index 45109f5b71dafb3771e2e3c3fe0d7cb8e2c9b735..1ea66327cb439893715eed1963bc52007887d16d 100644 (file)
@@ -1,10 +1,11 @@
-
 #include <stddef.h>
 #include <vector>
 
+#include "src/debug/debug.h"
 #include "src/parse/ast.h"
 #include "src/regexp/re.h"
 
+
 namespace re2c {
 
 static size_t estimate(const RE *re)
index b06a6f27d7c96b61838ea306f3dcb134bd369668..9c16de4b1cf37ca87a43e3b55701ab3b73dc73a4 100644 (file)
@@ -12,8 +12,8 @@
 #include "src/regexp/tag.h"
 #include "src/util/forbid_copy.h"
 
-namespace re2c
-{
+
+namespace re2c {
 
 struct clos_t;
 
index cc84d6d58c7afb852c0b8a4ffb250ecfaaeefa09..ef512b5d9f4eaea5f923d5fe5e3d9ed548963286 100644 (file)
@@ -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 {
 
 /*
index 7dea858a2a573617ab648ba792cf51bcbc652cb6..a8e1743b32728621f4f036e21918822961d57dac 100644 (file)
@@ -1,7 +1,8 @@
+#include "src/msg/msg.h"
 #include "src/options/opt.h"
 
-namespace re2c
-{
+
+namespace re2c {
 
 void conopt_t::fix()
 {
index 1b1460132df9e1ee088b4d71ae731ae76ea4fb71..efc407f93f6018ae0281eb3f330c18dcb5d8c221 100644 (file)
@@ -4,6 +4,7 @@
 #include <stddef.h>
 #include "src/util/c99_stdint.h"
 #include <string>
+#include <vector>
 
 #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;
 
index e420536c7212b141f619d8f0944596ef71f0e692..f01c7d8e8fdab43b3100afe70ce33cd9465bd2c5 100644 (file)
@@ -1,11 +1,19 @@
+#include <stddef.h>
+#include <algorithm>
+#include <string>
+#include <vector>
+
 #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)
 {
index ab1be2ec02e91c27b2f5a440d2772b496a2ef2f8..ad9ba8479a0052185bbbbcd2fbe563767b664297 100644 (file)
@@ -3,8 +3,8 @@
 #include "src/parse/ast.h"
 #include "src/util/free_list.h"
 
-namespace re2c
-{
+
+namespace re2c {
 
 free_list<AST*> AST::flist;
 
index 36b979bc5ef0ce77dbdd5d57736be964621380de..a59fd43b653ff4fbbf37b877df2994a15b7515c3 100644 (file)
@@ -7,12 +7,9 @@
 #include <vector>
 
 #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 _Ty> class free_list;
index 60fb70c741053905f94d5621063440bcb0e9cae2..2b5a3f5534cc4553afc6a2c68ef6ea9081c3fe92 100644 (file)
@@ -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)
index f8d63fbcf5e25a641d57c7506d25d2af4adca009..010d9003f8306c75cd8cb7090b4ec417538cb882 100644 (file)
@@ -7,6 +7,7 @@
 #include "src/util/c99_stdint.h"
 #include "src/util/forbid_copy.h"
 
+
 namespace re2c {
 
 struct Input
index 518b891ccd5414bf284fe50b7a11a17c72b31458..7085078291b877f2c35cfe7759f524e3bcd178e6 100644 (file)
@@ -1,22 +1,29 @@
+#include <ctype.h>
 #include "src/util/c99_stdint.h"
-#include <stddef.h>
-#include <string.h>
 #include <algorithm>
 #include <limits>
 #include <string>
+#include <utility>
+#include <vector>
 
 #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 <stddef.h>
 #include <string.h>
 #include "src/util/forbid_copy.h"
 
index c9385033dd9cd58868822310f12642d7d3badcd6..e52ddcd6b51b162a0963911da7c689ddf453061c 100644 (file)
@@ -1,15 +1,18 @@
 #include "src/util/c99_stdint.h"
 #include <string>
 
-#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"); }
 
index bee4cc10473579817d2910feed2d9e77f32b83c3..a4c8699db8ecf4ca817bb63c6a84ecdfdc17c643 100644 (file)
@@ -4,6 +4,7 @@
 #include "src/parse/ast.h"
 #include "src/regexp/rule.h"
 
+
 namespace re2c {
 
 void normalize_ast(specs_t &specs)
index d6e2b40d4b0c2ba2a1eafb7c460bf6dbfdd5535c..45ea7c9c1ab26d7fcf7ef6976ce7566c4f36ccce 100644 (file)
@@ -8,8 +8,8 @@
 #include "src/parse/scanner.h"
 #include "src/options/opt.h"
 
-namespace re2c
-{
+
+namespace re2c {
 
 class Scanner;
 struct Opt;
index 54e6ca58d0831376e461d5fb32dc70238ea95c0c..a374326ce6014a7d853989f132824bb8e32b688a 100644 (file)
@@ -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)
 {
index 96da5691c4819d1f0b723f3e58acdbdae6432497..1d6e9efa493509f53661fcd9f0b01f3ec2a50cc1 100644 (file)
@@ -1,6 +1,10 @@
+#include <stdio.h>
+#include <algorithm>
 #include "src/util/c99_stdint.h"
 #include <limits>
 #include <string.h>
+
+#include "src/msg/msg.h"
 #include "src/parse/scanner.h"
 #include "src/debug/debug.h"
 
index 051e80adbcc3752953c91b276ce92b36c5aad94f..87bec434fee2882264336391633fffeda4712b5d 100644 (file)
@@ -3,28 +3,23 @@
 
 #include <stddef.h>
 #include "src/util/c99_stdint.h"
-#include <sys/types.h>
 #include <string>
 #include <vector>
 
+#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;
 
index 97161a4c129a07ab3f72ad55240f68e3502e9e2d..dea689b6b07d0a3b324859a4dd2cb350794880a7 100644 (file)
@@ -1,5 +1,6 @@
 #include "src/parse/unescape.h"
 
+
 namespace re2c {
 
 // expected characters: [0-9a-zA-Z]
index a37e6da8d37704d04766a259e6d1ff4a2fd9782d..eced9d431bf347c6a098436819393c1c1fa313a4 100644 (file)
@@ -3,6 +3,7 @@
 
 #include "src/util/c99_stdint.h"
 
+
 namespace re2c {
 
 uint32_t unesc_hex (const char * s, const char * s_end);
index 0e2fd2a49fde809c2b69ee29c55c7a3062d82b5d..2796bb85cd90ac9a81f2841fa5856dcd2ae647cc 100644 (file)
@@ -1,11 +1,16 @@
 #include "src/util/c99_stdint.h"
+#include <memory>
 #include <string>
 #include <vector>
 
+#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
index 113eae5a4ba6ac78c846cd1c938dd4bd281982c4..ac94630ef872950083d2285756e6d0bd8adcfdb7 100644 (file)
@@ -1,28 +1,34 @@
 #include <stddef.h>
 #include "src/util/c99_stdint.h"
 #include <algorithm>
+#include <memory>
 #include <set>
 #include <string>
 #include <utility>
 #include <valarray>
 #include <vector>
 
-#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.
index f622554183748b8b40b142c3a8f4933ab4c241f6..0370ea012bc1423db678264110755396191a9239 100644 (file)
@@ -1,7 +1,13 @@
 #include <stddef.h>
+#include <algorithm>
+#include <memory>
 #include <vector>
 
+#include "src/debug/debug.h"
+#include "src/options/opt.h"
 #include "src/regexp/re.h"
+#include "src/regexp/tag.h"
+
 
 namespace re2c {
 
index 14ef8aded5d0e1752e5cbc8684a795a1f79577c3..5f5dd3d0050c15ad4481ad4211118d49b7cc9a2f 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef _RE2C_RE_EMPTY_CLASS_POLICY_
 #define _RE2C_RE_EMPTY_CLASS_POLICY_
 
+
 namespace re2c {
 
 enum empty_class_policy_t
index 3ed8b5a67e6333e8cd4a11d74f8e0ee177ef3337..133546deb67ffee3273f583a18dc57918cd2f5ae 100644 (file)
@@ -6,6 +6,7 @@
 #include "src/regexp/re.h"
 #include "src/regexp/tag.h"
 
+
 namespace re2c {
 
 /* note [fixed and variable tags]
index 31a099b2e0452c2532820bcd22f6bed865b5dca0..8156b47efb1c76d3343d7cfe7168ed3f1b7f6275 100644 (file)
@@ -4,10 +4,12 @@
 #include <vector>
 
 #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)
index 3d1eeda1ecda09fde1cc2a16c095cce486ffb3cf..c1580c2bdcd1043a98f0a67d5fe25eb4c3ca4239 100644 (file)
@@ -10,8 +10,8 @@
 #include "src/util/range.h"
 #include "src/util/slab_allocator.h"
 
-namespace re2c
-{
+
+namespace re2c {
 
 struct RE
 {
index 87355cd2d72b7304c026f1acd3110b9ad3167ca4..ae1a3edb4e7c26a71828285895c2fa6e75813b12 100644 (file)
@@ -2,8 +2,8 @@
 
 #include "src/regexp/rule.h"
 
-namespace re2c
-{
+
+namespace re2c {
 
 free_list<Code*> Code::flist;
 
index 485420a219033755303df344f0e4f30c6b151c8d..e6006d32dd773853c147329e73c6cb76d113396a 100644 (file)
@@ -7,11 +7,10 @@
 #include <string>
 
 #include "src/msg/location.h"
-#include "src/regexp/tag.h"
 #include "src/util/free_list.h"
 
-namespace re2c
-{
+
+namespace re2c {
 
 struct Code
 {
index 3cfb31ee4b4952c72b6e2987c10cd1b64e18aef4..6b1a9c6a30bfef12e4250410a4b9e7ec7d80cfac 100644 (file)
@@ -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.
index 56d5e9b1a70a841f9187e01e4597936ade034e02..4bbecf4fb9a4487db345745fb7a16f5acf7e47ab 100644 (file)
@@ -1,8 +1,8 @@
 #include "src/regexp/tag.h"
 #include <limits>
 
-namespace re2c
-{
+
+namespace re2c {
 
 const size_t Tag::RIGHTMOST = std::numeric_limits<size_t>::max();
 const size_t Tag::VARDIST = std::numeric_limits<size_t>::max();
index afb709505a6c114f600afe1eb6e80dc3f63b9bf8..ae8df5a380be925c80c58a7dc69dae3842283478 100644 (file)
@@ -7,8 +7,8 @@
 #include <limits>
 #include <string>
 
-namespace re2c
-{
+
+namespace re2c {
 
 typedef int32_t tagver_t;
 
index d23cc6b4e61c303d4fa72cfeae2a9ce8f3bf2eee..b7a3f8cfcedad0f34112edbfbd94ec0aede92fe3 100644 (file)
@@ -1,18 +1,21 @@
 #include "src/util/c99_stdint.h"
 #include <stdio.h>
+#include <algorithm>
 #include <map>
+#include <memory>
 #include <utility>
 #include <valarray>
 #include <vector>
 
 #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.
index c4986e33f22e87511a85f633a5c4497d9df453ff..8862f3c1873450c79c0f3689eeeb81bbf9924da3 100644 (file)
@@ -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)
 {
index 0333ea555c072f5cabf17177783d18c0ffc8946f..fdff5d73a19c00269e02a16209d7ded11a5b68e0 100644 (file)
@@ -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]
index f0e42a8760268919f7d997406d5cafc0e672b279..5fbaec70b42f03119e6c0822ef7a6b39215811a0 100644 (file)
@@ -8,10 +8,11 @@
 #include <vector>
 
 #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<uint32_t>::max()
 static const uint32_t DIST_ERROR = std::numeric_limits<uint32_t>::max();
index 681e0e289229c89900e99637fc6439d77d4ee918..81730777ef8af2ad949299ca926e0416513babb2 100644 (file)
@@ -6,8 +6,8 @@
 
 #include "src/skeleton/skeleton.h"
 
-namespace re2c
-{
+
+namespace re2c {
 
 struct suffix_t
 {
index e7a6a1238f0221f74850f1008643fc973a623677..b59c209935adeb329758833debd7e02b0e8bdfc5 100644 (file)
@@ -4,8 +4,8 @@
 #include "src/dfa/dfa.h"
 #include "src/skeleton/skeleton.h"
 
-namespace re2c
-{
+
+namespace re2c {
 
 struct opt_t;
 struct tcmd_t;
index d723ba018f0b8d847f7ba765c4461bfa51f66bdd..e8191ee2f43919d8a66aed555578b173423576f0 100644 (file)
@@ -3,25 +3,23 @@
 
 #include "src/util/c99_stdint.h"
 #include <stdio.h>
+#include <algorithm>
 #include <limits>
 #include <map>
 #include <set>
 #include <string>
-#include <utility>
 #include <valarray>
 #include <vector>
 
-#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;
index d5821dc4371632608628a56919f8d8d1bc6185e4..cab65b008cb4872fce7b69f11398cd0851676409 100644 (file)
@@ -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)
index ba4acaa06c55d95cbdb8d2104bd9e5b81a21cc57..488dab1f00f9fdbfa86a0a64d81c45d40856918d 100644 (file)
@@ -3,6 +3,7 @@
 
 #include "src/util/s_to_n32_unsafe.h"
 
+
 namespace re2c_test {
 
 static const uint32_t DIGITS = 256;
index e4e8f56a1329ba8e9e3ca3cd92c0b3dce42b4b07..ac1300f4dca4cde3d72a629ff3c9f5bd12624c53 100644 (file)
@@ -2,6 +2,7 @@
 #include <string>
 #include "src/msg/ver_to_vernum.h" /* re2c::ver_to_vernum() */
 
+
 namespace re2c_test {
 
 struct examples_t {
index 47eaf887ba395b679e393d37b89919394e028373..a606e471e8bce2eb92a493598454ce0674a83a59 100644 (file)
@@ -3,6 +3,7 @@
 
 #include <stddef.h> // size_t
 
+
 namespace re2c {
 
 // useful fof allocation of arrays of POD objects
index c8e83389cc89d3ba63c59b1554c7ec1c21424fb8..a00dc0b2b1f5401f0dd7d97cd67ed5d56a238e3f 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef _RE2C_UTIL_COUNTER_
 #define _RE2C_UTIL_COUNTER_
 
+
 namespace re2c {
 
 template <typename num_t>
index f2ad1eacfd07718142d4ad871914e9e6b05498f9..eb609d30d6fb61d839d1bd91ce661d4ba7a8573c 100644 (file)
@@ -3,8 +3,8 @@
 
 #include <set>
 
-namespace re2c
-{
+
+namespace re2c {
 
 template<class _Ty>
 class free_list: protected std::set<_Ty>
index fa006e4fc76e811f9b35efb464ada4cb8ac1728d..90c742ae70863c3b7817818192d8e849ae682317 100644 (file)
@@ -1,5 +1,8 @@
+#include <stddef.h>
+
 #include "src/util/get_dir.h"
 
+
 namespace re2c {
 
 void get_dir(std::string &path)
index 063227fc15223d0e80d7f14c71ed0171b8966417..469788b62cfdedd8a6e1975b0b136d24eb090589 100644 (file)
@@ -3,6 +3,7 @@
 
 #include <string>
 
+
 namespace re2c {
 
 void get_dir(std::string &path);
index 2d57c8c0ad80beff9981fab0699bb72880d27ca5..235aa0696a3816d2fc46ac9a4cd447c9035e8af7 100644 (file)
@@ -4,8 +4,8 @@
 #include <stddef.h>
 #include "src/util/c99_stdint.h"
 
-namespace re2c
-{
+
+namespace re2c {
 
 static inline uint32_t hash4(uint32_t h, uint32_t k)
 {
index e93a57be797cdfc82eef85fd7f1cdff55ec1ba01..8bcf2d5b5dc26099b4550809ed781d6bbe01ea8e 100644 (file)
@@ -1,8 +1,8 @@
 #ifndef _RE2C_UTIL_LOCAL_INCREMENT_
 #define _RE2C_UTIL_LOCAL_INCREMENT_
 
-namespace re2c
-{
+
+namespace re2c {
 
 template <typename counter_t>
 struct local_increment_t
index 9d4c3b79735405eeab9c2f16dedef30e81835f14..69909d24aa8df0e12a7fe0e80d490716140cf770 100644 (file)
@@ -9,8 +9,8 @@
 
 #include "src/debug/debug.h"
 
-namespace re2c
-{
+
+namespace re2c {
 
 /*
  * O(1) random access
index 2b6d25a75236825dc93fa5e0a1e40345a6804dd9..674c2eb61bb44cb22e4653bc65077febb63448bc 100644 (file)
@@ -1,7 +1,7 @@
 #include "src/util/range.h"
 
-namespace re2c
-{
+
+namespace re2c {
 
 void RangeMgr::append_overlapping(Range *&head, Range *&tail, const Range *r)
 {
index 2d86440e3fc60d09c833644589305243df2b3c6b..218a444ad453e594762549c7edf064961d879578 100644 (file)
@@ -4,7 +4,6 @@
 #include <stddef.h> // 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"
index 6aaabe3749e5154bfb8c7a7fd6dad2e66194a66b..f9b060e09fce2716ec4c0471b98b81cfddf587ea 100644 (file)
@@ -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<int32_t> (i);
     return true;
 }
+
+} // namespace re2c
index 27c1e1cc3b56caa31a6c7391b454ebf1589b14e7..924850fc955bac47e15b17ac6b27a810f2394ffd 100644 (file)
@@ -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_
index d441857fe66661faa554ca944d4d7c060917e549..1c0eb2038041a272a80ecbb281de0410743f1c50 100644 (file)
@@ -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_
index b1b775b7834f8e72dce0a81f04af2aa96c21a74e..3d02e1e545cc7bfd73cbfdec09cd37272fda8865 100644 (file)
@@ -1,69 +1,56 @@
 #ifndef _RE2C_UTIL_SMART_PTR_
 #define _RE2C_UTIL_SMART_PTR_
 
-namespace re2c 
+
+namespace re2c {
+
+template <class T>
+class smart_ptr
 {
+private:
+    T* ptr;
+    long* count; // shared number of owners
 
-    template <class T>
-    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<T>& p) throw()
+        : ptr(p.ptr), count(p.count) { ++*count; }
 
-        smart_ptr (const smart_ptr<T>& p) throw()
-            : ptr(p.ptr), count(p.count) 
-        {
-            ++*count;
-        }
+    ~smart_ptr() { dispose(); }
 
-        ~smart_ptr ()
-        {
+    smart_ptr<T>& operator=(const smart_ptr<T>& p)
+    {
+        if (this != &p) {
             dispose();
+            ptr = p.ptr;
+            count = p.count;
+            ++*count;
         }
+        return *this;
+    }
 
-        smart_ptr<T>& operator= (const smart_ptr<T>& 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 <typename T>
-    smart_ptr<T> make_smart_ptr(T* p)
-    {
-        return smart_ptr<T>(p);
-    }
+template <typename T>
+smart_ptr<T> make_smart_ptr(T* p)
+{
+    return smart_ptr<T>(p);
 }
 
+} // namespace re2c
+
 #endif // _RE2C_UTIL_SMART_PTR_
index c2a1327dbb9efd81b3f756fc2ec9a08e7b956057..ee81ecf9654ccdc1d0a5f4fdc9cb8c0b481f53c0 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef _RE2C_UTIL_STATIC_ASSERT_
 #define _RE2C_UTIL_STATIC_ASSERT_
 
+
 namespace re2c {
 
 template<bool> struct static_assert_t;
index 8d8bff002fdb68191b1f1c2243b905cf9bcca721..d026663918fb51c449ee4219a05b9d5e7879f3de 100644 (file)
@@ -4,8 +4,8 @@
 #include <sstream>
 #include <string>
 
-namespace re2c
-{
+
+namespace re2c {
 
 template<typename type_t> void strrreplace(
     std::string &s,
index f9d03701a30dc5fe08d9c473275c8a46ff0d9190..df9757ac77535ddb02e26909b90f0694b3c3db32 100644 (file)
@@ -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_
index 2841c1b7d1f6c6d5eae13e7f376b271caa5dcfd7..91c5d4526914591dd092c051e01e21a0f4848a17 100644 (file)
@@ -3,6 +3,7 @@
 
 #include <vector>
 
+
 namespace re2c {
 
 // wrapper over std::vector
index bf58a86741cfe1b4ee89d77b0f30baccc41625d6..5c70bbf264e69a0f74ecce9eb67320ab10e27cfe 100644 (file)
@@ -1,8 +1,8 @@
 #ifndef _RE2C_UTIL_WRAP_ITER_
 #define _RE2C_UTIL_WRAP_ITER_
 
-namespace re2c
-{
+
+namespace re2c {
 
 // immutable containter
 template<typename container_t>