| Crates.io | oak-delphi |
| lib.rs | oak-delphi |
| version | 0.0.1 |
| created_at | 2025-10-20 14:50:56.830483+00 |
| updated_at | 2026-01-23 04:21:24.951043+00 |
| description | Delphi language parser with support for modern Delphi syntax and object-oriented programming features. |
| homepage | https://github.com/ygg-lang/oaks |
| repository | https://github.com/ygg-lang/oaks |
| max_upload_size | |
| id | 1892039 |
| size | 86,375 |
High-performance incremental DOT parser for the oak ecosystem with flexible configuration, optimized for graph description and visualization.
Oak DOT is a robust parser for the DOT graph description language, designed to handle complete DOT syntax including modern features. Built on the solid foundation of oak-core, it provides both high-level convenience and detailed AST generation for graph analysis and visualization.
Basic example:
use oak_dot::{Parser, DotLanguage, SourceText};
fn main() -> Result<(), Box<dyn std::error::Error>> {
let parser = Parser::new();
let source = SourceText::new(r#"
digraph G {
A -> B;
B -> C;
C -> A;
}
"#);
let result = parser.parse(&source);
println!("Parsed DOT graph successfully.");
Ok(())
}
use oak_dot::{Parser, DotLanguage, SourceText};
let parser = Parser::new();
let source = SourceText::new(r#"
graph G {
A -- B -- C;
A -- C;
}
"#);
let result = parser.parse(&source);
println!("Parsed DOT graph successfully.");
use oak_dot::{Parser, DotLanguage, SourceText};
let parser = Parser::new();
let source = SourceText::new(r#"
digraph workflow {
start -> process1;
process1 -> decision;
decision -> process2 [label="yes"];
decision -> end [label="no"];
}
"#);
let result = parser.parse(&source);
println!("Parsed DOT digraph successfully.");
use oak_dot::{Parser, DotLanguage, SourceText};
let parser = Parser::new();
let source = SourceText::new("A -> B [color=red];");
let result = parser.parse(&source);
// Token information is available in the parse result
use oak_dot::{Parser, DotLanguage, SourceText};
let parser = Parser::new();
let source = SourceText::new(r#"
digraph G {
A -> B
B -> C;
C -> A;
}
"#);
let result = parser.parse(&source);
if let Err(e) = result.result {
println!("Parse error: {:?}", e);
}
The parser generates a comprehensive AST with the following main structures:
Oak of dot integrates seamlessly with:
Check out the examples directory for comprehensive examples:
Contributions are welcome!
Please feel free to submit pull requests at the project repository or open issues.