|
|
@@ -15,10 +15,10 @@ Header "%%--------------------------------------------------------------------
|
|
|
%%--------------------------------------------------------------------".
|
|
|
|
|
|
Nonterminals
|
|
|
-filter filtercomp filterlist item simple present substring initial any final extensible attr value type dnattrs matchingrule.
|
|
|
+filter filtercomp filterlist item simple present substring initial any final extensible attr value type dnattrs matchingrule pairedvalue.
|
|
|
|
|
|
Terminals
|
|
|
-lparen rparen 'and' 'or' 'not' equal approx greaterOrEqual lessOrEqual asterisk colon dn string.
|
|
|
+lparen rparen 'and' 'or' 'not' equal approx greaterOrEqual lessOrEqual asterisk colon dn string comma.
|
|
|
|
|
|
Rootsymbol filter.
|
|
|
Left 100 present.
|
|
|
@@ -52,6 +52,8 @@ item->
|
|
|
|
|
|
simple ->
|
|
|
attr equal value: equal('$1', '$3').
|
|
|
+simple ->
|
|
|
+ attr equal pairedvalue: equal('$1', '$3').
|
|
|
simple ->
|
|
|
attr approx value: approx('$1', '$3').
|
|
|
simple ->
|
|
|
@@ -100,6 +102,11 @@ attr ->
|
|
|
value ->
|
|
|
string: get_value('$1').
|
|
|
|
|
|
+pairedvalue ->
|
|
|
+ string equal string comma pairedvalue: make_paired_value('$1', '$3', '$5').
|
|
|
+pairedvalue ->
|
|
|
+ string equal string: make_paired_value('$1', '$3').
|
|
|
+
|
|
|
type ->
|
|
|
value: {type, '$1'}.
|
|
|
|
|
|
@@ -150,6 +157,15 @@ flatten(List) -> lists:flatten(List).
|
|
|
get_value({_Token, _Line, Value}) ->
|
|
|
Value.
|
|
|
|
|
|
+make_paired_value(Attr, Value) ->
|
|
|
+ Attr1 = get_value(Attr),
|
|
|
+ Value1 = get_value(Value),
|
|
|
+ Attr1 ++ "=" ++ Value1.
|
|
|
+
|
|
|
+make_paired_value(Attr, Value, Next) ->
|
|
|
+ Prefix = make_paired_value(Attr, Value),
|
|
|
+ Prefix ++ "," ++ Next.
|
|
|
+
|
|
|
scan_and_parse(Bin) when is_binary(Bin) ->
|
|
|
scan_and_parse(erlang:binary_to_list(Bin));
|
|
|
scan_and_parse(String) ->
|