Open twix1312 opened 6 years ago
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.
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
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 notifications@github.com 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 https://github.com/kimgr/asn1ate/issues/58#issuecomment-344879179, 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: FROM S1AP-Constants;
-- **************************************************************
--
-- Interface Elementary Procedure Class
--
-- **************************************************************
S1AP-ELEMENTARY-PROCEDURE ::= CLASS {
&InitiatingMessage ,
&SuccessfulOutcome OPTIONAL,
&UnsuccessfulOutcome OPTIONAL,
&procedureCode ProcedureCode UNIQUE,
&criticality Criticality DEFAULT ignore
}
its the "{" brace after "S1AP-ELEMENTARY-PROCEDURE ::= CLASS". gtp.txt
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