Skip to content

Commit d8ab92e

Browse files
committed
Markup.
1 parent 4351273 commit d8ab92e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/advice.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ The following bits of advice illustrate various specific ways to bring down this
163163
164164
2. Take care with bounded repetition
165165
166-
If you have the pattern ^x{3,5}$, libfsm's resulting DFA will be structured like "match an x, then match an x, then match an x, then match an x or skip it, then match an x or skip it, then report an overall match if at the end of input". It has to repeat the pattern, noting each time whether it's required or optional (beyond the lower count in {min,max}), because DFA execution doesn't have a counter, just the current state within the overall DFA.
166+
If you have the pattern `^x{3,5}$`, libfsm's resulting DFA will be structured like "match an x, then match an x, then match an x, then match an x or skip it, then match an x or skip it, then report an overall match if at the end of input". It has to repeat the pattern, noting each time whether it's required or optional (beyond the lower count in `{min,max}`), because DFA execution doesn't have a counter, just the current state within the overall DFA.
167167

168168
When the subexpression (represented by `x`) unintentionally matches too many things, they all have to be spelled out every time.
169169
So pay especially close attention to tightening up subexpressions in bounded repetition clauses.

0 commit comments

Comments
 (0)