/** * Gets the word from the given grammar ndoe * * @param node the node of interest * @return the word (or null if the node has no word) */ private String GetWord(GrammarNode node) { String word = null; if (node.GetNumAlternatives() > 0) { Word[][] alternatives = node.Alternatives; word = alternatives[0][0].Spelling; } return(word); }
/** * Determines if the node has a word * * @param node the grammar node of interest * @return true if the node has a word */ private bool HasWord(GrammarNode node) { return(node.GetNumAlternatives() > 0); }