Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Silent parsing error with sdef #396

Open
MicahGale opened this issue Apr 11, 2024 · 0 comments
Open

Silent parsing error with sdef #396

MicahGale opened this issue Apr 11, 2024 · 0 comments
Assignees
Labels
bugs A deviation from expected behavior that does not reach the level of being reportable as an "Error". critical An issue that seriously limits user adoption or hampers current use. parsers are hard Examples of where MCNP syntax is complicated and should be simplified.
Milestone

Comments

@MicahGale
Copy link
Collaborator

Describe the bug

MontePy silently misparses an SDEF input leading to a silently broken input file.

To Reproduce

A short code snippet of what you have ran. Please change or remove any specific values or anything that can't be public. For example:

problem = montepy.read_input("foo.imcnp")
print(problem.data_inputs[-1]._tree.format())

This leads to:

(Node: data: {'start_pad': (Padding, []), 'classifier': (Classifier: mod: None, prefix: (Value, d, padding: None), number: (Value, 5, padding: None), particles: None), 'keyword': (Value, None, padding: None), 'data': (list: empty data, [])})

MCNP input file snippet

1 1 20
         -1000  $ dollar comment
        imp:n,p=1 U=350 trcl=5

C surfaces
1000 SO 1

C data
sdef  cel=d1 erg=d2 pos=fcel d3 ext=fcel d4 axs=0 0 1
     rad=d5

Version

  • Version 0.2.5
@MicahGale MicahGale added bugs A deviation from expected behavior that does not reach the level of being reportable as an "Error". critical An issue that seriously limits user adoption or hampers current use. parsers are hard Examples of where MCNP syntax is complicated and should be simplified. labels Apr 11, 2024
@MicahGale MicahGale added this to the Release-0.3 milestone Apr 11, 2024
@MicahGale MicahGale self-assigned this Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugs A deviation from expected behavior that does not reach the level of being reportable as an "Error". critical An issue that seriously limits user adoption or hampers current use. parsers are hard Examples of where MCNP syntax is complicated and should be simplified.
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant