Reference

Class

RiGrammar

Name

expandFrom

Description Expands the grammar, starting from the given symbol.
 
RiGrammar.expand() is equivalent to RiGrammar.expandFrom('<start>').
Syntax
expandFrom(rule);
expandFrom(rule, callbackObject);
Parameters
Stringthe rule from which to start the expansion
Objectthe object on which to call any (back-ticked) callback functions (optional)
Returns
Stringthe result of the expansion
Example
rg = new RiGrammar(stringOrObject); 
result = rg.expandFrom('<start>');
Platform Java / Javascript