diff options
author | Björn Gustavsson <[email protected]> | 2013-06-04 06:03:50 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2013-06-04 06:03:50 +0200 |
commit | 2c6c863ef9a726fa2ae78e3d2fb7c577d60c3f36 (patch) | |
tree | f014f61ddee1bd1be0c1d19f64cf1d23e72244db /lib/asn1/src/asn1ct_parser2.erl | |
parent | 85f775093ab974128c629809e382891cb493073a (diff) | |
parent | 9be1fbb32ef0bbdf99c7c39fac4a845606156a23 (diff) | |
download | otp-2c6c863ef9a726fa2ae78e3d2fb7c577d60c3f36.tar.gz otp-2c6c863ef9a726fa2ae78e3d2fb7c577d60c3f36.tar.bz2 otp-2c6c863ef9a726fa2ae78e3d2fb7c577d60c3f36.zip |
Merge branch 'bjorn/asn1/bug-fixes-and-clean-ups/OTP-11134' into maint
* bjorn/asn1/bug-fixes-and-clean-ups/OTP-11134: (77 commits)
testSeqOf: Test constrained, extensible sizes
Clean up testSeqOf
Extend tests cases for BIT STRING
Improve tests of ENUMERATED
asn1ct_check: Eliminate useless Per argument from complist_as_tuple()
asn1ct_check: Don't pass on #'ObjectClassFieldType'{} with fixed type
asn1ct_gen_per: Remove useless renewal of 'enumval'
Fix encoding of semi-constrained, extensible INTEGERs
PER/UPER: Fix decoding of semi-constrained INTEGERs
testPrim: Simplify test cases using a roundtrip function
BER: Fix handling of a constructed default value for a class
PER: Generate code for deep table constraints at compile-time
Normalize data representation for table constraints
asn1ct: Simplify check_value/2
Extend tests to cover more code in asn1ct_check
Clean up checking of values for ENUMERATEDs
Introduce a new mechanism for structured error handling
asn1_db: Make dbput/3 and dbsave/2 asynchronous
asn1_db: Remove unused functions
asn1ct_check: Clean up checkc/3
...
Diffstat (limited to 'lib/asn1/src/asn1ct_parser2.erl')
-rw-r--r-- | lib/asn1/src/asn1ct_parser2.erl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/asn1/src/asn1ct_parser2.erl b/lib/asn1/src/asn1ct_parser2.erl index 9e1fcce2b1..344fdf44dd 100644 --- a/lib/asn1/src/asn1ct_parser2.erl +++ b/lib/asn1/src/asn1ct_parser2.erl @@ -23,6 +23,10 @@ -export([parse/1]). -include("asn1_records.hrl"). +%% Only used internally within this module. +-record(typereference, {pos,val}). +-record(constraint,{c,e}). + %% parse all types in module parse(Tokens) -> case catch parse_ModuleDefinition(Tokens) of @@ -458,7 +462,8 @@ parse_BuiltinType([{'INSTANCE',_},{'OF',_}|Rest]) -> {DefinedObjectClass,Rest2} = parse_DefinedObjectClass(Rest), case Rest2 of [{'(',_}|_] -> - {Constraint,Rest3} = parse_Constraint(Rest2), + {Constraint0,Rest3} = parse_Constraint(Rest2), + Constraint = merge_constraints([Constraint0]), {#type{def={'INSTANCE OF',DefinedObjectClass,Constraint}},Rest3}; _ -> {#type{def={'INSTANCE OF',DefinedObjectClass,[]}},Rest2} |