]> granicus.if.org Git - re2c/commitdiff
Improved source files layout.
authorUlya Trofimovich <skvadrik@gmail.com>
Mon, 11 May 2015 12:46:26 +0000 (13:46 +0100)
committerUlya Trofimovich <skvadrik@gmail.com>
Mon, 11 May 2015 12:46:26 +0000 (13:46 +0100)
Created a directory tree to group logically related source files
and clean up top source directory.

61 files changed:
re2c/Makefile.am
re2c/bootstrap/parser.cc
re2c/bootstrap/scanner.cc
re2c/bootstrap/y.tab.h
re2c/configure.ac
re2c/src/codegen/code.cc [moved from re2c/src/code.cc with 99% similarity]
re2c/src/codegen/code.h [moved from re2c/src/code.h with 97% similarity]
re2c/src/codegen/code_names.cc [moved from re2c/src/code_names.cc with 90% similarity]
re2c/src/codegen/code_names.h [moved from re2c/src/code_names.h with 100% similarity]
re2c/src/codegen/go.h [moved from re2c/src/go.h with 98% similarity]
re2c/src/codegen/go_construct.cc [moved from re2c/src/go_construct.cc with 99% similarity]
re2c/src/codegen/go_destruct.cc [moved from re2c/src/go_destruct.cc with 94% similarity]
re2c/src/codegen/go_emit.cc [moved from re2c/src/go_emit.cc with 97% similarity]
re2c/src/codegen/go_used_labels.cc [moved from re2c/src/go_used_labels.cc with 96% similarity]
re2c/src/codegen/indent.h [moved from re2c/src/indent.h with 100% similarity]
re2c/src/codegen/input_api.cc [moved from re2c/src/input_api.cc with 98% similarity]
re2c/src/codegen/input_api.h [moved from re2c/src/input_api.h with 96% similarity]
re2c/src/codegen/output.cc [moved from re2c/src/output.cc with 98% similarity]
re2c/src/codegen/output.h [moved from re2c/src/output.h with 98% similarity]
re2c/src/codegen/print.cc [moved from re2c/src/print.cc with 98% similarity]
re2c/src/codegen/print.h [moved from re2c/src/print.h with 89% similarity]
re2c/src/codegen/skeleton/skeleton.cc [moved from re2c/src/skeleton.cc with 98% similarity]
re2c/src/codegen/skeleton/skeleton.h [moved from re2c/src/skeleton.h with 97% similarity]
re2c/src/codegen/translate.cc [moved from re2c/src/translate.cc with 100% similarity]
re2c/src/dfa/actions.cc [moved from re2c/src/actions.cc with 98% similarity]
re2c/src/dfa/dfa.cc [moved from re2c/src/dfa.cc with 97% similarity]
re2c/src/dfa/dfa.h [moved from re2c/src/dfa.h with 98% similarity]
re2c/src/dfa/encoding/enc.cc [moved from re2c/src/enc.cc with 99% similarity]
re2c/src/dfa/encoding/enc.h [moved from re2c/src/enc.h with 98% similarity]
re2c/src/dfa/encoding/range_suffix.cc [moved from re2c/src/range_suffix.cc with 86% similarity]
re2c/src/dfa/encoding/range_suffix.h [moved from re2c/src/range_suffix.h with 88% similarity]
re2c/src/dfa/encoding/utf16/utf16.cc [moved from re2c/src/utf16.cc with 84% similarity]
re2c/src/dfa/encoding/utf16/utf16.h [moved from re2c/src/utf16.h with 95% similarity]
re2c/src/dfa/encoding/utf16/utf16_range.cc [moved from re2c/src/utf16_range.cc with 98% similarity]
re2c/src/dfa/encoding/utf16/utf16_range.h [moved from re2c/src/utf16_range.h with 85% similarity]
re2c/src/dfa/encoding/utf16/utf16_regexp.cc [moved from re2c/src/utf16_regexp.cc with 86% similarity]
re2c/src/dfa/encoding/utf16/utf16_regexp.h [moved from re2c/src/utf16_regexp.h with 75% similarity]
re2c/src/dfa/encoding/utf8/utf8.cc [moved from re2c/src/utf8.cc with 97% similarity]
re2c/src/dfa/encoding/utf8/utf8.h [moved from re2c/src/utf8.h with 96% similarity]
re2c/src/dfa/encoding/utf8/utf8_range.cc [moved from re2c/src/utf8_range.cc with 97% similarity]
re2c/src/dfa/encoding/utf8/utf8_range.h [moved from re2c/src/utf8_range.h with 81% similarity]
re2c/src/dfa/encoding/utf8/utf8_regexp.cc [moved from re2c/src/utf8_regexp.cc with 87% similarity]
re2c/src/dfa/encoding/utf8/utf8_regexp.h [moved from re2c/src/utf8_regexp.h with 75% similarity]
re2c/src/dfa/ins.h [moved from re2c/src/ins.h with 94% similarity]
re2c/src/dfa/re.h [moved from re2c/src/re.h with 97% similarity]
re2c/src/globals.h
re2c/src/main.cc
re2c/src/parse/input.cc [moved from re2c/src/input.cc with 92% similarity]
re2c/src/parse/input.h [moved from re2c/src/input.h with 100% similarity]
re2c/src/parse/parser.h [moved from re2c/src/parser.h with 88% similarity]
re2c/src/parse/parser.ypp [moved from re2c/src/parser.ypp with 99% similarity]
re2c/src/parse/scanner.h [moved from re2c/src/scanner.h with 95% similarity]
re2c/src/parse/scanner.re [moved from re2c/src/scanner.re with 98% similarity]
re2c/src/parse/token.h [moved from re2c/src/token.h with 97% similarity]
re2c/src/util/c99_stdint.h [moved from re2c/src/c99_stdint.h with 100% similarity]
re2c/src/util/free_list.h [moved from re2c/src/free_list.h with 100% similarity]
re2c/src/util/range.cc [moved from re2c/src/range.cc with 96% similarity]
re2c/src/util/range.h [moved from re2c/src/range.h with 91% similarity]
re2c/src/util/smart_ptr.h [moved from re2c/src/smart_ptr.h with 100% similarity]
re2c/src/util/substr.cc [moved from re2c/src/substr.cc with 96% similarity]
re2c/src/util/substr.h [moved from re2c/src/substr.h with 98% similarity]

index d1e8ec7eac9b7831f61b59ba5cc247dc15a7307e..1984bc7c1c6d8cb6cdde0d4f64ba46a2f45ce078 100644 (file)
@@ -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).
index 6840f56507fca8e724e1519feab8f753ed940465..a923a0617f9d515be8886649b1494d905151b174 100644 (file)
@@ -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$ */
 #include <set>
 
 #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" {
index e7d31bc898c50cc9d96be3005be6e1ab69db47f8..a90292ea0a60b0c04e508d91af8b4f1fb4b6eef4 100644 (file)
@@ -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 <stdlib.h>
 #include <string.h>
 #include <iostream>
 #include <sstream>
 
-#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;
index ba23488aaca3480e41066787a3abfd6f6da88945..6ebc6274f081275303315153ad0a8a2a1b4c6482 100644 (file)
@@ -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;
index 4cdd51bd75f5972f8ee39b4e9e7dd3b13f201c54..86baefa2565f47630b8b2cc2edde42a636a1f01e 100644 (file)
@@ -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])
 
 
similarity index 99%
rename from re2c/src/code.cc
rename to re2c/src/codegen/code.cc
index db91252e7cf9e9ac5c45e1b2aea170e3ffbbb315..7424f6572895984f16ba01b68f12f27eac13a01b 100644 (file)
 #include <iostream>
 #include <sstream>
 
