|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--com.svincent.moksa.WamObject
|
+--com.svincent.moksa.PrologParser
A parser for the Prolog language. There are two subclasses, MiniPrologParser, and ISOPrologParser, which parse part/all of the Prolog language, respectively.
This is an interface so that builtin terms and Moksa tools can parse Prolog source code.
| Constructor Summary | |
PrologParser()
|
|
| Method Summary | |
abstract PrologTerm |
parseClause(Io.PrologInput in)
Parse a Prolog clause. |
PrologTerm |
parseClause(Io io,
java.lang.String term)
Parses a Prolog clause, given a String. |
PrologTerm[] |
parseFile(Io.PrologInput in)
Parses an entire file, quickly and succinctly, into a list of clauses |
abstract PrologTerm |
parseTerm(Io.PrologInput in)
Parse a Prolog term. |
PrologTerm |
parseTerm(Io io,
java.lang.String term)
Parses a Prolog term, given a String. |
| Methods inherited from class com.svincent.moksa.WamObject |
tag,
tag |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public PrologParser()
| Method Detail |
public abstract PrologTerm parseClause(Io.PrologInput in)
throws java.io.IOException,
PrologParseException
Parse a Prolog clause. This ends at the next end ('.') character, and typically contains something of the form "Term :- Term, Term."
Returns null on EOF.
public abstract PrologTerm parseTerm(Io.PrologInput in)
throws java.io.IOException,
PrologParseException
Parse a Prolog term. This is the primitive term stuff we're all familiar with: atoms, integers, compound terms, floats, etc.
Returns null on EOF.
public PrologTerm parseClause(Io io,
java.lang.String term)
throws java.io.IOException,
PrologParseException
public PrologTerm parseTerm(Io io,
java.lang.String term)
throws java.io.IOException,
PrologParseException
public PrologTerm[] parseFile(Io.PrologInput in)
throws java.io.IOException,
PrologParseException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
This is documentation for Moksa Prolog, which can be found at http://www.svincent.com/moksa/
Copyright © 1999 Shawn P. Vincent.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.