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§
- Parse
Error Location - Represents a parsing error with its location information
- Parser
- Implements parsing for shell programs.
- Parser
Options - Options used to control the behavior of the parser.
- Source
Info - Information about the source of tokens.
- Source
Position - Represents a position in a source shell script.
- Test
Command Parse Error - Represents an error that occurred while parsing a (non-extended) test command.
- Token
Location - Represents the location of a token in its source shell script.
- Tokenizer
Options - Options controlling how the tokenizer operates.
Enums§
- Binding
Parse Error - Represents an error that occurred while parsing a key-binding specification.
- Parse
Error - Represents an error that occurred while parsing tokens.
- Token
- Represents a token extracted from a shell script.
- Tokenizer
Error - Represents an error that occurred during tokenization.
- Word
Parse Error - 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.