Skip to content

Latest commit

 

History

History
89 lines (88 loc) · 5.63 KB

ROADMAP.md

File metadata and controls

89 lines (88 loc) · 5.63 KB

ROADMAP

  • api: add api to operate slice comparison, copy and length.
  • api: print error messages for Human.
  • api: Run in VERBOSE mode.
  • api: Add traverse functions for Tokens.
  • api: save backreference in source stack so it can be used outside a sequence.
  • api: Except (Any but).
  • api: Until.
  • api: take a look at ohm.
  • api: Sanitize \u0000 to whitespace for the source input, this happens in creating the source/setting the source size.
  • api: left recursion. https://github.com/orlandohill/peg-left-recursion
  • api: register a function for matching source. This should help dealing with some inputs difficult to parse.
  • api: Support UTF-8 BOM sequence (0xEF 0xBB 0xBF) at the start of source.
  • peg: Numeric.
  • peg: Complement.
  • peg: Panic.
  • peg: Function.
  • peg: Sub Grammar.
  • peg: Stop on first error v/s Recover from Panic.
  • peg: left recursive: https://tratt.net/laurie/research/pubs/html/tratt__direct_left_recursive_parsing_expression_grammars/
  • perf: pre-alloc tokens.
  • perf: Cache literal len.
  • perf: backrefs is not necessary if there is no BackReference in Sequence.
  • perf: trace: add a tracer in P4_Source. When matching, annotate the tracer. An additional tool can aggregate data and output a DOT / compile to png.
  • perf: tracer: https://pegjs.org/documentation https://github.com/orlandohill/peg-left-recursion
  • binding: python: example: cffi, misaka, parsimonious (api). https://tomassetti.me/parsing-in-python/.
  • tests: benchmark: example: json-c. valgrind --tool=massif --massif-out-file=massif.out ./build/tests/test_example_json && ms_print massif.out ms_print.out.
  • tests: Enable AddressSanitizer. Example: cJSON.
  • tests: Add a fuzzy testing framework.
  • docs: read A parsing machine for PEGs.
  • docs: landing page for the project doc site.
  • docs: example: brainfuck https://en.wikipedia.org/wiki/Brainfuck
  • lang: python grammar.
  • lang: ES5 grammar: https://ohmlang.github.io/editor/#0a9a649c3c630fd0a470ba6cb75393fe
  • lang: zig grammar: https://ziglang.org/documentation/master/#Grammar
  • lang: awk grammar: https://github.com/onetrueawk/awk/blob/master/lex.c https://github.com/onetrueawk/awk/blob/master/awkgram.y
  • lang: sql grammar: https://tomassetti.me/parsing-sql/
  • lang: A binary executable for display parsed results in JSON output. The executable can support general programming languages, such as Mustache, Python, JSON, YAML, etc. Some other programs can then takes the input from stdin and do some fancy work. p4 parse --lang=py38 source.py
  • Pratt parser: https://en.wikipedia.org/wiki/Operator-precedence_parser
  • build: static lib.
  • build: wasm. docker run --rm -v $(pwd):/src -u $(id -u):$(id -g) emscripten/emsdk emcc peppapeg.c -Os -s WASM=1 -s SIDE_MODULE=1 -o /src/peppapeg.wasm. https://gist.github.com/kripken/59c67556dc03bb6d57052fedef1e61ab https://github.com/mbasso/awesome-wasm
  • api: support comment in peg grammar. Added in v1.12.0.
  • peg: CharacterSet. can use range.
  • peg: extend range: [0-9..2] / [a-z] / [\p{L}] / [\u{1}-\u{10ffff}]. Added in v1.12.0.
  • peg: built-in rules: letters.
  • peg: built-in rules: unicode letters.
  • peg: built-in rules: digits.
  • peg: built-in rules: unicode digits.
  • api: Support more spaced rules. Added in v1.11.0.
  • api: P4_AcquireSourceAst(source, &ast): set ast, reset source. It's useful when we need the parsed result but not care about source itself. Token tree should now owned by ast and shall then be free by the caller. Added in v1.11.0
  • docs: add explanations.
  • GetErrorString.
  • Reset source so it can be re-parsed. Added in v1.11.0.
  • P4_InspectSourceAst(tok, bool (f) (tok)). Example: https://golang.org/pkg/go/ast/#Inspect. Added in v1.11.0.
  • Allow replacing malloc/free functions. Added in v1.11.0.
  • Custom allocator and destructor. # define P4_MALLOC malloc. Added in v1.11.0.
  • Add tutorials (json, mustache, ini) in docs.
  • Add how-to guides in docs.
  • any: .. Added in v1.9.0.
  • Report line num & col. Added in v1.9.0.
  • Support partial source: P4_SetSourceContentSlice(s, i, j). Added v1.9.0.
  • Allow user setting Userdata for P4_Tokens. Added in v1.8.0.
  • Support non-ascii case insensitive literal matching. Added in v1.8.0.
  • Print token ast in json format. Added in v1.8.0.
  • GetErrorString. Added in v1.7.0.
  • Join. Added in v1.7.0.
  • Start-of-Input & End-of-Input. Added in v1.7.0.
  • Range stride. Added in v1.7.0.
  • Token only have expr id, no expr. Added in v1.6.0.
  • Return NullError for CreatePositive/CreateNegative/... Added in v1.6.0.
  • build & test via github workflow ci. Added in v1.6.0
  • Dynamically change grammar rules. Added in v1.3.0 via Callback.
  • Case insensitive BackReference. Added in v1.5.0.
  • Create docs and push it to gh-pages branch. Added in v1.5.0.
  • Add doxygen references in docs. Added in v1.5.0.
  • Callbacks for P4_Token. Added in v1.4.0.
  • Example JSON: rfc7159. Added in v1.4.0.
  • Auto generate documentation for functions and defined macros. Example: doxygen. Added in v1.4.0.
  • NeedLoosen, NeedSquash, NeedLift should be well-tested.
  • Add depth setter. Added in v1.3.0.
  • Cache squash. Added in v1.3.0.
  • Cache loosen. Added in v1.3.0.
  • Add Valgrind to the tests. Added in v1.3.0.
  • New Expression Kind: BackReference. Added in v1.2.0.
  • Add Flag Set/Unset functions. Added in v1.1.0.
  • INI parser example. Added in v1.1.0.
  • Flag SPACED. Added in v1.0.0.