-
Notifications
You must be signed in to change notification settings - Fork 17
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
An error occurs in LTE RRC Protocol compilation #88
Comments
Hi @hiranshahi : It seems there is an issue with the generated ASN, from the docx - at line 6143 The line looks like as follows -
Note the missing space after the If both these errors are fixed, Now, there's a parse error on line 22151. -
Not sure why this error comes - will check. But the original error and another similar error are due to generated ASN.1 files. |
update: Likely some parts of this structure definition are not handled yet. If you don't need to use this structure in your generated code, you can comment out the definition of this structure and see if that works for you. Will take a detailed look at it a bit later. |
Thanks for the reply. |
The issue appears to be with handling of Started with a PR that just makes a test case for this. The initial goal is to pass this test and then fix any other issues that may be required to be fixed to get this working. |
Added support for missing `WITH COMPONENTS` constraint. Currently, only the constraint is parsed, the code generation does not deal with this constraint. This will have to be handled at the application level. For `SEQUENCE OF` types, the dependent references on the `SIZE` constraints were not considered, this caused resolution error. Fixed that. Added a test case for parsing `WITH COMPONENTS` and changed the `compile_string` API to take a param `parse_only` to test for correct parsing. This API currently is used only by tests.
Added support for missing `WITH COMPONENTS` constraint. Currently, only the constraint is parsed, the code generation does not deal with this constraint. This will have to be handled at the application level. For `SEQUENCE OF` types, the dependent references on the `SIZE` constraints were not considered, this caused resolution error. Fixed that. Added a test case for parsing `WITH COMPONENTS` and changed the `compile_string` API to take a param `parse_only` to test for correct parsing. This API currently is used only by tests.
@hiranshahi : The fix for this issue is in the master. You may want to try and see if the code generation is fine. You might have to review the generated code. One issue that I observed is - the code generation for additional sequence components (See for example Also, note codec support for these sequence extensions is missing yet. (#1). But I believe current implementation is enough for the fix of the present issue. |
The problem still exists. Thank you for taking the time to look into the issue. |
@hiranshahi : you will need to edit the generated |
The problem was solved. Thank you. |
Hi
Using the following command, I generated the
36331-h20.asn
filepython parse_spec.py 36331-h20.docx -o 36331-h20.asn
then I compiled the
336331-h20.asn
file using the following commandhampi-rs-asn1c -m lte_rrc.rs --codec uper --derive all -- 36331-h20.asn
But the following error occurs:
INFO asn1_compiler::compiler] Processing file: "36331-h20.asn"
Error: Custom { kind: InvalidInput, error: "Tokenize Error (16) at Line: 6143, Column: 68" }
36331-h20.zip
The text was updated successfully, but these errors were encountered: