Edit
Attach
P
rintable
r2 - 16 Jan 2007 - 04:12:02 -
TWikiContributor
You are here:
TWiki
>
TWiki Web
>
TWikiIfDotPm
---+ Package =TWiki::If= Support for the conditions in %IF{} statements. Basically a simple stack-based parser for infix expressions that generates a parse tree that can subsequently be evaluated. %TOC% ---++ ClassMethod *new* <tt>(\%operators) -> \%factory</tt> Construct a new if node factory. * =\%operators= reference to a hash of operators. Each operator must have the following fields: prec (precedence) type (0 unary 1 binary) exec (ref to a function to execute). If not provided, the default set of boolean operations supported by %IF is used. ---++ ObjectMethod *evaluate* <tt>($twiki) -> $result</tt> Execute the parse node. !!!new!!! ---++ ObjectMethod *parse* <tt>($string) -> \$if</tt> * =$string= - string containing an expression to parse Construct a new search node by parsing the passed expression. Return the new object.
Edit
|
Attach
|
P
rintable
|
V
iew topic
|
Backlinks:
We
b
,
A
l
l Webs
|
H
istory
:
r2
<
r1
|
More topic actions...
TWiki
Log In
or
Register
TWiki Web
Users
Groups
Index
Search
Changes
Notifications
Statistics
Preferences
User Reference
ATasteOfTWiki
TextFormattingRules
TWikiVariables
FormattedSearch
TWikiDocGraphics
TWikiSkinBrowser
InstalledPlugins
Admin Maintenance
Reference Manual
AdminToolsCategory
InterWikis
ManagingWebs
TWikiSiteTools
TWikiPreferences
WebPreferences
Categories
Admin Documentation
Admin Tools
Developer Doc
User Documentation
User Tools
Main Webs
DI
EL
Education
Events
JoseLuisSilva
Personal
Research
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback
Note:
Please contribute updates to this topic on TWiki.org at
TWiki:TWiki.TWikiIfDotPm