Repository navigation
0.6.0
CHANGES:
- [BREAKING]
fail,errorandwarnraiseInvalid_argumenton a note whoseathas a negativestartorstop, and swapstartandstopwhenstart > stop, as they do for~fromand~upto;render_errorprinted such notes at the wrong place (#141) (@davesnx) - [BREAKING] Add
Push.cancelto end an unfinished push parse and release itsRefcells and~diagnosticscollector;Push.parse_eachreturns itspushfunction with acancelfunction, takes?pendingasSource.parse_eachdoes, and its steps use the names ofPush.parse:Need_inputisAwaitandError_ofisError(#139) (@davesnx) - [BREAKING] End
Source.parse_eachwithErrorwhen a~pendingrun consumes no input twice in a row at the same position, so apendingthat never returnsfalsecannot make the sequence endless;Push.parse_eachfollows the same rule (#139) (@davesnx) - [BREAKING] Raise
Invalid_argumenton invalid arguments instead of clamping them: a negative~at_leastontake_while,many,sep_by,end_by,Iter.many,Iter.sep_by,whitespace,Utf8.take_whileandUtf8.whitespace; a~max_depthbelow 1 onparse,Source.parse,Source.parse_each,Push.parseandPush.parse_each; a negative~fromor~uptoonfail,errorandwarn; a negativenoncount; and aposoutside the input onlocation_of_position(#138) (@davesnx) - [BREAKING]
skip_nestedcloses a pair with the same opening and closing byte, such as('"', '"'), when that byte matches the innermost open bracket, instead of opening a new level each time (#138) (@davesnx) - [BREAKING] Keep the bytes
Source.parseandSource.parse_eachread but did not consume, so the next parse of the same source starts after the consumed input, where the parser failed after anError, or where it was when an exception left it;Source.of_stringcontinues the same way instead of restarting at offset 0, andSource.offsetgives the absolute offset where the next parse starts (#131) (@davesnx) - [BREAKING] Read diagnostics in source order:
Diagnostics.to_listand theinnerlist given to~keepsort bypos, and entries at the same position keep the order they were recorded in (#128) (@davesnx) - [BREAKING] Name every runner
parse:parse_sourceisSource.parse, and the push runners move into the new modulePush(#113) (@davesnx) - [BREAKING] Polish the API: combinators run with no trailing
(), spans move intoSlice,fold_leftandfold_righttake?otherwisefirst, andliteraltakes?case_sensitive(#112) (@davesnx) - [BREAKING] Change the error and recovery API before 1.0:
recover,requireandlistuse the collector of the runner,Limit_exceededis anerror_kind, andlocation.colisbyte_col(#110) (@davesnx) - [BREAKING] Let
warnrecord acustom_errorinto the collector of the runner, so a recovering parser can warn;warn_atis removed (#102) (@davesnx) - [BREAKING] Remove
regexandmatch_regex, and drop theredependency (#100) (@davesnx) - [BREAKING] Rename
consumetoliteraland returnunit(#98) (@davesnx) - [BREAKING] Settle the API before 1.0:
failbacktracks aserrordoes,spanis abstract,locationis private,digitreturns achar,satisfytakes?labelfirst,FailureisFailed,skip_while_then_charandfused_sep_takeare removed, and errors compare by their fields; also addPush,Iter.many,Iter.take,within,?at_most,Source.of_bigstring_chunks,requireandlist(#76) (@davesnx) - [FEATURE] Group the streaming combinators in
Parseff.Iter:Iter.many,Iter.sep_by,Iter.takeandIter.take_while, with oneunstablealert on the module (#137) (@davesnx) - [FEATURE] Make
~at_moststable ontake_while,take_until,skip_untilandmany: exceeding it fails withLimit_exceeded { limit = at_most }, never a silent cap, and the failure is fatal likecut (); fail, so an enclosingor_,optionalor repetition does not try another option (look_ahead,peek_withandcapturestill stop it, as they stopcut);take_untilandskip_untilgiveLimit_exceededwhenever more thanat_mostbytes remain without the terminator;at_most < 0orat_most < at_leastraisesInvalid_argument(#142) (@davesnx) - [FEATURE] Add
?at_mosttoSlice.take_while,skip_while,Utf8.take_while,Utf8.Slice.take_while,Utf8.skip_while,sep_byandend_by, counting bytes, code points or elements as their?at_leastdoes (#142) (@davesnx) - [FEATURE] Add
?at_leastand?labeltoSlice.take_while,skip_while,Utf8.Slice.take_whileandUtf8.skip_while, failing astake_whileandUtf8.take_whiledo and raisingInvalid_argumenton a negative~at_least(#140) (@davesnx) - [FEATURE] Make
Push.parse,Push.feedandPush.finishstable, keep the chunks not yet fed afterDonein thePushexample, and state what 0.x releases promise and how to show theunstablealert (#127) (@davesnx) - [FEATURE] Add
Push.parse_each, a push parse of a stream of values in one fiber (#111) (@davesnx) - [FEATURE] Add
not_followed_by(#107) (@davesnx) - [FEATURE] Pass a
Charsettotake_while,skip_while,Slice.take_whileandIter.take_whileas?set(#104) (@davesnx) - [FEATURE] Add
identifierandis_ident_char(#103) (@davesnx) - [FEATURE] Add
take_untilandskip_untilfor a string terminator (#97) (@davesnx) - [FEATURE] Recover only where no open choice surrounds the recovery, and make the recovery functions stable:
listreplacessep_by_recover,~keepreplacescapture_withand~record, and~contextsreplaces~outer(#95) (@davesnx) - [FEATURE] Add
~recordtorecoverandsep_by_recover, and~outertocaptureandrecover(#70) (@davesnx) - [FEATURE] Add
?initial_buffer_sizetoSource.of_function, and grow its read buffer at the next read (#57) (@davesnx) - [FEATURE] Add
~releasetocaptureandrecover:commitandcutmove the rewind point (#56) (@davesnx) - [FEATURE] Add
context ~start(#55) (@davesnx) - [FEATURE] Add
capture_withand document the rule for recorded errors (#54) (@davesnx) - [FEATURE] Add
sep_by_recoverandskip_nestedfor lists that recover per element (#53) (@davesnx) - [FEATURE] Add
peek_withandskip_to: read a lookahead token once (#52) (@davesnx) - [FEATURE] Add
precedence: operator precedence with one lookup per operand (#51) (@davesnx) - [FEATURE] Add
?pendingtoSource.parse_eachfor a value held in a lookahead (#50) (@davesnx) - [FEATURE] Add
~helptofailanderror, printed as a help line byrender_error(#49) (@davesnx) - [FEATURE] Add
?uptotofailanderror(#48) (@davesnx) - [FEATURE] Rename the
atomargument ofexpressiontooperand(#42) (@davesnx) - [FEATURE] Rename
int,floatandhex_inttointeger,numberandhex_integer(#39) (@davesnx) - [FEATURE] Add
Ref, arefthat rolls back when the parser backtracks (#33) (@davesnx) - [FEATURE] Add
expression, an operator table for precedence parsing (#32) (@davesnx) - [FEATURE] Add
int,floatandhex_int(#31) (@davesnx) - [FEATURE] Add trace mode for context events (#30) (@davesnx)
- [FEATURE] Add
with_range,recognizeandSlice.recognize(#29) (@davesnx) - [FEATURE] Add
Source.parse_eachto parse many values from one source (#28) (@davesnx) - [FEATURE] Add
lexemeandkeyword(#27) (@davesnx) - [FEATURE] Add
any_uint32,any_varintandSlice.take(#26) (@davesnx) - [FEATURE] Add
captureandrecoverfor error recovery (#24) (@davesnx) - [FIX] Run the tests without
perlorsh, and print float exponents the same on Windows (#143) (@davesnx) - [FIX]
many ~at_mostreportsLimit_exceeded { limit = at_most }after arecoverinside an element replays the loop, instead of the limit left over from the replay (#142) (@davesnx) - [FIX] A failed
skip_untilleaves the position at the same place inparse,Source.parseandPush.parse, so traceFailevents agree across runners (#142) (@davesnx) - [FIX]
render_errorprintshelp: raise ~max_depthfor arec_depth error when~max_depthequals thefold_rightstack limit (#138) (@davesnx) - [FIX] Stop
expressionfrom looping when one level lists the same operator value twice and that operator fails after it reads its token (#135) (@davesnx) - [FIX] A
commitin a nestedexpressionoperator fails only that operator, so the enclosing operator tries the next one, as property fuzzing found (#126) (@davesnx) - [FIX] Fix commit sealing and error positions found by property fuzzing: a
commitinfold_rightor in a required element ofmanyno longer seals the wrong frame (#121) (@davesnx) - [FIX] Read the longest valid number in
number, and fail when it is out of float range (#99) (@davesnx) - [FIX] Stop reading buffer bytes after the input when a stream error is built (#74) (@davesnx)
- [FIX] Keep the error inside the excerpt of a long line with invalid UTF-8 (#73) (@davesnx)
- [FIX] Read through the read buffer in
match_regexon a stream (#72) (@davesnx) - [FIX] Print line and column in
render_errorwhen a stream error starts in dropped input (#69) (@davesnx) - [FIX] Keep the bytes of a regex read-ahead when a read raises (#67) (@davesnx)
- [FIX] Keep line and column in stream errors after the line start is dropped (#47) (@davesnx)
- [FIX] Skip a prefix operator that commits and consumes no input (#41) (@davesnx)
- [FIX] Stop
expressionwhen aninfix_rightoperator and operand consume no input (#40) (@davesnx) - [FIX] Read more input in streaming
match_regexinstead of returning a cut match (#38) (@davesnx) - [FIX] Stop
fold_rightwhen the operator and element consume no input (#37) (@davesnx) - [FIX] Check the range of a span in
Slice.to_string(#34) (@davesnx) - [FIX] Count terminal cells for
render_errorcarets (#21) (@davesnx) - [PERF] Rescan only the frames that changed when a stream refills, so streaming a long
infix_rightchain no longer takes quadratic time (#136) (@davesnx) - [PERF] Cut the cost of a streaming parse that ends in the first chunk (#105) (@davesnx)
- [PERF] Defer the line index when a read drops ASCII input (#96) (@davesnx)
- [PERF] Cut the cost of each read in a stream: a 462-byte head in 2 chunks runs 20,591 instructions, down from 24,281 (#92) (@davesnx)
- [PERF] Keep a short streaming input on the minor heap (#66) (@davesnx)
- [PERF] Make
precedencecheaper: reuse the lookup frame and skip the restore when the lookup changed nothing (#65) (@davesnx) - [PERF] Take chunks straight into the input, without a read buffer (#64) (@davesnx)
- [PERF] Record one undo entry per
Refcell and frame instead of one per set (#46) (@davesnx) - [PERF] Read into spare room, so a stream does not copy all kept input on each read: 8 MB kept in 4 KB reads takes 0.016 s, down from 1.3 s (#45) (@davesnx)
- [PERF] Inline six primitives at call sites, and require odoc 3.2.1 for the docs (#44) (@davesnx)
- [PERF] Reduce the cost of the generic combinators (#35) (@davesnx)
- [DOCS] Fix the website's links between doc pages, and fail the build on a broken link (#145) (@davesnx)
- [DOCS] List error recovery as its own feature in the README and quick start (#146) (@davesnx)
- [DOCS] Document the
takewindow limit, and that a failure at end of input loses recovered values (#132) (@davesnx) - [DOCS] Document the zero-width prefix rule and fuzz committing prefix tokens (#125) (@davesnx)
- [DOCS] Render og:images in a static endpoint of the website, so the docs base needs no HTML rewrite (#123) (@davesnx)
- [DOCS] Generate the API pages through
fix-odoc-md.shinstead of a copiedsedin each dune rule (#122) (@davesnx) - [DOCS] Resolve odoc page links and same-site URLs per docs version (#115) (@davesnx)
- [DOCS] Tighten and sync the documentation across
parseff.mli, the API pages, the guides and the website (#114) (@davesnx) - [DOCS] Document when to use
commitand when to usecut(#109) (@davesnx) - [DOCS] Say that
expressionandprecedencehave their own loops, and when to use each (#108) (@davesnx) - [DOCS] Document
cutandcommit,listedge cases, recovering expressions and a failingsyncin the recovery guide (#101) (@davesnx) - [DOCS] Port the HTTP rules of ache into the example (#93) (@davesnx)
- [DOCS] Add the migration guide from 0.5 (#90) (@davesnx)
- [DOCS] Say that a domain runs one parse at a time, and that system threads on one domain are not supported (#78) (@davesnx)
- [DOCS] Correct the docs for the functions added since 0.5.0 (#75) (@davesnx)
- [DOCS] Document the cost of
peek_withandskip_toagainst a token kept by hand (#71) (@davesnx) - [DOCS] Add a Lua 5.4 parser example with error recovery (#43) (@davesnx)
- [DOCS] Fix website code spans that contain a backtick (#36) (@davesnx)
- [DOCS] Add the error recovery guide (#25) (@davesnx)
- [DOCS] Remove the remaining effects claims from docs, tests and examples (#20) (@davesnx)
- [CHORE] Reject malformed input in the fused arithmetic bench, explain the cross-domain state cache, and drop dead
fix-odoc-md.shrules (#120) (@davesnx) - [CHORE] Remove code comments: tautologies, stale notes and workaround excuses (#119) (@davesnx)
- [CHORE] Remove the broken hooks step from
make init, and correct the opam description and dependency groups (#77) (@davesnx) - [CHORE] Test the
peek_withrule in a token loop and after a failure that consumed input (#68) (@davesnx) - [CHORE] Test allocation of failed parses and
render_error(#23) (@davesnx) - [CHORE] Test allocation of the failures that stop repetitions (#22) (@davesnx)
- [CHORE] Bump dune-release-action to v0.6.0 (#19) (@davesnx)