git-svn-id: https://asn1c.svn.sourceforge.net/svnroot/asn1c/trunk@1010 59561ff5-6e30-0410-9f3c-9617f08c8826
This commit is contained in:
vlm 2005-11-26 11:21:55 +00:00
parent 6270d54ff0
commit 1ac75e752a
5 changed files with 271 additions and 296 deletions

View File

@ -176,7 +176,7 @@ typedef struct asn1p_expr_s {
enum asn1p_expr_marker_e {
EM_NOMARK,
EM_INDIRECT = 0x01, /* 00001 Represent as pointer */
EM_OMITABLE = 0x03, /* 00011 May be absent in encoding */
EM_OMITABLE = 0x02, /* 00010 May be absent in encoding */
EM_OPTIONAL = 0x07, /* 00111 Optional member */
EM_DEFAULT = 0x0F, /* 01111 default_value */
EM_UNRECURSE = 0x10, /* 10000 Use safe naming */
@ -225,6 +225,7 @@ typedef struct asn1p_expr_s {
*/
int _anonymous_type; /* This type is unnamed */
int _type_unique_index; /* A per top-level-type unique index */
int _type_referenced; /* This type is referenced from another place */
/*
* Opaque data may be attached to this structure,

File diff suppressed because it is too large Load Diff

View File

@ -575,9 +575,8 @@ ModuleSpecificationElement:
*/
| BasicString {
return yyerror(
"Attempt to redefine a standard basic type, "
"use -ftypesXY to switch back "
"to older version of ASN.1 standard");
"Attempt to redefine a standard basic string type, "
"please comment out or remove this type redefinition.");
}
;
@ -1944,7 +1943,7 @@ optMarker:
Marker:
TOK_OPTIONAL {
$$.flags = EM_OPTIONAL;
$$.flags = EM_OPTIONAL | EM_INDIRECT;
$$.default_value = 0;
}
| TOK_DEFAULT Value {

View File

@ -138,22 +138,6 @@ _asn1p_set_flags(enum asn1p_flags flags) {
asn1p__flex_debug = 1;
}
/*
* Restrict embedded types to ASN.1:1988 version of standard.
*/
if(flags & A1P_TYPES_RESTRICT_TO_1988) {
flags &= ~A1P_TYPES_RESTRICT_TO_1988;
asn1p_lexer_types_year = 1988;
}
/*
* Restrict embedded types to ASN.1:1988 version of standard.
*/
if(flags & A1P_TYPES_RESTRICT_TO_1988) {
flags &= ~A1P_TYPES_RESTRICT_TO_1988;
asn1p_lexer_types_year = 1988;
}
/*
* Check that we haven't missed an unknown flag.
*/

View File

@ -57,15 +57,7 @@ enum asn1p_flags {
/*
* Enable verbose debugging output from lexer.
*/
A1P_LEXER_DEBUG = 0x0001,
/*
* Embedded types restricted to ASN.1:1988
*/
A1P_TYPES_RESTRICT_TO_1988 = 0x0010,
/*
* Embedded constructs (concepts) restricted to ASN.1:1990
*/
A1P_CONSTRUCTS_RESTRICT_TO_1990 = 0x0020,
A1P_LEXER_DEBUG = 0x0001
};
/*