From 122d7b0737f13b4ff8731d86d9c55721e1efb4f5 Mon Sep 17 00:00:00 2001 From: David Majda Date: Fri, 10 Jul 2015 13:56:44 +0200 Subject: [PATCH] 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 --- README.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a10b18a..ac5fd92 100644 --- a/README.md +++ b/README.md @@ -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 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* + 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 -expression as many times as possible. +expression as many times as possible. Unlike in regular expressions, there is no +backtracking. #### *expression* ? 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*