From 858b1c7b2a62cd69c9abc50994c38ba87ba9e3a7 Mon Sep 17 00:00:00 2001 From: Ulya Trofimovich Date: Sat, 4 Mar 2017 23:27:52 +0000 Subject: [PATCH] Restructured source files layout. --- re2c/Makefile.am | 230 ++++---- re2c/bootstrap/src/{parse => ast}/lex.cc | 504 +++++++++--------- re2c/bootstrap/src/{parse => ast}/lex_conf.cc | 504 +++++++++--------- re2c/bootstrap/src/{parse => ast}/parser.cc | 26 +- re2c/bootstrap/src/{parse => ast}/y.tab.h | 6 +- re2c/bootstrap/src/conf/parse_opts.cc | 8 +- re2c/src/{ir => }/adfa/action.h | 8 +- re2c/src/{ir => }/adfa/adfa.cc | 8 +- re2c/src/{ir => }/adfa/adfa.h | 18 +- re2c/src/{ir => }/adfa/dump.cc | 2 +- re2c/src/adfa/dump.h | 13 + re2c/src/{ir => }/adfa/prepare.cc | 8 +- re2c/src/{parse => ast}/extop.h | 6 +- re2c/src/{parse => ast}/input.cc | 2 +- re2c/src/{parse => ast}/input.h | 6 +- re2c/src/{parse => ast}/lex.re | 16 +- re2c/src/{parse => ast}/lex_conf.re | 6 +- re2c/src/{parse => ast}/parser.h | 12 +- re2c/src/{parse => ast}/parser.ypp | 20 +- re2c/src/{parse => ast}/regexp.cc | 2 +- re2c/src/{parse => ast}/regexp.h | 8 +- re2c/src/{parse => ast}/scanner.cc | 6 +- re2c/src/{parse => ast}/scanner.h | 8 +- re2c/src/{parse => ast}/unescape.cc | 2 +- re2c/src/{parse => ast}/unescape.h | 6 +- re2c/src/{codegen => code}/bitmap.cc | 6 +- re2c/src/{codegen => code}/bitmap.h | 6 +- re2c/src/{codegen => code}/emit.h | 10 +- re2c/src/{codegen => code}/emit_action.cc | 14 +- re2c/src/{codegen => code}/emit_dfa.cc | 18 +- re2c/src/{codegen => code}/go.h | 10 +- re2c/src/{codegen => code}/go_construct.cc | 6 +- re2c/src/{codegen => code}/go_destruct.cc | 2 +- re2c/src/{codegen => code}/go_emit.cc | 18 +- re2c/src/{codegen => code}/go_used_labels.cc | 6 +- re2c/src/{codegen => code}/input_api.cc | 4 +- re2c/src/{codegen => code}/input_api.h | 6 +- re2c/src/{codegen => code}/label.cc | 2 +- re2c/src/{codegen => code}/label.h | 6 +- re2c/src/{codegen => code}/output.cc | 6 +- re2c/src/{codegen => code}/output.h | 8 +- re2c/src/{codegen => code}/print.cc | 2 +- re2c/src/{codegen => code}/print.h | 6 +- re2c/src/{ir => }/compile.cc | 18 +- re2c/src/{ir => }/compile.h | 8 +- re2c/src/conf/opt.h | 8 +- re2c/src/conf/parse_opts.re | 6 +- re2c/src/conf/warn.cc | 4 +- re2c/src/conf/warn.h | 2 +- re2c/src/{ir => }/dfa/cfg/cfg.cc | 2 +- re2c/src/{ir => }/dfa/cfg/cfg.h | 8 +- re2c/src/{ir => }/dfa/cfg/compact.cc | 2 +- re2c/src/{ir => }/dfa/cfg/dce.cc | 2 +- re2c/src/dfa/cfg/dump.cc | 59 ++ re2c/src/{ir => }/dfa/cfg/interfere.cc | 2 +- re2c/src/{ir => }/dfa/cfg/liveanal.cc | 2 +- re2c/src/{ir => }/dfa/cfg/normalize.cc | 2 +- re2c/src/{ir => }/dfa/cfg/optimize.cc | 4 +- re2c/src/{ir => }/dfa/cfg/rename.cc | 2 +- re2c/src/{ir => }/dfa/cfg/varalloc.cc | 2 +- re2c/src/{ir => }/dfa/closure.cc | 4 +- re2c/src/{ir => }/dfa/closure.h | 12 +- re2c/src/{ir => }/dfa/dead_rules.cc | 2 +- re2c/src/{ir => }/dfa/determinization.cc | 12 +- re2c/src/{ir => }/dfa/dfa.h | 16 +- re2c/src/{ir => }/dfa/dump.cc | 2 +- re2c/src/{ir => }/dfa/dump.h | 10 +- re2c/src/{ir => }/dfa/fallback_tags.cc | 2 +- re2c/src/{ir => }/dfa/fillpoints.cc | 2 +- re2c/src/{ir => }/dfa/find_state.cc | 2 +- re2c/src/{ir => }/dfa/find_state.h | 10 +- re2c/src/{ir => }/dfa/minimization.cc | 2 +- re2c/src/{ir => }/dfa/tagpool.cc | 2 +- re2c/src/{ir => }/dfa/tagpool.h | 8 +- re2c/src/{ir => }/dfa/tagtree.cc | 2 +- re2c/src/{ir => }/dfa/tagtree.h | 8 +- re2c/src/ir/adfa/dump.h | 13 - re2c/src/ir/re/encoding/utf16/utf16_regexp.h | 16 - re2c/src/ir/re/encoding/utf8/utf8_regexp.h | 16 - re2c/src/main.cc | 8 +- re2c/src/{ir => }/nfa/dump.cc | 2 +- re2c/src/{ir => }/nfa/estimate_size.cc | 2 +- re2c/src/{ir => }/nfa/nfa.h | 14 +- re2c/src/{ir => }/nfa/re_to_nfa.cc | 2 +- re2c/src/{ir => }/re/ast_to_re.cc | 12 +- re2c/src/{ir => }/re/default_tags.cc | 2 +- re2c/src/{ir => }/re/empty_class_policy.h | 6 +- re2c/src/{ir => }/re/encoding/case.h | 6 +- re2c/src/{ir => }/re/encoding/enc.cc | 2 +- re2c/src/{ir => }/re/encoding/enc.h | 6 +- re2c/src/{ir => }/re/encoding/range_suffix.cc | 2 +- re2c/src/{ir => }/re/encoding/range_suffix.h | 8 +- re2c/src/{ir => }/re/encoding/utf16/utf16.cc | 2 +- re2c/src/{ir => }/re/encoding/utf16/utf16.h | 6 +- .../{ir => }/re/encoding/utf16/utf16_range.cc | 4 +- .../{ir => }/re/encoding/utf16/utf16_range.h | 8 +- .../re/encoding/utf16/utf16_regexp.cc | 6 +- re2c/src/re/encoding/utf16/utf16_regexp.h | 16 + re2c/src/{ir => }/re/encoding/utf8/utf8.cc | 2 +- re2c/src/{ir => }/re/encoding/utf8/utf8.h | 6 +- .../{ir => }/re/encoding/utf8/utf8_range.cc | 4 +- .../{ir => }/re/encoding/utf8/utf8_range.h | 8 +- .../{ir => }/re/encoding/utf8/utf8_regexp.cc | 6 +- re2c/src/re/encoding/utf8/utf8_regexp.h | 16 + re2c/src/{ir => }/re/fixed_tags.cc | 2 +- re2c/src/{ir => }/re/nullable.cc | 2 +- re2c/src/{ir => }/re/re.h | 10 +- re2c/src/{ir => }/re/split_charset.cc | 2 +- re2c/src/{ir => }/rule.cc | 2 +- re2c/src/{ir => }/rule.h | 8 +- re2c/src/{ir => }/skeleton/control_flow.cc | 4 +- re2c/src/{ir => }/skeleton/generate_code.cc | 12 +- re2c/src/{ir => }/skeleton/generate_data.cc | 6 +- re2c/src/{ir => }/skeleton/maxpath.cc | 2 +- re2c/src/{ir => }/skeleton/path.h | 8 +- re2c/src/{ir => }/skeleton/skeleton.cc | 6 +- re2c/src/{ir => }/skeleton/skeleton.h | 12 +- re2c/src/{ir => }/tag.cc | 2 +- re2c/src/{ir => }/tag.h | 6 +- re2c/src/{ir => }/tcmd.cc | 2 +- re2c/src/{ir => }/tcmd.h | 8 +- 121 files changed, 1077 insertions(+), 1018 deletions(-) rename re2c/bootstrap/src/{parse => ast}/lex.cc (88%) rename re2c/bootstrap/src/{parse => ast}/lex_conf.cc (89%) rename re2c/bootstrap/src/{parse => ast}/parser.cc (99%) rename re2c/bootstrap/src/{parse => ast}/y.tab.h (93%) rename re2c/src/{ir => }/adfa/action.h (92%) rename re2c/src/{ir => }/adfa/adfa.cc (96%) rename re2c/src/{ir => }/adfa/adfa.h (88%) rename re2c/src/{ir => }/adfa/dump.cc (98%) create mode 100644 re2c/src/adfa/dump.h rename re2c/src/{ir => }/adfa/prepare.cc (98%) rename re2c/src/{parse => ast}/extop.h (60%) rename re2c/src/{parse => ast}/input.cc (92%) rename re2c/src/{parse => ast}/input.h (74%) rename re2c/src/{parse => ast}/lex.re (98%) rename re2c/src/{parse => ast}/lex_conf.re (99%) rename re2c/src/{parse => ast}/parser.h (78%) rename re2c/src/{parse => ast}/parser.ypp (96%) rename re2c/src/{parse => ast}/regexp.cc (94%) rename re2c/src/{parse => ast}/regexp.h (96%) rename re2c/src/{parse => ast}/scanner.cc (97%) rename re2c/src/{parse => ast}/scanner.h (96%) rename re2c/src/{parse => ast}/unescape.cc (97%) rename re2c/src/{parse => ast}/unescape.h (67%) rename re2c/src/{codegen => code}/bitmap.cc (96%) rename re2c/src/{codegen => code}/bitmap.h (88%) rename re2c/src/{codegen => code}/emit.h (86%) rename re2c/src/{codegen => code}/emit_action.cc (98%) rename re2c/src/{codegen => code}/emit_dfa.cc (95%) rename re2c/src/{codegen => code}/go.h (96%) rename re2c/src/{codegen => code}/go_construct.cc (98%) rename re2c/src/{codegen => code}/go_destruct.cc (97%) rename re2c/src/{codegen => code}/go_emit.cc (95%) rename re2c/src/{codegen => code}/go_used_labels.cc (95%) rename re2c/src/{codegen => code}/input_api.cc (98%) rename re2c/src/{codegen => code}/input_api.h (92%) rename re2c/src/{codegen => code}/label.cc (94%) rename re2c/src/{codegen => code}/label.h (88%) rename re2c/src/{codegen => code}/output.cc (99%) rename re2c/src/{codegen => code}/output.h (97%) rename re2c/src/{codegen => code}/print.cc (98%) rename re2c/src/{codegen => code}/print.h (81%) rename re2c/src/{ir => }/compile.cc (89%) rename re2c/src/{ir => }/compile.h (51%) rename re2c/src/{ir => }/dfa/cfg/cfg.cc (99%) rename re2c/src/{ir => }/dfa/cfg/cfg.h (87%) rename re2c/src/{ir => }/dfa/cfg/compact.cc (96%) rename re2c/src/{ir => }/dfa/cfg/dce.cc (94%) create mode 100644 re2c/src/dfa/cfg/dump.cc rename re2c/src/{ir => }/dfa/cfg/interfere.cc (98%) rename re2c/src/{ir => }/dfa/cfg/liveanal.cc (99%) rename re2c/src/{ir => }/dfa/cfg/normalize.cc (97%) rename re2c/src/{ir => }/dfa/cfg/optimize.cc (97%) rename re2c/src/{ir => }/dfa/cfg/rename.cc (96%) rename re2c/src/{ir => }/dfa/cfg/varalloc.cc (98%) rename re2c/src/{ir => }/dfa/closure.cc (99%) rename re2c/src/{ir => }/dfa/closure.h (80%) rename re2c/src/{ir => }/dfa/dead_rules.cc (99%) rename re2c/src/{ir => }/dfa/determinization.cc (95%) rename re2c/src/{ir => }/dfa/dfa.h (86%) rename re2c/src/{ir => }/dfa/dump.cc (99%) rename re2c/src/{ir => }/dfa/dump.h (82%) rename re2c/src/{ir => }/dfa/fallback_tags.cc (99%) rename re2c/src/{ir => }/dfa/fillpoints.cc (99%) rename re2c/src/{ir => }/dfa/find_state.cc (99%) rename re2c/src/{ir => }/dfa/find_state.h (90%) rename re2c/src/{ir => }/dfa/minimization.cc (99%) rename re2c/src/{ir => }/dfa/tagpool.cc (97%) rename re2c/src/{ir => }/dfa/tagpool.h (84%) rename re2c/src/{ir => }/dfa/tagtree.cc (97%) rename re2c/src/{ir => }/dfa/tagtree.h (88%) delete mode 100644 re2c/src/ir/adfa/dump.h delete mode 100644 re2c/src/ir/re/encoding/utf16/utf16_regexp.h delete mode 100644 re2c/src/ir/re/encoding/utf8/utf8_regexp.h rename re2c/src/{ir => }/nfa/dump.cc (98%) rename re2c/src/{ir => }/nfa/estimate_size.cc (96%) rename re2c/src/{ir => }/nfa/nfa.h (88%) rename re2c/src/{ir => }/nfa/re_to_nfa.cc (99%) rename re2c/src/{ir => }/re/ast_to_re.cc (96%) rename re2c/src/{ir => }/re/default_tags.cc (97%) rename re2c/src/{ir => }/re/empty_class_policy.h (64%) rename re2c/src/{ir => }/re/encoding/case.h (80%) rename re2c/src/{ir => }/re/encoding/enc.cc (99%) rename re2c/src/{ir => }/re/encoding/enc.h (97%) rename re2c/src/{ir => }/re/encoding/range_suffix.cc (93%) rename re2c/src/{ir => }/re/encoding/range_suffix.h (76%) rename re2c/src/{ir => }/re/encoding/utf16/utf16.cc (84%) rename re2c/src/{ir => }/re/encoding/utf16/utf16.h (83%) rename re2c/src/{ir => }/re/encoding/utf16/utf16_range.cc (97%) rename re2c/src/{ir => }/re/encoding/utf16/utf16_range.h (73%) rename re2c/src/{ir => }/re/encoding/utf16/utf16_regexp.cc (85%) create mode 100644 re2c/src/re/encoding/utf16/utf16_regexp.h rename re2c/src/{ir => }/re/encoding/utf8/utf8.cc (98%) rename re2c/src/{ir => }/re/encoding/utf8/utf8.h (89%) rename re2c/src/{ir => }/re/encoding/utf8/utf8_range.cc (97%) rename re2c/src/{ir => }/re/encoding/utf8/utf8_range.h (67%) rename re2c/src/{ir => }/re/encoding/utf8/utf8_regexp.cc (86%) create mode 100644 re2c/src/re/encoding/utf8/utf8_regexp.h rename re2c/src/{ir => }/re/fixed_tags.cc (99%) rename re2c/src/{ir => }/re/nullable.cc (97%) rename re2c/src/{ir => }/re/re.h (94%) rename re2c/src/{ir => }/re/split_charset.cc (98%) rename re2c/src/{ir => }/rule.cc (85%) rename re2c/src/{ir => }/rule.h (91%) rename re2c/src/{ir => }/skeleton/control_flow.cc (97%) rename re2c/src/{ir => }/skeleton/generate_code.cc (98%) rename re2c/src/{ir => }/skeleton/generate_data.cc (99%) rename re2c/src/{ir => }/skeleton/maxpath.cc (97%) rename re2c/src/{ir => }/skeleton/path.h (89%) rename re2c/src/{ir => }/skeleton/skeleton.cc (95%) rename re2c/src/{ir => }/skeleton/skeleton.h (93%) rename re2c/src/{ir => }/tag.cc (88%) rename re2c/src/{ir => }/tag.h (95%) rename re2c/src/{ir => }/tcmd.cc (99%) rename re2c/src/{ir => }/tcmd.h (94%) diff --git a/re2c/Makefile.am b/re2c/Makefile.am index 0d1ca327..c5a3f1f9 100644 --- a/re2c/Makefile.am +++ b/re2c/Makefile.am @@ -9,51 +9,51 @@ RE2C = re2c$(EXEEXT) # sources SRC_HDR = \ - src/codegen/bitmap.h \ - src/codegen/emit.h \ - src/codegen/go.h \ - src/codegen/input_api.h \ - src/codegen/label.h \ - src/codegen/output.h \ - src/codegen/print.h \ + src/code/bitmap.h \ + src/code/emit.h \ + src/code/go.h \ + src/code/input_api.h \ + src/code/label.h \ + src/code/output.h \ + src/code/print.h \ src/conf/msg.h \ src/conf/opt.h \ src/conf/warn.h \ - src/ir/adfa/action.h \ - src/ir/adfa/adfa.h \ - src/ir/adfa/dump.h \ - src/ir/dfa/cfg/cfg.h \ - src/ir/dfa/closure.h \ - src/ir/dfa/dfa.h \ - src/ir/dfa/dump.h \ - src/ir/dfa/find_state.h \ - src/ir/dfa/tagpool.h \ - src/ir/dfa/tagtree.h \ - src/ir/nfa/nfa.h \ - src/ir/re/encoding/case.h \ - src/ir/re/encoding/enc.h \ - src/ir/re/encoding/range_suffix.h \ - src/ir/re/encoding/utf8/utf8.h \ - src/ir/re/encoding/utf8/utf8_regexp.h \ - src/ir/re/encoding/utf8/utf8_range.h \ - src/ir/re/encoding/utf16/utf16_range.h \ - src/ir/re/encoding/utf16/utf16_regexp.h \ - src/ir/re/encoding/utf16/utf16.h \ - src/ir/re/empty_class_policy.h \ - src/ir/re/re.h \ - src/ir/compile.h \ - src/ir/rule.h \ - src/ir/tag.h \ - src/ir/tcmd.h \ - src/ir/skeleton/path.h \ - src/ir/skeleton/skeleton.h \ - src/parse/extop.h \ - src/parse/input.h \ - src/parse/parser.h \ - src/parse/regexp.h \ - src/parse/rules.h \ - src/parse/scanner.h \ - src/parse/unescape.h \ + src/adfa/action.h \ + src/adfa/adfa.h \ + src/adfa/dump.h \ + src/dfa/cfg/cfg.h \ + src/dfa/closure.h \ + src/dfa/dfa.h \ + src/dfa/dump.h \ + src/dfa/find_state.h \ + src/dfa/tagpool.h \ + src/dfa/tagtree.h \ + src/nfa/nfa.h \ + src/re/encoding/case.h \ + src/re/encoding/enc.h \ + src/re/encoding/range_suffix.h \ + src/re/encoding/utf8/utf8.h \ + src/re/encoding/utf8/utf8_regexp.h \ + src/re/encoding/utf8/utf8_range.h \ + src/re/encoding/utf16/utf16_range.h \ + src/re/encoding/utf16/utf16_regexp.h \ + src/re/encoding/utf16/utf16.h \ + src/re/empty_class_policy.h \ + src/re/re.h \ + src/compile.h \ + src/rule.h \ + src/tag.h \ + src/tcmd.h \ + src/skeleton/path.h \ + src/skeleton/skeleton.h \ + src/ast/extop.h \ + src/ast/input.h \ + src/ast/parser.h \ + src/ast/regexp.h \ + src/ast/rules.h \ + src/ast/scanner.h \ + src/ast/unescape.h \ src/util/allocate.h \ src/util/attribute.h \ src/util/c99_stdint.h \ @@ -73,72 +73,72 @@ SRC_HDR = \ src/util/uniq_vector.h \ src/util/wrap_iter.h SRC = \ - src/codegen/bitmap.cc \ - src/codegen/emit_action.cc \ - src/codegen/emit_dfa.cc \ - src/codegen/label.cc \ - 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/output.cc \ - src/codegen/print.cc \ + src/code/bitmap.cc \ + src/code/emit_action.cc \ + src/code/emit_dfa.cc \ + src/code/label.cc \ + src/code/go_construct.cc \ + src/code/go_destruct.cc \ + src/code/go_emit.cc \ + src/code/go_used_labels.cc \ + src/code/input_api.cc \ + src/code/output.cc \ + src/code/print.cc \ src/conf/msg.cc \ src/conf/opt.cc \ src/conf/warn.cc \ - src/ir/nfa/dump.cc \ - src/ir/nfa/estimate_size.cc \ - src/ir/nfa/re_to_nfa.cc \ - src/ir/adfa/adfa.cc \ - src/ir/adfa/dump.cc \ - src/ir/adfa/prepare.cc \ - src/ir/dfa/cfg/cfg.cc \ - src/ir/dfa/cfg/compact.cc \ - src/ir/dfa/cfg/dce.cc \ - src/ir/dfa/cfg/interfere.cc \ - src/ir/dfa/cfg/liveanal.cc \ - src/ir/dfa/cfg/normalize.cc \ - src/ir/dfa/cfg/optimize.cc \ - src/ir/dfa/cfg/rename.cc \ - src/ir/dfa/cfg/varalloc.cc \ - src/ir/dfa/closure.cc \ - src/ir/dfa/dead_rules.cc \ - src/ir/dfa/determinization.cc \ - src/ir/dfa/dump.cc \ - src/ir/dfa/fallback_tags.cc \ - src/ir/dfa/fillpoints.cc \ - src/ir/dfa/find_state.cc \ - src/ir/dfa/minimization.cc \ - src/ir/dfa/tagpool.cc \ - src/ir/dfa/tagtree.cc \ - src/ir/re/encoding/enc.cc \ - src/ir/re/encoding/range_suffix.cc \ - src/ir/re/encoding/utf8/utf8_regexp.cc \ - src/ir/re/encoding/utf8/utf8_range.cc \ - src/ir/re/encoding/utf8/utf8.cc \ - src/ir/re/encoding/utf16/utf16_regexp.cc \ - src/ir/re/encoding/utf16/utf16.cc \ - src/ir/re/encoding/utf16/utf16_range.cc \ - src/ir/re/ast_to_re.cc \ - src/ir/re/default_tags.cc \ - src/ir/re/fixed_tags.cc \ - src/ir/re/nullable.cc \ - src/ir/re/split_charset.cc \ - src/ir/compile.cc \ - src/ir/rule.cc \ - src/ir/skeleton/control_flow.cc \ - src/ir/skeleton/generate_code.cc \ - src/ir/skeleton/generate_data.cc \ - src/ir/skeleton/maxpath.cc \ - src/ir/skeleton/skeleton.cc \ - src/ir/tag.cc \ - src/ir/tcmd.cc \ + src/nfa/dump.cc \ + src/nfa/estimate_size.cc \ + src/nfa/re_to_nfa.cc \ + src/adfa/adfa.cc \ + src/adfa/dump.cc \ + src/adfa/prepare.cc \ + src/dfa/cfg/cfg.cc \ + src/dfa/cfg/compact.cc \ + src/dfa/cfg/dce.cc \ + src/dfa/cfg/interfere.cc \ + src/dfa/cfg/liveanal.cc \ + src/dfa/cfg/normalize.cc \ + src/dfa/cfg/optimize.cc \ + src/dfa/cfg/rename.cc \ + src/dfa/cfg/varalloc.cc \ + src/dfa/closure.cc \ + src/dfa/dead_rules.cc \ + src/dfa/determinization.cc \ + src/dfa/dump.cc \ + src/dfa/fallback_tags.cc \ + src/dfa/fillpoints.cc \ + src/dfa/find_state.cc \ + src/dfa/minimization.cc \ + src/dfa/tagpool.cc \ + src/dfa/tagtree.cc \ + src/re/encoding/enc.cc \ + src/re/encoding/range_suffix.cc \ + src/re/encoding/utf8/utf8_regexp.cc \ + src/re/encoding/utf8/utf8_range.cc \ + src/re/encoding/utf8/utf8.cc \ + src/re/encoding/utf16/utf16_regexp.cc \ + src/re/encoding/utf16/utf16.cc \ + src/re/encoding/utf16/utf16_range.cc \ + src/re/ast_to_re.cc \ + src/re/default_tags.cc \ + src/re/fixed_tags.cc \ + src/re/nullable.cc \ + src/re/split_charset.cc \ + src/compile.cc \ + src/rule.cc \ + src/skeleton/control_flow.cc \ + src/skeleton/generate_code.cc \ + src/skeleton/generate_data.cc \ + src/skeleton/maxpath.cc \ + src/skeleton/skeleton.cc \ + src/tag.cc \ + src/tcmd.cc \ src/main.cc \ - src/parse/input.cc \ - src/parse/regexp.cc \ - src/parse/scanner.cc \ - src/parse/unescape.cc \ + src/ast/input.cc \ + src/ast/regexp.cc \ + src/ast/scanner.cc \ + src/ast/unescape.cc \ src/util/s_to_n32_unsafe.cc \ src/util/range.cc re2c_SOURCES = \ @@ -146,11 +146,11 @@ re2c_SOURCES = \ $(SRC) # autogenerated sources -AUTOGEN_LEX = src/parse/lex.cc -AUTOGEN_LEX_CONF = src/parse/lex_conf.cc +AUTOGEN_LEX = src/ast/lex.cc +AUTOGEN_LEX_CONF = src/ast/lex_conf.cc AUTOGEN_PARSEOPT = src/conf/parse_opts.cc -AUTOGEN_PARSER = src/parse/parser.cc -AUTOGEN_PARSER_HDR = src/parse/y.tab.h +AUTOGEN_PARSER = src/ast/parser.cc +AUTOGEN_PARSER_HDR = src/ast/y.tab.h AUTOGEN = \ $(AUTOGEN_LEX) \ $(AUTOGEN_LEX_CONF) \ @@ -160,11 +160,11 @@ AUTOGEN = \ nodist_re2c_SOURCES = $(AUTOGEN) # bootstrap sources -BOOTSTRAP_LEX = bootstrap/src/parse/lex.cc -BOOTSTRAP_LEX_CONF = bootstrap/src/parse/lex_conf.cc +BOOTSTRAP_LEX = bootstrap/src/ast/lex.cc +BOOTSTRAP_LEX_CONF = bootstrap/src/ast/lex_conf.cc BOOTSTRAP_PARSEOPT = bootstrap/src/conf/parse_opts.cc -BOOTSTRAP_PARSER = bootstrap/src/parse/parser.cc -BOOTSTRAP_PARSER_HDR = bootstrap/src/parse/y.tab.h +BOOTSTRAP_PARSER = bootstrap/src/ast/parser.cc +BOOTSTRAP_PARSER_HDR = bootstrap/src/ast/y.tab.h BOOTSTRAP_DOC = bootstrap/doc/re2c.1 BOOTSTRAP = \ $(BOOTSTRAP_LEX) \ @@ -175,10 +175,10 @@ BOOTSTRAP = \ $(BOOTSTRAP_PARSEOPT) # custom sources -CUSTOM_LEX = src/parse/lex.re -CUSTOM_LEX_CONF = src/parse/lex_conf.re +CUSTOM_LEX = src/ast/lex.re +CUSTOM_LEX_CONF = src/ast/lex_conf.re CUSTOM_PARSEOPT = src/conf/parse_opts.re -CUSTOM_PARSER = src/parse/parser.ypp +CUSTOM_PARSER = src/ast/parser.ypp CUSTOM = \ $(CUSTOM_LEX) \ $(CUSTOM_LEX_CONF) \ diff --git a/re2c/bootstrap/src/parse/lex.cc b/re2c/bootstrap/src/ast/lex.cc similarity index 88% rename from re2c/bootstrap/src/parse/lex.cc rename to re2c/bootstrap/src/ast/lex.cc index 65d7e4db..40e92461 100644 --- a/re2c/bootstrap/src/parse/lex.cc +++ b/re2c/bootstrap/src/ast/lex.cc @@ -1,5 +1,5 @@ -/* Generated by re2c 0.16 on Sat Mar 4 19:02:13 2017 */ -#line 1 "../src/parse/lex.re" +/* Generated by re2c 0.16 on Sat Mar 4 23:19:37 2017 */ +#line 1 "../src/ast/lex.re" #include "src/util/c99_stdint.h" #include #include @@ -7,14 +7,14 @@ #include #include -#include "src/codegen/output.h" -#include "src/ir/re/encoding/enc.h" -#include "src/parse/extop.h" -#include "src/parse/input.h" -#include "src/parse/regexp.h" -#include "src/parse/scanner.h" -#include "src/parse/parser.h" // needed by "y.tab.h" -#include "src/parse/unescape.h" +#include "src/code/output.h" +#include "src/re/encoding/enc.h" +#include "src/ast/extop.h" +#include "src/ast/input.h" +#include "src/ast/regexp.h" +#include "src/ast/scanner.h" +#include "src/ast/parser.h" // needed by "y.tab.h" +#include "src/ast/unescape.h" #include "src/util/range.h" #include "src/util/s_to_n32_unsafe.h" #include "y.tab.h" @@ -34,10 +34,10 @@ namespace re2c // source code is in ASCII: pointers have type 'char *' // but re2c makes an implicit assumption that YYCTYPE is unsigned // when it generates comparisons -#line 37 "../src/parse/lex.re" +#line 37 "../src/ast/lex.re" -#line 58 "../src/parse/lex.re" +#line 58 "../src/ast/lex.re" Scanner::ParseMode Scanner::echo() @@ -52,7 +52,7 @@ echo: const char *start = cur; -#line 56 "src/parse/lex.cc" +#line 56 "src/ast/lex.cc" { YYCTYPE yych; unsigned int yyaccept = 0; @@ -110,7 +110,7 @@ echo: } } ++YYCURSOR; -#line 149 "../src/parse/lex.re" +#line 149 "../src/ast/lex.re" { if (cur == eof) { if (opts->target == opt_t::CODE) { @@ -120,13 +120,13 @@ echo: } goto echo; } -#line 124 "src/parse/lex.cc" +#line 124 "src/ast/lex.cc" yy4: ++YYCURSOR; yy5: -#line 170 "../src/parse/lex.re" +#line 170 "../src/ast/lex.re" { goto echo; } -#line 130 "src/parse/lex.cc" +#line 130 "src/ast/lex.cc" yy6: yyaccept = 0; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); @@ -135,13 +135,13 @@ yy6: } if (yych == '#') goto yy14; yy7: -#line 164 "../src/parse/lex.re" +#line 164 "../src/ast/lex.re" { cline++; pos = cur; goto echo; } -#line 145 "src/parse/lex.cc" +#line 145 "src/ast/lex.cc" yy8: yych = (YYCTYPE)*++YYCURSOR; if (yych == '\n') goto yy6; @@ -184,7 +184,7 @@ yy14: } yy16: ++YYCURSOR; -#line 72 "../src/parse/lex.re" +#line 72 "../src/ast/lex.re" { if (opts->rFlag) { fatal("found standard 're2c' block while using -r flag"); @@ -194,7 +194,7 @@ yy16: } return Parse; } -#line 198 "src/parse/lex.cc" +#line 198 "src/ast/lex.cc" yy18: yych = (YYCTYPE)*++YYCURSOR; if (yych == '!') goto yy20; @@ -422,12 +422,12 @@ yy64: yy66: ++YYCURSOR; YYCURSOR = YYCTXMARKER; -#line 159 "../src/parse/lex.re" +#line 159 "../src/ast/lex.re" { set_sourceline(); goto echo; } -#line 431 "src/parse/lex.cc" +#line 431 "src/ast/lex.cc" yy68: yych = (YYCTYPE)*++YYCURSOR; if (yych == '\n') goto yy66; @@ -519,7 +519,7 @@ yy88: goto yy13; yy89: ++YYCURSOR; -#line 112 "../src/parse/lex.re" +#line 112 "../src/ast/lex.re" { if (opts->target == opt_t::CODE) { out.wraw(tok, start) @@ -528,7 +528,7 @@ yy89: lex_end_of_comment(); goto echo; } -#line 532 "src/parse/lex.cc" +#line 532 "src/ast/lex.cc" yy91: yych = (YYCTYPE)*++YYCURSOR; if (yych == '2') goto yy98; @@ -543,7 +543,7 @@ yy93: goto yy13; yy94: ++YYCURSOR; -#line 93 "../src/parse/lex.re" +#line 93 "../src/ast/lex.re" { if (!opts->rFlag) { fatal("found 'use:re2c' block without -r flag"); @@ -554,7 +554,7 @@ yy94: reuse(); return Reuse; } -#line 558 "src/parse/lex.cc" +#line 558 "src/ast/lex.cc" yy96: yych = (YYCTYPE)*++YYCURSOR; if (yych == 'r') goto yy102; @@ -569,7 +569,7 @@ yy98: goto yy13; yy99: ++YYCURSOR; -#line 141 "../src/parse/lex.re" +#line 141 "../src/ast/lex.re" { if (opts->target == opt_t::CODE) { out.wraw(tok, start); @@ -577,7 +577,7 @@ yy99: lex_tags(); goto echo; } -#line 581 "src/parse/lex.cc" +#line 581 "src/ast/lex.cc" yy101: yych = (YYCTYPE)*++YYCURSOR; if (yych == 'c') goto yy106; @@ -592,7 +592,7 @@ yy103: goto yy13; yy104: ++YYCURSOR; -#line 82 "../src/parse/lex.re" +#line 82 "../src/ast/lex.re" { if (!opts->rFlag) { fatal("found 'rules:re2c' block without -r flag"); @@ -603,10 +603,10 @@ yy104: opts.reset_mapCodeName (); return Rules; } -#line 607 "src/parse/lex.cc" +#line 607 "src/ast/lex.cc" yy106: ++YYCURSOR; -#line 130 "../src/parse/lex.re" +#line 130 "../src/ast/lex.re" { if (opts->target == opt_t::CODE) { out.wraw(tok, start) @@ -617,14 +617,14 @@ yy106: lex_end_of_comment(); goto echo; } -#line 621 "src/parse/lex.cc" +#line 621 "src/ast/lex.cc" yy108: yych = (YYCTYPE)*++YYCURSOR; if (yych == '2') goto yy111; goto yy13; yy109: ++YYCURSOR; -#line 104 "../src/parse/lex.re" +#line 104 "../src/ast/lex.re" { if (opts->target == opt_t::CODE) { out.wraw(tok, start); @@ -632,12 +632,12 @@ yy109: lex_end_of_comment(); goto echo; } -#line 636 "src/parse/lex.cc" +#line 636 "src/ast/lex.cc" yy111: yych = (YYCTYPE)*++YYCURSOR; if (yych != 'c') goto yy13; ++YYCURSOR; -#line 121 "../src/parse/lex.re" +#line 121 "../src/ast/lex.re" { if (opts->target == opt_t::CODE) { out.wraw(tok, start) @@ -646,9 +646,9 @@ yy111: lex_end_of_comment(); goto echo; } -#line 650 "src/parse/lex.cc" +#line 650 "src/ast/lex.cc" } -#line 171 "../src/parse/lex.re" +#line 171 "../src/ast/lex.re" } @@ -656,7 +656,7 @@ void Scanner::lex_end_of_comment() { uint32_t ignored = 0; for (;;) { -#line 660 "src/parse/lex.cc" +#line 660 "src/ast/lex.cc" { YYCTYPE yych; if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); @@ -672,20 +672,20 @@ void Scanner::lex_end_of_comment() } yy116: ++YYCURSOR; -#line 178 "../src/parse/lex.re" +#line 178 "../src/ast/lex.re" { fatal("expected end of block"); } -#line 678 "src/parse/lex.cc" +#line 678 "src/ast/lex.cc" yy118: ++YYCURSOR; yy119: -#line 180 "../src/parse/lex.re" +#line 180 "../src/ast/lex.re" { continue; } -#line 684 "src/parse/lex.cc" +#line 684 "src/ast/lex.cc" yy120: ++YYCURSOR; -#line 181 "../src/parse/lex.re" +#line 181 "../src/ast/lex.re" { ++ignored; continue; } -#line 689 "src/parse/lex.cc" +#line 689 "src/ast/lex.cc" yy122: yych = (YYCTYPE)*++YYCURSOR; if (yych == '\n') goto yy120; @@ -694,7 +694,7 @@ yy123: yych = (YYCTYPE)*++YYCURSOR; if (yych != '/') goto yy119; ++YYCURSOR; -#line 182 "../src/parse/lex.re" +#line 182 "../src/ast/lex.re" { if (ignored > 0) { cline += ignored; @@ -703,9 +703,9 @@ yy123: tok = pos = cur; return; } -#line 707 "src/parse/lex.cc" +#line 707 "src/ast/lex.cc" } -#line 190 "../src/parse/lex.re" +#line 190 "../src/ast/lex.re" } } @@ -713,7 +713,7 @@ void Scanner::lex_tags() { std::string fmt, sep; for (;;) { -#line 717 "src/parse/lex.cc" +#line 717 "src/ast/lex.cc" { YYCTYPE yych; static const unsigned char yybm[] = { @@ -771,9 +771,9 @@ void Scanner::lex_tags() } ++YYCURSOR; yy129: -#line 197 "../src/parse/lex.re" +#line 197 "../src/ast/lex.re" { fatal("unrecognized configuration"); } -#line 777 "src/parse/lex.cc" +#line 777 "src/ast/lex.cc" yy130: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); @@ -781,14 +781,14 @@ yy130: if (yybm[0+yych] & 128) { goto yy130; } -#line 202 "../src/parse/lex.re" +#line 202 "../src/ast/lex.re" { continue; } -#line 787 "src/parse/lex.cc" +#line 787 "src/ast/lex.cc" yy133: ++YYCURSOR; -#line 203 "../src/parse/lex.re" +#line 203 "../src/ast/lex.re" { ++cline; continue; } -#line 792 "src/parse/lex.cc" +#line 792 "src/ast/lex.cc" yy135: yych = (YYCTYPE)*++YYCURSOR; if (yych == '\n') goto yy133; @@ -807,7 +807,7 @@ yy138: goto yy129; yy139: ++YYCURSOR; -#line 204 "../src/parse/lex.re" +#line 204 "../src/ast/lex.re" { if (opts->target == opt_t::CODE) { out.wdelay_tags(opts->topIndent, @@ -816,7 +816,7 @@ yy139: tok = pos = cur; return; } -#line 820 "src/parse/lex.cc" +#line 820 "src/ast/lex.cc" yy141: yych = (YYCTYPE)*++YYCURSOR; if (yych == 'r') goto yy144; @@ -853,9 +853,9 @@ yy149: goto yy142; yy150: ++YYCURSOR; -#line 199 "../src/parse/lex.re" +#line 199 "../src/ast/lex.re" { fmt = lex_conf_string(); continue; } -#line 859 "src/parse/lex.cc" +#line 859 "src/ast/lex.cc" yy152: yych = (YYCTYPE)*++YYCURSOR; if (yych != 't') goto yy142; @@ -864,11 +864,11 @@ yy152: yych = (YYCTYPE)*++YYCURSOR; if (yych != 'r') goto yy142; ++YYCURSOR; -#line 200 "../src/parse/lex.re" +#line 200 "../src/ast/lex.re" { sep = lex_conf_string(); continue; } -#line 870 "src/parse/lex.cc" +#line 870 "src/ast/lex.cc" } -#line 212 "../src/parse/lex.re" +#line 212 "../src/ast/lex.re" } } @@ -886,7 +886,7 @@ scan: start: -#line 890 "src/parse/lex.cc" +#line 890 "src/ast/lex.cc" { YYCTYPE yych; unsigned int yyaccept = 0; @@ -983,12 +983,12 @@ start: yy159: ++YYCURSOR; yy160: -#line 380 "../src/parse/lex.re" +#line 380 "../src/ast/lex.re" { fatalf("unexpected character: '%c'", *tok); goto scan; } -#line 992 "src/parse/lex.cc" +#line 992 "src/ast/lex.cc" yy161: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); @@ -996,11 +996,11 @@ yy161: if (yybm[0+yych] & 16) { goto yy161; } -#line 364 "../src/parse/lex.re" +#line 364 "../src/ast/lex.re" { goto scan; } -#line 1004 "src/parse/lex.cc" +#line 1004 "src/ast/lex.cc" yy164: yyaccept = 0; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); @@ -1011,14 +1011,14 @@ yy164: if (yych == '#') goto yy190; } yy165: -#line 373 "../src/parse/lex.re" +#line 373 "../src/ast/lex.re" { if (cur == eof) return 0; pos = cur; cline++; goto scan; } -#line 1022 "src/parse/lex.cc" +#line 1022 "src/ast/lex.cc" yy166: yych = (YYCTYPE)*++YYCURSOR; if (yych == '\n') goto yy164; @@ -1026,35 +1026,35 @@ yy166: yy167: ++YYCURSOR; yy168: -#line 274 "../src/parse/lex.re" +#line 274 "../src/ast/lex.re" { return *tok; } -#line 1032 "src/parse/lex.cc" +#line 1032 "src/ast/lex.cc" yy169: ++YYCURSOR; -#line 261 "../src/parse/lex.re" +#line 261 "../src/ast/lex.re" { yylval.regexp = lex_str('"', opts->bCaseInsensitive || opts->bCaseInverted); return TOKEN_REGEXP; } -#line 1037 "src/parse/lex.cc" +#line 1037 "src/ast/lex.cc" yy171: yych = (YYCTYPE)*++YYCURSOR; if (yych == '}') goto yy192; goto yy160; yy172: ++YYCURSOR; -#line 260 "../src/parse/lex.re" +#line 260 "../src/ast/lex.re" { yylval.regexp = lex_str('\'', opts->bCaseInsensitive || !opts->bCaseInverted); return TOKEN_REGEXP; } -#line 1046 "src/parse/lex.cc" +#line 1046 "src/ast/lex.cc" yy174: yych = (YYCTYPE)*++YYCURSOR; if (yych == '/') goto yy192; goto yy168; yy175: ++YYCURSOR; -#line 359 "../src/parse/lex.re" +#line 359 "../src/ast/lex.re" { yylval.regexp = RegExp::make_dot(cline, get_column()); return TOKEN_REGEXP; } -#line 1058 "src/parse/lex.cc" +#line 1058 "src/ast/lex.cc" yy177: yych = (YYCTYPE)*++YYCURSOR; if (yych == '*') goto yy194; @@ -1114,9 +1114,9 @@ yy181: yy182: yych = (YYCTYPE)*++YYCURSOR; if (yych == '^') goto yy209; -#line 262 "../src/parse/lex.re" +#line 262 "../src/ast/lex.re" { yylval.regexp = lex_cls(false); return TOKEN_REGEXP; } -#line 1120 "src/parse/lex.cc" +#line 1120 "src/ast/lex.cc" yy184: yych = (YYCTYPE)*++YYCURSOR; if (yych == 'e') goto yy211; @@ -1139,13 +1139,13 @@ yy185: } } yy186: -#line 229 "../src/parse/lex.re" +#line 229 "../src/ast/lex.re" { depth = 1; code_line = cline; goto code; } -#line 1149 "src/parse/lex.cc" +#line 1149 "src/ast/lex.cc" yy187: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); @@ -1181,31 +1181,31 @@ yy190: } yy192: ++YYCURSOR; -#line 255 "../src/parse/lex.re" +#line 255 "../src/ast/lex.re" { tok = cur; return 0; } -#line 1190 "src/parse/lex.cc" +#line 1190 "src/ast/lex.cc" yy194: ++YYCURSOR; -#line 249 "../src/parse/lex.re" +#line 249 "../src/ast/lex.re" { depth = 1; goto comment; } -#line 1198 "src/parse/lex.cc" +#line 1198 "src/ast/lex.cc" yy196: ++YYCURSOR; -#line 246 "../src/parse/lex.re" +#line 246 "../src/ast/lex.re" { goto nextLine; } -#line 1205 "src/parse/lex.cc" +#line 1205 "src/ast/lex.cc" yy198: ++YYCURSOR; YYCURSOR -= 1; -#line 339 "../src/parse/lex.re" +#line 339 "../src/ast/lex.re" { if (!opts->FFlag) { yylval.str = new std::string (tok, tok_len()); @@ -1225,7 +1225,7 @@ yy198: return TOKEN_REGEXP; } } -#line 1229 "src/parse/lex.cc" +#line 1229 "src/ast/lex.cc" yy200: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); @@ -1245,23 +1245,23 @@ yy200: yy202: ++YYCURSOR; YYCURSOR = YYCTXMARKER; -#line 334 "../src/parse/lex.re" +#line 334 "../src/ast/lex.re" { yylval.str = new std::string (tok, tok_len ()); return TOKEN_ID; } -#line 1254 "src/parse/lex.cc" +#line 1254 "src/ast/lex.cc" yy204: yych = (YYCTYPE)*++YYCURSOR; if (yych == '>') goto yy221; -#line 239 "../src/parse/lex.re" +#line 239 "../src/ast/lex.re" { tok += 2; /* skip ":=" */ depth = 0; code_line = cline; goto code; } -#line 1265 "src/parse/lex.cc" +#line 1265 "src/ast/lex.cc" yy206: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); @@ -1279,7 +1279,7 @@ yy206: } } yy208: -#line 265 "../src/parse/lex.re" +#line 265 "../src/ast/lex.re" { if (!opts->tags) { fatal("tags are only allowed with '-T, --tags' option"); @@ -1288,12 +1288,12 @@ yy208: yylval.regexp = RegExp::make_tag(cline, get_column(), name); return TOKEN_REGEXP; } -#line 1292 "src/parse/lex.cc" +#line 1292 "src/ast/lex.cc" yy209: ++YYCURSOR; -#line 263 "../src/parse/lex.re" +#line 263 "../src/ast/lex.re" { yylval.regexp = lex_cls(true); return TOKEN_REGEXP; } -#line 1297 "src/parse/lex.cc" +#line 1297 "src/ast/lex.cc" yy211: yych = (YYCTYPE)*++YYCURSOR; if (yych == '2') goto yy223; @@ -1301,11 +1301,11 @@ yy211: yy212: ++YYCURSOR; yy213: -#line 307 "../src/parse/lex.re" +#line 307 "../src/ast/lex.re" { fatal("illegal closure form, use '{n}', '{n,}', '{n,m}' where n and m are numbers"); } -#line 1309 "src/parse/lex.cc" +#line 1309 "src/ast/lex.cc" yy214: ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); @@ -1358,7 +1358,7 @@ yy218: yy219: ++YYCURSOR; YYCURSOR = YYCTXMARKER; -#line 321 "../src/parse/lex.re" +#line 321 "../src/ast/lex.re" { yylval.str = new std::string (tok, tok_len ()); if (opts->FFlag) @@ -1371,15 +1371,15 @@ yy219: return TOKEN_ID; } } -#line 1375 "src/parse/lex.cc" +#line 1375 "src/ast/lex.cc" yy221: ++YYCURSOR; YYCURSOR -= 2; -#line 235 "../src/parse/lex.re" +#line 235 "../src/ast/lex.re" { return *tok; } -#line 1383 "src/parse/lex.cc" +#line 1383 "src/ast/lex.cc" yy223: yych = (YYCTYPE)*++YYCURSOR; if (yych == 'c') goto yy230; @@ -1393,7 +1393,7 @@ yy224: goto yy213; yy225: ++YYCURSOR; -#line 276 "../src/parse/lex.re" +#line 276 "../src/ast/lex.re" { if (!s_to_u32_unsafe (tok + 1, cur - 1, yylval.extop.min)) { @@ -1402,10 +1402,10 @@ yy225: yylval.extop.max = yylval.extop.min; return TOKEN_CLOSESIZE; } -#line 1406 "src/parse/lex.cc" +#line 1406 "src/ast/lex.cc" yy227: ++YYCURSOR; -#line 311 "../src/parse/lex.re" +#line 311 "../src/ast/lex.re" { if (!opts->FFlag) { fatal("curly braces for names only allowed with -F switch"); @@ -1413,7 +1413,7 @@ yy227: yylval.str = new std::string (tok + 1, tok_len () - 2); // -2 to omit braces return TOKEN_ID; } -#line 1417 "src/parse/lex.cc" +#line 1417 "src/ast/lex.cc" yy229: yych = (YYCTYPE)*++YYCURSOR; if (yych == 'n') goto yy235; @@ -1432,7 +1432,7 @@ yy231: goto yy189; yy233: ++YYCURSOR; -#line 298 "../src/parse/lex.re" +#line 298 "../src/ast/lex.re" { if (!s_to_u32_unsafe (tok + 1, cur - 2, yylval.extop.min)) { @@ -1441,19 +1441,19 @@ yy233: yylval.extop.max = std::numeric_limits::max(); return TOKEN_CLOSESIZE; } -#line 1445 "src/parse/lex.cc" +#line 1445 "src/ast/lex.cc" yy235: yych = (YYCTYPE)*++YYCURSOR; if (yych == 'e') goto yy240; goto yy189; yy236: ++YYCURSOR; -#line 319 "../src/parse/lex.re" +#line 319 "../src/ast/lex.re" { lex_conf (); return TOKEN_CONF; } -#line 1454 "src/parse/lex.cc" +#line 1454 "src/ast/lex.cc" yy238: ++YYCURSOR; -#line 285 "../src/parse/lex.re" +#line 285 "../src/ast/lex.re" { const char * p = strchr (tok, ','); if (!s_to_u32_unsafe (tok + 1, p, yylval.extop.min)) @@ -1466,7 +1466,7 @@ yy238: } return TOKEN_CLOSESIZE; } -#line 1470 "src/parse/lex.cc" +#line 1470 "src/ast/lex.cc" yy240: yych = (YYCTYPE)*++YYCURSOR; if (yych <= '0') goto yy242; @@ -1522,12 +1522,12 @@ yy245: yy247: ++YYCURSOR; YYCURSOR = YYCTXMARKER; -#line 368 "../src/parse/lex.re" +#line 368 "../src/ast/lex.re" { set_sourceline (); goto scan; } -#line 1531 "src/parse/lex.cc" +#line 1531 "src/ast/lex.cc" yy249: yych = (YYCTYPE)*++YYCURSOR; if (yych == '\n') goto yy247; @@ -1552,12 +1552,12 @@ yy253: if (yych == '\n') goto yy189; goto yy250; } -#line 384 "../src/parse/lex.re" +#line 384 "../src/ast/lex.re" flex_name: -#line 1561 "src/parse/lex.cc" +#line 1561 "src/ast/lex.cc" { YYCTYPE yych; if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); @@ -1566,32 +1566,32 @@ flex_name: if (yych == '\r') goto yy260; ++YYCURSOR; yy257: -#line 395 "../src/parse/lex.re" +#line 395 "../src/ast/lex.re" { YYCURSOR = tok; goto start; } -#line 1575 "src/parse/lex.cc" +#line 1575 "src/ast/lex.cc" yy258: ++YYCURSOR; -#line 389 "../src/parse/lex.re" +#line 389 "../src/ast/lex.re" { YYCURSOR = tok; lexer_state = LEX_NORMAL; return TOKEN_FID_END; } -#line 1584 "src/parse/lex.cc" +#line 1584 "src/ast/lex.cc" yy260: yych = (YYCTYPE)*++YYCURSOR; if (yych == '\n') goto yy258; goto yy257; } -#line 399 "../src/parse/lex.re" +#line 399 "../src/ast/lex.re" code: -#line 1595 "src/parse/lex.cc" +#line 1595 "src/ast/lex.cc" { YYCTYPE yych; unsigned int yyaccept = 0; @@ -1652,7 +1652,7 @@ code: } yy263: ++YYCURSOR; -#line 462 "../src/parse/lex.re" +#line 462 "../src/ast/lex.re" { if (cur == eof) { @@ -1664,15 +1664,15 @@ yy263: } goto code; } -#line 1668 "src/parse/lex.cc" +#line 1668 "src/ast/lex.cc" yy265: ++YYCURSOR; yy266: -#line 476 "../src/parse/lex.re" +#line 476 "../src/ast/lex.re" { goto code; } -#line 1676 "src/parse/lex.cc" +#line 1676 "src/ast/lex.cc" yy267: yyaccept = 0; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); @@ -1691,7 +1691,7 @@ yy267: } } yy268: -#line 443 "../src/parse/lex.re" +#line 443 "../src/ast/lex.re" { if (depth == 0) { @@ -1711,7 +1711,7 @@ yy268: cline++; goto code; } -#line 1715 "src/parse/lex.cc" +#line 1715 "src/ast/lex.cc" yy269: yyaccept = 1; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); @@ -1724,7 +1724,7 @@ yy270: goto yy287; yy271: ++YYCURSOR; -#line 415 "../src/parse/lex.re" +#line 415 "../src/ast/lex.re" { if (depth == 0) { @@ -1736,10 +1736,10 @@ yy271: } goto code; } -#line 1740 "src/parse/lex.cc" +#line 1740 "src/ast/lex.cc" yy273: ++YYCURSOR; -#line 403 "../src/parse/lex.re" +#line 403 "../src/ast/lex.re" { if (depth == 0) { @@ -1752,7 +1752,7 @@ yy273: } goto code; } -#line 1756 "src/parse/lex.cc" +#line 1756 "src/ast/lex.cc" yy275: yyaccept = 2; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); @@ -1764,7 +1764,7 @@ yy275: } yy276: YYCURSOR -= 1; -#line 430 "../src/parse/lex.re" +#line 430 "../src/ast/lex.re" { if (depth == 0) { @@ -1778,7 +1778,7 @@ yy276: cline++; goto code; } -#line 1782 "src/parse/lex.cc" +#line 1782 "src/ast/lex.cc" yy277: ++YYCURSOR; goto yy276; @@ -1813,11 +1813,11 @@ yy282: if (yych >= '#') goto yy285; yy283: ++YYCURSOR; -#line 473 "../src/parse/lex.re" +#line 473 "../src/ast/lex.re" { goto code; } -#line 1821 "src/parse/lex.cc" +#line 1821 "src/ast/lex.cc" yy285: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); @@ -1907,12 +1907,12 @@ yy299: yy301: ++YYCURSOR; YYCURSOR = YYCTXMARKER; -#line 426 "../src/parse/lex.re" +#line 426 "../src/ast/lex.re" { set_sourceline (); goto code; } -#line 1916 "src/parse/lex.cc" +#line 1916 "src/ast/lex.cc" yy303: yych = (YYCTYPE)*++YYCURSOR; if (yych == '\n') goto yy301; @@ -1941,12 +1941,12 @@ yy307: if (yych == '\n') goto yy280; goto yy304; } -#line 479 "../src/parse/lex.re" +#line 479 "../src/ast/lex.re" comment: -#line 1950 "src/parse/lex.cc" +#line 1950 "src/ast/lex.cc" { YYCTYPE yych; static const unsigned char yybm[] = { @@ -1993,7 +1993,7 @@ comment: } ++YYCURSOR; yy311: -#line 511 "../src/parse/lex.re" +#line 511 "../src/ast/lex.re" { if (cur == eof) { @@ -2001,7 +2001,7 @@ yy311: } goto comment; } -#line 2005 "src/parse/lex.cc" +#line 2005 "src/ast/lex.cc" yy312: yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); if (yybm[0+yych] & 32) { @@ -2009,7 +2009,7 @@ yy312: } if (yych == '#') goto yy319; yy313: -#line 502 "../src/parse/lex.re" +#line 502 "../src/ast/lex.re" { if (cur == eof) { @@ -2019,7 +2019,7 @@ yy313: cline++; goto comment; } -#line 2023 "src/parse/lex.cc" +#line 2023 "src/ast/lex.cc" yy314: yych = (YYCTYPE)*++YYCURSOR; if (yych == '/') goto yy321; @@ -2053,7 +2053,7 @@ yy319: } yy321: ++YYCURSOR; -#line 483 "../src/parse/lex.re" +#line 483 "../src/ast/lex.re" { if (--depth == 0) { @@ -2064,16 +2064,16 @@ yy321: goto comment; } } -#line 2068 "src/parse/lex.cc" +#line 2068 "src/ast/lex.cc" yy323: ++YYCURSOR; -#line 493 "../src/parse/lex.re" +#line 493 "../src/ast/lex.re" { ++depth; fatal("ambiguous /* found"); goto comment; } -#line 2077 "src/parse/lex.cc" +#line 2077 "src/ast/lex.cc" yy325: yych = (YYCTYPE)*++YYCURSOR; if (yych != 'i') goto yy318; @@ -2130,12 +2130,12 @@ yy333: yy335: ++YYCURSOR; YYCURSOR = YYCTXMARKER; -#line 498 "../src/parse/lex.re" +#line 498 "../src/ast/lex.re" { set_sourceline (); goto comment; } -#line 2139 "src/parse/lex.cc" +#line 2139 "src/ast/lex.cc" yy337: yych = (YYCTYPE)*++YYCURSOR; if (yych == '\n') goto yy335; @@ -2160,28 +2160,28 @@ yy341: if (yych == '\n') goto yy318; goto yy338; } -#line 518 "../src/parse/lex.re" +#line 518 "../src/ast/lex.re" nextLine: -#line 2169 "src/parse/lex.cc" +#line 2169 "src/ast/lex.cc" { YYCTYPE yych; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; if (yych == '\n') goto yy346; ++YYCURSOR; -#line 529 "../src/parse/lex.re" +#line 529 "../src/ast/lex.re" { if(cur == eof) { return 0; } goto nextLine; } -#line 2182 "src/parse/lex.cc" +#line 2182 "src/ast/lex.cc" yy346: ++YYCURSOR; -#line 522 "../src/parse/lex.re" +#line 522 "../src/ast/lex.re" { if(cur == eof) { return 0; } @@ -2189,9 +2189,9 @@ yy346: cline++; goto scan; } -#line 2193 "src/parse/lex.cc" +#line 2193 "src/ast/lex.cc" } -#line 534 "../src/parse/lex.re" +#line 534 "../src/ast/lex.re" } @@ -2216,35 +2216,35 @@ const RegExp *Scanner::lex_cls(bool neg) uint32_t u, l; fst: -#line 2220 "src/parse/lex.cc" +#line 2220 "src/ast/lex.cc" { YYCTYPE yych; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; if (yych == ']') goto yy351; -#line 559 "../src/parse/lex.re" +#line 559 "../src/ast/lex.re" { l = lex_cls_chr(); goto snd; } -#line 2228 "src/parse/lex.cc" +#line 2228 "src/ast/lex.cc" yy351: ++YYCURSOR; -#line 558 "../src/parse/lex.re" +#line 558 "../src/ast/lex.re" { goto end; } -#line 2233 "src/parse/lex.cc" +#line 2233 "src/ast/lex.cc" } -#line 560 "../src/parse/lex.re" +#line 560 "../src/ast/lex.re" snd: -#line 2239 "src/parse/lex.cc" +#line 2239 "src/ast/lex.cc" { YYCTYPE yych; if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); yych = (YYCTYPE)*(YYMARKER = YYCURSOR); if (yych == '-') goto yy356; yy355: -#line 563 "../src/parse/lex.re" +#line 563 "../src/ast/lex.re" { u = l; goto add; } -#line 2248 "src/parse/lex.cc" +#line 2248 "src/ast/lex.cc" yy356: yych = (YYCTYPE)*++YYCURSOR; if (yych != ']') goto yy358; @@ -2253,7 +2253,7 @@ yy356: yy358: ++YYCURSOR; YYCURSOR -= 1; -#line 564 "../src/parse/lex.re" +#line 564 "../src/ast/lex.re" { u = lex_cls_chr(); if (l > u) { @@ -2262,9 +2262,9 @@ yy358: } goto add; } -#line 2266 "src/parse/lex.cc" +#line 2266 "src/ast/lex.cc" } -#line 572 "../src/parse/lex.re" +#line 572 "../src/ast/lex.re" add: if (!(s = opts->encoding.encodeRange(l, u))) { @@ -2283,7 +2283,7 @@ uint32_t Scanner::lex_cls_chr() { tok = cur; -#line 2287 "src/parse/lex.cc" +#line 2287 "src/ast/lex.cc" { YYCTYPE yych; unsigned int yyaccept = 0; @@ -2292,14 +2292,14 @@ uint32_t Scanner::lex_cls_chr() if (yych == '\n') goto yy364; if (yych == '\\') goto yy366; ++YYCURSOR; -#line 595 "../src/parse/lex.re" +#line 595 "../src/ast/lex.re" { return static_cast(tok[0]); } -#line 2298 "src/parse/lex.cc" +#line 2298 "src/ast/lex.cc" yy364: ++YYCURSOR; -#line 590 "../src/parse/lex.re" +#line 590 "../src/ast/lex.re" { fatal (get_column() - tchar, "syntax error"); } -#line 2303 "src/parse/lex.cc" +#line 2303 "src/ast/lex.cc" yy366: yych = (YYCTYPE)*++YYCURSOR; if (yych <= '`') { @@ -2348,31 +2348,31 @@ yy366: } } } -#line 593 "../src/parse/lex.re" +#line 593 "../src/ast/lex.re" { fatal (get_column() - tchar, "syntax error in escape sequence"); } -#line 2354 "src/parse/lex.cc" +#line 2354 "src/ast/lex.cc" yy368: ++YYCURSOR; -#line 608 "../src/parse/lex.re" +#line 608 "../src/ast/lex.re" { warn.useless_escape(cline, get_column(), tok[1]); return static_cast(tok[1]); } -#line 2362 "src/parse/lex.cc" +#line 2362 "src/ast/lex.cc" yy370: ++YYCURSOR; -#line 606 "../src/parse/lex.re" +#line 606 "../src/ast/lex.re" { return static_cast('-'); } -#line 2367 "src/parse/lex.cc" +#line 2367 "src/ast/lex.cc" yy372: yyaccept = 0; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); if (yych <= '/') goto yy373; if (yych <= '7') goto yy397; yy373: -#line 592 "../src/parse/lex.re" +#line 592 "../src/ast/lex.re" { fatal (get_column() - tchar, "syntax error in octal escape sequence"); } -#line 2376 "src/parse/lex.cc" +#line 2376 "src/ast/lex.cc" yy374: ++YYCURSOR; goto yy373; @@ -2388,9 +2388,9 @@ yy375: if (yych <= 'f') goto yy399; } yy376: -#line 591 "../src/parse/lex.re" +#line 591 "../src/ast/lex.re" { fatal (get_column() - tchar, "syntax error in hexadecimal escape sequence"); } -#line 2394 "src/parse/lex.cc" +#line 2394 "src/ast/lex.cc" yy377: yyaccept = 1; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); @@ -2406,49 +2406,49 @@ yy377: } yy378: ++YYCURSOR; -#line 605 "../src/parse/lex.re" +#line 605 "../src/ast/lex.re" { return static_cast('\\'); } -#line 2412 "src/parse/lex.cc" +#line 2412 "src/ast/lex.cc" yy380: ++YYCURSOR; -#line 607 "../src/parse/lex.re" +#line 607 "../src/ast/lex.re" { return static_cast(']'); } -#line 2417 "src/parse/lex.cc" +#line 2417 "src/ast/lex.cc" yy382: ++YYCURSOR; -#line 598 "../src/parse/lex.re" +#line 598 "../src/ast/lex.re" { return static_cast('\a'); } -#line 2422 "src/parse/lex.cc" +#line 2422 "src/ast/lex.cc" yy384: ++YYCURSOR; -#line 599 "../src/parse/lex.re" +#line 599 "../src/ast/lex.re" { return static_cast('\b'); } -#line 2427 "src/parse/lex.cc" +#line 2427 "src/ast/lex.cc" yy386: ++YYCURSOR; -#line 600 "../src/parse/lex.re" +#line 600 "../src/ast/lex.re" { return static_cast('\f'); } -#line 2432 "src/parse/lex.cc" +#line 2432 "src/ast/lex.cc" yy388: ++YYCURSOR; -#line 601 "../src/parse/lex.re" +#line 601 "../src/ast/lex.re" { return static_cast('\n'); } -#line 2437 "src/parse/lex.cc" +#line 2437 "src/ast/lex.cc" yy390: ++YYCURSOR; -#line 602 "../src/parse/lex.re" +#line 602 "../src/ast/lex.re" { return static_cast('\r'); } -#line 2442 "src/parse/lex.cc" +#line 2442 "src/ast/lex.cc" yy392: ++YYCURSOR; -#line 603 "../src/parse/lex.re" +#line 603 "../src/ast/lex.re" { return static_cast('\t'); } -#line 2447 "src/parse/lex.cc" +#line 2447 "src/ast/lex.cc" yy394: ++YYCURSOR; -#line 604 "../src/parse/lex.re" +#line 604 "../src/ast/lex.re" { return static_cast('\v'); } -#line 2452 "src/parse/lex.cc" +#line 2452 "src/ast/lex.cc" yy396: yyaccept = 1; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); @@ -2511,9 +2511,9 @@ yy401: } yy402: ++YYCURSOR; -#line 597 "../src/parse/lex.re" +#line 597 "../src/ast/lex.re" { return unesc_oct(tok, cur); } -#line 2517 "src/parse/lex.cc" +#line 2517 "src/ast/lex.cc" yy404: yych = (YYCTYPE)*++YYCURSOR; if (yych <= '@') { @@ -2540,9 +2540,9 @@ yy405: } yy406: ++YYCURSOR; -#line 596 "../src/parse/lex.re" +#line 596 "../src/ast/lex.re" { return unesc_hex(tok, cur); } -#line 2546 "src/parse/lex.cc" +#line 2546 "src/ast/lex.cc" yy408: yych = (YYCTYPE)*++YYCURSOR; if (yych <= '@') { @@ -2566,7 +2566,7 @@ yy409: goto yy398; } } -#line 612 "../src/parse/lex.re" +#line 612 "../src/ast/lex.re" } @@ -2575,7 +2575,7 @@ uint32_t Scanner::lex_str_chr(char quote, bool &end) end = false; tok = cur; -#line 2579 "src/parse/lex.cc" +#line 2579 "src/ast/lex.cc" { YYCTYPE yych; unsigned int yyaccept = 0; @@ -2584,17 +2584,17 @@ uint32_t Scanner::lex_str_chr(char quote, bool &end) if (yych == '\n') goto yy414; if (yych == '\\') goto yy416; ++YYCURSOR; -#line 625 "../src/parse/lex.re" +#line 625 "../src/ast/lex.re" { end = tok[0] == quote; return static_cast(tok[0]); } -#line 2593 "src/parse/lex.cc" +#line 2593 "src/ast/lex.cc" yy414: ++YYCURSOR; -#line 620 "../src/parse/lex.re" +#line 620 "../src/ast/lex.re" { fatal (get_column() - tchar, "syntax error"); } -#line 2598 "src/parse/lex.cc" +#line 2598 "src/ast/lex.cc" yy416: yych = (YYCTYPE)*++YYCURSOR; if (yych <= 'a') { @@ -2640,28 +2640,28 @@ yy416: } } } -#line 623 "../src/parse/lex.re" +#line 623 "../src/ast/lex.re" { fatal (get_column() - tchar, "syntax error in escape sequence"); } -#line 2646 "src/parse/lex.cc" +#line 2646 "src/ast/lex.cc" yy418: ++YYCURSOR; -#line 639 "../src/parse/lex.re" +#line 639 "../src/ast/lex.re" { if (tok[1] != quote) { warn.useless_escape(cline, get_column(), tok[1]); } return static_cast(tok[1]); } -#line 2656 "src/parse/lex.cc" +#line 2656 "src/ast/lex.cc" yy420: yyaccept = 0; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); if (yych <= '/') goto yy421; if (yych <= '7') goto yy443; yy421: -#line 622 "../src/parse/lex.re" +#line 622 "../src/ast/lex.re" { fatal (get_column() - tchar, "syntax error in octal escape sequence"); } -#line 2665 "src/parse/lex.cc" +#line 2665 "src/ast/lex.cc" yy422: ++YYCURSOR; goto yy421; @@ -2677,9 +2677,9 @@ yy423: if (yych <= 'f') goto yy445; } yy424: -#line 621 "../src/parse/lex.re" +#line 621 "../src/ast/lex.re" { fatal (get_column() - tchar, "syntax error in hexadecimal escape sequence"); } -#line 2683 "src/parse/lex.cc" +#line 2683 "src/ast/lex.cc" yy425: yyaccept = 1; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); @@ -2695,44 +2695,44 @@ yy425: } yy426: ++YYCURSOR; -#line 638 "../src/parse/lex.re" +#line 638 "../src/ast/lex.re" { return static_cast('\\'); } -#line 2701 "src/parse/lex.cc" +#line 2701 "src/ast/lex.cc" yy428: ++YYCURSOR; -#line 631 "../src/parse/lex.re" +#line 631 "../src/ast/lex.re" { return static_cast('\a'); } -#line 2706 "src/parse/lex.cc" +#line 2706 "src/ast/lex.cc" yy430: ++YYCURSOR; -#line 632 "../src/parse/lex.re" +#line 632 "../src/ast/lex.re" { return static_cast('\b'); } -#line 2711 "src/parse/lex.cc" +#line 2711 "src/ast/lex.cc" yy432: ++YYCURSOR; -#line 633 "../src/parse/lex.re" +#line 633 "../src/ast/lex.re" { return static_cast('\f'); } -#line 2716 "src/parse/lex.cc" +#line 2716 "src/ast/lex.cc" yy434: ++YYCURSOR; -#line 634 "../src/parse/lex.re" +#line 634 "../src/ast/lex.re" { return static_cast('\n'); } -#line 2721 "src/parse/lex.cc" +#line 2721 "src/ast/lex.cc" yy436: ++YYCURSOR; -#line 635 "../src/parse/lex.re" +#line 635 "../src/ast/lex.re" { return static_cast('\r'); } -#line 2726 "src/parse/lex.cc" +#line 2726 "src/ast/lex.cc" yy438: ++YYCURSOR; -#line 636 "../src/parse/lex.re" +#line 636 "../src/ast/lex.re" { return static_cast('\t'); } -#line 2731 "src/parse/lex.cc" +#line 2731 "src/ast/lex.cc" yy440: ++YYCURSOR; -#line 637 "../src/parse/lex.re" +#line 637 "../src/ast/lex.re" { return static_cast('\v'); } -#line 2736 "src/parse/lex.cc" +#line 2736 "src/ast/lex.cc" yy442: yyaccept = 1; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); @@ -2795,9 +2795,9 @@ yy447: } yy448: ++YYCURSOR; -#line 630 "../src/parse/lex.re" +#line 630 "../src/ast/lex.re" { return unesc_oct(tok, cur); } -#line 2801 "src/parse/lex.cc" +#line 2801 "src/ast/lex.cc" yy450: yych = (YYCTYPE)*++YYCURSOR; if (yych <= '@') { @@ -2824,9 +2824,9 @@ yy451: } yy452: ++YYCURSOR; -#line 629 "../src/parse/lex.re" +#line 629 "../src/ast/lex.re" { return unesc_hex(tok, cur); } -#line 2830 "src/parse/lex.cc" +#line 2830 "src/ast/lex.cc" yy454: yych = (YYCTYPE)*++YYCURSOR; if (yych <= '@') { @@ -2850,7 +2850,7 @@ yy455: goto yy444; } } -#line 645 "../src/parse/lex.re" +#line 645 "../src/ast/lex.re" } @@ -2873,7 +2873,7 @@ void Scanner::set_sourceline () sourceline: tok = cur; -#line 2877 "src/parse/lex.cc" +#line 2877 "src/ast/lex.cc" { YYCTYPE yych; static const unsigned char yybm[] = { @@ -2922,14 +2922,14 @@ sourceline: yy458: ++YYCURSOR; yy459: -#line 690 "../src/parse/lex.re" +#line 690 "../src/ast/lex.re" { goto sourceline; } -#line 2930 "src/parse/lex.cc" +#line 2930 "src/ast/lex.cc" yy460: ++YYCURSOR; -#line 678 "../src/parse/lex.re" +#line 678 "../src/ast/lex.re" { if (cur == eof) { @@ -2942,7 +2942,7 @@ yy460: tok = cur; return; } -#line 2946 "src/parse/lex.cc" +#line 2946 "src/ast/lex.cc" yy462: yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); if (yych == '\n') goto yy459; @@ -2954,7 +2954,7 @@ yy463: if (yybm[0+yych] & 64) { goto yy463; } -#line 667 "../src/parse/lex.re" +#line 667 "../src/ast/lex.re" { if (!s_to_u32_unsafe (tok, cur, cline)) { @@ -2962,7 +2962,7 @@ yy463: } goto sourceline; } -#line 2966 "src/parse/lex.cc" +#line 2966 "src/ast/lex.cc" yy466: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); @@ -2979,12 +2979,12 @@ yy468: goto yy459; yy469: ++YYCURSOR; -#line 674 "../src/parse/lex.re" +#line 674 "../src/ast/lex.re" { escape (in.file_name, std::string (tok + 1, tok_len () - 2)); // -2 to omit quotes goto sourceline; } -#line 2988 "src/parse/lex.cc" +#line 2988 "src/ast/lex.cc" yy471: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); @@ -2992,7 +2992,7 @@ yy471: if (yych == '\n') goto yy468; goto yy466; } -#line 693 "../src/parse/lex.re" +#line 693 "../src/ast/lex.re" } diff --git a/re2c/bootstrap/src/parse/lex_conf.cc b/re2c/bootstrap/src/ast/lex_conf.cc similarity index 89% rename from re2c/bootstrap/src/parse/lex_conf.cc rename to re2c/bootstrap/src/ast/lex_conf.cc index ebcb5503..94376334 100644 --- a/re2c/bootstrap/src/parse/lex_conf.cc +++ b/re2c/bootstrap/src/ast/lex_conf.cc @@ -1,25 +1,25 @@ -/* Generated by re2c 0.16 on Sat Mar 4 18:55:19 2017 */ -#line 1 "../src/parse/lex_conf.re" +/* Generated by re2c 0.16 on Sat Mar 4 23:19:21 2017 */ +#line 1 "../src/ast/lex_conf.re" #include "src/util/c99_stdint.h" #include -#include "src/codegen/output.h" -#include "src/ir/re/encoding/enc.h" -#include "src/parse/scanner.h" +#include "src/code/output.h" +#include "src/re/encoding/enc.h" +#include "src/ast/scanner.h" #include "src/util/s_to_n32_unsafe.h" namespace re2c { // global re2c config (affects the whole file) -#line 34 "../src/parse/lex_conf.re" +#line 34 "../src/ast/lex_conf.re" void Scanner::lex_conf () { tok = cur; -#line 23 "src/parse/lex_conf.cc" +#line 23 "src/ast/lex_conf.cc" { unsigned char yych; unsigned int yyaccept = 0; @@ -74,9 +74,9 @@ void Scanner::lex_conf () yy2: ++cur; yy3: -#line 40 "../src/parse/lex_conf.re" +#line 40 "../src/ast/lex_conf.re" { fatal(get_column() - tchar, "unrecognized configuration"); } -#line 80 "src/parse/lex_conf.cc" +#line 80 "src/ast/lex_conf.cc" yy4: yyaccept = 0; yych = (unsigned char)*(ptr = ++cur); @@ -564,46 +564,46 @@ yy89: goto yy14; yy90: ++cur; -#line 67 "../src/parse/lex_conf.re" +#line 67 "../src/ast/lex_conf.re" { lex_conf_enc(Enc::UTF8); return; } -#line 570 "src/parse/lex_conf.cc" +#line 570 "src/ast/lex_conf.cc" yy92: ++cur; -#line 42 "../src/parse/lex_conf.re" +#line 42 "../src/ast/lex_conf.re" { opts.set_target(opt_t::DOT); lex_conf_semicolon(); return; } -#line 575 "src/parse/lex_conf.cc" +#line 575 "src/ast/lex_conf.cc" yy94: ++cur; -#line 49 "../src/parse/lex_conf.re" +#line 49 "../src/ast/lex_conf.re" { opts.set_FFlag(lex_conf_bool()); return; } -#line 580 "src/parse/lex_conf.cc" +#line 580 "src/ast/lex_conf.cc" yy96: ++cur; -#line 43 "../src/parse/lex_conf.re" +#line 43 "../src/ast/lex_conf.re" { opts.set_target(opt_t::SKELETON); lex_conf_semicolon(); return; } -#line 585 "src/parse/lex_conf.cc" +#line 585 "src/ast/lex_conf.cc" yy98: ++cur; -#line 54 "../src/parse/lex_conf.re" +#line 54 "../src/ast/lex_conf.re" { opts.set_tags(lex_conf_bool()); return; } -#line 590 "src/parse/lex_conf.cc" +#line 590 "src/ast/lex_conf.cc" yy100: yyaccept = 1; yych = (unsigned char)*(ptr = ++cur); if (yych == 'i') goto yy150; yy101: -#line 45 "../src/parse/lex_conf.re" +#line 45 "../src/ast/lex_conf.re" { opts.set_bFlag(lex_conf_bool()); return; } -#line 598 "src/parse/lex_conf.cc" +#line 598 "src/ast/lex_conf.cc" yy102: yyaccept = 2; yych = (unsigned char)*(ptr = ++cur); if (yych == 'a') goto yy151; if (yych == 'o') goto yy152; yy103: -#line 46 "../src/parse/lex_conf.re" +#line 46 "../src/ast/lex_conf.re" { opts.set_cFlag(lex_conf_bool()); return; } -#line 607 "src/parse/lex_conf.cc" +#line 607 "src/ast/lex_conf.cc" yy104: yyaccept = 3; yych = (unsigned char)*(ptr = ++cur); @@ -611,9 +611,9 @@ yy104: if (yych <= 'e') goto yy153; if (yych <= 'f') goto yy154; yy105: -#line 47 "../src/parse/lex_conf.re" +#line 47 "../src/ast/lex_conf.re" { opts.set_dFlag(lex_conf_bool()); return; } -#line 617 "src/parse/lex_conf.cc" +#line 617 "src/ast/lex_conf.cc" yy106: yyaccept = 4; yych = (unsigned char)*(ptr = ++cur); @@ -626,30 +626,30 @@ yy106: if (yych <= 'n') goto yy158; } yy107: -#line 63 "../src/parse/lex_conf.re" +#line 63 "../src/ast/lex_conf.re" { lex_conf_enc(Enc::EBCDIC); return; } -#line 632 "src/parse/lex_conf.cc" +#line 632 "src/ast/lex_conf.cc" yy108: yyaccept = 5; yych = (unsigned char)*(ptr = ++cur); if (yych == 'l') goto yy159; yy109: -#line 48 "../src/parse/lex_conf.re" +#line 48 "../src/ast/lex_conf.re" { opts.set_fFlag(lex_conf_bool()); return; } -#line 640 "src/parse/lex_conf.cc" +#line 640 "src/ast/lex_conf.cc" yy110: ++cur; -#line 50 "../src/parse/lex_conf.re" +#line 50 "../src/ast/lex_conf.re" { opts.set_gFlag(lex_conf_bool()); return; } -#line 645 "src/parse/lex_conf.cc" +#line 645 "src/ast/lex_conf.cc" yy112: yyaccept = 6; yych = (unsigned char)*(ptr = ++cur); if (yych == 'n') goto yy160; yy113: -#line 51 "../src/parse/lex_conf.re" +#line 51 "../src/ast/lex_conf.re" { opts.set_iFlag(lex_conf_bool()); return; } -#line 653 "src/parse/lex_conf.cc" +#line 653 "src/ast/lex_conf.cc" yy114: yych = (unsigned char)*++cur; if (yych == 'e') goto yy161; @@ -660,9 +660,9 @@ yy115: yych = (unsigned char)*(ptr = ++cur); if (yych == 'u') goto yy163; yy116: -#line 69 "../src/parse/lex_conf.re" +#line 69 "../src/ast/lex_conf.re" { opts.set_output_file(lex_conf_string()); return; } -#line 666 "src/parse/lex_conf.cc" +#line 666 "src/ast/lex_conf.cc" yy117: yych = (unsigned char)*++cur; if (yych == 'o') goto yy164; @@ -672,49 +672,49 @@ yy118: yych = (unsigned char)*(ptr = ++cur); if (yych == 'e') goto yy165; yy119: -#line 52 "../src/parse/lex_conf.re" +#line 52 "../src/ast/lex_conf.re" { opts.set_rFlag(lex_conf_bool()); return; } -#line 678 "src/parse/lex_conf.cc" +#line 678 "src/ast/lex_conf.cc" yy120: yyaccept = 9; yych = (unsigned char)*(ptr = ++cur); if (yych == 'k') goto yy166; if (yych == 't') goto yy167; yy121: -#line 53 "../src/parse/lex_conf.re" +#line 53 "../src/ast/lex_conf.re" { opts.set_sFlag(lex_conf_bool()); return; } -#line 687 "src/parse/lex_conf.cc" +#line 687 "src/ast/lex_conf.cc" yy122: yyaccept = 10; yych = (unsigned char)*(ptr = ++cur); if (yych == 'a') goto yy168; if (yych == 'y') goto yy169; yy123: -#line 70 "../src/parse/lex_conf.re" +#line 70 "../src/ast/lex_conf.re" { opts.set_header_file(lex_conf_string()); return; } -#line 696 "src/parse/lex_conf.cc" +#line 696 "src/ast/lex_conf.cc" yy124: yyaccept = 11; yych = (unsigned char)*(ptr = ++cur); if (yych == 'n') goto yy170; if (yych == 't') goto yy171; yy125: -#line 64 "../src/parse/lex_conf.re" +#line 64 "../src/ast/lex_conf.re" { lex_conf_enc(Enc::UTF32); return; } -#line 705 "src/parse/lex_conf.cc" +#line 705 "src/ast/lex_conf.cc" yy126: yyaccept = 12; yych = (unsigned char)*(ptr = ++cur); if (yych == 'i') goto yy172; yy127: -#line 65 "../src/parse/lex_conf.re" +#line 65 "../src/ast/lex_conf.re" { lex_conf_enc(Enc::UCS2); return; } -#line 713 "src/parse/lex_conf.cc" +#line 713 "src/ast/lex_conf.cc" yy128: ++cur; -#line 66 "../src/parse/lex_conf.re" +#line 66 "../src/ast/lex_conf.re" { lex_conf_enc(Enc::UTF16); return; } -#line 718 "src/parse/lex_conf.cc" +#line 718 "src/ast/lex_conf.cc" yy130: yych = (unsigned char)*++cur; if (yych <= 'r') goto yy14; @@ -944,9 +944,9 @@ yy183: goto yy14; yy184: ++cur; -#line 103 "../src/parse/lex_conf.re" +#line 103 "../src/ast/lex_conf.re" { opts.set_yybmHexTable (lex_conf_bool()); return; } -#line 950 "src/parse/lex_conf.cc" +#line 950 "src/ast/lex_conf.cc" yy186: yych = (unsigned char)*++cur; if (yych == 'v') goto yy235; @@ -980,9 +980,9 @@ yy193: yych = (unsigned char)*(ptr = ++cur); if (yych == '@') goto yy243; yy194: -#line 87 "../src/parse/lex_conf.re" +#line 87 "../src/ast/lex_conf.re" { opts.set_condGoto (lex_conf_string ()); return; } -#line 986 "src/parse/lex_conf.cc" +#line 986 "src/ast/lex_conf.cc" yy195: yych = (unsigned char)*++cur; if (yych == 'r') goto yy244; @@ -1164,9 +1164,9 @@ yy235: goto yy14; yy236: ++cur; -#line 153 "../src/parse/lex_conf.re" +#line 153 "../src/ast/lex_conf.re" { opts.set_bEmitYYCh (lex_conf_bool()); return; } -#line 1170 "src/parse/lex_conf.cc" +#line 1170 "src/ast/lex_conf.cc" yy238: yych = (unsigned char)*++cur; if (yych == 'e') goto yy298; @@ -1197,9 +1197,9 @@ yy244: goto yy14; yy245: ++cur; -#line 83 "../src/parse/lex_conf.re" +#line 83 "../src/ast/lex_conf.re" { opts.set_condPrefix (lex_conf_string ()); return; } -#line 1203 "src/parse/lex_conf.cc" +#line 1203 "src/ast/lex_conf.cc" yy247: yych = (unsigned char)*++cur; if (yych == 'A') goto yy305; @@ -1359,7 +1359,7 @@ yy283: goto yy14; yy284: ++cur; -#line 138 "../src/parse/lex_conf.re" +#line 138 "../src/ast/lex_conf.re" { const int32_t n = lex_conf_number (); if (n < 0) @@ -1369,7 +1369,7 @@ yy284: opts.set_topIndent (static_cast (n)); return; } -#line 1373 "src/parse/lex_conf.cc" +#line 1373 "src/ast/lex_conf.cc" yy286: yych = (unsigned char)*++cur; if (yych == 'l') goto yy347; @@ -1401,9 +1401,9 @@ yy289: } } yy290: -#line 166 "../src/parse/lex_conf.re" +#line 166 "../src/ast/lex_conf.re" { opts.set_startlabel (lex_conf_string()); return; } -#line 1407 "src/parse/lex_conf.cc" +#line 1407 "src/ast/lex_conf.cc" yy291: yych = (unsigned char)*++cur; if (yych == 't') goto yy355; @@ -1561,9 +1561,9 @@ yy328: goto yy14; yy329: ++cur; -#line 73 "../src/parse/lex_conf.re" +#line 73 "../src/ast/lex_conf.re" { lex_conf_input(); return; } -#line 1567 "src/parse/lex_conf.cc" +#line 1567 "src/ast/lex_conf.cc" yy331: yych = (unsigned char)*++cur; if (yych == 'd') goto yy398; @@ -1638,9 +1638,9 @@ yy348: goto yy14; yy349: ++cur; -#line 162 "../src/parse/lex_conf.re" +#line 162 "../src/ast/lex_conf.re" { opts.set_labelPrefix (lex_conf_string ()); return; } -#line 1644 "src/parse/lex_conf.cc" +#line 1644 "src/ast/lex_conf.cc" yy351: ++cur; if (lim <= cur) fill(1); @@ -1673,9 +1673,9 @@ yy353: } yy355: ++cur; -#line 98 "../src/parse/lex_conf.re" +#line 98 "../src/ast/lex_conf.re" { opts.set_bUseStateAbort (lex_conf_bool()); return; } -#line 1679 "src/parse/lex_conf.cc" +#line 1679 "src/ast/lex_conf.cc" yy357: yych = (unsigned char)*++cur; if (yych == 'a') goto yy421; @@ -1690,9 +1690,9 @@ yy359: goto yy14; yy360: ++cur; -#line 133 "../src/parse/lex_conf.re" +#line 133 "../src/ast/lex_conf.re" { opts.set_tags_prefix (lex_conf_string ()); return; } -#line 1696 "src/parse/lex_conf.cc" +#line 1696 "src/ast/lex_conf.cc" yy362: yych = (unsigned char)*++cur; if (yych <= 'c') { @@ -1731,9 +1731,9 @@ yy368: yych = (unsigned char)*(ptr = ++cur); if (yych == '@') goto yy436; yy369: -#line 85 "../src/parse/lex_conf.re" +#line 85 "../src/ast/lex_conf.re" { opts.set_condDivider (lex_conf_string ()); return; } -#line 1737 "src/parse/lex_conf.cc" +#line 1737 "src/ast/lex_conf.cc" yy370: yych = (unsigned char)*++cur; if (yych == 'n') goto yy437; @@ -1913,9 +1913,9 @@ yy413: goto yy14; yy414: ++cur; -#line 97 "../src/parse/lex_conf.re" +#line 97 "../src/ast/lex_conf.re" { opts.set_yynext (lex_conf_string ()); return; } -#line 1919 "src/parse/lex_conf.cc" +#line 1919 "src/ast/lex_conf.cc" yy416: yych = (unsigned char)*++cur; if (yych <= '0') goto yy14; @@ -1925,9 +1925,9 @@ yy417: ++cur; yy418: cur = ctx; -#line 165 "../src/parse/lex_conf.re" +#line 165 "../src/ast/lex_conf.re" { opts.set_startlabel_force (lex_conf_bool()); return; } -#line 1931 "src/parse/lex_conf.cc" +#line 1931 "src/ast/lex_conf.cc" yy419: ++cur; if (lim <= cur) fill(1); @@ -1942,9 +1942,9 @@ yy421: goto yy14; yy422: ++cur; -#line 132 "../src/parse/lex_conf.re" +#line 132 "../src/ast/lex_conf.re" { opts.set_tags_default (lex_conf_string ()); return; } -#line 1948 "src/parse/lex_conf.cc" +#line 1948 "src/ast/lex_conf.cc" yy424: yych = (unsigned char)*++cur; if (yych == 'i') goto yy487; @@ -1976,9 +1976,9 @@ yy430: goto yy14; yy431: ++cur; -#line 160 "../src/parse/lex_conf.re" +#line 160 "../src/ast/lex_conf.re" { opts.set_fill_check (lex_conf_bool()); return; } -#line 1982 "src/parse/lex_conf.cc" +#line 1982 "src/ast/lex_conf.cc" yy433: yych = (unsigned char)*++cur; if (yych == 'e') goto yy497; @@ -2037,9 +2037,9 @@ yy446: if (yych == ':') goto yy515; if (yych == '@') goto yy516; yy447: -#line 155 "../src/parse/lex_conf.re" +#line 155 "../src/ast/lex_conf.re" { opts.set_fill (lex_conf_string ()); return; } -#line 2043 "src/parse/lex_conf.cc" +#line 2043 "src/ast/lex_conf.cc" yy448: yych = (unsigned char)*++cur; if (yych == 'O') goto yy517; @@ -2062,9 +2062,9 @@ yy452: goto yy14; yy453: ++cur; -#line 121 "../src/parse/lex_conf.re" +#line 121 "../src/ast/lex_conf.re" { opts.set_yypeek (lex_conf_string ()); return; } -#line 2068 "src/parse/lex_conf.cc" +#line 2068 "src/ast/lex_conf.cc" yy455: yych = (unsigned char)*++cur; if (yych == 'O') goto yy523; @@ -2079,9 +2079,9 @@ yy457: goto yy14; yy458: ++cur; -#line 122 "../src/parse/lex_conf.re" +#line 122 "../src/ast/lex_conf.re" { opts.set_yyskip (lex_conf_string ()); return; } -#line 2085 "src/parse/lex_conf.cc" +#line 2085 "src/ast/lex_conf.cc" yy460: yych = (unsigned char)*++cur; if (yych == 't') goto yy526; @@ -2176,9 +2176,9 @@ yy482: goto yy14; yy483: ++cur; -#line 136 "../src/parse/lex_conf.re" +#line 136 "../src/ast/lex_conf.re" { opts.set_indString (lex_conf_string ()); return; } -#line 2182 "src/parse/lex_conf.cc" +#line 2182 "src/ast/lex_conf.cc" yy485: yych = (unsigned char)*++cur; if (yych == 'a') goto yy547; @@ -2197,14 +2197,14 @@ yy488: goto yy14; yy489: ++cur; -#line 102 "../src/parse/lex_conf.re" +#line 102 "../src/ast/lex_conf.re" { opts.set_yybm (lex_conf_string ()); return; } -#line 2203 "src/parse/lex_conf.cc" +#line 2203 "src/ast/lex_conf.cc" yy491: ++cur; -#line 151 "../src/parse/lex_conf.re" +#line 151 "../src/ast/lex_conf.re" { opts.set_yych (lex_conf_string ()); return; } -#line 2208 "src/parse/lex_conf.cc" +#line 2208 "src/ast/lex_conf.cc" yy493: yych = (unsigned char)*++cur; if (yych == 'a') goto yy551; @@ -2223,9 +2223,9 @@ yy496: goto yy14; yy497: ++cur; -#line 156 "../src/parse/lex_conf.re" +#line 156 "../src/ast/lex_conf.re" { opts.set_fill_use (lex_conf_bool()); return; } -#line 2229 "src/parse/lex_conf.cc" +#line 2229 "src/ast/lex_conf.cc" yy499: yych = (unsigned char)*++cur; if (yych == 't') goto yy555; @@ -2240,14 +2240,14 @@ yy501: goto yy14; yy502: ++cur; -#line 88 "../src/parse/lex_conf.re" +#line 88 "../src/ast/lex_conf.re" { opts.set_condGotoParam (lex_conf_string ()); return; } -#line 2246 "src/parse/lex_conf.cc" +#line 2246 "src/ast/lex_conf.cc" yy504: ++cur; -#line 84 "../src/parse/lex_conf.re" +#line 84 "../src/ast/lex_conf.re" { opts.set_condEnumPrefix (lex_conf_string ()); return; } -#line 2251 "src/parse/lex_conf.cc" +#line 2251 "src/ast/lex_conf.cc" yy506: yych = (unsigned char)*++cur; if (yych == 'P') goto yy559; @@ -2266,18 +2266,18 @@ yy509: goto yy14; yy510: ++cur; -#line 150 "../src/parse/lex_conf.re" +#line 150 "../src/ast/lex_conf.re" { opts.set_yyctype (lex_conf_string ()); return; } -#line 2272 "src/parse/lex_conf.cc" +#line 2272 "src/ast/lex_conf.cc" yy512: yych = (unsigned char)*++cur; if (yych == 'R') goto yy564; goto yy14; yy513: ++cur; -#line 148 "../src/parse/lex_conf.re" +#line 148 "../src/ast/lex_conf.re" { opts.set_yydebug (lex_conf_string ()); return; } -#line 2281 "src/parse/lex_conf.cc" +#line 2281 "src/ast/lex_conf.cc" yy515: yych = (unsigned char)*++cur; if (yych == 'n') goto yy566; @@ -2300,9 +2300,9 @@ yy519: goto yy14; yy520: ++cur; -#line 119 "../src/parse/lex_conf.re" +#line 119 "../src/ast/lex_conf.re" { opts.set_yylimit (lex_conf_string ()); return; } -#line 2306 "src/parse/lex_conf.cc" +#line 2306 "src/ast/lex_conf.cc" yy522: yych = (unsigned char)*++cur; if (yych == 'R') goto yy571; @@ -2440,7 +2440,7 @@ yy555: goto yy14; yy556: ++cur; -#line 105 "../src/parse/lex_conf.re" +#line 105 "../src/ast/lex_conf.re" { const int32_t n = lex_conf_number (); if (n < 0) @@ -2450,7 +2450,7 @@ yy556: opts.set_cGotoThreshold (static_cast (n)); return; } -#line 2454 "src/parse/lex_conf.cc" +#line 2454 "src/ast/lex_conf.cc" yy558: yych = (unsigned char)*++cur; if (yych == 'n') goto yy608; @@ -2461,9 +2461,9 @@ yy559: if (yych == 'C') goto yy609; if (yych == 'T') goto yy610; yy560: -#line 123 "../src/parse/lex_conf.re" +#line 123 "../src/ast/lex_conf.re" { opts.set_yybackup (lex_conf_string ()); return; } -#line 2467 "src/parse/lex_conf.cc" +#line 2467 "src/ast/lex_conf.cc" yy561: yych = (unsigned char)*++cur; if (yych == 'P') goto yy611; @@ -2478,9 +2478,9 @@ yy563: goto yy14; yy564: ++cur; -#line 116 "../src/parse/lex_conf.re" +#line 116 "../src/ast/lex_conf.re" { opts.set_yycursor (lex_conf_string ()); return; } -#line 2484 "src/parse/lex_conf.cc" +#line 2484 "src/ast/lex_conf.cc" yy566: yych = (unsigned char)*++cur; if (yych == 'a') goto yy615; @@ -2503,9 +2503,9 @@ yy570: goto yy14; yy571: ++cur; -#line 117 "../src/parse/lex_conf.re" +#line 117 "../src/ast/lex_conf.re" { opts.set_yymarker (lex_conf_string ()); return; } -#line 2509 "src/parse/lex_conf.cc" +#line 2509 "src/ast/lex_conf.cc" yy573: yych = (unsigned char)*++cur; if (yych == 'E') goto yy620; @@ -2604,14 +2604,14 @@ yy596: goto yy14; yy597: ++cur; -#line 99 "../src/parse/lex_conf.re" +#line 99 "../src/ast/lex_conf.re" { opts.set_bUseStateNext (lex_conf_bool()); return; } -#line 2610 "src/parse/lex_conf.cc" +#line 2610 "src/ast/lex_conf.cc" yy599: ++cur; -#line 134 "../src/parse/lex_conf.re" +#line 134 "../src/ast/lex_conf.re" { opts.set_tags_expression(lex_conf_string ()); return; } -#line 2615 "src/parse/lex_conf.cc" +#line 2615 "src/ast/lex_conf.cc" yy601: yych = (unsigned char)*++cur; if (yych == 'p') goto yy647; @@ -2630,9 +2630,9 @@ yy604: goto yy14; yy605: ++cur; -#line 152 "../src/parse/lex_conf.re" +#line 152 "../src/ast/lex_conf.re" { opts.set_yychConversion (lex_conf_bool()); return; } -#line 2636 "src/parse/lex_conf.cc" +#line 2636 "src/ast/lex_conf.cc" yy607: yych = (unsigned char)*++cur; if (yych == 'r') goto yy651; @@ -2655,9 +2655,9 @@ yy611: goto yy14; yy612: ++cur; -#line 129 "../src/parse/lex_conf.re" +#line 129 "../src/ast/lex_conf.re" { opts.set_yycopytag (lex_conf_string ()); return; } -#line 2661 "src/parse/lex_conf.cc" +#line 2661 "src/ast/lex_conf.cc" yy614: yych = (unsigned char)*++cur; if (yych == 'E') goto yy659; @@ -2688,9 +2688,9 @@ yy620: if (yych == 'C') goto yy668; if (yych == 'T') goto yy669; yy621: -#line 126 "../src/parse/lex_conf.re" +#line 126 "../src/ast/lex_conf.re" { opts.set_yyrestore (lex_conf_string ()); return; } -#line 2694 "src/parse/lex_conf.cc" +#line 2694 "src/ast/lex_conf.cc" yy622: yych = (unsigned char)*++cur; if (yych == 'I') goto yy670; @@ -2725,9 +2725,9 @@ yy629: goto yy14; yy630: ++cur; -#line 61 "../src/parse/lex_conf.re" +#line 61 "../src/ast/lex_conf.re" { opts.set_eager_skip(lex_conf_bool()); return; } -#line 2731 "src/parse/lex_conf.cc" +#line 2731 "src/ast/lex_conf.cc" yy632: yych = (unsigned char)*++cur; if (yych == 's') goto yy679; @@ -2757,9 +2757,9 @@ yy638: goto yy14; yy639: ++cur; -#line 57 "../src/parse/lex_conf.re" +#line 57 "../src/ast/lex_conf.re" { opts.set_version(!lex_conf_bool()); return; } -#line 2763 "src/parse/lex_conf.cc" +#line 2763 "src/ast/lex_conf.cc" yy641: yych = (unsigned char)*++cur; if (yych == 'u') goto yy685; @@ -2801,14 +2801,14 @@ yy650: goto yy14; yy651: ++cur; -#line 158 "../src/parse/lex_conf.re" +#line 158 "../src/ast/lex_conf.re" { opts.set_fill_arg_use (lex_conf_bool()); return; } -#line 2807 "src/parse/lex_conf.cc" +#line 2807 "src/ast/lex_conf.cc" yy653: ++cur; -#line 86 "../src/parse/lex_conf.re" +#line 86 "../src/ast/lex_conf.re" { opts.set_condDividerParam (lex_conf_string ()); return; } -#line 2812 "src/parse/lex_conf.cc" +#line 2812 "src/ast/lex_conf.cc" yy655: yych = (unsigned char)*++cur; if (yych == 'X') goto yy699; @@ -2819,9 +2819,9 @@ yy656: goto yy14; yy657: ++cur; -#line 77 "../src/parse/lex_conf.re" +#line 77 "../src/ast/lex_conf.re" { opts.set_yycondtype (lex_conf_string ()); return; } -#line 2825 "src/parse/lex_conf.cc" +#line 2825 "src/ast/lex_conf.cc" yy659: yych = (unsigned char)*++cur; if (yych == 'R') goto yy703; @@ -2832,9 +2832,9 @@ yy660: goto yy14; yy661: ++cur; -#line 157 "../src/parse/lex_conf.re" +#line 157 "../src/ast/lex_conf.re" { opts.set_fill_arg (lex_conf_string ()); return; } -#line 2838 "src/parse/lex_conf.cc" +#line 2838 "src/ast/lex_conf.cc" yy663: yych = (unsigned char)*++cur; if (yych == 'T') goto yy706; @@ -2844,14 +2844,14 @@ yy664: yych = (unsigned char)*(ptr = ++cur); if (yych == ':') goto yy707; yy665: -#line 91 "../src/parse/lex_conf.re" +#line 91 "../src/ast/lex_conf.re" { opts.set_state_get (lex_conf_string ()); return; } -#line 2850 "src/parse/lex_conf.cc" +#line 2850 "src/ast/lex_conf.cc" yy666: ++cur; -#line 130 "../src/parse/lex_conf.re" +#line 130 "../src/ast/lex_conf.re" { opts.set_yylessthan (lex_conf_string ()); return; } -#line 2855 "src/parse/lex_conf.cc" +#line 2855 "src/ast/lex_conf.cc" yy668: yych = (unsigned char)*++cur; if (yych == 'T') goto yy708; @@ -2870,9 +2870,9 @@ yy671: if (yych == ':') goto yy711; if (yych == '@') goto yy712; yy672: -#line 93 "../src/parse/lex_conf.re" +#line 93 "../src/ast/lex_conf.re" { opts.set_state_set (lex_conf_string ()); return; } -#line 2876 "src/parse/lex_conf.cc" +#line 2876 "src/ast/lex_conf.cc" yy673: ++cur; goto yy101; @@ -2898,9 +2898,9 @@ yy678: goto yy14; yy679: ++cur; -#line 74 "../src/parse/lex_conf.re" +#line 74 "../src/ast/lex_conf.re" { lex_conf_empty_class(); return; } -#line 2904 "src/parse/lex_conf.cc" +#line 2904 "src/ast/lex_conf.cc" yy681: yych = (unsigned char)*++cur; if (yych == 'l') goto yy718; @@ -2934,44 +2934,44 @@ yy688: goto yy123; yy689: ++cur; -#line 96 "../src/parse/lex_conf.re" +#line 96 "../src/ast/lex_conf.re" { opts.set_yyfilllabel (lex_conf_string ()); return; } -#line 2940 "src/parse/lex_conf.cc" +#line 2940 "src/ast/lex_conf.cc" yy691: ++cur; -#line 100 "../src/parse/lex_conf.re" +#line 100 "../src/ast/lex_conf.re" { opts.set_yyaccept (lex_conf_string ()); return; } -#line 2945 "src/parse/lex_conf.cc" +#line 2945 "src/ast/lex_conf.cc" yy693: ++cur; -#line 89 "../src/parse/lex_conf.re" +#line 89 "../src/ast/lex_conf.re" { opts.set_yyctable (lex_conf_string ()); return; } -#line 2950 "src/parse/lex_conf.cc" +#line 2950 "src/ast/lex_conf.cc" yy695: ++cur; -#line 169 "../src/parse/lex_conf.re" +#line 169 "../src/ast/lex_conf.re" { lex_conf_string (); return; } -#line 2955 "src/parse/lex_conf.cc" +#line 2955 "src/ast/lex_conf.cc" yy697: ++cur; -#line 114 "../src/parse/lex_conf.re" +#line 114 "../src/ast/lex_conf.re" { opts.set_yytarget (lex_conf_string ()); return; } -#line 2960 "src/parse/lex_conf.cc" +#line 2960 "src/ast/lex_conf.cc" yy699: ++cur; -#line 124 "../src/parse/lex_conf.re" +#line 124 "../src/ast/lex_conf.re" { opts.set_yybackupctx (lex_conf_string ()); return; } -#line 2965 "src/parse/lex_conf.cc" +#line 2965 "src/ast/lex_conf.cc" yy701: ++cur; -#line 125 "../src/parse/lex_conf.re" +#line 125 "../src/ast/lex_conf.re" { opts.set_yybackuptag (lex_conf_string ()); return; } -#line 2970 "src/parse/lex_conf.cc" +#line 2970 "src/ast/lex_conf.cc" yy703: ++cur; -#line 118 "../src/parse/lex_conf.re" +#line 118 "../src/ast/lex_conf.re" { opts.set_yyctxmarker (lex_conf_string ()); return; } -#line 2975 "src/parse/lex_conf.cc" +#line 2975 "src/ast/lex_conf.cc" yy705: yych = (unsigned char)*++cur; if (yych == 'd') goto yy726; @@ -3037,9 +3037,9 @@ yy720: goto yy14; yy721: ++cur; -#line 60 "../src/parse/lex_conf.re" +#line 60 "../src/ast/lex_conf.re" { opts.set_lookahead(!lex_conf_bool()); return; } -#line 3043 "src/parse/lex_conf.cc" +#line 3043 "src/ast/lex_conf.cc" yy723: yych = (unsigned char)*++cur; if (yych == 'e') goto yy745; @@ -3054,9 +3054,9 @@ yy725: goto yy14; yy726: ++cur; -#line 159 "../src/parse/lex_conf.re" +#line 159 "../src/ast/lex_conf.re" { opts.set_fill_naked (lex_conf_bool()); return; } -#line 3060 "src/parse/lex_conf.cc" +#line 3060 "src/ast/lex_conf.cc" yy728: yych = (unsigned char)*++cur; if (yych == 'O') goto yy748; @@ -3067,14 +3067,14 @@ yy729: goto yy14; yy730: ++cur; -#line 127 "../src/parse/lex_conf.re" +#line 127 "../src/ast/lex_conf.re" { opts.set_yyrestorectx (lex_conf_string ()); return; } -#line 3073 "src/parse/lex_conf.cc" +#line 3073 "src/ast/lex_conf.cc" yy732: ++cur; -#line 128 "../src/parse/lex_conf.re" +#line 128 "../src/ast/lex_conf.re" { opts.set_yyrestoretag (lex_conf_string ()); return; } -#line 3078 "src/parse/lex_conf.cc" +#line 3078 "src/ast/lex_conf.cc" yy734: yych = (unsigned char)*++cur; if (yych == 'O') goto yy750; @@ -3093,9 +3093,9 @@ yy737: goto yy14; yy738: ++cur; -#line 59 "../src/parse/lex_conf.re" +#line 59 "../src/ast/lex_conf.re" { opts.set_bCaseInverted(lex_conf_bool()); return; } -#line 3099 "src/parse/lex_conf.cc" +#line 3099 "src/ast/lex_conf.cc" yy740: yych = (unsigned char)*++cur; if (yych == 's') goto yy110; @@ -3165,9 +3165,9 @@ yy756: goto yy14; yy757: ++cur; -#line 55 "../src/parse/lex_conf.re" +#line 55 "../src/ast/lex_conf.re" { opts.set_posix_captures(lex_conf_bool()); return; } -#line 3171 "src/parse/lex_conf.cc" +#line 3171 "src/ast/lex_conf.cc" yy759: yych = (unsigned char)*++cur; if (yych == 'n') goto yy773; @@ -3180,9 +3180,9 @@ yy761: yych = (unsigned char)*(ptr = ++cur); if (yych == ':') goto yy774; yy762: -#line 78 "../src/parse/lex_conf.re" +#line 78 "../src/ast/lex_conf.re" { opts.set_cond_get (lex_conf_string ()); return; } -#line 3186 "src/parse/lex_conf.cc" +#line 3186 "src/ast/lex_conf.cc" yy763: yych = (unsigned char)*++cur; if (yych == 'e') goto yy775; @@ -3193,9 +3193,9 @@ yy764: if (yych == ':') goto yy776; if (yych == '@') goto yy777; yy765: -#line 80 "../src/parse/lex_conf.re" +#line 80 "../src/ast/lex_conf.re" { opts.set_cond_set (lex_conf_string ()); return; } -#line 3199 "src/parse/lex_conf.cc" +#line 3199 "src/ast/lex_conf.cc" yy766: yych = (unsigned char)*++cur; if (yych == 'e') goto yy778; @@ -3214,9 +3214,9 @@ yy769: goto yy14; yy770: ++cur; -#line 72 "../src/parse/lex_conf.re" +#line 72 "../src/ast/lex_conf.re" { lex_conf_encoding_policy(); return; } -#line 3220 "src/parse/lex_conf.cc" +#line 3220 "src/ast/lex_conf.cc" yy772: yych = (unsigned char)*++cur; if (yych == 'a') goto yy784; @@ -3251,14 +3251,14 @@ yy779: goto yy14; yy780: ++cur; -#line 58 "../src/parse/lex_conf.re" +#line 58 "../src/ast/lex_conf.re" { opts.set_bCaseInsensitive(lex_conf_bool()); return; } -#line 3257 "src/parse/lex_conf.cc" +#line 3257 "src/ast/lex_conf.cc" yy782: ++cur; -#line 75 "../src/parse/lex_conf.re" +#line 75 "../src/ast/lex_conf.re" { lex_conf_dfa_minimization(); return; } -#line 3262 "src/parse/lex_conf.cc" +#line 3262 "src/ast/lex_conf.cc" yy784: yych = (unsigned char)*++cur; if (yych == 't') goto yy795; @@ -3272,9 +3272,9 @@ yy786: goto yy14; yy787: ++cur; -#line 92 "../src/parse/lex_conf.re" +#line 92 "../src/ast/lex_conf.re" { opts.set_state_get_naked (lex_conf_bool()); return; } -#line 3278 "src/parse/lex_conf.cc" +#line 3278 "src/ast/lex_conf.cc" yy789: yych = (unsigned char)*++cur; if (yych == 'a') goto yy797; @@ -3285,14 +3285,14 @@ yy790: goto yy14; yy791: ++cur; -#line 94 "../src/parse/lex_conf.re" +#line 94 "../src/ast/lex_conf.re" { opts.set_state_set_naked (lex_conf_bool()); return; } -#line 3291 "src/parse/lex_conf.cc" +#line 3291 "src/ast/lex_conf.cc" yy793: ++cur; -#line 95 "../src/parse/lex_conf.re" +#line 95 "../src/ast/lex_conf.re" { opts.set_state_set_arg (lex_conf_string ()); return; } -#line 3296 "src/parse/lex_conf.cc" +#line 3296 "src/ast/lex_conf.cc" yy795: yych = (unsigned char)*++cur; if (yych == 'e') goto yy799; @@ -3311,9 +3311,9 @@ yy798: goto yy14; yy799: ++cur; -#line 56 "../src/parse/lex_conf.re" +#line 56 "../src/ast/lex_conf.re" { opts.set_bNoGenerationDate(lex_conf_bool()); return; } -#line 3317 "src/parse/lex_conf.cc" +#line 3317 "src/ast/lex_conf.cc" yy801: yych = (unsigned char)*++cur; if (yych == 'e') goto yy804; @@ -3336,21 +3336,21 @@ yy805: goto yy14; yy806: ++cur; -#line 81 "../src/parse/lex_conf.re" +#line 81 "../src/ast/lex_conf.re" { opts.set_cond_set_arg (lex_conf_string ()); return; } -#line 3342 "src/parse/lex_conf.cc" +#line 3342 "src/ast/lex_conf.cc" yy808: ++cur; -#line 79 "../src/parse/lex_conf.re" +#line 79 "../src/ast/lex_conf.re" { opts.set_cond_get_naked (lex_conf_bool()); return; } -#line 3347 "src/parse/lex_conf.cc" +#line 3347 "src/ast/lex_conf.cc" yy810: ++cur; -#line 82 "../src/parse/lex_conf.re" +#line 82 "../src/ast/lex_conf.re" { opts.set_cond_set_naked (lex_conf_bool()); return; } -#line 3352 "src/parse/lex_conf.cc" +#line 3352 "src/ast/lex_conf.cc" } -#line 170 "../src/parse/lex_conf.re" +#line 170 "../src/ast/lex_conf.re" } @@ -3358,7 +3358,7 @@ void Scanner::lex_conf_encoding_policy() { lex_conf_assign (); -#line 3362 "src/parse/lex_conf.cc" +#line 3362 "src/ast/lex_conf.cc" { unsigned char yych; if ((lim - cur) < 10) fill(10); @@ -3371,10 +3371,10 @@ void Scanner::lex_conf_encoding_policy() } ++cur; yy815: -#line 177 "../src/parse/lex_conf.re" +#line 177 "../src/ast/lex_conf.re" { fatal("bad configuration value" " (expected: 'ignore', 'substitute', 'fail')"); } -#line 3378 "src/parse/lex_conf.cc" +#line 3378 "src/ast/lex_conf.cc" yy816: yych = (unsigned char)*(ptr = ++cur); if (yych == 'a') goto yy819; @@ -3415,9 +3415,9 @@ yy825: goto yy820; yy826: ++cur; -#line 181 "../src/parse/lex_conf.re" +#line 181 "../src/ast/lex_conf.re" { opts.set_encoding_policy(Enc::POLICY_FAIL); goto end; } -#line 3421 "src/parse/lex_conf.cc" +#line 3421 "src/ast/lex_conf.cc" yy828: yych = (unsigned char)*++cur; if (yych == 'r') goto yy830; @@ -3436,9 +3436,9 @@ yy831: goto yy820; yy832: ++cur; -#line 179 "../src/parse/lex_conf.re" +#line 179 "../src/ast/lex_conf.re" { opts.set_encoding_policy(Enc::POLICY_IGNORE); goto end; } -#line 3442 "src/parse/lex_conf.cc" +#line 3442 "src/ast/lex_conf.cc" yy834: yych = (unsigned char)*++cur; if (yych != 't') goto yy820; @@ -3449,11 +3449,11 @@ yy834: yych = (unsigned char)*++cur; if (yych != 'e') goto yy820; ++cur; -#line 180 "../src/parse/lex_conf.re" +#line 180 "../src/ast/lex_conf.re" { opts.set_encoding_policy(Enc::POLICY_SUBSTITUTE); goto end; } -#line 3455 "src/parse/lex_conf.cc" +#line 3455 "src/ast/lex_conf.cc" } -#line 182 "../src/parse/lex_conf.re" +#line 182 "../src/ast/lex_conf.re" end: lex_conf_semicolon(); @@ -3463,7 +3463,7 @@ void Scanner::lex_conf_input() { lex_conf_assign (); -#line 3467 "src/parse/lex_conf.cc" +#line 3467 "src/ast/lex_conf.cc" { unsigned char yych; if ((lim - cur) < 7) fill(7); @@ -3474,10 +3474,10 @@ void Scanner::lex_conf_input() yy842: ++cur; yy843: -#line 191 "../src/parse/lex_conf.re" +#line 191 "../src/ast/lex_conf.re" { fatal("bad configuration value" " (expected: 'default', 'custom')"); } -#line 3481 "src/parse/lex_conf.cc" +#line 3481 "src/ast/lex_conf.cc" yy844: yych = (unsigned char)*(ptr = ++cur); if (yych == 'u') goto yy846; @@ -3522,18 +3522,18 @@ yy854: goto yy847; yy855: ++cur; -#line 194 "../src/parse/lex_conf.re" +#line 194 "../src/ast/lex_conf.re" { opts.set_input_api(INPUT_CUSTOM); goto end; } -#line 3528 "src/parse/lex_conf.cc" +#line 3528 "src/ast/lex_conf.cc" yy857: yych = (unsigned char)*++cur; if (yych != 't') goto yy847; ++cur; -#line 193 "../src/parse/lex_conf.re" +#line 193 "../src/ast/lex_conf.re" { opts.set_input_api(INPUT_DEFAULT); goto end; } -#line 3535 "src/parse/lex_conf.cc" +#line 3535 "src/ast/lex_conf.cc" } -#line 195 "../src/parse/lex_conf.re" +#line 195 "../src/ast/lex_conf.re" end: lex_conf_semicolon(); @@ -3543,7 +3543,7 @@ void Scanner::lex_conf_empty_class() { lex_conf_assign (); -#line 3547 "src/parse/lex_conf.cc" +#line 3547 "src/ast/lex_conf.cc" { unsigned char yych; if ((lim - cur) < 11) fill(11); @@ -3552,10 +3552,10 @@ void Scanner::lex_conf_empty_class() if (yych == 'm') goto yy865; ++cur; yy863: -#line 204 "../src/parse/lex_conf.re" +#line 204 "../src/ast/lex_conf.re" { fatal("bad configuration value" " (expected: 'match-empty', 'match-none', 'error')"); } -#line 3559 "src/parse/lex_conf.cc" +#line 3559 "src/ast/lex_conf.cc" yy864: yych = (unsigned char)*(ptr = ++cur); if (yych == 'r') goto yy866; @@ -3592,9 +3592,9 @@ yy872: goto yy867; yy873: ++cur; -#line 208 "../src/parse/lex_conf.re" +#line 208 "../src/ast/lex_conf.re" { opts.set_empty_class_policy(EMPTY_CLASS_ERROR); goto end; } -#line 3598 "src/parse/lex_conf.cc" +#line 3598 "src/ast/lex_conf.cc" yy875: yych = (unsigned char)*++cur; if (yych != '-') goto yy867; @@ -3632,16 +3632,16 @@ yy883: goto yy867; yy884: ++cur; -#line 207 "../src/parse/lex_conf.re" +#line 207 "../src/ast/lex_conf.re" { opts.set_empty_class_policy(EMPTY_CLASS_MATCH_NONE); goto end; } -#line 3638 "src/parse/lex_conf.cc" +#line 3638 "src/ast/lex_conf.cc" yy886: ++cur; -#line 206 "../src/parse/lex_conf.re" +#line 206 "../src/ast/lex_conf.re" { opts.set_empty_class_policy(EMPTY_CLASS_MATCH_EMPTY); goto end; } -#line 3643 "src/parse/lex_conf.cc" +#line 3643 "src/ast/lex_conf.cc" } -#line 209 "../src/parse/lex_conf.re" +#line 209 "../src/ast/lex_conf.re" end: lex_conf_semicolon(); @@ -3651,7 +3651,7 @@ void Scanner::lex_conf_dfa_minimization() { lex_conf_assign (); -#line 3655 "src/parse/lex_conf.cc" +#line 3655 "src/ast/lex_conf.cc" { unsigned char yych; if ((lim - cur) < 5) fill(5); @@ -3660,10 +3660,10 @@ void Scanner::lex_conf_dfa_minimization() if (yych == 't') goto yy893; ++cur; yy891: -#line 218 "../src/parse/lex_conf.re" +#line 218 "../src/ast/lex_conf.re" { fatal("bad configuration value" " (expected: 'table', 'moore')"); } -#line 3667 "src/parse/lex_conf.cc" +#line 3667 "src/ast/lex_conf.cc" yy892: yych = (unsigned char)*(ptr = ++cur); if (yych == 'o') goto yy894; @@ -3700,16 +3700,16 @@ yy900: goto yy895; yy901: ++cur; -#line 221 "../src/parse/lex_conf.re" +#line 221 "../src/ast/lex_conf.re" { opts.set_dfa_minimization(DFA_MINIMIZATION_MOORE); goto end; } -#line 3706 "src/parse/lex_conf.cc" +#line 3706 "src/ast/lex_conf.cc" yy903: ++cur; -#line 220 "../src/parse/lex_conf.re" +#line 220 "../src/ast/lex_conf.re" { opts.set_dfa_minimization(DFA_MINIMIZATION_TABLE); goto end; } -#line 3711 "src/parse/lex_conf.cc" +#line 3711 "src/ast/lex_conf.cc" } -#line 222 "../src/parse/lex_conf.re" +#line 222 "../src/ast/lex_conf.re" end: lex_conf_semicolon(); @@ -3730,7 +3730,7 @@ void Scanner::lex_conf_enc(Enc::type_t enc) void Scanner::lex_conf_assign () { -#line 3734 "src/parse/lex_conf.cc" +#line 3734 "src/ast/lex_conf.cc" { unsigned char yych; static const unsigned char yybm[] = { @@ -3777,9 +3777,9 @@ void Scanner::lex_conf_assign () } ++cur; yy908: -#line 242 "../src/parse/lex_conf.re" +#line 242 "../src/ast/lex_conf.re" { fatal ("missing '=' in configuration"); } -#line 3783 "src/parse/lex_conf.cc" +#line 3783 "src/ast/lex_conf.cc" yy909: yych = (unsigned char)*(ptr = ++cur); if (yych <= 0x1F) { @@ -3796,9 +3796,9 @@ yy910: if (yybm[0+yych] & 128) { goto yy910; } -#line 243 "../src/parse/lex_conf.re" +#line 243 "../src/ast/lex_conf.re" { return; } -#line 3802 "src/parse/lex_conf.cc" +#line 3802 "src/ast/lex_conf.cc" yy913: ++cur; if (lim <= cur) fill(1); @@ -3812,14 +3812,14 @@ yy913: cur = ptr; goto yy908; } -#line 244 "../src/parse/lex_conf.re" +#line 244 "../src/ast/lex_conf.re" } void Scanner::lex_conf_semicolon () { -#line 3823 "src/parse/lex_conf.cc" +#line 3823 "src/ast/lex_conf.cc" { unsigned char yych; static const unsigned char yybm[] = { @@ -3866,9 +3866,9 @@ void Scanner::lex_conf_semicolon () } ++cur; yy919: -#line 250 "../src/parse/lex_conf.re" +#line 250 "../src/ast/lex_conf.re" { fatal ("missing ending ';' in configuration"); } -#line 3872 "src/parse/lex_conf.cc" +#line 3872 "src/ast/lex_conf.cc" yy920: yych = (unsigned char)*(ptr = ++cur); if (yybm[0+yych] & 128) { @@ -3877,9 +3877,9 @@ yy920: if (yych != ';') goto yy919; yy921: ++cur; -#line 251 "../src/parse/lex_conf.re" +#line 251 "../src/ast/lex_conf.re" { return; } -#line 3883 "src/parse/lex_conf.cc" +#line 3883 "src/ast/lex_conf.cc" yy923: ++cur; if (lim <= cur) fill(1); @@ -3891,7 +3891,7 @@ yy923: cur = ptr; goto yy919; } -#line 252 "../src/parse/lex_conf.re" +#line 252 "../src/ast/lex_conf.re" } @@ -3905,7 +3905,7 @@ int32_t Scanner::lex_conf_number () lex_conf_assign (); tok = cur; -#line 3909 "src/parse/lex_conf.cc" +#line 3909 "src/ast/lex_conf.cc" { unsigned char yych; static const unsigned char yybm[] = { @@ -3959,7 +3959,7 @@ yy929: yy930: ++cur; yy931: -#line 266 "../src/parse/lex_conf.re" +#line 266 "../src/ast/lex_conf.re" { int32_t n = 0; if (!s_to_i32_unsafe (tok, cur, n)) @@ -3969,7 +3969,7 @@ yy931: lex_conf_semicolon (); return n; } -#line 3973 "src/parse/lex_conf.cc" +#line 3973 "src/ast/lex_conf.cc" yy932: ++cur; if (lim <= cur) fill(1); @@ -3979,7 +3979,7 @@ yy932: } goto yy931; } -#line 275 "../src/parse/lex_conf.re" +#line 275 "../src/ast/lex_conf.re" } @@ -3989,7 +3989,7 @@ std::string Scanner::lex_conf_string () std::string s; tok = cur; -#line 3993 "src/parse/lex_conf.cc" +#line 3993 "src/ast/lex_conf.cc" { unsigned char yych; static const unsigned char yybm[] = { @@ -4043,9 +4043,9 @@ std::string Scanner::lex_conf_string () if (yych != ';') goto yy937; } } -#line 302 "../src/parse/lex_conf.re" +#line 302 "../src/ast/lex_conf.re" { goto end; } -#line 4049 "src/parse/lex_conf.cc" +#line 4049 "src/ast/lex_conf.cc" yy937: ++cur; if (lim <= cur) fill(1); @@ -4053,15 +4053,15 @@ yy937: if (yybm[0+yych] & 128) { goto yy937; } -#line 298 "../src/parse/lex_conf.re" +#line 298 "../src/ast/lex_conf.re" { s = std::string(tok, tok_len()); goto end; } -#line 4062 "src/parse/lex_conf.cc" +#line 4062 "src/ast/lex_conf.cc" yy940: ++cur; -#line 284 "../src/parse/lex_conf.re" +#line 284 "../src/ast/lex_conf.re" { const char quote = tok[0]; for (bool end;;) { @@ -4076,9 +4076,9 @@ yy940: } } } -#line 4080 "src/parse/lex_conf.cc" +#line 4080 "src/ast/lex_conf.cc" } -#line 303 "../src/parse/lex_conf.re" +#line 303 "../src/ast/lex_conf.re" end: lex_conf_semicolon (); diff --git a/re2c/bootstrap/src/parse/parser.cc b/re2c/bootstrap/src/ast/parser.cc similarity index 99% rename from re2c/bootstrap/src/parse/parser.cc rename to re2c/bootstrap/src/ast/parser.cc index c1fdfb61..accdf331 100644 --- a/re2c/bootstrap/src/parse/parser.cc +++ b/re2c/bootstrap/src/ast/parser.cc @@ -78,16 +78,16 @@ #include #include "src/conf/msg.h" -#include "src/codegen/output.h" -#include "src/ir/compile.h" -#include "src/ir/adfa/adfa.h" -#include "src/ir/re/encoding/enc.h" -#include "src/ir/re/encoding/range_suffix.h" -#include "src/ir/skeleton/skeleton.h" -#include "src/parse/extop.h" -#include "src/parse/parser.h" -#include "src/parse/regexp.h" -#include "src/parse/scanner.h" +#include "src/code/output.h" +#include "src/compile.h" +#include "src/adfa/adfa.h" +#include "src/re/encoding/enc.h" +#include "src/re/encoding/range_suffix.h" +#include "src/skeleton/skeleton.h" +#include "src/ast/extop.h" +#include "src/ast/parser.h" +#include "src/ast/regexp.h" +#include "src/ast/scanner.h" #include "src/util/free_list.h" #include "src/util/range.h" @@ -251,8 +251,8 @@ static spec_t &find(specs_t &specs, const std::string &name) /* In a future release of Bison, this section will be replaced by #include "y.tab.h". */ -#ifndef YY_YY_BOOTSTRAP_SRC_PARSE_Y_TAB_H_INCLUDED -# define YY_YY_BOOTSTRAP_SRC_PARSE_Y_TAB_H_INCLUDED +#ifndef YY_YY_BOOTSTRAP_SRC_AST_Y_TAB_H_INCLUDED +# define YY_YY_BOOTSTRAP_SRC_AST_Y_TAB_H_INCLUDED /* Debug traces. */ #ifndef YYDEBUG # define YYDEBUG 0 @@ -303,7 +303,7 @@ extern YYSTYPE yylval; int yyparse (re2c::context_t &context); -#endif /* !YY_YY_BOOTSTRAP_SRC_PARSE_Y_TAB_H_INCLUDED */ +#endif /* !YY_YY_BOOTSTRAP_SRC_AST_Y_TAB_H_INCLUDED */ /* Copy the second part of user declarations. */ diff --git a/re2c/bootstrap/src/parse/y.tab.h b/re2c/bootstrap/src/ast/y.tab.h similarity index 93% rename from re2c/bootstrap/src/parse/y.tab.h rename to re2c/bootstrap/src/ast/y.tab.h index d077e39e..4bccc679 100644 --- a/re2c/bootstrap/src/parse/y.tab.h +++ b/re2c/bootstrap/src/ast/y.tab.h @@ -30,8 +30,8 @@ This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ -#ifndef YY_YY_BOOTSTRAP_SRC_PARSE_Y_TAB_H_INCLUDED -# define YY_YY_BOOTSTRAP_SRC_PARSE_Y_TAB_H_INCLUDED +#ifndef YY_YY_BOOTSTRAP_SRC_AST_Y_TAB_H_INCLUDED +# define YY_YY_BOOTSTRAP_SRC_AST_Y_TAB_H_INCLUDED /* Debug traces. */ #ifndef YYDEBUG # define YYDEBUG 0 @@ -82,4 +82,4 @@ extern YYSTYPE yylval; int yyparse (re2c::context_t &context); -#endif /* !YY_YY_BOOTSTRAP_SRC_PARSE_Y_TAB_H_INCLUDED */ +#endif /* !YY_YY_BOOTSTRAP_SRC_AST_Y_TAB_H_INCLUDED */ diff --git a/re2c/bootstrap/src/conf/parse_opts.cc b/re2c/bootstrap/src/conf/parse_opts.cc index 7064808b..549c183b 100644 --- a/re2c/bootstrap/src/conf/parse_opts.cc +++ b/re2c/bootstrap/src/conf/parse_opts.cc @@ -1,10 +1,10 @@ -/* Generated by re2c 0.16 on Sat Mar 4 18:55:56 2017 */ +/* Generated by re2c 0.16 on Sat Mar 4 23:19:21 2017 */ #line 1 "../src/conf/parse_opts.re" -#include "src/codegen/input_api.h" +#include "src/code/input_api.h" #include "src/conf/msg.h" #include "src/conf/opt.h" -#include "src/ir/re/empty_class_policy.h" -#include "src/ir/re/encoding/enc.h" +#include "src/re/empty_class_policy.h" +#include "src/re/encoding/enc.h" namespace re2c { diff --git a/re2c/src/ir/adfa/action.h b/re2c/src/adfa/action.h similarity index 92% rename from re2c/src/ir/adfa/action.h rename to re2c/src/adfa/action.h index 8202a7b8..7f95a3ca 100644 --- a/re2c/src/ir/adfa/action.h +++ b/re2c/src/adfa/action.h @@ -1,10 +1,10 @@ -#ifndef _RE2C_IR_ADFA_ACTION_ -#define _RE2C_IR_ADFA_ACTION_ +#ifndef _RE2C_ADFA_ACTION_ +#define _RE2C_ADFA_ACTION_ #include #include -#include "src/codegen/label.h" +#include "src/code/label.h" #include "src/util/c99_stdint.h" #include "src/util/uniq_vector.h" @@ -104,4 +104,4 @@ public: } // namespace re2c -#endif // _RE2C_IR_ADFA_ACTION_ +#endif // _RE2C_ADFA_ACTION_ diff --git a/re2c/src/ir/adfa/adfa.cc b/re2c/src/adfa/adfa.cc similarity index 96% rename from re2c/src/ir/adfa/adfa.cc rename to re2c/src/adfa/adfa.cc index f05cfb29..bb23c4f9 100644 --- a/re2c/src/ir/adfa/adfa.cc +++ b/re2c/src/adfa/adfa.cc @@ -4,10 +4,10 @@ #include #include -#include "src/codegen/go.h" -#include "src/ir/adfa/adfa.h" -#include "src/ir/dfa/dfa.h" -#include "src/ir/skeleton/skeleton.h" +#include "src/code/go.h" +#include "src/adfa/adfa.h" +#include "src/dfa/dfa.h" +#include "src/skeleton/skeleton.h" #include "src/util/allocate.h" namespace re2c diff --git a/re2c/src/ir/adfa/adfa.h b/re2c/src/adfa/adfa.h similarity index 88% rename from re2c/src/ir/adfa/adfa.h rename to re2c/src/adfa/adfa.h index c4020b3d..0d1d5942 100644 --- a/re2c/src/ir/adfa/adfa.h +++ b/re2c/src/adfa/adfa.h @@ -1,5 +1,5 @@ -#ifndef _RE2C_IR_ADFA_ADFA_ -#define _RE2C_IR_ADFA_ADFA_ +#ifndef _RE2C_ADFA_ADFA_ +#define _RE2C_ADFA_ADFA_ #include #include "src/util/c99_stdint.h" @@ -7,12 +7,12 @@ #include #include -#include "src/codegen/bitmap.h" -#include "src/codegen/go.h" -#include "src/codegen/label.h" -#include "src/ir/adfa/action.h" -#include "src/ir/rule.h" -#include "src/ir/tag.h" +#include "src/code/bitmap.h" +#include "src/code/go.h" +#include "src/code/label.h" +#include "src/adfa/action.h" +#include "src/rule.h" +#include "src/tag.h" #include "src/util/forbid_copy.h" namespace re2c @@ -112,4 +112,4 @@ private: } // namespace re2c -#endif // _RE2C_IR_ADFA_ADFA_ +#endif // _RE2C_ADFA_ADFA_ diff --git a/re2c/src/ir/adfa/dump.cc b/re2c/src/adfa/dump.cc similarity index 98% rename from re2c/src/ir/adfa/dump.cc rename to re2c/src/adfa/dump.cc index 5fe0f4e8..04ff2448 100644 --- a/re2c/src/ir/adfa/dump.cc +++ b/re2c/src/adfa/dump.cc @@ -1,6 +1,6 @@ #include -#include "src/ir/adfa/dump.h" +#include "src/adfa/dump.h" namespace re2c { diff --git a/re2c/src/adfa/dump.h b/re2c/src/adfa/dump.h new file mode 100644 index 00000000..1a3999f7 --- /dev/null +++ b/re2c/src/adfa/dump.h @@ -0,0 +1,13 @@ +#ifndef _RE2C_ADFA_DUMP_ +#define _RE2C_ADFA_DUMP_ + +#include "src/adfa/adfa.h" + +namespace re2c +{ + +void dump_adfa(const DFA &dfa); + +} // namespace re2c + +#endif // _RE2C_ADFA_DUMP_ diff --git a/re2c/src/ir/adfa/prepare.cc b/re2c/src/adfa/prepare.cc similarity index 98% rename from re2c/src/ir/adfa/prepare.cc rename to re2c/src/adfa/prepare.cc index 8bfe3b5d..35155e13 100644 --- a/re2c/src/ir/adfa/prepare.cc +++ b/re2c/src/adfa/prepare.cc @@ -2,11 +2,11 @@ #include #include -#include "src/codegen/bitmap.h" -#include "src/codegen/go.h" +#include "src/code/bitmap.h" +#include "src/code/go.h" #include "src/conf/msg.h" -#include "src/ir/adfa/action.h" -#include "src/ir/adfa/adfa.h" +#include "src/adfa/action.h" +#include "src/adfa/adfa.h" #include "src/util/allocate.h" namespace re2c { diff --git a/re2c/src/parse/extop.h b/re2c/src/ast/extop.h similarity index 60% rename from re2c/src/parse/extop.h rename to re2c/src/ast/extop.h index d093be92..970ffebc 100644 --- a/re2c/src/parse/extop.h +++ b/re2c/src/ast/extop.h @@ -1,5 +1,5 @@ -#ifndef _RE2C_PARSE_EXTOP_ -#define _RE2C_PARSE_EXTOP_ +#ifndef _RE2C_AST_EXTOP_ +#define _RE2C_AST_EXTOP_ #include "src/util/c99_stdint.h" @@ -14,4 +14,4 @@ struct ExtOp } // end namespace re2c -#endif // _RE2C_PARSE_EXTOP_ +#endif // _RE2C_AST_EXTOP_ diff --git a/re2c/src/parse/input.cc b/re2c/src/ast/input.cc similarity index 92% rename from re2c/src/parse/input.cc rename to re2c/src/ast/input.cc index 472e6b99..b06c1bd2 100644 --- a/re2c/src/parse/input.cc +++ b/re2c/src/ast/input.cc @@ -1,4 +1,4 @@ -#include "src/parse/input.h" +#include "src/ast/input.h" namespace re2c { diff --git a/re2c/src/parse/input.h b/re2c/src/ast/input.h similarity index 74% rename from re2c/src/parse/input.h rename to re2c/src/ast/input.h index f58e189e..f331e128 100644 --- a/re2c/src/parse/input.h +++ b/re2c/src/ast/input.h @@ -1,5 +1,5 @@ -#ifndef _RE2C_PARSE_INPUT_ -#define _RE2C_PARSE_INPUT_ +#ifndef _RE2C_AST_INPUT_ +#define _RE2C_AST_INPUT_ #include #include @@ -22,4 +22,4 @@ struct Input } // namespace re2c -#endif // _RE2C_PARSE_INPUT_ +#endif // _RE2C_AST_INPUT_ diff --git a/re2c/src/parse/lex.re b/re2c/src/ast/lex.re similarity index 98% rename from re2c/src/parse/lex.re rename to re2c/src/ast/lex.re index 464eeda8..5918717a 100644 --- a/re2c/src/parse/lex.re +++ b/re2c/src/ast/lex.re @@ -5,14 +5,14 @@ #include #include -#include "src/codegen/output.h" -#include "src/ir/re/encoding/enc.h" -#include "src/parse/extop.h" -#include "src/parse/input.h" -#include "src/parse/regexp.h" -#include "src/parse/scanner.h" -#include "src/parse/parser.h" // needed by "y.tab.h" -#include "src/parse/unescape.h" +#include "src/code/output.h" +#include "src/re/encoding/enc.h" +#include "src/ast/extop.h" +#include "src/ast/input.h" +#include "src/ast/regexp.h" +#include "src/ast/scanner.h" +#include "src/ast/parser.h" // needed by "y.tab.h" +#include "src/ast/unescape.h" #include "src/util/range.h" #include "src/util/s_to_n32_unsafe.h" #include "y.tab.h" diff --git a/re2c/src/parse/lex_conf.re b/re2c/src/ast/lex_conf.re similarity index 99% rename from re2c/src/parse/lex_conf.re rename to re2c/src/ast/lex_conf.re index 6af3c466..7f079a74 100644 --- a/re2c/src/parse/lex_conf.re +++ b/re2c/src/ast/lex_conf.re @@ -1,9 +1,9 @@ #include "src/util/c99_stdint.h" #include -#include "src/codegen/output.h" -#include "src/ir/re/encoding/enc.h" -#include "src/parse/scanner.h" +#include "src/code/output.h" +#include "src/re/encoding/enc.h" +#include "src/ast/scanner.h" #include "src/util/s_to_n32_unsafe.h" namespace re2c diff --git a/re2c/src/parse/parser.h b/re2c/src/ast/parser.h similarity index 78% rename from re2c/src/parse/parser.h rename to re2c/src/ast/parser.h index 7153fb55..4d988a71 100644 --- a/re2c/src/parse/parser.h +++ b/re2c/src/ast/parser.h @@ -1,12 +1,12 @@ -#ifndef _RE2C_PARSE_PARSER_ -#define _RE2C_PARSE_PARSER_ +#ifndef _RE2C_AST_PARSER_ +#define _RE2C_AST_PARSER_ #include #include -#include "src/codegen/output.h" -#include "src/parse/regexp.h" -#include "src/parse/scanner.h" +#include "src/code/output.h" +#include "src/ast/regexp.h" +#include "src/ast/scanner.h" #include "src/util/smart_ptr.h" namespace re2c @@ -41,4 +41,4 @@ struct context_t } // namespace re2c -#endif // _RE2C_PARSE_PARSER_ +#endif // _RE2C_AST_PARSER_ diff --git a/re2c/src/parse/parser.ypp b/re2c/src/ast/parser.ypp similarity index 96% rename from re2c/src/parse/parser.ypp rename to re2c/src/ast/parser.ypp index c85b20ab..be1adc4a 100644 --- a/re2c/src/parse/parser.ypp +++ b/re2c/src/ast/parser.ypp @@ -13,16 +13,16 @@ #include #include "src/conf/msg.h" -#include "src/codegen/output.h" -#include "src/ir/compile.h" -#include "src/ir/adfa/adfa.h" -#include "src/ir/re/encoding/enc.h" -#include "src/ir/re/encoding/range_suffix.h" -#include "src/ir/skeleton/skeleton.h" -#include "src/parse/extop.h" -#include "src/parse/parser.h" -#include "src/parse/regexp.h" -#include "src/parse/scanner.h" +#include "src/code/output.h" +#include "src/compile.h" +#include "src/adfa/adfa.h" +#include "src/re/encoding/enc.h" +#include "src/re/encoding/range_suffix.h" +#include "src/skeleton/skeleton.h" +#include "src/ast/extop.h" +#include "src/ast/parser.h" +#include "src/ast/regexp.h" +#include "src/ast/scanner.h" #include "src/util/free_list.h" #include "src/util/range.h" diff --git a/re2c/src/parse/regexp.cc b/re2c/src/ast/regexp.cc similarity index 94% rename from re2c/src/parse/regexp.cc rename to re2c/src/ast/regexp.cc index 3aea6c38..f516fbe0 100644 --- a/re2c/src/parse/regexp.cc +++ b/re2c/src/ast/regexp.cc @@ -1,6 +1,6 @@ #include -#include "src/parse/regexp.h" +#include "src/ast/regexp.h" namespace re2c { diff --git a/re2c/src/parse/regexp.h b/re2c/src/ast/regexp.h similarity index 96% rename from re2c/src/parse/regexp.h rename to re2c/src/ast/regexp.h index f0fa408e..9ea7297e 100644 --- a/re2c/src/parse/regexp.h +++ b/re2c/src/ast/regexp.h @@ -1,5 +1,5 @@ -#ifndef _RE2C_PARSE_REGEXP_ -#define _RE2C_PARSE_REGEXP_ +#ifndef _RE2C_AST_REGEXP_ +#define _RE2C_AST_REGEXP_ #include "src/util/c99_stdint.h" #include @@ -7,7 +7,7 @@ #include #include "src/conf/warn.h" -#include "src/ir/rule.h" +#include "src/rule.h" #include "src/util/free_list.h" #include "src/util/range.h" @@ -173,4 +173,4 @@ struct RegExpRule } // end namespace re2c -#endif // _RE2C_PARSE_REGEXP_ +#endif // _RE2C_AST_REGEXP_ diff --git a/re2c/src/parse/scanner.cc b/re2c/src/ast/scanner.cc similarity index 97% rename from re2c/src/parse/scanner.cc rename to re2c/src/ast/scanner.cc index e92ceaac..55a697d5 100644 --- a/re2c/src/parse/scanner.cc +++ b/re2c/src/ast/scanner.cc @@ -5,9 +5,9 @@ #include #include -#include "src/codegen/label.h" -#include "src/codegen/output.h" -#include "src/parse/scanner.h" +#include "src/code/label.h" +#include "src/code/output.h" +#include "src/ast/scanner.h" #include "src/util/counter.h" // used by Scanner::fatal_at and Scanner::fatalf diff --git a/re2c/src/parse/scanner.h b/re2c/src/ast/scanner.h similarity index 96% rename from re2c/src/parse/scanner.h rename to re2c/src/ast/scanner.h index c4610b49..c00fce3c 100644 --- a/re2c/src/parse/scanner.h +++ b/re2c/src/ast/scanner.h @@ -1,5 +1,5 @@ -#ifndef _RE2C_PARSE_SCANNER_ -#define _RE2C_PARSE_SCANNER_ +#ifndef _RE2C_AST_SCANNER_ +#define _RE2C_AST_SCANNER_ #include "src/util/c99_stdint.h" #include @@ -7,7 +7,7 @@ #include "src/conf/opt.h" #include "src/conf/warn.h" -#include "src/parse/input.h" +#include "src/ast/input.h" #include "src/util/attribute.h" #include "src/util/forbid_copy.h" @@ -144,4 +144,4 @@ inline void Scanner::fatal(const char *msg) const } // end namespace re2c -#endif // _RE2C_PARSE_SCANNER_ +#endif // _RE2C_AST_SCANNER_ diff --git a/re2c/src/parse/unescape.cc b/re2c/src/ast/unescape.cc similarity index 97% rename from re2c/src/parse/unescape.cc rename to re2c/src/ast/unescape.cc index 0c17139f..e685cdc6 100644 --- a/re2c/src/parse/unescape.cc +++ b/re2c/src/ast/unescape.cc @@ -1,4 +1,4 @@ -#include "src/parse/unescape.h" +#include "src/ast/unescape.h" namespace re2c { diff --git a/re2c/src/parse/unescape.h b/re2c/src/ast/unescape.h similarity index 67% rename from re2c/src/parse/unescape.h rename to re2c/src/ast/unescape.h index 000c378d..a37e6da8 100644 --- a/re2c/src/parse/unescape.h +++ b/re2c/src/ast/unescape.h @@ -1,5 +1,5 @@ -#ifndef _RE2C_PARSE_UNESCAPE_ -#define _RE2C_PARSE_UNESCAPE_ +#ifndef _RE2C_AST_UNESCAPE_ +#define _RE2C_AST_UNESCAPE_ #include "src/util/c99_stdint.h" @@ -10,4 +10,4 @@ uint32_t unesc_oct (const char * s, const char * s_end); } // namespace re2c -#endif // _RE2C_PARSE_UNESCAPE_ +#endif // _RE2C_AST_UNESCAPE_ diff --git a/re2c/src/codegen/bitmap.cc b/re2c/src/code/bitmap.cc similarity index 96% rename from re2c/src/codegen/bitmap.cc rename to re2c/src/code/bitmap.cc index e6f1d1bc..dfc3d171 100644 --- a/re2c/src/codegen/bitmap.cc +++ b/re2c/src/code/bitmap.cc @@ -1,9 +1,9 @@ #include // min #include // memset -#include "src/codegen/bitmap.h" -#include "src/codegen/go.h" -#include "src/codegen/output.h" +#include "src/code/bitmap.h" +#include "src/code/go.h" +#include "src/code/output.h" namespace re2c { diff --git a/re2c/src/codegen/bitmap.h b/re2c/src/code/bitmap.h similarity index 88% rename from re2c/src/codegen/bitmap.h rename to re2c/src/code/bitmap.h index c6cfceb1..d8c63e14 100644 --- a/re2c/src/codegen/bitmap.h +++ b/re2c/src/code/bitmap.h @@ -1,5 +1,5 @@ -#ifndef _RE2C_CODEGEN_BITMAP_ -#define _RE2C_CODEGEN_BITMAP_ +#ifndef _RE2C_CODE_BITMAP_ +#define _RE2C_CODE_BITMAP_ #include "src/util/c99_stdint.h" #include @@ -45,4 +45,4 @@ public: } // namespace re2c -#endif // _RE2C_CODEGEN_BITMAP_ +#endif // _RE2C_CODE_BITMAP_ diff --git a/re2c/src/codegen/emit.h b/re2c/src/code/emit.h similarity index 86% rename from re2c/src/codegen/emit.h rename to re2c/src/code/emit.h index 2dd9f938..2bcd9afa 100644 --- a/re2c/src/codegen/emit.h +++ b/re2c/src/code/emit.h @@ -1,8 +1,8 @@ -#ifndef _RE2C_CODEGEN_EMIT_ -#define _RE2C_CODEGEN_EMIT_ +#ifndef _RE2C_CODE_EMIT_ +#define _RE2C_CODE_EMIT_ -#include "src/codegen/output.h" -#include "src/ir/adfa/adfa.h" +#include "src/code/output.h" +#include "src/adfa/adfa.h" namespace re2c { @@ -26,4 +26,4 @@ inline std::string indent(uint32_t n, const std::string s) } // namespace re2c -#endif // _RE2C_CODEGEN_EMIT_ +#endif // _RE2C_CODE_EMIT_ diff --git a/re2c/src/codegen/emit_action.cc b/re2c/src/code/emit_action.cc similarity index 98% rename from re2c/src/codegen/emit_action.cc rename to re2c/src/code/emit_action.cc index b6050099..19941cb2 100644 --- a/re2c/src/codegen/emit_action.cc +++ b/re2c/src/code/emit_action.cc @@ -3,13 +3,13 @@ #include #include -#include "src/codegen/emit.h" -#include "src/codegen/input_api.h" -#include "src/codegen/output.h" -#include "src/ir/adfa/action.h" -#include "src/ir/adfa/adfa.h" -#include "src/ir/skeleton/skeleton.h" -#include "src/parse/regexp.h" +#include "src/code/emit.h" +#include "src/code/input_api.h" +#include "src/code/output.h" +#include "src/adfa/action.h" +#include "src/adfa/adfa.h" +#include "src/skeleton/skeleton.h" +#include "src/ast/regexp.h" #include "src/util/string_utils.h" namespace re2c diff --git a/re2c/src/codegen/emit_dfa.cc b/re2c/src/code/emit_dfa.cc similarity index 95% rename from re2c/src/codegen/emit_dfa.cc rename to re2c/src/code/emit_dfa.cc index ff4d9e27..78f55c0e 100644 --- a/re2c/src/codegen/emit_dfa.cc +++ b/re2c/src/code/emit_dfa.cc @@ -5,15 +5,15 @@ #include #include -#include "src/codegen/bitmap.h" -#include "src/codegen/emit.h" -#include "src/codegen/go.h" -#include "src/codegen/input_api.h" -#include "src/codegen/label.h" -#include "src/codegen/output.h" -#include "src/ir/adfa/action.h" -#include "src/ir/adfa/adfa.h" -#include "src/ir/skeleton/skeleton.h" +#include "src/code/bitmap.h" +#include "src/code/emit.h" +#include "src/code/go.h" +#include "src/code/input_api.h" +#include "src/code/label.h" +#include "src/code/output.h" +#include "src/adfa/action.h" +#include "src/adfa/adfa.h" +#include "src/skeleton/skeleton.h" #include "src/util/counter.h" #include "src/util/string_utils.h" diff --git a/re2c/src/codegen/go.h b/re2c/src/code/go.h similarity index 96% rename from re2c/src/codegen/go.h rename to re2c/src/code/go.h index c94a5ccd..3d1cde90 100644 --- a/re2c/src/codegen/go.h +++ b/re2c/src/code/go.h @@ -1,12 +1,12 @@ -#ifndef _RE2C_CODEGEN_GO_ -#define _RE2C_CODEGEN_GO_ +#ifndef _RE2C_CODE_GO_ +#define _RE2C_CODE_GO_ #include #include #include -#include "src/codegen/output.h" -#include "src/ir/tcmd.h" +#include "src/code/output.h" +#include "src/tcmd.h" #include "src/util/c99_stdint.h" #include "src/util/forbid_copy.h" @@ -237,4 +237,4 @@ bool consume(const State *s); } // namespace re2c -#endif // _RE2C_CODEGEN_GO_ +#endif // _RE2C_CODE_GO_ diff --git a/re2c/src/codegen/go_construct.cc b/re2c/src/code/go_construct.cc similarity index 98% rename from re2c/src/codegen/go_construct.cc rename to re2c/src/code/go_construct.cc index 6699263f..a0b04aa0 100644 --- a/re2c/src/codegen/go_construct.cc +++ b/re2c/src/code/go_construct.cc @@ -4,9 +4,9 @@ #include #include -#include "src/codegen/bitmap.h" -#include "src/codegen/go.h" -#include "src/ir/adfa/adfa.h" +#include "src/code/bitmap.h" +#include "src/code/go.h" +#include "src/adfa/adfa.h" #include "src/util/allocate.h" namespace re2c diff --git a/re2c/src/codegen/go_destruct.cc b/re2c/src/code/go_destruct.cc similarity index 97% rename from re2c/src/codegen/go_destruct.cc rename to re2c/src/code/go_destruct.cc index 3f07d9a0..062652cf 100644 --- a/re2c/src/codegen/go_destruct.cc +++ b/re2c/src/code/go_destruct.cc @@ -2,7 +2,7 @@ #include #include -#include "src/codegen/go.h" +#include "src/code/go.h" namespace re2c { diff --git a/re2c/src/codegen/go_emit.cc b/re2c/src/code/go_emit.cc similarity index 95% rename from re2c/src/codegen/go_emit.cc rename to re2c/src/code/go_emit.cc index 59d5166d..313149fb 100644 --- a/re2c/src/codegen/go_emit.cc +++ b/re2c/src/code/go_emit.cc @@ -4,15 +4,15 @@ #include #include -#include "src/codegen/bitmap.h" -#include "src/codegen/go.h" -#include "src/codegen/emit.h" -#include "src/codegen/input_api.h" -#include "src/codegen/label.h" -#include "src/codegen/output.h" -#include "src/codegen/print.h" -#include "src/ir/adfa/adfa.h" -#include "src/ir/re/encoding/enc.h" +#include "src/code/bitmap.h" +#include "src/code/go.h" +#include "src/code/emit.h" +#include "src/code/input_api.h" +#include "src/code/label.h" +#include "src/code/output.h" +#include "src/code/print.h" +#include "src/adfa/adfa.h" +#include "src/re/encoding/enc.h" namespace re2c { diff --git a/re2c/src/codegen/go_used_labels.cc b/re2c/src/code/go_used_labels.cc similarity index 95% rename from re2c/src/codegen/go_used_labels.cc rename to re2c/src/code/go_used_labels.cc index e16a4031..e5e064b0 100644 --- a/re2c/src/codegen/go_used_labels.cc +++ b/re2c/src/code/go_used_labels.cc @@ -4,9 +4,9 @@ #include #include -#include "src/codegen/go.h" -#include "src/codegen/label.h" -#include "src/ir/adfa/adfa.h" +#include "src/code/go.h" +#include "src/code/label.h" +#include "src/adfa/adfa.h" namespace re2c { diff --git a/re2c/src/codegen/input_api.cc b/re2c/src/code/input_api.cc similarity index 98% rename from re2c/src/codegen/input_api.cc rename to re2c/src/code/input_api.cc index 68fc5c3c..ce7c3d64 100644 --- a/re2c/src/codegen/input_api.cc +++ b/re2c/src/code/input_api.cc @@ -1,8 +1,8 @@ #include #include -#include "src/codegen/emit.h" -#include "src/codegen/input_api.h" +#include "src/code/emit.h" +#include "src/code/input_api.h" namespace re2c { diff --git a/re2c/src/codegen/input_api.h b/re2c/src/code/input_api.h similarity index 92% rename from re2c/src/codegen/input_api.h rename to re2c/src/code/input_api.h index 00c26d62..a5b95b3e 100644 --- a/re2c/src/codegen/input_api.h +++ b/re2c/src/code/input_api.h @@ -1,5 +1,5 @@ -#ifndef _RE2C_CODEGEN_INPUT_API_ -#define _RE2C_CODEGEN_INPUT_API_ +#ifndef _RE2C_CODE_INPUT_API_ +#define _RE2C_CODE_INPUT_API_ #include "src/util/c99_stdint.h" #include @@ -32,4 +32,4 @@ void output_backup_peek_skip (std::ostream &o, uint32_t ind, const opt_t *opts); } // end namespace re2c -#endif // _RE2C_CODEGEN_INPUT_API_ +#endif // _RE2C_CODE_INPUT_API_ diff --git a/re2c/src/codegen/label.cc b/re2c/src/code/label.cc similarity index 94% rename from re2c/src/codegen/label.cc rename to re2c/src/code/label.cc index c2e384fb..12e1ee24 100644 --- a/re2c/src/codegen/label.cc +++ b/re2c/src/code/label.cc @@ -1,6 +1,6 @@ #include -#include "src/codegen/label.h" +#include "src/code/label.h" namespace re2c { diff --git a/re2c/src/codegen/label.h b/re2c/src/code/label.h similarity index 88% rename from re2c/src/codegen/label.h rename to re2c/src/code/label.h index cb2179d3..ca184d6b 100644 --- a/re2c/src/codegen/label.h +++ b/re2c/src/code/label.h @@ -1,5 +1,5 @@ -#ifndef _RE2C_CODEGEN_LABEL_ -#define _RE2C_CODEGEN_LABEL_ +#ifndef _RE2C_CODE_LABEL_ +#define _RE2C_CODE_LABEL_ #include // ostream @@ -36,4 +36,4 @@ public: } // namespace re2c -#endif // _RE2C_CODEGEN_LABEL_ +#endif // _RE2C_CODE_LABEL_ diff --git a/re2c/src/codegen/output.cc b/re2c/src/code/output.cc similarity index 99% rename from re2c/src/codegen/output.cc rename to re2c/src/code/output.cc index c06c1ae1..63a8fe35 100644 --- a/re2c/src/codegen/output.cc +++ b/re2c/src/code/output.cc @@ -2,9 +2,9 @@ #include #include -#include "src/codegen/emit.h" -#include "src/codegen/output.h" -#include "src/codegen/print.h" +#include "src/code/emit.h" +#include "src/code/output.h" +#include "src/code/print.h" #include "src/conf/msg.h" #include "src/util/string_utils.h" diff --git a/re2c/src/codegen/output.h b/re2c/src/code/output.h similarity index 97% rename from re2c/src/codegen/output.h rename to re2c/src/code/output.h index 7fa60f3f..cafa5106 100644 --- a/re2c/src/codegen/output.h +++ b/re2c/src/code/output.h @@ -1,5 +1,5 @@ -#ifndef _RE2C_CODEGEN_OUTPUT_ -#define _RE2C_CODEGEN_OUTPUT_ +#ifndef _RE2C_CODE_OUTPUT_ +#define _RE2C_CODE_OUTPUT_ #include "src/util/c99_stdint.h" #include @@ -10,7 +10,7 @@ #include #include -#include "src/codegen/label.h" +#include "src/code/label.h" #include "src/conf/opt.h" #include "src/conf/warn.h" #include "src/util/counter.h" @@ -175,4 +175,4 @@ void output_yymaxfill (std::ostream &o, size_t max_fill); } // namespace re2c -#endif // _RE2C_CODEGEN_OUTPUT_ +#endif // _RE2C_CODE_OUTPUT_ diff --git a/re2c/src/codegen/print.cc b/re2c/src/code/print.cc similarity index 98% rename from re2c/src/codegen/print.cc rename to re2c/src/code/print.cc index 6a157acc..d6c66c16 100644 --- a/re2c/src/codegen/print.cc +++ b/re2c/src/code/print.cc @@ -1,6 +1,6 @@ #include -#include "src/codegen/print.h" +#include "src/code/print.h" namespace re2c { diff --git a/re2c/src/codegen/print.h b/re2c/src/code/print.h similarity index 81% rename from re2c/src/codegen/print.h rename to re2c/src/code/print.h index 7e2adddc..444441b0 100644 --- a/re2c/src/codegen/print.h +++ b/re2c/src/code/print.h @@ -1,5 +1,5 @@ -#ifndef _RE2C_CODEGEN_PRINT_ -#define _RE2C_CODEGEN_PRINT_ +#ifndef _RE2C_CODE_PRINT_ +#define _RE2C_CODE_PRINT_ #include "src/util/c99_stdint.h" #include @@ -14,4 +14,4 @@ void printSpan (std::ostream &o, uint32_t l, uint32_t u, uint32_t szcunit, bool } // end namespace re2c -#endif // _RE2C_CODEGEN_PRINT_ +#endif // _RE2C_CODE_PRINT_ diff --git a/re2c/src/ir/compile.cc b/re2c/src/compile.cc similarity index 89% rename from re2c/src/ir/compile.cc rename to re2c/src/compile.cc index 58a210be..aaebe305 100644 --- a/re2c/src/ir/compile.cc +++ b/re2c/src/compile.cc @@ -2,15 +2,15 @@ #include #include -#include "src/codegen/output.h" -#include "src/ir/compile.h" -#include "src/ir/adfa/adfa.h" -#include "src/ir/adfa/dump.h" -#include "src/ir/dfa/dfa.h" -#include "src/ir/dfa/dump.h" -#include "src/ir/nfa/nfa.h" -#include "src/ir/skeleton/skeleton.h" -#include "src/parse/regexp.h" +#include "src/code/output.h" +#include "src/compile.h" +#include "src/adfa/adfa.h" +#include "src/adfa/dump.h" +#include "src/dfa/dfa.h" +#include "src/dfa/dump.h" +#include "src/nfa/nfa.h" +#include "src/skeleton/skeleton.h" +#include "src/ast/regexp.h" namespace re2c { diff --git a/re2c/src/ir/compile.h b/re2c/src/compile.h similarity index 51% rename from re2c/src/ir/compile.h rename to re2c/src/compile.h index d268d7a6..fd41edbf 100644 --- a/re2c/src/ir/compile.h +++ b/re2c/src/compile.h @@ -1,7 +1,7 @@ -#ifndef _RE2C_IR_COMPILE_ -#define _RE2C_IR_COMPILE_ +#ifndef _RE2C_COMPILE_ +#define _RE2C_COMPILE_ -#include "src/parse/parser.h" +#include "src/ast/parser.h" namespace re2c { @@ -12,4 +12,4 @@ smart_ptr compile(const spec_t &spec, Output &output); } // namespace re2c -#endif // _RE2C_IR_COMPILE_ +#endif // _RE2C_COMPILE_ diff --git a/re2c/src/conf/opt.h b/re2c/src/conf/opt.h index b83fb33e..4a55db78 100644 --- a/re2c/src/conf/opt.h +++ b/re2c/src/conf/opt.h @@ -5,11 +5,11 @@ #include #include -#include "src/codegen/input_api.h" +#include "src/code/input_api.h" #include "src/conf/warn.h" -#include "src/ir/dfa/dfa.h" -#include "src/ir/re/empty_class_policy.h" -#include "src/ir/re/encoding/enc.h" +#include "src/dfa/dfa.h" +#include "src/re/empty_class_policy.h" +#include "src/re/encoding/enc.h" #include "src/util/forbid_copy.h" namespace re2c diff --git a/re2c/src/conf/parse_opts.re b/re2c/src/conf/parse_opts.re index d7ad30e7..918fe2e7 100644 --- a/re2c/src/conf/parse_opts.re +++ b/re2c/src/conf/parse_opts.re @@ -1,8 +1,8 @@ -#include "src/codegen/input_api.h" +#include "src/code/input_api.h" #include "src/conf/msg.h" #include "src/conf/opt.h" -#include "src/ir/re/empty_class_policy.h" -#include "src/ir/re/encoding/enc.h" +#include "src/re/empty_class_policy.h" +#include "src/re/encoding/enc.h" namespace re2c { diff --git a/re2c/src/conf/warn.cc b/re2c/src/conf/warn.cc index 42972189..ac383881 100644 --- a/re2c/src/conf/warn.cc +++ b/re2c/src/conf/warn.cc @@ -5,8 +5,8 @@ #include "src/conf/msg.h" #include "src/conf/warn.h" -#include "src/ir/skeleton/path.h" -#include "src/ir/skeleton/skeleton.h" +#include "src/skeleton/path.h" +#include "src/skeleton/skeleton.h" namespace re2c { diff --git a/re2c/src/conf/warn.h b/re2c/src/conf/warn.h index c9435f5d..6b93483a 100644 --- a/re2c/src/conf/warn.h +++ b/re2c/src/conf/warn.h @@ -5,7 +5,7 @@ #include #include -#include "src/ir/rule.h" +#include "src/rule.h" namespace re2c { diff --git a/re2c/src/ir/dfa/cfg/cfg.cc b/re2c/src/dfa/cfg/cfg.cc similarity index 99% rename from re2c/src/ir/dfa/cfg/cfg.cc rename to re2c/src/dfa/cfg/cfg.cc index bdf4a033..922c4de4 100644 --- a/re2c/src/ir/dfa/cfg/cfg.cc +++ b/re2c/src/dfa/cfg/cfg.cc @@ -1,6 +1,6 @@ #include -#include "src/ir/dfa/cfg/cfg.h" +#include "src/dfa/cfg/cfg.h" namespace re2c { diff --git a/re2c/src/ir/dfa/cfg/cfg.h b/re2c/src/dfa/cfg/cfg.h similarity index 87% rename from re2c/src/ir/dfa/cfg/cfg.h rename to re2c/src/dfa/cfg/cfg.h index b84f916f..cde1807d 100644 --- a/re2c/src/ir/dfa/cfg/cfg.h +++ b/re2c/src/dfa/cfg/cfg.h @@ -1,7 +1,7 @@ -#ifndef _RE2C_IR_DFA_CFG_CFG_ -#define _RE2C_IR_DFA_CFG_CFG_ +#ifndef _RE2C_DFA_CFG_CFG_ +#define _RE2C_DFA_CFG_CFG_ -#include "src/ir/dfa/dfa.h" +#include "src/dfa/dfa.h" namespace re2c { @@ -39,4 +39,4 @@ struct cfg_t } // namespace re2c -#endif // _RE2C_IR_DFA_CFG_CFG_ +#endif // _RE2C_DFA_CFG_CFG_ diff --git a/re2c/src/ir/dfa/cfg/compact.cc b/re2c/src/dfa/cfg/compact.cc similarity index 96% rename from re2c/src/ir/dfa/cfg/compact.cc rename to re2c/src/dfa/cfg/compact.cc index 8b9c0b79..d8a043e0 100644 --- a/re2c/src/ir/dfa/cfg/compact.cc +++ b/re2c/src/dfa/cfg/compact.cc @@ -1,4 +1,4 @@ -#include "src/ir/dfa/cfg/cfg.h" +#include "src/dfa/cfg/cfg.h" namespace re2c { diff --git a/re2c/src/ir/dfa/cfg/dce.cc b/re2c/src/dfa/cfg/dce.cc similarity index 94% rename from re2c/src/ir/dfa/cfg/dce.cc rename to re2c/src/dfa/cfg/dce.cc index a19d502e..5e62a7bb 100644 --- a/re2c/src/ir/dfa/cfg/dce.cc +++ b/re2c/src/dfa/cfg/dce.cc @@ -1,4 +1,4 @@ -#include "src/ir/dfa/cfg/cfg.h" +#include "src/dfa/cfg/cfg.h" namespace re2c { diff --git a/re2c/src/dfa/cfg/dump.cc b/re2c/src/dfa/cfg/dump.cc new file mode 100644 index 00000000..121ab536 --- /dev/null +++ b/re2c/src/dfa/cfg/dump.cc @@ -0,0 +1,59 @@ +#include + +#include "src/dfa/cfg/cfg.h" + +namespace re2c +{ + +void cfg_t::dump(const cfg_t &cfg, const bool *live) +{ + const tagver_t nver = cfg.dfa.maxtagver + 1; + const size_t ntag = cfg.dfa.tags.size(); + + fprintf(stderr, "digraph CFG {\n" + " rankdir=LR\n" + " node[shape=Mrecord fontname=Terminus height=0.2 width=0.2]\n" + " edge[arrowhead=vee fontname=Terminus]\n\n"); + + for (cfg_ix_t i = 0; i < cfg.nbbfall; ++i, live += nver) { + const cfg_bb_t *b = cfg.bblocks + i; + + fprintf(stderr, " n%u [label=\"%u\\n", i, i); + for (const tagsave_t *p = b->cmd->save; p; p = p->next) { + fprintf(stderr, "%i ", p->ver); + } + for (const tagcopy_t *p = b->cmd->copy; p; p = p->next) { + fprintf(stderr, "%i~%i ", p->lhs, p->rhs); + } + fprintf(stderr, "/"); + if (b->use) { + for (size_t t = 0; t < ntag; ++t) { + const tagver_t v = b->use[t]; + if (v != TAGVER_ZERO) { + fprintf(stderr, "%i ", v); + } + } + } + +if (i < cfg.nbbfin) { + fprintf(stderr, "\\nneed:"); + for (tagver_t v = 0; v < nver; ++v) { + if (live[v]) { + fprintf(stderr, " %i", v); + } + } +} + + fprintf(stderr, "\"]\n"); + + const char *style = b->use ? "dotted" : "solid"; + for (cfg_ix_t *j = b->succb; j < b->succe; ++j) { + fprintf(stderr, " n%u -> n%u [style=%s]\n", i, *j, style); + } + } + + fprintf(stderr, "}\n"); +} + +} // namespace re2c + diff --git a/re2c/src/ir/dfa/cfg/interfere.cc b/re2c/src/dfa/cfg/interfere.cc similarity index 98% rename from re2c/src/ir/dfa/cfg/interfere.cc rename to re2c/src/dfa/cfg/interfere.cc index 88fc9428..e0a1b337 100644 --- a/re2c/src/ir/dfa/cfg/interfere.cc +++ b/re2c/src/dfa/cfg/interfere.cc @@ -1,6 +1,6 @@ #include -#include "src/ir/dfa/cfg/cfg.h" +#include "src/dfa/cfg/cfg.h" namespace re2c { diff --git a/re2c/src/ir/dfa/cfg/liveanal.cc b/re2c/src/dfa/cfg/liveanal.cc similarity index 99% rename from re2c/src/ir/dfa/cfg/liveanal.cc rename to re2c/src/dfa/cfg/liveanal.cc index 527df35d..11570446 100644 --- a/re2c/src/ir/dfa/cfg/liveanal.cc +++ b/re2c/src/dfa/cfg/liveanal.cc @@ -1,6 +1,6 @@ #include -#include "src/ir/dfa/cfg/cfg.h" +#include "src/dfa/cfg/cfg.h" namespace re2c { diff --git a/re2c/src/ir/dfa/cfg/normalize.cc b/re2c/src/dfa/cfg/normalize.cc similarity index 97% rename from re2c/src/ir/dfa/cfg/normalize.cc rename to re2c/src/dfa/cfg/normalize.cc index 238861fe..490225a0 100644 --- a/re2c/src/ir/dfa/cfg/normalize.cc +++ b/re2c/src/dfa/cfg/normalize.cc @@ -1,6 +1,6 @@ #include -#include "src/ir/dfa/cfg/cfg.h" +#include "src/dfa/cfg/cfg.h" namespace re2c { diff --git a/re2c/src/ir/dfa/cfg/optimize.cc b/re2c/src/dfa/cfg/optimize.cc similarity index 97% rename from re2c/src/ir/dfa/cfg/optimize.cc rename to re2c/src/dfa/cfg/optimize.cc index 84a2abad..bc877706 100644 --- a/re2c/src/ir/dfa/cfg/optimize.cc +++ b/re2c/src/dfa/cfg/optimize.cc @@ -1,5 +1,5 @@ -#include "src/ir/dfa/cfg/cfg.h" -#include "src/ir/dfa/dfa.h" +#include "src/dfa/cfg/cfg.h" +#include "src/dfa/dfa.h" namespace re2c { diff --git a/re2c/src/ir/dfa/cfg/rename.cc b/re2c/src/dfa/cfg/rename.cc similarity index 96% rename from re2c/src/ir/dfa/cfg/rename.cc rename to re2c/src/dfa/cfg/rename.cc index 77425f5c..9019edd2 100644 --- a/re2c/src/ir/dfa/cfg/rename.cc +++ b/re2c/src/dfa/cfg/rename.cc @@ -1,4 +1,4 @@ -#include "src/ir/dfa/cfg/cfg.h" +#include "src/dfa/cfg/cfg.h" namespace re2c { diff --git a/re2c/src/ir/dfa/cfg/varalloc.cc b/re2c/src/dfa/cfg/varalloc.cc similarity index 98% rename from re2c/src/ir/dfa/cfg/varalloc.cc rename to re2c/src/dfa/cfg/varalloc.cc index 6e173570..908224e5 100644 --- a/re2c/src/ir/dfa/cfg/varalloc.cc +++ b/re2c/src/dfa/cfg/varalloc.cc @@ -1,6 +1,6 @@ #include -#include "src/ir/dfa/cfg/cfg.h" +#include "src/dfa/cfg/cfg.h" namespace re2c { diff --git a/re2c/src/ir/dfa/closure.cc b/re2c/src/dfa/closure.cc similarity index 99% rename from re2c/src/ir/dfa/closure.cc rename to re2c/src/dfa/closure.cc index b656cbe7..a1823ce4 100644 --- a/re2c/src/ir/dfa/closure.cc +++ b/re2c/src/dfa/closure.cc @@ -1,7 +1,7 @@ #include -#include "src/ir/dfa/closure.h" -#include "src/ir/nfa/nfa.h" +#include "src/dfa/closure.h" +#include "src/nfa/nfa.h" #include "src/util/local_increment.h" namespace re2c diff --git a/re2c/src/ir/dfa/closure.h b/re2c/src/dfa/closure.h similarity index 80% rename from re2c/src/ir/dfa/closure.h rename to re2c/src/dfa/closure.h index 44b167c7..97684240 100644 --- a/re2c/src/ir/dfa/closure.h +++ b/re2c/src/dfa/closure.h @@ -1,11 +1,11 @@ -#ifndef _RE2C_IR_DFA_CLOSURE_ -#define _RE2C_IR_DFA_CLOSURE_ +#ifndef _RE2C_DFA_CLOSURE_ +#define _RE2C_DFA_CLOSURE_ #include "src/util/c99_stdint.h" -#include "src/ir/dfa/dfa.h" -#include "src/ir/dfa/tagtree.h" -#include "src/ir/nfa/nfa.h" +#include "src/dfa/dfa.h" +#include "src/dfa/tagtree.h" +#include "src/nfa/nfa.h" namespace re2c { @@ -31,4 +31,4 @@ void closure(closure_t &clos1, closure_t &clos2, Tagpool &tagpool, tagtree_t &ta } // namespace re2c -#endif // _RE2C_IR_DFA_CLOSURE_ +#endif // _RE2C_DFA_CLOSURE_ diff --git a/re2c/src/ir/dfa/dead_rules.cc b/re2c/src/dfa/dead_rules.cc similarity index 99% rename from re2c/src/ir/dfa/dead_rules.cc rename to re2c/src/dfa/dead_rules.cc index b6eefc5c..fce24f6f 100644 --- a/re2c/src/ir/dfa/dead_rules.cc +++ b/re2c/src/dfa/dead_rules.cc @@ -1,6 +1,6 @@ #include -#include "src/ir/dfa/dfa.h" +#include "src/dfa/dfa.h" #include "src/util/forbid_copy.h" namespace re2c diff --git a/re2c/src/ir/dfa/determinization.cc b/re2c/src/dfa/determinization.cc similarity index 95% rename from re2c/src/ir/dfa/determinization.cc rename to re2c/src/dfa/determinization.cc index ea9a94cb..2c20494e 100644 --- a/re2c/src/ir/dfa/determinization.cc +++ b/re2c/src/dfa/determinization.cc @@ -3,12 +3,12 @@ #include #include "src/conf/opt.h" -#include "src/ir/dfa/closure.h" -#include "src/ir/dfa/dfa.h" -#include "src/ir/dfa/dump.h" -#include "src/ir/dfa/find_state.h" -#include "src/ir/nfa/nfa.h" -#include "src/parse/regexp.h" +#include "src/dfa/closure.h" +#include "src/dfa/dfa.h" +#include "src/dfa/dump.h" +#include "src/dfa/find_state.h" +#include "src/nfa/nfa.h" +#include "src/ast/regexp.h" #include "src/util/range.h" namespace re2c diff --git a/re2c/src/ir/dfa/dfa.h b/re2c/src/dfa/dfa.h similarity index 86% rename from re2c/src/ir/dfa/dfa.h rename to re2c/src/dfa/dfa.h index b1bfbea5..c915b42d 100644 --- a/re2c/src/ir/dfa/dfa.h +++ b/re2c/src/dfa/dfa.h @@ -1,5 +1,5 @@ -#ifndef _RE2C_IR_DFA_DFA_ -#define _RE2C_IR_DFA_DFA_ +#ifndef _RE2C_DFA_DFA_ +#define _RE2C_DFA_DFA_ #include "src/util/c99_stdint.h" #include @@ -7,11 +7,11 @@ #include #include "src/conf/warn.h" -#include "src/ir/rule.h" -#include "src/ir/tag.h" -#include "src/ir/tcmd.h" -#include "src/ir/dfa/tagpool.h" -#include "src/parse/regexp.h" +#include "src/rule.h" +#include "src/tag.h" +#include "src/tcmd.h" +#include "src/dfa/tagpool.h" +#include "src/ast/regexp.h" #include "src/util/forbid_copy.h" namespace re2c @@ -82,4 +82,4 @@ void optimize_tags(dfa_t &dfa); } // namespace re2c -#endif // _RE2C_IR_DFA_DFA_ +#endif // _RE2C_DFA_DFA_ diff --git a/re2c/src/ir/dfa/dump.cc b/re2c/src/dfa/dump.cc similarity index 99% rename from re2c/src/ir/dfa/dump.cc rename to re2c/src/dfa/dump.cc index a00dc0cd..e475ef06 100644 --- a/re2c/src/ir/dfa/dump.cc +++ b/re2c/src/dfa/dump.cc @@ -1,6 +1,6 @@ #include -#include "src/ir/dfa/dump.h" +#include "src/dfa/dump.h" namespace re2c { diff --git a/re2c/src/ir/dfa/dump.h b/re2c/src/dfa/dump.h similarity index 82% rename from re2c/src/ir/dfa/dump.h rename to re2c/src/dfa/dump.h index ac8b4a48..075ebf0f 100644 --- a/re2c/src/ir/dfa/dump.h +++ b/re2c/src/dfa/dump.h @@ -1,8 +1,8 @@ -#ifndef _RE2C_IR_DFA_DUMP_ -#define _RE2C_IR_DFA_DUMP_ +#ifndef _RE2C_DFA_DUMP_ +#define _RE2C_DFA_DUMP_ -#include "src/ir/dfa/closure.h" -#include "src/ir/dfa/dfa.h" +#include "src/dfa/closure.h" +#include "src/dfa/dfa.h" namespace re2c { @@ -31,4 +31,4 @@ void dump_dfa(const dfa_t &dfa); } // namespace re2c -#endif // _RE2C_IR_DFA_DUMP_ +#endif // _RE2C_DFA_DUMP_ diff --git a/re2c/src/ir/dfa/fallback_tags.cc b/re2c/src/dfa/fallback_tags.cc similarity index 99% rename from re2c/src/ir/dfa/fallback_tags.cc rename to re2c/src/dfa/fallback_tags.cc index 3c1ccf40..a49bfaac 100644 --- a/re2c/src/ir/dfa/fallback_tags.cc +++ b/re2c/src/dfa/fallback_tags.cc @@ -1,4 +1,4 @@ -#include "src/ir/dfa/dfa.h" +#include "src/dfa/dfa.h" namespace re2c { diff --git a/re2c/src/ir/dfa/fillpoints.cc b/re2c/src/dfa/fillpoints.cc similarity index 99% rename from re2c/src/ir/dfa/fillpoints.cc rename to re2c/src/dfa/fillpoints.cc index 9a0b8394..130f17ee 100644 --- a/re2c/src/ir/dfa/fillpoints.cc +++ b/re2c/src/dfa/fillpoints.cc @@ -2,7 +2,7 @@ #include #include -#include "src/ir/dfa/dfa.h" +#include "src/dfa/dfa.h" namespace re2c { diff --git a/re2c/src/ir/dfa/find_state.cc b/re2c/src/dfa/find_state.cc similarity index 99% rename from re2c/src/ir/dfa/find_state.cc rename to re2c/src/dfa/find_state.cc index 37c171f8..8e2f1a97 100644 --- a/re2c/src/ir/dfa/find_state.cc +++ b/re2c/src/dfa/find_state.cc @@ -1,6 +1,6 @@ #include -#include "src/ir/dfa/find_state.h" +#include "src/dfa/find_state.h" #include "src/util/hash32.h" namespace re2c diff --git a/re2c/src/ir/dfa/find_state.h b/re2c/src/dfa/find_state.h similarity index 90% rename from re2c/src/ir/dfa/find_state.h rename to re2c/src/dfa/find_state.h index 8ae86e97..4b4393ec 100644 --- a/re2c/src/ir/dfa/find_state.h +++ b/re2c/src/dfa/find_state.h @@ -1,8 +1,8 @@ -#ifndef _RE2C_IR_DFA_FIND_STATE_ -#define _RE2C_IR_DFA_FIND_STATE_ +#ifndef _RE2C_DFA_FIND_STATE_ +#define _RE2C_DFA_FIND_STATE_ -#include "src/ir/dfa/closure.h" -#include "src/ir/dfa/dump.h" +#include "src/dfa/closure.h" +#include "src/dfa/dump.h" #include "src/util/forbid_copy.h" #include "src/util/lookup.h" @@ -76,4 +76,4 @@ void find_state(dfa_t &dfa, size_t state, size_t symbol, } // namespace re2c -#endif // _RE2C_IR_DFA_FIND_STATE_ +#endif // _RE2C_DFA_FIND_STATE_ diff --git a/re2c/src/ir/dfa/minimization.cc b/re2c/src/dfa/minimization.cc similarity index 99% rename from re2c/src/ir/dfa/minimization.cc rename to re2c/src/dfa/minimization.cc index 21c42c94..2f30ca43 100644 --- a/re2c/src/ir/dfa/minimization.cc +++ b/re2c/src/dfa/minimization.cc @@ -3,7 +3,7 @@ #include #include -#include "src/ir/dfa/dfa.h" +#include "src/dfa/dfa.h" namespace re2c { diff --git a/re2c/src/ir/dfa/tagpool.cc b/re2c/src/dfa/tagpool.cc similarity index 97% rename from re2c/src/ir/dfa/tagpool.cc rename to re2c/src/dfa/tagpool.cc index c8b35db8..37930d7e 100644 --- a/re2c/src/ir/dfa/tagpool.cc +++ b/re2c/src/dfa/tagpool.cc @@ -1,7 +1,7 @@ #include // malloc #include // memcpy, memcmp -#include "src/ir/dfa/tagpool.h" +#include "src/dfa/tagpool.h" #include "src/util/hash32.h" namespace re2c diff --git a/re2c/src/ir/dfa/tagpool.h b/re2c/src/dfa/tagpool.h similarity index 84% rename from re2c/src/ir/dfa/tagpool.h rename to re2c/src/dfa/tagpool.h index 13c55c2e..666d390c 100644 --- a/re2c/src/ir/dfa/tagpool.h +++ b/re2c/src/dfa/tagpool.h @@ -1,7 +1,7 @@ -#ifndef _RE2C_IR_DFA_TAGPOOL_ -#define _RE2C_IR_DFA_TAGPOOL_ +#ifndef _RE2C_DFA_TAGPOOL_ +#define _RE2C_DFA_TAGPOOL_ -#include "src/ir/tag.h" +#include "src/tag.h" #include "src/util/lookup.h" #include "src/util/forbid_copy.h" @@ -38,4 +38,4 @@ public: } // namespace re2c -#endif // _RE2C_IR_DFA_TAGPOOL_ +#endif // _RE2C_DFA_TAGPOOL_ diff --git a/re2c/src/ir/dfa/tagtree.cc b/re2c/src/dfa/tagtree.cc similarity index 97% rename from re2c/src/ir/dfa/tagtree.cc rename to re2c/src/dfa/tagtree.cc index fcc07075..ba82175e 100644 --- a/re2c/src/ir/dfa/tagtree.cc +++ b/re2c/src/dfa/tagtree.cc @@ -1,7 +1,7 @@ #include #include -#include "src/ir/dfa/tagtree.h" +#include "src/dfa/tagtree.h" namespace re2c { diff --git a/re2c/src/ir/dfa/tagtree.h b/re2c/src/dfa/tagtree.h similarity index 88% rename from re2c/src/ir/dfa/tagtree.h rename to re2c/src/dfa/tagtree.h index a14af3d0..0c8fb2e8 100644 --- a/re2c/src/ir/dfa/tagtree.h +++ b/re2c/src/dfa/tagtree.h @@ -1,9 +1,9 @@ -#ifndef _RE2C_IR_DFA_TAGTREE_ -#define _RE2C_IR_DFA_TAGTREE_ +#ifndef _RE2C_DFA_TAGTREE_ +#define _RE2C_DFA_TAGTREE_ #include -#include "src/ir/tag.h" +#include "src/tag.h" #include "src/util/forbid_copy.h" namespace re2c @@ -43,4 +43,4 @@ public: } // namespace re2c -#endif // _RE2C_IR_DFA_TAGTREE_ +#endif // _RE2C_DFA_TAGTREE_ diff --git a/re2c/src/ir/adfa/dump.h b/re2c/src/ir/adfa/dump.h deleted file mode 100644 index c48bda1a..00000000 --- a/re2c/src/ir/adfa/dump.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef _RE2C_IR_ADFA_DUMP_ -#define _RE2C_IR_ADFA_DUMP_ - -#include "src/ir/adfa/adfa.h" - -namespace re2c -{ - -void dump_adfa(const DFA &dfa); - -} // namespace re2c - -#endif // _RE2C_IR_ADFA_DUMP_ diff --git a/re2c/src/ir/re/encoding/utf16/utf16_regexp.h b/re2c/src/ir/re/encoding/utf16/utf16_regexp.h deleted file mode 100644 index 27e1446c..00000000 --- a/re2c/src/ir/re/encoding/utf16/utf16_regexp.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef _RE2C_IR_RE_ENCODING_UTF16_REGEXP_ -#define _RE2C_IR_RE_ENCODING_UTF16_REGEXP_ - -#include "src/ir/re/re.h" -#include "src/ir/re/encoding/utf16/utf16.h" - -namespace re2c { - -class Range; - -RE *UTF16Symbol(RE::alc_t &alc, utf16::rune r); -RE *UTF16Range(RE::alc_t &alc, const Range *r); - -} // namespace re2c - -#endif // _RE2C_IR_RE_ENCODING_UTF16_REGEXP_ diff --git a/re2c/src/ir/re/encoding/utf8/utf8_regexp.h b/re2c/src/ir/re/encoding/utf8/utf8_regexp.h deleted file mode 100644 index 4b7e07ff..00000000 --- a/re2c/src/ir/re/encoding/utf8/utf8_regexp.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef _RE2C_IR_RE_ENCODING_UTF8_REGEXP_ -#define _RE2C_IR_RE_ENCODING_UTF8_REGEXP_ - -#include "src/ir/re/re.h" -#include "src/ir/re/encoding/utf8/utf8.h" - -namespace re2c { - -class Range; - -RE *UTF8Symbol(RE::alc_t &alc, utf8::rune r); -RE *UTF8Range(RE::alc_t &alc, const Range *r); - -} // namespace re2c - -#endif // _RE2C_IR_RE_ENCODING_UTF8_REGEXP_ diff --git a/re2c/src/main.cc b/re2c/src/main.cc index 6018408c..8ba36a6b 100644 --- a/re2c/src/main.cc +++ b/re2c/src/main.cc @@ -1,13 +1,13 @@ #include "src/util/c99_stdint.h" #include -#include "src/codegen/output.h" +#include "src/code/output.h" #include "src/conf/msg.h" #include "src/conf/opt.h" #include "src/conf/warn.h" -#include "src/parse/input.h" -#include "src/parse/parser.h" -#include "src/parse/scanner.h" +#include "src/ast/input.h" +#include "src/ast/parser.h" +#include "src/ast/scanner.h" using namespace re2c; diff --git a/re2c/src/ir/nfa/dump.cc b/re2c/src/nfa/dump.cc similarity index 98% rename from re2c/src/ir/nfa/dump.cc rename to re2c/src/nfa/dump.cc index 69f44265..092e4b35 100644 --- a/re2c/src/ir/nfa/dump.cc +++ b/re2c/src/nfa/dump.cc @@ -1,6 +1,6 @@ #include -#include "src/ir/nfa/nfa.h" +#include "src/nfa/nfa.h" namespace re2c { diff --git a/re2c/src/ir/nfa/estimate_size.cc b/re2c/src/nfa/estimate_size.cc similarity index 96% rename from re2c/src/ir/nfa/estimate_size.cc rename to re2c/src/nfa/estimate_size.cc index f7ed3000..5694f259 100644 --- a/re2c/src/ir/nfa/estimate_size.cc +++ b/re2c/src/nfa/estimate_size.cc @@ -1,4 +1,4 @@ -#include "src/ir/nfa/nfa.h" +#include "src/nfa/nfa.h" namespace re2c { diff --git a/re2c/src/ir/nfa/nfa.h b/re2c/src/nfa/nfa.h similarity index 88% rename from re2c/src/ir/nfa/nfa.h rename to re2c/src/nfa/nfa.h index adb55b65..41e0b225 100644 --- a/re2c/src/ir/nfa/nfa.h +++ b/re2c/src/nfa/nfa.h @@ -1,15 +1,15 @@ -#ifndef _RE2C_IR_NFA_NFA_ -#define _RE2C_IR_NFA_NFA_ +#ifndef _RE2C_NFA_NFA_ +#define _RE2C_NFA_NFA_ #include #include "src/util/c99_stdint.h" #include #include -#include "src/codegen/input_api.h" -#include "src/ir/re/re.h" -#include "src/ir/rule.h" -#include "src/ir/tag.h" +#include "src/code/input_api.h" +#include "src/re/re.h" +#include "src/rule.h" +#include "src/tag.h" #include "src/util/forbid_copy.h" namespace re2c @@ -105,4 +105,4 @@ void dump_nfa(const nfa_t &nfa); } // namespace re2c -#endif // _RE2C_IR_NFA_NFA_ +#endif // _RE2C_NFA_NFA_ diff --git a/re2c/src/ir/nfa/re_to_nfa.cc b/re2c/src/nfa/re_to_nfa.cc similarity index 99% rename from re2c/src/ir/nfa/re_to_nfa.cc rename to re2c/src/nfa/re_to_nfa.cc index fde06642..4dbd3be7 100644 --- a/re2c/src/ir/nfa/re_to_nfa.cc +++ b/re2c/src/nfa/re_to_nfa.cc @@ -1,4 +1,4 @@ -#include "src/ir/nfa/nfa.h" +#include "src/nfa/nfa.h" namespace re2c { diff --git a/re2c/src/ir/re/ast_to_re.cc b/re2c/src/re/ast_to_re.cc similarity index 96% rename from re2c/src/ir/re/ast_to_re.cc rename to re2c/src/re/ast_to_re.cc index 40ed2093..14fbd43f 100644 --- a/re2c/src/ir/re/ast_to_re.cc +++ b/re2c/src/re/ast_to_re.cc @@ -1,10 +1,10 @@ #include "src/conf/msg.h" -#include "src/ir/re/re.h" -#include "src/ir/re/empty_class_policy.h" -#include "src/ir/re/encoding/case.h" -#include "src/ir/re/encoding/enc.h" -#include "src/ir/re/encoding/utf16/utf16_regexp.h" -#include "src/ir/re/encoding/utf8/utf8_regexp.h" +#include "src/re/re.h" +#include "src/re/empty_class_policy.h" +#include "src/re/encoding/case.h" +#include "src/re/encoding/enc.h" +#include "src/re/encoding/utf16/utf16_regexp.h" +#include "src/re/encoding/utf8/utf8_regexp.h" namespace re2c { diff --git a/re2c/src/ir/re/default_tags.cc b/re2c/src/re/default_tags.cc similarity index 97% rename from re2c/src/ir/re/default_tags.cc rename to re2c/src/re/default_tags.cc index ef98b396..f8e9b608 100644 --- a/re2c/src/ir/re/default_tags.cc +++ b/re2c/src/re/default_tags.cc @@ -1,4 +1,4 @@ -#include "src/ir/re/re.h" +#include "src/re/re.h" namespace re2c { diff --git a/re2c/src/ir/re/empty_class_policy.h b/re2c/src/re/empty_class_policy.h similarity index 64% rename from re2c/src/ir/re/empty_class_policy.h rename to re2c/src/re/empty_class_policy.h index a3fcbd02..caf60a41 100644 --- a/re2c/src/ir/re/empty_class_policy.h +++ b/re2c/src/re/empty_class_policy.h @@ -1,5 +1,5 @@ -#ifndef _RE2C_IR_RE_EMPTY_CLASS_POLICY_ -#define _RE2C_IR_RE_EMPTY_CLASS_POLICY_ +#ifndef _RE2C_RE_EMPTY_CLASS_POLICY_ +#define _RE2C_RE_EMPTY_CLASS_POLICY_ namespace re2c { @@ -12,4 +12,4 @@ enum empty_class_policy_t } // namespace re2c -#endif // _RE2C_IR_RE_EMPTY_CLASS_POLICY_ +#endif // _RE2C_RE_EMPTY_CLASS_POLICY_ diff --git a/re2c/src/ir/re/encoding/case.h b/re2c/src/re/encoding/case.h similarity index 80% rename from re2c/src/ir/re/encoding/case.h rename to re2c/src/re/encoding/case.h index 582d3373..dc793608 100644 --- a/re2c/src/ir/re/encoding/case.h +++ b/re2c/src/re/encoding/case.h @@ -1,5 +1,5 @@ -#ifndef _RE2C_IR_RE_ENCODING_CASE_ -#define _RE2C_IR_RE_ENCODING_CASE_ +#ifndef _RE2C_RE_ENCODING_CASE_ +#define _RE2C_RE_ENCODING_CASE_ #include "src/util/c99_stdint.h" @@ -28,4 +28,4 @@ inline uint32_t to_upper_unsafe (uint32_t c) } -#endif // _RE2C_IR_RE_ENCODING_CASE_ +#endif // _RE2C_RE_ENCODING_CASE_ diff --git a/re2c/src/ir/re/encoding/enc.cc b/re2c/src/re/encoding/enc.cc similarity index 99% rename from re2c/src/ir/re/encoding/enc.cc rename to re2c/src/re/encoding/enc.cc index e5143005..2fed6db7 100644 --- a/re2c/src/ir/re/encoding/enc.cc +++ b/re2c/src/re/encoding/enc.cc @@ -1,4 +1,4 @@ -#include "src/ir/re/encoding/enc.h" +#include "src/re/encoding/enc.h" #include "src/util/range.h" namespace re2c { diff --git a/re2c/src/ir/re/encoding/enc.h b/re2c/src/re/encoding/enc.h similarity index 97% rename from re2c/src/ir/re/encoding/enc.h rename to re2c/src/re/encoding/enc.h index ed4ca026..634b0d13 100644 --- a/re2c/src/ir/re/encoding/enc.h +++ b/re2c/src/re/encoding/enc.h @@ -1,5 +1,5 @@ -#ifndef _RE2C_IR_RE_ENCODING_ENC_ -#define _RE2C_IR_RE_ENCODING_ENC_ +#ifndef _RE2C_RE_ENCODING_ENC_ +#define _RE2C_RE_ENCODING_ENC_ #include "src/util/c99_stdint.h" @@ -194,4 +194,4 @@ inline void Enc::setPolicy(policy_t t) } // namespace re2c -#endif // _RE2C_IR_RE_ENCODING_ENC_ +#endif // _RE2C_RE_ENCODING_ENC_ diff --git a/re2c/src/ir/re/encoding/range_suffix.cc b/re2c/src/re/encoding/range_suffix.cc similarity index 93% rename from re2c/src/ir/re/encoding/range_suffix.cc rename to re2c/src/re/encoding/range_suffix.cc index b11bb5d1..99826fe1 100644 --- a/re2c/src/ir/re/encoding/range_suffix.cc +++ b/re2c/src/re/encoding/range_suffix.cc @@ -1,4 +1,4 @@ -#include "src/ir/re/encoding/range_suffix.h" +#include "src/re/encoding/range_suffix.h" #include "src/util/range.h" namespace re2c { diff --git a/re2c/src/ir/re/encoding/range_suffix.h b/re2c/src/re/encoding/range_suffix.h similarity index 76% rename from re2c/src/ir/re/encoding/range_suffix.h rename to re2c/src/re/encoding/range_suffix.h index 20f37967..4d3529c6 100644 --- a/re2c/src/ir/re/encoding/range_suffix.h +++ b/re2c/src/re/encoding/range_suffix.h @@ -1,10 +1,10 @@ -#ifndef _RE2C_IR_RE_ENCODING_RANGE_SUFFIX_ -#define _RE2C_IR_RE_ENCODING_RANGE_SUFFIX_ +#ifndef _RE2C_RE_ENCODING_RANGE_SUFFIX_ +#define _RE2C_RE_ENCODING_RANGE_SUFFIX_ #include "src/util/c99_stdint.h" #include // NULL -#include "src/ir/re/re.h" +#include "src/re/re.h" #include "src/util/forbid_copy.h" #include "src/util/free_list.h" @@ -35,4 +35,4 @@ RE *to_regexp(RE::alc_t &alc, RangeSuffix *p); } // namespace re2c -#endif // _RE2C_IR_RE_ENCODING_RANGE_SUFFIX_ +#endif // _RE2C_RE_ENCODING_RANGE_SUFFIX_ diff --git a/re2c/src/ir/re/encoding/utf16/utf16.cc b/re2c/src/re/encoding/utf16/utf16.cc similarity index 84% rename from re2c/src/ir/re/encoding/utf16/utf16.cc rename to re2c/src/re/encoding/utf16/utf16.cc index fc79176e..7fad3c9c 100644 --- a/re2c/src/ir/re/encoding/utf16/utf16.cc +++ b/re2c/src/re/encoding/utf16/utf16.cc @@ -1,4 +1,4 @@ -#include "src/ir/re/encoding/utf16/utf16.h" +#include "src/re/encoding/utf16/utf16.h" namespace re2c { diff --git a/re2c/src/ir/re/encoding/utf16/utf16.h b/re2c/src/re/encoding/utf16/utf16.h similarity index 83% rename from re2c/src/ir/re/encoding/utf16/utf16.h rename to re2c/src/re/encoding/utf16/utf16.h index 69d8216c..81dc71e0 100644 --- a/re2c/src/ir/re/encoding/utf16/utf16.h +++ b/re2c/src/re/encoding/utf16/utf16.h @@ -1,5 +1,5 @@ -#ifndef _RE2C_IR_RE_ENCODING_UTF16_UTF16_ -#define _RE2C_IR_RE_ENCODING_UTF16_UTF16_ +#ifndef _RE2C_RE_ENCODING_UTF16_UTF16_ +#define _RE2C_RE_ENCODING_UTF16_UTF16_ #include "src/util/c99_stdint.h" @@ -34,4 +34,4 @@ inline uint32_t utf16::trail_surr(rune r) } // namespace re2c -#endif // _RE2C_IR_RE_ENCODING_UTF16_UTF16_ +#endif // _RE2C_RE_ENCODING_UTF16_UTF16_ diff --git a/re2c/src/ir/re/encoding/utf16/utf16_range.cc b/re2c/src/re/encoding/utf16/utf16_range.cc similarity index 97% rename from re2c/src/ir/re/encoding/utf16/utf16_range.cc rename to re2c/src/re/encoding/utf16/utf16_range.cc index 9c91a276..1d78ada0 100644 --- a/re2c/src/ir/re/encoding/utf16/utf16_range.cc +++ b/re2c/src/re/encoding/utf16/utf16_range.cc @@ -1,5 +1,5 @@ -#include "src/ir/re/encoding/utf16/utf16_range.h" -#include "src/ir/re/encoding/range_suffix.h" +#include "src/re/encoding/utf16/utf16_range.h" +#include "src/re/encoding/range_suffix.h" namespace re2c { diff --git a/re2c/src/ir/re/encoding/utf16/utf16_range.h b/re2c/src/re/encoding/utf16/utf16_range.h similarity index 73% rename from re2c/src/ir/re/encoding/utf16/utf16_range.h rename to re2c/src/re/encoding/utf16/utf16_range.h index 0a50a95e..f9fabb2d 100644 --- a/re2c/src/ir/re/encoding/utf16/utf16_range.h +++ b/re2c/src/re/encoding/utf16/utf16_range.h @@ -1,9 +1,9 @@ -#ifndef _RE2C_IR_RE_ENCODING_UTF16_RANGE_ -#define _RE2C_IR_RE_ENCODING_UTF16_RANGE_ +#ifndef _RE2C_RE_ENCODING_UTF16_RANGE_ +#define _RE2C_RE_ENCODING_UTF16_RANGE_ #include "src/util/c99_stdint.h" -#include "src/ir/re/encoding/utf16/utf16.h" +#include "src/re/encoding/utf16/utf16.h" namespace re2c { @@ -16,4 +16,4 @@ void UTF16splitByRuneLength(RangeSuffix * & root, utf16::rune l, utf16::rune h); } // namespace re2c -#endif // _RE2C_IR_RE_ENCODING_UTF16_RANGE_ +#endif // _RE2C_RE_ENCODING_UTF16_RANGE_ diff --git a/re2c/src/ir/re/encoding/utf16/utf16_regexp.cc b/re2c/src/re/encoding/utf16/utf16_regexp.cc similarity index 85% rename from re2c/src/ir/re/encoding/utf16/utf16_regexp.cc rename to re2c/src/re/encoding/utf16/utf16_regexp.cc index e6b0b66a..2778a332 100644 --- a/re2c/src/ir/re/encoding/utf16/utf16_regexp.cc +++ b/re2c/src/re/encoding/utf16/utf16_regexp.cc @@ -1,8 +1,8 @@ #include "src/util/c99_stdint.h" -#include "src/ir/re/encoding/utf16/utf16_regexp.h" -#include "src/ir/re/encoding/range_suffix.h" -#include "src/ir/re/encoding/utf16/utf16_range.h" +#include "src/re/encoding/utf16/utf16_regexp.h" +#include "src/re/encoding/range_suffix.h" +#include "src/re/encoding/utf16/utf16_range.h" #include "src/util/range.h" namespace re2c { diff --git a/re2c/src/re/encoding/utf16/utf16_regexp.h b/re2c/src/re/encoding/utf16/utf16_regexp.h new file mode 100644 index 00000000..954ea527 --- /dev/null +++ b/re2c/src/re/encoding/utf16/utf16_regexp.h @@ -0,0 +1,16 @@ +#ifndef _RE2C_RE_ENCODING_UTF16_REGEXP_ +#define _RE2C_RE_ENCODING_UTF16_REGEXP_ + +#include "src/re/re.h" +#include "src/re/encoding/utf16/utf16.h" + +namespace re2c { + +class Range; + +RE *UTF16Symbol(RE::alc_t &alc, utf16::rune r); +RE *UTF16Range(RE::alc_t &alc, const Range *r); + +} // namespace re2c + +#endif // _RE2C_RE_ENCODING_UTF16_REGEXP_ diff --git a/re2c/src/ir/re/encoding/utf8/utf8.cc b/re2c/src/re/encoding/utf8/utf8.cc similarity index 98% rename from re2c/src/ir/re/encoding/utf8/utf8.cc rename to re2c/src/re/encoding/utf8/utf8.cc index 2e8c74e4..9255565c 100644 --- a/re2c/src/ir/re/encoding/utf8/utf8.cc +++ b/re2c/src/re/encoding/utf8/utf8.cc @@ -1,4 +1,4 @@ -#include "src/ir/re/encoding/utf8/utf8.h" +#include "src/re/encoding/utf8/utf8.h" namespace re2c { diff --git a/re2c/src/ir/re/encoding/utf8/utf8.h b/re2c/src/re/encoding/utf8/utf8.h similarity index 89% rename from re2c/src/ir/re/encoding/utf8/utf8.h rename to re2c/src/re/encoding/utf8/utf8.h index f1e0d8f1..50327766 100644 --- a/re2c/src/ir/re/encoding/utf8/utf8.h +++ b/re2c/src/re/encoding/utf8/utf8.h @@ -1,5 +1,5 @@ -#ifndef _RE2C_IR_RE_ENCODING_UTF8_UTF8_ -#define _RE2C_IR_RE_ENCODING_UTF8_UTF8_ +#ifndef _RE2C_RE_ENCODING_UTF8_UTF8_ +#define _RE2C_RE_ENCODING_UTF8_UTF8_ #include "src/util/c99_stdint.h" @@ -45,4 +45,4 @@ public: } // namespace re2c -#endif // _RE2C_IR_RE_ENCODING_UTF8_UTF8_ +#endif // _RE2C_RE_ENCODING_UTF8_UTF8_ diff --git a/re2c/src/ir/re/encoding/utf8/utf8_range.cc b/re2c/src/re/encoding/utf8/utf8_range.cc similarity index 97% rename from re2c/src/ir/re/encoding/utf8/utf8_range.cc rename to re2c/src/re/encoding/utf8/utf8_range.cc index 075c585c..c93eeaa7 100644 --- a/re2c/src/ir/re/encoding/utf8/utf8_range.cc +++ b/re2c/src/re/encoding/utf8/utf8_range.cc @@ -1,5 +1,5 @@ -#include "src/ir/re/encoding/utf8/utf8_range.h" -#include "src/ir/re/encoding/range_suffix.h" +#include "src/re/encoding/utf8/utf8_range.h" +#include "src/re/encoding/range_suffix.h" namespace re2c { diff --git a/re2c/src/ir/re/encoding/utf8/utf8_range.h b/re2c/src/re/encoding/utf8/utf8_range.h similarity index 67% rename from re2c/src/ir/re/encoding/utf8/utf8_range.h rename to re2c/src/re/encoding/utf8/utf8_range.h index 4c53491b..0cedeb45 100644 --- a/re2c/src/ir/re/encoding/utf8/utf8_range.h +++ b/re2c/src/re/encoding/utf8/utf8_range.h @@ -1,9 +1,9 @@ -#ifndef _RE2C_IR_RE_ENCODING_UTF8_RANGE_ -#define _RE2C_IR_RE_ENCODING_UTF8_RANGE_ +#ifndef _RE2C_RE_ENCODING_UTF8_RANGE_ +#define _RE2C_RE_ENCODING_UTF8_RANGE_ #include "src/util/c99_stdint.h" -#include "src/ir/re/encoding/utf8/utf8.h" +#include "src/re/encoding/utf8/utf8.h" namespace re2c { @@ -15,4 +15,4 @@ void UTF8splitByRuneLength(RangeSuffix * & p, utf8::rune l, utf8::rune h); } // namespace re2c -#endif // _RE2C_IR_RE_ENCODING_UTF8_RANGE_ +#endif // _RE2C_RE_ENCODING_UTF8_RANGE_ diff --git a/re2c/src/ir/re/encoding/utf8/utf8_regexp.cc b/re2c/src/re/encoding/utf8/utf8_regexp.cc similarity index 86% rename from re2c/src/ir/re/encoding/utf8/utf8_regexp.cc rename to re2c/src/re/encoding/utf8/utf8_regexp.cc index 64583410..55bdd79a 100644 --- a/re2c/src/ir/re/encoding/utf8/utf8_regexp.cc +++ b/re2c/src/re/encoding/utf8/utf8_regexp.cc @@ -1,8 +1,8 @@ #include "src/util/c99_stdint.h" -#include "src/ir/re/encoding/utf8/utf8_regexp.h" -#include "src/ir/re/encoding/range_suffix.h" -#include "src/ir/re/encoding/utf8/utf8_range.h" +#include "src/re/encoding/utf8/utf8_regexp.h" +#include "src/re/encoding/range_suffix.h" +#include "src/re/encoding/utf8/utf8_range.h" #include "src/util/range.h" namespace re2c { diff --git a/re2c/src/re/encoding/utf8/utf8_regexp.h b/re2c/src/re/encoding/utf8/utf8_regexp.h new file mode 100644 index 00000000..75a09f67 --- /dev/null +++ b/re2c/src/re/encoding/utf8/utf8_regexp.h @@ -0,0 +1,16 @@ +#ifndef _RE2C_RE_ENCODING_UTF8_REGEXP_ +#define _RE2C_RE_ENCODING_UTF8_REGEXP_ + +#include "src/re/re.h" +#include "src/re/encoding/utf8/utf8.h" + +namespace re2c { + +class Range; + +RE *UTF8Symbol(RE::alc_t &alc, utf8::rune r); +RE *UTF8Range(RE::alc_t &alc, const Range *r); + +} // namespace re2c + +#endif // _RE2C_RE_ENCODING_UTF8_REGEXP_ diff --git a/re2c/src/ir/re/fixed_tags.cc b/re2c/src/re/fixed_tags.cc similarity index 99% rename from re2c/src/ir/re/fixed_tags.cc rename to re2c/src/re/fixed_tags.cc index cd6d8acb..148a0adb 100644 --- a/re2c/src/ir/re/fixed_tags.cc +++ b/re2c/src/re/fixed_tags.cc @@ -1,4 +1,4 @@ -#include "src/ir/re/re.h" +#include "src/re/re.h" namespace re2c { diff --git a/re2c/src/ir/re/nullable.cc b/re2c/src/re/nullable.cc similarity index 97% rename from re2c/src/ir/re/nullable.cc rename to re2c/src/re/nullable.cc index 61197f26..8a79c071 100644 --- a/re2c/src/ir/re/nullable.cc +++ b/re2c/src/re/nullable.cc @@ -1,4 +1,4 @@ -#include "src/ir/re/re.h" +#include "src/re/re.h" namespace re2c { diff --git a/re2c/src/ir/re/re.h b/re2c/src/re/re.h similarity index 94% rename from re2c/src/ir/re/re.h rename to re2c/src/re/re.h index 03ea8132..2d962fd3 100644 --- a/re2c/src/ir/re/re.h +++ b/re2c/src/re/re.h @@ -1,11 +1,11 @@ -#ifndef _RE2C_IR_RE_RE_ -#define _RE2C_IR_RE_RE_ +#ifndef _RE2C_RE_RE_ +#define _RE2C_RE_RE_ #include "src/util/c99_stdint.h" #include "src/conf/opt.h" -#include "src/ir/rule.h" -#include "src/parse/regexp.h" +#include "src/rule.h" +#include "src/ast/regexp.h" #include "src/util/forbid_copy.h" #include "src/util/range.h" #include "src/util/slab_allocator.h" @@ -125,4 +125,4 @@ RE *re_class(RE::alc_t &alc, uint32_t line, uint32_t column, const Range *r, con } // namespace re2c -#endif // _RE2C_IR_RE_RE_ +#endif // _RE2C_RE_RE_ diff --git a/re2c/src/ir/re/split_charset.cc b/re2c/src/re/split_charset.cc similarity index 98% rename from re2c/src/ir/re/split_charset.cc rename to re2c/src/re/split_charset.cc index 9f50d447..b1c91b8e 100644 --- a/re2c/src/ir/re/split_charset.cc +++ b/re2c/src/re/split_charset.cc @@ -1,7 +1,7 @@ #include "src/util/c99_stdint.h" #include -#include "src/ir/re/re.h" +#include "src/re/re.h" namespace re2c { diff --git a/re2c/src/ir/rule.cc b/re2c/src/rule.cc similarity index 85% rename from re2c/src/ir/rule.cc rename to re2c/src/rule.cc index aa9fa19c..4ce6f7b5 100644 --- a/re2c/src/ir/rule.cc +++ b/re2c/src/rule.cc @@ -1,6 +1,6 @@ #include -#include "src/ir/rule.h" +#include "src/rule.h" namespace re2c { diff --git a/re2c/src/ir/rule.h b/re2c/src/rule.h similarity index 91% rename from re2c/src/ir/rule.h rename to re2c/src/rule.h index e483ce16..360a729f 100644 --- a/re2c/src/ir/rule.h +++ b/re2c/src/rule.h @@ -1,11 +1,11 @@ -#ifndef _RE2C_IR_RULE_ -#define _RE2C_IR_RULE_ +#ifndef _RE2C_RULE_ +#define _RE2C_RULE_ #include "src/util/c99_stdint.h" #include #include -#include "src/ir/tag.h" +#include "src/tag.h" #include "src/util/free_list.h" #include "src/util/forbid_copy.h" @@ -67,4 +67,4 @@ struct Rule } // namespace re2c -#endif // _RE2C_IR_RULE_ +#endif // _RE2C_RULE_ diff --git a/re2c/src/ir/skeleton/control_flow.cc b/re2c/src/skeleton/control_flow.cc similarity index 97% rename from re2c/src/ir/skeleton/control_flow.cc rename to re2c/src/skeleton/control_flow.cc index 9d861602..062f31c7 100644 --- a/re2c/src/ir/skeleton/control_flow.cc +++ b/re2c/src/skeleton/control_flow.cc @@ -1,8 +1,8 @@ #include #include -#include "src/ir/skeleton/path.h" -#include "src/ir/skeleton/skeleton.h" +#include "src/skeleton/path.h" +#include "src/skeleton/skeleton.h" #include "src/util/u32lim.h" namespace re2c diff --git a/re2c/src/ir/skeleton/generate_code.cc b/re2c/src/skeleton/generate_code.cc similarity index 98% rename from re2c/src/ir/skeleton/generate_code.cc rename to re2c/src/skeleton/generate_code.cc index a43f75fd..badf5947 100644 --- a/re2c/src/ir/skeleton/generate_code.cc +++ b/re2c/src/skeleton/generate_code.cc @@ -4,12 +4,12 @@ #include #include -#include "src/codegen/bitmap.h" -#include "src/codegen/emit.h" -#include "src/codegen/output.h" -#include "src/ir/re/encoding/enc.h" -#include "src/ir/adfa/adfa.h" -#include "src/ir/skeleton/skeleton.h" +#include "src/code/bitmap.h" +#include "src/code/emit.h" +#include "src/code/output.h" +#include "src/re/encoding/enc.h" +#include "src/adfa/adfa.h" +#include "src/skeleton/skeleton.h" namespace re2c { diff --git a/re2c/src/ir/skeleton/generate_data.cc b/re2c/src/skeleton/generate_data.cc similarity index 99% rename from re2c/src/ir/skeleton/generate_data.cc rename to re2c/src/skeleton/generate_data.cc index 8e84659d..b8932d2f 100644 --- a/re2c/src/ir/skeleton/generate_data.cc +++ b/re2c/src/skeleton/generate_data.cc @@ -10,9 +10,9 @@ #include #include "src/conf/msg.h" -#include "src/ir/re/encoding/enc.h" -#include "src/ir/skeleton/path.h" -#include "src/ir/skeleton/skeleton.h" +#include "src/re/encoding/enc.h" +#include "src/skeleton/path.h" +#include "src/skeleton/skeleton.h" #include "src/util/u32lim.h" namespace re2c diff --git a/re2c/src/ir/skeleton/maxpath.cc b/re2c/src/skeleton/maxpath.cc similarity index 97% rename from re2c/src/ir/skeleton/maxpath.cc rename to re2c/src/skeleton/maxpath.cc index 288489dc..2a016e93 100644 --- a/re2c/src/ir/skeleton/maxpath.cc +++ b/re2c/src/skeleton/maxpath.cc @@ -3,7 +3,7 @@ #include #include "src/conf/msg.h" -#include "src/ir/skeleton/skeleton.h" +#include "src/skeleton/skeleton.h" namespace re2c { diff --git a/re2c/src/ir/skeleton/path.h b/re2c/src/skeleton/path.h similarity index 89% rename from re2c/src/ir/skeleton/path.h rename to re2c/src/skeleton/path.h index 9c6b5517..fb1aee85 100644 --- a/re2c/src/ir/skeleton/path.h +++ b/re2c/src/skeleton/path.h @@ -1,10 +1,10 @@ -#ifndef _RE2C_IR_SKELETON_PATH_ -#define _RE2C_IR_SKELETON_PATH_ +#ifndef _RE2C_SKELETON_PATH_ +#define _RE2C_SKELETON_PATH_ #include "src/util/c99_stdint.h" #include -#include "src/ir/skeleton/skeleton.h" +#include "src/skeleton/skeleton.h" namespace re2c { @@ -75,4 +75,4 @@ public: } // namespace re2c -#endif // _RE2C_IR_SKELETON_PATH_ +#endif // _RE2C_SKELETON_PATH_ diff --git a/re2c/src/ir/skeleton/skeleton.cc b/re2c/src/skeleton/skeleton.cc similarity index 95% rename from re2c/src/ir/skeleton/skeleton.cc rename to re2c/src/skeleton/skeleton.cc index e7a7dec5..8a93b009 100644 --- a/re2c/src/ir/skeleton/skeleton.cc +++ b/re2c/src/skeleton/skeleton.cc @@ -1,9 +1,9 @@ #include #include -#include "src/ir/dfa/dfa.h" -#include "src/ir/skeleton/path.h" -#include "src/ir/skeleton/skeleton.h" +#include "src/dfa/dfa.h" +#include "src/skeleton/path.h" +#include "src/skeleton/skeleton.h" namespace re2c { diff --git a/re2c/src/ir/skeleton/skeleton.h b/re2c/src/skeleton/skeleton.h similarity index 93% rename from re2c/src/ir/skeleton/skeleton.h rename to re2c/src/skeleton/skeleton.h index 1298515f..200b4d96 100644 --- a/re2c/src/ir/skeleton/skeleton.h +++ b/re2c/src/skeleton/skeleton.h @@ -1,5 +1,5 @@ -#ifndef _RE2C_IR_SKELETON_SKELETON_ -#define _RE2C_IR_SKELETON_SKELETON_ +#ifndef _RE2C_SKELETON_SKELETON_ +#define _RE2C_SKELETON_SKELETON_ #include "src/util/c99_stdint.h" #include @@ -11,10 +11,10 @@ #include #include -#include "src/codegen/bitmap.h" +#include "src/code/bitmap.h" #include "src/conf/opt.h" -#include "src/ir/rule.h" -#include "src/ir/tcmd.h" +#include "src/rule.h" +#include "src/tcmd.h" #include "src/util/local_increment.h" #include "src/util/forbid_copy.h" #include "src/util/wrap_iter.h" @@ -115,4 +115,4 @@ void emit_action(OutputFile &o, uint32_t ind, const DFA &dfa, size_t rid); } // namespace re2c -#endif // _RE2C_IR_SKELETON_SKELETON_ +#endif // _RE2C_SKELETON_SKELETON_ diff --git a/re2c/src/ir/tag.cc b/re2c/src/tag.cc similarity index 88% rename from re2c/src/ir/tag.cc rename to re2c/src/tag.cc index 2a8c981a..16612537 100644 --- a/re2c/src/ir/tag.cc +++ b/re2c/src/tag.cc @@ -1,6 +1,6 @@ #include -#include "src/ir/tag.h" +#include "src/tag.h" namespace re2c { diff --git a/re2c/src/ir/tag.h b/re2c/src/tag.h similarity index 95% rename from re2c/src/ir/tag.h rename to re2c/src/tag.h index e72420a4..c47bef5c 100644 --- a/re2c/src/ir/tag.h +++ b/re2c/src/tag.h @@ -1,5 +1,5 @@ -#ifndef _RE2C_IR_TAG_ -#define _RE2C_IR_TAG_ +#ifndef _RE2C_TAG_ +#define _RE2C_TAG_ #include #include @@ -70,4 +70,4 @@ inline bool preorbit(const std::vector &tags, size_t idx) } // namespace re2c -#endif // _RE2C_IR_TAG_ +#endif // _RE2C_TAG_ diff --git a/re2c/src/ir/tcmd.cc b/re2c/src/tcmd.cc similarity index 99% rename from re2c/src/ir/tcmd.cc rename to re2c/src/tcmd.cc index dd3a9c34..e69511c0 100644 --- a/re2c/src/ir/tcmd.cc +++ b/re2c/src/tcmd.cc @@ -1,6 +1,6 @@ #include -#include "src/ir/tcmd.h" +#include "src/tcmd.h" #include "src/util/hash32.h" namespace re2c diff --git a/re2c/src/ir/tcmd.h b/re2c/src/tcmd.h similarity index 94% rename from re2c/src/ir/tcmd.h rename to re2c/src/tcmd.h index 7cb379ff..6a3771c0 100644 --- a/re2c/src/ir/tcmd.h +++ b/re2c/src/tcmd.h @@ -1,7 +1,7 @@ -#ifndef _RE2C_IR_TCMD_ -#define _RE2C_IR_TCMD_ +#ifndef _RE2C_TCMD_ +#define _RE2C_TCMD_ -#include "src/ir/tag.h" +#include "src/tag.h" #include "src/util/c99_stdint.h" #include "src/util/forbid_copy.h" #include "src/util/lookup.h" @@ -75,4 +75,4 @@ public: } // namespace re2c -#endif // _RE2C_IR_TCMD_ +#endif // _RE2C_TCMD_ -- 2.40.0