// file: $isip/class/mmedia/JSGFParser/jp_04.cc // version: $Id: jp_04.cc 8929 2002-12-21 01:13:43Z alphonso $ // // isip include files // #include "JSGFParser.h" //------------------------------------------------------------------------- // // class-specified public methods // //------------------------------------------------------------------------- // method: setExpression // // arguments: // 1) String& expression_a: a single line of input grammar // 2) int32 line_a: the number counting input grammar lines // // return: a bool8 value indicating status // bool8 JSGFParser::setExpression(String& expression_a) { // concat input expression line to the // expression_d.concat(expression_a); // add new-line character // expression_d.concat(L"\n"); // exit gracefully // return true; } // method: parseJSGF // // arguments: // const String& graph_start_a: (input) ISIP graph starting symbol // const String& graph_term_a: (input) ISIP graph terminal symbol // // return: a bool8 value indicating status // bool8 JSGFParser::parseJSGF(const String& graph_start_a, const String& graph_term_a) { // set up ISIP graph ending symbols // graph_start_d.assign(graph_start_a); graph_term_d.assign(graph_term_a); // tokenize the JSGF grammar // getToken(); ////////////////debug////////////////////////////////////////// for (int32 i = 0; i < token_vect_d.length(); i++) { JSGFToken t = token_vect_d(i); //t.printToken(); //Console::put(L"**********************************"); } ///////////////debug///////////////////////////////////// // parse and validate the tokenized JSGF grammar // parseGrammar(); // insert each rule definition into the appropriate rule table // setRuleTables(); // draw the DiGraph to represent the JSGF grammar // drawGraph(); // exit gracefully // return true; }