Lines Matching defs:alt

84 	public void optimizeAlternative(StateCluster alt) {
85 NFAState s = alt.left;
86 while ( s!=alt.right ) {
101 // point at the last node of the alt. Don't collapse action edges
134 * what an alt block looks like, must have extra state on left.
231 * TODO add to codegen: collapse alt blks that are sets into single matchSet
357 // single alt, no decision, just return only alt state cluster
375 * and every alt right side points at a block end NFAState. There is a
376 * new NFAState in the NFAState in the StateCluster for each alt plus one for the
379 * Special case: only one alternative: don't make a block with alt
385 * Set alt number (1..n) in the left-Transition NFAState.
394 // single alt case
396 // single alt, no decision, just return only alt state cluster
409 NFAState prevAlternative = null; // tracks prev so we can link to next alt
416 // add begin NFAState for this alt connected by epsilon
418 left.setDescription("alt "+altNum+" of ()");
426 // if not first alternative, must link to this alt from previous
434 // Points to first alt NFAState on left, block end on right
451 * or, if A is a block, just add an empty alt to the end of the block
460 decisionState.setDescription("only alt of ()? block");
478 // a decision block, add an empty alt
499 * |---| (Transition 2 from A.right points at alt 1)
507 * During analysis we'll call the follow link (transition 1) alt n+1 for
508 * an n-alt A block.
525 // turn A's block end into a loopback (acts like alt 2)
543 * o->o-A-o--o (Transition 2 from block end points at alt 1; follow is Transition 1)
545 * o---------| (optional branch is 2nd alt of optional block containing A+)
556 * it only has one alt), then there are two decisions: the optional bypass
651 left.setDescription("alt "+altNum+" of artificial rule "+Grammar.ARTIFICIAL_TOKENS_RULENAME);
658 // if not first alternative, must link to this alt from previous
700 // make optional . alt