regonize INTEGER (0..UNIT_MAX).
(DOTDOT): add git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8137 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1997 Kungliga Tekniska H<>gskolan
|
* Copyright (c) 1997 - 2000 Kungliga Tekniska H<>gskolan
|
||||||
* (Royal Institute of Technology, Stockholm, Sweden).
|
* (Royal Institute of Technology, Stockholm, Sweden).
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
@@ -63,6 +63,7 @@ static void append (Member *l, Member *r);
|
|||||||
|
|
||||||
%token INTEGER SEQUENCE OF OCTET STRING GeneralizedTime GeneralString
|
%token INTEGER SEQUENCE OF OCTET STRING GeneralizedTime GeneralString
|
||||||
%token BIT APPLICATION OPTIONAL EEQUAL TBEGIN END DEFINITIONS EXTERNAL
|
%token BIT APPLICATION OPTIONAL EEQUAL TBEGIN END DEFINITIONS EXTERNAL
|
||||||
|
%token DOTDOT
|
||||||
%token <name> IDENTIFIER
|
%token <name> IDENTIFIER
|
||||||
%token <constant> CONSTANT
|
%token <constant> CONSTANT
|
||||||
|
|
||||||
@@ -112,6 +113,14 @@ constant_decl : IDENTIFIER type EEQUAL constant
|
|||||||
;
|
;
|
||||||
|
|
||||||
type : INTEGER { $$ = new_type(TInteger); }
|
type : INTEGER { $$ = new_type(TInteger); }
|
||||||
|
| INTEGER '(' constant DOTDOT constant ')' {
|
||||||
|
if($3 != 0)
|
||||||
|
error_message("Only 0 supported as low range");
|
||||||
|
if($5 != INT_MIN && $5 != UINT_MAX)
|
||||||
|
error_message("Only %u supported as high range",
|
||||||
|
UINT_MAX);
|
||||||
|
$$ = new_type(TUInteger);
|
||||||
|
}
|
||||||
| OCTET STRING { $$ = new_type(TOctetString); }
|
| OCTET STRING { $$ = new_type(TOctetString); }
|
||||||
| GeneralString { $$ = new_type(TGeneralString); }
|
| GeneralString { $$ = new_type(TGeneralString); }
|
||||||
| GeneralizedTime { $$ = new_type(TGeneralizedTime); }
|
| GeneralizedTime { $$ = new_type(TGeneralizedTime); }
|
||||||
|
Reference in New Issue
Block a user