-#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
 {
similarity index 97%
rename from re2c/src/code.h
rename to re2c/src/codegen/code.h
index 82dda71bc76f0148ac43c2fa7baf1a1295f9e290..d75c0e4a816d1589ed6ff770ad95636c0a1eab50 100644 (file)
@@ -2,7 +2,7 @@
 #ifndef _code_h
 #define _code_h
 
-#include "src/re.h"
+#include "src/dfa/re.h"
 
 namespace re2c
 {
similarity index 90%
rename from re2c/src/code_names.cc
rename to re2c/src/codegen/code_names.cc
index 96f87349f3be1b60e7709cc3617429361f583643..1df3e2b819e4022b463ede706a05dbd15d983abe 100644 (file)
@@ -1,4 +1,4 @@
-#include "src/code_names.h"
+#include "src/codegen/code_names.h"
 #include "src/globals.h"
 
 namespace re2c
similarity index 98%
rename from re2c/src/go.h
rename to re2c/src/codegen/go.h
index d7f8c10720f48742e92af616f47d64c24df2330b..a34a59f42123ecdbe4c5ecbd5f97396f4c896723 100644 (file)
@@ -4,8 +4,8 @@
 #include <iostream>
 #include <vector>
 
-#include "src/c99_stdint.h"
-#include "src/code.h"
+#include "src/codegen/code.h"
+#include "src/util/c99_stdint.h"
 
 namespace re2c
 {
similarity index 99%
rename from re2c/src/go_construct.cc
rename to re2c/src/codegen/go_construct.cc
index 0d096a38d4d3c29b2e71b560bf8321f374fc1cd5..43f91f2a1c2784835f580ae6a7697091974e3f6a 100644 (file)
@@ -1,5 +1,5 @@
-#include "src/dfa.h"
-#include "src/go.h"
+#include "src/codegen/go.h"
+#include "src/dfa/dfa.h"
 
 namespace re2c
 {
similarity index 94%
rename from re2c/src/go_destruct.cc
rename to re2c/src/codegen/go_destruct.cc
index 16ae3bc068f774d6d233bf6ea7b783dcbb3e7be7..7db6c695bf0f9ffec066d6be68c75e33fdbb7e52 100644 (file)
@@ -1,5 +1,5 @@
-#include "src/dfa.h"
-#include "src/go.h"
+#include "src/codegen/go.h"
+#include "src/dfa/dfa.h"
 
 namespace re2c
 {
similarity index 97%
rename from re2c/src/go_emit.cc
rename to re2c/src/codegen/go_emit.cc
index 91db85baeab57cb856fff72e288e48530325c7d0..f03e69856b1a99b974250f4e43be1851378cfb5a 100644 (file)
@@ -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
 {
similarity index 96%
rename from re2c/src/go_used_labels.cc
rename to re2c/src/codegen/go_used_labels.cc
index c441ddffe3f7da0bd935b166848c900fd898df79..e7125c4014d86cbb4195ce0b6611785fe688e4d7 100644 (file)
@@ -1,5 +1,5 @@
-#include "src/dfa.h"
-#include "src/go.h"
+#include "src/codegen/go.h"
+#include "src/dfa/dfa.h"
 
 namespace re2c
 {
similarity index 100%
rename from re2c/src/indent.h
rename to re2c/src/codegen/indent.h
similarity index 98%
rename from re2c/src/input_api.cc
rename to re2c/src/codegen/input_api.cc
index 031b12b00f046d1642807f113711600d86f5bb94..81e654c281f6164b46aec0d87bcb4f73af31bc04 100644 (file)
@@ -1,8 +1,8 @@
 #include <sstream>
 
+#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
 {
similarity index 96%
rename from re2c/src/input_api.h
rename to re2c/src/codegen/input_api.h
index e1af3b54271abb6a50efdd41efa95fc256b338f6..44036d3da07056b59c37d734bbc2ebf1d15dcedd 100644 (file)
@@ -4,7 +4,7 @@
 #include <map>
 #include <string>
 
-#include "src/c99_stdint.h"
+#include "src/util/c99_stdint.h"
 
 namespace re2c
 {
similarity index 98%
rename from re2c/src/output.cc
rename to re2c/src/codegen/output.cc
index 2a8ccb6c1fea5876dc2c08937353324ee657fef4..154eed6582785f8d9dee5706b4dd7c0440fcc8ed 100644 (file)
@@ -1,9 +1,9 @@
 #include <iomanip>
 #include <stdio.h>
 
-#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
 {
similarity index 98%
rename from re2c/src/output.h
rename to re2c/src/codegen/output.h
index 26d1c4ebde19b4d26dd9b161db6fadf35de29a7c..adf135d8d54f986f5bfb68b4661c7b748908067f 100644 (file)
@@ -6,7 +6,7 @@
 #include <string>
 #include <vector>
 
-#include "src/c99_stdint.h"
+#include "src/util/c99_stdint.h"
 
 namespace re2c
 {
similarity index 98%
rename from re2c/src/print.cc
rename to re2c/src/codegen/print.cc
index 3e7a782a05aa1c73cb53053926400b8d7336fb97..15362349eb61f70ec17db2e2e9f068f486c8edc6 100644 (file)
@@ -1,7 +1,7 @@
 #include <iostream>
 
+#include "src/codegen/print.h"
 #include "src/globals.h"
-#include "src/print.h"
 
 namespace re2c
 {
similarity index 89%
rename from re2c/src/print.h
rename to re2c/src/codegen/print.h
index 1c12758c7697cb1cbec1b9939a3e0ceb886d4933..4d3a5a61697e28346fe9850348340249ec7bc210 100644 (file)
@@ -3,7 +3,7 @@
 
 #include <iosfwd>
 
-#include "src/c99_stdint.h"
+#include "src/util/c99_stdint.h"
 
 namespace re2c
 {
similarity index 98%
rename from re2c/src/skeleton.cc
rename to re2c/src/codegen/skeleton/skeleton.cc
index c5db72b78663c6953ed9ade063f26703176de900..3ca07b2240bd1cccabbe6930e8b2dbecd32b8f34 100644 (file)
@@ -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
 {
similarity index 97%
rename from re2c/src/skeleton.h
rename to re2c/src/codegen/skeleton/skeleton.h
index 2cedd2a458946bbad051cb5d9877e9656525a43d..ece9e36d2dfc78816975e3e1a7578296462adae1 100644 (file)
@@ -4,8 +4,8 @@
 #include <map>
 #include <vector>
 
-#include "src/c99_stdint.h"
-#include "src/dfa.h"
+#include "src/dfa/dfa.h"
+#include "src/util/c99_stdint.h"
 
 namespace re2c
 {
similarity index 98%
rename from re2c/src/actions.cc
rename to re2c/src/dfa/actions.cc
index 2c106e61b98577de4012a3b406a870c61b48ed49..6beb3a81503cc93647c5a166bc0c96cc34a74f46 100644 (file)
@@ -5,13 +5,13 @@
 #include <iomanip>
 #include <cctype>
 
-#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
 {
similarity index 97%
rename from re2c/src/dfa.cc
rename to re2c/src/dfa/dfa.cc
index e7448d97607a032722fd6e64084250f71a2012e9..dde4584099dd03189b20f439bdc8290efab81c00 100644 (file)
@@ -2,10 +2,10 @@
 #include <ctype.h>
 #include <string.h>
 
-#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
 {
similarity index 98%
rename from re2c/src/dfa.h
rename to re2c/src/dfa/dfa.h
index 1722075e7bbedb01a35e92d5b96164c1d5f239e0..964b6c1a06c3a4d99d53332a0eef506551d2aa8f 100644 (file)
@@ -5,8 +5,8 @@
 #include <iosfwd>
 #include <map>
 
-#include "src/go.h"
-#include "src/re.h"
+#include "src/codegen/go.h"
+#include "src/dfa/re.h"
 
 namespace re2c
 {
similarity index 99%
rename from re2c/src/enc.cc
rename to re2c/src/dfa/encoding/enc.cc
index 3580027b077a847b051a90e8c85ba61c89ef8966..2d77597260a052c55398aff2ab4c5a37c79c0c04 100644 (file)
@@ -1,4 +1,4 @@
-#include "src/enc.h"
+#include "src/dfa/encoding/enc.h"
 
 namespace re2c {
 
similarity index 98%
rename from re2c/src/enc.h
rename to re2c/src/dfa/encoding/enc.h
index c5b26709b9cb9e2936b1e0defb1548a5bef9b27c..2bbbee5405515b245f96b9bec8d0ae5a93f50d77 100644 (file)
@@ -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 {
 
similarity index 86%
rename from re2c/src/range_suffix.cc
rename to re2c/src/dfa/encoding/range_suffix.cc
index 1e935699c87cc8b56944d5eab0ad8cf6a1ea1448..3c8ccb50d4aaaa447ae0a43a092c0c0abc4b9698 100644 (file)
@@ -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 {
 
similarity index 88%
rename from re2c/src/range_suffix.h
rename to re2c/src/dfa/encoding/range_suffix.h
index 638cba7488771ed781730232aee6f33807b4b495..f76d3fc96cda0103da3c149d705984d015c9be66 100644 (file)
@@ -3,8 +3,8 @@
 
 #include <stddef.h> // 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 {
 
similarity index 84%
rename from re2c/src/utf16.cc
rename to re2c/src/dfa/encoding/utf16/utf16.cc
index 83d52185c2d34fa00e21f4e0eb1120ed67b14996..5b2d8448d0383b8714076afa554ce87c45528d2a 100644 (file)
@@ -1,4 +1,4 @@
-#include "src/utf16.h"
+#include "src/dfa/encoding/utf16/utf16.h"
 
 namespace re2c {
 
similarity index 95%
rename from re2c/src/utf16.h
rename to re2c/src/dfa/encoding/utf16/utf16.h
index 3a8446484d3d42ab7bd261cd73718c1b532a4780..e9b6bae7388aab735ff87844cc89f7306d0cb430 100644 (file)
@@ -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 {
 
similarity index 98%
rename from re2c/src/utf16_range.cc
rename to re2c/src/dfa/encoding/utf16/utf16_range.cc
index 8d1b7576838910dbfb70838eca82b9130ebe7f19..187f42ffa92929a4a0aa53864e19f3ca129a1d03 100644 (file)
@@ -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 {
 
similarity index 85%
rename from re2c/src/utf16_range.h
rename to re2c/src/dfa/encoding/utf16/utf16_range.h
index 8d467d36ac06cd27271677494b1e5f3a0100eb3f..e98bba7fcc6cf53b0946eacd652033724688a3f1 100644 (file)
@@ -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 {
 
similarity index 86%
rename from re2c/src/utf16_regexp.cc
rename to re2c/src/dfa/encoding/utf16/utf16_regexp.cc
index cdc1aa3022a9186c5591c701ce8745947070291b..ee26ce0e10c9de1e5b8306f78234a42ffbb0682b 100644 (file)
@@ -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 {
 
similarity index 75%
rename from re2c/src/utf16_regexp.h
rename to re2c/src/dfa/encoding/utf16/utf16_regexp.h
index e8231892bde9210f341848c19900d11cbf960911..7757ae8d07e3ea3566b1d168e6ee6605da005b50 100644 (file)
@@ -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 {
 
similarity index 97%
rename from re2c/src/utf8.cc
rename to re2c/src/dfa/encoding/utf8/utf8.cc
index d45d4e8aee20384733f5ee8de63dff92c1a2e44a..702569332efcb02eceb1c9dc2b93d8997e5e10da 100644 (file)
@@ -1,4 +1,4 @@
-#include "src/utf8.h"
+#include "src/dfa/encoding/utf8/utf8.h"
 
 namespace re2c {
 
similarity index 96%
rename from re2c/src/utf8.h
rename to re2c/src/dfa/encoding/utf8/utf8.h
index 848622d9665e42f57ae6fc02d13dae717af18cd6..f40a585305f78d477261d287ed3d9818c0de6573 100644 (file)
@@ -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 {
 
similarity index 97%
rename from re2c/src/utf8_range.cc
rename to re2c/src/dfa/encoding/utf8/utf8_range.cc
index 0dc37e4c79dab307344614ae7a38b8807c708b2f..c8fd9cb9f33bd193146d454907dac660239b4ab4 100644 (file)
@@ -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 {
 
similarity index 81%
rename from re2c/src/utf8_range.h
rename to re2c/src/dfa/encoding/utf8/utf8_range.h
index fc9a4085248a223829a017dbc712812cfcfb6d9d..9dce075dc3dbe7c06959d49a1692d5ea8258c581 100644 (file)
@@ -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 {
 
similarity index 87%
rename from re2c/src/utf8_regexp.cc
rename to re2c/src/dfa/encoding/utf8/utf8_regexp.cc
index 45c60012a42fcf2418128e09c25f6a12d3a52a73..1b9fb06c95f8187a4fc7f9e010c63c26ece4cf53 100644 (file)
@@ -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 {
 
similarity index 75%
rename from re2c/src/utf8_regexp.h
rename to re2c/src/dfa/encoding/utf8/utf8_regexp.h
index 20c73cca5ad3de6d348621c37b7966eae0519fef..a32a5b2fe6b4eab82c843c8dcfc41fc392c8a9bf 100644 (file)
@@ -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 {
 
similarity index 94%
rename from re2c/src/ins.h
rename to re2c/src/dfa/ins.h
index 7805b758d0c42abdd0defd5d25ad57ec6cc897c8..b2d9bb93d33e091d04ac4b131dea5157b3cd41e1 100644 (file)
@@ -2,7 +2,7 @@
 #ifndef _ins_h
 #define _ins_h
 
-#include "src/c99_stdint.h"
+#include "src/util/c99_stdint.h"
 
 namespace re2c
 {
similarity index 97%
rename from re2c/src/re.h
rename to re2c/src/dfa/re.h
index b0e969597d02953c8bb161441602707445e9275b..4dbebe8665e370ff7434db177cfb7704a7be9ac1 100644 (file)
@@ -9,13 +9,13 @@
 #include <vector>
 #include <string>
 
-#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
 {
index 69cd36b92b19942e9cd94b394dee249377a66ecf..dbaf3d58819d5759beed070885b4d42b6b96814f 100644 (file)
@@ -6,10 +6,10 @@
 #include <algorithm>
 #include <string>
 
-#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
 {
index 91b875ad959d1d33c6f5499f30ac1b6ec1e20d57..62c8b6d4b0971b88b98589e9eaf0323ced819816 100644 (file)
@@ -6,11 +6,11 @@
 #include <string.h>
 
 #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
 {
similarity index 92%
rename from re2c/src/input.cc
rename to re2c/src/parse/input.cc
index cb305e4385f18d63d8200d0f22a978c19fa30c71..472e6b995ab04bedda62ad91fc4c0a036c6cd4ba 100644 (file)
@@ -1,4 +1,4 @@
-#include "src/input.h"
+#include "src/parse/input.h"
 
 namespace re2c {
 
similarity index 100%
rename from re2c/src/input.h
rename to re2c/src/parse/input.h
similarity index 88%
rename from re2c/src/parser.h
rename to re2c/src/parse/parser.h
index c0cafb9dab506fdc38c065758c45f19c3890bc19..aa81b47dd1362fcf10b4096101f29ea7fe0446e1 100644 (file)
@@ -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
 {
similarity index 99%
rename from re2c/src/parser.ypp
rename to re2c/src/parse/parser.ypp
index 6f9fb5bfff0ca8551cf6383af3be3e9e7da5633b..dac9efb47feee89ec39595e83bc239953ae1bb52 100644 (file)
 #include <set>
 
 #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
similarity index 95%
rename from re2c/src/scanner.h
rename to re2c/src/parse/scanner.h
index c8c81c4cf1eed97592921f42c8d167ba3284b693..4fd5afdc96e0a026e33c40bc3763d4e14b26da0b 100644 (file)
@@ -4,11 +4,11 @@
 
 #include <string>
 
+#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
 {
similarity index 98%
rename from re2c/src/scanner.re
rename to re2c/src/parse/scanner.re
index 2eb403dff3d2891ea0a757db0652e82587be61f6..6b7332a9b0dab1b7736ceb1008f372f234630665 100644 (file)
@@ -3,11 +3,11 @@
 #include <iostream>
 #include <sstream>
 
-#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;
similarity index 97%
rename from re2c/src/token.h
rename to re2c/src/parse/token.h
index c9066c855cc5a2f83265af67c5eb05420adb0736..d4f25f052f85a7381da142c1a622e0de9362b8b3 100644 (file)
@@ -2,7 +2,7 @@
 #ifndef _token_h
 #define        _token_h
 
-#include "src/substr.h"
+#include "src/util/substr.h"
 
 namespace re2c
 {
similarity index 96%
rename from re2c/src/range.cc
rename to re2c/src/util/range.cc
index 331c36069f4edc34d949d4484b420fb85429f5e2..73dc2fc326f765d6e7b31dc7b781adffd01bc247 100644 (file)
@@ -1,5 +1,5 @@
-#include "src/print.h"
-#include "src/range.h"
+#include "src/codegen/print.h"
+#include "src/util/range.h"
 
 namespace re2c
 {
similarity index 91%
rename from re2c/src/range.h
rename to re2c/src/util/range.h
index 5cb5968af0a3b1a826954127b602ecf25474b7d7..ed1478d90f8e7a41ca6c3a4afa0999dfb5bf9a87 100644 (file)
@@ -3,8 +3,8 @@
 
 #include <iostream>
 
-#include "src/c99_stdint.h"
-#include "src/free_list.h"
+#include "src/util/c99_stdint.h"
+#include "src/util/free_list.h"
 
 namespace re2c
 {
similarity index 96%
rename from re2c/src/substr.cc
rename to re2c/src/util/substr.cc
index 0c1ecd67ffd80a0668077054d4e937e7c011937f..b2cbc0947719f9cbfdb53525f170cd3f5c16257b 100644 (file)
@@ -3,7 +3,7 @@
 #include <stdlib.h>
 
 #include "src/globals.h"
-#include "src/substr.h"
+#include "src/util/substr.h"
 
 #ifndef HAVE_STRNDUP
 
similarity index 98%
rename from re2c/src/substr.h
rename to re2c/src/util/substr.h
index 4b1edb0d26fcedbd13cd327c77ec927eb0e27908..d6f2f452845f833cc226878ddc961c9c1a867b6b 100644 (file)
@@ -7,7 +7,7 @@
 #include <string.h>
 
 #include "config.h"
-#include "src/c99_stdint.h"
+#include "src/util/c99_stdint.h"
 
 namespace re2c
 {