-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add makefile to build antlr files (#47)
* add makefile to build antlr files * Add common g4
- Loading branch information
1 parent
ae68467
commit 8f57740
Showing
2 changed files
with
22 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Makefile for generating files. | ||
# Does NOT install the Python package or dependencies. | ||
# Make sure to install those first. | ||
# Make sure the Antlr4 version used matches the one of the runtime package! | ||
|
||
.PHONY := all exps ssbscript | ||
.DEFAULT_GOAL := all | ||
|
||
explorerscript/antlr/ExplorerScript.interp explorerscript/antlr/ExplorerScript.tokens explorerscript/antlr/ExplorerScriptLexer.interp explorerscript/antlr/ExplorerScriptLexer.py explorerscript/antlr/ExplorerScriptLexer.tokens explorerscript/antlr/ExplorerScriptListener.py explorerscript/antlr/ExplorerScriptParser.py explorerscript/antlr/ExplorerScriptVisitor.py: explorerscript/antlr/ExplorerScript.g4 explorerscript/antlr/SsbCommon.g4 | ||
cd explorerscript/antlr && antlr4 -Dlanguage=Python3 -visitor ExplorerScript.g4 | ||
|
||
explorerscript/antlr/SsbScript.interp explorerscript/antlr/SsbScript.tokens explorerscript/antlr/SsbScriptLexer.interp explorerscript/antlr/SsbScriptLexer.py explorerscript/antlr/SsbScriptLexer.tokens explorerscript/antlr/SsbScriptListener.py explorerscript/antlr/SsbScriptParser.py: explorerscript/antlr/SsbScript.g4 explorerscript/antlr/SsbCommon.g4 | ||
cd explorerscript/antlr && antlr4 -Dlanguage=Python3 SsbScript.g4 | ||
|
||
exps: explorerscript/antlr/ExplorerScriptParser.py | ||
|
||
ssbscript: explorerscript/antlr/SsbScriptParser.py | ||
|
||
all: exps ssbscript |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters