mirror of
https://github.com/neilotoole/sq.git
synced 2024-12-21 07:01:41 +03:00
f07edef14d
* Support for --src.schema in commands "slq", "sql", and "inspect"
15 lines
418 B
Bash
Executable File
15 lines
418 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
dest_dir="./sqlite"
|
|
mkdir -p $dest_dir
|
|
|
|
echo "Generating parser code from grammar..."
|
|
alias antlr4='java -Xmx500M -cp "../../../../tools/antlr-4.13.0-complete.jar:$CLASSPATH" org.antlr.v4.Tool'
|
|
antlr4 -Dlanguage=Go -listener -visitor -o $dest_dir -package sqlite SQLiteLexer.g4 SQLiteParser.g4
|
|
|
|
echo "Verifying that generated files can build..."
|
|
go build -v $dest_dir
|
|
echo "Generated files are OK."
|