net.sf.tomp.xtcl
Class CompilerBase
java.lang.Object
net.sf.tomp.xtcl.CompilerBase
- All Implemented Interfaces:
- Compiler
- Direct Known Subclasses:
- XTCompiler
- public abstract class CompilerBase
- extends java.lang.Object
- implements Compiler
- Author:
- tomp TODO To change the template for this generated type comment go
to Window - Preferences - Java - Code Style - Code Templates
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CompilerBase
public CompilerBase()
compile
public Command compile(CommandLineReader clr)
throws java.lang.Exception
- Compiles commands from a CommandLineReader into a command Sequence
- Specified by:
compile
in interface Compiler
- Parameters:
clr
- CommandLineReader - the source for compilation
- Returns:
- DOCUMENT ME!
- Throws:
java.lang.Exception
- DOCUMENT ME!
compile
public Command compile(java.io.File f)
throws java.lang.Exception
- Compiles commands from a String
- Parameters:
f
- String - the source from which it compiles
- Returns:
- DOCUMENT ME!
- Throws:
java.lang.Exception
- DOCUMENT ME!
compile
public Command compile(java.lang.String s)
throws java.lang.Exception
- Compiles commands from a String
- Specified by:
compile
in interface Compiler
- Parameters:
s
- String - the source from which it compiles
- Returns:
- DOCUMENT ME!
- Throws:
java.lang.Exception
- DOCUMENT ME!
compile
public Command compile(java.lang.String cl,
CommandLineReader clr)
throws java.lang.Exception
- Compiles commands from a String followed by a CommandLineReader into a
command Sequence
- Specified by:
compile
in interface Compiler
- Parameters:
cl
- String - will be tokenized and passed further to
compile(String[], CommandLineReader)clr
- CommandLineReader - the sources for compilation first the
String, then the CLR
- Returns:
- DOCUMENT ME!
- Throws:
java.lang.Exception
- DOCUMENT ME!
assertWholeLineRead
protected void assertWholeLineRead(java.lang.String ci,
int i,
java.lang.String[] cl,
Command commandToReturn)
- Parameters:
ci
- i
- cl
- commandToReturn
-
compileByNextCompiler
protected Command compileByNextCompiler(java.lang.String ci,
java.lang.String[] cl,
CommandLineReader clr)
throws java.lang.Exception
- Parameters:
ci
- cl
- clr
-
- Returns:
- @throws Exception
- Throws:
java.lang.Exception
getContext
public Context getContext()
- Specified by:
getContext
in interface Compiler
- Returns:
- Returns the context.
getNextCompiler
public Compiler getNextCompiler()
- Specified by:
getNextCompiler
in interface Compiler
- Returns:
- Returns the parent.
setContext
public void setContext(Context context)
- Specified by:
setContext
in interface Compiler
- Parameters:
context
- The context to set.
Copyright © 2004 Masaryk University in Brno, Faculty of Informatics, Czech Republic. All Rights Reserved.