-
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
Parsing Error: pyparsing.ParseException: Expected "DEFINITIONS" #58
Comments
It might be a while until I get to this, but this: asn1ate does not support all of ASN.1 so there may be something that's missing, and the line/column from the error message might give a clue as to what it is. |
Hi,
Thanks for suggesting that link. There were some ASN errors that I've
fixed. Now the compilation of the ASN.1 file works fine at that link.
However, pyasn1.gen.py gives a new error:
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/asn1ate/pyasn1gen.py", line 649,
in <module>
sys.exit(main())
File "/usr/lib/python2.7/site-packages/asn1ate/pyasn1gen.py", line 627,
in main
parse_tree = parser.parse_asn1(asn1def)
File "/usr/lib/python2.7/site-packages/asn1ate/parser.py", line 40, in
parse_asn1
parse_result = grammar.parseString(asn1_definition)
File "/usr/lib/python2.7/site-packages/pyparsing.py", line 1632, in
parseString
raise exc
pyparsing.ParseException: Expected "END" (at char 6111), (line:195, col:37)
Attaching the updated ASN.1 file.
Any help would be appreciated.
Thanks a bunch!
On Thu, Nov 16, 2017 at 3:51 PM, Kim Gräsman ***@***.***> wrote:
It might be a while until I get to this, but this: pyparsing.ParseException:
Expected "DEFINITIONS" (at char 195), (line:8, col:13) is a good place to
start. You can run your ASN.1 through http://asn1-playground.oss.com/
first, to make sure it's valid.
asn1ate does not support all of ASN.1 so there may be something that's
missing, and the line/column from the error message might give a clue as to
what it is.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#58 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AejhoIbpuU19q4WXwpIVotIvby6ELfEyks5s3AyMgaJpZM4QgNXl>
.
|
So is line 195, col 37 at the end of the file? Can you upload the ASN.1 as text so I can see it? |
I've attached the ASN.1 as a textfile (its 6600 lines long!) If you just want that specific portion:
its the "{" brace after "S1AP-ELEMENTARY-PROCEDURE ::= CLASS". |
Yeah, that explains it. asn1ate doesn't support CLASSes, and I don't really know where to start on that, so I think it's safe to assume that it won't do so unless you can spare time to work on it yourself. |
I'm trying to convert an LTE specification's ASN.1 syntax into python code and ran the file (see attached zip) in pyasn1gen.py.
I received the following error:
The attached file was taken from here. I had to filter out the ASN.1 definitions and remove unwanted text.
I might have made a mistake doing that. Could you please help?
gtp.zip
The text was updated successfully, but these errors were encountered: