Skip to content

Commit

Permalink
add makefile to build antlr files (#47)
Browse files Browse the repository at this point in the history
* add makefile to build antlr files

* Add common g4
  • Loading branch information
theCapypara authored Jul 12, 2024
1 parent ae68467 commit 8f57740
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
19 changes: 19 additions & 0 deletions Makefile
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
4 changes: 3 additions & 1 deletion riptide.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ project:
environment:
REQUIREMENTS_FILE: "requirements-docs.txt"
SPHINX_SOURCE: docs
SPHINX_BUILD: docs/build
SPHINX_BUILD: docs/build
commands:
make: $remove

0 comments on commit 8f57740

Please sign in to comment.