-
Notifications
You must be signed in to change notification settings - Fork 41
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
Default value management #24
Comments
The problem is the last component:
specifically the curly-brace form on DEFAULT. We don't yet seem to handle the |
Thank you for your answer. What would you therefore recommend? |
I think, and this is a big maybe, that you can omit the DEFAULT clause If I recall correctly, DEFAULTs are handled encode-time, so if you're That might work.
On Thu, Dec 10, 2015 at 9:11 AM, kgalhabbo [email protected] wrote:
|
From #26 -- this actually runs clean through the parser, but generates nonsense pyasn1 code:
Output:
|
Hello,
I am trying to parse a file containing the following (from http://simalliance.org/euicc/euicc-technical-releases/):
AlgoParameter ::= SEQUENCE {
key OCTET STRING,
opc OCTET STRING, -- For TUAK, this parameter sets TOPc
rotationConstants OCTET STRING (SIZE (5)) DEFAULT '4000204060'H,
xoringConstants OCTET STRING (SIZE (40)) DEFAULT '00000000000000000000000000000001000000000000000200000000000000040000000000000008'H,
sqnInit SEQUENCE (SIZE (3)) OF OCTET STRING (SIZE (6)) DEFAULT {'000000000000'H, '000000000000'H, '000000000000'H }
}
I get the following error:
Traceback (most recent call last):
File "pyasn1gen.py", line 588, in
sys.exit(main(sys.argv[1:]))
File "pyasn1gen.py", line 574, in main
parse_tree = parser.parse_asn1(asn1def)
File "C:\Python27\lib\site-packages\asn1ate\parser.py", line 41, in parse_asn1
parse_result = grammar.parseString(asn1_definition)
File "C:\Python27\lib\site-packages\pyparsing.py", line 1114, in parseString
raise exc
pyparsing.ParseException: Expected "END" (at char 533), (line:18, col:28)
Do you have any suggestions about how to solve this and/or how to deal with default values?
Thank you for your help.
The text was updated successfully, but these errors were encountered: