File tree 12 files changed +55
-30
lines changed
12 files changed +55
-30
lines changed Original file line number Diff line number Diff line change 1
1
* ~
2
2
* .o
3
+ * .a
3
4
GRTAGS
4
5
GTAGS
5
6
GPATH
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
1
+ version = release
2
+
3
+ DEBUG := -DREGEX_DEBUG -g -O0
4
+ INCLUDE := -I includes/
5
+ OBJECTS = source/parser.o source/data.o source/regexAlgorithm.o source/automaton.o source/utildata.o source/match.o source/regex.o
6
+
7
+ ifeq ($(version ) , debug)
8
+ FLAG = --std=c++11 $(DEBUG ) $(INCLUDE ) -c
9
+ else
10
+ FLAG = --std=c++11 -DNDEBUG $(INCLUDE ) -c
11
+ endif
12
+
13
+ # .PHONY: release
14
+ release : $(OBJECTS )
15
+ ar r libregex.a $(OBJECTS )
16
+
17
+ source/data.o : source/data.cpp includes/data.hpp
18
+ g++ $(FLAG ) -o $@ $<
19
+
20
+ source/parser.o : source/parser.cpp includes/parser.hpp
21
+ g++ $(FLAG ) -o $@ $<
22
+ source/regexAlgorithm.o : source/regexAlgorithm.cpp includes/regexAlgorithm.hpp
23
+ g++ $(FLAG ) -o $@ $<
24
+
25
+ source/automaton.o : source/automaton.cpp includes/automaton.hpp
26
+ g++ $(FLAG ) -o $@ $<
27
+ source/utildata.o : source/utildata.cpp includes/utildata.hpp
28
+ g++ $(FLAG ) -o $@ $<
29
+
30
+ source/match.o : source/match.cpp includes/match.hpp
31
+ g++ $(FLAG ) -o $@ $<
32
+ source/regex.o : source/regex.cpp includes/regex.hpp
33
+ g++ $(FLAG ) -o $@ $<
34
+ source/test/test.o : source/test/test.cpp
35
+ g++ $(FLAG ) -o $@ $<
36
+
37
+
38
+ source/test/test : $(OBJECTS ) source/test/test.o
39
+ g++ --std=c++11 -o $@ $^
40
+ ./source/test/test
41
+
42
+
43
+
44
+ test : source/test/test
45
+ clear :
46
+ rm source/* .o
47
+ rm source/test/* .o
48
+ rm source/test/test
49
+ rm libregex.a
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 3
3
#include < memory>
4
4
#include < fstream>
5
5
#include < streambuf>
6
- #include " ../ parser.hpp"
7
- #include " ../ match.hpp"
8
- #include " ../ regex.hpp"
6
+ #include " parser.hpp"
7
+ #include " match.hpp"
8
+ #include " regex.hpp"
9
9
10
10
using namespace regex ::regex_internal;
11
11
using namespace regex ;
@@ -34,7 +34,9 @@ std::shared_ptr<Regex> CreateInterpreter(std::string s)
34
34
35
35
int main ()
36
36
{
37
+ #ifdef REGEX_DEBUG
37
38
testAux ();
39
+ #endif
38
40
ParseRegexStr (" abc()" )->Delete ();
39
41
ParseRegexStr (" abc(a)" )->Delete ();
40
42
ParseRegexStr (" abc(b)+?" )->Delete ();
You can’t perform that action at this time.
0 commit comments