Crate unilang_instruction_parser

Crate unilang_instruction_parser 

Source
Expand description

Alias crate for unilang_parser. Re-exports unilang_parser for backward compatibility.

Modules§

config
unilang_parser is a Rust crate designed to parse unilang CLI-like instruction strings. It leverages strs_tools for initial itemization (splitting the input string into lexical tokens) and then performs syntactic analysis to produce structured GenericInstruction objects.
error
Defines error types for the parser. Defines error types for the unilang instruction parser.
instruction
Defines instruction and argument structures. Defines the core instruction and argument structures for unilang.
item_adapter
Adapts and classifies items from the splitter. Adapters for converting raw string splits into rich, classified tokens.
parser_engine
Contains the core parsing engine. Parser for Unilang instructions.
prelude
Prelude for commonly used items.

Structs§

Argument
Represents a single argument to a command, either positional or named.
GenericInstruction
Represents a generic instruction parsed from the input string or slice.
ParseError
Represents a parsing error with its kind and location.
Parser
The main parser struct.
RichItem
Represents a token with its original split information and classified kind.
StrSpan
Represents a span of characters in the source string.
UnilangParserOptions
Configuration options for the Unilang parser.

Enums§

ErrorKind
Kinds of parsing errors.
SourceLocation
Represents a location in the source string.
UnilangTokenKind
Represents the classified kind of a unilang token.

Functions§

classify_split
Classifies a strs_tools::Split into a UnilangTokenKind and returns its adjusted source location. Classifies a strs_tools::Split into a UnilangTokenKind and adjusts its SourceLocation.