I
- the input stream symbol typepublic interface SymSet<I>
A SymSet
represents an immutable set of symbols,
SymSet
s are used for First Sets and Follow Sets.
Since the Combinators.value(Object)
parsers are expressed using predictaes,
SymSet
has to support these directly else every symbol that satisfies the predicate,
would have to be enumerated.
Consequently, a SymSet is expressed as the composition of symbols, predicates and set operations.
Modifier and Type | Interface and Description |
---|---|
static class |
SymSet.All<I> |
static class |
SymSet.Empty<I> |
static class |
SymSet.Pred<I> |
static class |
SymSet.Type |
static class |
SymSet.Union<I> |
static class |
SymSet.Value<I> |
Modifier and Type | Method and Description |
---|---|
static <I> SymSet<I> |
all() |
StringBuilder |
append(StringBuilder sb) |
static <I> SymSet<I> |
empty() |
boolean |
matches(I value) |
static <I> SymSet<I> |
pred(String name,
Functions.Predicate<I> pred) |
SymSet.Type |
type() |
SymSet<I> |
union(SymSet<I> rhs) |
static <I> SymSet<I> |
value(I value) |
static <I> SymSet<I> pred(String name, Functions.Predicate<I> pred)
SymSet.Type type()
StringBuilder append(StringBuilder sb)
Copyright © 2019. All rights reserved.