endf_parser

Crates.ioendf_parser
lib.rsendf_parser
version0.2.0
sourcesrc
created_at2020-03-29 11:18:42.713502
updated_at2020-04-06 09:06:12.015655
descriptionA Rust library for parsing ENDF-6 format nuclear data.
homepagehttps://github.com/logan-dev-oss/endf-parser.rs
repositoryhttps://github.com/logan-dev-oss/endf-parser.rs
max_upload_size
id224020
size71,343
logan (logan-dev-oss)

documentation

https://docs.rs/endf_parser/

README

endf-parser.rs

Travis master branch Travis develop branch GitHub release Crates.io API

endf-parser.rs is a rust library providing utilities for parsing ENDF-6 format nuclear data.

Basics

Level 1

Level 1 is used to parse ENDF primitives. It includes:

  • integers
  • reals
  • text
// 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

Level 2 is for parsing ENDF records. It includes following records:

  • CONT
  • DIR
  • HEAD
  • LIST
  • TAB1
  • TEXT
fn main() -> Result<Cont, ParseEndfRecordError> {
    endf_parser::record::cont::Cont::parse(
    "-1.23456789+1.23456789          1         12        123       123412341212312345\n"
    )
}

Questions, Issues, Contributing

Contributions and Pull Request are welcome.

For questions and issues, open an issue here.

License

MIT License

Commit count: 0

cargo fmt