Function getLookaheadPaths

  • Computes all lookahead paths for a given production.

    The result is a three-dimensional array of token types. Accessing this array with the index of an alternative of the given production returns a two-dimensional array. Each entry of this array represents a list of the token types which can occur in this alternative.

    Parameters

    • options: {
          maxLookahead: number;
          occurrence: number;
          prodType: LookaheadProductionType;
          rule: Rule;
      }
      • maxLookahead: number

        The maximum amount of lookahead for this production.

      • occurrence: number

        The occurrence number of this production within its rule.

      • prodType: LookaheadProductionType

        The type of this production.

      • rule: Rule

        The rule which contains this production.

    Returns LookaheadSequence[]

Generated using TypeDoc