Skip to content
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

Problem parsing ISO-TS-19091-addgrp-C-2018.asn #125

Open
MartijnHarmenzon opened this issue Apr 15, 2023 · 2 comments
Open

Problem parsing ISO-TS-19091-addgrp-C-2018.asn #125

MartijnHarmenzon opened this issue Apr 15, 2023 · 2 comments

Comments

@MartijnHarmenzon
Copy link

Trying to parse the following:
https://standards.iso.org/iso/ts/19091/ed-2/en/ISO-TS-19091-addgrp-C-2018.asn

With the statement below:
asn1c ISO-TS-19091-addgrp-C-2018.asn

Resulting in:
ASN.1 grammar parse error near line 244 (token "IDENTIFIED"): syntax error, unexpected TOK_capitalreference, expecting '}' Cannot parse "ISO-TS-19091-addgrp-C-2018.asn"

Any ideas?
Help is much appreciated.

@MartijnHarmenzon MartijnHarmenzon changed the title Problem parsing Problem parsing ISO-TS-19091-addgrp-C-2018.asn Apr 15, 2023
@mouse07410
Copy link
Owner

Sorry, I don't know. In general, the newer "baroque"-style ASN.1 goes poorly with asn1c, which is moch better suited towards simpler ASN.1 definitions...

Maybe somebody else here could comment...?

@kentkost
Copy link

kentkost commented May 31, 2023

The simple answer is that asn1c just doesn't support the token IDENTIFIED BY (X.681 10.7). However IDENTIFIED BY is not really a keyword. As I've been given to understand it is merely syntactic sugar that should make it more readable for humans.
You might be able to parse the grammar if you just removed it.

I am also not that well versed in this style of ASN.1. Frankly I find the entire grammar confusing. Implementing 3 modules - where each module use IMPORT from eachother to get type definitions from other modules. I can't tell where one module starts and another ends.
The module ´REGION´ in this case imports addGrpC and REG-EXT-ID-AND-TYPE from the module DSRC.
addGrpC just seems to be value reference with a constant equal to 3.
REG-EXT-ID-AND-TYPE is a CLASS

But the line

	{ConnectionManeuverAssist-addGrpC  IDENTIFIED BY addGrpC},

Suggests that the type ConnectionManeuverAssist-addGrpC which is imported from the module AddGrpC is IDENTIFIED BY the value addGrpC which was imported from DSRC. Shouldn't it have been:

	{ConnectionManeuverAssist-addGrpC  IDENTIFIED BY AddGrpC},

Or am I misunderstanding something?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants