// file: $isip/class/asr/JSGFToken/jt_01.cc // version: $Id: jt_01.cc 10500 2006-03-15 21:44:09Z may $ // // isip include files // #include #include "JSGFToken.h" // method: debug // // arguments: // const unichar* msg: (input) message to print // // return: a bool8 value indicating status // bool8 JSGFToken::debug(const unichar* msg_a) const { // declare local variables // String output; // output an information message // output.debugStr(name(), msg_a, L":"); Console::put(output); Console::increaseIndention(); // display the token type // output.debugStr(name(), msg_a, L"token_type_d"); Console::put(output); Long token_type(token_type_d); token_type.debug(L"token type"); // display the header // output.debugStr(name(), msg_a, L"header_d"); Console::put(output); header_d.debug(L"header"); // display the keyword // output.debugStr(name(), msg_a, L"keyword_d"); Console::put(output); keyword_d.debug(L"keyword"); // display the grammar name // output.debugStr(name(), msg_a, L"grammar_name_d"); Console::put(output); grammar_name_d.debug(L"grammar name"); // display the import grammar // output.debugStr(name(), msg_a, L"import_grammar_d"); Console::put(output); import_grammar_d.debug(L"import grammar"); // display the rulename // output.debugStr(name(), msg_a, L"rulename_d"); Console::put(output); rulename_d.debug(L"rulename"); // display the terminal // output.debugStr(name(), msg_a, L"terminal_d"); Console::put(output); terminal_d.debug(L"terminal"); // display the operators // output.debugStr(name(), msg_a, L"operator_d"); Console::put(output); operator_d(0).debug(L"operaotr #1"); operator_d(1).debug(L"operator #2"); // display the tag // output.debugStr(name(), msg_a, L"tag_d"); Console::put(output); tag_d.debug(L"tag"); // display the weight // output.debugStr(name(), msg_a, L"weight_d"); Console::put(output); Float weight(weight_d); weight.debug(L"weight"); // display the terminal row // output.debugStr(name(), msg_a, L"term_row_d"); Console::put(output); Long row(term_row_d); row.debug(L"terminal row"); // display the terminal column // output.debugStr(name(), msg_a, L"term_col_d"); Console::put(output); Long col(term_col_d); col.debug(L"terminal column"); // decrease indention // Console::decreaseIndention(); // exit gracefully // return true; }