예제 #1
0
        /**
         * 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);
        }
예제 #2
0
 /**
  * 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);
 }