source: proto/RE2PBS/Makefile @ 1145

Last change on this file since 1145 was 1145, checked in by ksherdy, 8 years ago

Add targets to support Pablo compilation and Python prototyping.

File size: 746 bytes
Line 
1GRAMMAR_NAME    = re2pbs
2CLASSPATH       = lib/antlr-3.1.3.jar
3ANTLRWORKS_JAR  = lib/antlrworks-1.4.2.jar
4RE2PBS_OUT_DIR  = bin
5RE2PBS_SRC_FILE = test/CCCharRef.txt
6
7PABLO_SRC_FILE  = compilable.py
8PABLO_COMPILER  = ../Compiler/compiler2.py
9PABLO_TEMPLATE  = template.cpp
10PABLO_OUT_FILE  = src/test.cpp
11
12antlr: 
13        java -cp $(CLASSPATH) org.antlr.Tool -o $(RE2PBS_OUT_DIR) $(GRAMMAR_NAME).g
14
15clean:
16        rm -f $(RE2PBS_OUT_DIR)/$(GRAMMAR_NAME)Lexer.* $(RE2PBS_OUT_DIR)/$(GRAMMAR_NAME)Parser.* $(RE2PBS_OUT_DIR)/$(GRAMMAR_NAME).tokens $(PABLO_OUT_FILE)
17
18re2pbs: 
19        python $(RE2PBS_OUT_DIR)/main.py $(RE2PBS_SRC_FILE)
20
21pablo:  $(PABLO_SRC_FILE)
22        python $(PABLO_COMPILER) $(PABLO_SRC_FILE) -t $(PABLO_TEMPLATE) -o $(OUTFILE)
23
24ide:
25        java -jar $(ANTLRWORKS_JAR) 
26
27
Note: See TracBrowser for help on using the repository browser.