You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* integrates parser generation into build file and changes parser generation script to optionally download the necessary ANTLR JAR
* fixes CI by providing access to genparser.sh
* simplifies parser generator script as we no longer need to make the paths in the comments relative
* cleanup
##### Configure if it is the first execution #####
23
34
if!test -f "$CONFIGFILE";then
24
35
echo -e "What is the ${RED}ABSOLUTE${RESET} path to the antlr4 .jar file?"
25
36
read -r ANSWER
@@ -39,11 +50,5 @@ java -jar "$ANTLR4_PATH" "$SCRIPT_DIR"/src/main/antlr4/GobraLexer.g4 -package vi
39
50
echo -e "${GREEN}Generating the parser:${RESET}"
40
51
java -jar "$ANTLR4_PATH""$SCRIPT_DIR"/src/main/antlr4/GobraParser.g4 -package viper.gobra.frontend -visitor -no-listener || { echo -e "${RED}Error while generating the parser.${RESET}";exit 3; }
41
52
42
-
echo -e "${GREEN}Making path in comments relative:${RESET}"
43
-
sed -i '''s/\/\/ Generated from .*src\/main\/antlr4\/GobraLexer\.g4/\/\/ Generated from src\/main\/antlr4\/GobraLexer\.g4/g'"$SCRIPT_DIR"/src/main/antlr4/GobraLexer.java
44
-
sed -i '''s/\/\/ Generated from .*src\/main\/antlr4\/GobraParser\.g4/\/\/ Generated from src\/main\/antlr4\/GobraParser\.g4/g'"$SCRIPT_DIR"/src/main/antlr4/GobraParser.java
45
-
sed -i '''s/\/\/ Generated from .*src\/main\/antlr4\/GobraParser\.g4/\/\/ Generated from src\/main\/antlr4\/GobraParser\.g4/g'"$SCRIPT_DIR"/src/main/antlr4/GobraParserBaseVisitor.java
46
-
sed -i '''s/\/\/ Generated from .*src\/main\/antlr4\/GobraParser\.g4/\/\/ Generated from src\/main\/antlr4\/GobraParser\.g4/g'"$SCRIPT_DIR"/src/main/antlr4/GobraParserVisitor.java
47
-
48
53
echo -e "${GREEN}Moving the generated files:${RESET}"
0 commit comments