• jq as a PEG engine
  • Table of Contents
  • Transcribing a PEG grammar to jq
  • Example 0: Balanced Square Brackets
  • Example 1: a^n b^n c^n : n >= 1
  • Recognition
  • Tokenization
  • Declare-before-use
  • Example 2: arithmetic
  • Evaluation
  • Example 3: [a-z]+ing
  • Example 4: CSV-to-JSON
  • Appendix - Helper Functions