Skip to main content

Crate shannon_brush_parser

Crate shannon_brush_parser 

Source
Expand description

Implements a tokenizer and parsers for POSIX / bash shell syntax.

Modules§

arithmetic
Parser for shell arithmetic expressions.
ast
Defines the Abstract Syntax Tree (ast) for shell programs. Includes types and utilities for manipulating the AST.
pattern
Implements parsing for shell glob and extglob patterns.
prompt
Parser for shell prompt syntax (e.g., PS1).
readline_binding
Implements a parser for readline binding syntax.
test_command
Parser for shell test commands.
word
Parser for shell words, used in expansion and other contexts.

Structs§

ParseErrorLocation
Represents a parsing error with its location information
Parser
Implements parsing for shell programs.
ParserBuilder
Use builder syntax to set the inputs and finish with build().
ParserOptions
Options used to control the behavior of the parser.
SourceInfo
Information about the source of tokens.
SourcePosition
Represents a position in source text.
SourcePositionOffset
Represents an offset in source text.
SourceSpan
Represents a span within source text.
TestCommandParseError
Represents an error that occurred while parsing a (non-extended) test command.
TokenizerOptions
Options controlling how the tokenizer operates.

Enums§

BindingParseError
Represents an error that occurred while parsing a key-binding specification.
ParseError
Represents an error that occurred while parsing tokens.
ParserImpl
Parser implementation to use
Token
Represents a token extracted from a shell script.
TokenizerError
Represents an error that occurred during tokenization.
WordParseError
Represents an error that occurred while parsing a word.

Functions§

parse_tokens
Parses a sequence of tokens into the abstract syntax tree (AST) of a shell program.
tokenize_str
Break the given input shell script string into tokens, returning the tokens.
tokenize_str_with_options
Break the given input shell script string into tokens, returning the tokens.
uncached_tokenize_str
Break the given input shell script string into tokens, returning the tokens. No caching is performed.
unquote_str
Return a string with all the quoting removed.

Type Aliases§

TokenLocation
Compatibility alias for SourceSpan.