Changeset 1145 for proto/RE2PBS


Ignore:
Timestamp:
Apr 22, 2011, 2:01:47 AM (8 years ago)
Author:
ksherdy
Message:

Add targets to support Pablo compilation and Python prototyping.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/RE2PBS/Makefile

    r1142 r1145  
    1 GRAMMAR = re2pbs
    2 CLASSPATH = lib/antlr-3.1.3.jar
    3 ANTLRWORKSJAR = lib/antlrworks-1.4.2.jar
    4 OUT = bin
    5 TEST = test/CCCharRef.txt
     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
    66
    7 all:   
    8         java -cp $(CLASSPATH) org.antlr.Tool -o $(OUT) $(GRAMMAR).g
     7PABLO_SRC_FILE  = compilable.py
     8PABLO_COMPILER  = ../Compiler/compiler2.py
     9PABLO_TEMPLATE  = template.cpp
     10PABLO_OUT_FILE  = src/test.cpp
    911
    10 run:   
    11         python $(OUT)/main.py $(TEST)
     12antlr
     13        java -cp $(CLASSPATH) org.antlr.Tool -o $(RE2PBS_OUT_DIR) $(GRAMMAR_NAME).g
    1214
    1315clean:
    14         rm -f $(OUT)/$(GRAMMAR)Lexer.* $(OUT)/$(GRAMMAR)Parser.* $(OUT)/$(GRAMMAR).tokens
     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)
    1523
    1624ide:
    17         java -jar $(ANTLRWORKSJAR)
     25        java -jar $(ANTLRWORKS_JAR)
    1826
    1927
Note: See TracChangeset for help on using the changeset viewer.