示例#1
0
 /**
  * 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;
 }
示例#2
0
 public TSkip(int line, int pos) {
   super.setText("skip");
   setLine(line);
   setPos(pos);
 }
示例#3
0
 public TEq(int line, int pos) {
   super.setText("=");
   setLine(line);
   setPos(pos);
 }
示例#4
0
 public TSyntax(int line, int pos) {
   super.setText("Syntax");
   setLine(line);
   setPos(pos);
 }
示例#5
0
 public TDefine(int line, int pos) {
   super.setText("define");
   setLine(line);
   setPos(pos);
 }
示例#6
0
 public TLBrace(int line, int pos) {
   super.setText("{");
   setLine(line);
   setPos(pos);
 }
示例#7
0
 public TRParen(int line, int pos) {
   super.setText(")");
   setLine(line);
   setPos(pos);
 }
示例#8
0
 public TSoma(int line, int pos) {
   super.setText("+");
   setLine(line);
   setPos(pos);
 }
示例#9
0
 public TUnderscore() {
   super.setText("_");
 }
示例#10
0
 public TUnderscore(int line, int pos) {
   super.setText("_");
   setLine(line);
   setPos(pos);
 }
示例#11
0
 public TStar() {
   super.setText("*");
 }
示例#12
0
 public TStar(int line, int pos) {
   super.setText("*");
   setLine(line);
   setPos(pos);
 }
示例#13
0
 public TE() {
   super.setText("e");
 }
示例#14
0
 public TGteq() {
   super.setText(">=");
 }
示例#15
0
 public TSkip() {
   super.setText("skip");
 }
示例#16
0
文件: TGt.java 项目: Rajmohan/acre
 public TGt(int line, int pos) {
   super.setText(">");
   setLine(line);
   setPos(pos);
 }
示例#17
0
文件: TGt.java 项目: Rajmohan/acre
 public TGt() {
   super.setText(">");
 }
示例#18
0
 public TClasstag(int line, int pos) {
   super.setText("class");
   setLine(line);
   setPos(pos);
 }
示例#19
0
 public TSoma() {
   super.setText("+");
 }
示例#20
0
 public TClasstag() {
   super.setText("class");
 }
示例#21
0
 public TRParen() {
   super.setText(")");
 }
示例#22
0
 public TSub(int line, int pos) {
   super.setText("-");
   setLine(line);
   setPos(pos);
 }
示例#23
0
 public TLBrace() {
   super.setText("{");
 }
示例#24
0
 public TSub() {
   super.setText("-");
 }
示例#25
0
 public TDefine() {
   super.setText("define");
 }
示例#26
0
 public TMinusMinus(int line, int pos) {
   super.setText("--");
   setLine(line);
   setPos(pos);
 }
示例#27
0
 public TSyntax() {
   super.setText("Syntax");
 }
示例#28
0
 public TMinusMinus() {
   super.setText("--");
 }
示例#29
0
 public TEq() {
   super.setText("=");
 }
示例#30
0
 public TPostcondition() {
   super.setText("postcondition");
 }