-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add support for types with default values #9
Comments
The parser accepts default values if they are in the end of a declaration. Otherwise there will be a syntax error:
results in:
on the seq1 line. |
This seems to work for me on master head / devel.
|
Now I get error on
|
Do you have a space after someInt? |
No, that was only a typo when I entered the defect. Sorry |
Seems to work ok
|
Default value does not work on curly braced values.
This error is related to this sequence, particularly the version BIT STRING:
Removing the curly braces from the definition, the compiler does not complain about an unexpected '{' but it does not find 'version1':
|
Thank you, I will take a look. Parsing value types in ASN.1 is very difficult due to ambiguities in the specification. |
I dig a bit for the curly braces, defining ComponentType in the grammar like below corrects the curly braces issue:
|
That will fix this particular issue, and that's fine. Perhaps adding a ValueList type ({SingleValue, SingleValue, SingleValue...})will help more generally. Ideally this should be the type Value, although that may cause other things to break. For the other issue, NamedBitLists are not yet supported at all. I'll work on that now.
|
Add support for default values. Check encoding rules for BER and DER when value is sentinel.
The text was updated successfully, but these errors were encountered: