protected function doCompile($_content) { /* here is where the compiling takes place. Smarty
tags in the templates are replaces with PHP code,
then written to compiled files. */
// init the lexer/parser to compile the template
$this->lex =
new $this->
lexer_class($_content,
$this);
$this->parser =
new $this->
parser_class($this->lex,
$this);
if ($this->smarty->_parserdebug
) $this->parser->
PrintTrace();
// get tokens from lexer and parse them
while ($this->lex->
yylex() && !
$this->abort_and_recompile
) { if ($this->smarty->_parserdebug
) { echo "<pre>Line {
$this->lex->line
} Parsing {
$this->parser->yyTokenName
[$this->lex->token
]} Token " .
htmlentities($this->lex->value
) . "</pre>";
} $this->parser->
doParse($this->lex->token,
$this->lex->value
);
}