Skip to main content

Crate dbt_antlr4

Crate dbt_antlr4 

Source
Expand description

§dbt-antlr4 runtime

This is a Rust runtime for ANTLR4 parser generator. It is required to use parsers and lexers generated by ANTLR4 parser generator

This documentation refers to particular api used by generated parsers,lexers and syntax trees.

For info on what is ANTLR4 and how to generate parser please refer to:

Documentation for this crate is still a work in progress, but you can find some docs in the source code, and also refer to the Java runtime documentation for general concepts and architecture of the runtime, as well as for documentation of internal modules that are not yet documented in Rust.

Re-exports§

pub use input_stream::InputStream;

Modules§

char_stream
IntStream extension for Lexer that allows subslicing of underlying data
common_token_stream
Channel based TokenStream
error_listener
Error reporting
error_strategy
Error handling and recovery
errors
Error types
input_stream
Input to lexer
int_stream
<ost generic stream of symbols
lexer
Lexer implementation
lexer_atn_simulator
Implementation of lexer automata(DFA)
parser
Base parser implementation
parser_atn_simulator
Base parser implementation
parser_rule_context
Full parser node
rule_context
Minimal parser node
token
Symbols that parser works on
token_factory
How Lexer should produce tokens
token_stream
IntStream that produces tokens for Parser
tree
General AST
trees
A set of utility routines useful for all kinds of ANTLR trees.
vocabulary
Mapping from symbol type to its string representation

Macros§

cast_unchecked
check_version
impl_deref
impl_listener_dispatch
impl_node_inner
impl_node_kind
impl_node_kind_common
impl_parser_rule_context
impl_rule_context
impl_token_source
impl_tree
impl_tree_trait_delegates
impl_visitable
maybe_grow_stack

Structs§

Arena
BailErrorStrategy
This implementation of ANTLRErrorStrategy responds to syntax errors by immediately canceling the parse operation with a ParseCancellationException. The implementation ensures that the ParserRuleContext.exception field is set for all parse tree nodes that were not completed prior to encountering the error.
BaseLexer
Default implementation of Lexer
BaseParser
Abstract base parser implementation
DefaultErrorStrategy
This is the default implementation of ErrorStrategy used for error reporting and recovery in ANTLR parsers.
ListenerId
Allows to safely cast listener back to user type

Enums§

PredictionMode
This enum defines the prediction modes available in ANTLR 4 along with utility methods for analyzing configuration sets for conflicts and/or ambiguities.

Constants§

STACKER_GROWTH_BYTES
STACKER_RED_ZONE_BYTES
VERSION_MAJOR
VERSION_MINOR

Traits§

ErrorStrategy
The interface for defining strategies to deal with syntax errors encountered during a parse by ANTLR-generated parsers. We distinguish between three different kinds of errors:
Lexer
Lexer functionality required by LexerATNSimulator to work properly
Parser
parser functionality required for ParserATNSimulator to work
TokenSource
Produces tokens to be used by parser (aka Lexer).

Functions§

version_str_eq