quick start:g++ [flags ...] file ... -l /isip/tools/lib/$ISIP_BINARY/lib_mmedia.a #include <JSGFToken.h> JSGFToken(); boolean setToken(const String& arg_a); boolean printToken(); String getTerminal(); boolean setCoordinate(long row_a, long col_a);
description:JSGFToken jt; String token_str(L"public"); jt.setToken(token_str); jt.printToken();
static const String CLASS_NAME = L"JSGFToken";
static const long DEF_TOKEN_TYPE = 0;
static const String DEF_HEADER = L"";
static const String DEF_KEYWORD = L"";
static const String DEF_GRAMMAR_NAME = L"";
static const String DEF_IMPORT_GRAMMAR = L"";
static const String DEF_RULENAME = L"";
static const String DEF_TERMINAL = L"";
static const String DEF_OPERATOR = L"";
static const String DEF_TAG = L"";
static const String DEF_COMMENT = L"";
static const Float DEF_WEIGHT = 0;
static const long DEF_TERM_ROW = 0;
static const long DEF_TERM_COL = 0;
static const long ERR = 50200;
Long token_type_d;
String header_d;
String keyword_d;
String grammar_name_d;
String import_grammar_d;
String rulename_d;
String terminal_d;
String operator_d[2];
String tag_d;
String comment_d;
Float weight_d;
long term_row_d;
long term_col_d;
static MemoryManager mgr_d;
static const String& name();
static boolean diagnose(Integral::DEBUG level_a);
boolean debug(const unichar* msg_a) const;
~JSGFToken();
JSGFToken();
boolean assign(const JSGFToken& arg_a);
JSGFToken& operator=(const JSGFToken& arg_a);
boolean eq(const JSGFToken& arg_a) const;
boolean operator==(const JSGFToken& arg_a) const;
boolean read(Sof& sof, long tag, const String& cname = CLASS_NAME);
boolean write(Sof& sof, long tag, const String& cname = CLASS_NAME) const;
static void* operator new(size_t size);
static void* operator new[](size_t size);
static void operator delete(void* ptr);
static void operator delete[](void* ptr);
static boolean setGrowSize(long grow_size);
boolean clear(Integral::CMODE ctype_a);
boolean setToken(const String& arg_a);
boolean setCoordinate(long row_a, long col_a);
String getTerminal();
long precedence();
boolean printToken();
boolean isHeader(const String& arg_a);
boolean isKeyword(const String& arg_a);
boolean isGrammarName(const String& arg_a);
boolean isImportGrammar(const String& arg_a);
boolean isRulename(const String& arg_a);
boolean isTerminal(const String& arg_a);
boolean isOperator(const String& arg_a);
boolean isTag(const String& arg_a);
boolean isComment(const String& arg_a);
boolean isWeight(const String& arg_a);
// isip include files // #include <JSGFToken.h> // declare two JSGFToken instances // JSGFToken jt_1, jt_2; // define two JSGF token strings // String token_str_1(L"<polite>"); String token_str_2(L"hello"); // set token // jt_1.setToken(token_str_1); jt_2.setToken(token_str_2); // print the first token // Console::put(L"The first token is:"); jt_1.printToken(); // get and output the terminal symbol of the second token // String symbol = jt_2.getTerminal(); Console::put(L"\nThe terminal symbol of the second token is:"); Console::put(symbol); // set the second token's location in graph // long row = 3; long col = 4; jt_2.setCoordinate(row, col); // output the token information after the settings // Console::put(L"\nThe information about the second token is:"); jt_2.debug(L"token");