Reference

Class

RiGrammar

Name

expand

Description Expands a grammar from its '<start>' symbol. Note: if the grammar does not include a '<start>' symbol, use  expandFrom("ruleName")  instead, to start from the rule of your choice)
Syntax
expand();
expand(callbackObject);
Parameters
Objectthe object on which to call any (back-ticked) callback functions (optional)
Returns
Stringthe result of the expansion (or an error if no <start> rule is found)
Example
rg = new RiGrammar(stringOrObject); 
result = rg.expand();
Platform Java / Javascript