/** * The standard method called to automatically emit a token at the outermost lexical rule. The * token object should point into the char buffer start..stop. If there is a text override in * 'text', use that to set the token's text. Override this method to emit custom Token objects. * * <p>If you are building trees, then you should also override Parser or * TreeParser.getMissingSymbol(). */ public Token emit() { Token t = new CommonToken( input, state.type, state.channel, state.tokenStartCharIndex, getCharIndex() - 1); t.setLine(state.tokenStartLine); t.setText(state.text); t.setCharPositionInLine(state.tokenStartCharPositionInLine); emit(t); return t; }
public TSkip(int line, int pos) { super.setText("skip"); setLine(line); setPos(pos); }
public TEq(int line, int pos) { super.setText("="); setLine(line); setPos(pos); }
public TSyntax(int line, int pos) { super.setText("Syntax"); setLine(line); setPos(pos); }
public TDefine(int line, int pos) { super.setText("define"); setLine(line); setPos(pos); }
public TLBrace(int line, int pos) { super.setText("{"); setLine(line); setPos(pos); }
public TRParen(int line, int pos) { super.setText(")"); setLine(line); setPos(pos); }
public TSoma(int line, int pos) { super.setText("+"); setLine(line); setPos(pos); }
public TUnderscore() { super.setText("_"); }
public TUnderscore(int line, int pos) { super.setText("_"); setLine(line); setPos(pos); }
public TStar() { super.setText("*"); }
public TStar(int line, int pos) { super.setText("*"); setLine(line); setPos(pos); }
public TE() { super.setText("e"); }
public TGteq() { super.setText(">="); }
public TSkip() { super.setText("skip"); }
public TGt(int line, int pos) { super.setText(">"); setLine(line); setPos(pos); }
public TGt() { super.setText(">"); }
public TClasstag(int line, int pos) { super.setText("class"); setLine(line); setPos(pos); }
public TSoma() { super.setText("+"); }
public TClasstag() { super.setText("class"); }
public TRParen() { super.setText(")"); }
public TSub(int line, int pos) { super.setText("-"); setLine(line); setPos(pos); }
public TLBrace() { super.setText("{"); }
public TSub() { super.setText("-"); }
public TDefine() { super.setText("define"); }
public TMinusMinus(int line, int pos) { super.setText("--"); setLine(line); setPos(pos); }
public TSyntax() { super.setText("Syntax"); }
public TMinusMinus() { super.setText("--"); }
public TEq() { super.setText("="); }
public TPostcondition() { super.setText("postcondition"); }