Skip to content

Commit

Permalink
Update README.md (#728)
Browse files Browse the repository at this point in the history
Fix a pest example. ```ident``` rule is more evident.
  • Loading branch information
carnoxen committed Oct 31, 2022
1 parent 683a7e7 commit edaef7f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -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
```
Expand Down

0 comments on commit edaef7f

Please sign in to comment.