-
Notifications
You must be signed in to change notification settings - Fork 6
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
Messages cannot be parsed if Specification contains condition with Message'Size #525
Comments
|
A message is not parsed by PyRFLX if its specification contains a condition where a comparison with
Message'Size
is performed.Consider the following example:
It think the problem is that the expression (
Message'Size = (A + 1) * 8
) is not completely simplified into a BooleanTrue/BooleanFalse by__simplified(l.condition)
inside the_next_field method
.That leads to a comparison between an
expression.Equal
and anexpression.BooleanTrue
inside the__eq__
method ofexpression.Expr
, which returnsNotImplemented
.The core problem is that
Message'Size
is not substituted with a concrete value (not in__type_literals
nor in_simplified_mapping
).As no outgoing condition can be satisfied, the
_next_field
method returns an empty String, which leads to a KeyError when attempting to get the next field from_fields
in the parse method.The raised KeyError also contains no proper error message, only an empty String.
The text was updated successfully, but these errors were encountered: