Skip to content

Support poorly formatted Material definitions #182

@MicahGale

Description

@MicahGale

LANL apparently doesn't know how to write a syntax specification. From LA-UR-17-29981 Section 3.3.2.1 a material specification shall take the form:

Mm zaid1 fraction1 zaid2 fraction2 ... [KEYWORD=value(s) ...]

Which makes sense.

Until you notice

Input Parameter Description
Keyword * Value

And finally notice the asterisk:

* M card keywords may appear anywhere among the zaid-fraction pairs, but must not separate a pair.

Yep The syntax specification from before is a lie. The key-value pairs can appear anywhere they like!

Why did the developers do this? I don't know.

Is this a context-free grammar? Probably not.

However, it is officially (in the worst documented ways possible) supported, so it needs to be supported in MOntePy.

Metadata

Metadata

Assignees

Labels

feature requestAn issue that improves the user interface.lanl did somethingWhen LANL makes a change to MCNP that needs to be evaluated.parsers are hardExamples of where MCNP syntax is complicated and should be simplified.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions