1// pest. The Elegant Parser
2// Copyright (c) 2018 Dragoș Tiselice
3//
4// Licensed under the Apache License, Version 2.0
5// <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT
6// license <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
7// option. All files in the project carrying such notice may not be copied,
8// modified, or distributed except according to those terms.
9
10a = { "a" }
11b = { "b" }
12c = { "c" }
13d = { ANY }
14
15choices = _{ a | b | c }
16choices_no_progress = { a | b | c }
17choices_a_progress = { a ~ a | b | c }
18choices_b_progress = { a | b ~ b | c }
19
20level1 = _{ level2 }
21level2 = _{ a | b | c }
22
23negative = _{ !d }
24negative_match = _{ !a ~ b }
25mixed = _{ !d | a }
26mixed_progress = _{ (!d | a | b) ~ a }
27
28