TagsBegin and TagsEnd provide iterators for visiting the tags in the tree's body.
LVParseTree::TagIterator TagsBegin ()
LVParseTree::TagIterator TagsEnd ()
The following code prints out every tag in a parse tree.
LVParseTree::TagIterator Itr = Tree.TagsBegin();
LVParseTree::TagIterator End = Tree.TagsEnd();
for (; Itr != End; Itr++)
{
cout << Itr->Text() << ";" << endl;
}
If the grammar was the top level navigation example grammar, and the engine recognized "go back", the the above code would print out:
$ = "APPLICATION_BACK";
The TagIterator does not visit the tags in a tree's header. Use LVParseTree::HeaderTag to access the contents of those tags.
LVParseTree_GetTagIteratorBegin and LVParseTree_GetTagIteratorEnd (C API)
Complete Help Topic List | Speech Engine Product Information