SourceForge.net Logo                  

 

РУССКИЙ ENGLISH
Вернуться к оглавлению Back to Contents
Русская версия (скоро)
Parsing procedure

Any static information is represented in source files 'as is'.

All variable nicks are replaced with the values of corresponding variable/constants. When parsing function meets variable nick then the following procedure is executed:

  1. Namespace variable with specified name is looked for.
  2. If namespace variable with specified name is found, its value is placed instead of variable nick otherwise global variable with specified name is looked for.
  3. If the global variable with specified name is found, its value is placed instead of variable nick otherwise constant with specified name is looked for.
  4. If the constant with specified name is found, its value is placed instead of variable nick otherwise empty string is placed instead of variable nick.

Set of functions, which names are started from parseStr, are responsible to make the corresponding replacements.

All file nicks are replaced with the content of file, which name is specified by file nick.

Set of functions, which names are started from parseFile, are responsible to make the corresponding replacements.

An additional parsing possibility is implemented by using the callback tags. Using these tags developer may call any predefined or standard functions.

When parsing function meets callback tag then PHP function with the specified funcname is applied to tag inner and the result returned by this function is placed instead of callback tag.

Warning! If function doesn't exist, callback tag is NOT replaced at all.

Set of functions, which names are started from parseTag, are responsible to make the corresponding replacements.