Repository navigation
CHANGES:
- [BREAKING] Add
~aheadtopeek_charto read the byte after the next one without a backtracking frame; code that passespeek_charas aunit -> char optionvalue needsfun () -> peek_char ()(#162) (@davesnx) - [FEATURE] Show the last line with text above an error at end of input in
render_error, instead of the blank lines after it (#163) (@davesnx) - [FEATURE] Add
expected_token ?help ?notes ~upto label, which fails with anExpecteditem that covers a whole token: it merges with other expected items inor_, andexpectrelabels it (#159) (@davesnx) - [FEATURE] Make
Parseff.Iterstable, add~at_mosttoIter.take_while, and addSlice.blit(#156) (@davesnx) - [FEATURE] Add
Slice.of_string,Slice.equalandSlice.hash, soHashtbl.Make (Slice)finds a slice of the input without allocating (#152) (@davesnx) - [PERF] Run
peek_with,look_aheadandnot_followed_bywith one exception handler instead of two: about 19 fewer instructions per call (#157) (@davesnx) - [PERF] Scan a
Charset8 bytes at a time when it excludes the bytes below a threshold and up to four more, such as HTTP field values, JSON string bodies and CSV fields: 16–45% fewer cycles fortake_while ~seton fields of 4 to 128 bytes (#155) (@davesnx) - [PERF] Parse on several domains without slowing each other down: CPU time per domain at 64 domains drops from 11 s to 0.11 s on the benchmark in the PR (#151) (@davesnx)
- [PERF] Scan a
Charsetthat excludes one or two bytes, such asfun c -> c <> ';', 8 bytes at a time intake_while,skip_while,Slice.take_whileandIter.take_while(#150) (@davesnx) - [PERF] Scan the input directly in
Iter.take_whileinstead of through a closure built on every call: 6 fewer minor words per call, and 17–22% faster per byte with~seton stock OCaml (#149) (@davesnx) - [DOCS] Fail with
expected_tokenat the Lua example's token mismatches, and document thatlexeme's trivia must record no failures (#164) (@davesnx) - [DOCS] Add a single-pass version of the sedlex example's language, with the same errors (#161) (@davesnx)
- [DOCS] Make the Lua example clearer: one gap record, rewinds in the lexer, guarded symbol readers (#160) (@davesnx)
- [DOCS] Parse the Lua example in a single pass: 12.5% fewer instructions on a 20 MB file (#158) (@davesnx)
- [DOCS] Pin odoc to the markdown fixes of ocaml/odoc#1528 and drop the scripts that worked around them (#153) (@davesnx)
- [DOCS] Add an example that lexes with sedlex and parses the tokens with parseff (#144) (@davesnx)
- [CHORE] Compile the tests on OxCaml 5.4.0-ox9: eta-expand
Buffer.add_stringin theIter.manyrecovery test (#148) (@davesnx) - [CHORE] Format with ocamlformat 0.30.0, and require 0.30.x (7a0a438) (@davesnx)