Skip to content

Commit facd93d

Browse files
author
alexandrianlibrarian
committed
Add note that token methods don't backtrack and what that means.This should be helpful to newcomers.
1 parent 670d0af commit facd93d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

doc/Language/grammar_tutorial.pod6

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ As already mentioned, grammars are declared using the I<grammar> keyword and its
7373
=item Regex methods are slow but thorough, they will look back in the string
7474
and really try.
7575
76-
=item Token methods are faster than regex methods and ignore whitespace.
76+
=item Token methods are faster than regex methods and ignore
77+
whitespace. Token methods don't backtrack; they give up after the first
78+
possible match.
7779
7880
=item Rule methods are the same as token methods except whitespace
7981
is not ignored.

0 commit comments

Comments
 (0)