Reference

Class

RiGrammar

Name

load

Description Loads a grammar from a String or YAML/JSON object
Syntax
load(grammarRules);
Parameters
String or Objecta String or (YAML/JSON) Object representation of the grammar
Returns
Objectthis RiGrammar object
Example
rg = new RiGrammar(); 
rg.load("<start>: the <pet> | the <action> of the <pet>");
Platform Java / Javascript