aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2014-12-02 17:18:44 +0100
committerBjörn Gustavsson <[email protected]>2015-01-12 12:22:56 +0100
commit657fe1cdf9f0e630a3a66ddcad24f143df6e1880 (patch)
treeda50c5cd1b35fc673dab60b4fb44f169ae92847d
parent831b45783976886675f853bca8a9a75ec39cda5c (diff)
downloadotp-657fe1cdf9f0e630a3a66ddcad24f143df6e1880.tar.gz
otp-657fe1cdf9f0e630a3a66ddcad24f143df6e1880.tar.bz2
otp-657fe1cdf9f0e630a3a66ddcad24f143df6e1880.zip
asn1ct_parser2: Remove unsuccessful parsing of ValueSetFromObjects
The TypeFromObject and ValueSetFromObjects grammar productions cannot be distinguished by the parser without the help of type information (which the parser does not have). Since the parser attempts to parse TypeFromObject before ValueSetFromObjects, the parsing of ValueSetFromObjects will always fail.
-rw-r--r--lib/asn1/src/asn1ct_parser2.erl23
1 files changed, 1 insertions, 22 deletions
diff --git a/lib/asn1/src/asn1ct_parser2.erl b/lib/asn1/src/asn1ct_parser2.erl
index 3960498742..4a576ce2d2 100644
--- a/lib/asn1/src/asn1ct_parser2.erl
+++ b/lib/asn1/src/asn1ct_parser2.erl
@@ -719,8 +719,7 @@ parse_TypeWithConstraint(Tokens) ->
parse_ReferencedType(Tokens) ->
Flist = [fun parse_DefinedType/1,
fun parse_SelectionType/1,
- fun parse_TypeFromObject/1,
- fun parse_ValueSetFromObjects/1],
+ fun parse_TypeFromObject/1],
case (catch parse_or(Tokens,Flist)) of
{'EXIT',Reason} ->
exit(Reason);
@@ -1694,26 +1693,6 @@ parse_ValueFromObject(Tokens) ->
%%% throw({asn1_error,{got,Other,expected,'.'}})
end.
-parse_ValueSetFromObjects(Tokens) ->
- {Objects,Rest} = parse_ReferencedObjects(Tokens),
- case Rest of
- [{'.',_}|Rest2] ->
- {Name,Rest3} = parse_FieldName(Rest2),
- case lists:last(Name) of
- {typefieldreference,_FieldName} ->
- {{'ValueSetFromObjects',Objects,Name},Rest3};
- _ ->
- throw({asn1_error,{get_line(hd(Rest2)),get(asn1_module),
- [got,get_token(hd(Rest2)),expected,
- typefieldreference]}})
- end;
- [H|_T] ->
- throw({asn1_error,{get_line(H),get(asn1_module),
- [got,get_token(H),expected,'.']}})
-%%% Other ->
-%%% throw({asn1_error,{got,Other,expected,'.'}})
- end.
-
parse_TypeFromObject(Tokens) ->
{Objects,Rest} = parse_ReferencedObjects(Tokens),
case Rest of