CBTCompiler Class Reference

List of all members.

Public Member Functions

 CBTCompiler ($text)
 compile ()
 Compile the text.
 doText ($start, $end)
 Shortcut for doOpenText( $start, $end, false.
 phpQuote ($text)
 op ($opcode, $arg1=null, $arg2=null)
 doOpenText (&$p, $end, $needClosing=true)
 Recursive workhorse for text mode.
 doOpenFunction (&$p, $end, $needClosing=true)
 Recursive workhorse for function mode.
 error ($text, $pos=false)
 Set a flag indicating that an error has been found.
 getLastError ()
 opsToString ()
 generatePHP ($functionObj)

Public Attributes

 $mOps = array()
 $mCode


Detailed Description

Definition at line 65 of file CBTCompiler.php.


Member Function Documentation

CBTCompiler::CBTCompiler ( text  ) 

Definition at line 69 of file CBTCompiler.php.

References $text.

CBTCompiler::compile (  ) 

Compile the text.

Returns true on success, error message on failure

Definition at line 77 of file CBTCompiler.php.

References $text, and doText().

CBTCompiler::doOpenFunction ( &$  p,
end,
needClosing = true 
)

Recursive workhorse for function mode.

Processes function mode starting from offset $p, until either $end is reached or a closing brace is found. If $needClosing is false, a closing brace will flag an error, if $needClosing is true, the lack of a closing brace will flag an error.

The parameter $p is advanced to the position after the closing brace, or after the end. A CBTValue is returned.

Access:
private

Definition at line 213 of file CBTCompiler.php.

References $end, $in, $start, doOpenText(), error(), and op().

Referenced by doOpenText().

CBTCompiler::doOpenText ( &$  p,
end,
needClosing = true 
)

Recursive workhorse for text mode.

Processes text mode starting from offset $p, until either $end is reached or a closing brace is found. If $needClosing is false, a closing brace will flag an error, if $needClosing is true, the lack of a closing brace will flag an error.

The parameter $p is advanced to the position after the closing brace, or after the end. A CBTValue is returned.

Access:
private

Definition at line 135 of file CBTCompiler.php.

References $end, $in, $start, doOpenFunction(), error(), and op().

Referenced by doOpenFunction(), and doText().

CBTCompiler::doText ( start,
end 
)

Shortcut for doOpenText( $start, $end, false.

Definition at line 110 of file CBTCompiler.php.

References $end, $start, and doOpenText().

Referenced by compile().

CBTCompiler::error ( text,
pos = false 
)

Set a flag indicating that an error has been found.

Definition at line 260 of file CBTCompiler.php.

References $text.

Referenced by doOpenFunction(), and doOpenText().

CBTCompiler::generatePHP ( functionObj  ) 

Definition at line 288 of file CBTCompiler.php.

References $args, $fname, $result, phpQuote(), wfProfileIn(), and wfProfileOut().

CBTCompiler::getLastError (  ) 

Definition at line 269 of file CBTCompiler.php.

CBTCompiler::op ( opcode,
arg1 = null,
arg2 = null 
)

Definition at line 118 of file CBTCompiler.php.

Referenced by doOpenFunction(), and doOpenText().

CBTCompiler::opsToString (  ) 

Definition at line 273 of file CBTCompiler.php.

References $s.

CBTCompiler::phpQuote ( text  ) 

Definition at line 114 of file CBTCompiler.php.

References $text.

Referenced by generatePHP().


Member Data Documentation

CBTCompiler::$mCode

Definition at line 67 of file CBTCompiler.php.

CBTCompiler::$mOps = array()

Definition at line 66 of file CBTCompiler.php.


The documentation for this class was generated from the following file:

Generated on Sat Sep 5 02:08:34 2009 for MediaWiki by  doxygen 1.5.9