< prev index next >

src/jdk.compiler/share/classes/com/sun/tools/javac/parser/Lexer.java

Print this page




  43      * Consume the next token.
  44      */
  45     void nextToken();
  46 
  47     /**
  48      * Return current token.
  49      */
  50     Token token();
  51 
  52     /**
  53      * Return token with given lookahead.
  54      */
  55     Token token(int lookahead);
  56 
  57     /**
  58      * Return the last character position of the previous token.
  59      */
  60     Token prevToken();
  61 
  62     /**
  63      * Splits the current token in two and return the first (splitted) token.
  64      * For instance {@literal '<<<'} is split into two tokens
  65      * {@literal '<'} and {@literal '<<'} respectively,
  66      * and the latter is returned.
  67      */
  68     Token split();
  69 
  70     /**
  71      * Return the position where a lexical error occurred;
  72      */
  73     int errPos();
  74 
  75     /**
  76      * Set the position where a lexical error occurred;
  77      */
  78     void errPos(int pos);
  79 
  80     /**
  81      * Build a map for translating between line numbers and
  82      * positions in the input.
  83      *


  43      * Consume the next token.
  44      */
  45     void nextToken();
  46 
  47     /**
  48      * Return current token.
  49      */
  50     Token token();
  51 
  52     /**
  53      * Return token with given lookahead.
  54      */
  55     Token token(int lookahead);
  56 
  57     /**
  58      * Return the last character position of the previous token.
  59      */
  60     Token prevToken();
  61 
  62     /**
  63      * Splits the current token in two and return the first (split) token.
  64      * For instance {@literal '<<<'} is split into two tokens
  65      * {@literal '<'} and {@literal '<<'} respectively,
  66      * and the latter is returned.
  67      */
  68     Token split();
  69 
  70     /**
  71      * Return the position where a lexical error occurred;
  72      */
  73     int errPos();
  74 
  75     /**
  76      * Set the position where a lexical error occurred;
  77      */
  78     void errPos(int pos);
  79 
  80     /**
  81      * Build a map for translating between line numbers and
  82      * positions in the input.
  83      *
< prev index next >