miller/pkg/parsing
Adam Lesperance 085e831668
The package version must match the major tag version (#1654)
* Update package version

* Update makefile targets

* Update readme packages

* Remaining old packages via rg/sd
2024-09-20 12:10:11 -04:00
..
errors The package version must match the major tag version (#1654) 2024-09-20 12:10:11 -04:00
lexer The package version must match the major tag version (#1654) 2024-09-20 12:10:11 -04:00
parser The package version must match the major tag version (#1654) 2024-09-20 12:10:11 -04:00
token Export library code in pkg/ (#1391) 2023-09-10 17:15:13 -04:00
util Export library code in pkg/ (#1391) 2023-09-10 17:15:13 -04:00
doc.go Export library code in pkg/ (#1391) 2023-09-10 17:15:13 -04:00
errors.go.template The package version must match the major tag version (#1654) 2024-09-20 12:10:11 -04:00
mlr.bnf The package version must match the major tag version (#1654) 2024-09-20 12:10:11 -04:00
README.md Export library code in pkg/ (#1391) 2023-09-10 17:15:13 -04:00

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 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 pkg/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. (BNF is for Backus-Naur Form which is the phrasing of the grammar file that GOCC support.) See the top-level miller/go build scripts for how to rerun GOCC. As of this writing, it's

gocc -o pkg/parsing pkg/parsing/mlr.bnf

as invoked from the repo base directory -- however you should instead use

tools/build-dsl

Making changes to mlr.bnf requires several minutes to re-run GOCC. For experimental changes, please see the experiments directory.