From 64db3825e73b84166a8ca9b0a09c1ca2216a3a03 Mon Sep 17 00:00:00 2001 From: Ulya Trofimovich Date: Mon, 11 May 2015 13:46:26 +0100 Subject: [PATCH] Improved source files layout. Created a directory tree to group logically related source files and clean up top source directory. --- re2c/Makefile.am | 108 ++++++++--------- re2c/bootstrap/parser.cc | 112 +++++++++--------- re2c/bootstrap/scanner.cc | 10 +- re2c/bootstrap/y.tab.h | 2 +- re2c/configure.ac | 2 +- re2c/src/{ => codegen}/code.cc | 18 +-- re2c/src/{ => codegen}/code.h | 2 +- re2c/src/{ => codegen}/code_names.cc | 2 +- re2c/src/{ => codegen}/code_names.h | 0 re2c/src/{ => codegen}/go.h | 4 +- re2c/src/{ => codegen}/go_construct.cc | 4 +- re2c/src/{ => codegen}/go_destruct.cc | 4 +- re2c/src/{ => codegen}/go_emit.cc | 8 +- re2c/src/{ => codegen}/go_used_labels.cc | 4 +- re2c/src/{ => codegen}/indent.h | 0 re2c/src/{ => codegen}/input_api.cc | 4 +- re2c/src/{ => codegen}/input_api.h | 2 +- re2c/src/{ => codegen}/output.cc | 6 +- re2c/src/{ => codegen}/output.h | 2 +- re2c/src/{ => codegen}/print.cc | 2 +- re2c/src/{ => codegen}/print.h | 2 +- re2c/src/{ => codegen/skeleton}/skeleton.cc | 6 +- re2c/src/{ => codegen/skeleton}/skeleton.h | 4 +- re2c/src/{ => codegen}/translate.cc | 0 re2c/src/{ => dfa}/actions.cc | 12 +- re2c/src/{ => dfa}/dfa.cc | 6 +- re2c/src/{ => dfa}/dfa.h | 4 +- re2c/src/{ => dfa/encoding}/enc.cc | 2 +- re2c/src/{ => dfa/encoding}/enc.h | 4 +- re2c/src/{ => dfa/encoding}/range_suffix.cc | 4 +- re2c/src/{ => dfa/encoding}/range_suffix.h | 4 +- re2c/src/{ => dfa/encoding/utf16}/utf16.cc | 2 +- re2c/src/{ => dfa/encoding/utf16}/utf16.h | 2 +- .../{ => dfa/encoding/utf16}/utf16_range.cc | 4 +- .../{ => dfa/encoding/utf16}/utf16_range.h | 4 +- .../{ => dfa/encoding/utf16}/utf16_regexp.cc | 6 +- .../{ => dfa/encoding/utf16}/utf16_regexp.h | 3 +- re2c/src/{ => dfa/encoding/utf8}/utf8.cc | 2 +- re2c/src/{ => dfa/encoding/utf8}/utf8.h | 2 +- .../src/{ => dfa/encoding/utf8}/utf8_range.cc | 4 +- re2c/src/{ => dfa/encoding/utf8}/utf8_range.h | 4 +- .../{ => dfa/encoding/utf8}/utf8_regexp.cc | 6 +- .../src/{ => dfa/encoding/utf8}/utf8_regexp.h | 3 +- re2c/src/{ => dfa}/ins.h | 2 +- re2c/src/{ => dfa}/re.h | 12 +- re2c/src/globals.h | 8 +- re2c/src/main.cc | 6 +- re2c/src/{ => parse}/input.cc | 2 +- re2c/src/{ => parse}/input.h | 0 re2c/src/{ => parse}/parser.h | 6 +- re2c/src/{ => parse}/parser.ypp | 8 +- re2c/src/{ => parse}/scanner.h | 8 +- re2c/src/{ => parse}/scanner.re | 8 +- re2c/src/{ => parse}/token.h | 2 +- re2c/src/{ => util}/c99_stdint.h | 0 re2c/src/{ => util}/free_list.h | 0 re2c/src/{ => util}/range.cc | 4 +- re2c/src/{ => util}/range.h | 4 +- re2c/src/{ => util}/smart_ptr.h | 0 re2c/src/{ => util}/substr.cc | 2 +- re2c/src/{ => util}/substr.h | 2 +- 61 files changed, 231 insertions(+), 229 deletions(-) rename re2c/src/{ => codegen}/code.cc (99%) rename re2c/src/{ => codegen}/code.h (97%) rename re2c/src/{ => codegen}/code_names.cc (90%) rename re2c/src/{ => codegen}/code_names.h (100%) rename re2c/src/{ => codegen}/go.h (98%) rename re2c/src/{ => codegen}/go_construct.cc (99%) rename re2c/src/{ => codegen}/go_destruct.cc (94%) rename re2c/src/{ => codegen}/go_emit.cc (97%) rename re2c/src/{ => codegen}/go_used_labels.cc (96%) rename re2c/src/{ => codegen}/indent.h (100%) rename re2c/src/{ => codegen}/input_api.cc (98%) rename re2c/src/{ => codegen}/input_api.h (96%) rename re2c/src/{ => codegen}/output.cc (98%) rename re2c/src/{ => codegen}/output.h (98%) rename re2c/src/{ => codegen}/print.cc (98%) rename re2c/src/{ => codegen}/print.h (89%) rename re2c/src/{ => codegen/skeleton}/skeleton.cc (98%) rename re2c/src/{ => codegen/skeleton}/skeleton.h (97%) rename re2c/src/{ => codegen}/translate.cc (100%) rename re2c/src/{ => dfa}/actions.cc (98%) rename re2c/src/{ => dfa}/dfa.cc (97%) rename re2c/src/{ => dfa}/dfa.h (98%) rename re2c/src/{ => dfa/encoding}/enc.cc (99%) rename re2c/src/{ => dfa/encoding}/enc.h (98%) rename re2c/src/{ => dfa/encoding}/range_suffix.cc (86%) rename re2c/src/{ => dfa/encoding}/range_suffix.h (88%) rename re2c/src/{ => dfa/encoding/utf16}/utf16.cc (84%) rename re2c/src/{ => dfa/encoding/utf16}/utf16.h (95%) rename re2c/src/{ => dfa/encoding/utf16}/utf16_range.cc (98%) rename re2c/src/{ => dfa/encoding/utf16}/utf16_range.h (85%) rename re2c/src/{ => dfa/encoding/utf16}/utf16_regexp.cc (86%) rename re2c/src/{ => dfa/encoding/utf16}/utf16_regexp.h (75%) rename re2c/src/{ => dfa/encoding/utf8}/utf8.cc (97%) rename re2c/src/{ => dfa/encoding/utf8}/utf8.h (96%) rename re2c/src/{ => dfa/encoding/utf8}/utf8_range.cc (97%) rename re2c/src/{ => dfa/encoding/utf8}/utf8_range.h (81%) rename re2c/src/{ => dfa/encoding/utf8}/utf8_regexp.cc (87%) rename re2c/src/{ => dfa/encoding/utf8}/utf8_regexp.h (75%) rename re2c/src/{ => dfa}/ins.h (94%) rename re2c/src/{ => dfa}/re.h (97%) rename re2c/src/{ => parse}/input.cc (92%) rename re2c/src/{ => parse}/input.h (100%) rename re2c/src/{ => parse}/parser.h (88%) rename re2c/src/{ => parse}/parser.ypp (99%) rename re2c/src/{ => parse}/scanner.h (95%) rename re2c/src/{ => parse}/scanner.re (98%) rename re2c/src/{ => parse}/token.h (97%) rename re2c/src/{ => util}/c99_stdint.h (100%) rename re2c/src/{ => util}/free_list.h (100%) rename re2c/src/{ => util}/range.cc (96%) rename re2c/src/{ => util}/range.h (91%) rename re2c/src/{ => util}/smart_ptr.h (100%) rename re2c/src/{ => util}/substr.cc (96%) rename re2c/src/{ => util}/substr.h (98%) diff --git a/re2c/Makefile.am b/re2c/Makefile.am index d1e8ec7e..1984bc7c 100644 --- a/re2c/Makefile.am +++ b/re2c/Makefile.am @@ -8,12 +8,12 @@ bin_PROGRAMS = re2c RE2C = $(builddir)/re2c$(EXEEXT) # scanner -SRC_SCANNER = $(srcdir)/src/scanner.re +SRC_SCANNER = $(srcdir)/src/parse/scanner.re AUTOGEN_SCANNER = $(builddir)/scanner.cc BOOTSTRAP_SCANNER = $(srcdir)/bootstrap/scanner.cc # parser -SRC_PARSER = $(srcdir)/src/parser.ypp +SRC_PARSER = $(srcdir)/src/parse/parser.ypp AUTOGEN_PARSER = $(builddir)/parser.cc AUTOGEN_PARSER_HDR = $(builddir)/y.tab.h BOOTSTRAP_PARSER = $(srcdir)/bootstrap/parser.cc @@ -27,65 +27,65 @@ BOOTSTRAP_DOC_MAN = $(srcdir)/bootstrap/re2c.1 BOOTSTRAP_DOC_HTML = $(srcdir)/bootstrap/manual.html SRC_HDR = \ - $(srcdir)/src/c99_stdint.h \ - $(srcdir)/src/code.h \ - $(srcdir)/src/code_names.h \ - $(srcdir)/src/dfa.h \ - $(srcdir)/src/enc.h \ + $(srcdir)/src/codegen/code.h \ + $(srcdir)/src/codegen/code_names.h \ + $(srcdir)/src/codegen/go.h \ + $(srcdir)/src/codegen/indent.h \ + $(srcdir)/src/codegen/input_api.h \ + $(srcdir)/src/codegen/output.h \ + $(srcdir)/src/codegen/print.h \ + $(srcdir)/src/codegen/skeleton/skeleton.h \ + $(srcdir)/src/dfa/encoding/enc.h \ + $(srcdir)/src/dfa/encoding/range_suffix.h \ + $(srcdir)/src/dfa/encoding/utf16/utf16.h \ + $(srcdir)/src/dfa/encoding/utf16/utf16_range.h \ + $(srcdir)/src/dfa/encoding/utf16/utf16_regexp.h \ + $(srcdir)/src/dfa/encoding/utf8/utf8.h \ + $(srcdir)/src/dfa/encoding/utf8/utf8_range.h \ + $(srcdir)/src/dfa/encoding/utf8/utf8_regexp.h \ + $(srcdir)/src/dfa/dfa.h \ + $(srcdir)/src/dfa/ins.h \ + $(srcdir)/src/dfa/re.h \ $(srcdir)/src/globals.h \ - $(srcdir)/src/go.h \ - $(srcdir)/src/indent.h \ - $(srcdir)/src/input.h \ - $(srcdir)/src/input_api.h \ - $(srcdir)/src/ins.h \ - $(srcdir)/src/free_list.h \ $(srcdir)/src/mbo_getopt.h \ - $(srcdir)/src/output.h \ - $(srcdir)/src/parser.h \ - $(srcdir)/src/print.h \ - $(srcdir)/src/range.h \ - $(srcdir)/src/range_suffix.h \ - $(srcdir)/src/re.h \ - $(srcdir)/src/scanner.h \ - $(srcdir)/src/skeleton.h \ - $(srcdir)/src/smart_ptr.h \ - $(srcdir)/src/substr.h \ - $(srcdir)/src/token.h \ - $(srcdir)/src/utf16.h \ - $(srcdir)/src/utf16_range.h \ - $(srcdir)/src/utf16_regexp.h \ - $(srcdir)/src/utf8.h \ - $(srcdir)/src/utf8_range.h \ - $(srcdir)/src/utf8_regexp.h + $(srcdir)/src/parse/input.h \ + $(srcdir)/src/parse/parser.h \ + $(srcdir)/src/parse/scanner.h \ + $(srcdir)/src/parse/token.h \ + $(srcdir)/src/util/c99_stdint.h \ + $(srcdir)/src/util/free_list.h \ + $(srcdir)/src/util/range.h \ + $(srcdir)/src/util/smart_ptr.h \ + $(srcdir)/src/util/substr.h SRC = \ $(SRC_SCANNER) \ - $(srcdir)/src/actions.cc \ - $(srcdir)/src/code.cc \ - $(srcdir)/src/code_names.cc \ - $(srcdir)/src/dfa.cc \ - $(srcdir)/src/enc.cc \ - $(srcdir)/src/go_construct.cc \ - $(srcdir)/src/go_destruct.cc \ - $(srcdir)/src/go_emit.cc \ - $(srcdir)/src/go_used_labels.cc \ - $(srcdir)/src/input.cc \ - $(srcdir)/src/input_api.cc \ + $(srcdir)/src/codegen/code.cc \ + $(srcdir)/src/codegen/code_names.cc \ + $(srcdir)/src/codegen/go_construct.cc \ + $(srcdir)/src/codegen/go_destruct.cc \ + $(srcdir)/src/codegen/go_emit.cc \ + $(srcdir)/src/codegen/go_used_labels.cc \ + $(srcdir)/src/codegen/input_api.cc \ + $(srcdir)/src/codegen/output.cc \ + $(srcdir)/src/codegen/print.cc \ + $(srcdir)/src/codegen/skeleton/skeleton.cc \ + $(srcdir)/src/codegen/translate.cc \ + $(srcdir)/src/dfa/encoding/enc.cc \ + $(srcdir)/src/dfa/encoding/range_suffix.cc \ + $(srcdir)/src/dfa/encoding/utf16/utf16.cc \ + $(srcdir)/src/dfa/encoding/utf16/utf16_range.cc \ + $(srcdir)/src/dfa/encoding/utf16/utf16_regexp.cc \ + $(srcdir)/src/dfa/encoding/utf8/utf8.cc \ + $(srcdir)/src/dfa/encoding/utf8/utf8_range.cc \ + $(srcdir)/src/dfa/encoding/utf8/utf8_regexp.cc \ + $(srcdir)/src/dfa/actions.cc \ + $(srcdir)/src/dfa/dfa.cc \ $(srcdir)/src/main.cc \ $(srcdir)/src/mbo_getopt.cc \ - $(srcdir)/src/output.cc \ - $(srcdir)/src/print.cc \ - $(srcdir)/src/range.cc \ - $(srcdir)/src/range_suffix.cc \ - $(srcdir)/src/skeleton.cc \ - $(srcdir)/src/substr.cc \ - $(srcdir)/src/translate.cc \ - $(srcdir)/src/utf8.cc \ - $(srcdir)/src/utf8_range.cc \ - $(srcdir)/src/utf8_regexp.cc \ - $(srcdir)/src/utf16.cc \ - $(srcdir)/src/utf16_range.cc \ - $(srcdir)/src/utf16_regexp.cc + $(srcdir)/src/parse/input.cc \ + $(srcdir)/src/util/range.cc \ + $(srcdir)/src/util/substr.cc # omit SRC_PARSER here; include it in EXTRA_DIST instead # (automake generates standard build rules for all YACC-ish # sources, they will conflict with our custom build rule). diff --git a/re2c/bootstrap/parser.cc b/re2c/bootstrap/parser.cc index 6840f565..a923a061 100644 --- a/re2c/bootstrap/parser.cc +++ b/re2c/bootstrap/parser.cc @@ -67,7 +67,7 @@ /* Copy the first part of user declarations. */ /* Line 189 of yacc.c */ -#line 1 "../src/parser.ypp" +#line 1 "../src/parse/parser.ypp" /* $Id$ */ @@ -80,11 +80,11 @@ #include #include "config.h" -#include "src/c99_stdint.h" -#include "src/dfa.h" +#include "src/dfa/dfa.h" #include "src/globals.h" -#include "src/parser.h" -#include "src/smart_ptr.h" +#include "src/parse/parser.h" +#include "src/util/c99_stdint.h" +#include "src/util/smart_ptr.h" #define YYMALLOC malloc #define YYFREE free @@ -265,7 +265,7 @@ typedef union YYSTYPE { /* Line 214 of yacc.c */ -#line 149 "../src/parser.ypp" +#line 149 "../src/parse/parser.ypp" re2c::Symbol *symbol; re2c::RegExp *regexp; @@ -1572,7 +1572,7 @@ yyreduce: case 2: /* Line 1464 of yacc.c */ -#line 178 "../src/parser.ypp" +#line 178 "../src/parse/parser.ypp" { ;} break; @@ -1580,7 +1580,7 @@ yyreduce: case 3: /* Line 1464 of yacc.c */ -#line 181 "../src/parser.ypp" +#line 181 "../src/parse/parser.ypp" { foundRules = true; ;} @@ -1589,7 +1589,7 @@ yyreduce: case 5: /* Line 1464 of yacc.c */ -#line 189 "../src/parser.ypp" +#line 189 "../src/parse/parser.ypp" { if ((yyvsp[(1) - (4)].symbol)->re) { @@ -1603,7 +1603,7 @@ yyreduce: case 6: /* Line 1464 of yacc.c */ -#line 198 "../src/parser.ypp" +#line 198 "../src/parse/parser.ypp" { if ((yyvsp[(1) - (2)].symbol)->re) { @@ -1617,7 +1617,7 @@ yyreduce: case 7: /* Line 1464 of yacc.c */ -#line 207 "../src/parser.ypp" +#line 207 "../src/parse/parser.ypp" { in->fatal("trailing contexts are not allowed in named definitions"); ;} @@ -1626,7 +1626,7 @@ yyreduce: case 8: /* Line 1464 of yacc.c */ -#line 211 "../src/parser.ypp" +#line 211 "../src/parse/parser.ypp" { in->fatal("trailing contexts are not allowed in named definitions"); ;} @@ -1635,7 +1635,7 @@ yyreduce: case 9: /* Line 1464 of yacc.c */ -#line 215 "../src/parser.ypp" +#line 215 "../src/parse/parser.ypp" { in->config(*(yyvsp[(1) - (4)].str), *(yyvsp[(3) - (4)].str)); delete (yyvsp[(1) - (4)].str); @@ -1646,7 +1646,7 @@ yyreduce: case 10: /* Line 1464 of yacc.c */ -#line 221 "../src/parser.ypp" +#line 221 "../src/parse/parser.ypp" { in->config(*(yyvsp[(1) - (4)].str), (yyvsp[(3) - (4)].number)); delete (yyvsp[(1) - (4)].str); @@ -1656,7 +1656,7 @@ yyreduce: case 11: /* Line 1464 of yacc.c */ -#line 229 "../src/parser.ypp" +#line 229 "../src/parse/parser.ypp" { if (cFlag) { @@ -1670,7 +1670,7 @@ yyreduce: case 12: /* Line 1464 of yacc.c */ -#line 238 "../src/parser.ypp" +#line 238 "../src/parse/parser.ypp" { if (cFlag) in->fatal("condition or '<*>' required when using -c switch"); @@ -1684,7 +1684,7 @@ yyreduce: case 13: /* Line 1464 of yacc.c */ -#line 247 "../src/parser.ypp" +#line 247 "../src/parse/parser.ypp" { context_rule((yyvsp[(2) - (7)].clist), (yyvsp[(4) - (7)].regexp), (yyvsp[(5) - (7)].regexp), (yyvsp[(6) - (7)].str), (yyvsp[(7) - (7)].token)); ;} @@ -1693,7 +1693,7 @@ yyreduce: case 14: /* Line 1464 of yacc.c */ -#line 251 "../src/parser.ypp" +#line 251 "../src/parse/parser.ypp" { assert((yyvsp[(7) - (7)].str)); context_rule((yyvsp[(2) - (7)].clist), (yyvsp[(4) - (7)].regexp), (yyvsp[(5) - (7)].regexp), (yyvsp[(7) - (7)].str), NULL); @@ -1703,7 +1703,7 @@ yyreduce: case 15: /* Line 1464 of yacc.c */ -#line 256 "../src/parser.ypp" +#line 256 "../src/parse/parser.ypp" { context_none((yyvsp[(2) - (6)].clist)); delete (yyvsp[(5) - (6)].str); @@ -1713,7 +1713,7 @@ yyreduce: case 16: /* Line 1464 of yacc.c */ -#line 261 "../src/parser.ypp" +#line 261 "../src/parse/parser.ypp" { assert((yyvsp[(6) - (6)].str)); context_none((yyvsp[(2) - (6)].clist)); @@ -1724,7 +1724,7 @@ yyreduce: case 17: /* Line 1464 of yacc.c */ -#line 267 "../src/parser.ypp" +#line 267 "../src/parse/parser.ypp" { default_rule((yyvsp[(2) - (5)].clist), (yyvsp[(5) - (5)].token)); ;} @@ -1733,7 +1733,7 @@ yyreduce: case 18: /* Line 1464 of yacc.c */ -#line 271 "../src/parser.ypp" +#line 271 "../src/parse/parser.ypp" { context_check(NULL); Token *token = new Token((yyvsp[(7) - (7)].token), (yyvsp[(7) - (7)].token)->source, (yyvsp[(7) - (7)].token)->line, (yyvsp[(6) - (7)].str)); @@ -1746,7 +1746,7 @@ yyreduce: case 19: /* Line 1464 of yacc.c */ -#line 279 "../src/parser.ypp" +#line 279 "../src/parse/parser.ypp" { assert((yyvsp[(7) - (7)].str)); context_check(NULL); @@ -1759,7 +1759,7 @@ yyreduce: case 20: /* Line 1464 of yacc.c */ -#line 287 "../src/parser.ypp" +#line 287 "../src/parse/parser.ypp" { context_none(NULL); delete (yyvsp[(5) - (6)].str); @@ -1769,7 +1769,7 @@ yyreduce: case 21: /* Line 1464 of yacc.c */ -#line 292 "../src/parser.ypp" +#line 292 "../src/parse/parser.ypp" { assert((yyvsp[(6) - (6)].str)); context_none(NULL); @@ -1780,7 +1780,7 @@ yyreduce: case 22: /* Line 1464 of yacc.c */ -#line 298 "../src/parser.ypp" +#line 298 "../src/parse/parser.ypp" { CondList *clist = new CondList(); clist->insert("*"); @@ -1791,7 +1791,7 @@ yyreduce: case 23: /* Line 1464 of yacc.c */ -#line 304 "../src/parser.ypp" +#line 304 "../src/parse/parser.ypp" { context_check(NULL); if (specNone) @@ -1808,7 +1808,7 @@ yyreduce: case 24: /* Line 1464 of yacc.c */ -#line 316 "../src/parser.ypp" +#line 316 "../src/parse/parser.ypp" { assert((yyvsp[(3) - (3)].str)); context_check(NULL); @@ -1825,7 +1825,7 @@ yyreduce: case 25: /* Line 1464 of yacc.c */ -#line 328 "../src/parser.ypp" +#line 328 "../src/parse/parser.ypp" { CondList *clist = new CondList(); clist->insert("*"); @@ -1836,7 +1836,7 @@ yyreduce: case 26: /* Line 1464 of yacc.c */ -#line 334 "../src/parser.ypp" +#line 334 "../src/parse/parser.ypp" { setup_rule((yyvsp[(2) - (4)].clist), (yyvsp[(4) - (4)].token)); ;} @@ -1845,7 +1845,7 @@ yyreduce: case 27: /* Line 1464 of yacc.c */ -#line 341 "../src/parser.ypp" +#line 341 "../src/parse/parser.ypp" { in->fatal("unnamed condition not supported"); ;} @@ -1854,7 +1854,7 @@ yyreduce: case 28: /* Line 1464 of yacc.c */ -#line 345 "../src/parser.ypp" +#line 345 "../src/parse/parser.ypp" { (yyval.clist) = (yyvsp[(1) - (1)].clist); ;} @@ -1863,7 +1863,7 @@ yyreduce: case 29: /* Line 1464 of yacc.c */ -#line 352 "../src/parser.ypp" +#line 352 "../src/parse/parser.ypp" { (yyval.clist) = new CondList(); (yyval.clist)->insert((yyvsp[(1) - (1)].symbol)->GetName().to_string()); @@ -1873,7 +1873,7 @@ yyreduce: case 30: /* Line 1464 of yacc.c */ -#line 357 "../src/parser.ypp" +#line 357 "../src/parse/parser.ypp" { (yyvsp[(1) - (3)].clist)->insert((yyvsp[(3) - (3)].symbol)->GetName().to_string()); (yyval.clist) = (yyvsp[(1) - (3)].clist); @@ -1883,7 +1883,7 @@ yyreduce: case 31: /* Line 1464 of yacc.c */ -#line 365 "../src/parser.ypp" +#line 365 "../src/parse/parser.ypp" { (yyval.str) = NULL; ;} @@ -1892,7 +1892,7 @@ yyreduce: case 32: /* Line 1464 of yacc.c */ -#line 369 "../src/parser.ypp" +#line 369 "../src/parse/parser.ypp" { (yyval.str) = new Str((yyvsp[(3) - (3)].symbol)->GetName().to_string().c_str()); ;} @@ -1901,7 +1901,7 @@ yyreduce: case 33: /* Line 1464 of yacc.c */ -#line 376 "../src/parser.ypp" +#line 376 "../src/parse/parser.ypp" { (yyval.regexp) = new NullOp; ;} @@ -1910,7 +1910,7 @@ yyreduce: case 34: /* Line 1464 of yacc.c */ -#line 380 "../src/parser.ypp" +#line 380 "../src/parse/parser.ypp" { (yyval.regexp) = (yyvsp[(2) - (2)].regexp); ;} @@ -1919,7 +1919,7 @@ yyreduce: case 35: /* Line 1464 of yacc.c */ -#line 387 "../src/parser.ypp" +#line 387 "../src/parse/parser.ypp" { (yyval.regexp) = (yyvsp[(1) - (1)].regexp); ;} @@ -1928,7 +1928,7 @@ yyreduce: case 36: /* Line 1464 of yacc.c */ -#line 391 "../src/parser.ypp" +#line 391 "../src/parse/parser.ypp" { (yyval.regexp) = mkAlt((yyvsp[(1) - (3)].regexp), (yyvsp[(3) - (3)].regexp)); ;} @@ -1937,7 +1937,7 @@ yyreduce: case 37: /* Line 1464 of yacc.c */ -#line 398 "../src/parser.ypp" +#line 398 "../src/parse/parser.ypp" { (yyval.regexp) = (yyvsp[(1) - (1)].regexp); ;} @@ -1946,7 +1946,7 @@ yyreduce: case 38: /* Line 1464 of yacc.c */ -#line 402 "../src/parser.ypp" +#line 402 "../src/parse/parser.ypp" { (yyval.regexp) = mkDiff((yyvsp[(1) - (3)].regexp), (yyvsp[(3) - (3)].regexp)); if(!(yyval.regexp)) @@ -1959,7 +1959,7 @@ yyreduce: case 39: /* Line 1464 of yacc.c */ -#line 413 "../src/parser.ypp" +#line 413 "../src/parse/parser.ypp" { (yyval.regexp) = (yyvsp[(1) - (1)].regexp); ;} @@ -1968,7 +1968,7 @@ yyreduce: case 40: /* Line 1464 of yacc.c */ -#line 417 "../src/parser.ypp" +#line 417 "../src/parse/parser.ypp" { (yyval.regexp) = new CatOp((yyvsp[(1) - (2)].regexp), (yyvsp[(2) - (2)].regexp)); ;} @@ -1977,7 +1977,7 @@ yyreduce: case 41: /* Line 1464 of yacc.c */ -#line 424 "../src/parser.ypp" +#line 424 "../src/parse/parser.ypp" { (yyval.regexp) = (yyvsp[(1) - (1)].regexp); ;} @@ -1986,7 +1986,7 @@ yyreduce: case 42: /* Line 1464 of yacc.c */ -#line 428 "../src/parser.ypp" +#line 428 "../src/parse/parser.ypp" { switch((yyvsp[(2) - (2)].op)) { @@ -2006,7 +2006,7 @@ yyreduce: case 43: /* Line 1464 of yacc.c */ -#line 443 "../src/parser.ypp" +#line 443 "../src/parse/parser.ypp" { (yyval.regexp) = new CloseVOp((yyvsp[(1) - (2)].regexp), (yyvsp[(2) - (2)].extop).minsize, (yyvsp[(2) - (2)].extop).maxsize); ;} @@ -2015,7 +2015,7 @@ yyreduce: case 44: /* Line 1464 of yacc.c */ -#line 450 "../src/parser.ypp" +#line 450 "../src/parse/parser.ypp" { (yyval.op) = (yyvsp[(1) - (1)].op); ;} @@ -2024,7 +2024,7 @@ yyreduce: case 45: /* Line 1464 of yacc.c */ -#line 454 "../src/parser.ypp" +#line 454 "../src/parse/parser.ypp" { (yyval.op) = (yyvsp[(1) - (1)].op); ;} @@ -2033,7 +2033,7 @@ yyreduce: case 46: /* Line 1464 of yacc.c */ -#line 458 "../src/parser.ypp" +#line 458 "../src/parse/parser.ypp" { (yyval.op) = ((yyvsp[(1) - (2)].op) == (yyvsp[(2) - (2)].op)) ? (yyvsp[(1) - (2)].op) : '*'; ;} @@ -2042,7 +2042,7 @@ yyreduce: case 47: /* Line 1464 of yacc.c */ -#line 462 "../src/parser.ypp" +#line 462 "../src/parse/parser.ypp" { (yyval.op) = ((yyvsp[(1) - (2)].op) == (yyvsp[(2) - (2)].op)) ? (yyvsp[(1) - (2)].op) : '*'; ;} @@ -2051,7 +2051,7 @@ yyreduce: case 48: /* Line 1464 of yacc.c */ -#line 469 "../src/parser.ypp" +#line 469 "../src/parse/parser.ypp" { if(!(yyvsp[(1) - (1)].symbol)->re) { @@ -2064,7 +2064,7 @@ yyreduce: case 49: /* Line 1464 of yacc.c */ -#line 477 "../src/parser.ypp" +#line 477 "../src/parse/parser.ypp" { (yyval.regexp) = (yyvsp[(1) - (1)].regexp); ;} @@ -2073,7 +2073,7 @@ yyreduce: case 50: /* Line 1464 of yacc.c */ -#line 481 "../src/parser.ypp" +#line 481 "../src/parse/parser.ypp" { (yyval.regexp) = (yyvsp[(1) - (1)].regexp); ;} @@ -2082,7 +2082,7 @@ yyreduce: case 51: /* Line 1464 of yacc.c */ -#line 485 "../src/parser.ypp" +#line 485 "../src/parse/parser.ypp" { (yyval.regexp) = (yyvsp[(2) - (3)].regexp); ;} @@ -2303,7 +2303,7 @@ yyreturn: /* Line 1684 of yacc.c */ -#line 490 "../src/parser.ypp" +#line 490 "../src/parse/parser.ypp" extern "C" { diff --git a/re2c/bootstrap/scanner.cc b/re2c/bootstrap/scanner.cc index e7d31bc8..a90292ea 100644 --- a/re2c/bootstrap/scanner.cc +++ b/re2c/bootstrap/scanner.cc @@ -1,14 +1,14 @@ -/* Generated by re2c 0.14.1.dev on Fri May 8 22:17:28 2015*/ +/* Generated by re2c 0.14.1.dev on Mon May 11 13:39:25 2015*/ #include #include #include #include -#include "src/dfa.h" +#include "src/codegen/print.h" +#include "src/dfa/dfa.h" #include "src/globals.h" -#include "src/parser.h" -#include "src/print.h" -#include "src/scanner.h" +#include "src/parse/parser.h" +#include "src/parse/scanner.h" #include "y.tab.h" extern YYSTYPE yylval; diff --git a/re2c/bootstrap/y.tab.h b/re2c/bootstrap/y.tab.h index ba23488a..6ebc6274 100644 --- a/re2c/bootstrap/y.tab.h +++ b/re2c/bootstrap/y.tab.h @@ -61,7 +61,7 @@ typedef union YYSTYPE { /* Line 1685 of yacc.c */ -#line 149 "../src/parser.ypp" +#line 149 "../src/parse/parser.ypp" re2c::Symbol *symbol; re2c::RegExp *regexp; diff --git a/re2c/configure.ac b/re2c/configure.ac index 4cdd51bd..86baefa2 100644 --- a/re2c/configure.ac +++ b/re2c/configure.ac @@ -2,7 +2,7 @@ AC_INIT([re2c],[0.14.1.dev],[re2c-general@lists.sourceforge.net]) AM_INIT_AUTOMAKE([-Wall -Werror foreign]) -AC_CONFIG_SRCDIR([src/actions.cc]) +AC_CONFIG_SRCDIR([src/main.cc]) AC_CONFIG_HEADERS([config.h]) diff --git a/re2c/src/code.cc b/re2c/src/codegen/code.cc similarity index 99% rename from re2c/src/code.cc rename to re2c/src/codegen/code.cc index db91252e..7424f657 100644 --- a/re2c/src/code.cc +++ b/re2c/src/codegen/code.cc @@ -10,16 +10,16 @@ #include #include -#include "src/code.h" -#include "src/dfa.h" +#include "src/codegen/code.h" +#include "src/codegen/go.h" +#include "src/codegen/indent.h" +#include "src/codegen/input_api.h" +#include "src/codegen/print.h" +#include "src/codegen/skeleton/skeleton.h" +#include "src/dfa/dfa.h" #include "src/globals.h" -#include "src/go.h" -#include "src/indent.h" -#include "src/input_api.h" -#include "src/parser.h" -#include "src/print.h" -#include "src/skeleton.h" -#include "src/substr.h" +#include "src/parse/parser.h" +#include "src/util/substr.h" namespace re2c { diff --git a/re2c/src/code.h b/re2c/src/codegen/code.h similarity index 97% rename from re2c/src/code.h rename to re2c/src/codegen/code.h index 82dda71b..d75c0e4a 100644 --- a/re2c/src/code.h +++ b/re2c/src/codegen/code.h @@ -2,7 +2,7 @@ #ifndef _code_h #define _code_h -#include "src/re.h" +#include "src/dfa/re.h" namespace re2c { diff --git a/re2c/src/code_names.cc b/re2c/src/codegen/code_names.cc similarity index 90% rename from re2c/src/code_names.cc rename to re2c/src/codegen/code_names.cc index 96f87349..1df3e2b8 100644 --- a/re2c/src/code_names.cc +++ b/re2c/src/codegen/code_names.cc @@ -1,4 +1,4 @@ -#include "src/code_names.h" +#include "src/codegen/code_names.h" #include "src/globals.h" namespace re2c diff --git a/re2c/src/code_names.h b/re2c/src/codegen/code_names.h similarity index 100% rename from re2c/src/code_names.h rename to re2c/src/codegen/code_names.h diff --git a/re2c/src/go.h b/re2c/src/codegen/go.h similarity index 98% rename from re2c/src/go.h rename to re2c/src/codegen/go.h index d7f8c107..a34a59f4 100644 --- a/re2c/src/go.h +++ b/re2c/src/codegen/go.h @@ -4,8 +4,8 @@ #include #include -#include "src/c99_stdint.h" -#include "src/code.h" +#include "src/codegen/code.h" +#include "src/util/c99_stdint.h" namespace re2c { diff --git a/re2c/src/go_construct.cc b/re2c/src/codegen/go_construct.cc similarity index 99% rename from re2c/src/go_construct.cc rename to re2c/src/codegen/go_construct.cc index 0d096a38..43f91f2a 100644 --- a/re2c/src/go_construct.cc +++ b/re2c/src/codegen/go_construct.cc @@ -1,5 +1,5 @@ -#include "src/dfa.h" -#include "src/go.h" +#include "src/codegen/go.h" +#include "src/dfa/dfa.h" namespace re2c { diff --git a/re2c/src/go_destruct.cc b/re2c/src/codegen/go_destruct.cc similarity index 94% rename from re2c/src/go_destruct.cc rename to re2c/src/codegen/go_destruct.cc index 16ae3bc0..7db6c695 100644 --- a/re2c/src/go_destruct.cc +++ b/re2c/src/codegen/go_destruct.cc @@ -1,5 +1,5 @@ -#include "src/dfa.h" -#include "src/go.h" +#include "src/codegen/go.h" +#include "src/dfa/dfa.h" namespace re2c { diff --git a/re2c/src/go_emit.cc b/re2c/src/codegen/go_emit.cc similarity index 97% rename from re2c/src/go_emit.cc rename to re2c/src/codegen/go_emit.cc index 91db85ba..f03e6985 100644 --- a/re2c/src/go_emit.cc +++ b/re2c/src/codegen/go_emit.cc @@ -1,7 +1,7 @@ -#include "src/dfa.h" -#include "src/go.h" -#include "src/indent.h" -#include "src/print.h" +#include "src/codegen/go.h" +#include "src/codegen/indent.h" +#include "src/codegen/print.h" +#include "src/dfa/dfa.h" namespace re2c { diff --git a/re2c/src/go_used_labels.cc b/re2c/src/codegen/go_used_labels.cc similarity index 96% rename from re2c/src/go_used_labels.cc rename to re2c/src/codegen/go_used_labels.cc index c441ddff..e7125c40 100644 --- a/re2c/src/go_used_labels.cc +++ b/re2c/src/codegen/go_used_labels.cc @@ -1,5 +1,5 @@ -#include "src/dfa.h" -#include "src/go.h" +#include "src/codegen/go.h" +#include "src/dfa/dfa.h" namespace re2c { diff --git a/re2c/src/indent.h b/re2c/src/codegen/indent.h similarity index 100% rename from re2c/src/indent.h rename to re2c/src/codegen/indent.h diff --git a/re2c/src/input_api.cc b/re2c/src/codegen/input_api.cc similarity index 98% rename from re2c/src/input_api.cc rename to re2c/src/codegen/input_api.cc index 031b12b0..81e654c2 100644 --- a/re2c/src/input_api.cc +++ b/re2c/src/codegen/input_api.cc @@ -1,8 +1,8 @@ #include +#include "src/codegen/indent.h" +#include "src/codegen/input_api.h" #include "src/globals.h" -#include "src/indent.h" -#include "src/input_api.h" namespace re2c { diff --git a/re2c/src/input_api.h b/re2c/src/codegen/input_api.h similarity index 96% rename from re2c/src/input_api.h rename to re2c/src/codegen/input_api.h index e1af3b54..44036d3d 100644 --- a/re2c/src/input_api.h +++ b/re2c/src/codegen/input_api.h @@ -4,7 +4,7 @@ #include #include -#include "src/c99_stdint.h" +#include "src/util/c99_stdint.h" namespace re2c { diff --git a/re2c/src/output.cc b/re2c/src/codegen/output.cc similarity index 98% rename from re2c/src/output.cc rename to re2c/src/codegen/output.cc index 2a8ccb6c..154eed65 100644 --- a/re2c/src/output.cc +++ b/re2c/src/codegen/output.cc @@ -1,9 +1,9 @@ #include #include -#include "src/output.h" -#include "src/print.h" -#include "src/re.h" +#include "src/codegen/output.h" +#include "src/codegen/print.h" +#include "src/dfa/re.h" namespace re2c { diff --git a/re2c/src/output.h b/re2c/src/codegen/output.h similarity index 98% rename from re2c/src/output.h rename to re2c/src/codegen/output.h index 26d1c4eb..adf135d8 100644 --- a/re2c/src/output.h +++ b/re2c/src/codegen/output.h @@ -6,7 +6,7 @@ #include #include -#include "src/c99_stdint.h" +#include "src/util/c99_stdint.h" namespace re2c { diff --git a/re2c/src/print.cc b/re2c/src/codegen/print.cc similarity index 98% rename from re2c/src/print.cc rename to re2c/src/codegen/print.cc index 3e7a782a..15362349 100644 --- a/re2c/src/print.cc +++ b/re2c/src/codegen/print.cc @@ -1,7 +1,7 @@ #include +#include "src/codegen/print.h" #include "src/globals.h" -#include "src/print.h" namespace re2c { diff --git a/re2c/src/print.h b/re2c/src/codegen/print.h similarity index 89% rename from re2c/src/print.h rename to re2c/src/codegen/print.h index 1c12758c..4d3a5a61 100644 --- a/re2c/src/print.h +++ b/re2c/src/codegen/print.h @@ -3,7 +3,7 @@ #include -#include "src/c99_stdint.h" +#include "src/util/c99_stdint.h" namespace re2c { diff --git a/re2c/src/skeleton.cc b/re2c/src/codegen/skeleton/skeleton.cc similarity index 98% rename from re2c/src/skeleton.cc rename to re2c/src/codegen/skeleton/skeleton.cc index c5db72b7..3ca07b22 100644 --- a/re2c/src/skeleton.cc +++ b/re2c/src/codegen/skeleton/skeleton.cc @@ -1,6 +1,6 @@ -#include "src/indent.h" -#include "src/print.h" -#include "src/skeleton.h" +#include "src/codegen/indent.h" +#include "src/codegen/print.h" +#include "src/codegen/skeleton/skeleton.h" namespace re2c { diff --git a/re2c/src/skeleton.h b/re2c/src/codegen/skeleton/skeleton.h similarity index 97% rename from re2c/src/skeleton.h rename to re2c/src/codegen/skeleton/skeleton.h index 2cedd2a4..ece9e36d 100644 --- a/re2c/src/skeleton.h +++ b/re2c/src/codegen/skeleton/skeleton.h @@ -4,8 +4,8 @@ #include #include -#include "src/c99_stdint.h" -#include "src/dfa.h" +#include "src/dfa/dfa.h" +#include "src/util/c99_stdint.h" namespace re2c { diff --git a/re2c/src/translate.cc b/re2c/src/codegen/translate.cc similarity index 100% rename from re2c/src/translate.cc rename to re2c/src/codegen/translate.cc diff --git a/re2c/src/actions.cc b/re2c/src/dfa/actions.cc similarity index 98% rename from re2c/src/actions.cc rename to re2c/src/dfa/actions.cc index 2c106e61..6beb3a81 100644 --- a/re2c/src/actions.cc +++ b/re2c/src/dfa/actions.cc @@ -5,13 +5,13 @@ #include #include -#include "src/dfa.h" +#include "src/codegen/print.h" +#include "src/codegen/skeleton/skeleton.h" +#include "src/dfa/dfa.h" +#include "src/dfa/encoding/utf16/utf16_regexp.h" +#include "src/dfa/encoding/utf8/utf8_regexp.h" #include "src/globals.h" -#include "src/parser.h" -#include "src/print.h" -#include "src/skeleton.h" -#include "src/utf8_regexp.h" -#include "src/utf16_regexp.h" +#include "src/parse/parser.h" namespace re2c { diff --git a/re2c/src/dfa.cc b/re2c/src/dfa/dfa.cc similarity index 97% rename from re2c/src/dfa.cc rename to re2c/src/dfa/dfa.cc index e7448d97..dde45840 100644 --- a/re2c/src/dfa.cc +++ b/re2c/src/dfa/dfa.cc @@ -2,10 +2,10 @@ #include #include -#include "src/dfa.h" +#include "src/codegen/print.h" +#include "src/dfa/dfa.h" #include "src/globals.h" -#include "src/print.h" -#include "src/substr.h" +#include "src/util/substr.h" namespace re2c { diff --git a/re2c/src/dfa.h b/re2c/src/dfa/dfa.h similarity index 98% rename from re2c/src/dfa.h rename to re2c/src/dfa/dfa.h index 1722075e..964b6c1a 100644 --- a/re2c/src/dfa.h +++ b/re2c/src/dfa/dfa.h @@ -5,8 +5,8 @@ #include #include -#include "src/go.h" -#include "src/re.h" +#include "src/codegen/go.h" +#include "src/dfa/re.h" namespace re2c { diff --git a/re2c/src/enc.cc b/re2c/src/dfa/encoding/enc.cc similarity index 99% rename from re2c/src/enc.cc rename to re2c/src/dfa/encoding/enc.cc index 3580027b..2d775972 100644 --- a/re2c/src/enc.cc +++ b/re2c/src/dfa/encoding/enc.cc @@ -1,4 +1,4 @@ -#include "src/enc.h" +#include "src/dfa/encoding/enc.h" namespace re2c { diff --git a/re2c/src/enc.h b/re2c/src/dfa/encoding/enc.h similarity index 98% rename from re2c/src/enc.h rename to re2c/src/dfa/encoding/enc.h index c5b26709..2bbbee54 100644 --- a/re2c/src/enc.h +++ b/re2c/src/dfa/encoding/enc.h @@ -1,8 +1,8 @@ #ifndef _enc_h #define _enc_h -#include "src/c99_stdint.h" -#include "src/range.h" +#include "src/util/c99_stdint.h" +#include "src/util/range.h" namespace re2c { diff --git a/re2c/src/range_suffix.cc b/re2c/src/dfa/encoding/range_suffix.cc similarity index 86% rename from re2c/src/range_suffix.cc rename to re2c/src/dfa/encoding/range_suffix.cc index 1e935699..3c8ccb50 100644 --- a/re2c/src/range_suffix.cc +++ b/re2c/src/dfa/encoding/range_suffix.cc @@ -1,5 +1,5 @@ -#include "src/re.h" -#include "src/range_suffix.h" +#include "src/dfa/encoding/range_suffix.h" +#include "src/dfa/re.h" namespace re2c { diff --git a/re2c/src/range_suffix.h b/re2c/src/dfa/encoding/range_suffix.h similarity index 88% rename from re2c/src/range_suffix.h rename to re2c/src/dfa/encoding/range_suffix.h index 638cba74..f76d3fc9 100644 --- a/re2c/src/range_suffix.h +++ b/re2c/src/dfa/encoding/range_suffix.h @@ -3,8 +3,8 @@ #include // NULL -#include "src/c99_stdint.h" -#include "src/free_list.h" +#include "src/util/c99_stdint.h" +#include "src/util/free_list.h" namespace re2c { diff --git a/re2c/src/utf16.cc b/re2c/src/dfa/encoding/utf16/utf16.cc similarity index 84% rename from re2c/src/utf16.cc rename to re2c/src/dfa/encoding/utf16/utf16.cc index 83d52185..5b2d8448 100644 --- a/re2c/src/utf16.cc +++ b/re2c/src/dfa/encoding/utf16/utf16.cc @@ -1,4 +1,4 @@ -#include "src/utf16.h" +#include "src/dfa/encoding/utf16/utf16.h" namespace re2c { diff --git a/re2c/src/utf16.h b/re2c/src/dfa/encoding/utf16/utf16.h similarity index 95% rename from re2c/src/utf16.h rename to re2c/src/dfa/encoding/utf16/utf16.h index 3a844648..e9b6bae7 100644 --- a/re2c/src/utf16.h +++ b/re2c/src/dfa/encoding/utf16/utf16.h @@ -1,7 +1,7 @@ #ifndef _re2c_utf16_h #define _re2c_utf16_h -#include "src/c99_stdint.h" +#include "src/util/c99_stdint.h" namespace re2c { diff --git a/re2c/src/utf16_range.cc b/re2c/src/dfa/encoding/utf16/utf16_range.cc similarity index 98% rename from re2c/src/utf16_range.cc rename to re2c/src/dfa/encoding/utf16/utf16_range.cc index 8d1b7576..187f42ff 100644 --- a/re2c/src/utf16_range.cc +++ b/re2c/src/dfa/encoding/utf16/utf16_range.cc @@ -1,5 +1,5 @@ -#include "src/re.h" -#include "src/utf16_range.h" +#include "src/dfa/encoding/utf16/utf16_range.h" +#include "src/dfa/re.h" namespace re2c { diff --git a/re2c/src/utf16_range.h b/re2c/src/dfa/encoding/utf16/utf16_range.h similarity index 85% rename from re2c/src/utf16_range.h rename to re2c/src/dfa/encoding/utf16/utf16_range.h index 8d467d36..e98bba7f 100644 --- a/re2c/src/utf16_range.h +++ b/re2c/src/dfa/encoding/utf16/utf16_range.h @@ -1,8 +1,8 @@ #ifndef _utf16_range_h #define _utf16_range_h -#include "src/range_suffix.h" -#include "src/utf16.h" +#include "src/dfa/encoding/range_suffix.h" +#include "src/dfa/encoding/utf16/utf16.h" namespace re2c { diff --git a/re2c/src/utf16_regexp.cc b/re2c/src/dfa/encoding/utf16/utf16_regexp.cc similarity index 86% rename from re2c/src/utf16_regexp.cc rename to re2c/src/dfa/encoding/utf16/utf16_regexp.cc index cdc1aa30..ee26ce0e 100644 --- a/re2c/src/utf16_regexp.cc +++ b/re2c/src/dfa/encoding/utf16/utf16_regexp.cc @@ -1,6 +1,6 @@ -#include "src/re.h" -#include "src/utf16_range.h" -#include "src/utf16_regexp.h" +#include "src/dfa/encoding/utf16/utf16_range.h" +#include "src/dfa/encoding/utf16/utf16_regexp.h" +#include "src/dfa/re.h" namespace re2c { diff --git a/re2c/src/utf16_regexp.h b/re2c/src/dfa/encoding/utf16/utf16_regexp.h similarity index 75% rename from re2c/src/utf16_regexp.h rename to re2c/src/dfa/encoding/utf16/utf16_regexp.h index e8231892..7757ae8d 100644 --- a/re2c/src/utf16_regexp.h +++ b/re2c/src/dfa/encoding/utf16/utf16_regexp.h @@ -1,7 +1,8 @@ #ifndef _utf16_regexp_h #define _utf16_regexp_h -#include "src/utf16.h" +#include "src/dfa/encoding/utf16/utf16.h" +#include "src/util/range.h" namespace re2c { diff --git a/re2c/src/utf8.cc b/re2c/src/dfa/encoding/utf8/utf8.cc similarity index 97% rename from re2c/src/utf8.cc rename to re2c/src/dfa/encoding/utf8/utf8.cc index d45d4e8a..70256933 100644 --- a/re2c/src/utf8.cc +++ b/re2c/src/dfa/encoding/utf8/utf8.cc @@ -1,4 +1,4 @@ -#include "src/utf8.h" +#include "src/dfa/encoding/utf8/utf8.h" namespace re2c { diff --git a/re2c/src/utf8.h b/re2c/src/dfa/encoding/utf8/utf8.h similarity index 96% rename from re2c/src/utf8.h rename to re2c/src/dfa/encoding/utf8/utf8.h index 848622d9..f40a5853 100644 --- a/re2c/src/utf8.h +++ b/re2c/src/dfa/encoding/utf8/utf8.h @@ -1,7 +1,7 @@ #ifndef _re2c_utf8_h #define _re2c_utf8_h -#include "src/c99_stdint.h" +#include "src/util/c99_stdint.h" namespace re2c { diff --git a/re2c/src/utf8_range.cc b/re2c/src/dfa/encoding/utf8/utf8_range.cc similarity index 97% rename from re2c/src/utf8_range.cc rename to re2c/src/dfa/encoding/utf8/utf8_range.cc index 0dc37e4c..c8fd9cb9 100644 --- a/re2c/src/utf8_range.cc +++ b/re2c/src/dfa/encoding/utf8/utf8_range.cc @@ -1,5 +1,5 @@ -#include "src/re.h" -#include "src/utf8_range.h" +#include "src/dfa/encoding/utf8/utf8_range.h" +#include "src/dfa/re.h" namespace re2c { diff --git a/re2c/src/utf8_range.h b/re2c/src/dfa/encoding/utf8/utf8_range.h similarity index 81% rename from re2c/src/utf8_range.h rename to re2c/src/dfa/encoding/utf8/utf8_range.h index fc9a4085..9dce075d 100644 --- a/re2c/src/utf8_range.h +++ b/re2c/src/dfa/encoding/utf8/utf8_range.h @@ -1,8 +1,8 @@ #ifndef _utf8_range_h #define _utf8_range_h -#include "src/range_suffix.h" -#include "src/utf8.h" +#include "src/dfa/encoding/range_suffix.h" +#include "src/dfa/encoding/utf8/utf8.h" namespace re2c { diff --git a/re2c/src/utf8_regexp.cc b/re2c/src/dfa/encoding/utf8/utf8_regexp.cc similarity index 87% rename from re2c/src/utf8_regexp.cc rename to re2c/src/dfa/encoding/utf8/utf8_regexp.cc index 45c60012..1b9fb06c 100644 --- a/re2c/src/utf8_regexp.cc +++ b/re2c/src/dfa/encoding/utf8/utf8_regexp.cc @@ -1,6 +1,6 @@ -#include "src/re.h" -#include "src/utf8_range.h" -#include "src/utf8_regexp.h" +#include "src/dfa/encoding/utf8/utf8_range.h" +#include "src/dfa/encoding/utf8/utf8_regexp.h" +#include "src/dfa/re.h" namespace re2c { diff --git a/re2c/src/utf8_regexp.h b/re2c/src/dfa/encoding/utf8/utf8_regexp.h similarity index 75% rename from re2c/src/utf8_regexp.h rename to re2c/src/dfa/encoding/utf8/utf8_regexp.h index 20c73cca..a32a5b2f 100644 --- a/re2c/src/utf8_regexp.h +++ b/re2c/src/dfa/encoding/utf8/utf8_regexp.h @@ -1,7 +1,8 @@ #ifndef _utf8_regexp_h #define _utf8_regexp_h -#include "src/utf8.h" +#include "src/dfa/encoding/utf8/utf8.h" +#include "src/util/range.h" namespace re2c { diff --git a/re2c/src/ins.h b/re2c/src/dfa/ins.h similarity index 94% rename from re2c/src/ins.h rename to re2c/src/dfa/ins.h index 7805b758..b2d9bb93 100644 --- a/re2c/src/ins.h +++ b/re2c/src/dfa/ins.h @@ -2,7 +2,7 @@ #ifndef _ins_h #define _ins_h -#include "src/c99_stdint.h" +#include "src/util/c99_stdint.h" namespace re2c { diff --git a/re2c/src/re.h b/re2c/src/dfa/re.h similarity index 97% rename from re2c/src/re.h rename to re2c/src/dfa/re.h index b0e96959..4dbebe86 100644 --- a/re2c/src/re.h +++ b/re2c/src/dfa/re.h @@ -9,13 +9,13 @@ #include #include -#include "src/free_list.h" +#include "src/codegen/output.h" +#include "src/dfa/ins.h" #include "src/globals.h" -#include "src/ins.h" -#include "src/output.h" -#include "src/range.h" -#include "src/smart_ptr.h" -#include "src/token.h" +#include "src/parse/token.h" +#include "src/util/range.h" +#include "src/util/smart_ptr.h" +#include "src/util/free_list.h" namespace re2c { diff --git a/re2c/src/globals.h b/re2c/src/globals.h index 69cd36b9..dbaf3d58 100644 --- a/re2c/src/globals.h +++ b/re2c/src/globals.h @@ -6,10 +6,10 @@ #include #include -#include "src/c99_stdint.h" -#include "src/code_names.h" -#include "src/enc.h" -#include "src/input_api.h" +#include "src/codegen/code_names.h" +#include "src/codegen/input_api.h" +#include "src/dfa/encoding/enc.h" +#include "src/util/c99_stdint.h" namespace re2c { diff --git a/re2c/src/main.cc b/re2c/src/main.cc index 91b875ad..62c8b6d4 100644 --- a/re2c/src/main.cc +++ b/re2c/src/main.cc @@ -6,11 +6,11 @@ #include #include "config.h" -#include "src/dfa.h" -#include "src/enc.h" +#include "src/dfa/dfa.h" +#include "src/dfa/encoding/enc.h" #include "src/globals.h" #include "src/mbo_getopt.h" -#include "src/parser.h" +#include "src/parse/parser.h" namespace re2c { diff --git a/re2c/src/input.cc b/re2c/src/parse/input.cc similarity index 92% rename from re2c/src/input.cc rename to re2c/src/parse/input.cc index cb305e43..472e6b99 100644 --- a/re2c/src/input.cc +++ b/re2c/src/parse/input.cc @@ -1,4 +1,4 @@ -#include "src/input.h" +#include "src/parse/input.h" namespace re2c { diff --git a/re2c/src/input.h b/re2c/src/parse/input.h similarity index 100% rename from re2c/src/input.h rename to re2c/src/parse/input.h diff --git a/re2c/src/parser.h b/re2c/src/parse/parser.h similarity index 88% rename from re2c/src/parser.h rename to re2c/src/parse/parser.h index c0cafb9d..aa81b47d 100644 --- a/re2c/src/parser.h +++ b/re2c/src/parse/parser.h @@ -2,9 +2,9 @@ #ifndef _parser_h #define _parser_h -#include "src/output.h" -#include "src/re.h" -#include "src/scanner.h" +#include "src/codegen/output.h" +#include "src/dfa/re.h" +#include "src/parse/scanner.h" namespace re2c { diff --git a/re2c/src/parser.ypp b/re2c/src/parse/parser.ypp similarity index 99% rename from re2c/src/parser.ypp rename to re2c/src/parse/parser.ypp index 6f9fb5bf..dac9efb4 100644 --- a/re2c/src/parser.ypp +++ b/re2c/src/parse/parser.ypp @@ -10,11 +10,11 @@ #include #include "config.h" -#include "src/c99_stdint.h" -#include "src/dfa.h" +#include "src/dfa/dfa.h" #include "src/globals.h" -#include "src/parser.h" -#include "src/smart_ptr.h" +#include "src/parse/parser.h" +#include "src/util/c99_stdint.h" +#include "src/util/smart_ptr.h" #define YYMALLOC malloc #define YYFREE free diff --git a/re2c/src/scanner.h b/re2c/src/parse/scanner.h similarity index 95% rename from re2c/src/scanner.h rename to re2c/src/parse/scanner.h index c8c81c4c..4fd5afdc 100644 --- a/re2c/src/scanner.h +++ b/re2c/src/parse/scanner.h @@ -4,11 +4,11 @@ #include +#include "src/codegen/output.h" +#include "src/dfa/re.h" #include "src/globals.h" -#include "src/input.h" -#include "src/output.h" -#include "src/re.h" -#include "src/token.h" +#include "src/parse/input.h" +#include "src/parse/token.h" namespace re2c { diff --git a/re2c/src/scanner.re b/re2c/src/parse/scanner.re similarity index 98% rename from re2c/src/scanner.re rename to re2c/src/parse/scanner.re index 2eb403df..6b7332a9 100644 --- a/re2c/src/scanner.re +++ b/re2c/src/parse/scanner.re @@ -3,11 +3,11 @@ #include #include -#include "src/dfa.h" +#include "src/codegen/print.h" +#include "src/dfa/dfa.h" #include "src/globals.h" -#include "src/parser.h" -#include "src/print.h" -#include "src/scanner.h" +#include "src/parse/parser.h" +#include "src/parse/scanner.h" #include "y.tab.h" extern YYSTYPE yylval; diff --git a/re2c/src/token.h b/re2c/src/parse/token.h similarity index 97% rename from re2c/src/token.h rename to re2c/src/parse/token.h index c9066c85..d4f25f05 100644 --- a/re2c/src/token.h +++ b/re2c/src/parse/token.h @@ -2,7 +2,7 @@ #ifndef _token_h #define _token_h -#include "src/substr.h" +#include "src/util/substr.h" namespace re2c { diff --git a/re2c/src/c99_stdint.h b/re2c/src/util/c99_stdint.h similarity index 100% rename from re2c/src/c99_stdint.h rename to re2c/src/util/c99_stdint.h diff --git a/re2c/src/free_list.h b/re2c/src/util/free_list.h similarity index 100% rename from re2c/src/free_list.h rename to re2c/src/util/free_list.h diff --git a/re2c/src/range.cc b/re2c/src/util/range.cc similarity index 96% rename from re2c/src/range.cc rename to re2c/src/util/range.cc index 331c3606..73dc2fc3 100644 --- a/re2c/src/range.cc +++ b/re2c/src/util/range.cc @@ -1,5 +1,5 @@ -#include "src/print.h" -#include "src/range.h" +#include "src/codegen/print.h" +#include "src/util/range.h" namespace re2c { diff --git a/re2c/src/range.h b/re2c/src/util/range.h similarity index 91% rename from re2c/src/range.h rename to re2c/src/util/range.h index 5cb5968a..ed1478d9 100644 --- a/re2c/src/range.h +++ b/re2c/src/util/range.h @@ -3,8 +3,8 @@ #include -#include "src/c99_stdint.h" -#include "src/free_list.h" +#include "src/util/c99_stdint.h" +#include "src/util/free_list.h" namespace re2c { diff --git a/re2c/src/smart_ptr.h b/re2c/src/util/smart_ptr.h similarity index 100% rename from re2c/src/smart_ptr.h rename to re2c/src/util/smart_ptr.h diff --git a/re2c/src/substr.cc b/re2c/src/util/substr.cc similarity index 96% rename from re2c/src/substr.cc rename to re2c/src/util/substr.cc index 0c1ecd67..b2cbc094 100644 --- a/re2c/src/substr.cc +++ b/re2c/src/util/substr.cc @@ -3,7 +3,7 @@ #include #include "src/globals.h" -#include "src/substr.h" +#include "src/util/substr.h" #ifndef HAVE_STRNDUP diff --git a/re2c/src/substr.h b/re2c/src/util/substr.h similarity index 98% rename from re2c/src/substr.h rename to re2c/src/util/substr.h index 4b1edb0d..d6f2f452 100644 --- a/re2c/src/substr.h +++ b/re2c/src/util/substr.h @@ -7,7 +7,7 @@ #include #include "config.h" -#include "src/c99_stdint.h" +#include "src/util/c99_stdint.h" namespace re2c { -- 2.40.0