From 97aa46debfb2ddedd8cbb1997b0f2d3c4ea0951b Mon Sep 17 00:00:00 2001 From: Kaben Date: Mon, 31 Oct 2022 13:04:31 +0900 Subject: [PATCH 1/2] Update README.md Fix a pest example. ```ident``` rule is more evidently. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f91188cc..e329f1c5 100644 --- a/README.md +++ b/README.md @@ -47,9 +47,9 @@ where the first identifier does not start with a digit: alpha = { 'a'..'z' | 'A'..'Z' } digit = { '0'..'9' } -ident = { (alpha | digit)+ } +ident = { !digit ~ (alpha | digit)+ } -ident_list = _{ !digit ~ ident ~ (" " ~ ident)+ } +ident_list = _{ ident ~ (" " ~ ident)* } // ^ // ident_list rule is silent which means it produces no tokens ``` From 7379f8fe051dfd9ab9ff3d5bdf3b3131ba6d5d76 Mon Sep 17 00:00:00 2001 From: Kaben Date: Mon, 31 Oct 2022 22:00:44 +0900 Subject: [PATCH 2/2] Update README.md fix Example description above the pest code --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e329f1c5..ddc870c9 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ Other helpful resources: ## Example The following is an example of a grammar for a list of alphanumeric identifiers -where the first identifier does not start with a digit: +where all identifiers don't start with a digit: ```rust alpha = { 'a'..'z' | 'A'..'Z' }