-
Notifications
You must be signed in to change notification settings - Fork 8
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
Tally segment parsing bug fix. #409
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pull Request Test Coverage Report for Build 9492465919Details
💛 - Coveralls |
MicahGale
added
bugs
A deviation from expected behavior that does not reach the level of being reportable as an "Error".
parsers are hard
Examples of where MCNP syntax is complicated and should be simplified.
labels
Jun 13, 2024
Pull Request Test Coverage Report for Build 9492487926Details
💛 - Coveralls |
Testing with >>> import montepy
>>> dblock = montepy.input_parser.mcnp_input.Input(["fs567 -1 -2 t c"], montepy.input_parser.block_type.BlockType.DATA)
>>> montepy.data_inputs.data_parser.parse_data(dblock)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "MontePy/montepy/data_inputs/data_parser.py", line 53, in parse_data
return data_class(input)
File "MontePy/montepy/data_inputs/data_input.py", line 54, in __init__
super().__init__(input, self._parser)
File "MontePy/montepy/mcnp_object.py", line 57, in __init__
raise ParsingError(
montepy.errors.ParsingError: , line 0
> 0| fs567 -1 -2 t c
| ^ not expected here.
There was an error parsing "c".
sly: Syntax error at line 1, token=TEXT |
tjlaboss
requested changes
Jun 17, 2024
This is what I get for trying to close a bug without reading or understanding the |
Pull Request Test Coverage Report for Build 9550870299Details
💛 - Coveralls |
tjlaboss
approved these changes
Jul 1, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New test covers the 'c for cumulative' syntax, and MontePy now correctly parses it.
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".
parsers are hard
Examples of where MCNP syntax is complicated and should be simplified.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This fixes a parsing error with tally segments that have an end
t
.Fixes #377
Checklist
I have made corresponding changes to the documentation (if applicable)