1 2 3 4 5 6 7 8 9 10 11
[example { PEG calculator (Expression) Sign <- [-+] ; Number <- Sign? <ddigit>+ ; Expression <- '(' Expression ')' / (Factor (MulOp Factor)*) ; MulOp <- [*/] ; Factor <- Term (AddOp Term)* ; AddOp <- [-+] ; Term <- Number ; END; }]