|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmmp.engine.Engine
public class Engine
The MNI macro processor engine.
Constructor Summary | |
---|---|
Engine(java.io.Reader reader,
java.io.Writer writer)
Constructs the MMP engine with default compatibility level. |
|
Engine(java.io.Reader reader,
java.io.Writer writer,
Settings.CompatibilityLevel compLevel)
Constructs the MMP engine. |
Method Summary | |
---|---|
void |
define(java.lang.String macroName,
java.lang.String expansion)
Defined macro 'macroName' to expand to 'expansion'. |
Input |
getInput()
Get input of macro processor. |
MacroRegistry |
getMacroRegistry()
Get macro registry of macro processor. |
Output |
getOutput()
Get output of macro processor. |
int |
getRecursionLevel()
Get current recursion level of expansion of macro. |
Settings |
getSettings()
Get settings of macro processor. |
void |
register(java.lang.String macroName,
Macro macro)
Registers the macro object 'macro' under the name 'macroName'. |
int |
run()
Runs the MMP engine. |
void |
setTraceHandler(java.util.logging.Handler traceHandler)
mmp uses the Java logging mechanism for tracing. |
void |
setTraceOn(java.lang.String macroName)
Turn tracing of macro 'macroName' on. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Engine(java.io.Reader reader, java.io.Writer writer)
reader
- where to read the input.writer
- where to write the output.public Engine(java.io.Reader reader, java.io.Writer writer, Settings.CompatibilityLevel compLevel)
reader
- where to read the input.writer
- where to write the output.compLevel
- compatibility level for the engine,
the levels are Settings.CompatibilityLevel.Method Detail |
---|
public final void define(java.lang.String macroName, java.lang.String expansion)
macroName
- name of macroexpansion
- expansion of macropublic final Input getInput()
EngineContext
getInput
in interface EngineContext
Input
public final MacroRegistry getMacroRegistry()
EngineContext
getMacroRegistry
in interface EngineContext
MacroRegistry
public final Output getOutput()
EngineContext
getOutput
in interface EngineContext
Output
public final int getRecursionLevel()
EngineContext
getRecursionLevel
in interface EngineContext
public final Settings getSettings()
EngineContext
getSettings
in interface EngineContext
Settings
public final void register(java.lang.String macroName, Macro macro)
macroName
- the macro namemacro
- the macro objectMacro
public final int run() throws java.io.IOException, SyntaxErrorException, RuntimeErrorException
java.io.IOException
- if io error
SyntaxErrorException
- if syntax error
RuntimeErrorException
- if runtime errorpublic final void setTraceHandler(java.util.logging.Handler traceHandler)
traceHandler
- the trace handlerpublic final void setTraceOn(java.lang.String macroName)
macroName
- the name of the macro
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |