[−][src]Trait antlr_rust::Lexer
Lexer functionality required by LexerATNSimulator
to work properly
Associated Types
Loading content...Required methods
pub fn input(&mut self) -> &mut Self::Input
[src]
Same as TokenStream::get_input_stream
but returns concrete type instance
important for proper inlining in hot code of LexerATNSimulator
pub fn set_channel(&mut self, v: isize)
[src]
Sets channel where current token will be pushed
By default two channels are available:
LEXER_DEFAULT_TOKEN_CHANNEL
LEXER_HIDDEN
pub fn push_mode(&mut self, m: usize)
[src]
Pushes current mode to internal mode stack and sets m
as current lexer mode
`pop_mode should be used to recover previous mode
pub fn pop_mode(&mut self) -> Option<usize>
[src]
Pops mode from internal mode stack
pub fn set_type(&mut self, t: isize)
[src]
Sets type of the current token Called from action to override token that will be emitted by lexer
pub fn set_mode(&mut self, m: usize)
[src]
Sets lexer mode discarding current one
pub fn more(&mut self)
[src]
Used to informs lexer that it should consider next token as a continuation of the current one
pub fn skip(&mut self)
[src]
Tells lexer to completely ignore and not emit current token.
Implementors
impl<'input, T, Input, TF> Lexer<'input> for BaseLexer<'input, T, Input, TF> where
T: LexerRecog<'input, Self> + 'static,
Input: CharStream<TF::From>,
TF: TokenFactory<'input>,
[src]
T: LexerRecog<'input, Self> + 'static,
Input: CharStream<TF::From>,
TF: TokenFactory<'input>,