Пример #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
 public TGt(int line, int pos) {
   super.setText(">");
   setLine(line);
   setPos(pos);
 }
Пример #17
0
 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");
 }