mirror of
https://github.com/neilotoole/sq.git
synced 2024-11-29 13:22:22 +03:00
1d6e260533
* cleanup magefile; antlr stuff * fixed broken magefile * Tidy up grammar directory * antlr tools
15 lines
396 B
Bash
Executable File
15 lines
396 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
dest_dir="../libsq/ast/internal/slq"
|
|
mkdir -p $dest_dir
|
|
|
|
echo "Generating SLQ parser code from grammar..."
|
|
alias antlr4='java -Xmx500M -cp "./antlr-4.11.1-complete.jar:$CLASSPATH" org.antlr.v4.Tool'
|
|
antlr4 -Dlanguage=Go -listener -visitor -o $dest_dir -package slq SLQ.g4
|
|
|
|
echo "Verifying that generated files can build..."
|
|
go build -v $dest_dir
|
|
echo "Generated files are OK."
|