Module: ANTLR3::Constants
- Included in:
- ANTLR3, AST::CommonErrorNode, AST::CommonTreeAdaptor, AST::TreeAdaptor, AST::TreeNodeStream, AST::Wizard, AST::Wizard::PatternLexer, AST::Wizard::PatternParser, CharacterStream, DFA, Error::RecognitionError, Profile::Profiler, Recognizer, Stream, Token, TokenSource
- Defined in:
- lib/antlr3/constants.rb,
lib/antlr3/token.rb
Overview
A simple module to keep track of the various built-in token types, channels, and token names used by ANTLR throughout the runtime library.
Constant Summary collapse
- EOF_TOKEN =
End of File / End of Input character and token type
CommonToken.new( EOF ).freeze
- INVALID_TOKEN =
CommonToken.new( INVALID_TOKEN_TYPE ).freeze
- SKIP_TOKEN =
CommonToken.new( INVALID_TOKEN_TYPE ).freeze
- DEFAULT =
the channel to which most tokens will be assigned
DEFAULT_CHANNEL = DEFAULT_TOKEN_CHANNEL = :default
- HIDDEN =
the channel for tokens which should not be passed to a parser by a token stream
HIDDEN_CHANNEL = :hidden
- MEMO_RULE_FAILED =
flag used by recognizers during memoization to represent a previous prediction failure
-2
- MEMO_RULE_UNKNOWN =
flag used by recognizers during memoization to indicate that the rule has not been memoized yet
-1
- INVALID =
built-in token types used internally by ANTLR3
INVALID_TOKEN_TYPE = 0
- EOF =
-1
- UP =
Imaginary tree-navigation token type indicating the ascent after moving through the children of a node
3
- DOWN =
Imaginary tree-navigation token type indicating a descent into the children of a node
2
- EOR_TOKEN_TYPE =
End of Rule (used internally by DFAs)
1
- MIN_TOKEN_TYPE =
The smallest possible value of non-builtin ANTLR-generated token types
4
- BUILT_IN_TOKEN_NAMES =
A hash mapping built in token types to their respective names returning a string “<UNKNOWN: #type>” for non-builtin token types
Hash.new do |h, k| "<UNKNOWN: #{ k }>" end
- INVALID_NODE =
CommonTree.new( ANTLR3::INVALID_TOKEN )