miller/internal/pkg/parsing
John Kerl ae61dc5a4f
Fix precedence of coalesce operators ?? and ??? (#1270)
* Fix precedence of coalesce operators

* GOCC codegen

* unit-test updates

* operator-precedence documentation

* doc-build artifacts
2023-04-15 23:33:49 -04:00
..
errors Continue #856 (#865) 2022-01-11 19:42:08 -05:00
lexer Fix precedence of coalesce operators ?? and ??? (#1270) 2023-04-15 23:33:49 -04:00
parser Fix precedence of coalesce operators ?? and ??? (#1270) 2023-04-15 23:33:49 -04:00
token Fix precedence of coalesce operators ?? and ??? (#1270) 2023-04-15 23:33:49 -04:00
util Standardize Go-package structure (#746) 2021-11-11 14:15:13 -05:00
doc.go Standardize Go-package structure (#746) 2021-11-11 14:15:13 -05:00
errors.go.template Fix typo: columnn -> column (#856) 2022-01-10 19:55:35 -05:00
mlr.bnf Fix precedence of coalesce operators ?? and ??? (#1270) 2023-04-15 23:33:49 -04:00
README.md Support more backslashed special characters in DSL strings (#1212) 2023-03-01 01:00:25 -05: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 internal/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 internal/pkg/parsing internal/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.