asn1c icon indicating copy to clipboard operation
asn1c copied to clipboard

Grammar Parse Error Token "[[" in Extension Addition Group

Open CousinArthur opened this issue 3 years ago • 6 comments

I am using 36331-g40.asn1 and get the error:

ASN.1 grammar parse error near 36331-g40.asn1:2886 (token "[["): syntax error, unexpected TOK_VBracketLeft Cannot parse "36331-g40.asn1"

Your fork has been mentioned in other issues as having a workable implementation of the extension addition group syntax (348, 317) but I'm still getting the same error others have in the past. One difference I've noticed in the newer versions of the .asn1 files from the versions from when you added extension addition group handling, is that the extension addition group syntax parsing errors are within a CHOICE this time and perhaps they weren't before.

I would greatly appreciate any guidance.

CousinArthur avatar Apr 21 '21 23:04 CousinArthur

This work may support some extension syntax - but in general, there are ASN.1 features that a sane person would never use, and, of course, many not-so-sane standard writers (who Marshall Rose named "goers" as opposed to "doers" ;) are all too happy to use, mostly in a wrong way...

In short, I'm sorry - but I don't think I know how to deal with that stuff. :-(

mouse07410 avatar Jul 01 '21 00:07 mouse07410

I compiled 36331 (took asn files from wireshark source) using another fork of the compiler. The required branch is called velichkov_s1ap_plus_option_group_plus_adding_trailing_ull. Everything compiled without errors. There were some warnings, but the messages are decoded.

snowy-owll avatar Dec 16 '21 08:12 snowy-owll

https://github.com/brchiu/asn1c/commit/3d76a0399b065c722db814082f0ddd4dae060a22 has fix this issue,will you merge it?

konglinglong avatar Jan 15 '22 04:01 konglinglong

For what it's worth I rebased brchiu and other OAI changes from branch https://gitlab.eurecom.fr/oai/asn1c/-/tree/velichkov_s1ap_plus_option_group branch onto mouse's vlm_master. A fork is at

https://github.com/ruffyontheweb/asn1c/tree/oai_on_vlm_master

Using oai_on_vlm_master I am able to generate code from F1, RRC, and NGAP asn1 definitions.

I've hand checked the merge and it seems to include all the changes to generate properly. I checked the refactored per/aper/uper files in the skeletons directory. There are some differences in some of the files in skeletons, but their meaning is beyond me so I kept what is in vlm_master. The rebased branch seems to have the same performance as the https://gitlab.eurecom.fr/oai/asn1c/-/tree/velichkov_s1ap_plus_option_group branch.

ruffyontheweb avatar Jul 18 '22 21:07 ruffyontheweb

@ruffyontheweb can you submit a PR?

mouse07410 avatar Jul 18 '22 21:07 mouse07410

@ruffyontheweb can you submit a PR? Pull request at: https://github.com/mouse07410/asn1c/pull/103

But it looks like make check does not pass. Log file attached to the PR.

ruffyontheweb avatar Jul 18 '22 22:07 ruffyontheweb