Skip to main content
U.S. Department of Energy
Office of Scientific and Technical Information

A Practical guide to Parsing MCNP Inputs: Lessons Learned from Implementing Context-Free Parsing in MontePy

Conference ·
OSTI ID:2510796
 [1];  [2];  [2]
  1. Idaho National Laboratory (INL), Idaho Falls, ID (United States). Reactor Physics Analysis and Design
  2. Idaho National Laboratory (INL), Idaho Falls, ID (United States)
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.
Research Organization:
Idaho National Laboratory (INL), Idaho Falls, ID (United States)
Sponsoring Organization:
USDOE Office of Nuclear Energy (NE)
DOE Contract Number:
AC07-05ID14517
OSTI ID:
2510796
Report Number(s):
INL/CON-24-81521-Rev000
Resource Type:
Conference paper
Conference Information:
International Conference on Mathematics and Computational Methods Applied to Nuclear Science and Engineering (M&C 2025), Denver, CO, 04/27/2025 - 04/30/2025
Country of Publication:
United States
Language:
English

Similar Records

Going under the hood of MontePy: A python API for MCNP input files [Slides]
Technical Report · Wed Mar 06 23:00:00 EST 2024 · OSTI ID:2322420

Montepy
Software · Sun Jan 07 19:00:00 EST 2024 · OSTI ID:code-117498

Graphical User Input Interface for MCNP
Conference · Sat Nov 13 23:00:00 EST 1993 · Transactions of the American Nuclear Society · OSTI ID:6844637