rpg_trace: the whole-body recognizers of rpg_trim and rpg_range print scan instead of refusal #814
Loading…
Reference in a new issue
No description provided.
Delete branch "lane-sc2-recognizers-20261117"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
rpg_trace: the whole-body recognizers of rpg_trim and rpg_range print scan instead of refusal
Lane Sc marked the scans that try a pattern at every index. A second kind is left: the
recognizers that
rpg_trim.rewritetries on every body (assignment, thentrim_varying.rewriteand
varying_concat.rewrite, thenrange.unitat every index) and the helpers they call. Eachdeclines at its first guard for most bodies and falls through to the next reader on null, so none of
them ends a statement. Their Debug tokens now read
scan <file>.<function> <site>(scanAt,scanRetfrom lane Sc). Debug trace only: the release binary and every emit byte are unchanged.Marked sites, all sites of each function:
rpg_trim.assignment(with its localofchecks) andrpg_trim.pointerAddress(called only by it)rpg_trim.loops,loopsFrom,leading,trailing,lengthAt,blankTest,step,jump:called only from
assignment,trim_varying.rewrite,halves(itself called by the scansassignUnit,unit,argumentUnit) andcharAssign; no statement-ending caller, so no splitwas needed
rpg_range.unit(the reader ofrpg_range.unit, tried byrewriteat every index)rpg_trim_varying.rewriteandrpg_varying_concat.rewriteprint no token at all (a bare null), sothere is nothing to mark.
Kept as
refusal(a statement-ending caller exists:rpg_char_chain,rpg_display, the tails):copyTail,aimBefore,stripShape,charStrip,opsAre,target,label,store,integer,owned,blank.Test:
src/rpg_scan_marker_test.ziglists the new scan functions (every site scan, no refusalform) and checks that the shared leaf helpers keep
refusal.Gates