Add rules to a grammar object.
- int LVGrammar_AddRule(HGRAMMAR hgram, const char* rule_name, const char* rule_definition)
A handle to the grammar.
The name of the rule
The definition of the rule
No errors; the rule has been successfully added or removed.
The new rule was not fully conforming, but it was understandable and is now ready to be used
The new rule was not understandable to the grammar compiler. You will not be able to decode with this grammar.
LVGrammar_AddRule(hgram, "foo", "hello [world]");
Is the same as writing a rule:
$foo = hello [world];
New rules must be written into the grammar in ABNF notation.
Detailed error and warning messages are sent to the grammar object's logging callback function.