Пример #1
0
 /**
  * Return the lexeme representing or held by this token.
  *
  * @return The lexeme string.
  */
 public String lexeme() {
   if (kind.hasStaticLexeme()) {
     return kind.default_lexeme;
   } else {
     return lexeme;
   }
 }
Пример #2
0
  public String toString() {
    String str = kind.name();

    if (!kind.hasStaticLexeme()) str += "(" + lexeme() + ")";

    str += "(";
    str += "lineNum:" + lineNum;
    str += ", ";
    str += "charPos:" + charPos;
    str += ")";

    return str;
  }
Пример #3
0
 public String lexeme() {
   return kind.hasStaticLexeme() ? kind.default_lexeme : lexeme;
 }