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

single value and range constraint with both '..' and '|' #61

Open
mungayree opened this issue Feb 23, 2018 · 3 comments
Open

single value and range constraint with both '..' and '|' #61

mungayree opened this issue Feb 23, 2018 · 3 comments

Comments

@mungayree
Copy link

is the following grammar syntax supported by asn1ate in 0.6.0, I see this failing -

 pcie-bus-defs  ::= SEQUENCE {
    pcie-bus-number    INTEGER (0 .. 255), 
    pcie-lane    INTEGER ( 0 | 1 | 2 | 4 | 8 | 16 ),
    pcie-slot-speed    INTEGER ( 0 | 2500 | 5000 | 8000 ),   -- in Mbps, per lane
    pcie-flags    OCTECT STRING (SIZE(4 | 12..16)),     -- pcie flags space
    ...
}

seem like (a|b|c|d) is incorrectly parsed in released version.

@kimgr
Copy link
Owner

kimgr commented Feb 24, 2018

See #40 (that you yourself has commented on), closing as duplicate.

@kimgr kimgr closed this as completed Feb 24, 2018
@mungayree
Copy link
Author

I think the checkin are totally broken during merge made by Fred.
Please try above asn1 on latest asn1ate==0.6.0. The creation of py file fail with multiple pyparsing errors for '|' construct. '..' works fine.

@kimgr kimgr reopened this Jun 9, 2019
@kimgr
Copy link
Owner

kimgr commented Jun 9, 2019

Support for alternate values separated by | is implemented now, but for mixed value and range we need to implement full support for element sets per X.680, item 50.

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

2 participants