beanit / asn1bean

ASN1bean (formerly known as jASN1) is a Java ASN.1 BER and DER encoding/decoding library
https://www.beanit.com/asn1/
Apache License 2.0
110 stars 45 forks source link

INTEGER (value OR range) breaks #27

Open Visne opened 5 years ago

Visne commented 5 years ago

This snippet gives an error:

DayOfMonth ::= INTEGER (-1|1..31)

This is the error:

line 910:27: expecting R_PAREN, found '|'
line 910:28: expecting "END", found '1'
line 912:11: unexpected token: ::=

(-1|1) for example does work, while (1..31|-1) still gives an error.

Visne commented 5 years ago
(1..3|5..7)

also gives an error.

regis-leray commented 4 years ago

same problem

Parsing "S1AP-IEs.asn"
line 549:46: expecting R_PAREN, found ','
line 549:51: expecting "END", found ')'
line 551:8: unexpected token: ::=
line 1504:1: expecting "DEFINITIONS", found 'null'

here the line

EncryptionAlgorithms ::= BIT STRING (SIZE (16,...))

if i changed the line with

EncryptionAlgorithms ::= BIT STRING (SIZE(0..16,...))

everything works

with jasn 1.11.2

saumilsdk commented 4 years ago

@regis-leray I am getting expecting ASSIGN_OP, found '.' error for the line:

Reg-ComputedLane DSRC.REG-EXT-ID-AND-TYPE ::= { ... }