-
-
Notifications
You must be signed in to change notification settings - Fork 100
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
parser claims "syntax error" for SEQUENCE (SIZE (32)) OF OCTET STRING (SIZE (6))
with DEFAULT
#174
Comments
SEQUENCE (SIZE (32)) OF OCTET STRING (SIZE (6))
with DEFAULTSEQUENCE (SIZE (32)) OF OCTET STRING (SIZE (6))
with DEFAULT
See eerimoq/asn1tools#174 for details Change-Id: Ibc0330f3bc217fa38815c758033bc589ae665d8a
I can modufy the ASN.1 source to replace the However, (obviously) when the related field is not set and one expects the default value to be used during encode, there is an exception:
Obviously the encoder is correct: It doesn't make sense to have a single value as a default for a "SEQUENCE OF", where one would need a list of values. So it looks a bit like the problem is just the parser which doesn't parse that construct? The full ASN.1 syntax of the spec I'm working with can be found at https://gitea.osmocom.org/laforge/simalliance-tca-interoperable-format-asn1/src/branch/master/asn1/PEDefinitions.asn |
Sorry, but I'm not very active in maintaining this project anymore :( |
See eerimoq/asn1tools#174 for details Change-Id: Ibc0330f3bc217fa38815c758033bc589ae665d8a
I noticed, and that's all fine. It still is in my opinion the most powerful/complete python framework for ASN.1. I tried to look at debugging the specific problem further, but given I know very little about parser theory and have no idea about pyparsing, so I sadly didn't get very far :( If I should solve it, I'd for sure send a related PR. Seeing that there are sponsoring opportunities avaialable: Would you consider debugging this in a paid/freelance capacity? |
I've other projects to work on that are far more interesting to me, so no. |
This specification does not use CLASS nor (as far as I can tell) any of the other unsupported constructs described in the known limitation section of the asn1tools documentation.
Sadly, asn1tools still fails to parse any version of their spec. I've tested v1.1 through v3.3.1 and they all fail with messages like
or
so it somehow seems asn1tools doesen't understand a [size constrained] sequence of [size constrained] octet strings with default values?
and indeed the small reproducer below already triggers the problem
as soon as the DEFAULT clause is removed, it seems to work.
The text was updated successfully, but these errors were encountered: