From 32ac9eb85e6a84cacd083d6eea4eadd7ada87681 Mon Sep 17 00:00:00 2001 From: Kiril Kovachev Date: Fri, 7 Mar 2025 16:29:01 +0000 Subject: [PATCH] Fix inconsistency of regex syntax example --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6bf03b2..eee8670 100644 --- a/README.md +++ b/README.md @@ -84,7 +84,7 @@ P ::= P() | ε ``` ...which, due to the first rule, was regrettably indeed left-recursive. That rule should be able to be fixed using the following adjustment, though: -`P() → P{()}+` (where `{}` denotes a grouping, and `()` still just denote parentheses. In PCRE regex syntax, this would be `(\(\))*`). +`P() → P{()}+` (where `{}` denotes a grouping, and `()` still just denote parentheses. In PCRE regex syntax, this would be `(\(\))+`). Note that `S` is just the grammar for one line of parentheses, without the line-break character of end-of-file part of the specification taken into account. The full grammar is: