Browse
 
Tools
Rss Categories

LVGrammar::LoadGrammarFromBuffer

Reference Number: AA-00868 Views: 6422 0 Rating/ Voters

Loads a grammar from a null terminated string buffer. Grammar can be written in ABNF or XML notations.

Function

  • int LoadGrammarFromBuffer(const char* gram_contents)

Parameters

gram_contents

A null terminated string containing the contents of a valid SRGS grammar.

Return Values

LV_SUCCESS

No errors; this grammar is now ready for use.

LV_GRAMMAR_SYNTAX_WARNING

The grammar file was not fully conforming, but it was understandable and is now ready to be used

LV_GRAMMAR_SYNTAX_ERROR

The grammar file was not understandable to the grammar compiler. You will not be able to decode with this grammar.

LV_GRAMMAR_LOADING_ERROR

The grammar compiler was unable to find the location of the grammar you loaded.

Remarks

Detailed error and warning messages are sent to the grammar object's logging callback function.

See Also