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