Convert CSV records to TSV: Difference between revisions
Content added Content deleted
(→jq: gojq has been updated) |
(→jq: typo) |
||
Line 189: | Line 189: | ||
closely to jq operators, notably PEG's '/' to jq's '//'. |
closely to jq operators, notably PEG's '/' to jq's '//'. |
||
In translating the PEG grammar to a jq program, the main idea is define a |
In translating the PEG grammar to a jq program, the main idea is to define a |
||
pipeline for each grammar rule. A JSON object with keys "remainder" and |
pipeline for each grammar rule. A JSON object with keys "remainder" and |
||
"result" is passed through this pipeline, consuming the text in .remainder and |
"result" is passed through this pipeline, consuming the text in .remainder and |