From edaef7f38c436ebfa0d40bb8ce193d3e02f8c433 Mon Sep 17 00:00:00 2001 From: Kaben Date: Mon, 31 Oct 2022 23:36:00 +0900 Subject: [PATCH] Update README.md (#728) Fix a pest example. ```ident``` rule is more evident. --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f91188cc..ddc870c9 100644 --- a/README.md +++ b/README.md @@ -41,15 +41,15 @@ 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' } 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 ```