Reference

Class

RiGrammar

Name

expand

Description Expands a grammar from the supplied rule. If no rule is provided the \$start and #60;start>' symbols will be checked respectively.
Example
rg = new RiGrammar(rules); 
result = rg.expand(ruleName);
Parameters
Stringthe rule name to be expanded (optional)
Object
(or Map in Java)
the context for any referenced variables or functions (optional)
Returns
Stringthe result of the expansion (or an error if the rule is not found)
Syntax
expand();
expand(context);
Platform Java / JavaScript