-
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
PyRFLX cannot handle sequence in comparison #964
Comments
@rssen Thanks for the reproducer. Do you think you can fix that? |
When checking the below variation of the specification from above the following errors are raised:
package Test is
type B is mod 2 ** 8;
type Test is
message
Fld_A : Opaque
with Size => 16
then Fld_B
if Fld_A /= 16#02#
then null
if Fld_A = 16#02#;
Fld_B : B;
end message;
end Test; Is this expected? I am not really sure what the error message is trying to tell me either. When trying to parse a message using this specification (checks disabled) a similar error as decribed above is raised: |
Yes, the error message describes type errors in the two link conditions. Field
That is probably the root cause.
That seems correct to me. |
Thank you for the explanation. |
I implemented a solution that fixes the problem, but it is very specific to this single usecase where we have a
|
In the code generator, we support the following variants: Note that concatenations are just syntactic sugar and are converted to an aggregate during parsing, and strings are also (a special form of) aggregates. The same variants should be supported by PyRFLX. So supporting |
@treiher the coverage test is failing because of apparently untested lines that are completely unrelated to this issue and that I did not modify. Should I make a PR anyway or attempt to fix it in this issue? I have had a quick look at it and it seems to be not "easily testable". The uncovered lines are 1157-1164 in |
Are you sure the uncovered code is completely unrelated? As it was covered before, there must be a relation to your changes. Could it be that the uncovered code is now obsolete? |
Trying to parse a message using PyRFLX and the following specificaton fails with this error:
This occurs because the
__simplified
function oftypevalue.py
cannot handle the list in the comparison.This could also be observed with the TLS handshake specification, see Componolit/RecordFlux-specifications#105.
Test data: test_data.zip
The text was updated successfully, but these errors were encountered: