Expand description
LP Parser - A Linear Programming File Parser
This crate provides robust parsing capabilities for Linear Programming (LP) files using LALRPOP parser generator. It supports multiple industry-standard LP file formats and offers comprehensive features for optimisation problems.
§Features
- Zero-copy parsing with lifetime management
- Support for multiple LP file format specifications
- Comprehensive parsing of all standard LP file components
- Optional serialisation and diff tracking
§Quick Start
use std::path::Path;
use lp_parser::{parser::parse_file, LpProblem};
fn main() -> Result<(), Box<dyn std::error::Error>> {
let content = parse_file(Path::new("problem.lp"))?;
let problem = LpProblem::parse(&content)?;
println!("Problem name: {:?}", problem.name());
Ok(())
}Modules§
- analysis
- Analysis and statistics for Linear Programming problems.
- builder
- compat
- csv
- error
- interner
- String interning for LP problem names.
- lexer
- Lexer for LP files using Logos.
- lp
- model
- Core data structures for representing Linear Programming problems.
- parser
- problem
- writer
- LP file writing and formatting utilities.