Algorithm


Process of work CT++ template engine contains four parts:
  1. Initialization
  2. Parsing template file
  3. Imposing of parameters (the first pass)
  4. Imposing of parameters (the second pass) and a conclusion of results
In the first stage occurs loading of the text of a pattern, automatic loading standard functions set and initialization of necessary variables.

The second stage is a construction of a tree of syntactic analysis of a template file. All syntactic errors are generated at this stage.

During the first pass (the third stage) there is an imposing the parameters which are taking place outside of cycles. It gives a prize for simple patterns in which the simple conclusion of parameters (without conditions and cycles) prevails.

Last stage - imposing of parameters on structures of cycles and conditions and the further conclusion of results.


Copyright © 2003 - 2005 CTPP Dev. Team | http://reki.ru/products/ctpp