miller/pkg/parsing/README.md
John Kerl af1adf80ad
Replace GOCC parser-generator with PGPG (#2015)
* Porting

* Update some tests that depend on AST-print output

* iterating on GOCC -> PGPG

* iterating

* iterating

* iterating

* iterating

* iterating

* Modify expout files that need only AST-print-syntax updates

* iterating

* iterating

* iterating

* iterating

* iterating

* iterating

* iterating

* iterating

* iterating

* iterating

* iterating

* sync test cases from mlr-6.17.0, except AST-prints ...

* sync test cases from mlr-6.17.0, except AST-prints ...

* Fix lashed emit for $* and @*

* Fix --1 and ++1 chained unary ops

* Emit with function callsite

* test cases

* dot operator

* M_PI and M_E

* Iterating on lashed emit cases

* error-wording differences

* rm some should-fail files

* Fix issue with leading semicolon

* trailing comma in func params; most AST-print deltas

* error-wording delta

* fix unset all

* AST-print deltas

* go mod tidy: forced `go 1.25` to `go 1.25.0`

* Depend on PGPG v1.0.0

* Fix Windows CI failure

* Remove cmd/experiments/dsl_parser

* GOCC -> PGPG

* neaten

* Fix regex issue found in doc gen
2026-03-15 22:28:57 -04:00

804 B

This directory contains a single source file, mlr.bnf, which is the lexical/semantic grammar file for the Miller put/filter DSL (domain-specific language) using the PGPG framework. (In a classical Lex/Yacc framework, there would be separate mlr.l and mlr.y files; using PGPG, there is a single mlr.bnf file.)

All subdirectories of pkg/parsing/ are autogen code created by PGPG's processing of mlr.bnf. They are nonetheless committed to source control, since running PGPG takes a bit longer than the go build does, and the BNF file doesn't often change. (BNF is for Backus-Naur Form which is the phrasing of the grammar file that PGPG support.)

Run tools/build-dsl from the repo root to regenerate the lexer and parser.