mirror of
https://github.com/johnkerl/miller.git
synced 2026-01-23 02:14:13 +00:00
More Go-package restructuring (#748)
This commit is contained in:
parent
f597ec3da6
commit
bc72cd1857
187 changed files with 551 additions and 782 deletions
29
.gitignore
vendored
29
.gitignore
vendored
|
|
@ -1,41 +1,14 @@
|
|||
go/mlr
|
||||
go/mlr.exe
|
||||
mlr
|
||||
mlr.exe
|
||||
a.out
|
||||
*.dSYM
|
||||
catc
|
||||
catc0
|
||||
catm
|
||||
gmon.out
|
||||
*.o
|
||||
*.pyc
|
||||
.sw?
|
||||
.*.sw?
|
||||
tags
|
||||
*~
|
||||
mlr-[0-9.]*.tar.*
|
||||
push2
|
||||
data/.gitignore
|
||||
|
||||
docs/_build
|
||||
docs6/_build
|
||||
|
||||
man/man1
|
||||
|
||||
miller-*.src.rpm
|
||||
mlr.exe
|
||||
mlr.linux.x86_64
|
||||
mlr.macosx
|
||||
|
||||
data/big.*
|
||||
data/nmc?.*
|
||||
|
||||
experiments/dsl-parser/one/src
|
||||
experiments/dsl-parser/one/main
|
||||
experiments/dsl-parser/two/src
|
||||
experiments/dsl-parser/two/main
|
||||
experiments/cli-parser/cliparse
|
||||
experiments/cli-parser/cliparse.exe
|
||||
|
||||
docs/src/polyglot-dkvp-io/__pycache__
|
||||
docs/site/
|
||||
|
|
|
|||
1
.vimrc
Normal file
1
.vimrc
Normal file
|
|
@ -0,0 +1 @@
|
|||
map \d :w<C-m>:!clear;echo Building ...; echo; make build<C-m>
|
||||
30
Makefile
30
Makefile
|
|
@ -2,19 +2,25 @@ PREFIX=/usr/local
|
|||
INSTALLDIR=$(PREFIX)/bin
|
||||
|
||||
build:
|
||||
go build
|
||||
go build github.com/johnkerl/miller/cmd/mlr
|
||||
|
||||
check:
|
||||
# Unit tests (small number)
|
||||
go test -v mlr/internal/pkg/...
|
||||
# Regression tests (large number)
|
||||
#
|
||||
# See ./regression_test.go for information on how to get more details
|
||||
# for debugging. TL;DR is for CI jobs, we have 'go test -v'; for
|
||||
# interactive use, instead of 'go test -v' simply use 'mlr regtest
|
||||
# -vvv' or 'mlr regtest -s 20'. See also src/auxents/regtest.
|
||||
go test -v
|
||||
check: unit_test regression_test
|
||||
|
||||
# Unit tests (small number)
|
||||
unit_test:
|
||||
go test github.com/johnkerl/miller/internal/pkg/...
|
||||
|
||||
# Regression tests (large number)
|
||||
#
|
||||
# See ./regression_test.go for information on how to get more details
|
||||
# for debugging. TL;DR is for CI jobs, we have 'go test -v'; for
|
||||
# interactive use, instead of 'go test -v' simply use 'mlr regtest
|
||||
# -vvv' or 'mlr regtest -s 20'. See also internal/pkg/auxents/regtest.
|
||||
regression_test:
|
||||
go test -v regression_test.go
|
||||
|
||||
# DESTDIR is for package installs; nominally blank when this is run interactively.
|
||||
# See also https://www.gnu.org/prep/standards/html_node/DESTDIR.html
|
||||
install: build
|
||||
cp mlr $(DESTDIR)/$(INSTALLDIR)
|
||||
make -C man install
|
||||
|
|
@ -51,4 +57,4 @@ release_tarball: build check
|
|||
./create-release-tarball
|
||||
|
||||
# Go does its own dependency management, outside of make.
|
||||
.PHONY: build check fmt dev
|
||||
.PHONY: build check unit_test regression_test fmt dev
|
||||
|
|
|
|||
|
|
@ -1,9 +1,6 @@
|
|||
# Quickstart for developers
|
||||
|
||||
* `go build` -- produces the `mlr` executable
|
||||
* Miller has tens of unit tests and thousands of regression tests:
|
||||
* `go test mlr/src/...` runs the unit tests.
|
||||
* `go test` or `mlr regtest` runs the regression tests in `test/cases/`. Using `mlr regtest -h` you can see more options available than are exposed by `go test`.
|
||||
See `makefile` in the repo base directory.
|
||||
|
||||
# Continuous integration
|
||||
|
||||
|
|
@ -57,10 +54,10 @@ During the coding of Miller, I've been guided by the following:
|
|||
* Names of files, variables, functions, etc. should be fully spelled out (e.g. `NewEvaluableLeafNode`), except for a small number of most-used names where a longer name would cause unnecessary line-wraps (e.g. `Mlrval` instead of `MillerValue` since this appears very very often).
|
||||
* Code should not be too clever. This includes some reasonable amounts of code duplication from time to time, to keep things inline, rather than lasagna code.
|
||||
* Things should be transparent. For example, `mlr -n put -v '$y = 3 + 0.1 * $x'` shows you the abstract syntax tree derived from the DSL expression.
|
||||
* Comments should be robust with respect to reasonably anticipated changes. For example, one package should cross-link to another in its comments, but I try to avoid mentioning specific filenames too much in the comments and README files since these may change over time. I make an exception for stable points such as [mlr.go](./mlr.go), [mlr.bnf](./src/parsing/mlr.bnf), [stream.go](./src/stream/stream.go), etc.
|
||||
* Comments should be robust with respect to reasonably anticipated changes. For example, one package should cross-link to another in its comments, but I try to avoid mentioning specific filenames too much in the comments and README files since these may change over time. I make an exception for stable points such as [mlr.go](./mlr.go), [mlr.bnf](./internal/pkg/parsing/mlr.bnf), [stream.go](./internal/pkg/stream/stream.go), etc.
|
||||
* *Miller should be pleasant to write.*
|
||||
* It should be quick to answer the question *Did I just break anything?* -- hence the `build` and `reg_test/run` regression scripts.
|
||||
* It should be quick to find out what to do next as you iteratively develop -- see for example [cst/README.md](https://github.com/johnkerl/miller/blob/master/go/src/dsl/cst/README.md).
|
||||
* It should be quick to find out what to do next as you iteratively develop -- see for example [cst/README.md](./internal/pkg/dsl/cst/README.md).
|
||||
* *The language should be an asset, not a liability.*
|
||||
* One of the reasons I chose Go is that (personally anyway) I find it to be reasonably efficient, well-supported with standard libraries, straightforward, and fun. I hope you enjoy it as much as I have.
|
||||
|
||||
|
|
@ -79,10 +76,10 @@ sequence of key-value pairs. The basic **stream** operation is:
|
|||
|
||||
So, in broad overview, the key packages are:
|
||||
|
||||
* [src/stream](./src/stream) -- connect input -> transforms -> output via Go channels
|
||||
* [src/input](./src/input) -- read input records
|
||||
* [src/transforming](./src/transforming) -- transform input records to output records
|
||||
* [src/output](./src/output) -- write output records
|
||||
* [internal/pkg/stream](./internal/pkg/stream) -- connect input -> transforms -> output via Go channels
|
||||
* [internal/pkg/input](./internal/pkg/input) -- read input records
|
||||
* [internal/pkg/transforming](./internal/pkg/transforming) -- transform input records to output records
|
||||
* [internal/pkg/output](./internal/pkg/output) -- write output records
|
||||
* The rest are details to support this.
|
||||
|
||||
## Directory-structure details
|
||||
|
|
@ -94,7 +91,7 @@ So, in broad overview, the key packages are:
|
|||
* This package defines the grammar for Miller's domain-specific language (DSL) for the Miller `put` and `filter` verbs. And, GOCC is a joy to use. :)
|
||||
* It is used on the terms of its open-source license.
|
||||
* [golang.org/x/term](https://pkg.go.dev/golang.org/x/term):
|
||||
* Just a one-line Miller callsite for is-a-terminal checking for the [Miller REPL](https://github.com/johnkerl/miller/blob/go-mod/go/src/auxents/repl/README.md).
|
||||
* Just a one-line Miller callsite for is-a-terminal checking for the [Miller REPL](./internal/pkg/auxents/repl/README.md).
|
||||
* It is used on the terms of its open-source license.
|
||||
* See also [./go.mod](go.mod). Setup:
|
||||
* `go get github.com/goccmack/gocc`
|
||||
|
|
@ -102,23 +99,23 @@ So, in broad overview, the key packages are:
|
|||
|
||||
### Miller per se
|
||||
|
||||
* The main entry point is [mlr.go](./mlr.go); everything else in [src](./src).
|
||||
* [src/entrypoint](./src/entrypoint): All the usual contents of `main()` are here, for ease of testing.
|
||||
* [src/platform](./src/platform): Platform-dependent code, which as of early 2021 is the command-line parser. Handling single quotes and double quotes is different on Windows unless particular care is taken, which is what this package does.
|
||||
* [src/lib](./src/lib):
|
||||
* Implementation of the [`Mlrval`](./src/types/mlrval.go) datatype which includes string/int/float/boolean/void/absent/error types. These are used for record values, as well as expression/variable values in the Miller `put`/`filter` DSL. See also below for more details.
|
||||
* [`Mlrmap`](./src/types/mlrmap.go) is the sequence of key-value pairs which represents a Miller record. The key-lookup mechanism is optimized for Miller read/write usage patterns -- please see [mlrmap.go](./src/types/mlrmap.go) for more details.
|
||||
* [`context`](./src/types/context.go) supports AWK-like variables such as `FILENAME`, `NF`, `NR`, and so on.
|
||||
* [src/cli](./src/cli) is the flag-parsing logic for supporting Miller's command-line interface. When you type something like `mlr --icsv --ojson put '$sum = $a + $b' then filter '$sum > 1000' myfile.csv`, it's the CLI parser which makes it possible for Miller to construct a CSV record-reader, a transformer-chain of `put` then `filter`, and a JSON record-writer.
|
||||
* [src/cliutil](./src/cliutil) contains datatypes for the CLI-parser, which was split out to avoid a Go package-import cycle.
|
||||
* [src/stream](./src/stream) is as above -- it uses Go channels to pipe together file-reads, to record-reading/parsing, to a chain of record-transformers, to record-writing/formatting, to terminal standard output.
|
||||
* [src/input](./src/input) is as above -- one record-reader type per supported input file format, and a factory method.
|
||||
* [src/output](./src/output) is as above -- one record-writer type per supported output file format, and a factory method.
|
||||
* [src/transforming](./src/transforming) contains the abstract record-transformer interface datatype, as well as the Go-channel chaining mechanism for piping one transformer into the next.
|
||||
* [src/transformers](./src/transformers) is all the concrete record-transformers such as `cat`, `tac`, `sort`, `put`, and so on. I put it here, not in `transforming`, so all files in `transformers` would be of the same type.
|
||||
* [src/parsing](./src/parsing) contains a single source file, `mlr.bnf`, which is the lexical/semantic grammar file for the Miller `put`/`filter` DSL using the GOCC framework. All subdirectories of `src/parsing/` are autogen code created by GOCC's processing of `mlr.bnf`. If you need to edit `mlr.bnf`, please use [tools/build-dsl](./tools/build-dsl) to autogenerate Go code from it (using the GOCC tool). (This takes several minutes to run.)
|
||||
* [src/dsl](./src/dsl) contains [`ast_types.go`](src/dsl/ast_types.go) which is the abstract syntax tree datatype shared between GOCC and Miller. I didn't use a `src/dsl/ast` naming convention, although that would have been nice, in order to avoid a Go package-dependency cycle.
|
||||
* [src/dsl/cst](./src/dsl/cst) is the concrete syntax tree, constructed from an AST produced by GOCC. The CST is what is actually executed on every input record when you do things like `$z = $x * 0.3 * $y`. Please see the [src/dsl/cst/README.md](./src/dsl/cst/README.md) for more information.
|
||||
* The main entry point is [mlr.go](./mlr.go); everything else in [internal/pkg](./internal/pkg).
|
||||
* [internal/pkg/entrypoint](./internal/pkg/entrypoint): All the usual contents of `main()` are here, for ease of testing.
|
||||
* [internal/pkg/platform](./internal/pkg/platform): Platform-dependent code, which as of early 2021 is the command-line parser. Handling single quotes and double quotes is different on Windows unless particular care is taken, which is what this package does.
|
||||
* [internal/pkg/lib](./internal/pkg/lib):
|
||||
* Implementation of the [`Mlrval`](./internal/pkg/types/mlrval.go) datatype which includes string/int/float/boolean/void/absent/error types. These are used for record values, as well as expression/variable values in the Miller `put`/`filter` DSL. See also below for more details.
|
||||
* [`Mlrmap`](./internal/pkg/types/mlrmap.go) is the sequence of key-value pairs which represents a Miller record. The key-lookup mechanism is optimized for Miller read/write usage patterns -- please see [mlrmap.go](./internal/pkg/types/mlrmap.go) for more details.
|
||||
* [`context`](./internal/pkg/types/context.go) supports AWK-like variables such as `FILENAME`, `NF`, `NR`, and so on.
|
||||
* [internal/pkg/cli](./internal/pkg/cli) is the flag-parsing logic for supporting Miller's command-line interface. When you type something like `mlr --icsv --ojson put '$sum = $a + $b' then filter '$sum > 1000' myfile.csv`, it's the CLI parser which makes it possible for Miller to construct a CSV record-reader, a transformer-chain of `put` then `filter`, and a JSON record-writer.
|
||||
* [internal/pkg/cliutil](./internal/pkg/cliutil) contains datatypes for the CLI-parser, which was split out to avoid a Go package-import cycle.
|
||||
* [internal/pkg/stream](./internal/pkg/stream) is as above -- it uses Go channels to pipe together file-reads, to record-reading/parsing, to a chain of record-transformers, to record-writing/formatting, to terminal standard output.
|
||||
* [internal/pkg/input](./internal/pkg/input) is as above -- one record-reader type per supported input file format, and a factory method.
|
||||
* [internal/pkg/output](./internal/pkg/output) is as above -- one record-writer type per supported output file format, and a factory method.
|
||||
* [internal/pkg/transforming](./internal/pkg/transforming) contains the abstract record-transformer interface datatype, as well as the Go-channel chaining mechanism for piping one transformer into the next.
|
||||
* [internal/pkg/transformers](./internal/pkg/transformers) is all the concrete record-transformers such as `cat`, `tac`, `sort`, `put`, and so on. I put it here, not in `transforming`, so all files in `transformers` would be of the same type.
|
||||
* [internal/pkg/parsing](./internal/pkg/parsing) contains a single source file, `mlr.bnf`, which is the lexical/semantic grammar file for the Miller `put`/`filter` DSL using the GOCC framework. All subdirectories of `internal/pkg/parsing/` are autogen code created by GOCC's processing of `mlr.bnf`. If you need to edit `mlr.bnf`, please use [tools/build-dsl](./tools/build-dsl) to autogenerate Go code from it (using the GOCC tool). (This takes several minutes to run.)
|
||||
* [internal/pkg/dsl](./internal/pkg/dsl) contains [`ast_types.go`](internal/pkg/dsl/ast_types.go) which is the abstract syntax tree datatype shared between GOCC and Miller. I didn't use a `internal/pkg/dsl/ast` naming convention, although that would have been nice, in order to avoid a Go package-dependency cycle.
|
||||
* [internal/pkg/dsl/cst](./internal/pkg/dsl/cst) is the concrete syntax tree, constructed from an AST produced by GOCC. The CST is what is actually executed on every input record when you do things like `$z = $x * 0.3 * $y`. Please see the [internal/pkg/dsl/cst/README.md](./internal/pkg/dsl/cst/README.md) for more information.
|
||||
|
||||
## Nil-record conventions
|
||||
|
||||
|
|
@ -150,7 +147,7 @@ nil through the reader/transformer/writer sequence.
|
|||
|
||||
## More about mlrvals
|
||||
|
||||
[`Mlrval`](./src/types/mlrval.go) is the datatype of record values, as well as expression/variable values in the Miller `put`/`filter` DSL. It includes string/int/float/boolean/void/absent/error types, not unlike PHP's `zval`.
|
||||
[`Mlrval`](./internal/pkg/types/mlrval.go) is the datatype of record values, as well as expression/variable values in the Miller `put`/`filter` DSL. It includes string/int/float/boolean/void/absent/error types, not unlike PHP's `zval`.
|
||||
|
||||
* Miller's `absent` type is like Javascript's `undefined` -- it's for times when there is no such key, as in a DSL expression `$out = $foo` when the input record is `$x=3,y=4` -- there is no `$foo` so `$foo` has `absent` type. Nothing is written to the `$out` field in this case. See also [here](http://johnkerl.org/miller/doc/reference.html#Null_data:_empty_and_absent) for more information.
|
||||
* Miller's `void` type is like Javascript's `null` -- it's for times when there is a key with no value, as in `$out = $x` when the input record is `$x=,$y=4`. This is an overlap with `string` type, since a void value looks like an empty string. I've gone back and forth on this (including when I was writing the C implementation) -- whether to retain `void` as a distinct type from empty-string, or not. I ended up keeping it as it made the `Mlrval` logic easier to understand.
|
||||
|
|
@ -158,7 +155,7 @@ nil through the reader/transformer/writer sequence.
|
|||
* Miller's number handling makes auto-overflow from int to float transparent, while preserving the possibility of 64-bit bitwise arithmetic.
|
||||
* This is different from JavaScript, which has only double-precision floats and thus no support for 64-bit numbers (note however that there is now [`BigInt`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt)).
|
||||
* This is also different from C and Go, wherein casts are necessary -- without which int arithmetic overflows.
|
||||
* See also [here](http://johnkerl.org/miller/doc/reference.html#Arithmetic) for the semantics of Miller arithmetic, which the [`Mlrval`](./src/types/mlrval.go) class implements.
|
||||
* See also [here](http://johnkerl.org/miller/doc/reference.html#Arithmetic) for the semantics of Miller arithmetic, which the [`Mlrval`](./internal/pkg/types/mlrval.go) class implements.
|
||||
|
||||
## Software-testing methodology
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Package main is the entry point for Miller.
|
||||
// This is the entry point for the mlr executable.
|
||||
package main
|
||||
|
||||
import (
|
||||
|
|
@ -9,10 +9,9 @@ import (
|
|||
"runtime/pprof"
|
||||
"strconv"
|
||||
|
||||
"mlr/internal/pkg/entrypoint"
|
||||
"github.com/johnkerl/miller/internal/pkg/entrypoint"
|
||||
)
|
||||
|
||||
// main is the entry point for Miller.
|
||||
func main() {
|
||||
|
||||
// Respect env $GOMAXPROCS, if provided, else set default.
|
||||
|
|
@ -36,7 +35,7 @@ func main() {
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
// CPU profiling
|
||||
//
|
||||
// We do this here not in the command-line parser since
|
||||
// We do this here, not in the command-line parser, since
|
||||
// pprof.StopCPUProfile() needs to be called at the very end of everything.
|
||||
// Putting this pprof logic into a go func running in parallel with main,
|
||||
// and properly stopping the profile only when main ends via chan-sync,
|
||||
|
|
@ -68,7 +68,7 @@ In this example I am using version 6.1.0 to 6.2.0; of course that will change fo
|
|||
|
||||
* Update version found in `mlr --version` and `man mlr`:
|
||||
|
||||
* Edit `go/src/version/version.go` from `6.1.0-dev` to `6.2.0`.
|
||||
* Edit `internal/pkpg/version/version.go` from `6.1.0-dev` to `6.2.0`.
|
||||
* Edit version in `docs/mkdocs.yml` from `6.1.0` to `6.2.0`.
|
||||
* Run `make dev` in the Miller repo base directory
|
||||
* The ordering in this makefile rule is important: the first build creates `mlr`; the second runs `mlr` to create `manpage.txt`; the third includes `manpage.txt` into one of its outputs.
|
||||
|
|
@ -79,7 +79,7 @@ In this example I am using version 6.1.0 to 6.2.0; of course that will change fo
|
|||
* `make release_tarball`
|
||||
* This creates `miller-6.2.0-dev.tar.gz` which we'll upload to GitHub, the URL of which will be in our `miller.spec`
|
||||
* Get `mlr.{arch}` binaries from latest successful build from [https://github.com/johnkerl/miller/actions](https://github.com/johnkerl/miller/actions), or, build them on buildboxes.
|
||||
* Prepare the source RPM following [./README-RPM.md](README-RPM.md).
|
||||
* Prepare the source RPM following `README-RPM.md`.
|
||||
|
||||
* Create the Github release tag:
|
||||
|
||||
|
|
@ -119,7 +119,7 @@ git push -u origin miller-6.1.0
|
|||
|
||||
* Afterwork:
|
||||
|
||||
* Edit `go/src/version/version.go` to change version from `6.2.0` to `6.2.0-dev`.
|
||||
* Edit `internal/pkg/version/version.go` to change version from `6.2.0` to `6.2.0-dev`.
|
||||
* `cd go`
|
||||
* `./build`
|
||||
* Commit and push.
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ In this example I am using version 6.1.0 to 6.2.0; of course that will change fo
|
|||
|
||||
* Update version found in `mlr --version` and `man mlr`:
|
||||
|
||||
* Edit `go/src/version/version.go` from `6.1.0-dev` to `6.2.0`.
|
||||
* Edit `internal/pkpg/version/version.go` from `6.1.0-dev` to `6.2.0`.
|
||||
* Edit version in `docs/mkdocs.yml` from `6.1.0` to `6.2.0`.
|
||||
* Run `make dev` in the Miller repo base directory
|
||||
* The ordering in this makefile rule is important: the first build creates `mlr`; the second runs `mlr` to create `manpage.txt`; the third includes `manpage.txt` into one of its outputs.
|
||||
|
|
@ -63,7 +63,7 @@ In this example I am using version 6.1.0 to 6.2.0; of course that will change fo
|
|||
* `make release_tarball`
|
||||
* This creates `miller-6.2.0-dev.tar.gz` which we'll upload to GitHub, the URL of which will be in our `miller.spec`
|
||||
* Get `mlr.{arch}` binaries from latest successful build from [https://github.com/johnkerl/miller/actions](https://github.com/johnkerl/miller/actions), or, build them on buildboxes.
|
||||
* Prepare the source RPM following [./README-RPM.md](README-RPM.md).
|
||||
* Prepare the source RPM following `README-RPM.md`.
|
||||
|
||||
* Create the Github release tag:
|
||||
|
||||
|
|
@ -103,7 +103,7 @@ GENMD-EOF
|
|||
|
||||
* Afterwork:
|
||||
|
||||
* Edit `go/src/version/version.go` to change version from `6.2.0` to `6.2.0-dev`.
|
||||
* Edit `internal/pkg/version/version.go` to change version from `6.2.0` to `6.2.0-dev`.
|
||||
* `cd go`
|
||||
* `./build`
|
||||
* Commit and push.
|
||||
|
|
|
|||
15
go.mod
15
go.mod
|
|
@ -1,8 +1,13 @@
|
|||
module mlr
|
||||
// 'module github.com/johnkerl/miller' would be more standard, but it has the
|
||||
// fatal flaw that 'go build' would produce a file named 'miller', not 'mlr' --
|
||||
// and this naming goes back many years for Miller with executable named 'mlr',
|
||||
// predating the Go port, across many platforms.
|
||||
module github.com/johnkerl/miller
|
||||
// The repo is 'miller' and the executable is 'mlr', going back many years and
|
||||
// predating the Go port.
|
||||
//
|
||||
// If we had ./mlr.go then 'go build github.com/johnkerl/miller' then the
|
||||
// executable would be 'miller' not 'mlr'.
|
||||
//
|
||||
// So we have cmd/mlr/main.go:
|
||||
// * go build github.com/johnkerl/miller/cmd/mlr
|
||||
// * go install github.com/johnkerl/miller/cmd/mlr
|
||||
|
||||
go 1.15
|
||||
|
||||
|
|
|
|||
8
go/.gitignore
vendored
8
go/.gitignore
vendored
|
|
@ -1,8 +0,0 @@
|
|||
big
|
||||
big.json
|
||||
bin/
|
||||
pkg/
|
||||
*.ast
|
||||
r
|
||||
s
|
||||
mlrgo
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
map \d :w<C-m>:!clear;echo Building ...; echo; go build<C-m>
|
||||
map \f :w<C-m>:!clear;echo Building ...; echo; build<C-m>
|
||||
map \T :w<C-m>:!clear;go test mlr/src/lib/...<C-m>
|
||||
|
|
@ -9,9 +9,9 @@ import (
|
|||
"fmt"
|
||||
"os"
|
||||
|
||||
"mlr/internal/pkg/auxents/help"
|
||||
"mlr/internal/pkg/auxents/regtest"
|
||||
"mlr/internal/pkg/auxents/repl"
|
||||
"github.com/johnkerl/miller/internal/pkg/auxents/help"
|
||||
"github.com/johnkerl/miller/internal/pkg/auxents/regtest"
|
||||
"github.com/johnkerl/miller/internal/pkg/auxents/repl"
|
||||
)
|
||||
|
||||
// tAuxMain is a function-pointer type for the entrypoint handler for a given auxent,
|
||||
|
|
|
|||
|
|
@ -10,11 +10,11 @@ import (
|
|||
|
||||
"github.com/mattn/go-isatty"
|
||||
|
||||
"mlr/internal/pkg/cli"
|
||||
"mlr/internal/pkg/dsl/cst"
|
||||
"mlr/internal/pkg/lib"
|
||||
"mlr/internal/pkg/transformers"
|
||||
"mlr/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/cli"
|
||||
"github.com/johnkerl/miller/internal/pkg/dsl/cst"
|
||||
"github.com/johnkerl/miller/internal/pkg/lib"
|
||||
"github.com/johnkerl/miller/internal/pkg/transformers"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
)
|
||||
|
||||
// ================================================================
|
||||
|
|
@ -311,7 +311,7 @@ func helpAuxents() {
|
|||
They do not participate in any other parts of Miller.
|
||||
Please "mlr aux-list" for more information.
|
||||
`)
|
||||
// imports mlr/internal/pkg/auxents: import cycle not allowed
|
||||
// imports github.com/johnkerl/miller/internal/pkg/auxents: import cycle not allowed
|
||||
// auxents.ShowAuxEntries(o)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ func RegTestMain(args []string) int {
|
|||
regTestUsage(verbName, os.Stderr, 1)
|
||||
}
|
||||
}
|
||||
paths := args[argi:]
|
||||
casePaths := args[argi:]
|
||||
|
||||
regtester := NewRegTester(
|
||||
exeName,
|
||||
|
|
@ -109,7 +109,7 @@ func RegTestMain(args []string) int {
|
|||
firstNFailsToShow,
|
||||
)
|
||||
|
||||
ok := regtester.Execute(paths)
|
||||
ok := regtester.Execute(casePaths)
|
||||
|
||||
if !ok {
|
||||
return 1
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ import (
|
|||
"os/exec"
|
||||
"strings"
|
||||
|
||||
"mlr/internal/pkg/lib"
|
||||
"mlr/internal/pkg/platform"
|
||||
"github.com/johnkerl/miller/internal/pkg/lib"
|
||||
"github.com/johnkerl/miller/internal/pkg/platform"
|
||||
)
|
||||
|
||||
// RunMillerCommand runs a string like 'mlr cat foo.dat', with specified mlr
|
||||
|
|
|
|||
|
|
@ -65,11 +65,11 @@ import (
|
|||
"runtime"
|
||||
"strings"
|
||||
|
||||
"mlr/internal/pkg/colorizer"
|
||||
"mlr/internal/pkg/lib"
|
||||
"github.com/johnkerl/miller/internal/pkg/colorizer"
|
||||
"github.com/johnkerl/miller/internal/pkg/lib"
|
||||
)
|
||||
|
||||
const DefaultPath = "./test/cases"
|
||||
const DefaultPath = "./cases"
|
||||
const CmdName = "cmd"
|
||||
const MlrName = "mlr"
|
||||
const EnvName = "env"
|
||||
|
|
@ -153,7 +153,7 @@ func (regtester *RegTester) resetCounts() {
|
|||
// for semantics.
|
||||
|
||||
func (regtester *RegTester) Execute(
|
||||
paths []string,
|
||||
casePaths []string,
|
||||
) bool {
|
||||
|
||||
// Don't let the current user's settings affect expected results
|
||||
|
|
@ -163,20 +163,20 @@ func (regtester *RegTester) Execute(
|
|||
|
||||
regtester.resetCounts()
|
||||
|
||||
if len(paths) == 0 {
|
||||
paths = []string{DefaultPath}
|
||||
if len(casePaths) == 0 {
|
||||
casePaths = []string{DefaultPath}
|
||||
}
|
||||
|
||||
if !regtester.plainMode {
|
||||
fmt.Println("REGRESSION TEST:")
|
||||
for _, path := range paths {
|
||||
for _, path := range casePaths {
|
||||
fmt.Printf(" %s\n", path)
|
||||
}
|
||||
fmt.Printf("Using executable: %s\n", regtester.exeName)
|
||||
fmt.Println()
|
||||
}
|
||||
|
||||
for _, path := range paths {
|
||||
for _, path := range casePaths {
|
||||
regtester.executeSinglePath(path)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,9 +23,9 @@ import (
|
|||
"fmt"
|
||||
"strings"
|
||||
|
||||
"mlr/internal/pkg/dsl"
|
||||
"mlr/internal/pkg/dsl/cst"
|
||||
"mlr/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/dsl"
|
||||
"github.com/johnkerl/miller/internal/pkg/dsl/cst"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
)
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ import (
|
|||
"path"
|
||||
"strings"
|
||||
|
||||
"mlr/internal/pkg/cli"
|
||||
"github.com/johnkerl/miller/internal/pkg/cli"
|
||||
)
|
||||
|
||||
// ================================================================
|
||||
|
|
|
|||
|
|
@ -11,9 +11,9 @@ import (
|
|||
|
||||
"golang.org/x/term"
|
||||
|
||||
"mlr/internal/pkg/colorizer"
|
||||
"mlr/internal/pkg/lib"
|
||||
"mlr/internal/pkg/version"
|
||||
"github.com/johnkerl/miller/internal/pkg/colorizer"
|
||||
"github.com/johnkerl/miller/internal/pkg/lib"
|
||||
"github.com/johnkerl/miller/internal/pkg/version"
|
||||
)
|
||||
|
||||
const ENV_PRIMARY_PROMPT = "MLR_REPL_PS1"
|
||||
|
|
|
|||
|
|
@ -25,13 +25,13 @@ import (
|
|||
"strings"
|
||||
"syscall"
|
||||
|
||||
"mlr/internal/pkg/cli"
|
||||
"mlr/internal/pkg/dsl/cst"
|
||||
"mlr/internal/pkg/input"
|
||||
"mlr/internal/pkg/lib"
|
||||
"mlr/internal/pkg/output"
|
||||
"mlr/internal/pkg/runtime"
|
||||
"mlr/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/cli"
|
||||
"github.com/johnkerl/miller/internal/pkg/dsl/cst"
|
||||
"github.com/johnkerl/miller/internal/pkg/input"
|
||||
"github.com/johnkerl/miller/internal/pkg/lib"
|
||||
"github.com/johnkerl/miller/internal/pkg/output"
|
||||
"github.com/johnkerl/miller/internal/pkg/runtime"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
)
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -7,12 +7,12 @@ package repl
|
|||
import (
|
||||
"os"
|
||||
|
||||
"mlr/internal/pkg/cli"
|
||||
"mlr/internal/pkg/dsl/cst"
|
||||
"mlr/internal/pkg/input"
|
||||
"mlr/internal/pkg/output"
|
||||
"mlr/internal/pkg/runtime"
|
||||
"mlr/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/cli"
|
||||
"github.com/johnkerl/miller/internal/pkg/dsl/cst"
|
||||
"github.com/johnkerl/miller/internal/pkg/input"
|
||||
"github.com/johnkerl/miller/internal/pkg/output"
|
||||
"github.com/johnkerl/miller/internal/pkg/runtime"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
)
|
||||
|
||||
// ================================================================
|
||||
|
|
|
|||
|
|
@ -9,11 +9,11 @@ import (
|
|||
"os"
|
||||
"strings"
|
||||
|
||||
"mlr/internal/pkg/colorizer"
|
||||
"mlr/internal/pkg/dsl"
|
||||
"mlr/internal/pkg/dsl/cst"
|
||||
"mlr/internal/pkg/lib"
|
||||
"mlr/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/colorizer"
|
||||
"github.com/johnkerl/miller/internal/pkg/dsl"
|
||||
"github.com/johnkerl/miller/internal/pkg/dsl/cst"
|
||||
"github.com/johnkerl/miller/internal/pkg/lib"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
)
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -42,8 +42,8 @@ import (
|
|||
"sort"
|
||||
"strings"
|
||||
|
||||
"mlr/internal/pkg/colorizer"
|
||||
"mlr/internal/pkg/lib"
|
||||
"github.com/johnkerl/miller/internal/pkg/colorizer"
|
||||
"github.com/johnkerl/miller/internal/pkg/lib"
|
||||
)
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -11,9 +11,9 @@ import (
|
|||
"os"
|
||||
"strings"
|
||||
|
||||
"mlr/internal/pkg/colorizer"
|
||||
"mlr/internal/pkg/lib"
|
||||
"mlr/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/colorizer"
|
||||
"github.com/johnkerl/miller/internal/pkg/lib"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
)
|
||||
|
||||
// FinalizeReaderOptions does a few things.
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ package cli
|
|||
import (
|
||||
"regexp"
|
||||
|
||||
"mlr/internal/pkg/lib"
|
||||
"github.com/johnkerl/miller/internal/pkg/lib"
|
||||
)
|
||||
|
||||
type TCommentHandling int
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import (
|
|||
"os"
|
||||
"strconv"
|
||||
|
||||
"mlr/internal/pkg/lib"
|
||||
"github.com/johnkerl/miller/internal/pkg/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.
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import (
|
|||
"regexp"
|
||||
"strings"
|
||||
|
||||
"mlr/internal/pkg/cli"
|
||||
"github.com/johnkerl/miller/internal/pkg/cli"
|
||||
)
|
||||
|
||||
// loadMlrrcOrDie rule: If $MLRRC is set, use it and only it. Otherwise try
|
||||
|
|
|
|||
|
|
@ -4,12 +4,12 @@ import (
|
|||
"fmt"
|
||||
"os"
|
||||
|
||||
"mlr/internal/pkg/auxents/help"
|
||||
"mlr/internal/pkg/cli"
|
||||
"mlr/internal/pkg/lib"
|
||||
"mlr/internal/pkg/transformers"
|
||||
"mlr/internal/pkg/types"
|
||||
"mlr/internal/pkg/version"
|
||||
"github.com/johnkerl/miller/internal/pkg/auxents/help"
|
||||
"github.com/johnkerl/miller/internal/pkg/cli"
|
||||
"github.com/johnkerl/miller/internal/pkg/lib"
|
||||
"github.com/johnkerl/miller/internal/pkg/transformers"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/version"
|
||||
)
|
||||
|
||||
// ParseCommandLine is the entrypoint for handling the Miller command line:
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
|
||||
"mlr/internal/pkg/lib"
|
||||
"mlr/internal/pkg/parsing/token"
|
||||
"github.com/johnkerl/miller/internal/pkg/lib"
|
||||
"github.com/johnkerl/miller/internal/pkg/parsing/token"
|
||||
)
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
package dsl
|
||||
|
||||
import (
|
||||
"mlr/internal/pkg/parsing/token"
|
||||
"github.com/johnkerl/miller/internal/pkg/parsing/token"
|
||||
)
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@
|
|||
package cst
|
||||
|
||||
import (
|
||||
"mlr/internal/pkg/dsl"
|
||||
"mlr/internal/pkg/lib"
|
||||
"mlr/internal/pkg/runtime"
|
||||
"github.com/johnkerl/miller/internal/pkg/dsl"
|
||||
"github.com/johnkerl/miller/internal/pkg/lib"
|
||||
"github.com/johnkerl/miller/internal/pkg/runtime"
|
||||
)
|
||||
|
||||
// ================================================================
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ package cst
|
|||
import (
|
||||
"errors"
|
||||
|
||||
"mlr/internal/pkg/dsl"
|
||||
"mlr/internal/pkg/lib"
|
||||
"mlr/internal/pkg/runtime"
|
||||
"github.com/johnkerl/miller/internal/pkg/dsl"
|
||||
"github.com/johnkerl/miller/internal/pkg/lib"
|
||||
"github.com/johnkerl/miller/internal/pkg/runtime"
|
||||
)
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@
|
|||
package cst
|
||||
|
||||
import (
|
||||
"mlr/internal/pkg/dsl"
|
||||
"mlr/internal/pkg/lib"
|
||||
"mlr/internal/pkg/runtime"
|
||||
"github.com/johnkerl/miller/internal/pkg/dsl"
|
||||
"github.com/johnkerl/miller/internal/pkg/lib"
|
||||
"github.com/johnkerl/miller/internal/pkg/runtime"
|
||||
)
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -19,9 +19,9 @@ import (
|
|||
"sort"
|
||||
"strings"
|
||||
|
||||
"mlr/internal/pkg/colorizer"
|
||||
"mlr/internal/pkg/lib"
|
||||
"mlr/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/colorizer"
|
||||
"github.com/johnkerl/miller/internal/pkg/lib"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
)
|
||||
|
||||
type TFunctionClass string
|
||||
|
|
|
|||
|
|
@ -8,10 +8,10 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
|
||||
"mlr/internal/pkg/dsl"
|
||||
"mlr/internal/pkg/lib"
|
||||
"mlr/internal/pkg/runtime"
|
||||
"mlr/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/dsl"
|
||||
"github.com/johnkerl/miller/internal/pkg/lib"
|
||||
"github.com/johnkerl/miller/internal/pkg/runtime"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
)
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@
|
|||
package cst
|
||||
|
||||
import (
|
||||
"mlr/internal/pkg/dsl"
|
||||
"mlr/internal/pkg/lib"
|
||||
"mlr/internal/pkg/runtime"
|
||||
"mlr/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/dsl"
|
||||
"github.com/johnkerl/miller/internal/pkg/lib"
|
||||
"github.com/johnkerl/miller/internal/pkg/runtime"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
)
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -8,10 +8,10 @@ package cst
|
|||
import (
|
||||
"errors"
|
||||
|
||||
"mlr/internal/pkg/dsl"
|
||||
"mlr/internal/pkg/lib"
|
||||
"mlr/internal/pkg/runtime"
|
||||
"mlr/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/dsl"
|
||||
"github.com/johnkerl/miller/internal/pkg/lib"
|
||||
"github.com/johnkerl/miller/internal/pkg/runtime"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
)
|
||||
|
||||
type CondBlockNode struct {
|
||||
|
|
|
|||
|
|
@ -22,11 +22,11 @@ import (
|
|||
"os"
|
||||
"strings"
|
||||
|
||||
"mlr/internal/pkg/dsl"
|
||||
"mlr/internal/pkg/lib"
|
||||
"mlr/internal/pkg/output"
|
||||
"mlr/internal/pkg/runtime"
|
||||
"mlr/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/dsl"
|
||||
"github.com/johnkerl/miller/internal/pkg/lib"
|
||||
"github.com/johnkerl/miller/internal/pkg/output"
|
||||
"github.com/johnkerl/miller/internal/pkg/runtime"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
)
|
||||
|
||||
// ================================================================
|
||||
|
|
|
|||
|
|
@ -22,10 +22,10 @@ package cst
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"mlr/internal/pkg/dsl"
|
||||
"mlr/internal/pkg/lib"
|
||||
"mlr/internal/pkg/runtime"
|
||||
"mlr/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/dsl"
|
||||
"github.com/johnkerl/miller/internal/pkg/lib"
|
||||
"github.com/johnkerl/miller/internal/pkg/runtime"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
)
|
||||
|
||||
type Emit1StatementNode struct {
|
||||
|
|
|
|||
|
|
@ -42,12 +42,12 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
|
||||
"mlr/internal/pkg/cli"
|
||||
"mlr/internal/pkg/dsl"
|
||||
"mlr/internal/pkg/lib"
|
||||
"mlr/internal/pkg/output"
|
||||
"mlr/internal/pkg/runtime"
|
||||
"mlr/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/cli"
|
||||
"github.com/johnkerl/miller/internal/pkg/dsl"
|
||||
"github.com/johnkerl/miller/internal/pkg/lib"
|
||||
"github.com/johnkerl/miller/internal/pkg/output"
|
||||
"github.com/johnkerl/miller/internal/pkg/runtime"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
)
|
||||
|
||||
// ================================================================
|
||||
|
|
|
|||
|
|
@ -9,11 +9,11 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
|
||||
"mlr/internal/pkg/dsl"
|
||||
"mlr/internal/pkg/lib"
|
||||
"mlr/internal/pkg/output"
|
||||
"mlr/internal/pkg/runtime"
|
||||
"mlr/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/dsl"
|
||||
"github.com/johnkerl/miller/internal/pkg/lib"
|
||||
"github.com/johnkerl/miller/internal/pkg/output"
|
||||
"github.com/johnkerl/miller/internal/pkg/runtime"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
)
|
||||
|
||||
// ================================================================
|
||||
|
|
|
|||
|
|
@ -10,10 +10,10 @@ package cst
|
|||
import (
|
||||
"os"
|
||||
|
||||
"mlr/internal/pkg/dsl"
|
||||
"mlr/internal/pkg/lib"
|
||||
"mlr/internal/pkg/runtime"
|
||||
"mlr/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/dsl"
|
||||
"github.com/johnkerl/miller/internal/pkg/lib"
|
||||
"github.com/johnkerl/miller/internal/pkg/runtime"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
)
|
||||
|
||||
type EnvironmentVariableNode struct {
|
||||
|
|
|
|||
|
|
@ -11,10 +11,10 @@ import (
|
|||
"fmt"
|
||||
"os"
|
||||
|
||||
"mlr/internal/pkg/dsl"
|
||||
"mlr/internal/pkg/lib"
|
||||
"mlr/internal/pkg/runtime"
|
||||
"mlr/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/dsl"
|
||||
"github.com/johnkerl/miller/internal/pkg/lib"
|
||||
"github.com/johnkerl/miller/internal/pkg/runtime"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
)
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -19,9 +19,9 @@
|
|||
package cst
|
||||
|
||||
import (
|
||||
"mlr/internal/pkg/dsl"
|
||||
"mlr/internal/pkg/lib"
|
||||
"mlr/internal/pkg/runtime"
|
||||
"github.com/johnkerl/miller/internal/pkg/dsl"
|
||||
"github.com/johnkerl/miller/internal/pkg/lib"
|
||||
"github.com/johnkerl/miller/internal/pkg/runtime"
|
||||
)
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -7,10 +7,10 @@ package cst
|
|||
import (
|
||||
"errors"
|
||||
|
||||
"mlr/internal/pkg/dsl"
|
||||
"mlr/internal/pkg/lib"
|
||||
"mlr/internal/pkg/runtime"
|
||||
"mlr/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/dsl"
|
||||
"github.com/johnkerl/miller/internal/pkg/lib"
|
||||
"github.com/johnkerl/miller/internal/pkg/runtime"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
)
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@
|
|||
package cst
|
||||
|
||||
import (
|
||||
"mlr/internal/pkg/dsl"
|
||||
"mlr/internal/pkg/lib"
|
||||
"github.com/johnkerl/miller/internal/pkg/dsl"
|
||||
"github.com/johnkerl/miller/internal/pkg/lib"
|
||||
)
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -12,12 +12,12 @@ import (
|
|||
"strconv"
|
||||
"strings"
|
||||
|
||||
"mlr/internal/pkg/lib"
|
||||
"mlr/internal/pkg/runtime"
|
||||
"mlr/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/lib"
|
||||
"github.com/johnkerl/miller/internal/pkg/runtime"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
)
|
||||
|
||||
// Most function types are in the mlr/internal/pkg/types package. These types, though,
|
||||
// Most function types are in the github.com/johnkerl/miller/internal/pkg/types package. These types, though,
|
||||
// include functions which need to access CST state in order to call back to
|
||||
// user-defined functions. To avoid a package-cycle dependency, they are
|
||||
// defined here.
|
||||
|
|
|
|||
|
|
@ -7,10 +7,10 @@ package cst
|
|||
import (
|
||||
"errors"
|
||||
|
||||
"mlr/internal/pkg/dsl"
|
||||
"mlr/internal/pkg/lib"
|
||||
"mlr/internal/pkg/runtime"
|
||||
"mlr/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/dsl"
|
||||
"github.com/johnkerl/miller/internal/pkg/lib"
|
||||
"github.com/johnkerl/miller/internal/pkg/runtime"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
)
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ package cst
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"mlr/internal/pkg/colorizer"
|
||||
"mlr/internal/pkg/lib"
|
||||
"github.com/johnkerl/miller/internal/pkg/colorizer"
|
||||
"github.com/johnkerl/miller/internal/pkg/lib"
|
||||
)
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -8,10 +8,10 @@ import (
|
|||
"errors"
|
||||
"math"
|
||||
|
||||
"mlr/internal/pkg/dsl"
|
||||
"mlr/internal/pkg/lib"
|
||||
"mlr/internal/pkg/runtime"
|
||||
"mlr/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/dsl"
|
||||
"github.com/johnkerl/miller/internal/pkg/lib"
|
||||
"github.com/johnkerl/miller/internal/pkg/runtime"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
)
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -10,10 +10,10 @@ import (
|
|||
"fmt"
|
||||
"os"
|
||||
|
||||
"mlr/internal/pkg/dsl"
|
||||
"mlr/internal/pkg/lib"
|
||||
"mlr/internal/pkg/runtime"
|
||||
"mlr/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/dsl"
|
||||
"github.com/johnkerl/miller/internal/pkg/lib"
|
||||
"github.com/johnkerl/miller/internal/pkg/runtime"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
)
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -10,11 +10,11 @@ import (
|
|||
"fmt"
|
||||
"os"
|
||||
|
||||
"mlr/internal/pkg/dsl"
|
||||
"mlr/internal/pkg/lib"
|
||||
"mlr/internal/pkg/output"
|
||||
"mlr/internal/pkg/runtime"
|
||||
"mlr/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/dsl"
|
||||
"github.com/johnkerl/miller/internal/pkg/lib"
|
||||
"github.com/johnkerl/miller/internal/pkg/output"
|
||||
"github.com/johnkerl/miller/internal/pkg/runtime"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
)
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -12,13 +12,13 @@ import (
|
|||
"os"
|
||||
"strings"
|
||||
|
||||
"mlr/internal/pkg/cli"
|
||||
"mlr/internal/pkg/dsl"
|
||||
"mlr/internal/pkg/output"
|
||||
"mlr/internal/pkg/parsing/lexer"
|
||||
"mlr/internal/pkg/parsing/parser"
|
||||
"mlr/internal/pkg/runtime"
|
||||
"mlr/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/cli"
|
||||
"github.com/johnkerl/miller/internal/pkg/dsl"
|
||||
"github.com/johnkerl/miller/internal/pkg/output"
|
||||
"github.com/johnkerl/miller/internal/pkg/parsing/lexer"
|
||||
"github.com/johnkerl/miller/internal/pkg/parsing/parser"
|
||||
"github.com/johnkerl/miller/internal/pkg/runtime"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
)
|
||||
|
||||
// NewEmptyRoot sets up an empty CST, before ingesting any DSL strings. For
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
package cst
|
||||
|
||||
import (
|
||||
"mlr/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
)
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ package cst
|
|||
import (
|
||||
"errors"
|
||||
|
||||
"mlr/internal/pkg/dsl"
|
||||
"github.com/johnkerl/miller/internal/pkg/dsl"
|
||||
)
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@
|
|||
package cst
|
||||
|
||||
import (
|
||||
"mlr/internal/pkg/dsl"
|
||||
"mlr/internal/pkg/lib"
|
||||
"github.com/johnkerl/miller/internal/pkg/dsl"
|
||||
"github.com/johnkerl/miller/internal/pkg/lib"
|
||||
)
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -8,11 +8,11 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
|
||||
"mlr/internal/pkg/dsl"
|
||||
"mlr/internal/pkg/lib"
|
||||
"mlr/internal/pkg/output"
|
||||
"mlr/internal/pkg/runtime"
|
||||
"mlr/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/dsl"
|
||||
"github.com/johnkerl/miller/internal/pkg/lib"
|
||||
"github.com/johnkerl/miller/internal/pkg/output"
|
||||
"github.com/johnkerl/miller/internal/pkg/runtime"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
)
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -7,10 +7,10 @@ package cst
|
|||
import (
|
||||
"container/list"
|
||||
|
||||
"mlr/internal/pkg/cli"
|
||||
"mlr/internal/pkg/dsl"
|
||||
"mlr/internal/pkg/runtime"
|
||||
"mlr/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/cli"
|
||||
"github.com/johnkerl/miller/internal/pkg/dsl"
|
||||
"github.com/johnkerl/miller/internal/pkg/runtime"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
)
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -9,10 +9,10 @@ import (
|
|||
"fmt"
|
||||
"os"
|
||||
|
||||
"mlr/internal/pkg/dsl"
|
||||
"mlr/internal/pkg/lib"
|
||||
"mlr/internal/pkg/runtime"
|
||||
"mlr/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/dsl"
|
||||
"github.com/johnkerl/miller/internal/pkg/lib"
|
||||
"github.com/johnkerl/miller/internal/pkg/runtime"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
)
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -8,10 +8,10 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
|
||||
"mlr/internal/pkg/dsl"
|
||||
"mlr/internal/pkg/lib"
|
||||
"mlr/internal/pkg/runtime"
|
||||
"mlr/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/dsl"
|
||||
"github.com/johnkerl/miller/internal/pkg/lib"
|
||||
"github.com/johnkerl/miller/internal/pkg/runtime"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
)
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
|
||||
"mlr/internal/pkg/dsl"
|
||||
"mlr/internal/pkg/lib"
|
||||
"github.com/johnkerl/miller/internal/pkg/dsl"
|
||||
"github.com/johnkerl/miller/internal/pkg/lib"
|
||||
)
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ import (
|
|||
"fmt"
|
||||
"os"
|
||||
|
||||
"mlr/internal/pkg/dsl"
|
||||
"mlr/internal/pkg/lib"
|
||||
"github.com/johnkerl/miller/internal/pkg/dsl"
|
||||
"github.com/johnkerl/miller/internal/pkg/lib"
|
||||
)
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -7,9 +7,9 @@ package cst
|
|||
import (
|
||||
"errors"
|
||||
|
||||
"mlr/internal/pkg/dsl"
|
||||
"mlr/internal/pkg/lib"
|
||||
"mlr/internal/pkg/runtime"
|
||||
"github.com/johnkerl/miller/internal/pkg/dsl"
|
||||
"github.com/johnkerl/miller/internal/pkg/lib"
|
||||
"github.com/johnkerl/miller/internal/pkg/runtime"
|
||||
)
|
||||
|
||||
// ================================================================
|
||||
|
|
|
|||
|
|
@ -11,13 +11,13 @@ import (
|
|||
"os"
|
||||
"path"
|
||||
|
||||
"mlr/internal/pkg/auxents"
|
||||
"mlr/internal/pkg/cli"
|
||||
"mlr/internal/pkg/climain"
|
||||
"mlr/internal/pkg/lib"
|
||||
"mlr/internal/pkg/platform"
|
||||
"mlr/internal/pkg/stream"
|
||||
"mlr/internal/pkg/transformers"
|
||||
"github.com/johnkerl/miller/internal/pkg/auxents"
|
||||
"github.com/johnkerl/miller/internal/pkg/cli"
|
||||
"github.com/johnkerl/miller/internal/pkg/climain"
|
||||
"github.com/johnkerl/miller/internal/pkg/lib"
|
||||
"github.com/johnkerl/miller/internal/pkg/platform"
|
||||
"github.com/johnkerl/miller/internal/pkg/stream"
|
||||
"github.com/johnkerl/miller/internal/pkg/transformers"
|
||||
)
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
|
||||
"mlr/internal/pkg/cli"
|
||||
"mlr/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/cli"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
)
|
||||
|
||||
type PseudoReaderGen struct {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import (
|
|||
"bufio"
|
||||
"io"
|
||||
|
||||
"mlr/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
)
|
||||
|
||||
const CSV_BOM = "\xef\xbb\xbf"
|
||||
|
|
|
|||
|
|
@ -9,9 +9,9 @@ import (
|
|||
"strconv"
|
||||
"strings"
|
||||
|
||||
"mlr/internal/pkg/cli"
|
||||
"mlr/internal/pkg/lib"
|
||||
"mlr/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/cli"
|
||||
"github.com/johnkerl/miller/internal/pkg/lib"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
)
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -25,9 +25,9 @@ import (
|
|||
"strconv"
|
||||
"strings"
|
||||
|
||||
"mlr/internal/pkg/cli"
|
||||
"mlr/internal/pkg/lib"
|
||||
"mlr/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/cli"
|
||||
"github.com/johnkerl/miller/internal/pkg/lib"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
)
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ import (
|
|||
"strconv"
|
||||
"strings"
|
||||
|
||||
"mlr/internal/pkg/cli"
|
||||
"mlr/internal/pkg/lib"
|
||||
"mlr/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/cli"
|
||||
"github.com/johnkerl/miller/internal/pkg/lib"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
)
|
||||
|
||||
type RecordReaderDKVP struct {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
|
||||
"mlr/internal/pkg/cli"
|
||||
"github.com/johnkerl/miller/internal/pkg/cli"
|
||||
)
|
||||
|
||||
func Create(readerOptions *cli.TReaderOptions) (IRecordReader, error) {
|
||||
|
|
|
|||
|
|
@ -9,9 +9,9 @@ import (
|
|||
|
||||
"encoding/json"
|
||||
|
||||
"mlr/internal/pkg/cli"
|
||||
"mlr/internal/pkg/lib"
|
||||
"mlr/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/cli"
|
||||
"github.com/johnkerl/miller/internal/pkg/lib"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
)
|
||||
|
||||
type RecordReaderJSON struct {
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ import (
|
|||
"strconv"
|
||||
"strings"
|
||||
|
||||
"mlr/internal/pkg/cli"
|
||||
"mlr/internal/pkg/lib"
|
||||
"mlr/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/cli"
|
||||
"github.com/johnkerl/miller/internal/pkg/lib"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
)
|
||||
|
||||
type RecordReaderNIDX struct {
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@ import (
|
|||
"io"
|
||||
"strings"
|
||||
|
||||
"mlr/internal/pkg/cli"
|
||||
"mlr/internal/pkg/lib"
|
||||
"mlr/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/cli"
|
||||
"github.com/johnkerl/miller/internal/pkg/lib"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
)
|
||||
|
||||
type RecordReaderXTAB struct {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import (
|
|||
"fmt"
|
||||
"os"
|
||||
|
||||
"mlr/internal/pkg/platform"
|
||||
"github.com/johnkerl/miller/internal/pkg/platform"
|
||||
)
|
||||
|
||||
// OpenOutboundHalfPipe returns a handle to a process. Writing to that handle
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import (
|
|||
"fmt"
|
||||
"io"
|
||||
|
||||
"mlr/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
)
|
||||
|
||||
func ChannelWriter(
|
||||
|
|
|
|||
|
|
@ -18,9 +18,9 @@ import (
|
|||
"io"
|
||||
"os"
|
||||
|
||||
"mlr/internal/pkg/cli"
|
||||
"mlr/internal/pkg/lib"
|
||||
"mlr/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/cli"
|
||||
"github.com/johnkerl/miller/internal/pkg/lib"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
)
|
||||
|
||||
// ================================================================
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package output
|
|||
import (
|
||||
"io"
|
||||
|
||||
"mlr/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
)
|
||||
|
||||
// IRecordWriter is the abstract interface for all record-writers. They are
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@ import (
|
|||
"io"
|
||||
"strings"
|
||||
|
||||
"mlr/internal/pkg/cli"
|
||||
"mlr/internal/pkg/colorizer"
|
||||
"mlr/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/cli"
|
||||
"github.com/johnkerl/miller/internal/pkg/colorizer"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
)
|
||||
|
||||
type RecordWriterCSV struct {
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ import (
|
|||
"io"
|
||||
"strings"
|
||||
|
||||
"mlr/internal/pkg/cli"
|
||||
"mlr/internal/pkg/colorizer"
|
||||
"mlr/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/cli"
|
||||
"github.com/johnkerl/miller/internal/pkg/colorizer"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
)
|
||||
|
||||
type RecordWriterCSVLite struct {
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@ import (
|
|||
"bytes"
|
||||
"io"
|
||||
|
||||
"mlr/internal/pkg/cli"
|
||||
"mlr/internal/pkg/colorizer"
|
||||
"mlr/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/cli"
|
||||
"github.com/johnkerl/miller/internal/pkg/colorizer"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
)
|
||||
|
||||
type RecordWriterDKVP struct {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
|
||||
"mlr/internal/pkg/cli"
|
||||
"github.com/johnkerl/miller/internal/pkg/cli"
|
||||
)
|
||||
|
||||
func Create(writerOptions *cli.TWriterOptions) (IRecordWriter, error) {
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ import (
|
|||
"io"
|
||||
"os"
|
||||
|
||||
"mlr/internal/pkg/cli"
|
||||
"mlr/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/cli"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
)
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@ import (
|
|||
"io"
|
||||
"strings"
|
||||
|
||||
"mlr/internal/pkg/cli"
|
||||
"mlr/internal/pkg/colorizer"
|
||||
"mlr/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/cli"
|
||||
"github.com/johnkerl/miller/internal/pkg/colorizer"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
)
|
||||
|
||||
type RecordWriterMarkdown struct {
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import (
|
|||
"bytes"
|
||||
"io"
|
||||
|
||||
"mlr/internal/pkg/cli"
|
||||
"mlr/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/cli"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
)
|
||||
|
||||
type RecordWriterNIDX struct {
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ import (
|
|||
"strings"
|
||||
"unicode/utf8"
|
||||
|
||||
"mlr/internal/pkg/cli"
|
||||
"mlr/internal/pkg/colorizer"
|
||||
"mlr/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/cli"
|
||||
"github.com/johnkerl/miller/internal/pkg/colorizer"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
)
|
||||
|
||||
type RecordWriterPPRINT struct {
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@ import (
|
|||
"io"
|
||||
"unicode/utf8"
|
||||
|
||||
"mlr/internal/pkg/cli"
|
||||
"mlr/internal/pkg/colorizer"
|
||||
"mlr/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/cli"
|
||||
"github.com/johnkerl/miller/internal/pkg/colorizer"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
)
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -3,9 +3,8 @@
|
|||
// over the top of GOCC codegen so that we can customize handling of error
|
||||
// messages.
|
||||
//
|
||||
// Source: src/parsing/errors.go.template
|
||||
// Destination:
|
||||
// src/parsing/errors/errors.go
|
||||
// Source: internal/pkg/parsing/errors.go.template
|
||||
// Destination: internal/pkg/parsing/errors/errors.go
|
||||
// ================================================================
|
||||
|
||||
package errors
|
||||
|
|
@ -14,7 +13,7 @@ import (
|
|||
"fmt"
|
||||
"strings"
|
||||
|
||||
"mlr/src/parsing/token"
|
||||
"github.com/johnkerl/miller/internal/pkg/parsing/token"
|
||||
)
|
||||
|
||||
type ErrorSymbol interface {
|
||||
|
|
|
|||
|
|
@ -3,9 +3,8 @@
|
|||
// over the top of GOCC codegen so that we can customize handling of error
|
||||
// messages.
|
||||
//
|
||||
// Source: src/parsing/errors.go.template
|
||||
// Destination:
|
||||
// src/parsing/errors/errors.go
|
||||
// Source: internal/pkg/parsing/errors.go.template
|
||||
// Destination: internal/pkg/parsing/errors/errors.go
|
||||
// ================================================================
|
||||
|
||||
package errors
|
||||
|
|
@ -14,7 +13,7 @@ import (
|
|||
"fmt"
|
||||
"strings"
|
||||
|
||||
"mlr/internal/pkg/parsing/token"
|
||||
"github.com/johnkerl/miller/internal/pkg/parsing/token"
|
||||
)
|
||||
|
||||
type ErrorSymbol interface {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ package lexer
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"mlr/internal/pkg/parsing/token"
|
||||
"github.com/johnkerl/miller/internal/pkg/parsing/token"
|
||||
)
|
||||
|
||||
type ActionTable [NumStates]ActionRow
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import (
|
|||
"io/ioutil"
|
||||
"unicode/utf8"
|
||||
|
||||
"mlr/internal/pkg/parsing/token"
|
||||
"github.com/johnkerl/miller/internal/pkg/parsing/token"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@
|
|||
// interface{}/error since they are meant for nesting as arguments here
|
||||
// within this file.
|
||||
//
|
||||
// * Please see src/dsl/ast*.go for more about what the <<...>>
|
||||
// * Please see internal/pkg/dsl/ast*.go for more about what the <<...>>
|
||||
// code here is calling.
|
||||
// ================================================================
|
||||
|
||||
|
|
@ -326,7 +326,7 @@ panic : '%' '%' '%' 'p' 'a' 'n' 'i' 'c' '%' '%' '%' ;
|
|||
// ================================================================
|
||||
|
||||
// Import the AST/ASTNode types and functions
|
||||
<< import "mlr/internal/pkg/dsl" >>
|
||||
<< import "github.com/johnkerl/miller/internal/pkg/dsl" >>
|
||||
|
||||
// ================================================================
|
||||
// TOP-LEVEL PRODUCTION RULE FOR THE MILLER DSL
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ import (
|
|||
"fmt"
|
||||
"strings"
|
||||
|
||||
parseError "mlr/internal/pkg/parsing/errors"
|
||||
"mlr/internal/pkg/parsing/token"
|
||||
parseError "github.com/johnkerl/miller/internal/pkg/parsing/errors"
|
||||
"github.com/johnkerl/miller/internal/pkg/parsing/token"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
package parser
|
||||
|
||||
import "mlr/internal/pkg/dsl"
|
||||
import "github.com/johnkerl/miller/internal/pkg/dsl"
|
||||
|
||||
type (
|
||||
ProdTab [numProductions]ProdTabEntry
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
|
||||
"mlr/internal/pkg/lib"
|
||||
"mlr/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/lib"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
)
|
||||
|
||||
// ================================================================
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@
|
|||
package runtime
|
||||
|
||||
import (
|
||||
"mlr/internal/pkg/lib"
|
||||
"mlr/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/lib"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
)
|
||||
|
||||
type State struct {
|
||||
|
|
|
|||
|
|
@ -5,11 +5,11 @@ import (
|
|||
"io"
|
||||
"os"
|
||||
|
||||
"mlr/internal/pkg/cli"
|
||||
"mlr/internal/pkg/input"
|
||||
"mlr/internal/pkg/output"
|
||||
"mlr/internal/pkg/transformers"
|
||||
"mlr/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/cli"
|
||||
"github.com/johnkerl/miller/internal/pkg/input"
|
||||
"github.com/johnkerl/miller/internal/pkg/output"
|
||||
"github.com/johnkerl/miller/internal/pkg/transformers"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
)
|
||||
|
||||
// Since Go is concurrent, the context struct (AWK-like variables such as
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ package transformers
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"mlr/internal/pkg/cli"
|
||||
"mlr/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/cli"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
"os"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ package transformers
|
|||
import (
|
||||
"os"
|
||||
|
||||
"mlr/internal/pkg/cli"
|
||||
"mlr/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/cli"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
)
|
||||
|
||||
// IRecordTransformer is the interface satisfied by all transformers, i.e.,
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import (
|
|||
"fmt"
|
||||
"os"
|
||||
|
||||
"mlr/internal/pkg/colorizer"
|
||||
"mlr/internal/pkg/lib"
|
||||
"github.com/johnkerl/miller/internal/pkg/colorizer"
|
||||
"github.com/johnkerl/miller/internal/pkg/lib"
|
||||
)
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ import (
|
|||
"strconv"
|
||||
"strings"
|
||||
|
||||
"mlr/internal/pkg/cli"
|
||||
"mlr/internal/pkg/types"
|
||||
"github.com/johnkerl/miller/internal/pkg/cli"
|
||||
"github.com/johnkerl/miller/internal/pkg/types"
|
||||
)
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue