Reference

Class

RiGrammar

Name

getGrammar

Description Gets the current grammar as a String
Syntax
grammar();
Returns
Stringa string representation of the grammar
Example
rg = new RiGrammar(); 
rg.addRule("<start>", "the <action> of the <pet>", 1);
rg.addRule("<pet>", "dog | hawk | crow", 1);
rg.addRule("<action>", "cries | screams | falls", 1);
println(rg.getGrammar());
Platform Java / Javascript