esnacc / esnacc-ng

A continuation of the Enhanced SNACC ASN.1 compiler - See http://mail.esnacc.org/mailman/listinfo/dev
http://esnacc.org
GNU General Public License v2.0
32 stars 30 forks source link

Issue with esnacc and ... (EXTENSIBILITY IMPLIED) #7

Closed crw4096 closed 8 years ago

crw4096 commented 8 years ago

Hello,

Having trouble with ENUMERATED and "...". According to X.680, clause 20.5 and 20.6, the type definition for WontWork below should be legal. esnacc doesn't like the "..." . Also, esnacc insists on having Enumerations all have a value, but that is minor in comparison to this.

Example code:

ESnaccIssue DEFINITIONS ::= BEGIN

-- Works but is insufficient for my needs ThisWorks ::= ENUMERATED { item0(0), item1(100) }

-- Must have this WontWork ::= ENUMERATED { thing0(0), ..., thingN }

-- Having this would be great but not required AlsoWontWork ::= ENUMERATED { alsoThing0, ..., alsoThingN }

END

Charles

apconole commented 8 years ago

This is definitely an issue - I will look at addressing this as I can.

apconole commented 8 years ago

EDIT: this is wrong -Your "-- Must have this" example is not allowed by X.680 (see example one of 20.5, which is invalid because both thing0 and thingN will have the same value) unless the 'alternative' from 20.6 is supported - I won't support that right now.-

I may have something for you in an update. I won't make any statements about the extensibility portion, because I need to update both the C-lib and C++-lib to properly support it; but I can support part of your configuration.

apconole commented 8 years ago

Please see if the attached patch works for you (against current master) 0001-yacc-Update-enumerations-definition.patch.txt