Make 'go build' work, without need for 'go build mlr.go' (#622)

This commit is contained in:
John Kerl 2021-08-06 10:08:21 -04:00
parent ea00d5f299
commit 6d1254bb5a
176 changed files with 446 additions and 444 deletions

View file

@ -29,7 +29,7 @@ jobs:
# In the event of needing to debug failures you can modify `./mlr regtest` verbosity
# using `-v`, `-vv`, or `-vvv`. Commit changes to this file and re-push to GitHub
# and let the GitHub Actions re-run.
run: cd go && go test -v miller/src/... && ./mlr regtest -s 5
run: cd go && go test -v mlr/src/... && ./mlr regtest -s 5
- name: PrepareArtifactNonWindows
if: matrix.os != 'windows-latest'

View file

@ -1,2 +1,2 @@
map \d :w<C-m>:!clear;echo Building ...; echo; go build mlr.go<C-m>
map \d :w<C-m>:!clear;echo Building ...; echo; go build<C-m>
map \f :w<C-m>:!clear;echo Building ...; echo; build; echo; main<C-m>

View file

@ -2,14 +2,16 @@
A TL;DR for anyone wanting to compile and run the Go port of Miller:
* `go build mlr.go` -- produces the `mlr` executable
* `go build` -- produces the `mlr` executable
* `go test ./...` -- runs a relatively small number of unit tests
* `go test` -- runs the same as `mlr regtest`. Note that (see `mlr regtest -h`) the latter gives you more options.
* `./mlr regtest` -- runs `regtest/cases`, which are cases passing on all platforms
* `./mlr regtest regtest/cases-pending-go-port` -- needing Go code to be ported from C
* `./mlr regtest regtest/cases-pending-windows` -- for Go code already ported from C but needing some work for Windows
Pre-release/rough-draft docs are at http://johnkerl.org/miller-releases/miller-head/docs6/site/index.html.
Pre-release/rough-draft docs are at http://johnkerl.org/miller6.
See also the tracking issue (somewhat redundant to this README file) https://github.com/johnkerl/miller/issues/372.
A note on Continuous Integration:

View file

@ -18,13 +18,13 @@ fi
echo ================================================================
echo BUILD
go build mlr.go
go build
echo Compile OK
echo
echo ================================================================
echo UNIT TESTS
go test -v miller/src/...
go test -v mlr/src/...
# 'go test' (with no arguments) is the same as 'mlr regtest'
echo

View file

@ -31,9 +31,9 @@ fi
rm -f src/parsing/*.txt
if [ "$verbose" = "true" ]; then
lr1="src/parsing/LR1_conflicts.txt"
$bingocc -v -o ./src/parsing -p miller/src/parsing src/parsing/mlr.bnf || expand -2 $lr1
$bingocc -v -o ./src/parsing -p mlr/src/parsing src/parsing/mlr.bnf || expand -2 $lr1
else
$bingocc -o ./src/parsing -p miller/src/parsing src/parsing/mlr.bnf
$bingocc -o ./src/parsing -p mlr/src/parsing src/parsing/mlr.bnf
fi
# Code-gen directories:

View file

@ -1,6 +1,6 @@
go build mlr.go
go build
go test -v miller/src/...
go test -v mlr/src/...
# 'go test' (with no arguments) is the same as 'mlr regtest'
mlr regtest regtest/cases

View file

@ -1,4 +1,4 @@
module miller
module mlr
go 1.15

View file

@ -7,7 +7,7 @@ import (
"runtime/debug"
"runtime/pprof"
"miller/src/entrypoint"
"mlr/src/entrypoint"
)
// ----------------------------------------------------------------

View file

@ -12,8 +12,8 @@ package main
import (
"testing"
"miller/src/auxents/regtest"
"miller/src/lib"
"mlr/src/auxents/regtest"
"mlr/src/lib"
)
func TestRegression(t *testing.T) {

View file

@ -9,9 +9,9 @@ import (
"fmt"
"os"
"miller/src/auxents/help"
"miller/src/auxents/regtest"
"miller/src/auxents/repl"
"mlr/src/auxents/help"
"mlr/src/auxents/regtest"
"mlr/src/auxents/repl"
)
// ----------------------------------------------------------------

View file

@ -10,11 +10,11 @@ import (
"github.com/mattn/go-isatty"
"miller/src/cliutil"
"miller/src/dsl/cst"
"miller/src/lib"
"miller/src/transformers"
"miller/src/types"
"mlr/src/cliutil"
"mlr/src/dsl/cst"
"mlr/src/lib"
"mlr/src/transformers"
"mlr/src/types"
)
// ================================================================
@ -183,7 +183,7 @@ func helpAuxents() {
They do not participate in any other parts of Miller.
Please "mlr aux-list" for more information.
`)
// imports miller/src/auxents: import cycle not allowed
// imports mlr/src/auxents: import cycle not allowed
// auxents.ShowAuxEntries(o)
}

View file

@ -5,7 +5,7 @@ import (
"os/exec"
"strings"
"miller/src/platform"
"mlr/src/platform"
)
// RunMillerCommand runs a string like 'mlr cat foo.dat', with specified mlr

View file

@ -13,8 +13,8 @@ import (
"path/filepath"
"strings"
"miller/src/colorizer"
"miller/src/lib"
"mlr/src/colorizer"
"mlr/src/lib"
)
const DefaultPath = "./regtest/cases"

View file

@ -8,9 +8,9 @@ import (
"fmt"
"os"
"miller/src/dsl"
"miller/src/parsing/lexer"
"miller/src/parsing/parser"
"mlr/src/dsl"
"mlr/src/parsing/lexer"
"mlr/src/parsing/parser"
)
// ----------------------------------------------------------------

View file

@ -23,7 +23,7 @@ import (
"fmt"
"strings"
"miller/src/types"
"mlr/src/types"
)
// ----------------------------------------------------------------

View file

@ -27,7 +27,7 @@ import (
"path"
"strings"
"miller/src/cliutil"
"mlr/src/cliutil"
)
// ================================================================

View file

@ -11,9 +11,9 @@ import (
"golang.org/x/term"
"miller/src/colorizer"
"miller/src/lib"
"miller/src/version"
"mlr/src/colorizer"
"mlr/src/lib"
"mlr/src/version"
)
const ENV_PRIMARY_PROMPT = "MLR_REPL_PS1"

View file

@ -26,13 +26,13 @@ import (
"strings"
"syscall"
"miller/src/cliutil"
"miller/src/dsl/cst"
"miller/src/input"
"miller/src/lib"
"miller/src/output"
"miller/src/runtime"
"miller/src/types"
"mlr/src/cliutil"
"mlr/src/dsl/cst"
"mlr/src/input"
"mlr/src/lib"
"mlr/src/output"
"mlr/src/runtime"
"mlr/src/types"
)
// ----------------------------------------------------------------

View file

@ -7,12 +7,12 @@ package repl
import (
"os"
"miller/src/cliutil"
"miller/src/dsl/cst"
"miller/src/input"
"miller/src/output"
"miller/src/runtime"
"miller/src/types"
"mlr/src/cliutil"
"mlr/src/dsl/cst"
"mlr/src/input"
"mlr/src/output"
"mlr/src/runtime"
"mlr/src/types"
)
// ================================================================

View file

@ -9,10 +9,10 @@ import (
"os"
"strings"
"miller/src/colorizer"
"miller/src/dsl/cst"
"miller/src/lib"
"miller/src/types"
"mlr/src/colorizer"
"mlr/src/dsl/cst"
"mlr/src/lib"
"mlr/src/types"
)
// ----------------------------------------------------------------

View file

@ -8,7 +8,7 @@ import (
"regexp"
"strings"
"miller/src/cliutil"
"mlr/src/cliutil"
)
// ----------------------------------------------------------------

View file

@ -4,12 +4,12 @@ import (
"fmt"
"os"
"miller/src/auxents/help"
"miller/src/cliutil"
"miller/src/lib"
"miller/src/transformers"
"miller/src/types"
"miller/src/version"
"mlr/src/auxents/help"
"mlr/src/cliutil"
"mlr/src/lib"
"mlr/src/transformers"
"mlr/src/types"
"mlr/src/version"
)
// ----------------------------------------------------------------

View file

@ -10,8 +10,8 @@ import (
"fmt"
"os"
"miller/src/colorizer"
"miller/src/lib"
"mlr/src/colorizer"
"mlr/src/lib"
)
const ASV_FS = "\x1f"

View file

@ -7,7 +7,7 @@
package cliutil
import (
"miller/src/lib"
"mlr/src/lib"
)
// ----------------------------------------------------------------

View file

@ -9,7 +9,7 @@ import (
"os"
"strconv"
"miller/src/lib"
"mlr/src/lib"
)
// For flags with values, e.g. ["-n" "10"], while we're looking at the "-n" this let us see if the "10" slot exists.

View file

@ -10,8 +10,8 @@ import (
"fmt"
"strings"
"miller/src/lib"
"miller/src/parsing/token"
"mlr/src/lib"
"mlr/src/parsing/token"
)
// ----------------------------------------------------------------

View file

@ -5,7 +5,7 @@
package dsl
import (
"miller/src/parsing/token"
"mlr/src/parsing/token"
)
// ----------------------------------------------------------------

View file

@ -5,9 +5,9 @@
package cst
import (
"miller/src/dsl"
"miller/src/lib"
"miller/src/runtime"
"mlr/src/dsl"
"mlr/src/lib"
"mlr/src/runtime"
)
// ================================================================

View file

@ -8,9 +8,9 @@ package cst
import (
"errors"
"miller/src/dsl"
"miller/src/lib"
"miller/src/runtime"
"mlr/src/dsl"
"mlr/src/lib"
"mlr/src/runtime"
)
// ----------------------------------------------------------------

View file

@ -6,9 +6,9 @@
package cst
import (
"miller/src/dsl"
"miller/src/lib"
"miller/src/runtime"
"mlr/src/dsl"
"mlr/src/lib"
"mlr/src/runtime"
)
// ----------------------------------------------------------------

View file

@ -12,8 +12,8 @@ import (
"sort"
"strings"
"miller/src/lib"
"miller/src/types"
"mlr/src/lib"
"mlr/src/types"
)
type TFunctionClass string

View file

@ -8,10 +8,10 @@ import (
"errors"
"fmt"
"miller/src/dsl"
"miller/src/lib"
"miller/src/runtime"
"miller/src/types"
"mlr/src/dsl"
"mlr/src/lib"
"mlr/src/runtime"
"mlr/src/types"
)
// ----------------------------------------------------------------

View file

@ -6,10 +6,10 @@
package cst
import (
"miller/src/dsl"
"miller/src/lib"
"miller/src/runtime"
"miller/src/types"
"mlr/src/dsl"
"mlr/src/lib"
"mlr/src/runtime"
"mlr/src/types"
)
// ----------------------------------------------------------------

View file

@ -8,10 +8,10 @@ package cst
import (
"errors"
"miller/src/dsl"
"miller/src/lib"
"miller/src/runtime"
"miller/src/types"
"mlr/src/dsl"
"mlr/src/lib"
"mlr/src/runtime"
"mlr/src/types"
)
type CondBlockNode struct {

View file

@ -22,11 +22,11 @@ import (
"os"
"strings"
"miller/src/dsl"
"miller/src/lib"
"miller/src/output"
"miller/src/runtime"
"miller/src/types"
"mlr/src/dsl"
"mlr/src/lib"
"mlr/src/output"
"mlr/src/runtime"
"mlr/src/types"
)
// ================================================================

View file

@ -42,11 +42,11 @@ import (
"errors"
"fmt"
"miller/src/dsl"
"miller/src/lib"
"miller/src/output"
"miller/src/runtime"
"miller/src/types"
"mlr/src/dsl"
"mlr/src/lib"
"mlr/src/output"
"mlr/src/runtime"
"mlr/src/types"
)
// ================================================================

View file

@ -9,11 +9,11 @@ import (
"errors"
"fmt"
"miller/src/dsl"
"miller/src/lib"
"miller/src/output"
"miller/src/runtime"
"miller/src/types"
"mlr/src/dsl"
"mlr/src/lib"
"mlr/src/output"
"mlr/src/runtime"
"mlr/src/types"
)
// ================================================================

View file

@ -10,10 +10,10 @@ package cst
import (
"os"
"miller/src/dsl"
"miller/src/lib"
"miller/src/runtime"
"miller/src/types"
"mlr/src/dsl"
"mlr/src/lib"
"mlr/src/runtime"
"mlr/src/types"
)
type EnvironmentVariableNode struct {

View file

@ -11,10 +11,10 @@ import (
"fmt"
"os"
"miller/src/dsl"
"miller/src/lib"
"miller/src/runtime"
"miller/src/types"
"mlr/src/dsl"
"mlr/src/lib"
"mlr/src/runtime"
"mlr/src/types"
)
// ----------------------------------------------------------------

View file

@ -5,9 +5,9 @@
package cst
import (
"miller/src/dsl"
"miller/src/lib"
"miller/src/runtime"
"mlr/src/dsl"
"mlr/src/lib"
"mlr/src/runtime"
)
// ----------------------------------------------------------------

View file

@ -7,10 +7,10 @@ package cst
import (
"errors"
"miller/src/dsl"
"miller/src/lib"
"miller/src/runtime"
"miller/src/types"
"mlr/src/dsl"
"mlr/src/lib"
"mlr/src/runtime"
"mlr/src/types"
)
// ----------------------------------------------------------------

View file

@ -9,8 +9,8 @@
package cst
import (
"miller/src/dsl"
"miller/src/lib"
"mlr/src/dsl"
"mlr/src/lib"
)
// ----------------------------------------------------------------

View file

@ -7,10 +7,10 @@ package cst
import (
"errors"
"miller/src/dsl"
"miller/src/lib"
"miller/src/runtime"
"miller/src/types"
"mlr/src/dsl"
"mlr/src/lib"
"mlr/src/runtime"
"mlr/src/types"
)
// ----------------------------------------------------------------

View file

@ -4,7 +4,7 @@ import (
"fmt"
"os"
"miller/src/lib"
"mlr/src/lib"
)
// ----------------------------------------------------------------

View file

@ -8,10 +8,10 @@ import (
"errors"
"math"
"miller/src/dsl"
"miller/src/lib"
"miller/src/runtime"
"miller/src/types"
"mlr/src/dsl"
"mlr/src/lib"
"mlr/src/runtime"
"mlr/src/types"
)
// ----------------------------------------------------------------

View file

@ -10,10 +10,10 @@ import (
"fmt"
"os"
"miller/src/dsl"
"miller/src/lib"
"miller/src/runtime"
"miller/src/types"
"mlr/src/dsl"
"mlr/src/lib"
"mlr/src/runtime"
"mlr/src/types"
)
// ----------------------------------------------------------------

View file

@ -10,11 +10,11 @@ import (
"fmt"
"os"
"miller/src/dsl"
"miller/src/lib"
"miller/src/output"
"miller/src/runtime"
"miller/src/types"
"mlr/src/dsl"
"mlr/src/lib"
"mlr/src/output"
"mlr/src/runtime"
"mlr/src/types"
)
// ----------------------------------------------------------------

View file

@ -11,11 +11,11 @@ import (
"fmt"
"os"
"miller/src/cliutil"
"miller/src/dsl"
"miller/src/output"
"miller/src/runtime"
"miller/src/types"
"mlr/src/cliutil"
"mlr/src/dsl"
"mlr/src/output"
"mlr/src/runtime"
"mlr/src/types"
)
// ----------------------------------------------------------------

View file

@ -6,7 +6,7 @@
package cst
import (
"miller/src/types"
"mlr/src/types"
)
// ----------------------------------------------------------------

View file

@ -8,7 +8,7 @@ package cst
import (
"errors"
"miller/src/dsl"
"mlr/src/dsl"
)
// ----------------------------------------------------------------

View file

@ -9,8 +9,8 @@
package cst
import (
"miller/src/dsl"
"miller/src/lib"
"mlr/src/dsl"
"mlr/src/lib"
)
// ----------------------------------------------------------------

View file

@ -8,11 +8,11 @@ import (
"errors"
"fmt"
"miller/src/dsl"
"miller/src/lib"
"miller/src/output"
"miller/src/runtime"
"miller/src/types"
"mlr/src/dsl"
"mlr/src/lib"
"mlr/src/output"
"mlr/src/runtime"
"mlr/src/types"
)
// ----------------------------------------------------------------

View file

@ -7,10 +7,10 @@ package cst
import (
"container/list"
"miller/src/cliutil"
"miller/src/dsl"
"miller/src/runtime"
"miller/src/types"
"mlr/src/cliutil"
"mlr/src/dsl"
"mlr/src/runtime"
"mlr/src/types"
)
// ----------------------------------------------------------------

View file

@ -9,10 +9,10 @@ import (
"fmt"
"os"
"miller/src/dsl"
"miller/src/lib"
"miller/src/runtime"
"miller/src/types"
"mlr/src/dsl"
"mlr/src/lib"
"mlr/src/runtime"
"mlr/src/types"
)
// ----------------------------------------------------------------

View file

@ -8,10 +8,10 @@ import (
"errors"
"fmt"
"miller/src/dsl"
"miller/src/lib"
"miller/src/runtime"
"miller/src/types"
"mlr/src/dsl"
"mlr/src/lib"
"mlr/src/runtime"
"mlr/src/types"
)
// ----------------------------------------------------------------

View file

@ -10,8 +10,8 @@ import (
"errors"
"fmt"
"miller/src/dsl"
"miller/src/lib"
"mlr/src/dsl"
"mlr/src/lib"
)
// ----------------------------------------------------------------

View file

@ -11,8 +11,8 @@ import (
"fmt"
"os"
"miller/src/dsl"
"miller/src/lib"
"mlr/src/dsl"
"mlr/src/lib"
)
// ----------------------------------------------------------------

View file

@ -7,9 +7,9 @@ package cst
import (
"errors"
"miller/src/dsl"
"miller/src/lib"
"miller/src/runtime"
"mlr/src/dsl"
"mlr/src/lib"
"mlr/src/runtime"
)
// ================================================================

View file

@ -11,14 +11,14 @@ import (
"os"
"path"
"miller/src/platform"
"mlr/src/platform"
"miller/src/auxents"
"miller/src/cli"
"miller/src/cliutil"
"miller/src/lib"
"miller/src/stream"
"miller/src/transformers"
"mlr/src/auxents"
"mlr/src/cli"
"mlr/src/cliutil"
"mlr/src/lib"
"mlr/src/stream"
"mlr/src/transformers"
)
// ----------------------------------------------------------------

View file

@ -1,7 +1,7 @@
package input
import (
"miller/src/types"
"mlr/src/types"
)
// Since Go is concurrent, the context struct (AWK-like variables such as

View file

@ -9,9 +9,9 @@ import (
"strconv"
"strings"
"miller/src/cliutil"
"miller/src/lib"
"miller/src/types"
"mlr/src/cliutil"
"mlr/src/lib"
"mlr/src/types"
)
// ----------------------------------------------------------------

View file

@ -26,9 +26,9 @@ import (
"strconv"
"strings"
"miller/src/cliutil"
"miller/src/lib"
"miller/src/types"
"mlr/src/cliutil"
"mlr/src/lib"
"mlr/src/types"
)
// ----------------------------------------------------------------

View file

@ -6,9 +6,9 @@ import (
"strconv"
"strings"
"miller/src/cliutil"
"miller/src/lib"
"miller/src/types"
"mlr/src/cliutil"
"mlr/src/lib"
"mlr/src/types"
)
type RecordReaderDKVP struct {

View file

@ -1,7 +1,7 @@
package input
import (
"miller/src/cliutil"
"mlr/src/cliutil"
)
func Create(readerOptions *cliutil.TReaderOptions) IRecordReader {

View file

@ -7,9 +7,9 @@ import (
"encoding/json"
"miller/src/cliutil"
"miller/src/lib"
"miller/src/types"
"mlr/src/cliutil"
"mlr/src/lib"
"mlr/src/types"
)
type RecordReaderJSON struct {

View file

@ -6,9 +6,9 @@ import (
"strconv"
"strings"
"miller/src/cliutil"
"miller/src/lib"
"miller/src/types"
"mlr/src/cliutil"
"mlr/src/lib"
"mlr/src/types"
)
type RecordReaderNIDX struct {

View file

@ -8,9 +8,9 @@ import (
"regexp"
"strings"
"miller/src/cliutil"
"miller/src/lib"
"miller/src/types"
"mlr/src/cliutil"
"mlr/src/lib"
"mlr/src/types"
)
type RecordReaderXTAB struct {

View file

@ -4,7 +4,7 @@ import (
"fmt"
"os"
"miller/src/platform"
"mlr/src/platform"
)
// OpenOutboundHalfPipe returns a handle to a process. Writing to that handle

View file

@ -4,7 +4,7 @@ import (
"fmt"
"io"
"miller/src/types"
"mlr/src/types"
)
func ChannelWriter(

View file

@ -18,9 +18,9 @@ import (
"io"
"os"
"miller/src/cliutil"
"miller/src/lib"
"miller/src/types"
"mlr/src/cliutil"
"mlr/src/lib"
"mlr/src/types"
)
// ================================================================

View file

@ -3,7 +3,7 @@ package output
import (
"io"
"miller/src/types"
"mlr/src/types"
)
// Convention: nil outrec signifies end of record stream

View file

@ -5,9 +5,9 @@ import (
"io"
"strings"
"miller/src/cliutil"
"miller/src/colorizer"
"miller/src/types"
"mlr/src/cliutil"
"mlr/src/colorizer"
"mlr/src/types"
)
type RecordWriterCSV struct {

View file

@ -5,9 +5,9 @@ import (
"io"
"strings"
"miller/src/cliutil"
"miller/src/colorizer"
"miller/src/types"
"mlr/src/cliutil"
"mlr/src/colorizer"
"mlr/src/types"
)
type RecordWriterCSVLite struct {

View file

@ -4,9 +4,9 @@ import (
"bytes"
"io"
"miller/src/cliutil"
"miller/src/colorizer"
"miller/src/types"
"mlr/src/cliutil"
"mlr/src/colorizer"
"mlr/src/types"
)
type RecordWriterDKVP struct {

View file

@ -1,7 +1,7 @@
package output
import (
"miller/src/cliutil"
"mlr/src/cliutil"
)
func Create(writerOptions *cliutil.TWriterOptions) IRecordWriter {

View file

@ -6,8 +6,8 @@ import (
"io"
"os"
"miller/src/cliutil"
"miller/src/types"
"mlr/src/cliutil"
"mlr/src/types"
)
// ----------------------------------------------------------------

View file

@ -5,9 +5,9 @@ import (
"fmt"
"io"
"miller/src/cliutil"
"miller/src/colorizer"
"miller/src/types"
"mlr/src/cliutil"
"mlr/src/colorizer"
"mlr/src/types"
)
type RecordWriterMarkdown struct {

View file

@ -4,9 +4,9 @@ import (
"bytes"
"io"
"miller/src/cliutil"
"miller/src/colorizer"
"miller/src/types"
"mlr/src/cliutil"
"mlr/src/colorizer"
"mlr/src/types"
)
type RecordWriterNIDX struct {

View file

@ -8,9 +8,9 @@ import (
"strings"
"unicode/utf8"
"miller/src/cliutil"
"miller/src/colorizer"
"miller/src/types"
"mlr/src/cliutil"
"mlr/src/colorizer"
"mlr/src/types"
)
type RecordWriterPPRINT struct {

View file

@ -5,9 +5,9 @@ import (
"io"
"unicode/utf8"
"miller/src/cliutil"
"miller/src/colorizer"
"miller/src/types"
"mlr/src/cliutil"
"mlr/src/colorizer"
"mlr/src/types"
)
type RecordWriterXTAB struct {

View file

@ -1,5 +1,5 @@
This directory contains a single source file, `mlr.bnf`, which is the lexical/semantic grammar file for the Miller `put`/`filter` DSL using the GOCC framework. (In a classical Lex/Yacc framework, there would be separate `mlr.l` and `mlr.y` files; using GOCC, there is a single `mlr.bnf` file.)
All subdirectories of `src/parsing/` are autogen code created by GOCC's processing of `mlr.bnf`. They are nonetheless committed to source control, since running GOCC takes quite a bit longer than the `go build mlr.go` does, and the BNF file doesn't often change. See the top-level `miller/go` build scripts for how to rerun GOCC. As of this writing, it's `bin/gocc -o src/parsing src/parsing/mlr.bnf` as invoked from the `miller/go` base directory.
All subdirectories of `src/parsing/` are autogen code created by GOCC's processing of `mlr.bnf`. They are nonetheless committed to source control, since running GOCC takes quite a bit longer than the `go build` does, and the BNF file doesn't often change. See the top-level `miller/go` build scripts for how to rerun GOCC. As of this writing, it's `bin/gocc -o src/parsing src/parsing/mlr.bnf` as invoked from the `miller/go` base directory.
Making changes to `mlr.bnf` requires several minutes to re-run GOCC. For experimental changes, please see the [experiments](../../../experiments/dsl-parser) directory.

View file

@ -14,7 +14,7 @@ import (
"fmt"
"strings"
"miller/src/parsing/token"
"mlr/src/parsing/token"
)
type ErrorSymbol interface {

View file

@ -14,7 +14,7 @@ import (
"fmt"
"strings"
"miller/src/parsing/token"
"mlr/src/parsing/token"
)
type ErrorSymbol interface {

View file

@ -5,7 +5,7 @@ package lexer
import (
"fmt"
"miller/src/parsing/token"
"mlr/src/parsing/token"
)
type ActionTable [NumStates]ActionRow

View file

@ -6,7 +6,7 @@ import (
"io/ioutil"
"unicode/utf8"
"miller/src/parsing/token"
"mlr/src/parsing/token"
)
const (

View file

@ -28,7 +28,7 @@
// * The <<...>> code called by the gocc framework must accept interface{} at
// all parameters, to be generic, but in practice all arguments end up being
// either token.Token (regcognizable here via string-literals or snake-cased
// namees) or *miller.dsl.AstNode (recognizable here via camel-cased names).
// namees) or *dsl.AstNode (recognizable here via camel-cased names).
//
// * Another pattern worth pointing out is that in the gocc framework,
// return-types from AST methods must be a pair of (interface{}, error),
@ -319,7 +319,7 @@ panic : '%' '%' '%' 'p' 'a' 'n' 'i' 'c' '%' '%' '%' ;
// ================================================================
// Import the AST/ASTNode types and functions
<< import "miller/src/dsl" >>
<< import "mlr/src/dsl" >>
// ================================================================
// TOP-LEVEL PRODUCTION RULE FOR THE MILLER DSL

View file

@ -6,8 +6,8 @@ import (
"fmt"
"strings"
parseError "miller/src/parsing/errors"
"miller/src/parsing/token"
parseError "mlr/src/parsing/errors"
"mlr/src/parsing/token"
)
const (

View file

@ -2,7 +2,7 @@
package parser
import "miller/src/dsl"
import "mlr/src/dsl"
type (
ProdTab [numProductions]ProdTabEntry

View file

@ -30,8 +30,8 @@ import (
"errors"
"fmt"
"miller/src/lib"
"miller/src/types"
"mlr/src/lib"
"mlr/src/types"
)
// ================================================================

View file

@ -6,7 +6,7 @@
package runtime
import (
"miller/src/types"
"mlr/src/types"
)
type State struct {

View file

@ -5,11 +5,11 @@ import (
"fmt"
"os"
"miller/src/cliutil"
"miller/src/input"
"miller/src/output"
"miller/src/transformers"
"miller/src/types"
"mlr/src/cliutil"
"mlr/src/input"
"mlr/src/output"
"mlr/src/transformers"
"mlr/src/types"
)
// Since Go is concurrent, the context struct (AWK-like variables such as

View file

@ -1,7 +1,7 @@
package transformers
import (
"miller/src/types"
"mlr/src/types"
)
func ChainTransformer(

View file

@ -3,8 +3,8 @@ package transformers
import (
"os"
"miller/src/cliutil"
"miller/src/types"
"mlr/src/cliutil"
"mlr/src/types"
)
type IRecordTransformer interface {

View file

@ -4,7 +4,7 @@ import (
"fmt"
"os"
"miller/src/lib"
"mlr/src/lib"
)
// ----------------------------------------------------------------

View file

@ -6,8 +6,8 @@ import (
"strconv"
"strings"
"miller/src/cliutil"
"miller/src/types"
"mlr/src/cliutil"
"mlr/src/types"
)
// ----------------------------------------------------------------

View file

@ -7,8 +7,8 @@ import (
"os"
"strings"
"miller/src/cliutil"
"miller/src/types"
"mlr/src/cliutil"
"mlr/src/types"
)
const barDefaultFillString = "*"

View file

@ -6,9 +6,9 @@ import (
"os"
"strings"
"miller/src/cliutil"
"miller/src/lib"
"miller/src/types"
"mlr/src/cliutil"
"mlr/src/lib"
"mlr/src/types"
)
// ----------------------------------------------------------------

View file

@ -5,8 +5,8 @@ import (
"os"
"strings"
"miller/src/cliutil"
"miller/src/types"
"mlr/src/cliutil"
"mlr/src/types"
)
// ----------------------------------------------------------------

View file

@ -5,8 +5,8 @@ import (
"os"
"strings"
"miller/src/cliutil"
"miller/src/types"
"mlr/src/cliutil"
"mlr/src/types"
)
// ----------------------------------------------------------------

View file

@ -5,8 +5,8 @@ import (
"os"
"strings"
"miller/src/cliutil"
"miller/src/types"
"mlr/src/cliutil"
"mlr/src/types"
)
// ----------------------------------------------------------------

Some files were not shown because too many files have changed in this diff Show more