diff options
author | Björn Gustavsson <[email protected]> | 2014-10-20 13:17:36 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2015-01-12 11:40:25 +0100 |
commit | b9b741b23bdaab354b2b5cc8cfb424550c2dd743 (patch) | |
tree | c3224a3a036f0af142520d92f6d3bfe799463ba9 /lib/asn1/src/asn1ct_parser2.erl | |
parent | 0775ee9c7dc4957302a756b8b37cf94e372d3ecc (diff) | |
download | otp-b9b741b23bdaab354b2b5cc8cfb424550c2dd743.tar.gz otp-b9b741b23bdaab354b2b5cc8cfb424550c2dd743.tar.bz2 otp-b9b741b23bdaab354b2b5cc8cfb424550c2dd743.zip |
Remove special case in parser
The parser handled the builtin ABSTRACT-SYNTAX and TYPE-IDENTIFIER
classes specially, which caused problems. It turns out that there
is no longer any need to handle those classes specially.
Diffstat (limited to 'lib/asn1/src/asn1ct_parser2.erl')
-rw-r--r-- | lib/asn1/src/asn1ct_parser2.erl | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/lib/asn1/src/asn1ct_parser2.erl b/lib/asn1/src/asn1ct_parser2.erl index 3891fce8d3..bcfa779997 100644 --- a/lib/asn1/src/asn1ct_parser2.erl +++ b/lib/asn1/src/asn1ct_parser2.erl @@ -752,17 +752,8 @@ parse_DefinedType(Tokens=[{typereference,_L1,_Module},{'.',_}, parse_DefinedType([{typereference,L1,Module},{'.',_},{typereference,_,TypeName}|Rest]) -> {#type{def = #'Externaltypereference'{pos=L1,module=Module,type=TypeName}},Rest}; parse_DefinedType([{typereference,L1,TypeName}|Rest]) -> - case is_pre_defined_class(TypeName) of - false -> - {#type{def = #'Externaltypereference'{pos=L1,module=resolve_module(TypeName), - type=TypeName}},Rest}; - _ -> - throw({asn1_error, - {L1,get(asn1_module), - [got,TypeName,expected, - [typereference,'typereference.typereference', - 'typereference typereference']]}}) - end; + {#type{def = #'Externaltypereference'{pos=L1,module=resolve_module(TypeName), + type=TypeName}},Rest}; parse_DefinedType(Tokens) -> throw({asn1_error,{get_line(hd(Tokens)),get(asn1_module), [got,get_token(hd(Tokens)),expected, @@ -3234,11 +3225,3 @@ lookahead_assignment([{'END',_}|_Rest]) -> lookahead_assignment(Tokens) -> parse_Assignment(Tokens), ok. - -is_pre_defined_class('TYPE-IDENTIFIER') -> - true; -is_pre_defined_class('ABSTRACT-SYNTAX') -> - true; -is_pre_defined_class(_) -> - false. - |