Represents a range of integers specifying the number of times a token or pattern should be repeated when parsing a string.
More...
|
| | Repeat () |
| | Default-construct a Repeat object representing exactly 1 repetition. More...
|
| |
| | Repeat (std::integral auto count) |
| | Construct an object representing exactly the given number of repetitions. More...
|
| |
| template<std::integral Int_t> |
| | Repeat (Int_t min_arg, Int_t max_arg) |
| | Construct an object representing a range of at least min_arg and at most max_arg repetitions. More...
|
| |
| std::size_t | min () const |
| | Return the mimimum number of repetitions, inclusive. More...
|
| |
| | Repeat_base (std::integral auto max) |
| | Construct a new object with the given maximum. More...
|
| |
| std::size_t | max () const |
| | Return the maximum number of repetitions, inclusive. More...
|
| |
|
| template<std::integral Int_t> |
| static Repeat | at_least (Int_t min_arg) |
| | Return a Repeat object representing min_arg or more repetitions (bounded only by std::numeric_limits) More...
|
| |
| template<std::integral Int_t> |
| static Repeat | range (Int_t min_arg, Int_t max_arg) |
| | Return a Repeat object representing a range of at least min_arg and at most max_arg repetitions. More...
|
| |
| static Repeat | exact (std::integral auto count) |
| | Return a Repeat object representing exactly the given number of repetitions. More...
|
| |
| static Repeat | one () |
| | Return a Repeat object representing exactly one repetition. More...
|
| |
| static Repeat_optional | optional () |
| | Return a Repeat_optional object representing zero or one instances. More...
|
| |
| static Repeat_optional | at_most (std::integral auto max_arg) |
| | Return a Repeat object representing between 0 and min_arg repetitions. More...
|
| |
| static Repeat_optional | any () |
| | Return a Repeat_optional object representing any number of repetitions from 0 and up (bounded only by std::numeric_limits). More...
|
| |
Represents a range of integers specifying the number of times a token or pattern should be repeated when parsing a string.
The range is defined by a minimum and maximum value, which can be used to constrain the number of repetitions.
Examples:
- Repeat::one(): exactly 1 repetition
- Repeat::exact(3): exactly 3 repetitions
- Repeat::range(2, 5): between 2 and 5 repetitions
- Repeat::at_least(1): 1 or more repetitions (analogous to regex syntax "+")