This method takes care of kicking off a new parse process.
This method takes care of kicking off a new parse process. We will never call this method to handle a sub-parse. In such situations, we will use the trampoline to queue results.
Note: to ensure greedy matching (for PEG compatibility) we define any Success with a non-empty tail to be a Failure
The FIRST set for this parser, or the empty set if the production goes to \epsilon.
Checks if all FIRST sets are disjoint and none are empty.
Checks if all FIRST sets are disjoint and none are empty. This is convergent even for left-recursive parsers.
The PREDICT table for this disjunction.
The PREDICT table for this disjunction. Please note that this is a very different concept from the standard LL(k) PREDICT set. Specifically, the PREDICT table allows for ambiguity in the prediction while still retaining O(1) dispatch on disjunctions which are LL(1) and near-O(1) for disjunctions which are not.
Note that this is not actually sufficient to handle all CFGs allowed by GLL. Specifically, parsers with an empty FIRST set must be handled specially.
(disjunctiveParser: any2stringadd[DisjunctiveParser[A]]).+(other)