kawa.lang
public class SyntaxTemplate extends Object implements Externalizable
(syntax template).
| Constructor Summary | |
|---|---|
| protected | SyntaxTemplate() |
| SyntaxTemplate(String patternNesting, String template_program, Object[] literal_values, int max_nesting) | |
| SyntaxTemplate(Object template, SyntaxForm syntax, Translator tr) | |
| Method Summary | |
|---|---|
| int | convert_template(Object form, SyntaxForm syntax, StringBuffer template_program, int nesting, Vector literals_vector, Object seen, boolean isVector, Translator tr) Recursively translate a syntax-rule template to a template program. |
| Object | execute(Object[] vars, TemplateScope templateScope) Expand this template
The compiler translates (syntax template)
to a call to this method. |
| Object | execute(Object[] vars, Translator tr, TemplateScope templateScope) |
| void | readExternal(ObjectInput in) |
| void | writeExternal(ObjectOutput out) |
Parameters: form the template from the syntax-rule syntax if non-null, the closest surrounding SyntaxForm template_program (output) the translated template nesting the depth of ... we are inside literals_vector (output) the literal data in the template tr the current Translator
Returns: the index of a pattern variable (in pattern_names)
that is nested at least as much as nesting;
if there is none such, -1 if there is any pattern variable or elipsis;
and -2 if the is no pattern variable or elipsis.
(syntax template)
to a call to this method.Serial Data: