From dad1d6fda37d1c6bf8303310dec435e08831ec82 Mon Sep 17 00:00:00 2001 From: John Kerl Date: Sun, 20 Sep 2020 11:12:28 -0400 Subject: [PATCH] neaten --- go/build-dsl | 19 ++++++++++++++----- go/todo.txt | 3 +++ 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/go/build-dsl b/go/build-dsl index e064d0deb..cb3acbace 100755 --- a/go/build-dsl +++ b/go/build-dsl @@ -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/ diff --git a/go/todo.txt b/go/todo.txt index c9465706b..ffdff1ae4 100644 --- a/go/todo.txt +++ b/go/todo.txt @@ -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 -- ?