1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//! Legacy Pest-based Perl parser (v2).
//!
//! This crate provides a pure Rust Perl parser built with the Pest parser generator.
//! It outputs tree-sitter compatible S-expressions and requires no C dependencies.
//!
//! **Note:** This is maintained as a learning tool and historical reference.
//! For production parsing and LSP, use `perl-parser` (v3).
//!
//! # Example
//!
//! ```ignore
//! use perl_parser_pest::PureRustPerlParser;
//!
//! let mut parser = PureRustPerlParser::new();
//! let code = r#"
//! sub hello {
//! my $name = shift;
//! print "Hello, $name!\n";
//! }
//! "#;
//!
//! # fn main() -> Result<(), Box<dyn std::error::Error>> {
//! let ast = parser.parse(code)?;
//! # Ok(())
//! # }
//! let sexp = parser.to_sexp(&ast);
//! println!("{}", sexp);
//! ```
//!
//! # Architecture
//!
//! The parser uses a three-stage pipeline:
//! 1. **Pest Parsing**: PEG grammar processes input into parse tree
//! 2. **AST Building**: Type-safe AST construction with position tracking
//! 3. **S-Expression Output**: Tree-sitter compatible format generation
// Re-export the main types for convenience
pub use ;
pub use PrattParser;
pub use ;
pub use SexpFormatter;