Lines Matching refs:first

292  *   new = link_machines( first, last );
294 * new - a machine constructed by connecting first to last
295 * first - the machine whose successor is to be last
296 * last - the machine whose predecessor is to be first
298 * note: this routine concatenates the machine first with the machine
299 * last to produce a machine new which will pattern-match first first
304 int link_machines (first, last)
305 int first, last;
307 if (first == NIL)
311 return first;
314 mkxtion (finalst[first], last);
315 finalst[first] = finalst[last];
316 lastst[first] = MAX (lastst[first], lastst[last]);
317 firstst[first] = MIN (firstst[first], firstst[last]);
319 return first;
328 * The "beginning" states are the epsilon closure of the first state
363 * branch = mkbranch( first, second );
365 * branch - a machine which matches either first's pattern or second's
366 * first, second - machines whose patterns are to be or'ed (the | operator)
368 * Note that first and second are NEITHER destroyed by the operation. Also,
373 int mkbranch (first, second)
374 int first, second;
378 if (first == NO_TRANSITION)
382 return first;
386 mkxtion (eps, first);
449 * new = mkor( first, second );
451 * new - a machine which matches either first's pattern or second's
452 * first, second - machines whose patterns are to be or'ed (the | operator)
454 * note that first and second are both destroyed by the operation
459 int mkor (first, second)
460 int first, second;
464 if (first == NIL)
468 return first;
471 /* See comment in mkopt() about why we can't use the first
472 * state of "first" or "second" if they satisfy "FREE_EPSILON".
476 first = link_machines (eps, first);
478 mkxtion (first, second);
480 if (SUPER_FREE_EPSILON (finalst[first]) &&
481 accptnum[finalst[first]] == NIL) {
482 orend = finalst[first];
489 mkxtion (finalst[first], orend);
495 first = link_machines (first, eps);
496 orend = finalst[first];
502 finalst[first] = orend;
503 return first;
640 * first time.