You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
8 lines
230 B
Racket
8 lines
230 B
Racket
3 years ago
|
#lang yaragg
|
||
7 years ago
|
;; test the curly quantifier
|
||
7 years ago
|
start : a-rule | b-rule | c-rule | d-rule | e-rule
|
||
7 years ago
|
a-rule : "a"{2} ; exactly 2
|
||
|
b-rule : "b"{,2} ; up to 2
|
||
|
c-rule : "c"{2,} ; 2 or more
|
||
7 years ago
|
d-rule : "d"{2,3} ; 2 or 3
|
||
|
e-rule : "e"{} ; 0 or more
|