-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update solidity-antlr4 submodule * Fix build grammar script * Update grammar
- Loading branch information
1 parent
4aa0704
commit ea5307b
Showing
8 changed files
with
1,831 additions
and
1,820 deletions.
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -1,11 +1,13 @@ | ||
#!/usr/bin/env sh | ||
|
||
# download antlr4 | ||
ANTLR_JAR="antlr4.jar" | ||
|
||
if [ ! -e "$ANTLR_JAR" ]; then | ||
curl http://www.antlr.org/download/antlr-4.7-complete.jar -o "$ANTLR_JAR" | ||
curl https://www.antlr.org/download/antlr-4.7.1-complete.jar -o "$ANTLR_JAR" | ||
fi | ||
|
||
java -jar $ANTLR_JAR -Dlanguage=JavaScript lib/grammar/Solidity.g4 | ||
# build grammar based on solidity-antlr4 submodule | ||
cd ./solidity-antlr4; java -jar ../$ANTLR_JAR ./Solidity.g4 -Dlanguage=JavaScript -o ../lib/grammar; cd - > /dev/null | ||
|
||
find lib/grammar/ -name '*interp' -delete | ||
# cleanup | ||
rm lib/grammar/*.interp antlr4.jar |