source: proto/RE/ref/re2pbs/Makefile @ 2555

Last change on this file since 2555 was 2319, checked in by ksherdy, 7 years ago

Updated Makefile path.

File size: 1.7 KB
Line 
1GRAMMAR_NAME            = re2pbs
2CLASSPATH               = antlr/antlr-3.1.3.jar
3ANTLRWORKS_JAR          = antlr/antlrworks-1.4.2.jar
4RE2PBS_OUT_DIR          = bin
5RE2PBS_PROTO_FILE       = prototype.py
6RE2PBS_COMP_FILE        = compilable.py
7RE2PBS_DEF_FILE         = test/generic/HexCharRefDef.txt
8RE2PBS_TEST_FILE        = test/generic/CharRefTest.txt
9
10PABLO_SRC_FILE  = $(RE2PBS_COMP_FILE)
11PABLO_COMPILER  = ../../lib/Compiler/pablomain.py
12PABLO_TEMPLATE  = re2pbs_demo_template.cpp
13PABLO_OUT_FILE  = src/demo.cpp
14
15# Add code to compile C/C++ source to object code.
16all:    pablo
17       
18
19proto:  re2pbs
20        python $(RE2PBS_PROTO_FILE) $(RE2PBS_TEST_FILE)
21
22pablo:  re2pbs
23        python $(PABLO_COMPILER) $(PABLO_SRC_FILE) -t $(PABLO_TEMPLATE) -o $(PABLO_OUT_FILE)
24
25re2pbs: grammar
26        python $(RE2PBS_OUT_DIR)/main.py $(RE2PBS_DEF_FILE)
27
28grammar: 
29        java -cp $(CLASSPATH) org.antlr.Tool -o $(RE2PBS_OUT_DIR) $(GRAMMAR_NAME).g
30
31ide:
32        java -jar $(ANTLRWORKS_JAR) 
33
34clean:
35        rm -f $(RE2PBS_OUT_DIR)/$(GRAMMAR_NAME)Lexer.py $(RE2PBS_OUT_DIR)/$(GRAMMAR_NAME)Parser.py $(RE2PBS_OUT_DIR)/$(GRAMMAR_NAME).tokens $(PABLO_OUT_FILE) $(RE2PBS_COMP_FILE) $(RE2PBS_PROTO_FILE)
36
37help:
38        @echo '  Makefile --- Regular Expression to Parallel Bit Stream compilation.'
39        @echo ''
40        @echo '  all     - Compile Pablo generated C/C++ source code to object code.'
41        @echo '  proto   - Run generated Python prototype.'
42        @echo '  pablo   - Compile AnTLR generated Python compilable to C/C++ source code using Pablo.'
43        @echo '  re2pbs  - Run Python regular expression parser and generate Python 'protoype' and 'compilable' source. '
44        @echo '  grammar - Generate Python regular expression parser using AnTLR.'
45        @echo '  ide     - Launch the AnTLRWorks IDE. '
46        @echo '  clean   - Delete generated files.'
47        @echo '  help    - Display help.'
48        @echo ''
49       
Note: See TracBrowser for help on using the repository browser.