All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class prolog.Main

java.lang.Object
   |
   +----prolog.Main

public class Main
extends Object
The application top-level. Parse the command tail, initialise a prolog engine, support the interactive session.


Constructor Index

 o Main()

Method Index

 o main(String[])
Reads from the filename specified on the command line, executes the predicate main/0 if defined, otherwise enters a read-eval loop.
 o parseCommandTail(String[], Object)
Command-line argument parser.
 o readeval(Prolog)
Read-eval loop.

Constructors

 o Main
 public Main()

Methods

 o main
 public static void main(String argv[])
Reads from the filename specified on the command line, executes the predicate main/0 if defined, otherwise enters a read-eval loop. Note that I use gnu.getopt to parse command line arguments.

 o parseCommandTail
 public static Prolog parseCommandTail(String argv[],
                                       Object o) throws PrologException
Command-line argument parser.

Parameters:
o - an application-specific object. Gives custom (Java-implemented) predicates access to some global state.
Throws: PrologException
Generated by the interpreter on e.g. type exceptions and the parser on syntax errors.
 o readeval
 public static void readeval(Prolog pt)
Read-eval loop. Query user for commands, execute them.


All Packages  Class Hierarchy  This Package  Previous  Next  Index