Home | History | Annotate | Download | only in src

Lines Matching refs:lookaheads

558    * \c NULL iff all lookahead sets are empty.  <tt>lookaheads[i] = NULL</tt>
561 bitset *lookaheads;
578 * in state \c s based on the lookaheads stored in <tt>s->lookaheads</tt>.
587 if (s->lookaheads)
592 if (s->lookaheads[item])
593 bitset_or (follow_set, follow_set, s->lookaheads[item]);
604 * - The number of rows in \c lookaheads is at least the number of items in
607 * - <tt>lookaheads[i][j]</tt> is set iff both:
615 bitsetv lookaheads)
619 bitsetv_zero (lookaheads);
642 lookaheads[t_item]);
644 else if (s->lookaheads)
653 if (s->lookaheads[s_item])
654 bitset_copy (lookaheads[t_item], s->lookaheads[s_item]);
656 bitset_and (lookaheads[t_item],
657 lookaheads[t_item], lookahead_filter[t_item]);
669 * - The number of rows in each of \c lookaheads and \c work2 is the maximum
672 * - \c lookaheads was computed by \c ielr_compute_lookaheads for \c t.
681 * <tt>lookaheads \@pre</tt> was merged with some isocore of \c t if
683 * If this changed the lookaheads in that isocore, those changes were
687 * <tt>lookaheads \@pre</tt> was merged with some isocore of \c t if the
689 * <tt>lookaheads \@pre</tt>.
691 * <tt>lookaheads \@pre</tt> was appended to the state list whose
695 * <tt>lookaheads \@pre</tt> was placed/merged.
696 * - \c lookaheads, \c work1, and \c work2 may have been altered.
701 bitsetv lookaheads, state_list **last_statep,
708 /* Determine whether there's an isocore of t with which these lookaheads can
719 a, lr0_isocore->state->nitems, lookaheads, false);
742 (*this_isocorep)->lookaheads, false);
755 if (!(*this_isocorep)->lookaheads
756 || !(*this_isocorep)->lookaheads[i])
758 if (!bitset_empty_p (lookaheads[i]))
762 so lookaheads[i] must be the second argument. */
763 else if (!bitset_equal_p ((*this_isocorep)->lookaheads[i],
764 lookaheads[i]))
777 if (!bitset_empty_p (lookaheads[i]))
790 /* Merge lookaheads into the state and record whether any of them are
795 if (!(*this_isocorep)->lookaheads)
797 (*this_isocorep)->lookaheads =
798 xnmalloc (t->nitems, sizeof (*this_isocorep)->lookaheads);
800 (*this_isocorep)->lookaheads[i] = NULL;
803 if (!bitset_empty_p (lookaheads[i]))
805 if (!(*this_isocorep)->lookaheads[i])
806 (*this_isocorep)->lookaheads[i] =
808 bitset_andn (lookaheads[i],
809 lookaheads[i], (*this_isocorep)->lookaheads[i]);
810 bitset_or ((*this_isocorep)->lookaheads[i],
811 lookaheads[i], (*this_isocorep)->lookaheads[i]);
812 if (!bitset_empty_p (lookaheads[i]))
817 /* If new lookaheads were merged, propagate those lookaheads to the
827 merge new lookaheads. */
849 lookaheads);
850 /* FIXME: If splitting t2 here, it's possible that lookaheads
853 - We're going to recompute all lookaheads in phase 4, so these
854 extra lookaheads won't appear in the final parser table.
855 - If t2 has just one annotation, then these extra lookaheads
869 the contributions made by the extra lookaheads left behind
872 lookaheads contribute to one of their inadequacies, it's
873 possible these extra lookaheads may needlessly prevent a
879 - The new lookaheads that we were attempting to propagate
883 - The extra lookaheads either make no contribution to
890 - The extra lookaheads make contributions to inadequacy B.
899 now to recreate t2 without those extra lookaheads. */
901 annotation_lists, t2, lookaheads,
918 (*last_statep)->lookaheads = NULL;
922 (*last_statep)->lookaheads =
923 xnmalloc (t->nitems, sizeof (*last_statep)->lookaheads);
926 if (bitset_empty_p (lookaheads[i]))
927 (*last_statep)->lookaheads[i] = NULL;
930 (*last_statep)->lookaheads[i] =
932 bitset_copy ((*last_statep)->lookaheads[i], lookaheads[i]);
967 bitsetv lookaheads;
979 (*nodep)->lookaheads = NULL;
990 lookaheads = bitsetv_create (max_nitems, ntokens, BITSET_FIXED);
1010 lookaheads);
1012 annotation_lists, t, lookaheads, &last_state,
1021 bitsetv_free (lookaheads);
1053 else if (node->lookaheads)
1065 if (node->lookaheads[i])
1066 bitset_copy (lookahead_set, node->lookaheads[i]);
1077 if (node->lookaheads)
1081 if (node->lookaheads[i])
1082 bitset_free (node->lookaheads[i]);
1083 free (node->lookaheads);
1183 /* Phase 4: Compute Reduction Lookaheads. */
1190 /* Reduction lookaheads are computed in ielr_split_states above