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.
-
Main()
-
-
main(String[])
-
Reads from the filename specified on the command line, executes the
predicate main/0 if defined, otherwise enters a read-eval
loop.
-
parseCommandTail(String[], Object)
- Command-line argument parser.
-
readeval(Prolog)
- Read-eval loop.
Main
public Main()
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.
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.
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