This commit is contained in:
John Kerl 2020-09-20 11:12:28 -04:00
parent 7b3a05f761
commit dad1d6fda3
2 changed files with 17 additions and 5 deletions

View file

@ -6,16 +6,25 @@
set -euo pipefail
verbose="false"
if [ $# -eq 1 ]; then
if [ "$1" == "-v" ]; then
verbose="true"
fi
fi
export GOPATH=$(pwd)
# Build the bin/gocc executable:
go get github.com/goccmack/gocc
#lr1="src/miller/parsing/LR1_conflicts.txt"
#rm -f $lr1
#bin/gocc -v -o src/miller/parsing src/miller/parsing/mlr.bnf || expand -2 $lr1
bin/gocc -o src/miller/parsing src/miller/parsing/mlr.bnf
rm -f src/miller/parsing/*.txt
if [ "$verbose" = "true" ]; then
lr1="src/miller/parsing/LR1_conflicts.txt"
bin/gocc -v -o src/miller/parsing src/miller/parsing/mlr.bnf || expand -2 $lr1
else
bin/gocc -o src/miller/parsing src/miller/parsing/mlr.bnf
fi
# Code-gen directories:
# src/miller/parsing/errors/

View file

@ -4,6 +4,9 @@ TOP OF LIST:
* go-try:
o rename: bulk-edit for b,i,x vs x,i,b cases
! filter
> bare-boolean LR-1 conflicts wut
> prepend "filter " after last ";" hack -- ? gurk if "...;..." in a string :^/
- state machine dquote in/out w walkback; \" handling; good UT
! emit; print/dump
! quoted NIDX
- how with whitespace regex -- ?