DOE OSTI · 2510796
A Practical guide to Parsing MCNP Inputs: Lessons Learned from Implementing Context-Free Parsing in MontePy
Abstract
Monte Carlo N-Particle (MCNP) is a widely used Monte Carlo transport solver that began development in the 1960’s. Due to this MCNP input files uses a custom input syntax, for which there are no off-the-shelf parsing libraries available. For MontePy to create an effective Object-Oriented interface for MCNP input files, an context-free parser was implemented to be able to fully parse the files. MontePy uses a number of shortcuts and optimizations to avoid creating a single universal input file parser. . These lessons can be applied to working with the many other custom input syntax languages persistent throughout the nuclear industry.
Explore related subjects
Keep this discovery
Explore connections, maps & timelines
Gale, Micah D. [Idaho National Laboratory (INL), Idaho Falls, ID (United States). Reactor Physics Analysis and Design] (ORCID:0000000164514818), Labossiere-Hickman, Travis J. [Idaho National Laboratory (INL), Idaho Falls, ID (United States)] (ORCID:0000000307423404), Carbno, Brenna Anne [Idaho National Laboratory (INL), Idaho Falls, ID (United States)]. 2025-04-30. A Practical guide to Parsing MCNP Inputs: Lessons Learned from Implementing Context-Free Parsing in MontePy. https://www.osti.gov/biblio/2510796
Cite the original work for its findings. Save a collection to share your selection of sources.