edu.isi.powerloom.gui.parser
Class Parser
java.lang.Object
|
+--edu.isi.powerloom.gui.parser.Parser
- public class Parser
- extends java.lang.Object
Backtracking parser, which "forks" the stack when there are multiple productions
which can be applied to a given stack/input configuration.
This is adapted from alg 4.14. p. 187 in Compilers by Aho, Sethi, Ullman.
- Since:
- Tue May 07 17:52:21 2002
- Author:
- Eric Melz
Method Summary |
static ParseNode |
buildParseTree(ParseResult parseResult,
java.util.List input)
Build a parseTree based on the parse result, which contains a list of
fired productions, and the input, which contains a list of tokens. |
static ParseResult |
parse(Grammar grammar,
java.util.List input)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Parser
public Parser()
parse
public static ParseResult parse(Grammar grammar,
java.util.List input)
throws java.lang.Exception
- Returns:
- a ParseResult structure which contains information about the success status,
fired productions (if success), and exceptions.
java.lang.Exception
buildParseTree
public static ParseNode buildParseTree(ParseResult parseResult,
java.util.List input)
- Build a parseTree based on the parse result, which contains a list of
fired productions, and the input, which contains a list of tokens.
Copyright © 2002 University of Southern California Information Sciences Institute. All Rights Reserved.