aima.logic.fol.parsing
Class FOLParser

java.lang.Object
  extended by aima.logic.fol.parsing.FOLParser

public class FOLParser
extends java.lang.Object


Field Summary
protected  int lookAhead
           
protected  Token[] lookAheadBuffer
           
 
Constructor Summary
FOLParser(FOLDomain domain)
           
FOLParser(FOLLexer lexer)
           
 
Method Summary
protected  void consume()
           
protected  void fillLookAheadBuffer()
           
 FOLDomain getFOLDomain()
           
protected  boolean isEndOfInput(Token t)
           
protected  void loadNextTokenFromInput()
           
protected  Token lookAhead(int i)
           
protected  void match(java.lang.String terminalSymbol)
           
 Sentence parse(java.lang.String s)
           
 Term parseConstant()
           
 Term parseFunction()
           
 Sentence parseNotSentence()
           
 Sentence parsePredicate()
           
 Sentence parseTermEquality()
           
 Term parseVariable()
           
 void setUpToParse(java.lang.String s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lookAheadBuffer

protected Token[] lookAheadBuffer

lookAhead

protected int lookAhead
Constructor Detail

FOLParser

public FOLParser(FOLLexer lexer)

FOLParser

public FOLParser(FOLDomain domain)
Method Detail

getFOLDomain

public FOLDomain getFOLDomain()

parse

public Sentence parse(java.lang.String s)

setUpToParse

public void setUpToParse(java.lang.String s)

parseVariable

public Term parseVariable()

parseConstant

public Term parseConstant()

parseFunction

public Term parseFunction()

parsePredicate

public Sentence parsePredicate()

parseTermEquality

public Sentence parseTermEquality()

parseNotSentence

public Sentence parseNotSentence()

lookAhead

protected Token lookAhead(int i)

consume

protected void consume()

loadNextTokenFromInput

protected void loadNextTokenFromInput()

isEndOfInput

protected boolean isEndOfInput(Token t)

fillLookAheadBuffer

protected void fillLookAheadBuffer()

match

protected void match(java.lang.String terminalSymbol)