17.5.5.7Class ProxyRule

Rule combining one or more sub-rules.

Class ProxyRule( rules, nextState, actionPre, actionPost ) from \
                 Rule(( nextState, actionPre))
rules An array of rules that may be matched.
nextState The state where to go if a sub-rule is matched.
actionPre An action to run as action(context, winningRule) before winning rule action is performed.
actionPost An action to run as action(context, winningRule) after winning rule action is performed.

If nextState is nil, then the winning rule state transition is applied, otherwise nextstate overrides winning rule state setting.

If nextState contains a "*" character, it is replaced with the state from the rule. So, you can have "#pop;*" to first pop the current state and then apply the state transition from the winner rule.

Properties
actionPost
hasState
incState
origState
rules
winningRule
Methods
apply
match
Properties inherited from class Rule
action
lookAhead
matchLen
nextState
Methods inherited from class Rule
apply
match

Properties

actionPost

hasState

incState

origState

rules

winningRule

Methods

apply

apply( ctx )

match

match( text, pos )
Made with http://www.falconpl.org