Expand description
rustixml - Native iXML Parser
A pure Rust implementation of the Invisible XML (iXML) specification. Works natively in Rust and compiles to WebAssembly for browser use.
ยงQuick Start
use rustixml::{parse_ixml_grammar, NativeParser};
let grammar = r#"
greeting: "Hello, ", name, "!".
name: letter+.
letter: ["A"-"Z"; "a"-"z"].
"#;
let ast = parse_ixml_grammar(grammar).expect("Invalid grammar");
let parser = NativeParser::new(ast);
let xml = parser.parse("Hello, World!").expect("Parse failed");
println!("{}", xml);ยงFeatures
- ๐ Fast native recursive descent parser
- โ 75.4% conformance with iXML specification (49/65 tests)
- ๐ WebAssembly support for browser use
- ๐ฆ Single dependency (unicode-general-category)
- ๐ Pure safe Rust
Re-exportsยง
pub use ast::IxmlGrammar;pub use grammar_ast::parse_ixml_grammar;pub use native_parser::NativeParser;pub use parse_context::ParseContext;pub use parse_context::ParseError;pub use parse_context::ParseResult;
Modulesยง
- ast
- AST (Abstract Syntax Tree) for iXML grammars
- charclass
- Character class handling for iXML parser
- grammar_
analysis - Grammar Analysis
- grammar_
ast - Token-based iXML grammar parser that produces AST
- grammar_
parser - Handwritten recursive descent parser for iXML grammars
- input_
stream - Input stream with position tracking and backtracking support
- lexer
- Lexer for iXML grammar syntax
- native_
parser - Native iXML interpreter - direct implementation of iXML specification
- normalize
- Grammar Normalization
- parse_
context - Parse context and result types for native interpreter
- xml_
node - XML node representation for parse results