Package | Description |
---|---|
org.jamplate.impl |
Jamplate specific implementations.
|
org.jamplate.impl.compiler |
A package containing implementations of the interface
Compiler . |
org.jamplate.impl.processor |
A package containing implementations of the interface
Processor . |
org.jamplate.model.function |
All about processors.
|
Modifier and Type | Field and Description |
---|---|
static @NotNull Compiler |
Jamplate.COMPILER
The default jamplate compiler.
|
static @NotNull Compiler |
Compilers.CX_CMD_CONSOLE
A compiler that compiles console commands.
|
static @NotNull Compiler |
Compilers.CX_CMD_DECLARE
A compiler that compiles declare commands.
|
static @NotNull Compiler |
Compilers.CX_CMD_DEFINE
A compiler that compiles define commands.
|
static @NotNull Compiler |
Compilers.CX_CMD_ERROR
A compiler that compiles error commands.
|
static @NotNull Compiler |
Compilers.CX_CMD_INCLUDE
A compiler that compiles include commands.
|
static @NotNull Compiler |
Compilers.CX_CMD_MESSAGE
A compiler that compiles message commands.
|
static @NotNull Compiler |
Compilers.CX_CMD_SPREAD
A compiler that compiles spread commands.
|
static @NotNull Compiler |
Compilers.CX_CMD_UNDEC
A compiler that compiles undec commands.
|
static @NotNull Compiler |
Compilers.CX_CMD_UNDEF
A compiler that compiles undef commands.
|
static @NotNull Compiler |
Compilers.CX_FLW_CAPTURE
A compiler that compiles capture-contexts.
|
static @NotNull Compiler |
Compilers.CX_FLW_FOR
A compiler that compiles for-contexts.
|
static @NotNull Compiler |
Compilers.CX_FLW_IF
A compiler that compiles if-contexts.
|
static @NotNull Compiler |
Compilers.CX_FLW_WHILE
A compiler that compiles while-contexts.
|
static @NotNull Compiler |
Compilers.CX_INJ
A compiler that compiles injections.
|
static @NotNull Compiler |
Compilers.CX_PCM_LGC
A compiler that compiles logical contexts.
|
static @NotNull Compiler |
Compilers.CX_PCM_REF
A compiler that compiles references.
|
static @NotNull Compiler |
Compilers.CX_TXT
A compiler that compiles the non-command text.
|
static @NotNull Compiler |
Compilers.DC_EOL
A compiler that compiles line separators.
|
static @NotNull Compiler |
Compilers.DC_EOL_SUPPRESSED
A compiler that compiles suppressed line separators.
|
static @NotNull Compiler |
Compilers.DC_ROT
A compiler that compiles the root.
|
static @NotNull Compiler |
Compilers.SX_CUR
A compiler that compiles curly braces.
|
static @NotNull Compiler |
Compilers.SX_DQT
A compiler that compiles double quotes.
|
static @NotNull Compiler |
Compilers.SX_NME
A compiler that compiles name instructions.
|
static @NotNull Compiler |
Compilers.SX_NUM
A compiler that compiles numbers.
|
static @NotNull Compiler |
Compilers.SX_QTE
A compiler that compiles quotes.
|
static @NotNull Compiler |
Compilers.SX_RND
A compiler that compiles parentheses.
|
static @NotNull Compiler |
Compilers.SX_SQR
A compiler that compiles square brackets.
|
Modifier and Type | Class and Description |
---|---|
class |
CombineCompiler
A compiler that compiles using a pre-specified list of other compilers and then
combines the compiled instructions using a
IterXinstr instruction. |
class |
ExclusiveCompiler
A wrapper compiler that passes a pre-specified fallback compiler to the wrapped
compiler.
|
class |
FallbackCompiler
A compiler that delegates to the fallback compiler.
|
class |
FilterByKindCompiler
A compiler that targets a pre-specified kind of trees and compiles using another
compiler.
|
class |
FirstCompileCompiler
A compiler that tris compiling using multiple other compilers in order and returns the
results of the first compiler to succeed.
|
class |
FlattenCompiler
A compiler that compiles using two compilers.
|
class |
MandatoryCompiler
A compiler that delegates to another compiler and raises an exception if that other
compiler failed to compile.
|
class |
ToIdleCompiler
A compiler that compiles an empty instruction.
|
class |
ToIdleWhitespaceCompiler
A compiler that compiles whitespaces.
|
class |
ToPushConstCompiler
A compiler that always compiles into a
PushConst with the constant being the
result of reading the tree given to it. |
class |
ToPushConstUnescapeCompiler
A compiler that always compiles into a
PushConst with the constant being the
result of reading the tree given to it. |
class |
ToPushEvalAddrCompiler
A compiler that always compiles into a
PushEvalAddr with the address being the
result of reading the tree given to it. |
class |
ToReprntConstCompiler
A compiler that always compiles into a
ReprntConst with the constant being the
result of reading the tree given to it. |
Modifier and Type | Field and Description |
---|---|
protected @NotNull Compiler |
FilterByKindCompiler.compiler
The wrapped compiler.
|
protected @NotNull Compiler |
MandatoryCompiler.compiler
The wrapped compiler.
|
protected @NotNull Compiler |
FlattenCompiler.compiler
The compiler to be used.
|
protected @NotNull Compiler |
ExclusiveCompiler.compiler
The fallback compiler.
|
protected @NotNull Compiler |
ExclusiveCompiler.fallback
The fallback compiler.
|
protected @NotNull Compiler |
FlattenCompiler.fallBack
The compiler used by this compiler to compile the non-reserved ranges.
|
Modifier and Type | Method and Description |
---|---|
@Nullable Instruction |
FilterByKindCompiler.compile(@NotNull Compiler compiler,
@NotNull Compilation compilation,
@NotNull Tree tree) |
@Nullable Instruction |
ToIdleWhitespaceCompiler.compile(@NotNull Compiler compiler,
@NotNull Compilation compilation,
@NotNull Tree tree) |
@Nullable Instruction |
ToReprntConstCompiler.compile(@NotNull Compiler compiler,
@NotNull Compilation compilation,
@NotNull Tree tree) |
@Nullable Instruction |
ToPushConstUnescapeCompiler.compile(@NotNull Compiler compiler,
@NotNull Compilation compilation,
@NotNull Tree tree) |
@Nullable Instruction |
FallbackCompiler.compile(@NotNull Compiler compiler,
@NotNull Compilation compilation,
@NotNull Tree tree) |
@Nullable Instruction |
MandatoryCompiler.compile(@NotNull Compiler compiler,
@NotNull Compilation compilation,
@NotNull Tree tree) |
@Nullable Instruction |
CombineCompiler.compile(@NotNull Compiler compiler,
@NotNull Compilation compilation,
@NotNull Tree tree) |
@Nullable Instruction |
FirstCompileCompiler.compile(@NotNull Compiler compiler,
@NotNull Compilation compilation,
@NotNull Tree tree) |
@Nullable Instruction |
ToPushConstCompiler.compile(@NotNull Compiler compiler,
@NotNull Compilation compilation,
@NotNull Tree tree) |
@Nullable Instruction |
FlattenCompiler.compile(@NotNull Compiler compiler,
@NotNull Compilation compilation,
@NotNull Tree tree) |
@Nullable Instruction |
ExclusiveCompiler.compile(@NotNull Compiler compiler,
@NotNull Compilation compilation,
@NotNull Tree tree) |
@Nullable Instruction |
ToIdleCompiler.compile(@NotNull Compiler compiler,
@NotNull Compilation compilation,
@NotNull Tree tree) |
@Nullable Instruction |
ToPushEvalAddrCompiler.compile(@NotNull Compiler compiler,
@NotNull Compilation compilation,
@NotNull Tree tree) |
Constructor and Description |
---|
CombineCompiler(Compiler... compilers)
Construct a new compiler that compiles using the given
compilers then
combine the results with an IterXinstr instruction. |
ExclusiveCompiler(@NotNull Compiler compiler)
Construct a new exclusive compiler that compiles using the given
compiler
with itself as the fallback compiler (ignoring the fallback compiler given to it). |
ExclusiveCompiler(@NotNull Compiler compiler,
@NotNull Compiler fallback)
Construct a new exclusive compiler that compiles using the given
compiler
with the given fallback compiler as the fallback compiler (ignoring the
fallback compiler given to it). |
ExclusiveCompiler(@NotNull Compiler compiler,
@NotNull Compiler fallback)
Construct a new exclusive compiler that compiles using the given
compiler
with the given fallback compiler as the fallback compiler (ignoring the
fallback compiler given to it). |
FilterByKindCompiler(@NotNull java.lang.String kind,
@NotNull Compiler compiler)
Construct a new kind-filtered compiler that compiles trees with the given
kind using the given compiler . |
FirstCompileCompiler(Compiler... compilers)
Construct a new order-compiler that uses the given
compilers . |
FlattenCompiler(@NotNull Compiler compiler,
@NotNull Compiler fallBack)
Construct a new strict compiler that compiles the unreserved ranges using the given
fallback compiler. |
FlattenCompiler(@NotNull Compiler compiler,
@NotNull Compiler fallBack)
Construct a new strict compiler that compiles the unreserved ranges using the given
fallback compiler. |
MandatoryCompiler(@NotNull Compiler compiler)
Construct a new compiler wrapper that wraps the given
compiler and throws
an exception if it fails to compile. |
Modifier and Type | Field and Description |
---|---|
protected @NotNull Compiler |
CompilerProcessor.compiler
The compiler used by this processor.
|
Constructor and Description |
---|
CompilerProcessor(@NotNull Compiler compiler)
Construct a new compiler processor that compiles using the given
compiler . |
Modifier and Type | Method and Description |
---|---|
@Nullable Instruction |
Compiler.compile(@NotNull Compiler compiler,
@NotNull Compilation compilation,
@NotNull Tree tree)
Compile the given
tree and the trees in it. |