return d;
}
public void beginParse(IContext ctx) {
CodeBuilder cb = ctx.getCodeBuilder();
IDialect d = cb.requiredDialect;
if (null == d) {
d = ctx.getDialect();
if (null != d) {
// try the next available
d = nextAvailable(d);
if (null == d) throw new NullPointerException("No dialect can process the template");
} else {
// guess the most capable
String template = ctx.getRemain();
for (IDialect d0 : defDialects) {
if (d0.isMyTemplate(template)) {
d = d0;
break;
}
}
}
}
ctx.setDialect(d);
push(d);
d.begin(ctx);
}