kernel/src/main/java/org/kframework/parser/inner/kernel/EarleyParser.java
/**
     * Obtain the parse tree associated with a tuple (S, i, j) of sort, start-index, and end-index.
     * @param sort The sort that was just parsed.
     * @param start The start-index that the production was parsed from.
     * @return The unique parse tree node associated with that sort, start-index, and end-index.
     */
Obtain the parse tree associated with a tuple (S, i, j) of sort, start-index, and end-index.
@param sort The sort that was just parsed.
@param start The start-index that the production was parsed from.
@return The unique parse tree node associated with that sort, start-index, and end-index.
Obtain the parse tree associated with a tuple ( S i j ) of sort start - index and end - index . @param sort The sort that was just parsed . @param start The start - index that the production was parsed from . @return The unique parse tree node associated with that sort start - index and end - index .
private Set<Term> completedParses(int sort, int start) {
      CompleteParseTreeNode[][] nodes = completedParseTrees;
      if (nodes == null) {
        nodes = new CompleteParseTreeNode[index+1][nsorts];
        completedParseTrees = nodes;
      }
      CompleteParseTreeNode node = nodes[start][sort];
      if (node == null) {
        node = new CompleteParseTreeNode();
        nodes[start][sort] = node;
      }
      return node.derivations;
    }
private Set < Term > completedParses ( int sort , int start ) { CompleteParseTreeNode [ ] [ ] nodes = completedParseTrees ; if ( nodes == null ) { nodes = new CompleteParseTreeNode [ index + 1 ] [ nsorts ] ; completedParseTrees = nodes ; } CompleteParseTreeNode node = nodes [ start ] [ sort ] ; if ( node == null ) { node = new CompleteParseTreeNode ( ) ; nodes [ start ] [ sort ] = node ; } return node . derivations ; }
Obtain the parse tree associated with a tuple (S, i, j) of sort, start-index, and end-index.
Obtain the parse tree associated with a tuple ( S i j ) of sort start - index and end - index .