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 ```