aima.logic.common
Class Parser

java.lang.Object
  extended by aima.logic.common.Parser
Direct Known Subclasses:
PEParser

public abstract class Parser
extends java.lang.Object


Field Summary
protected  Lexer lexer
           
protected  int lookAhead
           
protected  Token[] lookAheadBuffer
           
 
Constructor Summary
Parser()
           
 
Method Summary
protected  void consume()
           
protected  void fillLookAheadBuffer()
           
protected  boolean isEndOfInput(Token t)
           
protected  void loadNextTokenFromInput()
           
protected  Token lookAhead(int i)
           
protected  void match(java.lang.String terminalSymbol)
           
abstract  ParseTreeNode parse(java.lang.String input)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lexer

protected Lexer lexer

lookAheadBuffer

protected Token[] lookAheadBuffer

lookAhead

protected int lookAhead
Constructor Detail

Parser

public Parser()
Method Detail

fillLookAheadBuffer

protected void fillLookAheadBuffer()

lookAhead

protected Token lookAhead(int i)

consume

protected void consume()

loadNextTokenFromInput

protected void loadNextTokenFromInput()

isEndOfInput

protected boolean isEndOfInput(Token t)

match

protected void match(java.lang.String terminalSymbol)

parse

public abstract ParseTreeNode parse(java.lang.String input)