README.md: Mention there is no backtracking for *, +, and ?

Based on a pull request by Jak Wings (@jakwings):

  https://github.com/pegjs/pegjs/pull/333
redux
David Majda 9 years ago
parent 5e6b5da4e9
commit 122d7b0737

@ -285,18 +285,21 @@ Match a subexpression and return its match result.
Match zero or more repetitions of the expression and return their match results Match zero or more repetitions of the expression and return their match results
in an array. The matching is greedy, i.e. the parser tries to match the in an array. The matching is greedy, i.e. the parser tries to match the
expression as many times as possible. expression as many times as possible. Unlike in regular expressions, there is no
backtracking.
#### *expression* + #### *expression* +
Match one or more repetitions of the expression and return their match results Match one or more repetitions of the expression and return their match results
in an array. The matching is greedy, i.e. the parser tries to match the in an array. The matching is greedy, i.e. the parser tries to match the
expression as many times as possible. expression as many times as possible. Unlike in regular expressions, there is no
backtracking.
#### *expression* ? #### *expression* ?
Try to match the expression. If the match succeeds, return its match result, Try to match the expression. If the match succeeds, return its match result,
otherwise return `null`. otherwise return `null`. Unlike in regular expressions, there is no
backtracking.
#### & *expression* #### & *expression*

Loading…
Cancel
Save