Commit 2f73cea
committed
Review fixes on #355: cap caret chains, honor the full space set
Two probe-confirmed bypasses of the new depth guard: the ^ chain is
right-recursive in the grammar (50k carets still overflowed the
stack), and the minus-run reset treated \v/\f as run breakers while
PEGTL's space rule accepts them ('-\v' x 50000 crashed). Every ^ now
counts toward the cap regardless of position, and the run persists
across the full PEGTL space set. Lock-ins cover both bypasses plus a
100-caret happy path.
Signed-off-by: petlenz <peterlenz89.pl@gmail.com>1 parent 812d00f commit 2f73cea
2 files changed
Lines changed: 32 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
49 | 55 | | |
50 | 56 | | |
| 57 | + | |
51 | 58 | | |
52 | 59 | | |
53 | 60 | | |
| |||
58 | 65 | | |
59 | 66 | | |
60 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
61 | 74 | | |
62 | 75 | | |
63 | 76 | | |
64 | 77 | | |
65 | 78 | | |
66 | | - | |
| 79 | + | |
67 | 80 | | |
68 | 81 | | |
69 | 82 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2170 | 2170 | | |
2171 | 2171 | | |
2172 | 2172 | | |
| 2173 | + | |
| 2174 | + | |
| 2175 | + | |
| 2176 | + | |
| 2177 | + | |
| 2178 | + | |
| 2179 | + | |
| 2180 | + | |
| 2181 | + | |
| 2182 | + | |
| 2183 | + | |
| 2184 | + | |
| 2185 | + | |
| 2186 | + | |
2173 | 2187 | | |
2174 | 2188 | | |
2175 | 2189 | | |
2176 | 2190 | | |
2177 | 2191 | | |
| 2192 | + | |
| 2193 | + | |
| 2194 | + | |
| 2195 | + | |
2178 | 2196 | | |
2179 | 2197 | | |
2180 | 2198 | | |
| |||
0 commit comments