Closed BlaizeLei closed 4 months ago
It seems that the ASN.1 files you're using include new(er) and more complicated language features, that this Open Source compiler is unable to handle. OSS Nokalva compiler is good (no arguments here!), but it costs good amount of money.
What is "eclipse asn compiler"? Could you please provide a URL to it?
I don't have enough competence (let alone time) to enhance asn1c
to add support for those capabilities.
Sorry for not being more helpful.
Thank you very much for your reply.
I have the same question as another person, and I referenced his question link: [https://github.com/vlm/asn1c/issues/400].
The link to eclipse asn compiler may be this one :https://www.eclipse.org/downloads/.
Sorry, both "working" compilers you're referring to, cost money. The 2nd one is available as an Eclipse plugin, but it's by no means free (also, it's vendor doesn't list the price on the web site).
Add I said, I don't think I can help here - this problem is the result of authors of those ASN.1 files using features they really (IMHO) shouldn't've. Unless somebody provides a PR here, extending the capabilities of asn1c
, that kind of files (using "crazy" language features) won't be supported.
If you can afford Nokalva or ASN(name of the company, not the language here) compiler - by all means keep using them, add they will always be richer in capabilities compared to this one.
Let's take a different approach. The main error now is that the call syntax of ScopedCertificateRequest to ScmsPdu-Scoped cannot be recognized. Can we achieve the same effect by modifying the ASN syntax below? It is to modify it to a syntax that the compiler can recognize and has the same meaning.
ScopedCertificateRequest ::= ScmsPdu (
ScmsPdu-Scoped {
AcaRaInterfacePdu (WITH COMPONENTS {
raAcaCertRequest
})
}|
ScmsPdu-Scoped {
AcaRaInterfacePdu (WITH COMPONENTS {
acaRaCertResponse
})
}
)
Can we achieve the same effect by modifying the ASN syntax below? It is to modify it to a syntax that the compiler can recognize and has the same meaning.
I cannot answer this question - but my feeling is that what you're proposing (aka, modifying ASN.1 files to make them less dependent on the "modern" language features) is the only way to get ASN.1 files(s) in question parsed/understood by asn1c
. And if that doesn't work - the only other option remaining would be using OSS Nokalva or similar.
For those interested - here's the OBJ-SYS price list: https://obj-sys.com/products/asn1c/pricing.php
Okay. Thanks very much.
Closing this issue, as there's little to nothing that I can do, unfortunately.
I use asn1c to generate C code from an asn file, but I got such warning and errors:
And these is my test.asn content:
These asn can be parse well by other asn to c compiler, such as ossasn1c and eclipse asn compiler.
Thank you very much and look forward to your reply!