|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.tomp.xtcl.CompilerBase
public abstract class CompilerBase
Abstract base for a Compiler.
Constructor Summary | |
---|---|
CompilerBase()
|
Method Summary | |
---|---|
protected void |
assertWholeLineRead(java.lang.String ci,
int i,
java.lang.String[] cl,
Command commandToReturn)
|
Command |
compile(CommandLineReader clr)
Compiles commands from a CommandLineReader into a command Sequence |
Command |
compile(java.io.File f)
Compiles commands from a String |
Command |
compile(java.lang.String s)
Compiles commands from a String |
Command |
compile(java.lang.String cl,
CommandLineReader clr)
Compiles commands from a String followed by a CommandLineReader into a command Sequence |
protected Command |
compileByNextCompiler(java.lang.String ci,
java.lang.String[] cl,
CommandLineReader clr)
|
Context |
getContext()
|
Compiler |
getNextCompiler()
|
void |
setContext(Context context)
|
protected int |
setParameters(java.lang.String[] cl,
int i,
ParametrizedCommand command)
Reads and sets all the parameters to the ParametrizedCommand |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.sf.tomp.xtcl.Compiler |
---|
compile |
Constructor Detail |
---|
public CompilerBase()
Method Detail |
---|
public Command compile(CommandLineReader clr) throws java.lang.Exception
compile
in interface Compiler
clr
- CommandLineReader - the source for compilation
java.lang.Exception
- if compilation failspublic Command compile(java.io.File f) throws java.lang.Exception
f
- String - the source from which it compiles
java.lang.Exception
- if compilation failspublic Command compile(java.lang.String s) throws java.lang.Exception
compile
in interface Compiler
s
- String - the source from which it compiles
java.lang.Exception
- if compilation failspublic Command compile(java.lang.String cl, CommandLineReader clr) throws java.lang.Exception
compile
in interface Compiler
cl
- String - will be tokenized and passed further to
compile(String[], CommandLineReader)clr
- CommandLineReader - the sources for compilation first the
String, then the CLR
java.lang.Exception
- if compilation failsprotected void assertWholeLineRead(java.lang.String ci, int i, java.lang.String[] cl, Command commandToReturn)
ci
- Command name - used just for error reporting if it happensi
- current position in the cl fields (parameters) arraycl
- fields (parameters) arraycommandToReturn
- protected Command compileByNextCompiler(java.lang.String ci, java.lang.String[] cl, CommandLineReader clr) throws java.lang.Exception
ci
- cl
- clr
-
java.lang.Exception
protected int setParameters(java.lang.String[] cl, int i, ParametrizedCommand command)
cl
- parameter arrayi
- starting position in the cl arraycommand
- the ParametrizedCommand
public Context getContext()
getContext
in interface Compiler
public Compiler getNextCompiler()
getNextCompiler
in interface Compiler
public void setContext(Context context)
setContext
in interface Compiler
context
- The context to set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |