1package org.antlr.runtime { 2 public class TokenConstants { 3 public static const EOR_TOKEN_TYPE:int = 1; 4 5 /** imaginary tree navigation type; traverse "get child" link */ 6 public static const DOWN:int = 2; 7 /** imaginary tree navigation type; finish with a child list */ 8 public static const UP:int = 3; 9 10 public static const MIN_TOKEN_TYPE:int = UP+1; 11 12 public static const EOF:int = CharStreamConstants.EOF; 13 public static const EOF_TOKEN:Token = new CommonToken(EOF); 14 15 public static const INVALID_TOKEN_TYPE:int = 0; 16 public static const INVALID_TOKEN:Token = new CommonToken(INVALID_TOKEN_TYPE); 17 18 /** In an action, a lexer rule can set token to this SKIP_TOKEN and ANTLR 19 * will avoid creating a token for this symbol and try to fetch another. 20 */ 21 public static const SKIP_TOKEN:Token = new CommonToken(INVALID_TOKEN_TYPE); 22 23 /** All tokens go to the parser (unless skip() is called in that rule) 24 * on a particular "channel". The parser tunes to a particular channel 25 * so that whitespace etc... can go to the parser on a "hidden" channel. 26 */ 27 public static const DEFAULT_CHANNEL:int = 0; 28 29 /** Anything on different channel than DEFAULT_CHANNEL is not parsed 30 * by parser. 31 */ 32 public static const HIDDEN_CHANNEL:int = 99; 33 34 } 35}