unilang_instruction_parser

Crates.iounilang_instruction_parser
lib.rsunilang_instruction_parser
version0.2.0
created_at2025-07-20 21:31:08.855793+00
updated_at2025-07-23 21:26:07.983832+00
descriptionAlias crate for `unilang_parser`. Re-exports `unilang_parser` for backward compatibility.
homepagehttps://github.com/Wandalen/wTools/tree/master/module/alias/unilang_instruction_parser
repositoryhttps://github.com/Wandalen/wTools/tree/master/module/alias/unilang_instruction_parser
max_upload_size
id1761423
size21,765
Wandalen (Wandalen)

documentation

https://docs.rs/unilang_instruction_parser

README

unilang_instruction_parser

Crates.io Documentation License: MIT

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

overview

This crate serves as a compatibility alias for the core unilang_parser library, which provides syntactic analysis for CLI-like instruction strings within the Unilang Framework. It enables parsing of command strings into structured GenericInstruction objects.

key_features

  • command_path_parsing: Multi-segment command paths (namespace.command)
  • argument_processing: Both positional and named arguments (key::value)
  • quoting_support: Single and double quotes with escape sequences
  • help_operator: Built-in ? help request handling
  • multiple_instructions: Sequence parsing with ;; separator
  • robust_error_reporting: Detailed parse errors with source locations

usage

use unilang_instruction_parser::{Parser, UnilangParserOptions};

let parser = Parser::new(UnilangParserOptions::default());
let input = "log.level severity::debug message::'Hello World!'";

match parser.parse_single_instruction(input) {
    Ok(instruction) => {
        println!("Command: {:?}", instruction.command_path_slices);
        println!("Named args: {:?}", instruction.named_arguments);
    },
    Err(e) => eprintln!("Parse error: {}", e),
}

migration_notice

This is an alias crate that re-exports unilang_parser. For new projects, consider using unilang_parser directly. This crate exists to maintain backward compatibility for existing code.

documentation

For complete documentation and examples, see:

license

MIT License. See LICENSE file for details.

Commit count: 998

cargo fmt