Crates.io | endf_parser |
lib.rs | endf_parser |
version | 0.2.0 |
source | src |
created_at | 2020-03-29 11:18:42.713502 |
updated_at | 2020-04-06 09:06:12.015655 |
description | A Rust library for parsing ENDF-6 format nuclear data. |
homepage | https://github.com/logan-dev-oss/endf-parser.rs |
repository | https://github.com/logan-dev-oss/endf-parser.rs |
max_upload_size | |
id | 224020 |
size | 71,343 |
endf-parser.rs
is a rust library providing utilities for parsing ENDF-6 format nuclear data.
Level 1 is used to parse ENDF primitives. It includes:
// Parse ENDF integer
fn main() -> Result<i64, ParseEndfIntegerError> {
endf_parser::primitive::integer::parse(" -123456")
}
// Parse ENDF real
fn main() -> Result<i64, ParseEndfRealError> {
endf_parser::primitive::real::parse("-1.23456+12")
}
Level 2 is for parsing ENDF records. It includes following records:
fn main() -> Result<Cont, ParseEndfRecordError> {
endf_parser::record::cont::Cont::parse(
"-1.23456789+1.23456789 1 12 123 123412341212312345\n"
)
}
Contributions and Pull Request are welcome.
For questions and issues, open an issue here.