diff --git a/deps/amqp10_common/include/amqp10_filter.hrl b/deps/amqp10_common/include/amqp10_filter.hrl index 0a08fa82df6..2521eb19077 100644 --- a/deps/amqp10_common/include/amqp10_filter.hrl +++ b/deps/amqp10_common/include/amqp10_filter.hrl @@ -4,28 +4,15 @@ %% %% Copyright (c) 2007-2025 Broadcom. All Rights Reserved. The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. All rights reserved. -%% A filter with this name contains a JMS message selector. -%% We use the same name as sent by the Qpid JMS client in -%% https://github.com/apache/qpid-jms/blob/2.7.0/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/AmqpSupport.java#L75 --define(FILTER_NAME_JMS, <<"jms-selector">>). - -%% A filter with this name contains an SQL expression. -%% In the current version, such a filter must comply with the JMS message selector syntax. -%% However, we use a name other than "jms-selector" in case we want to extend the allowed syntax -%% in the future, for example allowing for some of the extended grammar described in -%% §6 "SQL Filter Expressions" of -%% https://groups.oasis-open.org/higherlogic/ws/public/document?document_id=66227 --define(FILTER_NAME_SQL, <<"sql-filter">>). - -%% SQL-based filtering syntax -%% These descriptors are defined in -%% https://www.amqp.org/specification/1.0/filters --define(DESCRIPTOR_NAME_SELECTOR_FILTER, <<"apache.org:selector-filter:string">>). --define(DESCRIPTOR_CODE_SELECTOR_FILTER, 16#0000468C00000004). - -%% AMQP Filter Expressions Version 1.0 Working Draft 09 -%% https://groups.oasis-open.org/higherlogic/ws/public/document?document_id=66227 +%% AMQP Filter Expressions Version 1.0 Committee Specification Draft 01 +%% https://docs.oasis-open.org/amqp/filtex/v1.0/csd01/filtex-v1.0-csd01.html#_Toc67929266 -define(DESCRIPTOR_NAME_PROPERTIES_FILTER, <<"amqp:properties-filter">>). -define(DESCRIPTOR_CODE_PROPERTIES_FILTER, 16#173). -define(DESCRIPTOR_NAME_APPLICATION_PROPERTIES_FILTER, <<"amqp:application-properties-filter">>). -define(DESCRIPTOR_CODE_APPLICATION_PROPERTIES_FILTER, 16#174). + +%% A filter with this name contains an AMQP SQL expression. +-define(FILTER_NAME_SQL, <<"sql-filter">>). +%% https://docs.oasis-open.org/amqp/filtex/v1.0/csd01/filtex-v1.0-csd01.html#_Toc67929276 +-define(DESCRIPTOR_NAME_SQL_FILTER, <<"amqp:sql-filter">>). +-define(DESCRIPTOR_CODE_SQL_FILTER, 16#120). diff --git a/deps/rabbit/Makefile b/deps/rabbit/Makefile index 04262967d0c..7db19d2eae6 100644 --- a/deps/rabbit/Makefile +++ b/deps/rabbit/Makefile @@ -258,7 +258,7 @@ define ct_master.erl endef PARALLEL_CT_SET_1_A = unit_rabbit_ssl unit_cluster_formation_locking_mocks unit_cluster_formation_sort_nodes unit_collections unit_config_value_encryption unit_connection_tracking -PARALLEL_CT_SET_1_B = amqp_address amqp_auth amqp_credit_api_v2 amqp_filter_prop amqp_filter_sql amqp_jms_unit amqp_dotnet amqp_jms signal_handling single_active_consumer unit_access_control_authn_authz_context_propagation unit_access_control_credential_validation unit_amqp091_content_framing unit_amqp091_server_properties unit_app_management +PARALLEL_CT_SET_1_B = amqp_address amqp_auth amqp_credit_api_v2 amqp_filter_prop amqp_filter_sql amqp_filter_sql_unit amqp_dotnet amqp_jms signal_handling single_active_consumer unit_access_control_authn_authz_context_propagation unit_access_control_credential_validation unit_amqp091_content_framing unit_amqp091_server_properties unit_app_management PARALLEL_CT_SET_1_C = amqp_proxy_protocol amqpl_consumer_ack amqpl_direct_reply_to backing_queue bindings rabbit_db_maintenance rabbit_db_msup rabbit_db_policy rabbit_db_queue rabbit_db_topic_exchange rabbit_direct_reply_to_prop cluster_limit cluster_minority term_to_binary_compat_prop topic_permission transactions unicode unit_access_control PARALLEL_CT_SET_1_D = amqqueue_backward_compatibility channel_interceptor channel_operation_timeout classic_queue classic_queue_prop config_schema peer_discovery_dns peer_discovery_tmp_hidden_node per_node_limit per_user_connection_channel_limit diff --git a/deps/rabbit/src/rabbit_amqp_filter.erl b/deps/rabbit/src/rabbit_amqp_filter.erl index e7704f9f8b2..c38124c7ec9 100644 --- a/deps/rabbit/src/rabbit_amqp_filter.erl +++ b/deps/rabbit/src/rabbit_amqp_filter.erl @@ -10,7 +10,7 @@ -type expression() :: undefined | {property, rabbit_amqp_filter_prop:parsed_expressions()} | - {jms, rabbit_amqp_filter_jms:parsed_expression()}. + {sql, rabbit_amqp_filter_sql:parsed_expression()}. -export_type([expression/0]). @@ -20,5 +20,5 @@ eval(undefined, _Mc) -> true; eval({property, Expr}, Mc) -> rabbit_amqp_filter_prop:eval(Expr, Mc); -eval({jms, Expr}, Mc) -> - rabbit_amqp_filter_jms:eval(Expr, Mc). +eval({sql, Expr}, Mc) -> + rabbit_amqp_filter_sql:eval(Expr, Mc). diff --git a/deps/rabbit/src/rabbit_amqp_filter_jms.erl b/deps/rabbit/src/rabbit_amqp_filter_sql.erl similarity index 69% rename from deps/rabbit/src/rabbit_amqp_filter_jms.erl rename to deps/rabbit/src/rabbit_amqp_filter_sql.erl index 42426e130d1..0d7b1768bfb 100644 --- a/deps/rabbit/src/rabbit_amqp_filter_jms.erl +++ b/deps/rabbit/src/rabbit_amqp_filter_sql.erl @@ -4,44 +4,43 @@ %% %% Copyright (c) 2007-2025 Broadcom. All Rights Reserved. The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. All rights reserved. --module(rabbit_amqp_filter_jms). +-module(rabbit_amqp_filter_sql). -feature(maybe_expr, enable). -include_lib("amqp10_common/include/amqp10_filter.hrl"). -type parsed_expression() :: {ApplicationProperties :: boolean(), - rabbit_jms_ast:ast()}. + rabbit_amqp_sql_ast:ast()}. -export_type([parsed_expression/0]). -export([parse/1, - eval/2]). + eval/2, + is_control_char/1]). -%% [filtex-v1.0-wd09 7.1] +%% [Filter-Expressions-v1.0 7.1] +%% https://docs.oasis-open.org/amqp/filtex/v1.0/csd01/filtex-v1.0-csd01.html#_Toc67929316 -define(MAX_EXPRESSION_LENGTH, 4096). -define(MAX_TOKENS, 200). -%% defined in both AMQP and JMS -define(DEFAULT_MSG_PRIORITY, 4). --define(IS_CONTROL_CHAR(C), C < 32 orelse C =:= 127). - -spec parse(tuple()) -> {ok, parsed_expression()} | error. -parse({described, Descriptor, {utf8, JmsSelector}}) -> +parse({described, Descriptor, {utf8, SQL}}) -> maybe ok ?= check_descriptor(Descriptor), - {ok, String} ?= jms_selector_to_list(JmsSelector), + {ok, String} ?= sql_to_list(SQL), ok ?= check_length(String), - {ok, Tokens} ?= tokenize(String, JmsSelector), - ok ?= check_token_count(Tokens, JmsSelector), - {ok, Ast0} ?= parse(Tokens, JmsSelector), - {ok, Ast} ?= transform_ast(Ast0, JmsSelector), + {ok, Tokens} ?= tokenize(String, SQL), + ok ?= check_token_count(Tokens, SQL), + {ok, Ast0} ?= parse(Tokens, SQL), + {ok, Ast} ?= transform_ast(Ast0, SQL), AppProps = has_binary_identifier(Ast), {ok, {AppProps, Ast}} end. -%% Evaluates a parsed JMS message selector expression. +%% Evaluates a parsed SQL expression. -spec eval(parsed_expression(), mc:state()) -> boolean(). eval({ApplicationProperties, Ast}, Msg) -> State = case ApplicationProperties of @@ -59,8 +58,9 @@ eval({ApplicationProperties, Ast}, Msg) -> eval0({Type, Value}, _Msg) when Type =:= integer orelse Type =:= float orelse + Type =:= boolean orelse Type =:= string orelse - Type =:= boolean -> + Type =:= binary -> Value; %% Identifier lookup @@ -77,6 +77,10 @@ eval0({identifier, FieldName}, State) when is_atom(FieldName) -> end, get_field_value(FieldName, Msg); +%% Function calls +eval0({function, 'UTC', []}, _Msg) -> + os:system_time(millisecond); + %% Logical operators %% %% Table 3-4 in @@ -141,7 +145,8 @@ eval0({Op, Expr1, Expr2}, Msg) when Op =:= '+' orelse Op =:= '-' orelse Op =:= '*' orelse - Op =:= '/' -> + Op =:= '/' orelse + Op =:= '%' -> arithmetic(Op, eval0(Expr1, Msg), eval0(Expr2, Msg)); %% Unary operators @@ -159,15 +164,9 @@ eval0({unary_minus, Expr}, Msg) -> end; %% Special operators -eval0({'between', Expr, From, To}, Msg) -> +eval0({'in', Expr, ExprList}, Msg) -> Value = eval0(Expr, Msg), - FromVal = eval0(From, Msg), - ToVal = eval0(To, Msg), - between(Value, FromVal, ToVal); - -eval0({'in', Expr, ValueList}, Msg) -> - Value = eval0(Expr, Msg), - is_in(Value, ValueList); + is_in(Value, ExprList, Msg); eval0({'is_null', Expr}, Msg) -> eval0(Expr, Msg) =:= undefined; @@ -186,20 +185,23 @@ eval0({'like', Expr, {pattern, Pattern}}, Msg) -> %% "Comparison or arithmetic with an unknown value always yields an unknown value." compare(_Op, Left, Right) when Left =:= undefined orelse Right =:= undefined -> undefined; -%% "Only like type values can be compared. -%% One exception is that it is valid to compare exact numeric values and approximate numeric values. -%% String and Boolean comparison is restricted to = and <>." +%% "Only like type values can be compared. One exception is that it is valid to +%% compare exact numeric values and approximate numeric values" compare('=', Left, Right) -> Left == Right; compare('<>', Left, Right) -> Left /= Right; -compare('>', Left, Right) when is_number(Left) andalso is_number(Right) -> +compare('>', Left, Right) when is_number(Left) andalso is_number(Right) orelse + is_binary(Left) andalso is_binary(Right) -> Left > Right; -compare('<', Left, Right) when is_number(Left) andalso is_number(Right) -> +compare('<', Left, Right) when is_number(Left) andalso is_number(Right) orelse + is_binary(Left) andalso is_binary(Right) -> Left < Right; -compare('>=', Left, Right) when is_number(Left) andalso is_number(Right) -> +compare('>=', Left, Right) when is_number(Left) andalso is_number(Right) orelse + is_binary(Left) andalso is_binary(Right) -> Left >= Right; -compare('<=', Left, Right) when is_number(Left) andalso is_number(Right) -> +compare('<=', Left, Right) when is_number(Left) andalso is_number(Right) orelse + is_binary(Left) andalso is_binary(Right) -> Left =< Right; compare(_, _, _) -> %% "If the comparison of non-like type values is attempted, @@ -216,30 +218,18 @@ arithmetic('*', Left, Right) when is_number(Left) andalso is_number(Right) -> Left * Right; arithmetic('/', Left, Right) when is_number(Left) andalso is_number(Right) andalso Right /= 0 -> Left / Right; +arithmetic('%', Left, Right) when is_integer(Left) andalso is_integer(Right) andalso Right =/= 0 -> + Left rem Right; arithmetic(_, _, _) -> undefined. -between(Value, From, To) - when Value =:= undefined orelse - From =:= undefined orelse - To =:= undefined -> - undefined; -between(Value, From, To) - when is_number(Value) andalso - is_number(From) andalso - is_number(To) -> - From =< Value andalso Value =< To; -between(_, _, _) -> - %% BETWEEN requires arithmetic expressions - %% "a string cannot be used in an arithmetic expression" - false. - -is_in(undefined, _) -> +is_in(undefined, _, _) -> %% "If identifier of an IN or NOT IN operation is NULL, %% the value of the operation is unknown." undefined; -is_in(Value, List) -> - lists:member(Value, List). +is_in(Value, ExprList, Msg) -> + IsEqual = fun(Expr) -> eval0(Expr, Msg) == Value end, + lists:any(IsEqual, ExprList). like(Subject, {exact, Pattern}) -> Subject =:= Pattern; @@ -291,94 +281,87 @@ get_field_value(Name, Msg) -> undefined end. -check_descriptor({symbol, ?DESCRIPTOR_NAME_SELECTOR_FILTER}) -> +check_descriptor({symbol, ?DESCRIPTOR_NAME_SQL_FILTER}) -> ok; -check_descriptor({ulong, ?DESCRIPTOR_CODE_SELECTOR_FILTER}) -> +check_descriptor({ulong, ?DESCRIPTOR_CODE_SQL_FILTER}) -> ok; check_descriptor(_) -> error. -jms_selector_to_list(JmsSelector) -> - case unicode:characters_to_list(JmsSelector) of +sql_to_list(SQL) -> + case unicode:characters_to_list(SQL) of String when is_list(String) -> {ok, String}; Error -> - rabbit_log:warning("JMS message selector ~p is not UTF-8 encoded: ~p", - [JmsSelector, Error]), + rabbit_log:warning("SQL expression ~p is not UTF-8 encoded: ~p", + [SQL, Error]), error end. -check_length(String) - when length(String) > ?MAX_EXPRESSION_LENGTH -> - rabbit_log:warning("JMS message selector length ~b exceeds maximum length ~b", - [length(String), ?MAX_EXPRESSION_LENGTH]), - error; -check_length(_) -> - ok. +check_length(String) -> + Len = length(String), + case Len =< ?MAX_EXPRESSION_LENGTH of + true -> + ok; + false -> + rabbit_log:warning("SQL expression length ~b exceeds maximum length ~b", + [Len, ?MAX_EXPRESSION_LENGTH]), + error + end. -tokenize(String, JmsSelector) -> - case rabbit_jms_selector_lexer:string(String) of +tokenize(String, SQL) -> + case rabbit_amqp_sql_lexer:string(String) of {ok, Tokens, _EndLocation} -> {ok, Tokens}; {error, {_Line, _Mod, ErrDescriptor}, _Location} -> - rabbit_log:warning("failed to scan JMS message selector '~ts': ~tp", - [JmsSelector, ErrDescriptor]), + rabbit_log:warning("failed to scan SQL expression '~ts': ~tp", + [SQL, ErrDescriptor]), error end. -check_token_count(Tokens, JmsSelector) +check_token_count(Tokens, SQL) when length(Tokens) > ?MAX_TOKENS -> - rabbit_log:warning("JMS message selector '~ts' with ~b tokens exceeds token limit ~b", - [JmsSelector, length(Tokens), ?MAX_TOKENS]), + rabbit_log:warning("SQL expression '~ts' with ~b tokens exceeds token limit ~b", + [SQL, length(Tokens), ?MAX_TOKENS]), error; check_token_count(_, _) -> ok. -parse(Tokens, JmsSelector) -> - case rabbit_jms_selector_parser:parse(Tokens) of +parse(Tokens, SQL) -> + case rabbit_amqp_sql_parser:parse(Tokens) of {error, Reason} -> - rabbit_log:warning("failed to parse JMS message selector '~ts': ~p", - [JmsSelector, Reason]), + rabbit_log:warning("failed to parse SQL expression '~ts': ~p", + [SQL, Reason]), error; Ok -> Ok end. -transform_ast(Ast0, JmsSelector) -> - try rabbit_jms_ast:map( - fun({identifier, Ident}) - when is_binary(Ident) -> - {identifier, rabbit_amqp_util:section_field_name_to_atom(Ident)}; - ({'like', _Ident, _Pattern, _Escape} = Node) -> - transform_pattern_node(Node); - (Node) -> - Node - end, Ast0) of +transform_ast(Ast0, SQL) -> + try rabbit_amqp_sql_ast:map(fun({'like', _Id, _Pat, _Esc} = Node) -> + transform_pattern_node(Node); + (Node) -> + Node + end, Ast0) of Ast -> {ok, Ast} - catch {unsupported_field, Name} -> + catch {invalid_pattern, Reason} -> rabbit_log:warning( - "identifier ~ts in JMS message selector ~tp is unsupported", - [Name, JmsSelector]), - error; - {invalid_pattern, Reason} -> - rabbit_log:warning( - "failed to parse LIKE pattern for JMS message selector ~tp: ~tp", - [JmsSelector, Reason]), + "failed to parse LIKE pattern for SQL expression ~tp: ~tp", + [SQL, Reason]), error end. has_binary_identifier(Ast) -> - rabbit_jms_ast:search(fun({identifier, Val}) -> - is_binary(Val); - (_Node) -> - false - end, Ast). + rabbit_amqp_sql_ast:search(fun({identifier, Val}) -> + is_binary(Val); + (_Node) -> + false + end, Ast). %% If the Pattern contains no wildcard or a single % wildcard, -%% we will optimise message evaluation by using Erlang pattern matching. -%% Otherwise, we will match with a regex. Even though we compile regexes, -%% they are slower compared to Erlang pattern matching. +%% we will evaluate messages using Erlang pattern matching since +%% that's faster than evaluating compiled regexes. transform_pattern_node({Op, Ident, Pattern, Escape}) -> Pat = transform_pattern(Pattern, Escape), {Op, Ident, {pattern, Pat}}. @@ -390,7 +373,7 @@ transform_pattern(Pattern, Escape) -> {single_percent, Chars, PercentPos} -> single_percent(Chars, PercentPos); regex -> - Re = jms_pattern_to_regex(Pattern, Escape, []), + Re = pattern_to_regex(Pattern, Escape, []), case re:compile("^" ++ Re ++ "$", [unicode]) of {ok, CompiledRe} -> CompiledRe; @@ -441,23 +424,24 @@ single_percent(Chars, Pos) -> {{prefix, byte_size(PrefixBin), PrefixBin}, {suffix, byte_size(SuffixBin), SuffixBin}}. -jms_pattern_to_regex([], _Escape, Acc) -> +pattern_to_regex([], _Escape, Acc) -> lists:reverse(Acc); -jms_pattern_to_regex([EscapeChar | Rest], EscapeChar, Acc) -> +pattern_to_regex([EscapeChar | Rest], EscapeChar, Acc) -> case Rest of [] -> throw({invalid_pattern, invalid_escape_at_end}); [NextChar | Rest1] -> - jms_pattern_to_regex(Rest1, EscapeChar, escape_regex_char(NextChar) ++ Acc) + pattern_to_regex(Rest1, EscapeChar, escape_regex_char(NextChar) ++ Acc) end; -jms_pattern_to_regex([$% | Rest], Escape, Acc) -> +pattern_to_regex([$% | Rest], Escape, Acc) -> %% % matches any sequence of characters (0 or more) - jms_pattern_to_regex(Rest, Escape, [$*, $. | Acc]); -jms_pattern_to_regex([$_ | Rest], Escape, Acc) -> + %% "The wildcard matching MUST consume as few characters as possible." (non-greedy) + pattern_to_regex(Rest, Escape, [$?, $*, $. | Acc]); +pattern_to_regex([$_ | Rest], Escape, Acc) -> %% _ matches exactly one character - jms_pattern_to_regex(Rest, Escape, [$. | Acc]); -jms_pattern_to_regex([Char | Rest], Escape, Acc) -> - jms_pattern_to_regex(Rest, Escape, escape_regex_char(Char) ++ Acc). + pattern_to_regex(Rest, Escape, [$. | Acc]); +pattern_to_regex([Char | Rest], Escape, Acc) -> + pattern_to_regex(Rest, Escape, escape_regex_char(Char) ++ Acc). %% Escape user provided characters that have special meaning in Erlang regex. escape_regex_char(Char0) -> @@ -470,7 +454,15 @@ escape_regex_char(Char0) -> end. %% Let's disallow control characters in the user provided pattern. -check_char(C) when ?IS_CONTROL_CHAR(C) -> - throw({invalid_pattern, {prohibited_control_character, C}}); check_char(C) -> - C. + case is_control_char(C) of + true -> + throw({invalid_pattern, {illegal_control_character, C}}); + false -> + C + end. + +is_control_char(C) when C < 32 orelse C =:= 127 -> + true; +is_control_char(_) -> + false. diff --git a/deps/rabbit/src/rabbit_amqp_session.erl b/deps/rabbit/src/rabbit_amqp_session.erl index 27c6d969139..4ed13586e31 100644 --- a/deps/rabbit/src/rabbit_amqp_session.erl +++ b/deps/rabbit/src/rabbit_amqp_session.erl @@ -3254,14 +3254,14 @@ parse_filters(Filter = {{symbol, ?FILTER_NAME_SQL}, Value}, Acc = {EffectiveFilters, ConsumerFilter, ConsumerArgs}) -> case ConsumerFilter of undefined -> - case rabbit_amqp_filter_jms:parse(Value) of + case rabbit_amqp_filter_sql:parse(Value) of {ok, ParsedSql} -> - {[Filter | EffectiveFilters], {jms, ParsedSql}, ConsumerArgs}; + {[Filter | EffectiveFilters], {sql, ParsedSql}, ConsumerArgs}; error -> Acc end; _ -> - %% SQL filter expression is mutually exclusive with AMQP property filter expression. + %% SQL and property filter expressions are mutually exclusive. Acc end; parse_filters(Filter = {{symbol, _Key}, Value}, @@ -3284,9 +3284,8 @@ parse_filters(Filter = {{symbol, _Key}, Value}, {property, [ParsedExpression | ParsedExpressions]}, ConsumerArgs} end; - {jms, _} -> - %% SQL filter expression is mutually exclusive with - %% AMQP property filter expressions. + {sql, _} -> + %% SQL and property filter expressions are mutually exclusive. Acc end; error -> diff --git a/deps/rabbit/src/rabbit_amqp_sql_ast.erl b/deps/rabbit/src/rabbit_amqp_sql_ast.erl new file mode 100644 index 00000000000..421b9827e75 --- /dev/null +++ b/deps/rabbit/src/rabbit_amqp_sql_ast.erl @@ -0,0 +1,107 @@ +%% This Source Code Form is subject to the terms of the Mozilla Public +%% License, v. 2.0. If a copy of the MPL was not distributed with this +%% file, You can obtain one at https://mozilla.org/MPL/2.0/. +%% +%% Copyright (c) 2007-2025 Broadcom. All Rights Reserved. The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. All rights reserved. + +%% Helper functions operating on the Abstract Syntax Tree (AST) +%% as returned by rabbit_amqp_sql_parser:parse/1 +-module(rabbit_amqp_sql_ast). + +-export([search/2, + map/2]). + +-type ast() :: tuple(). +-export_type([ast/0]). + +-spec search(fun((term()) -> boolean()), ast()) -> boolean(). +search(Pred, Node) -> + case Pred(Node) of + true -> + true; + false -> + case Node of + {Op, Arg} when is_atom(Op) -> + search(Pred, Arg); + {in, Arg, List} -> + search(Pred, Arg) orelse + lists:any(fun(N) -> search(Pred, N) end, List); + {Op, Arg1, Arg2} when is_atom(Op) -> + search(Pred, Arg1) orelse + search(Pred, Arg2); + {Op, Arg1, Arg2, Arg3} when is_atom(Op) -> + search(Pred, Arg1) orelse + search(Pred, Arg2) orelse + search(Pred, Arg3); + _Other -> + false + end + end. + +-spec map(fun((tuple()) -> tuple()), ast()) -> + ast(). +map(Fun, Ast) when is_function(Fun, 1) -> + map_1(Ast, Fun). + +map_1(Pattern, _Fun) when element(1, Pattern) =:= pattern -> + Pattern; +map_1(Node, Fun) when is_atom(element(1, Node)) -> + map_2(Fun(Node), Fun); +map_1(Other, _Fun) -> + Other. + +map_2({Op, Arg1}, Fun) -> + {Op, map_1(Arg1, Fun)}; +map_2({in, Arg1, List}, Fun) -> + {in, map_1(Arg1, Fun), lists:map(fun(N) -> map_1(N, Fun) end, List)}; +map_2({Op, Arg1, Arg2}, Fun) -> + {Op, map_1(Arg1, Fun), map_1(Arg2, Fun)}; +map_2({Op, Arg1, Arg2, Arg3}, Fun) -> + {Op, map_1(Arg1, Fun), map_1(Arg2, Fun), map_1(Arg3, Fun)}. + +-ifdef(TEST). +-include_lib("eunit/include/eunit.hrl"). + +search_test() -> + false = search("TRUE"), + true = search("user_key_1 <> 'fake'"), + false = search("properties.subject = 'fake'"), + + false = search("NOT properties.group_id = 'test'"), + false = search("properties.group_sequence IS NULL"), + false = search("properties.group_sequence IS NOT NULL"), + true = search("NOT user_key = 'test'"), + true = search("custom_field IS NULL"), + + false = search("properties.group_id = 'g1' AND header.priority > 5"), + false = search("properties.group_sequence * 10 < 100"), + false = search("properties.creation_time >= 12345 OR properties.subject = 'test'"), + true = search("user_key = 'g1' AND header.priority > 5"), + true = search("header.priority > 5 AND user_key = 'g1'"), + true = search("custom_metric * 10 < 100"), + true = search("properties.creation_time >= 12345 OR user_data = 'test'"), + + false = search("properties.group_id LIKE 'group_%' ESCAPE '!'"), + true = search("user_tag LIKE 'group_%' ESCAPE '!'"), + + true = search("user_category IN ('g1', 'g2', 'g3')"), + true = search("p.group_id IN ('g1', user_key, 'g3')"), + true = search("p.group_id IN ('g1', 'g2', a.user_key)"), + false = search("p.group_id IN (p.reply_to_group_id, 'g2', 'g3')"), + false = search("properties.group_id IN ('g1', 'g2', 'g3')"), + + false = search("(properties.group_sequence + 1) * 2 <= 100 AND " ++ + "(properties.group_id LIKE 'prod_%' OR h.priority > 5)"), + true = search("(properties.group_sequence + 1) * 2 <= 100 AND " ++ + "(user_value LIKE 'prod_%' OR p.absolute_expiry_time < 10)"), + ok. + +search(Selector) -> + {ok, Tokens, _EndLocation} = rabbit_amqp_sql_lexer:string(Selector), + {ok, Ast} = rabbit_amqp_sql_parser:parse(Tokens), + search(fun({identifier, Val}) -> + is_binary(Val); + (_Node) -> + false + end, Ast). +-endif. diff --git a/deps/rabbit/src/rabbit_amqp_sql_lexer.erl b/deps/rabbit/src/rabbit_amqp_sql_lexer.erl new file mode 100644 index 00000000000..c3e0789e853 --- /dev/null +++ b/deps/rabbit/src/rabbit_amqp_sql_lexer.erl @@ -0,0 +1,1694 @@ +-file("leexinc.hrl", 0). +%% +%% %CopyrightBegin% +%% +%% SPDX-License-Identifier: BSD-2-Clause +%% +%% Copyright (c) 2008,2009 Robert Virding. All rights reserved. +%% Copyright Ericsson AB 2009-2025. All Rights Reserved. +%% +%% Redistribution and use in source and binary forms, with or without +%% modification, are permitted provided that the following conditions +%% are met: +%% +%% 1. Redistributions of source code must retain the above copyright +%% notice, this list of conditions and the following disclaimer. +%% 2. Redistributions in binary form must reproduce the above copyright +%% notice, this list of conditions and the following disclaimer in the +%% documentation and/or other materials provided with the distribution. +%% +%% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +%% "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +%% LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +%% FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +%% COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +%% INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +%% BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%% LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +%% CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +%% LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +%% ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +%% POSSIBILITY OF SUCH DAMAGE. +%% +%% %CopyrightEnd% +%% + +%% The source of this file is part of leex distribution, as such it +%% has the same Copyright as the other files in the leex +%% distribution. However, the resultant scanner generated by leex is the +%% property of the creator of the scanner and is not covered by that +%% Copyright. + +-module(rabbit_amqp_sql_lexer). + +-export([string/1,string/2,token/2,token/3,tokens/2,tokens/3]). +-export([format_error/1]). + +%% User code. This is placed here to allow extra attributes. +-file("rabbit_amqp_sql_lexer.xrl", 76). + +-define(KEYWORDS, [<<"and">>, <<"or">>, <<"not">>, + <<"like">>, <<"in">>, <<"is">>, <<"null">>, <<"escape">>, + <<"true">>, <<"false">>, + <<"exists">>, + <<"nan">>, <<"inf">>, + <<"lower">>, <<"upper">>, <<"left">>, <<"right">>, + <<"substring">>, <<"utc">>, <<"date">>]). + +parse_binary([$0, $x | HexChars]) -> + parse_hex_pairs(HexChars, <<>>). + +parse_hex_pairs([], Acc) -> + Acc; +parse_hex_pairs([H1, H2 | Rest], Acc) -> + Byte = list_to_integer([H1, H2], 16), + parse_hex_pairs(Rest, <>). + +process_string(Chars) -> + %% remove surrounding quotes + [Quote | Chars1] = Chars, + Chars2 = lists:droplast(Chars1), + Bin = unicode:characters_to_binary(Chars2), + %% process escaped quotes + binary:replace(Bin, <>, <>, [global]). + +process_section_identifier(Chars, TokenLine) -> + Bin = unicode:characters_to_binary(Chars), + case rabbit_amqp_util:section_field_name_to_atom(Bin) of + error -> + {error, {unsupported_field_name, Chars}}; + Id -> + {token, {identifier, TokenLine, Id}} + end. + +process_regular_identifier(Chars, TokenLine) -> + Bin = unicode:characters_to_binary(Chars), + case lists:member(string:lowercase(Bin), ?KEYWORDS) of + true -> + {error, {unsupported_identifier, Chars}}; + false -> + {token, {identifier, TokenLine, Bin}} + end. + +process_delimited_identifier(Chars, TokenLine) -> + %% remove surrounding brackets + Chars1 = lists:droplast(tl(Chars)), + case lists:any(fun rabbit_amqp_filter_sql:is_control_char/1, Chars1) of + true -> + {error, {illegal_control_character_in_identifier, Chars}}; + false -> + Bin = unicode:characters_to_binary(Chars1), + %% process escaped brackets + Bin1 = binary:replace(Bin, <<"[[">>, <<"[">>, [global]), + Bin2 = binary:replace(Bin1, <<"]]">>, <<"]">>, [global]), + {token, {identifier, TokenLine, Bin2}} + end. + +-file("leexinc.hrl", 47). + +format_error({illegal,S}) -> ["illegal characters ",io_lib:write_string(S)]; +format_error({user,S}) -> S. + +%% string(InChars) -> +%% string(InChars, Loc) -> +%% {ok,Tokens,EndLoc} | {error,ErrorInfo,EndLoc}. +%% Loc is the starting location of the token, while EndLoc is the first not scanned +%% location. Location is either Line or {Line,Column}, depending on the "error_location" option. + +string(Ics) -> + string(Ics,1). +string(Ics,L0) -> + string(Ics, L0, 1, Ics, []). +string(Ics, L0, C0, Tcs, Ts) -> + case do_string(Ics, L0, C0, Tcs, Ts) of + {ok, T, {L,_}} -> {ok, T, L}; + {error, {{EL,_},M,D}, {L,_}} -> + EI = {EL,M,D}, + {error, EI, L} + end. + +do_string([], L, C, [], Ts) -> % No partial tokens! + {ok,yyrev(Ts),{L,C}}; +do_string(Ics0, L0, C0, Tcs, Ts) -> + case yystate(yystate(), Ics0, L0, C0, 0, reject, 0) of + {A,Alen,Ics1,L1,_C1} -> % Accepting end state + C2 = adjust_col(Tcs, Alen, C0), + string_cont(Ics1, L1, C2, yyaction(A, Alen, Tcs, L0, C0), Ts); + {A,Alen,Ics1,L1,_C1,_S1} -> % Accepting transition state + C2 = adjust_col(Tcs, Alen, C0), + string_cont(Ics1, L1, C2, yyaction(A, Alen, Tcs, L0, C0), Ts); + {reject,_Alen,Tlen,_Ics1,_L1,_C1,_S1} -> % After a non-accepting state + {error,{{L0, C0} ,?MODULE,{illegal,yypre(Tcs, Tlen+1)}},{L0, C0}}; + {A,Alen,Tlen,_Ics1,L1, C1,_S1}-> + Tcs1 = yysuf(Tcs, Alen), + L2 = adjust_line(Tlen, Alen, Tcs1, L1), + C2 = adjust_col(Tcs, Alen, C1), + string_cont(Tcs1, L2, C2, yyaction(A, Alen, Tcs, L0,C0), Ts) + end. + +%% string_cont(RestChars, Line, Col, Token, Tokens) +%% Test for and remove the end token wrapper. Push back characters +%% are prepended to RestChars. + +-dialyzer({nowarn_function, string_cont/5}). + +string_cont(Rest, Line, Col, {token,T}, Ts) -> + do_string(Rest, Line, Col, Rest, [T|Ts]); +string_cont(Rest, Line, Col, {token,T,Push}, Ts) -> + NewRest = Push ++ Rest, + do_string(NewRest, Line, Col, NewRest, [T|Ts]); +string_cont(Rest, Line, Col, {end_token,T}, Ts) -> + do_string(Rest, Line, Col, Rest, [T|Ts]); +string_cont(Rest, Line, Col, {end_token,T,Push}, Ts) -> + NewRest = Push ++ Rest, + do_string(NewRest, Line, Col, NewRest, [T|Ts]); +string_cont(Rest, Line, Col, skip_token, Ts) -> + do_string(Rest, Line, Col, Rest, Ts); +string_cont(Rest, Line, Col, {skip_token,Push}, Ts) -> + NewRest = Push ++ Rest, + do_string(NewRest, Line, Col, NewRest, Ts); +string_cont(_Rest, Line, Col, {error,S}, _Ts) -> + {error,{{Line, Col},?MODULE,{user,S}},{Line,Col}}. + +%% token(Continuation, Chars) -> +%% token(Continuation, Chars, Loc) -> +%% {more,Continuation} | {done,ReturnVal,RestChars}. +%% Must be careful when re-entering to append the latest characters to the +%% after characters in an accept. The continuation is: +%% {token,State,CurrLine,CurrCol,TokenChars,TokenLen,TokenLine,TokenCol,AccAction,AccLen} + +token(Cont,Chars) -> + token(Cont,Chars,1). +token(Cont, Chars, Line) -> + case do_token(Cont,Chars,Line,1) of + {more, _} = C -> C; + {done, Ret0, R} -> + Ret1 = case Ret0 of + {ok, T, {L,_}} -> {ok, T, L}; + {eof, {L,_}} -> {eof, L}; + {error, {{EL,_},M,D},{L,_}} -> {error, {EL,M,D},L} + end, + {done, Ret1, R} + end. + +do_token([], Chars, Line, Col) -> + token(yystate(), Chars, Line, Col, Chars, 0, Line, Col, reject, 0); +do_token({token,State,Line,Col,Tcs,Tlen,Tline,Tcol,Action,Alen}, Chars, _, _) -> + token(State, Chars, Line, Col, Tcs ++ Chars, Tlen, Tline, Tcol, Action, Alen). + +%% token(State, InChars, Line, Col, TokenChars, TokenLen, TokenLine, TokenCol +%% AcceptAction, AcceptLen) -> +%% {more,Continuation} | {done,ReturnVal,RestChars}. +%% The argument order is chosen to be more efficient. + +token(S0, Ics0, L0, C0, Tcs, Tlen0, Tline, Tcol, A0, Alen0) -> + case yystate(S0, Ics0, L0, C0, Tlen0, A0, Alen0) of + %% Accepting end state, we have a token. + {A1,Alen1,Ics1,L1,C1} -> + C2 = adjust_col(Tcs, Alen1, C1), + token_cont(Ics1, L1, C2, yyaction(A1, Alen1, Tcs, Tline,Tcol)); + %% Accepting transition state, can take more chars. + {A1,Alen1,[],L1,C1,S1} -> % Need more chars to check + {more,{token,S1,L1,C1,Tcs,Alen1,Tline,Tcol,A1,Alen1}}; + {A1,Alen1,Ics1,L1,C1,_S1} -> % Take what we got + C2 = adjust_col(Tcs, Alen1, C1), + token_cont(Ics1, L1, C2, yyaction(A1, Alen1, Tcs, Tline,Tcol)); + %% After a non-accepting state, maybe reach accept state later. + {A1,Alen1,Tlen1,[],L1,C1,S1} -> % Need more chars to check + {more,{token,S1,L1,C1,Tcs,Tlen1,Tline,Tcol,A1,Alen1}}; + {reject,_Alen1,Tlen1,eof,L1,C1,_S1} -> % No token match + %% Check for partial token which is error. + Ret = if Tlen1 > 0 -> {error,{{Tline,Tcol},?MODULE, + %% Skip eof tail in Tcs. + {illegal,yypre(Tcs, Tlen1)}},{L1,C1}}; + true -> {eof,{L1,C1}} + end, + {done,Ret,eof}; + {reject,_Alen1,Tlen1,Ics1,_L1,_C1,_S1} -> % No token match + Error = {{Tline,Tcol},?MODULE,{illegal,yypre(Tcs, Tlen1+1)}}, + {done,{error,Error,{Tline,Tcol}},Ics1}; + {A1,Alen1,Tlen1,_Ics1,L1,_C1,_S1} -> % Use last accept match + Tcs1 = yysuf(Tcs, Alen1), + L2 = adjust_line(Tlen1, Alen1, Tcs1, L1), + C2 = C0 + Alen1, + token_cont(Tcs1, L2, C2, yyaction(A1, Alen1, Tcs, Tline, Tcol)) + end. + +%% token_cont(RestChars, Line, Col, Token) +%% If we have a token or error then return done, else if we have a +%% skip_token then continue. + +-dialyzer({nowarn_function, token_cont/4}). + +token_cont(Rest, Line, Col, {token,T}) -> + {done,{ok,T,{Line,Col}},Rest}; +token_cont(Rest, Line, Col, {token,T,Push}) -> + NewRest = Push ++ Rest, + {done,{ok,T,{Line,Col}},NewRest}; +token_cont(Rest, Line, Col, {end_token,T}) -> + {done,{ok,T,{Line,Col}},Rest}; +token_cont(Rest, Line, Col, {end_token,T,Push}) -> + NewRest = Push ++ Rest, + {done,{ok,T,{Line,Col}},NewRest}; +token_cont(Rest, Line, Col, skip_token) -> + token(yystate(), Rest, Line, Col, Rest, 0, Line, Col, reject, 0); +token_cont(Rest, Line, Col, {skip_token,Push}) -> + NewRest = Push ++ Rest, + token(yystate(), NewRest, Line, Col, NewRest, 0, Line, Col, reject, 0); +token_cont(Rest, Line, Col, {error,S}) -> + {done,{error,{{Line, Col},?MODULE,{user,S}},{Line, Col}},Rest}. + +%% tokens(Continuation, Chars) -> +%% tokens(Continuation, Chars, Loc) -> +%% {more,Continuation} | {done,ReturnVal,RestChars}. +%% Must be careful when re-entering to append the latest characters to the +%% after characters in an accept. The continuation is: +%% {tokens,State,CurrLine,CurrCol,TokenChars,TokenLen,TokenLine,TokenCur,Tokens,AccAction,AccLen} +%% {skip_tokens,State,CurrLine,CurrCol,TokenChars,TokenLen,TokenLine,TokenCur,Error,AccAction,AccLen} + +tokens(Cont,Chars) -> + tokens(Cont,Chars,1). +tokens(Cont, Chars, Line) -> + case do_tokens(Cont,Chars,Line,1) of + {more, _} = C -> C; + {done, Ret0, R} -> + Ret1 = case Ret0 of + {ok, T, {L,_}} -> {ok, T, L}; + {eof, {L,_}} -> {eof, L}; + {error, {{EL,_},M,D},{L,_}} -> {error, {EL,M,D},L} + end, + {done, Ret1, R} + end. + +do_tokens([], Chars, Line, Col) -> + tokens(yystate(), Chars, Line, Col, Chars, 0, Line, Col, [], reject, 0); +do_tokens({tokens,State,Line,Col,Tcs,Tlen,Tline,Tcol,Ts,Action,Alen}, Chars, _,_) -> + tokens(State, Chars, Line, Col, Tcs ++ Chars, Tlen, Tline, Tcol, Ts, Action, Alen); +do_tokens({skip_tokens,State,Line, Col, Tcs,Tlen,Tline,Tcol,Error,Action,Alen}, Chars, _,_) -> + skip_tokens(State, Chars, Line, Col, Tcs ++ Chars, Tlen, Tline, Tcol, Error, Action, Alen). + +%% tokens(State, InChars, Line, Col, TokenChars, TokenLen, TokenLine, TokenCol,Tokens, +%% AcceptAction, AcceptLen) -> +%% {more,Continuation} | {done,ReturnVal,RestChars}. + +tokens(S0, Ics0, L0, C0, Tcs, Tlen0, Tline, Tcol, Ts, A0, Alen0) -> + case yystate(S0, Ics0, L0, C0, Tlen0, A0, Alen0) of + %% Accepting end state, we have a token. + {A1,Alen1,Ics1,L1,C1} -> + C2 = adjust_col(Tcs, Alen1, C1), + tokens_cont(Ics1, L1, C2, yyaction(A1, Alen1, Tcs, Tline, Tcol), Ts); + %% Accepting transition state, can take more chars. + {A1,Alen1,[],L1,C1,S1} -> % Need more chars to check + {more,{tokens,S1,L1,C1,Tcs,Alen1,Tline,Tcol,Ts,A1,Alen1}}; + {A1,Alen1,Ics1,L1,C1,_S1} -> % Take what we got + C2 = adjust_col(Tcs, Alen1, C1), + tokens_cont(Ics1, L1, C2, yyaction(A1, Alen1, Tcs, Tline,Tcol), Ts); + %% After a non-accepting state, maybe reach accept state later. + {A1,Alen1,Tlen1,[],L1,C1,S1} -> % Need more chars to check + {more,{tokens,S1,L1,C1,Tcs,Tlen1,Tline,Tcol,Ts,A1,Alen1}}; + {reject,_Alen1,Tlen1,eof,L1,C1,_S1} -> % No token match + %% Check for partial token which is error, no need to skip here. + Ret = if Tlen1 > 0 -> {error,{{Tline,Tcol},?MODULE, + %% Skip eof tail in Tcs. + {illegal,yypre(Tcs, Tlen1)}},{L1,C1}}; + Ts == [] -> {eof,{L1,C1}}; + true -> {ok,yyrev(Ts),{L1,C1}} + end, + {done,Ret,eof}; + {reject,_Alen1,Tlen1,_Ics1,L1,C1,_S1} -> + %% Skip rest of tokens. + Error = {{L1,C1},?MODULE,{illegal,yypre(Tcs, Tlen1+1)}}, + skip_tokens(yysuf(Tcs, Tlen1+1), L1, C1, Error); + {A1,Alen1,Tlen1,_Ics1,L1,_C1,_S1} -> + Token = yyaction(A1, Alen1, Tcs, Tline,Tcol), + Tcs1 = yysuf(Tcs, Alen1), + L2 = adjust_line(Tlen1, Alen1, Tcs1, L1), + C2 = C0 + Alen1, + tokens_cont(Tcs1, L2, C2, Token, Ts) + end. + +%% tokens_cont(RestChars, Line, Column, Token, Tokens) +%% If we have an end_token or error then return done, else if we have +%% a token then save it and continue, else if we have a skip_token +%% just continue. + +-dialyzer({nowarn_function, tokens_cont/5}). + +tokens_cont(Rest, Line, Col, {token,T}, Ts) -> + tokens(yystate(), Rest, Line, Col, Rest, 0, Line, Col, [T|Ts], reject, 0); +tokens_cont(Rest, Line, Col, {token,T,Push}, Ts) -> + NewRest = Push ++ Rest, + tokens(yystate(), NewRest, Line, Col, NewRest, 0, Line, Col, [T|Ts], reject, 0); +tokens_cont(Rest, Line, Col, {end_token,T}, Ts) -> + {done,{ok,yyrev(Ts, [T]),{Line,Col}},Rest}; +tokens_cont(Rest, Line, Col, {end_token,T,Push}, Ts) -> + NewRest = Push ++ Rest, + {done,{ok,yyrev(Ts, [T]),{Line, Col}},NewRest}; +tokens_cont(Rest, Line, Col, skip_token, Ts) -> + tokens(yystate(), Rest, Line, Col, Rest, 0, Line, Col, Ts, reject, 0); +tokens_cont(Rest, Line, Col, {skip_token,Push}, Ts) -> + NewRest = Push ++ Rest, + tokens(yystate(), NewRest, Line, Col, NewRest, 0, Line, Col, Ts, reject, 0); +tokens_cont(Rest, Line, Col, {error,S}, _Ts) -> + skip_tokens(Rest, Line, Col, {{Line,Col},?MODULE,{user,S}}). + +%% skip_tokens(InChars, Line, Col, Error) -> {done,{error,Error,{Line,Col}},Ics}. +%% Skip tokens until an end token, junk everything and return the error. + +skip_tokens(Ics, Line, Col, Error) -> + skip_tokens(yystate(), Ics, Line, Col, Ics, 0, Line, Col, Error, reject, 0). + +%% skip_tokens(State, InChars, Line, Col, TokenChars, TokenLen, TokenLine, TokenCol, Tokens, +%% AcceptAction, AcceptLen) -> +%% {more,Continuation} | {done,ReturnVal,RestChars}. + +skip_tokens(S0, Ics0, L0, C0, Tcs, Tlen0, Tline, Tcol, Error, A0, Alen0) -> + case yystate(S0, Ics0, L0, C0, Tlen0, A0, Alen0) of + {A1,Alen1,Ics1,L1, C1} -> % Accepting end state + skip_cont(Ics1, L1, C1, yyaction(A1, Alen1, Tcs, Tline, Tcol), Error); + {A1,Alen1,[],L1,C1, S1} -> % After an accepting state + {more,{skip_tokens,S1,L1,C1,Tcs,Alen1,Tline,Tcol,Error,A1,Alen1}}; + {A1,Alen1,Ics1,L1,C1,_S1} -> + skip_cont(Ics1, L1, C1, yyaction(A1, Alen1, Tcs, Tline, Tcol), Error); + {A1,Alen1,Tlen1,[],L1,C1,S1} -> % After a non-accepting state + {more,{skip_tokens,S1,L1,C1,Tcs,Tlen1,Tline,Tcol,Error,A1,Alen1}}; + {reject,_Alen1,_Tlen1,eof,L1,C1,_S1} -> + {done,{error,Error,{L1,C1}},eof}; + {reject,_Alen1,Tlen1,_Ics1,L1,C1,_S1} -> + skip_tokens(yysuf(Tcs, Tlen1+1), L1, C1,Error); + {A1,Alen1,Tlen1,_Ics1,L1,C1,_S1} -> + Token = yyaction(A1, Alen1, Tcs, Tline, Tcol), + Tcs1 = yysuf(Tcs, Alen1), + L2 = adjust_line(Tlen1, Alen1, Tcs1, L1), + skip_cont(Tcs1, L2, C1, Token, Error) + end. + +%% skip_cont(RestChars, Line, Col, Token, Error) +%% Skip tokens until we have an end_token or error then return done +%% with the original rror. + +-dialyzer({nowarn_function, skip_cont/5}). + +skip_cont(Rest, Line, Col, {token,_T}, Error) -> + skip_tokens(yystate(), Rest, Line, Col, Rest, 0, Line, Col, Error, reject, 0); +skip_cont(Rest, Line, Col, {token,_T,Push}, Error) -> + NewRest = Push ++ Rest, + skip_tokens(yystate(), NewRest, Line, Col, NewRest, 0, Line, Col, Error, reject, 0); +skip_cont(Rest, Line, Col, {end_token,_T}, Error) -> + {done,{error,Error,{Line,Col}},Rest}; +skip_cont(Rest, Line, Col, {end_token,_T,Push}, Error) -> + NewRest = Push ++ Rest, + {done,{error,Error,{Line,Col}},NewRest}; +skip_cont(Rest, Line, Col, skip_token, Error) -> + skip_tokens(yystate(), Rest, Line, Col, Rest, 0, Line, Col, Error, reject, 0); +skip_cont(Rest, Line, Col, {skip_token,Push}, Error) -> + NewRest = Push ++ Rest, + skip_tokens(yystate(), NewRest, Line, Col, NewRest, 0, Line, Col, Error, reject, 0); +skip_cont(Rest, Line, Col, {error,_S}, Error) -> + skip_tokens(yystate(), Rest, Line, Col, Rest, 0, Line, Col, Error, reject, 0). + +-compile({nowarn_unused_function, [yyrev/1, yyrev/2, yypre/2, yysuf/2]}). + +yyrev(List) -> lists:reverse(List). +yyrev(List, Tail) -> lists:reverse(List, Tail). +yypre(List, N) -> lists:sublist(List, N). +yysuf(List, N) -> lists:nthtail(N, List). + +%% adjust_line(TokenLength, AcceptLength, Chars, Line) -> NewLine +%% Make sure that newlines in Chars are not counted twice. +%% Line has been updated with respect to newlines in the prefix of +%% Chars consisting of (TokenLength - AcceptLength) characters. + +-compile({nowarn_unused_function, adjust_line/4}). + +adjust_line(N, N, _Cs, L) -> L; +adjust_line(T, A, [$\n|Cs], L) -> + adjust_line(T-1, A, Cs, L-1); +adjust_line(T, A, [_|Cs], L) -> + adjust_line(T-1, A, Cs, L). + +%% adjust_col(Chars, AcceptLength, Col) -> NewCol +%% Handle newlines, tabs and unicode chars. +adjust_col(_, 0, Col) -> + Col; +adjust_col([$\n | R], L, _) -> + adjust_col(R, L-1, 1); +adjust_col([$\t | R], L, Col) -> + adjust_col(R, L-1, tab_forward(Col)+1); +adjust_col([C | R], L, Col) when C>=0 andalso C=< 16#7F -> + adjust_col(R, L-1, Col+1); +adjust_col([C | R], L, Col) when C>= 16#80 andalso C=< 16#7FF -> + adjust_col(R, L-1, Col+2); +adjust_col([C | R], L, Col) when C>= 16#800 andalso C=< 16#FFFF -> + adjust_col(R, L-1, Col+3); +adjust_col([C | R], L, Col) when C>= 16#10000 andalso C=< 16#10FFFF -> + adjust_col(R, L-1, Col+4). + +tab_forward(C) -> + D = C rem tab_size(), + A = tab_size()-D, + C+A. + +tab_size() -> 8. + +%% yystate() -> InitialState. +%% yystate(State, InChars, Line, Col, CurrTokLen, AcceptAction, AcceptLen) -> +%% {Action, AcceptLen, RestChars, Line, Col} | +%% {Action, AcceptLen, RestChars, Line, Col, State} | +%% {reject, AcceptLen, CurrTokLen, RestChars, Line, Col, State} | +%% {Action, AcceptLen, CurrTokLen, RestChars, Line, Col, State}. +%% Generated state transition functions. The non-accepting end state +%% return signal either an unrecognised character or end of current +%% input. + +-file("rabbit_amqp_sql_lexer.erl", 429). +yystate() -> 76. + +yystate(79, [95|Ics], Line, Col, Tlen, _, _) -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(79, [65|Ics], Line, Col, Tlen, _, _) -> + yystate(77, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(79, [46|Ics], Line, Col, Tlen, _, _) -> + yystate(36, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(79, [45|Ics], Line, Col, Tlen, _, _) -> + yystate(28, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(79, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> + yystate(40, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(79, [C|Ics], Line, Col, Tlen, _, _) when C >= 66, C =< 90 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(79, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 122 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(79, Ics, Line, Col, Tlen, _, _) -> + {33,Tlen,Ics,Line,Col,79}; +yystate(78, Ics, Line, Col, Tlen, _, _) -> + {34,Tlen,Ics,Line,Col}; +yystate(77, [95|Ics], Line, Col, Tlen, _, _) -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(77, [80|Ics], Line, Col, Tlen, _, _) -> + yystate(73, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(77, [46|Ics], Line, Col, Tlen, _, _) -> + yystate(36, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(77, [45|Ics], Line, Col, Tlen, _, _) -> + yystate(28, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(77, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> + yystate(40, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(77, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 79 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(77, [C|Ics], Line, Col, Tlen, _, _) when C >= 81, C =< 90 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(77, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 122 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(77, Ics, Line, Col, Tlen, _, _) -> + {33,Tlen,Ics,Line,Col,77}; +yystate(76, [91|Ics], Line, Col, Tlen, Action, Alen) -> + yystate(72, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(76, [85|Ics], Line, Col, Tlen, Action, Alen) -> + yystate(56, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(76, [84|Ics], Line, Col, Tlen, Action, Alen) -> + yystate(24, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(76, [79|Ics], Line, Col, Tlen, Action, Alen) -> + yystate(8, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(76, [78|Ics], Line, Col, Tlen, Action, Alen) -> + yystate(0, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(76, [76|Ics], Line, Col, Tlen, Action, Alen) -> + yystate(23, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(76, [73|Ics], Line, Col, Tlen, Action, Alen) -> + yystate(39, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(76, [70|Ics], Line, Col, Tlen, Action, Alen) -> + yystate(51, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(76, [69|Ics], Line, Col, Tlen, Action, Alen) -> + yystate(71, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(76, [65|Ics], Line, Col, Tlen, Action, Alen) -> + yystate(65, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(76, [63|Ics], Line, Col, Tlen, Action, Alen) -> + yystate(78, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(76, [64|Ics], Line, Col, Tlen, Action, Alen) -> + yystate(78, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(76, [62|Ics], Line, Col, Tlen, Action, Alen) -> + yystate(53, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(76, [61|Ics], Line, Col, Tlen, Action, Alen) -> + yystate(45, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(76, [60|Ics], Line, Col, Tlen, Action, Alen) -> + yystate(41, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(76, [58|Ics], Line, Col, Tlen, Action, Alen) -> + yystate(78, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(76, [59|Ics], Line, Col, Tlen, Action, Alen) -> + yystate(78, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(76, [48|Ics], Line, Col, Tlen, Action, Alen) -> + yystate(5, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(76, [47|Ics], Line, Col, Tlen, Action, Alen) -> + yystate(10, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(76, [46|Ics], Line, Col, Tlen, Action, Alen) -> + yystate(78, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(76, [45|Ics], Line, Col, Tlen, Action, Alen) -> + yystate(14, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(76, [44|Ics], Line, Col, Tlen, Action, Alen) -> + yystate(18, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(76, [43|Ics], Line, Col, Tlen, Action, Alen) -> + yystate(22, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(76, [42|Ics], Line, Col, Tlen, Action, Alen) -> + yystate(26, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(76, [41|Ics], Line, Col, Tlen, Action, Alen) -> + yystate(30, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(76, [40|Ics], Line, Col, Tlen, Action, Alen) -> + yystate(34, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(76, [39|Ics], Line, Col, Tlen, Action, Alen) -> + yystate(38, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(76, [38|Ics], Line, Col, Tlen, Action, Alen) -> + yystate(78, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(76, [37|Ics], Line, Col, Tlen, Action, Alen) -> + yystate(50, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(76, [35|Ics], Line, Col, Tlen, Action, Alen) -> + yystate(78, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(76, [36|Ics], Line, Col, Tlen, Action, Alen) -> + yystate(78, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(76, [34|Ics], Line, Col, Tlen, Action, Alen) -> + yystate(54, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(76, [33|Ics], Line, Col, Tlen, Action, Alen) -> + yystate(66, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(76, [32|Ics], Line, Col, Tlen, Action, Alen) -> + yystate(74, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(76, [12|Ics], Line, Col, Tlen, Action, Alen) -> + yystate(74, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(76, [13|Ics], Line, Col, Tlen, Action, Alen) -> + yystate(74, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(76, [11|Ics], Line, Col, Tlen, Action, Alen) -> + yystate(78, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(76, [10|Ics], Line, _, Tlen, Action, Alen) -> + yystate(74, Ics, Line+1, 1, Tlen+1, Action, Alen); +yystate(76, [9|Ics], Line, Col, Tlen, Action, Alen) -> + yystate(74, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(76, [C|Ics], Line, Col, Tlen, Action, Alen) when C >= 0, C =< 8 -> + yystate(78, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(76, [C|Ics], Line, Col, Tlen, Action, Alen) when C >= 14, C =< 31 -> + yystate(78, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(76, [C|Ics], Line, Col, Tlen, Action, Alen) when C >= 49, C =< 57 -> + yystate(29, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(76, [C|Ics], Line, Col, Tlen, Action, Alen) when C >= 66, C =< 90 -> + yystate(44, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(76, [C|Ics], Line, Col, Tlen, Action, Alen) when C >= 92, C =< 96 -> + yystate(78, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(76, [C|Ics], Line, Col, Tlen, Action, Alen) when C >= 97, C =< 122 -> + yystate(44, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(76, [C|Ics], Line, Col, Tlen, Action, Alen) when C >= 123 -> + yystate(78, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(76, Ics, Line, Col, Tlen, Action, Alen) -> + {Action,Alen,Tlen,Ics,Line,Col,76}; +yystate(75, [95|Ics], Line, Col, Tlen, _, _) -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(75, [67|Ics], Line, Col, Tlen, _, _) -> + yystate(79, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(75, [65|Ics], Line, Col, Tlen, _, _) -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(75, [66|Ics], Line, Col, Tlen, _, _) -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(75, [46|Ics], Line, Col, Tlen, _, _) -> + yystate(36, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(75, [45|Ics], Line, Col, Tlen, _, _) -> + yystate(28, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(75, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> + yystate(40, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(75, [C|Ics], Line, Col, Tlen, _, _) when C >= 68, C =< 90 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(75, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 122 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(75, Ics, Line, Col, Tlen, _, _) -> + {33,Tlen,Ics,Line,Col,75}; +yystate(74, [32|Ics], Line, Col, Tlen, _, _) -> + yystate(74, Ics, Line, Col, Tlen+1, 0, Tlen); +yystate(74, [12|Ics], Line, Col, Tlen, _, _) -> + yystate(74, Ics, Line, Col, Tlen+1, 0, Tlen); +yystate(74, [13|Ics], Line, Col, Tlen, _, _) -> + yystate(74, Ics, Line, Col, Tlen+1, 0, Tlen); +yystate(74, [9|Ics], Line, Col, Tlen, _, _) -> + yystate(74, Ics, Line, Col, Tlen+1, 0, Tlen); +yystate(74, [10|Ics], Line, _, Tlen, _, _) -> + yystate(74, Ics, Line+1, 1, Tlen+1, 0, Tlen); +yystate(74, Ics, Line, Col, Tlen, _, _) -> + {0,Tlen,Ics,Line,Col,74}; +yystate(73, [95|Ics], Line, Col, Tlen, _, _) -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(73, [69|Ics], Line, Col, Tlen, _, _) -> + yystate(69, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(73, [46|Ics], Line, Col, Tlen, _, _) -> + yystate(36, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(73, [45|Ics], Line, Col, Tlen, _, _) -> + yystate(28, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(73, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> + yystate(40, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(73, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 68 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(73, [C|Ics], Line, Col, Tlen, _, _) when C >= 70, C =< 90 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(73, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 122 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(73, Ics, Line, Col, Tlen, _, _) -> + {33,Tlen,Ics,Line,Col,73}; +yystate(72, [93|Ics], Line, Col, Tlen, _, _) -> + yystate(68, Ics, Line, Col, Tlen+1, 34, Tlen); +yystate(72, [92|Ics], Line, Col, Tlen, _, _) -> + yystate(64, Ics, Line, Col, Tlen+1, 34, Tlen); +yystate(72, [91|Ics], Line, Col, Tlen, _, _) -> + yystate(60, Ics, Line, Col, Tlen+1, 34, Tlen); +yystate(72, [10|Ics], Line, _, Tlen, _, _) -> + yystate(64, Ics, Line+1, 1, Tlen+1, 34, Tlen); +yystate(72, [C|Ics], Line, Col, Tlen, _, _) when C >= 0, C =< 9 -> + yystate(64, Ics, Line, Col, Tlen+1, 34, Tlen); +yystate(72, [C|Ics], Line, Col, Tlen, _, _) when C >= 11, C =< 90 -> + yystate(64, Ics, Line, Col, Tlen+1, 34, Tlen); +yystate(72, [C|Ics], Line, Col, Tlen, _, _) when C >= 94 -> + yystate(64, Ics, Line, Col, Tlen+1, 34, Tlen); +yystate(72, Ics, Line, Col, Tlen, _, _) -> + {34,Tlen,Ics,Line,Col,72}; +yystate(71, [95|Ics], Line, Col, Tlen, _, _) -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(71, [83|Ics], Line, Col, Tlen, _, _) -> + yystate(75, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(71, [46|Ics], Line, Col, Tlen, _, _) -> + yystate(36, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(71, [45|Ics], Line, Col, Tlen, _, _) -> + yystate(28, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(71, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> + yystate(40, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(71, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 82 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(71, [C|Ics], Line, Col, Tlen, _, _) when C >= 84, C =< 90 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(71, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 122 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(71, Ics, Line, Col, Tlen, _, _) -> + {33,Tlen,Ics,Line,Col,71}; +yystate(70, Ics, Line, Col, Tlen, _, _) -> + {13,Tlen,Ics,Line,Col}; +yystate(69, [95|Ics], Line, Col, Tlen, _, _) -> + yystate(44, Ics, Line, Col, Tlen+1, 8, Tlen); +yystate(69, [46|Ics], Line, Col, Tlen, _, _) -> + yystate(36, Ics, Line, Col, Tlen+1, 8, Tlen); +yystate(69, [45|Ics], Line, Col, Tlen, _, _) -> + yystate(28, Ics, Line, Col, Tlen+1, 8, Tlen); +yystate(69, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> + yystate(40, Ics, Line, Col, Tlen+1, 8, Tlen); +yystate(69, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 90 -> + yystate(44, Ics, Line, Col, Tlen+1, 8, Tlen); +yystate(69, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 122 -> + yystate(44, Ics, Line, Col, Tlen+1, 8, Tlen); +yystate(69, Ics, Line, Col, Tlen, _, _) -> + {8,Tlen,Ics,Line,Col,69}; +yystate(68, [93|Ics], Line, Col, Tlen, _, _) -> + yystate(64, Ics, Line, Col, Tlen+1, 32, Tlen); +yystate(68, Ics, Line, Col, Tlen, _, _) -> + {32,Tlen,Ics,Line,Col,68}; +yystate(67, [95|Ics], Line, Col, Tlen, _, _) -> + yystate(44, Ics, Line, Col, Tlen+1, 10, Tlen); +yystate(67, [46|Ics], Line, Col, Tlen, _, _) -> + yystate(36, Ics, Line, Col, Tlen+1, 10, Tlen); +yystate(67, [45|Ics], Line, Col, Tlen, _, _) -> + yystate(28, Ics, Line, Col, Tlen+1, 10, Tlen); +yystate(67, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> + yystate(40, Ics, Line, Col, Tlen+1, 10, Tlen); +yystate(67, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 90 -> + yystate(44, Ics, Line, Col, Tlen+1, 10, Tlen); +yystate(67, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 122 -> + yystate(44, Ics, Line, Col, Tlen+1, 10, Tlen); +yystate(67, Ics, Line, Col, Tlen, _, _) -> + {10,Tlen,Ics,Line,Col,67}; +yystate(66, [61|Ics], Line, Col, Tlen, _, _) -> + yystate(70, Ics, Line, Col, Tlen+1, 34, Tlen); +yystate(66, Ics, Line, Col, Tlen, _, _) -> + {34,Tlen,Ics,Line,Col,66}; +yystate(65, [95|Ics], Line, Col, Tlen, _, _) -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(65, [78|Ics], Line, Col, Tlen, _, _) -> + yystate(61, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(65, [46|Ics], Line, Col, Tlen, _, _) -> + yystate(36, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(65, [45|Ics], Line, Col, Tlen, _, _) -> + yystate(28, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(65, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> + yystate(40, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(65, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 77 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(65, [C|Ics], Line, Col, Tlen, _, _) when C >= 79, C =< 90 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(65, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 122 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(65, Ics, Line, Col, Tlen, _, _) -> + {33,Tlen,Ics,Line,Col,65}; +yystate(64, [93|Ics], Line, Col, Tlen, Action, Alen) -> + yystate(68, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(64, [92|Ics], Line, Col, Tlen, Action, Alen) -> + yystate(64, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(64, [91|Ics], Line, Col, Tlen, Action, Alen) -> + yystate(60, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(64, [10|Ics], Line, _, Tlen, Action, Alen) -> + yystate(64, Ics, Line+1, 1, Tlen+1, Action, Alen); +yystate(64, [C|Ics], Line, Col, Tlen, Action, Alen) when C >= 0, C =< 9 -> + yystate(64, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(64, [C|Ics], Line, Col, Tlen, Action, Alen) when C >= 11, C =< 90 -> + yystate(64, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(64, [C|Ics], Line, Col, Tlen, Action, Alen) when C >= 94 -> + yystate(64, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(64, Ics, Line, Col, Tlen, Action, Alen) -> + {Action,Alen,Tlen,Ics,Line,Col,64}; +yystate(63, [95|Ics], Line, Col, Tlen, _, _) -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(63, [69|Ics], Line, Col, Tlen, _, _) -> + yystate(67, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(63, [46|Ics], Line, Col, Tlen, _, _) -> + yystate(36, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(63, [45|Ics], Line, Col, Tlen, _, _) -> + yystate(28, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(63, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> + yystate(40, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(63, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 68 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(63, [C|Ics], Line, Col, Tlen, _, _) when C >= 70, C =< 90 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(63, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 122 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(63, Ics, Line, Col, Tlen, _, _) -> + {33,Tlen,Ics,Line,Col,63}; +yystate(62, [34|Ics], Line, Col, Tlen, Action, Alen) -> + yystate(58, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(62, [10|Ics], Line, _, Tlen, Action, Alen) -> + yystate(62, Ics, Line+1, 1, Tlen+1, Action, Alen); +yystate(62, [C|Ics], Line, Col, Tlen, Action, Alen) when C >= 0, C =< 9 -> + yystate(62, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(62, [C|Ics], Line, Col, Tlen, Action, Alen) when C >= 11, C =< 33 -> + yystate(62, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(62, [C|Ics], Line, Col, Tlen, Action, Alen) when C >= 35 -> + yystate(62, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(62, Ics, Line, Col, Tlen, Action, Alen) -> + {Action,Alen,Tlen,Ics,Line,Col,62}; +yystate(61, [95|Ics], Line, Col, Tlen, _, _) -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(61, [68|Ics], Line, Col, Tlen, _, _) -> + yystate(57, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(61, [46|Ics], Line, Col, Tlen, _, _) -> + yystate(36, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(61, [45|Ics], Line, Col, Tlen, _, _) -> + yystate(28, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(61, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> + yystate(40, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(61, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 67 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(61, [C|Ics], Line, Col, Tlen, _, _) when C >= 69, C =< 90 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(61, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 122 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(61, Ics, Line, Col, Tlen, _, _) -> + {33,Tlen,Ics,Line,Col,61}; +yystate(60, [91|Ics], Line, Col, Tlen, Action, Alen) -> + yystate(64, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(60, Ics, Line, Col, Tlen, Action, Alen) -> + {Action,Alen,Tlen,Ics,Line,Col,60}; +yystate(59, [95|Ics], Line, Col, Tlen, _, _) -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(59, [83|Ics], Line, Col, Tlen, _, _) -> + yystate(63, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(59, [46|Ics], Line, Col, Tlen, _, _) -> + yystate(36, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(59, [45|Ics], Line, Col, Tlen, _, _) -> + yystate(28, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(59, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> + yystate(40, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(59, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 82 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(59, [C|Ics], Line, Col, Tlen, _, _) when C >= 84, C =< 90 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(59, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 122 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(59, Ics, Line, Col, Tlen, _, _) -> + {33,Tlen,Ics,Line,Col,59}; +yystate(58, [34|Ics], Line, Col, Tlen, _, _) -> + yystate(62, Ics, Line, Col, Tlen+1, 29, Tlen); +yystate(58, Ics, Line, Col, Tlen, _, _) -> + {29,Tlen,Ics,Line,Col,58}; +yystate(57, [95|Ics], Line, Col, Tlen, _, _) -> + yystate(44, Ics, Line, Col, Tlen+1, 1, Tlen); +yystate(57, [46|Ics], Line, Col, Tlen, _, _) -> + yystate(36, Ics, Line, Col, Tlen+1, 1, Tlen); +yystate(57, [45|Ics], Line, Col, Tlen, _, _) -> + yystate(28, Ics, Line, Col, Tlen+1, 1, Tlen); +yystate(57, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> + yystate(40, Ics, Line, Col, Tlen+1, 1, Tlen); +yystate(57, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 90 -> + yystate(44, Ics, Line, Col, Tlen+1, 1, Tlen); +yystate(57, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 122 -> + yystate(44, Ics, Line, Col, Tlen+1, 1, Tlen); +yystate(57, Ics, Line, Col, Tlen, _, _) -> + {1,Tlen,Ics,Line,Col,57}; +yystate(56, [95|Ics], Line, Col, Tlen, _, _) -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(56, [84|Ics], Line, Col, Tlen, _, _) -> + yystate(52, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(56, [46|Ics], Line, Col, Tlen, _, _) -> + yystate(36, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(56, [45|Ics], Line, Col, Tlen, _, _) -> + yystate(28, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(56, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> + yystate(40, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(56, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 83 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(56, [C|Ics], Line, Col, Tlen, _, _) when C >= 85, C =< 90 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(56, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 122 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(56, Ics, Line, Col, Tlen, _, _) -> + {33,Tlen,Ics,Line,Col,56}; +yystate(55, [95|Ics], Line, Col, Tlen, _, _) -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(55, [76|Ics], Line, Col, Tlen, _, _) -> + yystate(59, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(55, [46|Ics], Line, Col, Tlen, _, _) -> + yystate(36, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(55, [45|Ics], Line, Col, Tlen, _, _) -> + yystate(28, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(55, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> + yystate(40, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(55, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 75 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(55, [C|Ics], Line, Col, Tlen, _, _) when C >= 77, C =< 90 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(55, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 122 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(55, Ics, Line, Col, Tlen, _, _) -> + {33,Tlen,Ics,Line,Col,55}; +yystate(54, [34|Ics], Line, Col, Tlen, _, _) -> + yystate(58, Ics, Line, Col, Tlen+1, 34, Tlen); +yystate(54, [10|Ics], Line, _, Tlen, _, _) -> + yystate(62, Ics, Line+1, 1, Tlen+1, 34, Tlen); +yystate(54, [C|Ics], Line, Col, Tlen, _, _) when C >= 0, C =< 9 -> + yystate(62, Ics, Line, Col, Tlen+1, 34, Tlen); +yystate(54, [C|Ics], Line, Col, Tlen, _, _) when C >= 11, C =< 33 -> + yystate(62, Ics, Line, Col, Tlen+1, 34, Tlen); +yystate(54, [C|Ics], Line, Col, Tlen, _, _) when C >= 35 -> + yystate(62, Ics, Line, Col, Tlen+1, 34, Tlen); +yystate(54, Ics, Line, Col, Tlen, _, _) -> + {34,Tlen,Ics,Line,Col,54}; +yystate(53, [61|Ics], Line, Col, Tlen, _, _) -> + yystate(49, Ics, Line, Col, Tlen+1, 17, Tlen); +yystate(53, Ics, Line, Col, Tlen, _, _) -> + {17,Tlen,Ics,Line,Col,53}; +yystate(52, [95|Ics], Line, Col, Tlen, _, _) -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(52, [67|Ics], Line, Col, Tlen, _, _) -> + yystate(48, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(52, [65|Ics], Line, Col, Tlen, _, _) -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(52, [66|Ics], Line, Col, Tlen, _, _) -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(52, [46|Ics], Line, Col, Tlen, _, _) -> + yystate(36, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(52, [45|Ics], Line, Col, Tlen, _, _) -> + yystate(28, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(52, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> + yystate(40, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(52, [C|Ics], Line, Col, Tlen, _, _) when C >= 68, C =< 90 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(52, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 122 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(52, Ics, Line, Col, Tlen, _, _) -> + {33,Tlen,Ics,Line,Col,52}; +yystate(51, [95|Ics], Line, Col, Tlen, _, _) -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(51, [65|Ics], Line, Col, Tlen, _, _) -> + yystate(55, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(51, [46|Ics], Line, Col, Tlen, _, _) -> + yystate(36, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(51, [45|Ics], Line, Col, Tlen, _, _) -> + yystate(28, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(51, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> + yystate(40, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(51, [C|Ics], Line, Col, Tlen, _, _) when C >= 66, C =< 90 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(51, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 122 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(51, Ics, Line, Col, Tlen, _, _) -> + {33,Tlen,Ics,Line,Col,51}; +yystate(50, Ics, Line, Col, Tlen, _, _) -> + {23,Tlen,Ics,Line,Col}; +yystate(49, Ics, Line, Col, Tlen, _, _) -> + {15,Tlen,Ics,Line,Col}; +yystate(48, [95|Ics], Line, Col, Tlen, _, _) -> + yystate(44, Ics, Line, Col, Tlen+1, 11, Tlen); +yystate(48, [46|Ics], Line, Col, Tlen, _, _) -> + yystate(36, Ics, Line, Col, Tlen+1, 11, Tlen); +yystate(48, [45|Ics], Line, Col, Tlen, _, _) -> + yystate(28, Ics, Line, Col, Tlen+1, 11, Tlen); +yystate(48, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> + yystate(40, Ics, Line, Col, Tlen+1, 11, Tlen); +yystate(48, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 90 -> + yystate(44, Ics, Line, Col, Tlen+1, 11, Tlen); +yystate(48, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 122 -> + yystate(44, Ics, Line, Col, Tlen+1, 11, Tlen); +yystate(48, Ics, Line, Col, Tlen, _, _) -> + {11,Tlen,Ics,Line,Col,48}; +yystate(47, [95|Ics], Line, Col, Tlen, _, _) -> + yystate(44, Ics, Line, Col, Tlen+1, 5, Tlen); +yystate(47, [46|Ics], Line, Col, Tlen, _, _) -> + yystate(36, Ics, Line, Col, Tlen+1, 5, Tlen); +yystate(47, [45|Ics], Line, Col, Tlen, _, _) -> + yystate(28, Ics, Line, Col, Tlen+1, 5, Tlen); +yystate(47, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> + yystate(40, Ics, Line, Col, Tlen+1, 5, Tlen); +yystate(47, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 90 -> + yystate(44, Ics, Line, Col, Tlen+1, 5, Tlen); +yystate(47, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 122 -> + yystate(44, Ics, Line, Col, Tlen+1, 5, Tlen); +yystate(47, Ics, Line, Col, Tlen, _, _) -> + {5,Tlen,Ics,Line,Col,47}; +yystate(46, [39|Ics], Line, Col, Tlen, Action, Alen) -> + yystate(42, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(46, [10|Ics], Line, _, Tlen, Action, Alen) -> + yystate(46, Ics, Line+1, 1, Tlen+1, Action, Alen); +yystate(46, [C|Ics], Line, Col, Tlen, Action, Alen) when C >= 0, C =< 9 -> + yystate(46, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(46, [C|Ics], Line, Col, Tlen, Action, Alen) when C >= 11, C =< 38 -> + yystate(46, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(46, [C|Ics], Line, Col, Tlen, Action, Alen) when C >= 40 -> + yystate(46, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(46, Ics, Line, Col, Tlen, Action, Alen) -> + {Action,Alen,Tlen,Ics,Line,Col,46}; +yystate(45, Ics, Line, Col, Tlen, _, _) -> + {14,Tlen,Ics,Line,Col}; +yystate(44, [95|Ics], Line, Col, Tlen, _, _) -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(44, [46|Ics], Line, Col, Tlen, _, _) -> + yystate(36, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(44, [45|Ics], Line, Col, Tlen, _, _) -> + yystate(28, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(44, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> + yystate(40, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(44, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 90 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(44, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 122 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(44, Ics, Line, Col, Tlen, _, _) -> + {33,Tlen,Ics,Line,Col,44}; +yystate(43, [95|Ics], Line, Col, Tlen, _, _) -> + yystate(44, Ics, Line, Col, Tlen+1, 6, Tlen); +yystate(43, [46|Ics], Line, Col, Tlen, _, _) -> + yystate(36, Ics, Line, Col, Tlen+1, 6, Tlen); +yystate(43, [45|Ics], Line, Col, Tlen, _, _) -> + yystate(28, Ics, Line, Col, Tlen+1, 6, Tlen); +yystate(43, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> + yystate(40, Ics, Line, Col, Tlen+1, 6, Tlen); +yystate(43, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 90 -> + yystate(44, Ics, Line, Col, Tlen+1, 6, Tlen); +yystate(43, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 122 -> + yystate(44, Ics, Line, Col, Tlen+1, 6, Tlen); +yystate(43, Ics, Line, Col, Tlen, _, _) -> + {6,Tlen,Ics,Line,Col,43}; +yystate(42, [39|Ics], Line, Col, Tlen, _, _) -> + yystate(46, Ics, Line, Col, Tlen+1, 29, Tlen); +yystate(42, Ics, Line, Col, Tlen, _, _) -> + {29,Tlen,Ics,Line,Col,42}; +yystate(41, [62|Ics], Line, Col, Tlen, _, _) -> + yystate(37, Ics, Line, Col, Tlen+1, 18, Tlen); +yystate(41, [61|Ics], Line, Col, Tlen, _, _) -> + yystate(33, Ics, Line, Col, Tlen+1, 18, Tlen); +yystate(41, Ics, Line, Col, Tlen, _, _) -> + {18,Tlen,Ics,Line,Col,41}; +yystate(40, [95|Ics], Line, Col, Tlen, _, _) -> + yystate(40, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(40, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> + yystate(40, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(40, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 90 -> + yystate(40, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(40, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 122 -> + yystate(40, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(40, Ics, Line, Col, Tlen, _, _) -> + {33,Tlen,Ics,Line,Col,40}; +yystate(39, [95|Ics], Line, Col, Tlen, _, _) -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(39, [83|Ics], Line, Col, Tlen, _, _) -> + yystate(43, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(39, [78|Ics], Line, Col, Tlen, _, _) -> + yystate(47, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(39, [46|Ics], Line, Col, Tlen, _, _) -> + yystate(36, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(39, [45|Ics], Line, Col, Tlen, _, _) -> + yystate(28, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(39, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> + yystate(40, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(39, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 77 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(39, [C|Ics], Line, Col, Tlen, _, _) when C >= 79, C =< 82 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(39, [C|Ics], Line, Col, Tlen, _, _) when C >= 84, C =< 90 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(39, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 122 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(39, Ics, Line, Col, Tlen, _, _) -> + {33,Tlen,Ics,Line,Col,39}; +yystate(38, [39|Ics], Line, Col, Tlen, _, _) -> + yystate(42, Ics, Line, Col, Tlen+1, 34, Tlen); +yystate(38, [10|Ics], Line, _, Tlen, _, _) -> + yystate(46, Ics, Line+1, 1, Tlen+1, 34, Tlen); +yystate(38, [C|Ics], Line, Col, Tlen, _, _) when C >= 0, C =< 9 -> + yystate(46, Ics, Line, Col, Tlen+1, 34, Tlen); +yystate(38, [C|Ics], Line, Col, Tlen, _, _) when C >= 11, C =< 38 -> + yystate(46, Ics, Line, Col, Tlen+1, 34, Tlen); +yystate(38, [C|Ics], Line, Col, Tlen, _, _) when C >= 40 -> + yystate(46, Ics, Line, Col, Tlen+1, 34, Tlen); +yystate(38, Ics, Line, Col, Tlen, _, _) -> + {34,Tlen,Ics,Line,Col,38}; +yystate(37, Ics, Line, Col, Tlen, _, _) -> + {12,Tlen,Ics,Line,Col}; +yystate(36, [C|Ics], Line, Col, Tlen, Action, Alen) when C >= 65, C =< 90 -> + yystate(32, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(36, [C|Ics], Line, Col, Tlen, Action, Alen) when C >= 97, C =< 122 -> + yystate(32, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(36, Ics, Line, Col, Tlen, Action, Alen) -> + {Action,Alen,Tlen,Ics,Line,Col,36}; +yystate(35, [95|Ics], Line, Col, Tlen, _, _) -> + yystate(44, Ics, Line, Col, Tlen+1, 4, Tlen); +yystate(35, [46|Ics], Line, Col, Tlen, _, _) -> + yystate(36, Ics, Line, Col, Tlen+1, 4, Tlen); +yystate(35, [45|Ics], Line, Col, Tlen, _, _) -> + yystate(28, Ics, Line, Col, Tlen+1, 4, Tlen); +yystate(35, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> + yystate(40, Ics, Line, Col, Tlen+1, 4, Tlen); +yystate(35, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 90 -> + yystate(44, Ics, Line, Col, Tlen+1, 4, Tlen); +yystate(35, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 122 -> + yystate(44, Ics, Line, Col, Tlen+1, 4, Tlen); +yystate(35, Ics, Line, Col, Tlen, _, _) -> + {4,Tlen,Ics,Line,Col,35}; +yystate(34, Ics, Line, Col, Tlen, _, _) -> + {24,Tlen,Ics,Line,Col}; +yystate(33, Ics, Line, Col, Tlen, _, _) -> + {16,Tlen,Ics,Line,Col}; +yystate(32, [95|Ics], Line, Col, Tlen, _, _) -> + yystate(32, Ics, Line, Col, Tlen+1, 31, Tlen); +yystate(32, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> + yystate(32, Ics, Line, Col, Tlen+1, 31, Tlen); +yystate(32, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 90 -> + yystate(32, Ics, Line, Col, Tlen+1, 31, Tlen); +yystate(32, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 122 -> + yystate(32, Ics, Line, Col, Tlen+1, 31, Tlen); +yystate(32, Ics, Line, Col, Tlen, _, _) -> + {31,Tlen,Ics,Line,Col,32}; +yystate(31, [95|Ics], Line, Col, Tlen, _, _) -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(31, [69|Ics], Line, Col, Tlen, _, _) -> + yystate(35, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(31, [46|Ics], Line, Col, Tlen, _, _) -> + yystate(36, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(31, [45|Ics], Line, Col, Tlen, _, _) -> + yystate(28, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(31, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> + yystate(40, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(31, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 68 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(31, [C|Ics], Line, Col, Tlen, _, _) when C >= 70, C =< 90 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(31, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 122 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(31, Ics, Line, Col, Tlen, _, _) -> + {33,Tlen,Ics,Line,Col,31}; +yystate(30, Ics, Line, Col, Tlen, _, _) -> + {25,Tlen,Ics,Line,Col}; +yystate(29, [46|Ics], Line, Col, Tlen, _, _) -> + yystate(25, Ics, Line, Col, Tlen+1, 27, Tlen); +yystate(29, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> + yystate(29, Ics, Line, Col, Tlen+1, 27, Tlen); +yystate(29, Ics, Line, Col, Tlen, _, _) -> + {27,Tlen,Ics,Line,Col,29}; +yystate(28, [95|Ics], Line, Col, Tlen, Action, Alen) -> + yystate(28, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(28, [46|Ics], Line, Col, Tlen, Action, Alen) -> + yystate(36, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(28, [45|Ics], Line, Col, Tlen, Action, Alen) -> + yystate(28, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(28, [C|Ics], Line, Col, Tlen, Action, Alen) when C >= 65, C =< 90 -> + yystate(28, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(28, [C|Ics], Line, Col, Tlen, Action, Alen) when C >= 97, C =< 122 -> + yystate(28, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(28, Ics, Line, Col, Tlen, Action, Alen) -> + {Action,Alen,Tlen,Ics,Line,Col,28}; +yystate(27, [95|Ics], Line, Col, Tlen, _, _) -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(27, [75|Ics], Line, Col, Tlen, _, _) -> + yystate(31, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(27, [46|Ics], Line, Col, Tlen, _, _) -> + yystate(36, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(27, [45|Ics], Line, Col, Tlen, _, _) -> + yystate(28, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(27, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> + yystate(40, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(27, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 74 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(27, [C|Ics], Line, Col, Tlen, _, _) when C >= 76, C =< 90 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(27, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 122 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(27, Ics, Line, Col, Tlen, _, _) -> + {33,Tlen,Ics,Line,Col,27}; +yystate(26, Ics, Line, Col, Tlen, _, _) -> + {21,Tlen,Ics,Line,Col}; +yystate(25, [C|Ics], Line, Col, Tlen, Action, Alen) when C >= 48, C =< 57 -> + yystate(21, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(25, Ics, Line, Col, Tlen, Action, Alen) -> + {Action,Alen,Tlen,Ics,Line,Col,25}; +yystate(24, [95|Ics], Line, Col, Tlen, _, _) -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(24, [82|Ics], Line, Col, Tlen, _, _) -> + yystate(20, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(24, [46|Ics], Line, Col, Tlen, _, _) -> + yystate(36, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(24, [45|Ics], Line, Col, Tlen, _, _) -> + yystate(28, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(24, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> + yystate(40, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(24, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 81 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(24, [C|Ics], Line, Col, Tlen, _, _) when C >= 83, C =< 90 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(24, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 122 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(24, Ics, Line, Col, Tlen, _, _) -> + {33,Tlen,Ics,Line,Col,24}; +yystate(23, [95|Ics], Line, Col, Tlen, _, _) -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(23, [73|Ics], Line, Col, Tlen, _, _) -> + yystate(27, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(23, [46|Ics], Line, Col, Tlen, _, _) -> + yystate(36, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(23, [45|Ics], Line, Col, Tlen, _, _) -> + yystate(28, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(23, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> + yystate(40, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(23, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 72 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(23, [C|Ics], Line, Col, Tlen, _, _) when C >= 74, C =< 90 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(23, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 122 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(23, Ics, Line, Col, Tlen, _, _) -> + {33,Tlen,Ics,Line,Col,23}; +yystate(22, Ics, Line, Col, Tlen, _, _) -> + {19,Tlen,Ics,Line,Col}; +yystate(21, [69|Ics], Line, Col, Tlen, _, _) -> + yystate(17, Ics, Line, Col, Tlen+1, 28, Tlen); +yystate(21, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> + yystate(21, Ics, Line, Col, Tlen+1, 28, Tlen); +yystate(21, Ics, Line, Col, Tlen, _, _) -> + {28,Tlen,Ics,Line,Col,21}; +yystate(20, [95|Ics], Line, Col, Tlen, _, _) -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(20, [85|Ics], Line, Col, Tlen, _, _) -> + yystate(16, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(20, [46|Ics], Line, Col, Tlen, _, _) -> + yystate(36, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(20, [45|Ics], Line, Col, Tlen, _, _) -> + yystate(28, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(20, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> + yystate(40, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(20, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 84 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(20, [C|Ics], Line, Col, Tlen, _, _) when C >= 86, C =< 90 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(20, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 122 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(20, Ics, Line, Col, Tlen, _, _) -> + {33,Tlen,Ics,Line,Col,20}; +yystate(19, [95|Ics], Line, Col, Tlen, _, _) -> + yystate(44, Ics, Line, Col, Tlen+1, 3, Tlen); +yystate(19, [46|Ics], Line, Col, Tlen, _, _) -> + yystate(36, Ics, Line, Col, Tlen+1, 3, Tlen); +yystate(19, [45|Ics], Line, Col, Tlen, _, _) -> + yystate(28, Ics, Line, Col, Tlen+1, 3, Tlen); +yystate(19, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> + yystate(40, Ics, Line, Col, Tlen+1, 3, Tlen); +yystate(19, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 90 -> + yystate(44, Ics, Line, Col, Tlen+1, 3, Tlen); +yystate(19, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 122 -> + yystate(44, Ics, Line, Col, Tlen+1, 3, Tlen); +yystate(19, Ics, Line, Col, Tlen, _, _) -> + {3,Tlen,Ics,Line,Col,19}; +yystate(18, Ics, Line, Col, Tlen, _, _) -> + {26,Tlen,Ics,Line,Col}; +yystate(17, [45|Ics], Line, Col, Tlen, Action, Alen) -> + yystate(9, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(17, [43|Ics], Line, Col, Tlen, Action, Alen) -> + yystate(9, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(17, [C|Ics], Line, Col, Tlen, Action, Alen) when C >= 48, C =< 57 -> + yystate(13, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(17, Ics, Line, Col, Tlen, Action, Alen) -> + {Action,Alen,Tlen,Ics,Line,Col,17}; +yystate(16, [95|Ics], Line, Col, Tlen, _, _) -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(16, [69|Ics], Line, Col, Tlen, _, _) -> + yystate(12, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(16, [46|Ics], Line, Col, Tlen, _, _) -> + yystate(36, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(16, [45|Ics], Line, Col, Tlen, _, _) -> + yystate(28, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(16, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> + yystate(40, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(16, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 68 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(16, [C|Ics], Line, Col, Tlen, _, _) when C >= 70, C =< 90 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(16, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 122 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(16, Ics, Line, Col, Tlen, _, _) -> + {33,Tlen,Ics,Line,Col,16}; +yystate(15, [95|Ics], Line, Col, Tlen, _, _) -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(15, [84|Ics], Line, Col, Tlen, _, _) -> + yystate(19, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(15, [46|Ics], Line, Col, Tlen, _, _) -> + yystate(36, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(15, [45|Ics], Line, Col, Tlen, _, _) -> + yystate(28, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(15, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> + yystate(40, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(15, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 83 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(15, [C|Ics], Line, Col, Tlen, _, _) when C >= 85, C =< 90 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(15, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 122 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(15, Ics, Line, Col, Tlen, _, _) -> + {33,Tlen,Ics,Line,Col,15}; +yystate(14, Ics, Line, Col, Tlen, _, _) -> + {20,Tlen,Ics,Line,Col}; +yystate(13, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> + yystate(13, Ics, Line, Col, Tlen+1, 28, Tlen); +yystate(13, Ics, Line, Col, Tlen, _, _) -> + {28,Tlen,Ics,Line,Col,13}; +yystate(12, [95|Ics], Line, Col, Tlen, _, _) -> + yystate(44, Ics, Line, Col, Tlen+1, 9, Tlen); +yystate(12, [46|Ics], Line, Col, Tlen, _, _) -> + yystate(36, Ics, Line, Col, Tlen+1, 9, Tlen); +yystate(12, [45|Ics], Line, Col, Tlen, _, _) -> + yystate(28, Ics, Line, Col, Tlen+1, 9, Tlen); +yystate(12, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> + yystate(40, Ics, Line, Col, Tlen+1, 9, Tlen); +yystate(12, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 90 -> + yystate(44, Ics, Line, Col, Tlen+1, 9, Tlen); +yystate(12, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 122 -> + yystate(44, Ics, Line, Col, Tlen+1, 9, Tlen); +yystate(12, Ics, Line, Col, Tlen, _, _) -> + {9,Tlen,Ics,Line,Col,12}; +yystate(11, [95|Ics], Line, Col, Tlen, _, _) -> + yystate(44, Ics, Line, Col, Tlen+1, 7, Tlen); +yystate(11, [46|Ics], Line, Col, Tlen, _, _) -> + yystate(36, Ics, Line, Col, Tlen+1, 7, Tlen); +yystate(11, [45|Ics], Line, Col, Tlen, _, _) -> + yystate(28, Ics, Line, Col, Tlen+1, 7, Tlen); +yystate(11, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> + yystate(40, Ics, Line, Col, Tlen+1, 7, Tlen); +yystate(11, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 90 -> + yystate(44, Ics, Line, Col, Tlen+1, 7, Tlen); +yystate(11, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 122 -> + yystate(44, Ics, Line, Col, Tlen+1, 7, Tlen); +yystate(11, Ics, Line, Col, Tlen, _, _) -> + {7,Tlen,Ics,Line,Col,11}; +yystate(10, Ics, Line, Col, Tlen, _, _) -> + {22,Tlen,Ics,Line,Col}; +yystate(9, [C|Ics], Line, Col, Tlen, Action, Alen) when C >= 48, C =< 57 -> + yystate(13, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(9, Ics, Line, Col, Tlen, Action, Alen) -> + {Action,Alen,Tlen,Ics,Line,Col,9}; +yystate(8, [95|Ics], Line, Col, Tlen, _, _) -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(8, [82|Ics], Line, Col, Tlen, _, _) -> + yystate(4, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(8, [46|Ics], Line, Col, Tlen, _, _) -> + yystate(36, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(8, [45|Ics], Line, Col, Tlen, _, _) -> + yystate(28, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(8, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> + yystate(40, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(8, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 81 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(8, [C|Ics], Line, Col, Tlen, _, _) when C >= 83, C =< 90 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(8, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 122 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(8, Ics, Line, Col, Tlen, _, _) -> + {33,Tlen,Ics,Line,Col,8}; +yystate(7, [95|Ics], Line, Col, Tlen, _, _) -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(7, [76|Ics], Line, Col, Tlen, _, _) -> + yystate(11, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(7, [46|Ics], Line, Col, Tlen, _, _) -> + yystate(36, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(7, [45|Ics], Line, Col, Tlen, _, _) -> + yystate(28, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(7, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> + yystate(40, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(7, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 75 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(7, [C|Ics], Line, Col, Tlen, _, _) when C >= 77, C =< 90 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(7, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 122 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(7, Ics, Line, Col, Tlen, _, _) -> + {33,Tlen,Ics,Line,Col,7}; +yystate(6, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> + yystate(2, Ics, Line, Col, Tlen+1, 30, Tlen); +yystate(6, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 70 -> + yystate(2, Ics, Line, Col, Tlen+1, 30, Tlen); +yystate(6, Ics, Line, Col, Tlen, _, _) -> + {30,Tlen,Ics,Line,Col,6}; +yystate(5, [120|Ics], Line, Col, Tlen, _, _) -> + yystate(1, Ics, Line, Col, Tlen+1, 27, Tlen); +yystate(5, [46|Ics], Line, Col, Tlen, _, _) -> + yystate(25, Ics, Line, Col, Tlen+1, 27, Tlen); +yystate(5, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> + yystate(29, Ics, Line, Col, Tlen+1, 27, Tlen); +yystate(5, Ics, Line, Col, Tlen, _, _) -> + {27,Tlen,Ics,Line,Col,5}; +yystate(4, [95|Ics], Line, Col, Tlen, _, _) -> + yystate(44, Ics, Line, Col, Tlen+1, 2, Tlen); +yystate(4, [46|Ics], Line, Col, Tlen, _, _) -> + yystate(36, Ics, Line, Col, Tlen+1, 2, Tlen); +yystate(4, [45|Ics], Line, Col, Tlen, _, _) -> + yystate(28, Ics, Line, Col, Tlen+1, 2, Tlen); +yystate(4, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> + yystate(40, Ics, Line, Col, Tlen+1, 2, Tlen); +yystate(4, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 90 -> + yystate(44, Ics, Line, Col, Tlen+1, 2, Tlen); +yystate(4, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 122 -> + yystate(44, Ics, Line, Col, Tlen+1, 2, Tlen); +yystate(4, Ics, Line, Col, Tlen, _, _) -> + {2,Tlen,Ics,Line,Col,4}; +yystate(3, [95|Ics], Line, Col, Tlen, _, _) -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(3, [76|Ics], Line, Col, Tlen, _, _) -> + yystate(7, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(3, [46|Ics], Line, Col, Tlen, _, _) -> + yystate(36, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(3, [45|Ics], Line, Col, Tlen, _, _) -> + yystate(28, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(3, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> + yystate(40, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(3, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 75 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(3, [C|Ics], Line, Col, Tlen, _, _) when C >= 77, C =< 90 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(3, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 122 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(3, Ics, Line, Col, Tlen, _, _) -> + {33,Tlen,Ics,Line,Col,3}; +yystate(2, [C|Ics], Line, Col, Tlen, Action, Alen) when C >= 48, C =< 57 -> + yystate(6, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(2, [C|Ics], Line, Col, Tlen, Action, Alen) when C >= 65, C =< 70 -> + yystate(6, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(2, Ics, Line, Col, Tlen, Action, Alen) -> + {Action,Alen,Tlen,Ics,Line,Col,2}; +yystate(1, [C|Ics], Line, Col, Tlen, Action, Alen) when C >= 48, C =< 57 -> + yystate(2, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(1, [C|Ics], Line, Col, Tlen, Action, Alen) when C >= 65, C =< 70 -> + yystate(2, Ics, Line, Col, Tlen+1, Action, Alen); +yystate(1, Ics, Line, Col, Tlen, Action, Alen) -> + {Action,Alen,Tlen,Ics,Line,Col,1}; +yystate(0, [95|Ics], Line, Col, Tlen, _, _) -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(0, [85|Ics], Line, Col, Tlen, _, _) -> + yystate(3, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(0, [79|Ics], Line, Col, Tlen, _, _) -> + yystate(15, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(0, [46|Ics], Line, Col, Tlen, _, _) -> + yystate(36, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(0, [45|Ics], Line, Col, Tlen, _, _) -> + yystate(28, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(0, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> + yystate(40, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(0, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 78 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(0, [C|Ics], Line, Col, Tlen, _, _) when C >= 80, C =< 84 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(0, [C|Ics], Line, Col, Tlen, _, _) when C >= 86, C =< 90 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(0, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 122 -> + yystate(44, Ics, Line, Col, Tlen+1, 33, Tlen); +yystate(0, Ics, Line, Col, Tlen, _, _) -> + {33,Tlen,Ics,Line,Col,0}; +yystate(S, Ics, Line, Col, Tlen, Action, Alen) -> + {Action,Alen,Tlen,Ics,Line,Col,S}. + +%% yyaction(Action, TokenLength, TokenChars, TokenLine, TokenCol) -> +%% {token,Token} | {end_token, Token} | skip_token | {error,String}. +%% Generated action function. + +yyaction(0, _, _, _, _) -> + yyaction_0(); +yyaction(1, _, _, TokenLine, _) -> + yyaction_1(TokenLine); +yyaction(2, _, _, TokenLine, _) -> + yyaction_2(TokenLine); +yyaction(3, _, _, TokenLine, _) -> + yyaction_3(TokenLine); +yyaction(4, _, _, TokenLine, _) -> + yyaction_4(TokenLine); +yyaction(5, _, _, TokenLine, _) -> + yyaction_5(TokenLine); +yyaction(6, _, _, TokenLine, _) -> + yyaction_6(TokenLine); +yyaction(7, _, _, TokenLine, _) -> + yyaction_7(TokenLine); +yyaction(8, _, _, TokenLine, _) -> + yyaction_8(TokenLine); +yyaction(9, _, _, TokenLine, _) -> + yyaction_9(TokenLine); +yyaction(10, _, _, TokenLine, _) -> + yyaction_10(TokenLine); +yyaction(11, _, _, TokenLine, _) -> + yyaction_11(TokenLine); +yyaction(12, _, _, TokenLine, _) -> + yyaction_12(TokenLine); +yyaction(13, _, _, TokenLine, _) -> + yyaction_13(TokenLine); +yyaction(14, _, _, TokenLine, _) -> + yyaction_14(TokenLine); +yyaction(15, _, _, TokenLine, _) -> + yyaction_15(TokenLine); +yyaction(16, _, _, TokenLine, _) -> + yyaction_16(TokenLine); +yyaction(17, _, _, TokenLine, _) -> + yyaction_17(TokenLine); +yyaction(18, _, _, TokenLine, _) -> + yyaction_18(TokenLine); +yyaction(19, _, _, TokenLine, _) -> + yyaction_19(TokenLine); +yyaction(20, _, _, TokenLine, _) -> + yyaction_20(TokenLine); +yyaction(21, _, _, TokenLine, _) -> + yyaction_21(TokenLine); +yyaction(22, _, _, TokenLine, _) -> + yyaction_22(TokenLine); +yyaction(23, _, _, TokenLine, _) -> + yyaction_23(TokenLine); +yyaction(24, _, _, TokenLine, _) -> + yyaction_24(TokenLine); +yyaction(25, _, _, TokenLine, _) -> + yyaction_25(TokenLine); +yyaction(26, _, _, TokenLine, _) -> + yyaction_26(TokenLine); +yyaction(27, TokenLen, YYtcs, TokenLine, _) -> + TokenChars = yypre(YYtcs, TokenLen), + yyaction_27(TokenChars, TokenLine); +yyaction(28, TokenLen, YYtcs, TokenLine, _) -> + TokenChars = yypre(YYtcs, TokenLen), + yyaction_28(TokenChars, TokenLine); +yyaction(29, TokenLen, YYtcs, TokenLine, _) -> + TokenChars = yypre(YYtcs, TokenLen), + yyaction_29(TokenChars, TokenLine); +yyaction(30, TokenLen, YYtcs, TokenLine, _) -> + TokenChars = yypre(YYtcs, TokenLen), + yyaction_30(TokenChars, TokenLine); +yyaction(31, TokenLen, YYtcs, TokenLine, _) -> + TokenChars = yypre(YYtcs, TokenLen), + yyaction_31(TokenChars, TokenLine); +yyaction(32, TokenLen, YYtcs, TokenLine, _) -> + TokenChars = yypre(YYtcs, TokenLen), + yyaction_32(TokenChars, TokenLine); +yyaction(33, TokenLen, YYtcs, TokenLine, _) -> + TokenChars = yypre(YYtcs, TokenLen), + yyaction_33(TokenChars, TokenLine); +yyaction(34, TokenLen, YYtcs, _, _) -> + TokenChars = yypre(YYtcs, TokenLen), + yyaction_34(TokenChars); +yyaction(_, _, _, _, _) -> error. + +-compile({inline,yyaction_0/0}). +-file("rabbit_amqp_sql_lexer.xrl", 19). +yyaction_0() -> + skip_token . + +-compile({inline,yyaction_1/1}). +-file("rabbit_amqp_sql_lexer.xrl", 22). +yyaction_1(TokenLine) -> + { token, { 'AND', TokenLine } } . + +-compile({inline,yyaction_2/1}). +-file("rabbit_amqp_sql_lexer.xrl", 23). +yyaction_2(TokenLine) -> + { token, { 'OR', TokenLine } } . + +-compile({inline,yyaction_3/1}). +-file("rabbit_amqp_sql_lexer.xrl", 24). +yyaction_3(TokenLine) -> + { token, { 'NOT', TokenLine } } . + +-compile({inline,yyaction_4/1}). +-file("rabbit_amqp_sql_lexer.xrl", 27). +yyaction_4(TokenLine) -> + { token, { 'LIKE', TokenLine } } . + +-compile({inline,yyaction_5/1}). +-file("rabbit_amqp_sql_lexer.xrl", 28). +yyaction_5(TokenLine) -> + { token, { 'IN', TokenLine } } . + +-compile({inline,yyaction_6/1}). +-file("rabbit_amqp_sql_lexer.xrl", 29). +yyaction_6(TokenLine) -> + { token, { 'IS', TokenLine } } . + +-compile({inline,yyaction_7/1}). +-file("rabbit_amqp_sql_lexer.xrl", 30). +yyaction_7(TokenLine) -> + { token, { 'NULL', TokenLine } } . + +-compile({inline,yyaction_8/1}). +-file("rabbit_amqp_sql_lexer.xrl", 31). +yyaction_8(TokenLine) -> + { token, { 'ESCAPE', TokenLine } } . + +-compile({inline,yyaction_9/1}). +-file("rabbit_amqp_sql_lexer.xrl", 34). +yyaction_9(TokenLine) -> + { token, { boolean, TokenLine, true } } . + +-compile({inline,yyaction_10/1}). +-file("rabbit_amqp_sql_lexer.xrl", 35). +yyaction_10(TokenLine) -> + { token, { boolean, TokenLine, false } } . + +-compile({inline,yyaction_11/1}). +-file("rabbit_amqp_sql_lexer.xrl", 38). +yyaction_11(TokenLine) -> + { token, { 'UTC', TokenLine } } . + +-compile({inline,yyaction_12/1}). +-file("rabbit_amqp_sql_lexer.xrl", 42). +yyaction_12(TokenLine) -> + { token, { '<>', TokenLine } } . + +-compile({inline,yyaction_13/1}). +-file("rabbit_amqp_sql_lexer.xrl", 43). +yyaction_13(TokenLine) -> + { token, { '<>', TokenLine } } . + +-compile({inline,yyaction_14/1}). +-file("rabbit_amqp_sql_lexer.xrl", 44). +yyaction_14(TokenLine) -> + { token, { '=', TokenLine } } . + +-compile({inline,yyaction_15/1}). +-file("rabbit_amqp_sql_lexer.xrl", 45). +yyaction_15(TokenLine) -> + { token, { '>=', TokenLine } } . + +-compile({inline,yyaction_16/1}). +-file("rabbit_amqp_sql_lexer.xrl", 46). +yyaction_16(TokenLine) -> + { token, { '<=', TokenLine } } . + +-compile({inline,yyaction_17/1}). +-file("rabbit_amqp_sql_lexer.xrl", 47). +yyaction_17(TokenLine) -> + { token, { '>', TokenLine } } . + +-compile({inline,yyaction_18/1}). +-file("rabbit_amqp_sql_lexer.xrl", 48). +yyaction_18(TokenLine) -> + { token, { '<', TokenLine } } . + +-compile({inline,yyaction_19/1}). +-file("rabbit_amqp_sql_lexer.xrl", 51). +yyaction_19(TokenLine) -> + { token, { '+', TokenLine } } . + +-compile({inline,yyaction_20/1}). +-file("rabbit_amqp_sql_lexer.xrl", 52). +yyaction_20(TokenLine) -> + { token, { '-', TokenLine } } . + +-compile({inline,yyaction_21/1}). +-file("rabbit_amqp_sql_lexer.xrl", 53). +yyaction_21(TokenLine) -> + { token, { '*', TokenLine } } . + +-compile({inline,yyaction_22/1}). +-file("rabbit_amqp_sql_lexer.xrl", 54). +yyaction_22(TokenLine) -> + { token, { '/', TokenLine } } . + +-compile({inline,yyaction_23/1}). +-file("rabbit_amqp_sql_lexer.xrl", 55). +yyaction_23(TokenLine) -> + { token, { '%', TokenLine } } . + +-compile({inline,yyaction_24/1}). +-file("rabbit_amqp_sql_lexer.xrl", 58). +yyaction_24(TokenLine) -> + { token, { '(', TokenLine } } . + +-compile({inline,yyaction_25/1}). +-file("rabbit_amqp_sql_lexer.xrl", 59). +yyaction_25(TokenLine) -> + { token, { ')', TokenLine } } . + +-compile({inline,yyaction_26/1}). +-file("rabbit_amqp_sql_lexer.xrl", 60). +yyaction_26(TokenLine) -> + { token, { ',', TokenLine } } . + +-compile({inline,yyaction_27/2}). +-file("rabbit_amqp_sql_lexer.xrl", 63). +yyaction_27(TokenChars, TokenLine) -> + { token, { integer, TokenLine, list_to_integer (TokenChars) } } . + +-compile({inline,yyaction_28/2}). +-file("rabbit_amqp_sql_lexer.xrl", 64). +yyaction_28(TokenChars, TokenLine) -> + { token, { float, TokenLine, list_to_float (TokenChars) } } . + +-compile({inline,yyaction_29/2}). +-file("rabbit_amqp_sql_lexer.xrl", 65). +yyaction_29(TokenChars, TokenLine) -> + { token, { string, TokenLine, process_string (TokenChars) } } . + +-compile({inline,yyaction_30/2}). +-file("rabbit_amqp_sql_lexer.xrl", 66). +yyaction_30(TokenChars, TokenLine) -> + { token, { binary, TokenLine, parse_binary (TokenChars) } } . + +-compile({inline,yyaction_31/2}). +-file("rabbit_amqp_sql_lexer.xrl", 67). +yyaction_31(TokenChars, TokenLine) -> + process_section_identifier (TokenChars, TokenLine) . + +-compile({inline,yyaction_32/2}). +-file("rabbit_amqp_sql_lexer.xrl", 68). +yyaction_32(TokenChars, TokenLine) -> + process_delimited_identifier (TokenChars, TokenLine) . + +-compile({inline,yyaction_33/2}). +-file("rabbit_amqp_sql_lexer.xrl", 69). +yyaction_33(TokenChars, TokenLine) -> + process_regular_identifier (TokenChars, TokenLine) . + +-compile({inline,yyaction_34/1}). +-file("rabbit_amqp_sql_lexer.xrl", 72). +yyaction_34(TokenChars) -> + { error, { illegal_character, TokenChars } } . +-file("leexinc.hrl", 377). diff --git a/deps/rabbit/src/rabbit_amqp_sql_lexer.xrl b/deps/rabbit/src/rabbit_amqp_sql_lexer.xrl new file mode 100644 index 00000000000..18044d89ab8 --- /dev/null +++ b/deps/rabbit/src/rabbit_amqp_sql_lexer.xrl @@ -0,0 +1,133 @@ +%%% This is the definitions file for SQL Filter Expressions: +%%% https://docs.oasis-open.org/amqp/filtex/v1.0/csd01/filtex-v1.0-csd01.html#_Toc67929276 +%%% +%%% To manually generate the scanner file rabbit_amqp_sql_lexer.erl run: +%%% leex:file("rabbit_amqp_sql_lexer.xrl", [deterministic]). + +Definitions. +WHITESPACE = [\s\t\f\n\r] +DIGIT = [0-9] +HEXDIGIT = [0-9A-F] +INT = {DIGIT}+ +% decimal constant or approximate number constant +FLOAT = {DIGIT}+\.{DIGIT}+(E[\+\-]?{INT})? +STRING = '([^']|'')*'|"([^"]|"")*" +BINARY = 0x({HEXDIGIT}{HEXDIGIT})+ +REGULAR_ID = [a-zA-Z][a-zA-Z0-9_]* +SECTION_ID = [a-zA-Z][a-zA-Z_-]*\.{REGULAR_ID} +DELIMITED_ID = \[([^\[\]]|\[\[|\]\])*\] + +Rules. +{WHITESPACE}+ : skip_token. + +% Logical operators +AND : {token, {'AND', TokenLine}}. +OR : {token, {'OR', TokenLine}}. +NOT : {token, {'NOT', TokenLine}}. + +% Special operators +LIKE : {token, {'LIKE', TokenLine}}. +IN : {token, {'IN', TokenLine}}. +IS : {token, {'IS', TokenLine}}. +NULL : {token, {'NULL', TokenLine}}. +ESCAPE : {token, {'ESCAPE', TokenLine}}. + +% Boolean literals +TRUE : {token, {boolean, TokenLine, true}}. +FALSE : {token, {boolean, TokenLine, false}}. + +% Functions +UTC : {token, {'UTC', TokenLine}}. + +% Comparison operators +% "The ‘<>’ operator is synonymous to the ‘!=’ operator." +<> : {token, {'<>', TokenLine}}. +!= : {token, {'<>', TokenLine}}. += : {token, {'=', TokenLine}}. +>= : {token, {'>=', TokenLine}}. +<= : {token, {'<=', TokenLine}}. +> : {token, {'>', TokenLine}}. +< : {token, {'<', TokenLine}}. + +% Arithmetic operators +\+ : {token, {'+', TokenLine}}. +- : {token, {'-', TokenLine}}. +\* : {token, {'*', TokenLine}}. +/ : {token, {'/', TokenLine}}. +\% : {token, {'%', TokenLine}}. + +% Parentheses and comma +\( : {token, {'(', TokenLine}}. +\) : {token, {')', TokenLine}}. +, : {token, {',', TokenLine}}. + +% Literals +{INT} : {token, {integer, TokenLine, list_to_integer(TokenChars)}}. +{FLOAT} : {token, {float, TokenLine, list_to_float(TokenChars)}}. +{STRING} : {token, {string, TokenLine, process_string(TokenChars)}}. +{BINARY} : {token, {binary, TokenLine, parse_binary(TokenChars)}}. +{SECTION_ID} : process_section_identifier(TokenChars, TokenLine). +{DELIMITED_ID} : process_delimited_identifier(TokenChars, TokenLine). +{REGULAR_ID} : process_regular_identifier(TokenChars, TokenLine). + +% Catch any other characters as errors +. : {error, {illegal_character, TokenChars}}. + +Erlang code. + +-define(KEYWORDS, [<<"and">>, <<"or">>, <<"not">>, + <<"like">>, <<"in">>, <<"is">>, <<"null">>, <<"escape">>, + <<"true">>, <<"false">>, + <<"exists">>, + <<"nan">>, <<"inf">>, + <<"lower">>, <<"upper">>, <<"left">>, <<"right">>, + <<"substring">>, <<"utc">>, <<"date">>]). + +parse_binary([$0, $x | HexChars]) -> + parse_hex_pairs(HexChars, <<>>). + +parse_hex_pairs([], Acc) -> + Acc; +parse_hex_pairs([H1, H2 | Rest], Acc) -> + Byte = list_to_integer([H1, H2], 16), + parse_hex_pairs(Rest, <>). + +process_string(Chars) -> + %% remove surrounding quotes + [Quote | Chars1] = Chars, + Chars2 = lists:droplast(Chars1), + Bin = unicode:characters_to_binary(Chars2), + %% process escaped quotes + binary:replace(Bin, <>, <>, [global]). + +process_section_identifier(Chars, TokenLine) -> + Bin = unicode:characters_to_binary(Chars), + case rabbit_amqp_util:section_field_name_to_atom(Bin) of + error -> + {error, {unsupported_field_name, Chars}}; + Id -> + {token, {identifier, TokenLine, Id}} + end. + +process_regular_identifier(Chars, TokenLine) -> + Bin = unicode:characters_to_binary(Chars), + case lists:member(string:lowercase(Bin), ?KEYWORDS) of + true -> + {error, {unsupported_identifier, Chars}}; + false -> + {token, {identifier, TokenLine, Bin}} + end. + +process_delimited_identifier(Chars, TokenLine) -> + %% remove surrounding brackets + Chars1 = lists:droplast(tl(Chars)), + case lists:any(fun rabbit_amqp_filter_sql:is_control_char/1, Chars1) of + true -> + {error, {illegal_control_character_in_identifier, Chars}}; + false -> + Bin = unicode:characters_to_binary(Chars1), + %% process escaped brackets + Bin1 = binary:replace(Bin, <<"[[">>, <<"[">>, [global]), + Bin2 = binary:replace(Bin1, <<"]]">>, <<"]">>, [global]), + {token, {identifier, TokenLine, Bin2}} + end. diff --git a/deps/rabbit/src/rabbit_jms_selector_parser.erl b/deps/rabbit/src/rabbit_amqp_sql_parser.erl similarity index 66% rename from deps/rabbit/src/rabbit_jms_selector_parser.erl rename to deps/rabbit/src/rabbit_amqp_sql_parser.erl index 8a62cc841b5..b02ac3dcc0e 100644 --- a/deps/rabbit/src/rabbit_jms_selector_parser.erl +++ b/deps/rabbit/src/rabbit_amqp_sql_parser.erl @@ -1,8 +1,8 @@ --file("rabbit_jms_selector_parser.yrl", 0). --module(rabbit_jms_selector_parser). --file("rabbit_jms_selector_parser.erl", 3). +-file("rabbit_amqp_sql_parser.yrl", 0). +-module(rabbit_amqp_sql_parser). +-file("rabbit_amqp_sql_parser.erl", 3). -export([parse/1, parse_and_scan/1, format_error/1]). --file("rabbit_jms_selector_parser.yrl", 122). +-file("rabbit_amqp_sql_parser.yrl", 122). extract_value({_Token, _Line, Value}) -> Value. @@ -212,7 +212,7 @@ yecctoken2string1(Other) -> --file("rabbit_jms_selector_parser.erl", 215). +-file("rabbit_amqp_sql_parser.erl", 215). -dialyzer({nowarn_function, yeccpars2/7}). -compile({nowarn_unused_function, yeccpars2/7}). @@ -264,52 +264,52 @@ yeccpars2(22=S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_22(S, Cat, Ss, Stack, T, Ts, Tzr); yeccpars2(23=S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_23(S, Cat, Ss, Stack, T, Ts, Tzr); -%% yeccpars2(24=S, Cat, Ss, Stack, T, Ts, Tzr) -> -%% yeccpars2_24(S, Cat, Ss, Stack, T, Ts, Tzr); +yeccpars2(24=S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_24(S, Cat, Ss, Stack, T, Ts, Tzr); yeccpars2(25=S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_0(S, Cat, Ss, Stack, T, Ts, Tzr); + yeccpars2_25(S, Cat, Ss, Stack, T, Ts, Tzr); yeccpars2(26=S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_0(S, Cat, Ss, Stack, T, Ts, Tzr); -%% yeccpars2(27=S, Cat, Ss, Stack, T, Ts, Tzr) -> -%% yeccpars2_27(S, Cat, Ss, Stack, T, Ts, Tzr); + yeccpars2_26(S, Cat, Ss, Stack, T, Ts, Tzr); +yeccpars2(27=S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_27(S, Cat, Ss, Stack, T, Ts, Tzr); %% yeccpars2(28=S, Cat, Ss, Stack, T, Ts, Tzr) -> %% yeccpars2_28(S, Cat, Ss, Stack, T, Ts, Tzr); -%% yeccpars2(29=S, Cat, Ss, Stack, T, Ts, Tzr) -> -%% yeccpars2_29(S, Cat, Ss, Stack, T, Ts, Tzr); -%% yeccpars2(30=S, Cat, Ss, Stack, T, Ts, Tzr) -> -%% yeccpars2_30(S, Cat, Ss, Stack, T, Ts, Tzr); +yeccpars2(29=S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_0(S, Cat, Ss, Stack, T, Ts, Tzr); +yeccpars2(30=S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_0(S, Cat, Ss, Stack, T, Ts, Tzr); %% yeccpars2(31=S, Cat, Ss, Stack, T, Ts, Tzr) -> %% yeccpars2_31(S, Cat, Ss, Stack, T, Ts, Tzr); %% yeccpars2(32=S, Cat, Ss, Stack, T, Ts, Tzr) -> %% yeccpars2_32(S, Cat, Ss, Stack, T, Ts, Tzr); -yeccpars2(33=S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_33(S, Cat, Ss, Stack, T, Ts, Tzr); -yeccpars2(34=S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_34(S, Cat, Ss, Stack, T, Ts, Tzr); -yeccpars2(35=S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_34(S, Cat, Ss, Stack, T, Ts, Tzr); -yeccpars2(36=S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_34(S, Cat, Ss, Stack, T, Ts, Tzr); +%% yeccpars2(33=S, Cat, Ss, Stack, T, Ts, Tzr) -> +%% yeccpars2_33(S, Cat, Ss, Stack, T, Ts, Tzr); +%% yeccpars2(34=S, Cat, Ss, Stack, T, Ts, Tzr) -> +%% yeccpars2_34(S, Cat, Ss, Stack, T, Ts, Tzr); +%% yeccpars2(35=S, Cat, Ss, Stack, T, Ts, Tzr) -> +%% yeccpars2_35(S, Cat, Ss, Stack, T, Ts, Tzr); +%% yeccpars2(36=S, Cat, Ss, Stack, T, Ts, Tzr) -> +%% yeccpars2_36(S, Cat, Ss, Stack, T, Ts, Tzr); yeccpars2(37=S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_34(S, Cat, Ss, Stack, T, Ts, Tzr); + yeccpars2_37(S, Cat, Ss, Stack, T, Ts, Tzr); yeccpars2(38=S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_34(S, Cat, Ss, Stack, T, Ts, Tzr); + yeccpars2_38(S, Cat, Ss, Stack, T, Ts, Tzr); yeccpars2(39=S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_34(S, Cat, Ss, Stack, T, Ts, Tzr); + yeccpars2_38(S, Cat, Ss, Stack, T, Ts, Tzr); yeccpars2(40=S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_34(S, Cat, Ss, Stack, T, Ts, Tzr); + yeccpars2_38(S, Cat, Ss, Stack, T, Ts, Tzr); yeccpars2(41=S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_34(S, Cat, Ss, Stack, T, Ts, Tzr); + yeccpars2_38(S, Cat, Ss, Stack, T, Ts, Tzr); yeccpars2(42=S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_34(S, Cat, Ss, Stack, T, Ts, Tzr); + yeccpars2_38(S, Cat, Ss, Stack, T, Ts, Tzr); yeccpars2(43=S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_43(S, Cat, Ss, Stack, T, Ts, Tzr); + yeccpars2_38(S, Cat, Ss, Stack, T, Ts, Tzr); yeccpars2(44=S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_44(S, Cat, Ss, Stack, T, Ts, Tzr); + yeccpars2_38(S, Cat, Ss, Stack, T, Ts, Tzr); yeccpars2(45=S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_45(S, Cat, Ss, Stack, T, Ts, Tzr); + yeccpars2_38(S, Cat, Ss, Stack, T, Ts, Tzr); yeccpars2(46=S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_34(S, Cat, Ss, Stack, T, Ts, Tzr); + yeccpars2_46(S, Cat, Ss, Stack, T, Ts, Tzr); yeccpars2(47=S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_47(S, Cat, Ss, Stack, T, Ts, Tzr); yeccpars2(48=S, Cat, Ss, Stack, T, Ts, Tzr) -> @@ -322,74 +322,68 @@ yeccpars2(51=S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_51(S, Cat, Ss, Stack, T, Ts, Tzr); yeccpars2(52=S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_52(S, Cat, Ss, Stack, T, Ts, Tzr); -%% yeccpars2(53=S, Cat, Ss, Stack, T, Ts, Tzr) -> -%% yeccpars2_53(S, Cat, Ss, Stack, T, Ts, Tzr); -%% yeccpars2(54=S, Cat, Ss, Stack, T, Ts, Tzr) -> -%% yeccpars2_54(S, Cat, Ss, Stack, T, Ts, Tzr); -yeccpars2(55=S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_55(S, Cat, Ss, Stack, T, Ts, Tzr); -yeccpars2(56=S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_52(S, Cat, Ss, Stack, T, Ts, Tzr); -%% yeccpars2(57=S, Cat, Ss, Stack, T, Ts, Tzr) -> -%% yeccpars2_57(S, Cat, Ss, Stack, T, Ts, Tzr); -yeccpars2(58=S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_58(S, Cat, Ss, Stack, T, Ts, Tzr); -%% yeccpars2(59=S, Cat, Ss, Stack, T, Ts, Tzr) -> -%% yeccpars2_59(S, Cat, Ss, Stack, T, Ts, Tzr); +yeccpars2(53=S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_53(S, Cat, Ss, Stack, T, Ts, Tzr); +yeccpars2(54=S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_38(S, Cat, Ss, Stack, T, Ts, Tzr); +%% yeccpars2(55=S, Cat, Ss, Stack, T, Ts, Tzr) -> +%% yeccpars2_55(S, Cat, Ss, Stack, T, Ts, Tzr); +%% yeccpars2(56=S, Cat, Ss, Stack, T, Ts, Tzr) -> +%% yeccpars2_56(S, Cat, Ss, Stack, T, Ts, Tzr); +yeccpars2(57=S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_38(S, Cat, Ss, Stack, T, Ts, Tzr); +%% yeccpars2(58=S, Cat, Ss, Stack, T, Ts, Tzr) -> +%% yeccpars2_58(S, Cat, Ss, Stack, T, Ts, Tzr); +yeccpars2(59=S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_59(S, Cat, Ss, Stack, T, Ts, Tzr); yeccpars2(60=S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_34(S, Cat, Ss, Stack, T, Ts, Tzr); -%% yeccpars2(61=S, Cat, Ss, Stack, T, Ts, Tzr) -> -%% yeccpars2_61(S, Cat, Ss, Stack, T, Ts, Tzr); + yeccpars2_60(S, Cat, Ss, Stack, T, Ts, Tzr); +yeccpars2(61=S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_61(S, Cat, Ss, Stack, T, Ts, Tzr); yeccpars2(62=S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_62(S, Cat, Ss, Stack, T, Ts, Tzr); yeccpars2(63=S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_63(S, Cat, Ss, Stack, T, Ts, Tzr); -yeccpars2(64=S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_64(S, Cat, Ss, Stack, T, Ts, Tzr); + yeccpars2_38(S, Cat, Ss, Stack, T, Ts, Tzr); +%% yeccpars2(64=S, Cat, Ss, Stack, T, Ts, Tzr) -> +%% yeccpars2_64(S, Cat, Ss, Stack, T, Ts, Tzr); yeccpars2(65=S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_52(S, Cat, Ss, Stack, T, Ts, Tzr); + yeccpars2_65(S, Cat, Ss, Stack, T, Ts, Tzr); %% yeccpars2(66=S, Cat, Ss, Stack, T, Ts, Tzr) -> %% yeccpars2_66(S, Cat, Ss, Stack, T, Ts, Tzr); -yeccpars2(67=S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_67(S, Cat, Ss, Stack, T, Ts, Tzr); +%% yeccpars2(67=S, Cat, Ss, Stack, T, Ts, Tzr) -> +%% yeccpars2_67(S, Cat, Ss, Stack, T, Ts, Tzr); %% yeccpars2(68=S, Cat, Ss, Stack, T, Ts, Tzr) -> %% yeccpars2_68(S, Cat, Ss, Stack, T, Ts, Tzr); -yeccpars2(69=S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_34(S, Cat, Ss, Stack, T, Ts, Tzr); +%% yeccpars2(69=S, Cat, Ss, Stack, T, Ts, Tzr) -> +%% yeccpars2_69(S, Cat, Ss, Stack, T, Ts, Tzr); %% yeccpars2(70=S, Cat, Ss, Stack, T, Ts, Tzr) -> %% yeccpars2_70(S, Cat, Ss, Stack, T, Ts, Tzr); %% yeccpars2(71=S, Cat, Ss, Stack, T, Ts, Tzr) -> %% yeccpars2_71(S, Cat, Ss, Stack, T, Ts, Tzr); %% yeccpars2(72=S, Cat, Ss, Stack, T, Ts, Tzr) -> %% yeccpars2_72(S, Cat, Ss, Stack, T, Ts, Tzr); -%% yeccpars2(73=S, Cat, Ss, Stack, T, Ts, Tzr) -> -%% yeccpars2_73(S, Cat, Ss, Stack, T, Ts, Tzr); -%% yeccpars2(74=S, Cat, Ss, Stack, T, Ts, Tzr) -> -%% yeccpars2_74(S, Cat, Ss, Stack, T, Ts, Tzr); -%% yeccpars2(75=S, Cat, Ss, Stack, T, Ts, Tzr) -> -%% yeccpars2_75(S, Cat, Ss, Stack, T, Ts, Tzr); +yeccpars2(73=S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_38(S, Cat, Ss, Stack, T, Ts, Tzr); +yeccpars2(74=S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_38(S, Cat, Ss, Stack, T, Ts, Tzr); +yeccpars2(75=S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_38(S, Cat, Ss, Stack, T, Ts, Tzr); %% yeccpars2(76=S, Cat, Ss, Stack, T, Ts, Tzr) -> %% yeccpars2_76(S, Cat, Ss, Stack, T, Ts, Tzr); %% yeccpars2(77=S, Cat, Ss, Stack, T, Ts, Tzr) -> %% yeccpars2_77(S, Cat, Ss, Stack, T, Ts, Tzr); -yeccpars2(78=S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_34(S, Cat, Ss, Stack, T, Ts, Tzr); -yeccpars2(79=S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_34(S, Cat, Ss, Stack, T, Ts, Tzr); -%% yeccpars2(80=S, Cat, Ss, Stack, T, Ts, Tzr) -> -%% yeccpars2_80(S, Cat, Ss, Stack, T, Ts, Tzr); -%% yeccpars2(81=S, Cat, Ss, Stack, T, Ts, Tzr) -> -%% yeccpars2_81(S, Cat, Ss, Stack, T, Ts, Tzr); -%% yeccpars2(82=S, Cat, Ss, Stack, T, Ts, Tzr) -> -%% yeccpars2_82(S, Cat, Ss, Stack, T, Ts, Tzr); +%% yeccpars2(78=S, Cat, Ss, Stack, T, Ts, Tzr) -> +%% yeccpars2_78(S, Cat, Ss, Stack, T, Ts, Tzr); +%% yeccpars2(79=S, Cat, Ss, Stack, T, Ts, Tzr) -> +%% yeccpars2_79(S, Cat, Ss, Stack, T, Ts, Tzr); +yeccpars2(80=S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_80(S, Cat, Ss, Stack, T, Ts, Tzr); +yeccpars2(81=S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_81(S, Cat, Ss, Stack, T, Ts, Tzr); +yeccpars2(82=S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_82(S, Cat, Ss, Stack, T, Ts, Tzr); yeccpars2(83=S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_83(S, Cat, Ss, Stack, T, Ts, Tzr); -yeccpars2(84=S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_84(S, Cat, Ss, Stack, T, Ts, Tzr); -yeccpars2(85=S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_85(S, Cat, Ss, Stack, T, Ts, Tzr); -yeccpars2(86=S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_86(S, Cat, Ss, Stack, T, Ts, Tzr); yeccpars2(Other, _, _, _, _, _, _) -> erlang:error({yecc_bug,"1.4",{missing_state_in_action_table, Other}}). @@ -423,10 +417,12 @@ yeccpars2_3(_S, Cat, Ss, Stack, T, Ts, Tzr) -> -dialyzer({nowarn_function, yeccpars2_4/7}). -compile({nowarn_unused_function, yeccpars2_4/7}). +yeccpars2_4(S, '%', Ss, Stack, T, Ts, Tzr) -> + yeccpars1(S, 73, Ss, Stack, T, Ts, Tzr); yeccpars2_4(S, '*', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 78, Ss, Stack, T, Ts, Tzr); + yeccpars1(S, 74, Ss, Stack, T, Ts, Tzr); yeccpars2_4(S, '/', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 79, Ss, Stack, T, Ts, Tzr); + yeccpars1(S, 75, Ss, Stack, T, Ts, Tzr); yeccpars2_4(_S, Cat, Ss, Stack, T, Ts, Tzr) -> NewStack = yeccpars2_4_(Stack), yeccgoto_additive_expr(hd(Ss), Cat, Ss, NewStack, T, Ts, Tzr). @@ -434,9 +430,9 @@ yeccpars2_4(_S, Cat, Ss, Stack, T, Ts, Tzr) -> -dialyzer({nowarn_function, yeccpars2_5/7}). -compile({nowarn_unused_function, yeccpars2_5/7}). yeccpars2_5(S, 'AND', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 25, Ss, Stack, T, Ts, Tzr); + yeccpars1(S, 29, Ss, Stack, T, Ts, Tzr); yeccpars2_5(S, 'OR', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 26, Ss, Stack, T, Ts, Tzr); + yeccpars1(S, 30, Ss, Stack, T, Ts, Tzr); yeccpars2_5(_S, Cat, Ss, Stack, T, Ts, Tzr) -> NewStack = yeccpars2_5_(Stack), yeccgoto_conditional_expr(hd(Ss), Cat, Ss, NewStack, T, Ts, Tzr). @@ -468,7 +464,7 @@ yeccpars2_9(_S, Cat, Ss, Stack, T, Ts, Tzr) -> -dialyzer({nowarn_function, yeccpars2_10/7}). -compile({nowarn_unused_function, yeccpars2_10/7}). yeccpars2_10(S, 'IS', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 83, Ss, Stack, T, Ts, Tzr); + yeccpars1(S, 80, Ss, Stack, T, Ts, Tzr); yeccpars2_10(_S, Cat, Ss, Stack, T, Ts, Tzr) -> NewStack = yeccpars2_10_(Stack), yeccgoto_primary(hd(Ss), Cat, Ss, NewStack, T, Ts, Tzr). @@ -477,46 +473,44 @@ yeccpars2_10(_S, Cat, Ss, Stack, T, Ts, Tzr) -> -compile({nowarn_unused_function, yeccpars2_11/7}). yeccpars2_11(_S, Cat, Ss, Stack, T, Ts, Tzr) -> NewStack = yeccpars2_11_(Stack), - yeccgoto_selector(hd(Ss), Cat, Ss, NewStack, T, Ts, Tzr). + yeccgoto_primary(hd(Ss), Cat, Ss, NewStack, T, Ts, Tzr). -dialyzer({nowarn_function, yeccpars2_12/7}). -compile({nowarn_unused_function, yeccpars2_12/7}). yeccpars2_12(_S, Cat, Ss, Stack, T, Ts, Tzr) -> NewStack = yeccpars2_12_(Stack), - yeccgoto_logical_expr(hd(Ss), Cat, Ss, NewStack, T, Ts, Tzr). + yeccgoto_selector(hd(Ss), Cat, Ss, NewStack, T, Ts, Tzr). -dialyzer({nowarn_function, yeccpars2_13/7}). -compile({nowarn_unused_function, yeccpars2_13/7}). yeccpars2_13(_S, Cat, Ss, Stack, T, Ts, Tzr) -> NewStack = yeccpars2_13_(Stack), - yeccgoto_comparison_expr(hd(Ss), Cat, Ss, NewStack, T, Ts, Tzr). + yeccgoto_logical_expr(hd(Ss), Cat, Ss, NewStack, T, Ts, Tzr). -dialyzer({nowarn_function, yeccpars2_14/7}). -compile({nowarn_unused_function, yeccpars2_14/7}). yeccpars2_14(S, '+', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 34, Ss, Stack, T, Ts, Tzr); + yeccpars1(S, 38, Ss, Stack, T, Ts, Tzr); yeccpars2_14(S, '-', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 35, Ss, Stack, T, Ts, Tzr); + yeccpars1(S, 39, Ss, Stack, T, Ts, Tzr); yeccpars2_14(S, '<', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 36, Ss, Stack, T, Ts, Tzr); + yeccpars1(S, 40, Ss, Stack, T, Ts, Tzr); yeccpars2_14(S, '<=', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 37, Ss, Stack, T, Ts, Tzr); + yeccpars1(S, 41, Ss, Stack, T, Ts, Tzr); yeccpars2_14(S, '<>', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 38, Ss, Stack, T, Ts, Tzr); + yeccpars1(S, 42, Ss, Stack, T, Ts, Tzr); yeccpars2_14(S, '=', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 39, Ss, Stack, T, Ts, Tzr); + yeccpars1(S, 43, Ss, Stack, T, Ts, Tzr); yeccpars2_14(S, '>', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 40, Ss, Stack, T, Ts, Tzr); + yeccpars1(S, 44, Ss, Stack, T, Ts, Tzr); yeccpars2_14(S, '>=', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 41, Ss, Stack, T, Ts, Tzr); -yeccpars2_14(S, 'BETWEEN', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 42, Ss, Stack, T, Ts, Tzr); + yeccpars1(S, 45, Ss, Stack, T, Ts, Tzr); yeccpars2_14(S, 'IN', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 43, Ss, Stack, T, Ts, Tzr); + yeccpars1(S, 46, Ss, Stack, T, Ts, Tzr); yeccpars2_14(S, 'LIKE', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 44, Ss, Stack, T, Ts, Tzr); + yeccpars1(S, 47, Ss, Stack, T, Ts, Tzr); yeccpars2_14(S, 'NOT', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 45, Ss, Stack, T, Ts, Tzr); + yeccpars1(S, 48, Ss, Stack, T, Ts, Tzr); yeccpars2_14(_S, Cat, Ss, Stack, T, Ts, Tzr) -> NewStack = yeccpars2_14_(Stack), yeccgoto_comparison_expr(hd(Ss), Cat, Ss, NewStack, T, Ts, Tzr). @@ -527,16 +521,20 @@ yeccpars2_14(_S, Cat, Ss, Stack, T, Ts, Tzr) -> -compile({nowarn_unused_function, yeccpars2_16/7}). yeccpars2_16(S, '(', Ss, Stack, T, Ts, Tzr) -> yeccpars1(S, 15, Ss, Stack, T, Ts, Tzr); -yeccpars2_16(S, 'boolean', Ss, Stack, T, Ts, Tzr) -> +yeccpars2_16(S, 'UTC', Ss, Stack, T, Ts, Tzr) -> yeccpars1(S, 19, Ss, Stack, T, Ts, Tzr); -yeccpars2_16(S, 'float', Ss, Stack, T, Ts, Tzr) -> +yeccpars2_16(S, 'binary', Ss, Stack, T, Ts, Tzr) -> yeccpars1(S, 20, Ss, Stack, T, Ts, Tzr); -yeccpars2_16(S, 'identifier', Ss, Stack, T, Ts, Tzr) -> +yeccpars2_16(S, 'boolean', Ss, Stack, T, Ts, Tzr) -> yeccpars1(S, 21, Ss, Stack, T, Ts, Tzr); -yeccpars2_16(S, 'integer', Ss, Stack, T, Ts, Tzr) -> +yeccpars2_16(S, 'float', Ss, Stack, T, Ts, Tzr) -> yeccpars1(S, 22, Ss, Stack, T, Ts, Tzr); -yeccpars2_16(S, 'string', Ss, Stack, T, Ts, Tzr) -> +yeccpars2_16(S, 'identifier', Ss, Stack, T, Ts, Tzr) -> yeccpars1(S, 23, Ss, Stack, T, Ts, Tzr); +yeccpars2_16(S, 'integer', Ss, Stack, T, Ts, Tzr) -> + yeccpars1(S, 24, Ss, Stack, T, Ts, Tzr); +yeccpars2_16(S, 'string', Ss, Stack, T, Ts, Tzr) -> + yeccpars1(S, 25, Ss, Stack, T, Ts, Tzr); yeccpars2_16(_, _, _, _, T, _, _) -> yeccerror(T). @@ -546,9 +544,10 @@ yeccpars2_16(_, _, _, _, T, _, _) -> -dialyzer({nowarn_function, yeccpars2_19/7}). -compile({nowarn_unused_function, yeccpars2_19/7}). -yeccpars2_19(_S, Cat, Ss, Stack, T, Ts, Tzr) -> - NewStack = yeccpars2_19_(Stack), - yeccgoto_literal(hd(Ss), Cat, Ss, NewStack, T, Ts, Tzr). +yeccpars2_19(S, '(', Ss, Stack, T, Ts, Tzr) -> + yeccpars1(S, 26, Ss, Stack, T, Ts, Tzr); +yeccpars2_19(_, _, _, _, T, _, _) -> + yeccerror(T). -dialyzer({nowarn_function, yeccpars2_20/7}). -compile({nowarn_unused_function, yeccpars2_20/7}). @@ -560,7 +559,7 @@ yeccpars2_20(_S, Cat, Ss, Stack, T, Ts, Tzr) -> -compile({nowarn_unused_function, yeccpars2_21/7}). yeccpars2_21(_S, Cat, Ss, Stack, T, Ts, Tzr) -> NewStack = yeccpars2_21_(Stack), - yeccgoto_identifier_expr(hd(Ss), Cat, Ss, NewStack, T, Ts, Tzr). + yeccgoto_literal(hd(Ss), Cat, Ss, NewStack, T, Ts, Tzr). -dialyzer({nowarn_function, yeccpars2_22/7}). -compile({nowarn_unused_function, yeccpars2_22/7}). @@ -572,141 +571,145 @@ yeccpars2_22(_S, Cat, Ss, Stack, T, Ts, Tzr) -> -compile({nowarn_unused_function, yeccpars2_23/7}). yeccpars2_23(_S, Cat, Ss, Stack, T, Ts, Tzr) -> NewStack = yeccpars2_23_(Stack), - yeccgoto_literal(hd(Ss), Cat, Ss, NewStack, T, Ts, Tzr). + yeccgoto_identifier_expr(hd(Ss), Cat, Ss, NewStack, T, Ts, Tzr). -dialyzer({nowarn_function, yeccpars2_24/7}). -compile({nowarn_unused_function, yeccpars2_24/7}). yeccpars2_24(_S, Cat, Ss, Stack, T, Ts, Tzr) -> - [_|Nss] = Ss, NewStack = yeccpars2_24_(Stack), - yeccgoto_logical_expr(hd(Nss), Cat, Nss, NewStack, T, Ts, Tzr). + yeccgoto_literal(hd(Ss), Cat, Ss, NewStack, T, Ts, Tzr). -%% yeccpars2_25: see yeccpars2_0 +-dialyzer({nowarn_function, yeccpars2_25/7}). +-compile({nowarn_unused_function, yeccpars2_25/7}). +yeccpars2_25(_S, Cat, Ss, Stack, T, Ts, Tzr) -> + NewStack = yeccpars2_25_(Stack), + yeccgoto_literal(hd(Ss), Cat, Ss, NewStack, T, Ts, Tzr). -%% yeccpars2_26: see yeccpars2_0 +-dialyzer({nowarn_function, yeccpars2_26/7}). +-compile({nowarn_unused_function, yeccpars2_26/7}). +yeccpars2_26(S, ')', Ss, Stack, T, Ts, Tzr) -> + yeccpars1(S, 27, Ss, Stack, T, Ts, Tzr); +yeccpars2_26(_, _, _, _, T, _, _) -> + yeccerror(T). -dialyzer({nowarn_function, yeccpars2_27/7}). -compile({nowarn_unused_function, yeccpars2_27/7}). -yeccpars2_27(S, 'AND', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 25, Ss, Stack, T, Ts, Tzr); yeccpars2_27(_S, Cat, Ss, Stack, T, Ts, Tzr) -> [_,_|Nss] = Ss, NewStack = yeccpars2_27_(Stack), - yeccgoto_logical_expr(hd(Nss), Cat, Nss, NewStack, T, Ts, Tzr). + yeccgoto_function_call(hd(Nss), Cat, Nss, NewStack, T, Ts, Tzr). -dialyzer({nowarn_function, yeccpars2_28/7}). -compile({nowarn_unused_function, yeccpars2_28/7}). yeccpars2_28(_S, Cat, Ss, Stack, T, Ts, Tzr) -> - [_,_|Nss] = Ss, + [_|Nss] = Ss, NewStack = yeccpars2_28_(Stack), yeccgoto_logical_expr(hd(Nss), Cat, Nss, NewStack, T, Ts, Tzr). --dialyzer({nowarn_function, yeccpars2_29/7}). --compile({nowarn_unused_function, yeccpars2_29/7}). -yeccpars2_29(_S, Cat, Ss, Stack, T, Ts, Tzr) -> - [_|Nss] = Ss, - NewStack = yeccpars2_29_(Stack), - yeccgoto_unary_expr(hd(Nss), Cat, Nss, NewStack, T, Ts, Tzr). +%% yeccpars2_29: see yeccpars2_0 --dialyzer({nowarn_function, yeccpars2_30/7}). --compile({nowarn_unused_function, yeccpars2_30/7}). -yeccpars2_30(_S, Cat, Ss, Stack, T, Ts, Tzr) -> - NewStack = yeccpars2_30_(Stack), - yeccgoto_primary(hd(Ss), Cat, Ss, NewStack, T, Ts, Tzr). +%% yeccpars2_30: see yeccpars2_0 -dialyzer({nowarn_function, yeccpars2_31/7}). -compile({nowarn_unused_function, yeccpars2_31/7}). +yeccpars2_31(S, 'AND', Ss, Stack, T, Ts, Tzr) -> + yeccpars1(S, 29, Ss, Stack, T, Ts, Tzr); yeccpars2_31(_S, Cat, Ss, Stack, T, Ts, Tzr) -> - [_|Nss] = Ss, + [_,_|Nss] = Ss, NewStack = yeccpars2_31_(Stack), - yeccgoto_unary_expr(hd(Nss), Cat, Nss, NewStack, T, Ts, Tzr). + yeccgoto_logical_expr(hd(Nss), Cat, Nss, NewStack, T, Ts, Tzr). -dialyzer({nowarn_function, yeccpars2_32/7}). -compile({nowarn_unused_function, yeccpars2_32/7}). -yeccpars2_32(S, ')', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 33, Ss, Stack, T, Ts, Tzr); -yeccpars2_32(_, _, _, _, T, _, _) -> - yeccerror(T). +yeccpars2_32(_S, Cat, Ss, Stack, T, Ts, Tzr) -> + [_,_|Nss] = Ss, + NewStack = yeccpars2_32_(Stack), + yeccgoto_logical_expr(hd(Nss), Cat, Nss, NewStack, T, Ts, Tzr). -dialyzer({nowarn_function, yeccpars2_33/7}). -compile({nowarn_unused_function, yeccpars2_33/7}). yeccpars2_33(_S, Cat, Ss, Stack, T, Ts, Tzr) -> - [_,_|Nss] = Ss, + [_|Nss] = Ss, NewStack = yeccpars2_33_(Stack), + yeccgoto_unary_expr(hd(Nss), Cat, Nss, NewStack, T, Ts, Tzr). + +-dialyzer({nowarn_function, yeccpars2_34/7}). +-compile({nowarn_unused_function, yeccpars2_34/7}). +yeccpars2_34(_S, Cat, Ss, Stack, T, Ts, Tzr) -> + NewStack = yeccpars2_34_(Stack), + yeccgoto_primary(hd(Ss), Cat, Ss, NewStack, T, Ts, Tzr). + +-dialyzer({nowarn_function, yeccpars2_35/7}). +-compile({nowarn_unused_function, yeccpars2_35/7}). +yeccpars2_35(_S, Cat, Ss, Stack, T, Ts, Tzr) -> + [_|Nss] = Ss, + NewStack = yeccpars2_35_(Stack), + yeccgoto_unary_expr(hd(Nss), Cat, Nss, NewStack, T, Ts, Tzr). + +-dialyzer({nowarn_function, yeccpars2_36/7}). +-compile({nowarn_unused_function, yeccpars2_36/7}). +yeccpars2_36(S, ')', Ss, Stack, T, Ts, Tzr) -> + yeccpars1(S, 37, Ss, Stack, T, Ts, Tzr); +yeccpars2_36(_, _, _, _, T, _, _) -> + yeccerror(T). + +-dialyzer({nowarn_function, yeccpars2_37/7}). +-compile({nowarn_unused_function, yeccpars2_37/7}). +yeccpars2_37(_S, Cat, Ss, Stack, T, Ts, Tzr) -> + [_,_|Nss] = Ss, + NewStack = yeccpars2_37_(Stack), yeccgoto_primary(hd(Nss), Cat, Nss, NewStack, T, Ts, Tzr). -yeccpars2_34(S, '+', Ss, Stack, T, Ts, Tzr) -> +yeccpars2_38(S, '+', Ss, Stack, T, Ts, Tzr) -> yeccpars1(S, 16, Ss, Stack, T, Ts, Tzr); -yeccpars2_34(S, '-', Ss, Stack, T, Ts, Tzr) -> +yeccpars2_38(S, '-', Ss, Stack, T, Ts, Tzr) -> yeccpars1(S, 17, Ss, Stack, T, Ts, Tzr); -yeccpars2_34(S, Cat, Ss, Stack, T, Ts, Tzr) -> +yeccpars2_38(S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_16(S, Cat, Ss, Stack, T, Ts, Tzr). -%% yeccpars2_35: see yeccpars2_34 - -%% yeccpars2_36: see yeccpars2_34 +%% yeccpars2_39: see yeccpars2_38 -%% yeccpars2_37: see yeccpars2_34 +%% yeccpars2_40: see yeccpars2_38 -%% yeccpars2_38: see yeccpars2_34 +%% yeccpars2_41: see yeccpars2_38 -%% yeccpars2_39: see yeccpars2_34 +%% yeccpars2_42: see yeccpars2_38 -%% yeccpars2_40: see yeccpars2_34 +%% yeccpars2_43: see yeccpars2_38 -%% yeccpars2_41: see yeccpars2_34 +%% yeccpars2_44: see yeccpars2_38 -%% yeccpars2_42: see yeccpars2_34 - --dialyzer({nowarn_function, yeccpars2_43/7}). --compile({nowarn_unused_function, yeccpars2_43/7}). -yeccpars2_43(S, '(', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 65, Ss, Stack, T, Ts, Tzr); -yeccpars2_43(_, _, _, _, T, _, _) -> - yeccerror(T). +%% yeccpars2_45: see yeccpars2_38 --dialyzer({nowarn_function, yeccpars2_44/7}). --compile({nowarn_unused_function, yeccpars2_44/7}). -yeccpars2_44(S, 'string', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 62, Ss, Stack, T, Ts, Tzr); -yeccpars2_44(_, _, _, _, T, _, _) -> - yeccerror(T). - --dialyzer({nowarn_function, yeccpars2_45/7}). --compile({nowarn_unused_function, yeccpars2_45/7}). -yeccpars2_45(S, 'BETWEEN', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 46, Ss, Stack, T, Ts, Tzr); -yeccpars2_45(S, 'IN', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 47, Ss, Stack, T, Ts, Tzr); -yeccpars2_45(S, 'LIKE', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 48, Ss, Stack, T, Ts, Tzr); -yeccpars2_45(_, _, _, _, T, _, _) -> +-dialyzer({nowarn_function, yeccpars2_46/7}). +-compile({nowarn_unused_function, yeccpars2_46/7}). +yeccpars2_46(S, '(', Ss, Stack, T, Ts, Tzr) -> + yeccpars1(S, 63, Ss, Stack, T, Ts, Tzr); +yeccpars2_46(_, _, _, _, T, _, _) -> yeccerror(T). -%% yeccpars2_46: see yeccpars2_34 - -dialyzer({nowarn_function, yeccpars2_47/7}). -compile({nowarn_unused_function, yeccpars2_47/7}). -yeccpars2_47(S, '(', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 52, Ss, Stack, T, Ts, Tzr); +yeccpars2_47(S, 'string', Ss, Stack, T, Ts, Tzr) -> + yeccpars1(S, 60, Ss, Stack, T, Ts, Tzr); yeccpars2_47(_, _, _, _, T, _, _) -> yeccerror(T). -dialyzer({nowarn_function, yeccpars2_48/7}). -compile({nowarn_unused_function, yeccpars2_48/7}). -yeccpars2_48(S, 'string', Ss, Stack, T, Ts, Tzr) -> +yeccpars2_48(S, 'IN', Ss, Stack, T, Ts, Tzr) -> yeccpars1(S, 49, Ss, Stack, T, Ts, Tzr); +yeccpars2_48(S, 'LIKE', Ss, Stack, T, Ts, Tzr) -> + yeccpars1(S, 50, Ss, Stack, T, Ts, Tzr); yeccpars2_48(_, _, _, _, T, _, _) -> yeccerror(T). -dialyzer({nowarn_function, yeccpars2_49/7}). -compile({nowarn_unused_function, yeccpars2_49/7}). -yeccpars2_49(S, 'ESCAPE', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 50, Ss, Stack, T, Ts, Tzr); -yeccpars2_49(_S, Cat, Ss, Stack, T, Ts, Tzr) -> - [_,_,_|Nss] = Ss, - NewStack = yeccpars2_49_(Stack), - yeccgoto_like_expr(hd(Nss), Cat, Nss, NewStack, T, Ts, Tzr). +yeccpars2_49(S, '(', Ss, Stack, T, Ts, Tzr) -> + yeccpars1(S, 54, Ss, Stack, T, Ts, Tzr); +yeccpars2_49(_, _, _, _, T, _, _) -> + yeccerror(T). -dialyzer({nowarn_function, yeccpars2_50/7}). -compile({nowarn_unused_function, yeccpars2_50/7}). @@ -717,148 +720,164 @@ yeccpars2_50(_, _, _, _, T, _, _) -> -dialyzer({nowarn_function, yeccpars2_51/7}). -compile({nowarn_unused_function, yeccpars2_51/7}). +yeccpars2_51(S, 'ESCAPE', Ss, Stack, T, Ts, Tzr) -> + yeccpars1(S, 52, Ss, Stack, T, Ts, Tzr); yeccpars2_51(_S, Cat, Ss, Stack, T, Ts, Tzr) -> - [_,_,_,_,_|Nss] = Ss, + [_,_,_|Nss] = Ss, NewStack = yeccpars2_51_(Stack), yeccgoto_like_expr(hd(Nss), Cat, Nss, NewStack, T, Ts, Tzr). -dialyzer({nowarn_function, yeccpars2_52/7}). -compile({nowarn_unused_function, yeccpars2_52/7}). yeccpars2_52(S, 'string', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 55, Ss, Stack, T, Ts, Tzr); + yeccpars1(S, 53, Ss, Stack, T, Ts, Tzr); yeccpars2_52(_, _, _, _, T, _, _) -> yeccerror(T). -dialyzer({nowarn_function, yeccpars2_53/7}). -compile({nowarn_unused_function, yeccpars2_53/7}). -yeccpars2_53(S, ')', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 58, Ss, Stack, T, Ts, Tzr); -yeccpars2_53(_, _, _, _, T, _, _) -> - yeccerror(T). +yeccpars2_53(_S, Cat, Ss, Stack, T, Ts, Tzr) -> + [_,_,_,_,_|Nss] = Ss, + NewStack = yeccpars2_53_(Stack), + yeccgoto_like_expr(hd(Nss), Cat, Nss, NewStack, T, Ts, Tzr). --dialyzer({nowarn_function, yeccpars2_54/7}). --compile({nowarn_unused_function, yeccpars2_54/7}). -yeccpars2_54(S, ',', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 56, Ss, Stack, T, Ts, Tzr); -yeccpars2_54(_S, Cat, Ss, Stack, T, Ts, Tzr) -> - NewStack = yeccpars2_54_(Stack), - yeccgoto_string_list(hd(Ss), Cat, Ss, NewStack, T, Ts, Tzr). +%% yeccpars2_54: see yeccpars2_38 -dialyzer({nowarn_function, yeccpars2_55/7}). -compile({nowarn_unused_function, yeccpars2_55/7}). -yeccpars2_55(_S, Cat, Ss, Stack, T, Ts, Tzr) -> - NewStack = yeccpars2_55_(Stack), - yeccgoto_string_item(hd(Ss), Cat, Ss, NewStack, T, Ts, Tzr). +yeccpars2_55(S, ')', Ss, Stack, T, Ts, Tzr) -> + yeccpars1(S, 59, Ss, Stack, T, Ts, Tzr); +yeccpars2_55(_, _, _, _, T, _, _) -> + yeccerror(T). -%% yeccpars2_56: see yeccpars2_52 +-dialyzer({nowarn_function, yeccpars2_56/7}). +-compile({nowarn_unused_function, yeccpars2_56/7}). +yeccpars2_56(S, '+', Ss, Stack, T, Ts, Tzr) -> + yeccpars1(S, 38, Ss, Stack, T, Ts, Tzr); +yeccpars2_56(S, ',', Ss, Stack, T, Ts, Tzr) -> + yeccpars1(S, 57, Ss, Stack, T, Ts, Tzr); +yeccpars2_56(S, '-', Ss, Stack, T, Ts, Tzr) -> + yeccpars1(S, 39, Ss, Stack, T, Ts, Tzr); +yeccpars2_56(_S, Cat, Ss, Stack, T, Ts, Tzr) -> + NewStack = yeccpars2_56_(Stack), + yeccgoto_expression_list(hd(Ss), Cat, Ss, NewStack, T, Ts, Tzr). --dialyzer({nowarn_function, yeccpars2_57/7}). --compile({nowarn_unused_function, yeccpars2_57/7}). -yeccpars2_57(_S, Cat, Ss, Stack, T, Ts, Tzr) -> - [_,_|Nss] = Ss, - NewStack = yeccpars2_57_(Stack), - yeccgoto_string_list(hd(Nss), Cat, Nss, NewStack, T, Ts, Tzr). +%% yeccpars2_57: see yeccpars2_38 -dialyzer({nowarn_function, yeccpars2_58/7}). -compile({nowarn_unused_function, yeccpars2_58/7}). yeccpars2_58(_S, Cat, Ss, Stack, T, Ts, Tzr) -> - [_,_,_,_,_|Nss] = Ss, + [_,_|Nss] = Ss, NewStack = yeccpars2_58_(Stack), - yeccgoto_in_expr(hd(Nss), Cat, Nss, NewStack, T, Ts, Tzr). + yeccgoto_expression_list(hd(Nss), Cat, Nss, NewStack, T, Ts, Tzr). -dialyzer({nowarn_function, yeccpars2_59/7}). -compile({nowarn_unused_function, yeccpars2_59/7}). -yeccpars2_59(S, '+', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 34, Ss, Stack, T, Ts, Tzr); -yeccpars2_59(S, '-', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 35, Ss, Stack, T, Ts, Tzr); -yeccpars2_59(S, 'AND', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 60, Ss, Stack, T, Ts, Tzr); -yeccpars2_59(_, _, _, _, T, _, _) -> - yeccerror(T). +yeccpars2_59(_S, Cat, Ss, Stack, T, Ts, Tzr) -> + [_,_,_,_,_|Nss] = Ss, + NewStack = yeccpars2_59_(Stack), + yeccgoto_in_expr(hd(Nss), Cat, Nss, NewStack, T, Ts, Tzr). -%% yeccpars2_60: see yeccpars2_34 +-dialyzer({nowarn_function, yeccpars2_60/7}). +-compile({nowarn_unused_function, yeccpars2_60/7}). +yeccpars2_60(S, 'ESCAPE', Ss, Stack, T, Ts, Tzr) -> + yeccpars1(S, 61, Ss, Stack, T, Ts, Tzr); +yeccpars2_60(_S, Cat, Ss, Stack, T, Ts, Tzr) -> + [_,_|Nss] = Ss, + NewStack = yeccpars2_60_(Stack), + yeccgoto_like_expr(hd(Nss), Cat, Nss, NewStack, T, Ts, Tzr). -dialyzer({nowarn_function, yeccpars2_61/7}). -compile({nowarn_unused_function, yeccpars2_61/7}). -yeccpars2_61(S, '+', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 34, Ss, Stack, T, Ts, Tzr); -yeccpars2_61(S, '-', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 35, Ss, Stack, T, Ts, Tzr); -yeccpars2_61(_S, Cat, Ss, Stack, T, Ts, Tzr) -> - [_,_,_,_,_|Nss] = Ss, - NewStack = yeccpars2_61_(Stack), - yeccgoto_between_expr(hd(Nss), Cat, Nss, NewStack, T, Ts, Tzr). +yeccpars2_61(S, 'string', Ss, Stack, T, Ts, Tzr) -> + yeccpars1(S, 62, Ss, Stack, T, Ts, Tzr); +yeccpars2_61(_, _, _, _, T, _, _) -> + yeccerror(T). -dialyzer({nowarn_function, yeccpars2_62/7}). -compile({nowarn_unused_function, yeccpars2_62/7}). -yeccpars2_62(S, 'ESCAPE', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 63, Ss, Stack, T, Ts, Tzr); yeccpars2_62(_S, Cat, Ss, Stack, T, Ts, Tzr) -> - [_,_|Nss] = Ss, + [_,_,_,_|Nss] = Ss, NewStack = yeccpars2_62_(Stack), yeccgoto_like_expr(hd(Nss), Cat, Nss, NewStack, T, Ts, Tzr). --dialyzer({nowarn_function, yeccpars2_63/7}). --compile({nowarn_unused_function, yeccpars2_63/7}). -yeccpars2_63(S, 'string', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 64, Ss, Stack, T, Ts, Tzr); -yeccpars2_63(_, _, _, _, T, _, _) -> - yeccerror(T). +%% yeccpars2_63: see yeccpars2_38 -dialyzer({nowarn_function, yeccpars2_64/7}). -compile({nowarn_unused_function, yeccpars2_64/7}). -yeccpars2_64(_S, Cat, Ss, Stack, T, Ts, Tzr) -> - [_,_,_,_|Nss] = Ss, - NewStack = yeccpars2_64_(Stack), - yeccgoto_like_expr(hd(Nss), Cat, Nss, NewStack, T, Ts, Tzr). +yeccpars2_64(S, ')', Ss, Stack, T, Ts, Tzr) -> + yeccpars1(S, 65, Ss, Stack, T, Ts, Tzr); +yeccpars2_64(_, _, _, _, T, _, _) -> + yeccerror(T). -%% yeccpars2_65: see yeccpars2_52 +-dialyzer({nowarn_function, yeccpars2_65/7}). +-compile({nowarn_unused_function, yeccpars2_65/7}). +yeccpars2_65(_S, Cat, Ss, Stack, T, Ts, Tzr) -> + [_,_,_,_|Nss] = Ss, + NewStack = yeccpars2_65_(Stack), + yeccgoto_in_expr(hd(Nss), Cat, Nss, NewStack, T, Ts, Tzr). -dialyzer({nowarn_function, yeccpars2_66/7}). -compile({nowarn_unused_function, yeccpars2_66/7}). -yeccpars2_66(S, ')', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 67, Ss, Stack, T, Ts, Tzr); -yeccpars2_66(_, _, _, _, T, _, _) -> - yeccerror(T). +yeccpars2_66(S, '+', Ss, Stack, T, Ts, Tzr) -> + yeccpars1(S, 38, Ss, Stack, T, Ts, Tzr); +yeccpars2_66(S, '-', Ss, Stack, T, Ts, Tzr) -> + yeccpars1(S, 39, Ss, Stack, T, Ts, Tzr); +yeccpars2_66(_S, Cat, Ss, Stack, T, Ts, Tzr) -> + [_,_|Nss] = Ss, + NewStack = yeccpars2_66_(Stack), + yeccgoto_comparison_expr(hd(Nss), Cat, Nss, NewStack, T, Ts, Tzr). -dialyzer({nowarn_function, yeccpars2_67/7}). -compile({nowarn_unused_function, yeccpars2_67/7}). +yeccpars2_67(S, '+', Ss, Stack, T, Ts, Tzr) -> + yeccpars1(S, 38, Ss, Stack, T, Ts, Tzr); +yeccpars2_67(S, '-', Ss, Stack, T, Ts, Tzr) -> + yeccpars1(S, 39, Ss, Stack, T, Ts, Tzr); yeccpars2_67(_S, Cat, Ss, Stack, T, Ts, Tzr) -> - [_,_,_,_|Nss] = Ss, + [_,_|Nss] = Ss, NewStack = yeccpars2_67_(Stack), - yeccgoto_in_expr(hd(Nss), Cat, Nss, NewStack, T, Ts, Tzr). + yeccgoto_comparison_expr(hd(Nss), Cat, Nss, NewStack, T, Ts, Tzr). -dialyzer({nowarn_function, yeccpars2_68/7}). -compile({nowarn_unused_function, yeccpars2_68/7}). yeccpars2_68(S, '+', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 34, Ss, Stack, T, Ts, Tzr); + yeccpars1(S, 38, Ss, Stack, T, Ts, Tzr); yeccpars2_68(S, '-', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 35, Ss, Stack, T, Ts, Tzr); -yeccpars2_68(S, 'AND', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 69, Ss, Stack, T, Ts, Tzr); -yeccpars2_68(_, _, _, _, T, _, _) -> - yeccerror(T). + yeccpars1(S, 39, Ss, Stack, T, Ts, Tzr); +yeccpars2_68(_S, Cat, Ss, Stack, T, Ts, Tzr) -> + [_,_|Nss] = Ss, + NewStack = yeccpars2_68_(Stack), + yeccgoto_comparison_expr(hd(Nss), Cat, Nss, NewStack, T, Ts, Tzr). -%% yeccpars2_69: see yeccpars2_34 +-dialyzer({nowarn_function, yeccpars2_69/7}). +-compile({nowarn_unused_function, yeccpars2_69/7}). +yeccpars2_69(S, '+', Ss, Stack, T, Ts, Tzr) -> + yeccpars1(S, 38, Ss, Stack, T, Ts, Tzr); +yeccpars2_69(S, '-', Ss, Stack, T, Ts, Tzr) -> + yeccpars1(S, 39, Ss, Stack, T, Ts, Tzr); +yeccpars2_69(_S, Cat, Ss, Stack, T, Ts, Tzr) -> + [_,_|Nss] = Ss, + NewStack = yeccpars2_69_(Stack), + yeccgoto_comparison_expr(hd(Nss), Cat, Nss, NewStack, T, Ts, Tzr). -dialyzer({nowarn_function, yeccpars2_70/7}). -compile({nowarn_unused_function, yeccpars2_70/7}). yeccpars2_70(S, '+', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 34, Ss, Stack, T, Ts, Tzr); + yeccpars1(S, 38, Ss, Stack, T, Ts, Tzr); yeccpars2_70(S, '-', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 35, Ss, Stack, T, Ts, Tzr); + yeccpars1(S, 39, Ss, Stack, T, Ts, Tzr); yeccpars2_70(_S, Cat, Ss, Stack, T, Ts, Tzr) -> - [_,_,_,_|Nss] = Ss, + [_,_|Nss] = Ss, NewStack = yeccpars2_70_(Stack), - yeccgoto_between_expr(hd(Nss), Cat, Nss, NewStack, T, Ts, Tzr). + yeccgoto_comparison_expr(hd(Nss), Cat, Nss, NewStack, T, Ts, Tzr). -dialyzer({nowarn_function, yeccpars2_71/7}). -compile({nowarn_unused_function, yeccpars2_71/7}). yeccpars2_71(S, '+', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 34, Ss, Stack, T, Ts, Tzr); + yeccpars1(S, 38, Ss, Stack, T, Ts, Tzr); yeccpars2_71(S, '-', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 35, Ss, Stack, T, Ts, Tzr); + yeccpars1(S, 39, Ss, Stack, T, Ts, Tzr); yeccpars2_71(_S, Cat, Ss, Stack, T, Ts, Tzr) -> [_,_|Nss] = Ss, NewStack = yeccpars2_71_(Stack), @@ -866,127 +885,85 @@ yeccpars2_71(_S, Cat, Ss, Stack, T, Ts, Tzr) -> -dialyzer({nowarn_function, yeccpars2_72/7}). -compile({nowarn_unused_function, yeccpars2_72/7}). -yeccpars2_72(S, '+', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 34, Ss, Stack, T, Ts, Tzr); -yeccpars2_72(S, '-', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 35, Ss, Stack, T, Ts, Tzr); +yeccpars2_72(S, '%', Ss, Stack, T, Ts, Tzr) -> + yeccpars1(S, 73, Ss, Stack, T, Ts, Tzr); +yeccpars2_72(S, '*', Ss, Stack, T, Ts, Tzr) -> + yeccpars1(S, 74, Ss, Stack, T, Ts, Tzr); +yeccpars2_72(S, '/', Ss, Stack, T, Ts, Tzr) -> + yeccpars1(S, 75, Ss, Stack, T, Ts, Tzr); yeccpars2_72(_S, Cat, Ss, Stack, T, Ts, Tzr) -> [_,_|Nss] = Ss, NewStack = yeccpars2_72_(Stack), - yeccgoto_comparison_expr(hd(Nss), Cat, Nss, NewStack, T, Ts, Tzr). + yeccgoto_additive_expr(hd(Nss), Cat, Nss, NewStack, T, Ts, Tzr). --dialyzer({nowarn_function, yeccpars2_73/7}). --compile({nowarn_unused_function, yeccpars2_73/7}). -yeccpars2_73(S, '+', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 34, Ss, Stack, T, Ts, Tzr); -yeccpars2_73(S, '-', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 35, Ss, Stack, T, Ts, Tzr); -yeccpars2_73(_S, Cat, Ss, Stack, T, Ts, Tzr) -> - [_,_|Nss] = Ss, - NewStack = yeccpars2_73_(Stack), - yeccgoto_comparison_expr(hd(Nss), Cat, Nss, NewStack, T, Ts, Tzr). +%% yeccpars2_73: see yeccpars2_38 --dialyzer({nowarn_function, yeccpars2_74/7}). --compile({nowarn_unused_function, yeccpars2_74/7}). -yeccpars2_74(S, '+', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 34, Ss, Stack, T, Ts, Tzr); -yeccpars2_74(S, '-', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 35, Ss, Stack, T, Ts, Tzr); -yeccpars2_74(_S, Cat, Ss, Stack, T, Ts, Tzr) -> - [_,_|Nss] = Ss, - NewStack = yeccpars2_74_(Stack), - yeccgoto_comparison_expr(hd(Nss), Cat, Nss, NewStack, T, Ts, Tzr). +%% yeccpars2_74: see yeccpars2_38 --dialyzer({nowarn_function, yeccpars2_75/7}). --compile({nowarn_unused_function, yeccpars2_75/7}). -yeccpars2_75(S, '+', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 34, Ss, Stack, T, Ts, Tzr); -yeccpars2_75(S, '-', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 35, Ss, Stack, T, Ts, Tzr); -yeccpars2_75(_S, Cat, Ss, Stack, T, Ts, Tzr) -> - [_,_|Nss] = Ss, - NewStack = yeccpars2_75_(Stack), - yeccgoto_comparison_expr(hd(Nss), Cat, Nss, NewStack, T, Ts, Tzr). +%% yeccpars2_75: see yeccpars2_38 -dialyzer({nowarn_function, yeccpars2_76/7}). -compile({nowarn_unused_function, yeccpars2_76/7}). -yeccpars2_76(S, '+', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 34, Ss, Stack, T, Ts, Tzr); -yeccpars2_76(S, '-', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 35, Ss, Stack, T, Ts, Tzr); yeccpars2_76(_S, Cat, Ss, Stack, T, Ts, Tzr) -> [_,_|Nss] = Ss, NewStack = yeccpars2_76_(Stack), - yeccgoto_comparison_expr(hd(Nss), Cat, Nss, NewStack, T, Ts, Tzr). + yeccgoto_multiplicative_expr(hd(Nss), Cat, Nss, NewStack, T, Ts, Tzr). -dialyzer({nowarn_function, yeccpars2_77/7}). -compile({nowarn_unused_function, yeccpars2_77/7}). -yeccpars2_77(S, '*', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 78, Ss, Stack, T, Ts, Tzr); -yeccpars2_77(S, '/', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 79, Ss, Stack, T, Ts, Tzr); yeccpars2_77(_S, Cat, Ss, Stack, T, Ts, Tzr) -> [_,_|Nss] = Ss, NewStack = yeccpars2_77_(Stack), - yeccgoto_additive_expr(hd(Nss), Cat, Nss, NewStack, T, Ts, Tzr). + yeccgoto_multiplicative_expr(hd(Nss), Cat, Nss, NewStack, T, Ts, Tzr). -%% yeccpars2_78: see yeccpars2_34 +-dialyzer({nowarn_function, yeccpars2_78/7}). +-compile({nowarn_unused_function, yeccpars2_78/7}). +yeccpars2_78(_S, Cat, Ss, Stack, T, Ts, Tzr) -> + [_,_|Nss] = Ss, + NewStack = yeccpars2_78_(Stack), + yeccgoto_multiplicative_expr(hd(Nss), Cat, Nss, NewStack, T, Ts, Tzr). -%% yeccpars2_79: see yeccpars2_34 +-dialyzer({nowarn_function, yeccpars2_79/7}). +-compile({nowarn_unused_function, yeccpars2_79/7}). +yeccpars2_79(S, '%', Ss, Stack, T, Ts, Tzr) -> + yeccpars1(S, 73, Ss, Stack, T, Ts, Tzr); +yeccpars2_79(S, '*', Ss, Stack, T, Ts, Tzr) -> + yeccpars1(S, 74, Ss, Stack, T, Ts, Tzr); +yeccpars2_79(S, '/', Ss, Stack, T, Ts, Tzr) -> + yeccpars1(S, 75, Ss, Stack, T, Ts, Tzr); +yeccpars2_79(_S, Cat, Ss, Stack, T, Ts, Tzr) -> + [_,_|Nss] = Ss, + NewStack = yeccpars2_79_(Stack), + yeccgoto_additive_expr(hd(Nss), Cat, Nss, NewStack, T, Ts, Tzr). -dialyzer({nowarn_function, yeccpars2_80/7}). -compile({nowarn_unused_function, yeccpars2_80/7}). -yeccpars2_80(_S, Cat, Ss, Stack, T, Ts, Tzr) -> - [_,_|Nss] = Ss, - NewStack = yeccpars2_80_(Stack), - yeccgoto_multiplicative_expr(hd(Nss), Cat, Nss, NewStack, T, Ts, Tzr). +yeccpars2_80(S, 'NOT', Ss, Stack, T, Ts, Tzr) -> + yeccpars1(S, 81, Ss, Stack, T, Ts, Tzr); +yeccpars2_80(S, 'NULL', Ss, Stack, T, Ts, Tzr) -> + yeccpars1(S, 82, Ss, Stack, T, Ts, Tzr); +yeccpars2_80(_, _, _, _, T, _, _) -> + yeccerror(T). -dialyzer({nowarn_function, yeccpars2_81/7}). -compile({nowarn_unused_function, yeccpars2_81/7}). -yeccpars2_81(_S, Cat, Ss, Stack, T, Ts, Tzr) -> - [_,_|Nss] = Ss, - NewStack = yeccpars2_81_(Stack), - yeccgoto_multiplicative_expr(hd(Nss), Cat, Nss, NewStack, T, Ts, Tzr). +yeccpars2_81(S, 'NULL', Ss, Stack, T, Ts, Tzr) -> + yeccpars1(S, 83, Ss, Stack, T, Ts, Tzr); +yeccpars2_81(_, _, _, _, T, _, _) -> + yeccerror(T). -dialyzer({nowarn_function, yeccpars2_82/7}). -compile({nowarn_unused_function, yeccpars2_82/7}). -yeccpars2_82(S, '*', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 78, Ss, Stack, T, Ts, Tzr); -yeccpars2_82(S, '/', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 79, Ss, Stack, T, Ts, Tzr); yeccpars2_82(_S, Cat, Ss, Stack, T, Ts, Tzr) -> [_,_|Nss] = Ss, NewStack = yeccpars2_82_(Stack), - yeccgoto_additive_expr(hd(Nss), Cat, Nss, NewStack, T, Ts, Tzr). + yeccgoto_is_null_expr(hd(Nss), Cat, Nss, NewStack, T, Ts, Tzr). -dialyzer({nowarn_function, yeccpars2_83/7}). -compile({nowarn_unused_function, yeccpars2_83/7}). -yeccpars2_83(S, 'NOT', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 84, Ss, Stack, T, Ts, Tzr); -yeccpars2_83(S, 'NULL', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 85, Ss, Stack, T, Ts, Tzr); -yeccpars2_83(_, _, _, _, T, _, _) -> - yeccerror(T). - --dialyzer({nowarn_function, yeccpars2_84/7}). --compile({nowarn_unused_function, yeccpars2_84/7}). -yeccpars2_84(S, 'NULL', Ss, Stack, T, Ts, Tzr) -> - yeccpars1(S, 86, Ss, Stack, T, Ts, Tzr); -yeccpars2_84(_, _, _, _, T, _, _) -> - yeccerror(T). - --dialyzer({nowarn_function, yeccpars2_85/7}). --compile({nowarn_unused_function, yeccpars2_85/7}). -yeccpars2_85(_S, Cat, Ss, Stack, T, Ts, Tzr) -> - [_,_|Nss] = Ss, - NewStack = yeccpars2_85_(Stack), - yeccgoto_is_null_expr(hd(Nss), Cat, Nss, NewStack, T, Ts, Tzr). - --dialyzer({nowarn_function, yeccpars2_86/7}). --compile({nowarn_unused_function, yeccpars2_86/7}). -yeccpars2_86(_S, Cat, Ss, Stack, T, Ts, Tzr) -> +yeccpars2_83(_S, Cat, Ss, Stack, T, Ts, Tzr) -> [_,_,_|Nss] = Ss, - NewStack = yeccpars2_86_(Stack), + NewStack = yeccpars2_83_(Stack), yeccgoto_is_null_expr(hd(Nss), Cat, Nss, NewStack, T, Ts, Tzr). -dialyzer({nowarn_function, yeccgoto_additive_expr/7}). @@ -997,63 +974,102 @@ yeccgoto_additive_expr(15, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_14(14, Cat, Ss, Stack, T, Ts, Tzr); yeccgoto_additive_expr(18, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_14(14, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_additive_expr(25, Cat, Ss, Stack, T, Ts, Tzr) -> +yeccgoto_additive_expr(29, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_14(14, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_additive_expr(26, Cat, Ss, Stack, T, Ts, Tzr) -> +yeccgoto_additive_expr(30, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_14(14, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_additive_expr(36, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_76(76, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_additive_expr(37, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_75(75, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_additive_expr(38, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_74(74, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_additive_expr(39, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_73(73, Cat, Ss, Stack, T, Ts, Tzr); yeccgoto_additive_expr(40, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_72(72, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_additive_expr(41, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_71(71, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_additive_expr(41, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_70(70, Cat, Ss, Stack, T, Ts, Tzr); yeccgoto_additive_expr(42, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_69(69, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_additive_expr(43, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_68(68, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_additive_expr(46, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_59(59, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_additive_expr(60, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_61(61, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_additive_expr(69, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_70(70, Cat, Ss, Stack, T, Ts, Tzr). - --dialyzer({nowarn_function, yeccgoto_between_expr/7}). --compile({nowarn_unused_function, yeccgoto_between_expr/7}). -yeccgoto_between_expr(0=_S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_13(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_between_expr(15=_S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_13(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_between_expr(18=_S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_13(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_between_expr(25=_S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_13(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_between_expr(26=_S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_13(_S, Cat, Ss, Stack, T, Ts, Tzr). +yeccgoto_additive_expr(44, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_67(67, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_additive_expr(45, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_66(66, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_additive_expr(54, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_56(56, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_additive_expr(57, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_56(56, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_additive_expr(63, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_56(56, Cat, Ss, Stack, T, Ts, Tzr). -dialyzer({nowarn_function, yeccgoto_comparison_expr/7}). -compile({nowarn_unused_function, yeccgoto_comparison_expr/7}). yeccgoto_comparison_expr(0=_S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_12(_S, Cat, Ss, Stack, T, Ts, Tzr); + yeccpars2_13(_S, Cat, Ss, Stack, T, Ts, Tzr); yeccgoto_comparison_expr(15=_S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_12(_S, Cat, Ss, Stack, T, Ts, Tzr); + yeccpars2_13(_S, Cat, Ss, Stack, T, Ts, Tzr); yeccgoto_comparison_expr(18=_S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_12(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_comparison_expr(25=_S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_12(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_comparison_expr(26=_S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_12(_S, Cat, Ss, Stack, T, Ts, Tzr). + yeccpars2_13(_S, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_comparison_expr(29=_S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_13(_S, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_comparison_expr(30=_S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_13(_S, Cat, Ss, Stack, T, Ts, Tzr). -dialyzer({nowarn_function, yeccgoto_conditional_expr/7}). -compile({nowarn_unused_function, yeccgoto_conditional_expr/7}). yeccgoto_conditional_expr(0=_S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_11(_S, Cat, Ss, Stack, T, Ts, Tzr); + yeccpars2_12(_S, Cat, Ss, Stack, T, Ts, Tzr); yeccgoto_conditional_expr(15, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_32(32, Cat, Ss, Stack, T, Ts, Tzr). + yeccpars2_36(36, Cat, Ss, Stack, T, Ts, Tzr). + +-dialyzer({nowarn_function, yeccgoto_expression_list/7}). +-compile({nowarn_unused_function, yeccgoto_expression_list/7}). +yeccgoto_expression_list(54, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_55(55, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_expression_list(57=_S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_58(_S, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_expression_list(63, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_64(64, Cat, Ss, Stack, T, Ts, Tzr). + +-dialyzer({nowarn_function, yeccgoto_function_call/7}). +-compile({nowarn_unused_function, yeccgoto_function_call/7}). +yeccgoto_function_call(0=_S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_11(_S, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_function_call(15=_S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_11(_S, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_function_call(16=_S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_11(_S, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_function_call(17=_S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_11(_S, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_function_call(18=_S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_11(_S, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_function_call(29=_S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_11(_S, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_function_call(30=_S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_11(_S, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_function_call(38=_S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_11(_S, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_function_call(39=_S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_11(_S, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_function_call(40=_S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_11(_S, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_function_call(41=_S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_11(_S, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_function_call(42=_S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_11(_S, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_function_call(43=_S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_11(_S, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_function_call(44=_S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_11(_S, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_function_call(45=_S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_11(_S, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_function_call(54=_S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_11(_S, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_function_call(57=_S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_11(_S, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_function_call(63=_S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_11(_S, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_function_call(73=_S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_11(_S, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_function_call(74=_S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_11(_S, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_function_call(75=_S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_11(_S, Cat, Ss, Stack, T, Ts, Tzr). -dialyzer({nowarn_function, yeccgoto_identifier_expr/7}). -compile({nowarn_unused_function, yeccgoto_identifier_expr/7}). @@ -1062,43 +1078,43 @@ yeccgoto_identifier_expr(0, Cat, Ss, Stack, T, Ts, Tzr) -> yeccgoto_identifier_expr(15, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_10(10, Cat, Ss, Stack, T, Ts, Tzr); yeccgoto_identifier_expr(16=_S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_30(_S, Cat, Ss, Stack, T, Ts, Tzr); + yeccpars2_34(_S, Cat, Ss, Stack, T, Ts, Tzr); yeccgoto_identifier_expr(17=_S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_30(_S, Cat, Ss, Stack, T, Ts, Tzr); + yeccpars2_34(_S, Cat, Ss, Stack, T, Ts, Tzr); yeccgoto_identifier_expr(18, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_10(10, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_identifier_expr(25, Cat, Ss, Stack, T, Ts, Tzr) -> +yeccgoto_identifier_expr(29, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_10(10, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_identifier_expr(26, Cat, Ss, Stack, T, Ts, Tzr) -> +yeccgoto_identifier_expr(30, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_10(10, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_identifier_expr(34=_S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_30(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_identifier_expr(35=_S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_30(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_identifier_expr(36=_S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_30(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_identifier_expr(37=_S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_30(_S, Cat, Ss, Stack, T, Ts, Tzr); yeccgoto_identifier_expr(38=_S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_30(_S, Cat, Ss, Stack, T, Ts, Tzr); + yeccpars2_34(_S, Cat, Ss, Stack, T, Ts, Tzr); yeccgoto_identifier_expr(39=_S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_30(_S, Cat, Ss, Stack, T, Ts, Tzr); + yeccpars2_34(_S, Cat, Ss, Stack, T, Ts, Tzr); yeccgoto_identifier_expr(40=_S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_30(_S, Cat, Ss, Stack, T, Ts, Tzr); + yeccpars2_34(_S, Cat, Ss, Stack, T, Ts, Tzr); yeccgoto_identifier_expr(41=_S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_30(_S, Cat, Ss, Stack, T, Ts, Tzr); + yeccpars2_34(_S, Cat, Ss, Stack, T, Ts, Tzr); yeccgoto_identifier_expr(42=_S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_30(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_identifier_expr(46=_S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_30(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_identifier_expr(60=_S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_30(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_identifier_expr(69=_S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_30(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_identifier_expr(78=_S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_30(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_identifier_expr(79=_S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_30(_S, Cat, Ss, Stack, T, Ts, Tzr). + yeccpars2_34(_S, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_identifier_expr(43=_S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_34(_S, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_identifier_expr(44=_S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_34(_S, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_identifier_expr(45=_S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_34(_S, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_identifier_expr(54=_S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_34(_S, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_identifier_expr(57=_S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_34(_S, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_identifier_expr(63=_S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_34(_S, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_identifier_expr(73=_S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_34(_S, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_identifier_expr(74=_S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_34(_S, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_identifier_expr(75=_S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_34(_S, Cat, Ss, Stack, T, Ts, Tzr). -dialyzer({nowarn_function, yeccgoto_in_expr/7}). -compile({nowarn_unused_function, yeccgoto_in_expr/7}). @@ -1108,9 +1124,9 @@ yeccgoto_in_expr(15=_S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_9(_S, Cat, Ss, Stack, T, Ts, Tzr); yeccgoto_in_expr(18=_S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_9(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_in_expr(25=_S, Cat, Ss, Stack, T, Ts, Tzr) -> +yeccgoto_in_expr(29=_S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_9(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_in_expr(26=_S, Cat, Ss, Stack, T, Ts, Tzr) -> +yeccgoto_in_expr(30=_S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_9(_S, Cat, Ss, Stack, T, Ts, Tzr). -dialyzer({nowarn_function, yeccgoto_is_null_expr/7}). @@ -1121,9 +1137,9 @@ yeccgoto_is_null_expr(15=_S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_8(_S, Cat, Ss, Stack, T, Ts, Tzr); yeccgoto_is_null_expr(18=_S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_8(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_is_null_expr(25=_S, Cat, Ss, Stack, T, Ts, Tzr) -> +yeccgoto_is_null_expr(29=_S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_8(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_is_null_expr(26=_S, Cat, Ss, Stack, T, Ts, Tzr) -> +yeccgoto_is_null_expr(30=_S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_8(_S, Cat, Ss, Stack, T, Ts, Tzr). -dialyzer({nowarn_function, yeccgoto_like_expr/7}). @@ -1134,9 +1150,9 @@ yeccgoto_like_expr(15=_S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_7(_S, Cat, Ss, Stack, T, Ts, Tzr); yeccgoto_like_expr(18=_S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_7(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_like_expr(25=_S, Cat, Ss, Stack, T, Ts, Tzr) -> +yeccgoto_like_expr(29=_S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_7(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_like_expr(26=_S, Cat, Ss, Stack, T, Ts, Tzr) -> +yeccgoto_like_expr(30=_S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_7(_S, Cat, Ss, Stack, T, Ts, Tzr). -dialyzer({nowarn_function, yeccgoto_literal/7}). @@ -1151,17 +1167,9 @@ yeccgoto_literal(17=_S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_6(_S, Cat, Ss, Stack, T, Ts, Tzr); yeccgoto_literal(18=_S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_6(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_literal(25=_S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_6(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_literal(26=_S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_6(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_literal(34=_S, Cat, Ss, Stack, T, Ts, Tzr) -> +yeccgoto_literal(29=_S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_6(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_literal(35=_S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_6(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_literal(36=_S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_6(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_literal(37=_S, Cat, Ss, Stack, T, Ts, Tzr) -> +yeccgoto_literal(30=_S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_6(_S, Cat, Ss, Stack, T, Ts, Tzr); yeccgoto_literal(38=_S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_6(_S, Cat, Ss, Stack, T, Ts, Tzr); @@ -1173,15 +1181,23 @@ yeccgoto_literal(41=_S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_6(_S, Cat, Ss, Stack, T, Ts, Tzr); yeccgoto_literal(42=_S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_6(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_literal(46=_S, Cat, Ss, Stack, T, Ts, Tzr) -> +yeccgoto_literal(43=_S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_6(_S, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_literal(44=_S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_6(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_literal(60=_S, Cat, Ss, Stack, T, Ts, Tzr) -> +yeccgoto_literal(45=_S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_6(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_literal(69=_S, Cat, Ss, Stack, T, Ts, Tzr) -> +yeccgoto_literal(54=_S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_6(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_literal(78=_S, Cat, Ss, Stack, T, Ts, Tzr) -> +yeccgoto_literal(57=_S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_6(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_literal(79=_S, Cat, Ss, Stack, T, Ts, Tzr) -> +yeccgoto_literal(63=_S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_6(_S, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_literal(73=_S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_6(_S, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_literal(74=_S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_6(_S, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_literal(75=_S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_6(_S, Cat, Ss, Stack, T, Ts, Tzr). -dialyzer({nowarn_function, yeccgoto_logical_expr/7}). @@ -1191,11 +1207,11 @@ yeccgoto_logical_expr(0, Cat, Ss, Stack, T, Ts, Tzr) -> yeccgoto_logical_expr(15, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_5(5, Cat, Ss, Stack, T, Ts, Tzr); yeccgoto_logical_expr(18=_S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_24(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_logical_expr(25=_S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_28(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_logical_expr(26, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_27(27, Cat, Ss, Stack, T, Ts, Tzr). +yeccgoto_logical_expr(29=_S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_32(_S, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_logical_expr(30, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_31(31, Cat, Ss, Stack, T, Ts, Tzr). -dialyzer({nowarn_function, yeccgoto_multiplicative_expr/7}). -compile({nowarn_unused_function, yeccgoto_multiplicative_expr/7}). @@ -1205,33 +1221,31 @@ yeccgoto_multiplicative_expr(15, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_4(4, Cat, Ss, Stack, T, Ts, Tzr); yeccgoto_multiplicative_expr(18, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_4(4, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_multiplicative_expr(25, Cat, Ss, Stack, T, Ts, Tzr) -> +yeccgoto_multiplicative_expr(29, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_4(4, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_multiplicative_expr(26, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_4(4, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_multiplicative_expr(34, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_82(82, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_multiplicative_expr(35, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_77(77, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_multiplicative_expr(36, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_4(4, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_multiplicative_expr(37, Cat, Ss, Stack, T, Ts, Tzr) -> +yeccgoto_multiplicative_expr(30, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_4(4, Cat, Ss, Stack, T, Ts, Tzr); yeccgoto_multiplicative_expr(38, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_4(4, Cat, Ss, Stack, T, Ts, Tzr); + yeccpars2_79(79, Cat, Ss, Stack, T, Ts, Tzr); yeccgoto_multiplicative_expr(39, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_4(4, Cat, Ss, Stack, T, Ts, Tzr); + yeccpars2_72(72, Cat, Ss, Stack, T, Ts, Tzr); yeccgoto_multiplicative_expr(40, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_4(4, Cat, Ss, Stack, T, Ts, Tzr); yeccgoto_multiplicative_expr(41, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_4(4, Cat, Ss, Stack, T, Ts, Tzr); yeccgoto_multiplicative_expr(42, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_4(4, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_multiplicative_expr(46, Cat, Ss, Stack, T, Ts, Tzr) -> +yeccgoto_multiplicative_expr(43, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_4(4, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_multiplicative_expr(44, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_4(4, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_multiplicative_expr(60, Cat, Ss, Stack, T, Ts, Tzr) -> +yeccgoto_multiplicative_expr(45, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_4(4, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_multiplicative_expr(69, Cat, Ss, Stack, T, Ts, Tzr) -> +yeccgoto_multiplicative_expr(54, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_4(4, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_multiplicative_expr(57, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_4(4, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_multiplicative_expr(63, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_4(4, Cat, Ss, Stack, T, Ts, Tzr). -dialyzer({nowarn_function, yeccgoto_primary/7}). @@ -1241,22 +1255,14 @@ yeccgoto_primary(0=_S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccgoto_primary(15=_S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_3(_S, Cat, Ss, Stack, T, Ts, Tzr); yeccgoto_primary(16=_S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_31(_S, Cat, Ss, Stack, T, Ts, Tzr); + yeccpars2_35(_S, Cat, Ss, Stack, T, Ts, Tzr); yeccgoto_primary(17=_S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_29(_S, Cat, Ss, Stack, T, Ts, Tzr); + yeccpars2_33(_S, Cat, Ss, Stack, T, Ts, Tzr); yeccgoto_primary(18=_S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_3(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_primary(25=_S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_3(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_primary(26=_S, Cat, Ss, Stack, T, Ts, Tzr) -> +yeccgoto_primary(29=_S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_3(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_primary(34=_S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_3(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_primary(35=_S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_3(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_primary(36=_S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_3(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_primary(37=_S, Cat, Ss, Stack, T, Ts, Tzr) -> +yeccgoto_primary(30=_S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_3(_S, Cat, Ss, Stack, T, Ts, Tzr); yeccgoto_primary(38=_S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_3(_S, Cat, Ss, Stack, T, Ts, Tzr); @@ -1268,15 +1274,23 @@ yeccgoto_primary(41=_S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_3(_S, Cat, Ss, Stack, T, Ts, Tzr); yeccgoto_primary(42=_S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_3(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_primary(46=_S, Cat, Ss, Stack, T, Ts, Tzr) -> +yeccgoto_primary(43=_S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_3(_S, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_primary(44=_S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_3(_S, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_primary(45=_S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_3(_S, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_primary(54=_S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_3(_S, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_primary(57=_S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_3(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_primary(60=_S, Cat, Ss, Stack, T, Ts, Tzr) -> +yeccgoto_primary(63=_S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_3(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_primary(69=_S, Cat, Ss, Stack, T, Ts, Tzr) -> +yeccgoto_primary(73=_S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_3(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_primary(78=_S, Cat, Ss, Stack, T, Ts, Tzr) -> +yeccgoto_primary(74=_S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_3(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_primary(79=_S, Cat, Ss, Stack, T, Ts, Tzr) -> +yeccgoto_primary(75=_S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_3(_S, Cat, Ss, Stack, T, Ts, Tzr). -dialyzer({nowarn_function, yeccgoto_selector/7}). @@ -1284,24 +1298,6 @@ yeccgoto_primary(79=_S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccgoto_selector(0, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_2(2, Cat, Ss, Stack, T, Ts, Tzr). --dialyzer({nowarn_function, yeccgoto_string_item/7}). --compile({nowarn_unused_function, yeccgoto_string_item/7}). -yeccgoto_string_item(52, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_54(54, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_string_item(56, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_54(54, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_string_item(65, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_54(54, Cat, Ss, Stack, T, Ts, Tzr). - --dialyzer({nowarn_function, yeccgoto_string_list/7}). --compile({nowarn_unused_function, yeccgoto_string_list/7}). -yeccgoto_string_list(52, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_53(53, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_string_list(56=_S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_57(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_string_list(65, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_66(66, Cat, Ss, Stack, T, Ts, Tzr). - -dialyzer({nowarn_function, yeccgoto_unary_expr/7}). -compile({nowarn_unused_function, yeccgoto_unary_expr/7}). yeccgoto_unary_expr(0=_S, Cat, Ss, Stack, T, Ts, Tzr) -> @@ -1310,17 +1306,9 @@ yeccgoto_unary_expr(15=_S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_1(_S, Cat, Ss, Stack, T, Ts, Tzr); yeccgoto_unary_expr(18=_S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_1(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_unary_expr(25=_S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_1(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_unary_expr(26=_S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_1(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_unary_expr(34=_S, Cat, Ss, Stack, T, Ts, Tzr) -> +yeccgoto_unary_expr(29=_S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_1(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_unary_expr(35=_S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_1(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_unary_expr(36=_S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_1(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_unary_expr(37=_S, Cat, Ss, Stack, T, Ts, Tzr) -> +yeccgoto_unary_expr(30=_S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_1(_S, Cat, Ss, Stack, T, Ts, Tzr); yeccgoto_unary_expr(38=_S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_1(_S, Cat, Ss, Stack, T, Ts, Tzr); @@ -1332,21 +1320,29 @@ yeccgoto_unary_expr(41=_S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_1(_S, Cat, Ss, Stack, T, Ts, Tzr); yeccgoto_unary_expr(42=_S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_1(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_unary_expr(46=_S, Cat, Ss, Stack, T, Ts, Tzr) -> +yeccgoto_unary_expr(43=_S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_1(_S, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_unary_expr(44=_S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_1(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_unary_expr(60=_S, Cat, Ss, Stack, T, Ts, Tzr) -> +yeccgoto_unary_expr(45=_S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_1(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_unary_expr(69=_S, Cat, Ss, Stack, T, Ts, Tzr) -> +yeccgoto_unary_expr(54=_S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_1(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_unary_expr(78=_S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_81(_S, Cat, Ss, Stack, T, Ts, Tzr); -yeccgoto_unary_expr(79=_S, Cat, Ss, Stack, T, Ts, Tzr) -> - yeccpars2_80(_S, Cat, Ss, Stack, T, Ts, Tzr). +yeccgoto_unary_expr(57=_S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_1(_S, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_unary_expr(63=_S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_1(_S, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_unary_expr(73=_S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_78(_S, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_unary_expr(74=_S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_77(_S, Cat, Ss, Stack, T, Ts, Tzr); +yeccgoto_unary_expr(75=_S, Cat, Ss, Stack, T, Ts, Tzr) -> + yeccpars2_76(_S, Cat, Ss, Stack, T, Ts, Tzr). -compile({inline,yeccpars2_1_/1}). -dialyzer({nowarn_function, yeccpars2_1_/1}). -compile({nowarn_unused_function, yeccpars2_1_/1}). --file("rabbit_jms_selector_parser.yrl", 96). +-file("rabbit_amqp_sql_parser.yrl", 91). yeccpars2_1_(__Stack0) -> [___1 | __Stack] = __Stack0, [begin @@ -1356,7 +1352,7 @@ yeccpars2_1_(__Stack0) -> -compile({inline,yeccpars2_3_/1}). -dialyzer({nowarn_function, yeccpars2_3_/1}). -compile({nowarn_unused_function, yeccpars2_3_/1}). --file("rabbit_jms_selector_parser.yrl", 101). +-file("rabbit_amqp_sql_parser.yrl", 96). yeccpars2_3_(__Stack0) -> [___1 | __Stack] = __Stack0, [begin @@ -1366,7 +1362,7 @@ yeccpars2_3_(__Stack0) -> -compile({inline,yeccpars2_4_/1}). -dialyzer({nowarn_function, yeccpars2_4_/1}). -compile({nowarn_unused_function, yeccpars2_4_/1}). --file("rabbit_jms_selector_parser.yrl", 92). +-file("rabbit_amqp_sql_parser.yrl", 86). yeccpars2_4_(__Stack0) -> [___1 | __Stack] = __Stack0, [begin @@ -1376,7 +1372,7 @@ yeccpars2_4_(__Stack0) -> -compile({inline,yeccpars2_5_/1}). -dialyzer({nowarn_function, yeccpars2_5_/1}). -compile({nowarn_unused_function, yeccpars2_5_/1}). --file("rabbit_jms_selector_parser.yrl", 43). +-file("rabbit_amqp_sql_parser.yrl", 43). yeccpars2_5_(__Stack0) -> [___1 | __Stack] = __Stack0, [begin @@ -1386,7 +1382,7 @@ yeccpars2_5_(__Stack0) -> -compile({inline,yeccpars2_6_/1}). -dialyzer({nowarn_function, yeccpars2_6_/1}). -compile({nowarn_unused_function, yeccpars2_6_/1}). --file("rabbit_jms_selector_parser.yrl", 105). +-file("rabbit_amqp_sql_parser.yrl", 100). yeccpars2_6_(__Stack0) -> [___1 | __Stack] = __Stack0, [begin @@ -1396,7 +1392,7 @@ yeccpars2_6_(__Stack0) -> -compile({inline,yeccpars2_7_/1}). -dialyzer({nowarn_function, yeccpars2_7_/1}). -compile({nowarn_unused_function, yeccpars2_7_/1}). --file("rabbit_jms_selector_parser.yrl", 59). +-file("rabbit_amqp_sql_parser.yrl", 58). yeccpars2_7_(__Stack0) -> [___1 | __Stack] = __Stack0, [begin @@ -1406,7 +1402,7 @@ yeccpars2_7_(__Stack0) -> -compile({inline,yeccpars2_8_/1}). -dialyzer({nowarn_function, yeccpars2_8_/1}). -compile({nowarn_unused_function, yeccpars2_8_/1}). --file("rabbit_jms_selector_parser.yrl", 61). +-file("rabbit_amqp_sql_parser.yrl", 60). yeccpars2_8_(__Stack0) -> [___1 | __Stack] = __Stack0, [begin @@ -1416,7 +1412,7 @@ yeccpars2_8_(__Stack0) -> -compile({inline,yeccpars2_9_/1}). -dialyzer({nowarn_function, yeccpars2_9_/1}). -compile({nowarn_unused_function, yeccpars2_9_/1}). --file("rabbit_jms_selector_parser.yrl", 60). +-file("rabbit_amqp_sql_parser.yrl", 59). yeccpars2_9_(__Stack0) -> [___1 | __Stack] = __Stack0, [begin @@ -1426,7 +1422,7 @@ yeccpars2_9_(__Stack0) -> -compile({inline,yeccpars2_10_/1}). -dialyzer({nowarn_function, yeccpars2_10_/1}). -compile({nowarn_unused_function, yeccpars2_10_/1}). --file("rabbit_jms_selector_parser.yrl", 106). +-file("rabbit_amqp_sql_parser.yrl", 101). yeccpars2_10_(__Stack0) -> [___1 | __Stack] = __Stack0, [begin @@ -1436,27 +1432,27 @@ yeccpars2_10_(__Stack0) -> -compile({inline,yeccpars2_11_/1}). -dialyzer({nowarn_function, yeccpars2_11_/1}). -compile({nowarn_unused_function, yeccpars2_11_/1}). --file("rabbit_jms_selector_parser.yrl", 40). +-file("rabbit_amqp_sql_parser.yrl", 102). yeccpars2_11_(__Stack0) -> [___1 | __Stack] = __Stack0, [begin - ___1 + ___1 end | __Stack]. -compile({inline,yeccpars2_12_/1}). -dialyzer({nowarn_function, yeccpars2_12_/1}). -compile({nowarn_unused_function, yeccpars2_12_/1}). --file("rabbit_jms_selector_parser.yrl", 49). +-file("rabbit_amqp_sql_parser.yrl", 40). yeccpars2_12_(__Stack0) -> [___1 | __Stack] = __Stack0, [begin - ___1 + ___1 end | __Stack]. -compile({inline,yeccpars2_13_/1}). -dialyzer({nowarn_function, yeccpars2_13_/1}). -compile({nowarn_unused_function, yeccpars2_13_/1}). --file("rabbit_jms_selector_parser.yrl", 58). +-file("rabbit_amqp_sql_parser.yrl", 49). yeccpars2_13_(__Stack0) -> [___1 | __Stack] = __Stack0, [begin @@ -1466,367 +1462,367 @@ yeccpars2_13_(__Stack0) -> -compile({inline,yeccpars2_14_/1}). -dialyzer({nowarn_function, yeccpars2_14_/1}). -compile({nowarn_unused_function, yeccpars2_14_/1}). --file("rabbit_jms_selector_parser.yrl", 62). +-file("rabbit_amqp_sql_parser.yrl", 61). yeccpars2_14_(__Stack0) -> [___1 | __Stack] = __Stack0, [begin ___1 end | __Stack]. --compile({inline,yeccpars2_19_/1}). --dialyzer({nowarn_function, yeccpars2_19_/1}). --compile({nowarn_unused_function, yeccpars2_19_/1}). --file("rabbit_jms_selector_parser.yrl", 116). -yeccpars2_19_(__Stack0) -> - [___1 | __Stack] = __Stack0, - [begin - {boolean, extract_value(___1)} - end | __Stack]. - -compile({inline,yeccpars2_20_/1}). -dialyzer({nowarn_function, yeccpars2_20_/1}). -compile({nowarn_unused_function, yeccpars2_20_/1}). --file("rabbit_jms_selector_parser.yrl", 114). +-file("rabbit_amqp_sql_parser.yrl", 115). yeccpars2_20_(__Stack0) -> [___1 | __Stack] = __Stack0, [begin - {float, extract_value(___1)} + {binary, extract_value(___1)} end | __Stack]. -compile({inline,yeccpars2_21_/1}). -dialyzer({nowarn_function, yeccpars2_21_/1}). -compile({nowarn_unused_function, yeccpars2_21_/1}). --file("rabbit_jms_selector_parser.yrl", 109). +-file("rabbit_amqp_sql_parser.yrl", 116). yeccpars2_21_(__Stack0) -> [___1 | __Stack] = __Stack0, [begin - - {identifier, extract_value(___1)} + {boolean, extract_value(___1)} end | __Stack]. -compile({inline,yeccpars2_22_/1}). -dialyzer({nowarn_function, yeccpars2_22_/1}). -compile({nowarn_unused_function, yeccpars2_22_/1}). --file("rabbit_jms_selector_parser.yrl", 113). +-file("rabbit_amqp_sql_parser.yrl", 113). yeccpars2_22_(__Stack0) -> [___1 | __Stack] = __Stack0, [begin - {integer, extract_value(___1)} + {float, extract_value(___1)} end | __Stack]. -compile({inline,yeccpars2_23_/1}). -dialyzer({nowarn_function, yeccpars2_23_/1}). -compile({nowarn_unused_function, yeccpars2_23_/1}). --file("rabbit_jms_selector_parser.yrl", 115). +-file("rabbit_amqp_sql_parser.yrl", 108). yeccpars2_23_(__Stack0) -> [___1 | __Stack] = __Stack0, [begin - {string, extract_value(___1)} + + {identifier, extract_value(___1)} end | __Stack]. -compile({inline,yeccpars2_24_/1}). -dialyzer({nowarn_function, yeccpars2_24_/1}). -compile({nowarn_unused_function, yeccpars2_24_/1}). --file("rabbit_jms_selector_parser.yrl", 48). +-file("rabbit_amqp_sql_parser.yrl", 112). yeccpars2_24_(__Stack0) -> - [___2,___1 | __Stack] = __Stack0, + [___1 | __Stack] = __Stack0, [begin - {'not', ___2} + {integer, extract_value(___1)} + end | __Stack]. + +-compile({inline,yeccpars2_25_/1}). +-dialyzer({nowarn_function, yeccpars2_25_/1}). +-compile({nowarn_unused_function, yeccpars2_25_/1}). +-file("rabbit_amqp_sql_parser.yrl", 114). +yeccpars2_25_(__Stack0) -> + [___1 | __Stack] = __Stack0, + [begin + {string, extract_value(___1)} end | __Stack]. -compile({inline,yeccpars2_27_/1}). -dialyzer({nowarn_function, yeccpars2_27_/1}). -compile({nowarn_unused_function, yeccpars2_27_/1}). --file("rabbit_jms_selector_parser.yrl", 47). +-file("rabbit_amqp_sql_parser.yrl", 105). yeccpars2_27_(__Stack0) -> [___3,___2,___1 | __Stack] = __Stack0, [begin - {'or', ___1, ___3} + {function, 'UTC', []} end | __Stack]. -compile({inline,yeccpars2_28_/1}). -dialyzer({nowarn_function, yeccpars2_28_/1}). -compile({nowarn_unused_function, yeccpars2_28_/1}). --file("rabbit_jms_selector_parser.yrl", 46). +-file("rabbit_amqp_sql_parser.yrl", 48). yeccpars2_28_(__Stack0) -> + [___2,___1 | __Stack] = __Stack0, + [begin + {'not', ___2} + end | __Stack]. + +-compile({inline,yeccpars2_31_/1}). +-dialyzer({nowarn_function, yeccpars2_31_/1}). +-compile({nowarn_unused_function, yeccpars2_31_/1}). +-file("rabbit_amqp_sql_parser.yrl", 47). +yeccpars2_31_(__Stack0) -> + [___3,___2,___1 | __Stack] = __Stack0, + [begin + {'or', ___1, ___3} + end | __Stack]. + +-compile({inline,yeccpars2_32_/1}). +-dialyzer({nowarn_function, yeccpars2_32_/1}). +-compile({nowarn_unused_function, yeccpars2_32_/1}). +-file("rabbit_amqp_sql_parser.yrl", 46). +yeccpars2_32_(__Stack0) -> [___3,___2,___1 | __Stack] = __Stack0, [begin {'and', ___1, ___3} end | __Stack]. --compile({inline,yeccpars2_29_/1}). --dialyzer({nowarn_function, yeccpars2_29_/1}). --compile({nowarn_unused_function, yeccpars2_29_/1}). --file("rabbit_jms_selector_parser.yrl", 100). -yeccpars2_29_(__Stack0) -> +-compile({inline,yeccpars2_33_/1}). +-dialyzer({nowarn_function, yeccpars2_33_/1}). +-compile({nowarn_unused_function, yeccpars2_33_/1}). +-file("rabbit_amqp_sql_parser.yrl", 95). +yeccpars2_33_(__Stack0) -> [___2,___1 | __Stack] = __Stack0, [begin {unary_minus, ___2} end | __Stack]. --compile({inline,yeccpars2_30_/1}). --dialyzer({nowarn_function, yeccpars2_30_/1}). --compile({nowarn_unused_function, yeccpars2_30_/1}). --file("rabbit_jms_selector_parser.yrl", 106). -yeccpars2_30_(__Stack0) -> +-compile({inline,yeccpars2_34_/1}). +-dialyzer({nowarn_function, yeccpars2_34_/1}). +-compile({nowarn_unused_function, yeccpars2_34_/1}). +-file("rabbit_amqp_sql_parser.yrl", 101). +yeccpars2_34_(__Stack0) -> [___1 | __Stack] = __Stack0, [begin ___1 end | __Stack]. --compile({inline,yeccpars2_31_/1}). --dialyzer({nowarn_function, yeccpars2_31_/1}). --compile({nowarn_unused_function, yeccpars2_31_/1}). --file("rabbit_jms_selector_parser.yrl", 99). -yeccpars2_31_(__Stack0) -> +-compile({inline,yeccpars2_35_/1}). +-dialyzer({nowarn_function, yeccpars2_35_/1}). +-compile({nowarn_unused_function, yeccpars2_35_/1}). +-file("rabbit_amqp_sql_parser.yrl", 94). +yeccpars2_35_(__Stack0) -> [___2,___1 | __Stack] = __Stack0, [begin {unary_plus, ___2} end | __Stack]. --compile({inline,yeccpars2_33_/1}). --dialyzer({nowarn_function, yeccpars2_33_/1}). --compile({nowarn_unused_function, yeccpars2_33_/1}). --file("rabbit_jms_selector_parser.yrl", 104). -yeccpars2_33_(__Stack0) -> +-compile({inline,yeccpars2_37_/1}). +-dialyzer({nowarn_function, yeccpars2_37_/1}). +-compile({nowarn_unused_function, yeccpars2_37_/1}). +-file("rabbit_amqp_sql_parser.yrl", 99). +yeccpars2_37_(__Stack0) -> [___3,___2,___1 | __Stack] = __Stack0, [begin ___2 end | __Stack]. --compile({inline,yeccpars2_49_/1}). --dialyzer({nowarn_function, yeccpars2_49_/1}). --compile({nowarn_unused_function, yeccpars2_49_/1}). --file("rabbit_jms_selector_parser.yrl", 73). -yeccpars2_49_(__Stack0) -> +-compile({inline,yeccpars2_51_/1}). +-dialyzer({nowarn_function, yeccpars2_51_/1}). +-compile({nowarn_unused_function, yeccpars2_51_/1}). +-file("rabbit_amqp_sql_parser.yrl", 68). +yeccpars2_51_(__Stack0) -> [___4,___3,___2,___1 | __Stack] = __Stack0, [begin {'not', {'like', ___1, process_like_pattern(___4), no_escape}} end | __Stack]. --compile({inline,yeccpars2_51_/1}). --dialyzer({nowarn_function, yeccpars2_51_/1}). --compile({nowarn_unused_function, yeccpars2_51_/1}). --file("rabbit_jms_selector_parser.yrl", 75). -yeccpars2_51_(__Stack0) -> +-compile({inline,yeccpars2_53_/1}). +-dialyzer({nowarn_function, yeccpars2_53_/1}). +-compile({nowarn_unused_function, yeccpars2_53_/1}). +-file("rabbit_amqp_sql_parser.yrl", 70). +yeccpars2_53_(__Stack0) -> [___6,___5,___4,___3,___2,___1 | __Stack] = __Stack0, [begin {'not', {'like', ___1, process_like_pattern(___4), process_escape_char(___6)}} end | __Stack]. --compile({inline,yeccpars2_54_/1}). --dialyzer({nowarn_function, yeccpars2_54_/1}). --compile({nowarn_unused_function, yeccpars2_54_/1}). --file("rabbit_jms_selector_parser.yrl", 81). -yeccpars2_54_(__Stack0) -> +-compile({inline,yeccpars2_56_/1}). +-dialyzer({nowarn_function, yeccpars2_56_/1}). +-compile({nowarn_unused_function, yeccpars2_56_/1}). +-file("rabbit_amqp_sql_parser.yrl", 76). +yeccpars2_56_(__Stack0) -> [___1 | __Stack] = __Stack0, [begin - [___1] - end | __Stack]. - --compile({inline,yeccpars2_55_/1}). --dialyzer({nowarn_function, yeccpars2_55_/1}). --compile({nowarn_unused_function, yeccpars2_55_/1}). --file("rabbit_jms_selector_parser.yrl", 83). -yeccpars2_55_(__Stack0) -> - [___1 | __Stack] = __Stack0, - [begin - extract_value(___1) - end | __Stack]. - --compile({inline,yeccpars2_57_/1}). --dialyzer({nowarn_function, yeccpars2_57_/1}). --compile({nowarn_unused_function, yeccpars2_57_/1}). --file("rabbit_jms_selector_parser.yrl", 82). -yeccpars2_57_(__Stack0) -> - [___3,___2,___1 | __Stack] = __Stack0, - [begin - [___1|___3] + [___1] end | __Stack]. -compile({inline,yeccpars2_58_/1}). -dialyzer({nowarn_function, yeccpars2_58_/1}). -compile({nowarn_unused_function, yeccpars2_58_/1}). --file("rabbit_jms_selector_parser.yrl", 80). +-file("rabbit_amqp_sql_parser.yrl", 77). yeccpars2_58_(__Stack0) -> - [___6,___5,___4,___3,___2,___1 | __Stack] = __Stack0, + [___3,___2,___1 | __Stack] = __Stack0, [begin - {'not', {'in', ___1, lists:uniq(___5)}} + [___1|___3] end | __Stack]. --compile({inline,yeccpars2_61_/1}). --dialyzer({nowarn_function, yeccpars2_61_/1}). --compile({nowarn_unused_function, yeccpars2_61_/1}). --file("rabbit_jms_selector_parser.yrl", 66). -yeccpars2_61_(__Stack0) -> +-compile({inline,yeccpars2_59_/1}). +-dialyzer({nowarn_function, yeccpars2_59_/1}). +-compile({nowarn_unused_function, yeccpars2_59_/1}). +-file("rabbit_amqp_sql_parser.yrl", 75). +yeccpars2_59_(__Stack0) -> [___6,___5,___4,___3,___2,___1 | __Stack] = __Stack0, [begin - {'not', {'between', ___1, ___4, ___6}} + {'not', {'in', ___1, ___5}} end | __Stack]. --compile({inline,yeccpars2_62_/1}). --dialyzer({nowarn_function, yeccpars2_62_/1}). --compile({nowarn_unused_function, yeccpars2_62_/1}). --file("rabbit_jms_selector_parser.yrl", 69). -yeccpars2_62_(__Stack0) -> +-compile({inline,yeccpars2_60_/1}). +-dialyzer({nowarn_function, yeccpars2_60_/1}). +-compile({nowarn_unused_function, yeccpars2_60_/1}). +-file("rabbit_amqp_sql_parser.yrl", 64). +yeccpars2_60_(__Stack0) -> [___3,___2,___1 | __Stack] = __Stack0, [begin {'like', ___1, process_like_pattern(___3), no_escape} end | __Stack]. --compile({inline,yeccpars2_64_/1}). --dialyzer({nowarn_function, yeccpars2_64_/1}). --compile({nowarn_unused_function, yeccpars2_64_/1}). --file("rabbit_jms_selector_parser.yrl", 71). -yeccpars2_64_(__Stack0) -> +-compile({inline,yeccpars2_62_/1}). +-dialyzer({nowarn_function, yeccpars2_62_/1}). +-compile({nowarn_unused_function, yeccpars2_62_/1}). +-file("rabbit_amqp_sql_parser.yrl", 66). +yeccpars2_62_(__Stack0) -> [___5,___4,___3,___2,___1 | __Stack] = __Stack0, [begin {'like', ___1, process_like_pattern(___3), process_escape_char(___5)} end | __Stack]. +-compile({inline,yeccpars2_65_/1}). +-dialyzer({nowarn_function, yeccpars2_65_/1}). +-compile({nowarn_unused_function, yeccpars2_65_/1}). +-file("rabbit_amqp_sql_parser.yrl", 74). +yeccpars2_65_(__Stack0) -> + [___5,___4,___3,___2,___1 | __Stack] = __Stack0, + [begin + {'in', ___1, ___4} + end | __Stack]. + +-compile({inline,yeccpars2_66_/1}). +-dialyzer({nowarn_function, yeccpars2_66_/1}). +-compile({nowarn_unused_function, yeccpars2_66_/1}). +-file("rabbit_amqp_sql_parser.yrl", 56). +yeccpars2_66_(__Stack0) -> + [___3,___2,___1 | __Stack] = __Stack0, + [begin + {'>=', ___1, ___3} + end | __Stack]. + -compile({inline,yeccpars2_67_/1}). -dialyzer({nowarn_function, yeccpars2_67_/1}). -compile({nowarn_unused_function, yeccpars2_67_/1}). --file("rabbit_jms_selector_parser.yrl", 79). +-file("rabbit_amqp_sql_parser.yrl", 54). yeccpars2_67_(__Stack0) -> - [___5,___4,___3,___2,___1 | __Stack] = __Stack0, + [___3,___2,___1 | __Stack] = __Stack0, [begin - {'in', ___1, lists:uniq(___4)} + {'>', ___1, ___3} + end | __Stack]. + +-compile({inline,yeccpars2_68_/1}). +-dialyzer({nowarn_function, yeccpars2_68_/1}). +-compile({nowarn_unused_function, yeccpars2_68_/1}). +-file("rabbit_amqp_sql_parser.yrl", 52). +yeccpars2_68_(__Stack0) -> + [___3,___2,___1 | __Stack] = __Stack0, + [begin + {'=', ___1, ___3} + end | __Stack]. + +-compile({inline,yeccpars2_69_/1}). +-dialyzer({nowarn_function, yeccpars2_69_/1}). +-compile({nowarn_unused_function, yeccpars2_69_/1}). +-file("rabbit_amqp_sql_parser.yrl", 53). +yeccpars2_69_(__Stack0) -> + [___3,___2,___1 | __Stack] = __Stack0, + [begin + {'<>', ___1, ___3} end | __Stack]. -compile({inline,yeccpars2_70_/1}). -dialyzer({nowarn_function, yeccpars2_70_/1}). -compile({nowarn_unused_function, yeccpars2_70_/1}). --file("rabbit_jms_selector_parser.yrl", 65). +-file("rabbit_amqp_sql_parser.yrl", 57). yeccpars2_70_(__Stack0) -> - [___5,___4,___3,___2,___1 | __Stack] = __Stack0, + [___3,___2,___1 | __Stack] = __Stack0, [begin - {'between', ___1, ___3, ___5} + {'<=', ___1, ___3} end | __Stack]. -compile({inline,yeccpars2_71_/1}). -dialyzer({nowarn_function, yeccpars2_71_/1}). -compile({nowarn_unused_function, yeccpars2_71_/1}). --file("rabbit_jms_selector_parser.yrl", 56). +-file("rabbit_amqp_sql_parser.yrl", 55). yeccpars2_71_(__Stack0) -> [___3,___2,___1 | __Stack] = __Stack0, [begin - {'>=', ___1, ___3} + {'<', ___1, ___3} end | __Stack]. -compile({inline,yeccpars2_72_/1}). -dialyzer({nowarn_function, yeccpars2_72_/1}). -compile({nowarn_unused_function, yeccpars2_72_/1}). --file("rabbit_jms_selector_parser.yrl", 54). +-file("rabbit_amqp_sql_parser.yrl", 85). yeccpars2_72_(__Stack0) -> [___3,___2,___1 | __Stack] = __Stack0, [begin - {'>', ___1, ___3} - end | __Stack]. - --compile({inline,yeccpars2_73_/1}). --dialyzer({nowarn_function, yeccpars2_73_/1}). --compile({nowarn_unused_function, yeccpars2_73_/1}). --file("rabbit_jms_selector_parser.yrl", 52). -yeccpars2_73_(__Stack0) -> - [___3,___2,___1 | __Stack] = __Stack0, - [begin - {'=', ___1, ___3} - end | __Stack]. - --compile({inline,yeccpars2_74_/1}). --dialyzer({nowarn_function, yeccpars2_74_/1}). --compile({nowarn_unused_function, yeccpars2_74_/1}). --file("rabbit_jms_selector_parser.yrl", 53). -yeccpars2_74_(__Stack0) -> - [___3,___2,___1 | __Stack] = __Stack0, - [begin - {'<>', ___1, ___3} - end | __Stack]. - --compile({inline,yeccpars2_75_/1}). --dialyzer({nowarn_function, yeccpars2_75_/1}). --compile({nowarn_unused_function, yeccpars2_75_/1}). --file("rabbit_jms_selector_parser.yrl", 57). -yeccpars2_75_(__Stack0) -> - [___3,___2,___1 | __Stack] = __Stack0, - [begin - {'<=', ___1, ___3} + {'-', ___1, ___3} end | __Stack]. -compile({inline,yeccpars2_76_/1}). -dialyzer({nowarn_function, yeccpars2_76_/1}). -compile({nowarn_unused_function, yeccpars2_76_/1}). --file("rabbit_jms_selector_parser.yrl", 55). +-file("rabbit_amqp_sql_parser.yrl", 89). yeccpars2_76_(__Stack0) -> [___3,___2,___1 | __Stack] = __Stack0, [begin - {'<', ___1, ___3} + {'/', ___1, ___3} end | __Stack]. -compile({inline,yeccpars2_77_/1}). -dialyzer({nowarn_function, yeccpars2_77_/1}). -compile({nowarn_unused_function, yeccpars2_77_/1}). --file("rabbit_jms_selector_parser.yrl", 91). +-file("rabbit_amqp_sql_parser.yrl", 88). yeccpars2_77_(__Stack0) -> [___3,___2,___1 | __Stack] = __Stack0, [begin - {'-', ___1, ___3} + {'*', ___1, ___3} end | __Stack]. --compile({inline,yeccpars2_80_/1}). --dialyzer({nowarn_function, yeccpars2_80_/1}). --compile({nowarn_unused_function, yeccpars2_80_/1}). --file("rabbit_jms_selector_parser.yrl", 95). -yeccpars2_80_(__Stack0) -> +-compile({inline,yeccpars2_78_/1}). +-dialyzer({nowarn_function, yeccpars2_78_/1}). +-compile({nowarn_unused_function, yeccpars2_78_/1}). +-file("rabbit_amqp_sql_parser.yrl", 90). +yeccpars2_78_(__Stack0) -> [___3,___2,___1 | __Stack] = __Stack0, [begin - {'/', ___1, ___3} + {'%', ___1, ___3} end | __Stack]. --compile({inline,yeccpars2_81_/1}). --dialyzer({nowarn_function, yeccpars2_81_/1}). --compile({nowarn_unused_function, yeccpars2_81_/1}). --file("rabbit_jms_selector_parser.yrl", 94). -yeccpars2_81_(__Stack0) -> +-compile({inline,yeccpars2_79_/1}). +-dialyzer({nowarn_function, yeccpars2_79_/1}). +-compile({nowarn_unused_function, yeccpars2_79_/1}). +-file("rabbit_amqp_sql_parser.yrl", 84). +yeccpars2_79_(__Stack0) -> [___3,___2,___1 | __Stack] = __Stack0, [begin - {'*', ___1, ___3} + {'+', ___1, ___3} end | __Stack]. -compile({inline,yeccpars2_82_/1}). -dialyzer({nowarn_function, yeccpars2_82_/1}). -compile({nowarn_unused_function, yeccpars2_82_/1}). --file("rabbit_jms_selector_parser.yrl", 90). +-file("rabbit_amqp_sql_parser.yrl", 80). yeccpars2_82_(__Stack0) -> - [___3,___2,___1 | __Stack] = __Stack0, - [begin - {'+', ___1, ___3} - end | __Stack]. - --compile({inline,yeccpars2_85_/1}). --dialyzer({nowarn_function, yeccpars2_85_/1}). --compile({nowarn_unused_function, yeccpars2_85_/1}). --file("rabbit_jms_selector_parser.yrl", 86). -yeccpars2_85_(__Stack0) -> [___3,___2,___1 | __Stack] = __Stack0, [begin {'is_null', ___1} end | __Stack]. --compile({inline,yeccpars2_86_/1}). --dialyzer({nowarn_function, yeccpars2_86_/1}). --compile({nowarn_unused_function, yeccpars2_86_/1}). --file("rabbit_jms_selector_parser.yrl", 87). -yeccpars2_86_(__Stack0) -> +-compile({inline,yeccpars2_83_/1}). +-dialyzer({nowarn_function, yeccpars2_83_/1}). +-compile({nowarn_unused_function, yeccpars2_83_/1}). +-file("rabbit_amqp_sql_parser.yrl", 81). +yeccpars2_83_(__Stack0) -> [___4,___3,___2,___1 | __Stack] = __Stack0, [begin {'not', {'is_null', ___1}} end | __Stack]. --file("rabbit_jms_selector_parser.yrl", 141). +-file("rabbit_amqp_sql_parser.yrl", 141). diff --git a/deps/rabbit/src/rabbit_jms_selector_parser.yrl b/deps/rabbit/src/rabbit_amqp_sql_parser.yrl similarity index 77% rename from deps/rabbit/src/rabbit_jms_selector_parser.yrl rename to deps/rabbit/src/rabbit_amqp_sql_parser.yrl index a6ea47be2d2..9885731f7c3 100644 --- a/deps/rabbit/src/rabbit_jms_selector_parser.yrl +++ b/deps/rabbit/src/rabbit_amqp_sql_parser.yrl @@ -1,8 +1,8 @@ -%%% This is the grammar file for JMS message selectors: -%%% https://jakarta.ee/specifications/messaging/3.1/jakarta-messaging-spec-3.1#message-selector +%%% This is the grammar file for SQL Filter Expressions: +%%% https://docs.oasis-open.org/amqp/filtex/v1.0/csd01/filtex-v1.0-csd01.html#_Toc67929276 %%% -%%% To manually generate the parser file rabbit_jms_selector_parser.erl run: -%%% yecc:file("rabbit_jms_selector_parser.yrl", [deterministic]). +%%% To manually generate the parser file rabbit_amqp_sql_parser.erl run: +%%% yecc:file("rabbit_amqp_sql_parser.yrl", [deterministic]). Nonterminals selector @@ -15,19 +15,19 @@ Nonterminals primary literal identifier_expr - string_list - string_item - between_expr + expression_list in_expr like_expr - is_null_expr. + is_null_expr + function_call. Terminals - integer float boolean string identifier + integer float boolean string binary identifier '=' '<>' '>' '<' '>=' '<=' - '+' '-' '*' '/' + '+' '-' '*' '/' '%' 'AND' 'OR' 'NOT' - 'BETWEEN' 'LIKE' 'IN' 'IS' 'NULL' 'ESCAPE' + 'LIKE' 'IN' 'IS' 'NULL' 'ESCAPE' + 'UTC' '(' ')' ','. Rootsymbol selector. @@ -37,7 +37,7 @@ Left 100 'OR'. Left 200 'AND'. Nonassoc 300 '=' '<>' '>' '<' '>=' '<='. Left 400 '+' '-'. -Left 500 '*' '/'. +Left 500 '*' '/' '%'. Unary 600 'NOT'. %% "A selector is a conditional expression" @@ -59,16 +59,11 @@ comparison_expr -> additive_expr '>' additive_expr : {'>', '$1', '$3'}. comparison_expr -> additive_expr '<' additive_expr : {'<', '$1', '$3'}. comparison_expr -> additive_expr '>=' additive_expr : {'>=', '$1', '$3'}. comparison_expr -> additive_expr '<=' additive_expr : {'<=', '$1', '$3'}. -comparison_expr -> between_expr : '$1'. comparison_expr -> like_expr : '$1'. comparison_expr -> in_expr : '$1'. comparison_expr -> is_null_expr : '$1'. comparison_expr -> additive_expr : '$1'. -%% BETWEEN expression -between_expr -> additive_expr 'BETWEEN' additive_expr 'AND' additive_expr : {'between', '$1', '$3', '$5'}. -between_expr -> additive_expr 'NOT' 'BETWEEN' additive_expr 'AND' additive_expr : {'not', {'between', '$1', '$4', '$6'}}. - %% LIKE expression like_expr -> additive_expr 'LIKE' string : {'like', '$1', process_like_pattern('$3'), no_escape}. @@ -80,11 +75,10 @@ like_expr -> additive_expr 'NOT' 'LIKE' string 'ESCAPE' string : {'not', {'like', '$1', process_like_pattern('$4'), process_escape_char('$6')}}. %% IN expression -in_expr -> additive_expr 'IN' '(' string_list ')' : {'in', '$1', lists:uniq('$4')}. -in_expr -> additive_expr 'NOT' 'IN' '(' string_list ')' : {'not', {'in', '$1', lists:uniq('$5')}}. -string_list -> string_item : ['$1']. -string_list -> string_item ',' string_list : ['$1'|'$3']. -string_item -> string : extract_value('$1'). +in_expr -> additive_expr 'IN' '(' expression_list ')' : {'in', '$1', '$4'}. +in_expr -> additive_expr 'NOT' 'IN' '(' expression_list ')' : {'not', {'in', '$1', '$5'}}. +expression_list -> additive_expr : ['$1']. +expression_list -> additive_expr ',' expression_list : ['$1'|'$3']. %% IS NULL expression is_null_expr -> identifier_expr 'IS' 'NULL' : {'is_null', '$1'}. @@ -97,6 +91,7 @@ additive_expr -> multiplicative_expr : '$1'. multiplicative_expr -> multiplicative_expr '*' unary_expr : {'*', '$1', '$3'}. multiplicative_expr -> multiplicative_expr '/' unary_expr : {'/', '$1', '$3'}. +multiplicative_expr -> multiplicative_expr '%' unary_expr : {'%', '$1', '$3'}. multiplicative_expr -> unary_expr : '$1'. %% Handle unary operators through grammar structure instead of precedence @@ -108,6 +103,10 @@ unary_expr -> primary : '$1'. primary -> '(' conditional_expr ')' : '$2'. primary -> literal : '$1'. primary -> identifier_expr : '$1'. +primary -> function_call : '$1'. + +%% Function calls +function_call -> 'UTC' '(' ')' : {function, 'UTC', []}. %% Identifiers (header fields or property references) identifier_expr -> identifier : @@ -117,6 +116,7 @@ identifier_expr -> identifier : literal -> integer : {integer, extract_value('$1')}. literal -> float : {float, extract_value('$1')}. literal -> string : {string, extract_value('$1')}. +literal -> binary : {binary, extract_value('$1')}. literal -> boolean : {boolean, extract_value('$1')}. Erlang code. diff --git a/deps/rabbit/src/rabbit_amqp_util.erl b/deps/rabbit/src/rabbit_amqp_util.erl index 609739bea28..e61f05d78b3 100644 --- a/deps/rabbit/src/rabbit_amqp_util.erl +++ b/deps/rabbit/src/rabbit_amqp_util.erl @@ -20,26 +20,41 @@ -type field_name() :: header_field_name() | properties_field_name(). -export_type([field_name/0]). --spec section_field_name_to_atom(binary()) -> field_name() | binary(). -section_field_name_to_atom(<<"header.priority">>) -> priority; -%% ttl, first-acquirer, and delivery-count are unsupported -%% because setting a JMS message selector on these fields is invalid. -section_field_name_to_atom(<<"header.", _/binary>> = Bin) -> throw({unsupported_field, Bin}); -section_field_name_to_atom(<<"properties.message-id">>) -> message_id; -section_field_name_to_atom(<<"properties.user-id">>) -> user_id; -section_field_name_to_atom(<<"properties.to">>) -> to; -section_field_name_to_atom(<<"properties.subject">>) -> subject; -section_field_name_to_atom(<<"properties.reply-to">>) -> reply_to; -section_field_name_to_atom(<<"properties.correlation-id">>) -> correlation_id; -section_field_name_to_atom(<<"properties.content-type">>) -> content_type; -section_field_name_to_atom(<<"properties.content-encoding">>) -> content_encoding; -section_field_name_to_atom(<<"properties.absolute-expiry-time">>) -> absolute_expiry_time; -section_field_name_to_atom(<<"properties.creation-time">>) -> creation_time; -section_field_name_to_atom(<<"properties.group-id">>) -> group_id; -section_field_name_to_atom(<<"properties.group-sequence">>) -> group_sequence; -section_field_name_to_atom(<<"properties.reply-to-group-id">>) -> reply_to_group_id; -section_field_name_to_atom(<<"properties.", _/binary>> = Bin) -> throw({unsupported_field, Bin}); -section_field_name_to_atom(Other) -> Other. +%% [Filter-Expressions-v1.0] § 6.4.4.4 +%% https://docs.oasis-open.org/amqp/filtex/v1.0/csd01/filtex-v1.0-csd01.html#_Toc67929312 +-spec section_field_name_to_atom(binary()) -> field_name() | binary() | error. +section_field_name_to_atom(<<"header.", FieldName/binary>>) -> + header_field_name_to_atom(FieldName); +section_field_name_to_atom(<<"h.", FieldName/binary>>) -> + header_field_name_to_atom(FieldName); +section_field_name_to_atom(<<"properties.", FieldName/binary>>) -> + properties_field_name_to_atom(FieldName); +section_field_name_to_atom(<<"p.", FieldName/binary>>) -> + properties_field_name_to_atom(FieldName); +section_field_name_to_atom(<<"application_properties.", FieldName/binary>>) -> + FieldName; +section_field_name_to_atom(<<"a.", FieldName/binary>>) -> + FieldName; +section_field_name_to_atom(_) -> + error. + +header_field_name_to_atom(<<"priority">>) -> priority; +header_field_name_to_atom(_) -> error. + +properties_field_name_to_atom(<<"message_id">>) -> message_id; +properties_field_name_to_atom(<<"user_id">>) -> user_id; +properties_field_name_to_atom(<<"to">>) -> to; +properties_field_name_to_atom(<<"subject">>) -> subject; +properties_field_name_to_atom(<<"reply_to">>) -> reply_to; +properties_field_name_to_atom(<<"correlation_id">>) -> correlation_id; +properties_field_name_to_atom(<<"content_type">>) -> content_type; +properties_field_name_to_atom(<<"content_encoding">>) -> content_encoding; +properties_field_name_to_atom(<<"absolute_expiry_time">>) -> absolute_expiry_time; +properties_field_name_to_atom(<<"creation_time">>) -> creation_time; +properties_field_name_to_atom(<<"group_id">>) -> group_id; +properties_field_name_to_atom(<<"group_sequence">>) -> group_sequence; +properties_field_name_to_atom(<<"reply_to_group_id">>) -> reply_to_group_id; +properties_field_name_to_atom(_) -> error. -spec capabilities([binary()]) -> undefined | {array, symbol, [{symbol, binary()}]}. diff --git a/deps/rabbit/src/rabbit_jms_ast.erl b/deps/rabbit/src/rabbit_jms_ast.erl deleted file mode 100644 index 1c52bf18068..00000000000 --- a/deps/rabbit/src/rabbit_jms_ast.erl +++ /dev/null @@ -1,110 +0,0 @@ -%% This Source Code Form is subject to the terms of the Mozilla Public -%% License, v. 2.0. If a copy of the MPL was not distributed with this -%% file, You can obtain one at https://mozilla.org/MPL/2.0/. -%% -%% Copyright (c) 2007-2025 Broadcom. All Rights Reserved. The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. All rights reserved. - -%% Helper functions operating on the Abstract Syntax Tree (AST) -%% as returned by rabbit_jms_selector_parser:parse/1 --module(rabbit_jms_ast). - --export([search/2, - map/2]). - --type ast() :: tuple(). --export_type([ast/0]). - --spec search(fun((term()) -> boolean()), ast()) -> boolean(). -search(Pred, Node) -> - case Pred(Node) of - true -> - true; - false -> - case Node of - {Op, Arg} when is_atom(Op) -> - search(Pred, Arg); - {Op, Arg1, Arg2} when is_atom(Op) -> - search(Pred, Arg1) orelse - search(Pred, Arg2); - {Op, Arg1, Arg2, Arg3} when is_atom(Op) -> - search(Pred, Arg1) orelse - search(Pred, Arg2) orelse - search(Pred, Arg3); - _Other -> - false - end - end. - --spec map(fun((tuple()) -> tuple()), ast()) -> - ast(). -map(Fun, Ast) when is_function(Fun, 1) -> - map_1(Ast, Fun). - -map_1(Pattern, _Fun) when element(1, Pattern) =:= pattern -> - Pattern; -map_1(Node, Fun) when is_atom(element(1, Node)) -> - map_2(Fun(Node), Fun); -map_1(Other, _Fun) -> - Other. - -map_2({Op, Arg1}, Fun) -> - {Op, map_1(Arg1, Fun)}; -map_2({Op, Arg1, Arg2}, Fun) -> - {Op, map_1(Arg1, Fun), map_1(Arg2, Fun)}; -map_2({Op, Arg1, Arg2, Arg3}, Fun) -> - {Op, map_1(Arg1, Fun), map_1(Arg2, Fun), map_1(Arg3, Fun)}. - --ifdef(TEST). --include_lib("eunit/include/eunit.hrl"). - -has_binary_identifier_test() -> - false = has_binary_identifier("TRUE"), - true = has_binary_identifier("user_key_1 <> 'fake'"), - false = has_binary_identifier("properties.subject = 'fake'"), - - false = has_binary_identifier("NOT properties.group-id = 'test'"), - false = has_binary_identifier("properties.group-sequence IS NULL"), - false = has_binary_identifier("properties.group-sequence IS NOT NULL"), - true = has_binary_identifier("NOT user_key = 'test'"), - true = has_binary_identifier("custom_field IS NULL"), - - false = has_binary_identifier("properties.group-id = 'g1' AND header.priority > 5"), - false = has_binary_identifier("properties.group-sequence * 10 < 100"), - false = has_binary_identifier("properties.creation-time >= 12345 OR properties.subject = 'test'"), - true = has_binary_identifier("user_key = 'g1' AND header.priority > 5"), - true = has_binary_identifier("header.priority > 5 and user_key = 'g1'"), - true = has_binary_identifier("custom_metric * 10 < 100"), - true = has_binary_identifier("properties.creation-time >= 12345 OR user_data = 'test'"), - - false = has_binary_identifier("properties.group-sequence BETWEEN 1 AND 10"), - true = has_binary_identifier("user_score BETWEEN 1 AND 10"), - - false = has_binary_identifier("properties.group-id LIKE 'group_%' ESCAPE '!'"), - true = has_binary_identifier("user_tag LIKE 'group_%' ESCAPE '!'"), - - false = has_binary_identifier("properties.group-id IN ('g1', 'g2', 'g3')"), - true = has_binary_identifier("user_category IN ('g1', 'g2', 'g3')"), - - false = has_binary_identifier( - "(properties.group-sequence + 1) * 2 <= 100 AND " ++ - "(properties.group-id LIKE 'prod_%' OR header.priority BETWEEN 5 AND 10)"), - true = has_binary_identifier( - "(properties.group-sequence + 1) * 2 <= 100 AND " ++ - "(user_value LIKE 'prod_%' OR properties.absolute-expiry-time BETWEEN 5 AND 10)"), - ok. - -has_binary_identifier(Selector) -> - {ok, Tokens, _EndLocation} = rabbit_jms_selector_lexer:string(Selector), - {ok, Ast0} = rabbit_jms_selector_parser:parse(Tokens), - Ast = map(fun({identifier, Ident}) when is_binary(Ident) -> - {identifier, rabbit_amqp_util:section_field_name_to_atom(Ident)}; - (Node) -> - Node - end, Ast0), - search(fun({identifier, Val}) -> - is_binary(Val); - (_Node) -> - false - end, Ast). - --endif. diff --git a/deps/rabbit/src/rabbit_jms_selector_lexer.erl b/deps/rabbit/src/rabbit_jms_selector_lexer.erl deleted file mode 100644 index 0feaaf1f1f6..00000000000 --- a/deps/rabbit/src/rabbit_jms_selector_lexer.erl +++ /dev/null @@ -1,1849 +0,0 @@ --file("leexinc.hrl", 0). -%% -%% %CopyrightBegin% -%% -%% SPDX-License-Identifier: BSD-2-Clause -%% -%% Copyright (c) 2008,2009 Robert Virding. All rights reserved. -%% Copyright Ericsson AB 2009-2025. All Rights Reserved. -%% -%% Redistribution and use in source and binary forms, with or without -%% modification, are permitted provided that the following conditions -%% are met: -%% -%% 1. Redistributions of source code must retain the above copyright -%% notice, this list of conditions and the following disclaimer. -%% 2. Redistributions in binary form must reproduce the above copyright -%% notice, this list of conditions and the following disclaimer in the -%% documentation and/or other materials provided with the distribution. -%% -%% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -%% "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -%% LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -%% FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -%% COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -%% INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -%% BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -%% LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -%% CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -%% LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -%% ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -%% POSSIBILITY OF SUCH DAMAGE. -%% -%% %CopyrightEnd% -%% - -%% The source of this file is part of leex distribution, as such it -%% has the same Copyright as the other files in the leex -%% distribution. However, the resultant scanner generated by leex is the -%% property of the creator of the scanner and is not covered by that -%% Copyright. - --module(rabbit_jms_selector_lexer). - --export([string/1,string/2,token/2,token/3,tokens/2,tokens/3]). --export([format_error/1]). - -%% User code. This is placed here to allow extra attributes. --file("rabbit_jms_selector_lexer.xrl", 70). - -%% "Approximate literals use the Java floating-point literal syntax." -to_float([$. | _] = Chars) -> - %% . Digits [ExponentPart] - "0" ++ Chars; -to_float(Chars) -> - %% Digits . [Digits] [ExponentPart] - case lists:last(Chars) of - $. -> - Chars ++ "0"; - _ -> - Chars1 = string:lowercase(Chars), - Chars2 = string:replace(Chars1, ".e", ".0e"), - lists:flatten(Chars2) - end. - -parse_scientific_notation(Chars) -> - Str = string:lowercase(Chars), - {Before, After0} = lists:splitwith(fun(C) -> C =/= $e end, Str), - [$e | After] = After0, - Base = list_to_integer(Before), - Exp = list_to_integer(After), - Base * math:pow(10, Exp). - -process_string(Chars) -> - %% remove surrounding quotes - Chars1 = lists:sublist(Chars, 2, length(Chars) - 2), - Bin = unicode:characters_to_binary(Chars1), - process_escaped_quotes(Bin). - -process_escaped_quotes(Binary) -> - binary:replace(Binary, <<"''">>, <<"'">>, [global]). - --file("leexinc.hrl", 47). - -format_error({illegal,S}) -> ["illegal characters ",io_lib:write_string(S)]; -format_error({user,S}) -> S. - -%% string(InChars) -> -%% string(InChars, Loc) -> -%% {ok,Tokens,EndLoc} | {error,ErrorInfo,EndLoc}. -%% Loc is the starting location of the token, while EndLoc is the first not scanned -%% location. Location is either Line or {Line,Column}, depending on the "error_location" option. - -string(Ics) -> - string(Ics,1). -string(Ics,L0) -> - string(Ics, L0, 1, Ics, []). -string(Ics, L0, C0, Tcs, Ts) -> - case do_string(Ics, L0, C0, Tcs, Ts) of - {ok, T, {L,_}} -> {ok, T, L}; - {error, {{EL,_},M,D}, {L,_}} -> - EI = {EL,M,D}, - {error, EI, L} - end. - -do_string([], L, C, [], Ts) -> % No partial tokens! - {ok,yyrev(Ts),{L,C}}; -do_string(Ics0, L0, C0, Tcs, Ts) -> - case yystate(yystate(), Ics0, L0, C0, 0, reject, 0) of - {A,Alen,Ics1,L1,_C1} -> % Accepting end state - C2 = adjust_col(Tcs, Alen, C0), - string_cont(Ics1, L1, C2, yyaction(A, Alen, Tcs, L0, C0), Ts); - {A,Alen,Ics1,L1,_C1,_S1} -> % Accepting transition state - C2 = adjust_col(Tcs, Alen, C0), - string_cont(Ics1, L1, C2, yyaction(A, Alen, Tcs, L0, C0), Ts); - {reject,_Alen,Tlen,_Ics1,_L1,_C1,_S1} -> % After a non-accepting state - {error,{{L0, C0} ,?MODULE,{illegal,yypre(Tcs, Tlen+1)}},{L0, C0}}; - {A,Alen,Tlen,_Ics1,L1, C1,_S1}-> - Tcs1 = yysuf(Tcs, Alen), - L2 = adjust_line(Tlen, Alen, Tcs1, L1), - C2 = adjust_col(Tcs, Alen, C1), - string_cont(Tcs1, L2, C2, yyaction(A, Alen, Tcs, L0,C0), Ts) - end. - -%% string_cont(RestChars, Line, Col, Token, Tokens) -%% Test for and remove the end token wrapper. Push back characters -%% are prepended to RestChars. - --dialyzer({nowarn_function, string_cont/5}). - -string_cont(Rest, Line, Col, {token,T}, Ts) -> - do_string(Rest, Line, Col, Rest, [T|Ts]); -string_cont(Rest, Line, Col, {token,T,Push}, Ts) -> - NewRest = Push ++ Rest, - do_string(NewRest, Line, Col, NewRest, [T|Ts]); -string_cont(Rest, Line, Col, {end_token,T}, Ts) -> - do_string(Rest, Line, Col, Rest, [T|Ts]); -string_cont(Rest, Line, Col, {end_token,T,Push}, Ts) -> - NewRest = Push ++ Rest, - do_string(NewRest, Line, Col, NewRest, [T|Ts]); -string_cont(Rest, Line, Col, skip_token, Ts) -> - do_string(Rest, Line, Col, Rest, Ts); -string_cont(Rest, Line, Col, {skip_token,Push}, Ts) -> - NewRest = Push ++ Rest, - do_string(NewRest, Line, Col, NewRest, Ts); -string_cont(_Rest, Line, Col, {error,S}, _Ts) -> - {error,{{Line, Col},?MODULE,{user,S}},{Line,Col}}. - -%% token(Continuation, Chars) -> -%% token(Continuation, Chars, Loc) -> -%% {more,Continuation} | {done,ReturnVal,RestChars}. -%% Must be careful when re-entering to append the latest characters to the -%% after characters in an accept. The continuation is: -%% {token,State,CurrLine,CurrCol,TokenChars,TokenLen,TokenLine,TokenCol,AccAction,AccLen} - -token(Cont,Chars) -> - token(Cont,Chars,1). -token(Cont, Chars, Line) -> - case do_token(Cont,Chars,Line,1) of - {more, _} = C -> C; - {done, Ret0, R} -> - Ret1 = case Ret0 of - {ok, T, {L,_}} -> {ok, T, L}; - {eof, {L,_}} -> {eof, L}; - {error, {{EL,_},M,D},{L,_}} -> {error, {EL,M,D},L} - end, - {done, Ret1, R} - end. - -do_token([], Chars, Line, Col) -> - token(yystate(), Chars, Line, Col, Chars, 0, Line, Col, reject, 0); -do_token({token,State,Line,Col,Tcs,Tlen,Tline,Tcol,Action,Alen}, Chars, _, _) -> - token(State, Chars, Line, Col, Tcs ++ Chars, Tlen, Tline, Tcol, Action, Alen). - -%% token(State, InChars, Line, Col, TokenChars, TokenLen, TokenLine, TokenCol -%% AcceptAction, AcceptLen) -> -%% {more,Continuation} | {done,ReturnVal,RestChars}. -%% The argument order is chosen to be more efficient. - -token(S0, Ics0, L0, C0, Tcs, Tlen0, Tline, Tcol, A0, Alen0) -> - case yystate(S0, Ics0, L0, C0, Tlen0, A0, Alen0) of - %% Accepting end state, we have a token. - {A1,Alen1,Ics1,L1,C1} -> - C2 = adjust_col(Tcs, Alen1, C1), - token_cont(Ics1, L1, C2, yyaction(A1, Alen1, Tcs, Tline,Tcol)); - %% Accepting transition state, can take more chars. - {A1,Alen1,[],L1,C1,S1} -> % Need more chars to check - {more,{token,S1,L1,C1,Tcs,Alen1,Tline,Tcol,A1,Alen1}}; - {A1,Alen1,Ics1,L1,C1,_S1} -> % Take what we got - C2 = adjust_col(Tcs, Alen1, C1), - token_cont(Ics1, L1, C2, yyaction(A1, Alen1, Tcs, Tline,Tcol)); - %% After a non-accepting state, maybe reach accept state later. - {A1,Alen1,Tlen1,[],L1,C1,S1} -> % Need more chars to check - {more,{token,S1,L1,C1,Tcs,Tlen1,Tline,Tcol,A1,Alen1}}; - {reject,_Alen1,Tlen1,eof,L1,C1,_S1} -> % No token match - %% Check for partial token which is error. - Ret = if Tlen1 > 0 -> {error,{{Tline,Tcol},?MODULE, - %% Skip eof tail in Tcs. - {illegal,yypre(Tcs, Tlen1)}},{L1,C1}}; - true -> {eof,{L1,C1}} - end, - {done,Ret,eof}; - {reject,_Alen1,Tlen1,Ics1,_L1,_C1,_S1} -> % No token match - Error = {{Tline,Tcol},?MODULE,{illegal,yypre(Tcs, Tlen1+1)}}, - {done,{error,Error,{Tline,Tcol}},Ics1}; - {A1,Alen1,Tlen1,_Ics1,L1,_C1,_S1} -> % Use last accept match - Tcs1 = yysuf(Tcs, Alen1), - L2 = adjust_line(Tlen1, Alen1, Tcs1, L1), - C2 = C0 + Alen1, - token_cont(Tcs1, L2, C2, yyaction(A1, Alen1, Tcs, Tline, Tcol)) - end. - -%% token_cont(RestChars, Line, Col, Token) -%% If we have a token or error then return done, else if we have a -%% skip_token then continue. - --dialyzer({nowarn_function, token_cont/4}). - -token_cont(Rest, Line, Col, {token,T}) -> - {done,{ok,T,{Line,Col}},Rest}; -token_cont(Rest, Line, Col, {token,T,Push}) -> - NewRest = Push ++ Rest, - {done,{ok,T,{Line,Col}},NewRest}; -token_cont(Rest, Line, Col, {end_token,T}) -> - {done,{ok,T,{Line,Col}},Rest}; -token_cont(Rest, Line, Col, {end_token,T,Push}) -> - NewRest = Push ++ Rest, - {done,{ok,T,{Line,Col}},NewRest}; -token_cont(Rest, Line, Col, skip_token) -> - token(yystate(), Rest, Line, Col, Rest, 0, Line, Col, reject, 0); -token_cont(Rest, Line, Col, {skip_token,Push}) -> - NewRest = Push ++ Rest, - token(yystate(), NewRest, Line, Col, NewRest, 0, Line, Col, reject, 0); -token_cont(Rest, Line, Col, {error,S}) -> - {done,{error,{{Line, Col},?MODULE,{user,S}},{Line, Col}},Rest}. - -%% tokens(Continuation, Chars) -> -%% tokens(Continuation, Chars, Loc) -> -%% {more,Continuation} | {done,ReturnVal,RestChars}. -%% Must be careful when re-entering to append the latest characters to the -%% after characters in an accept. The continuation is: -%% {tokens,State,CurrLine,CurrCol,TokenChars,TokenLen,TokenLine,TokenCur,Tokens,AccAction,AccLen} -%% {skip_tokens,State,CurrLine,CurrCol,TokenChars,TokenLen,TokenLine,TokenCur,Error,AccAction,AccLen} - -tokens(Cont,Chars) -> - tokens(Cont,Chars,1). -tokens(Cont, Chars, Line) -> - case do_tokens(Cont,Chars,Line,1) of - {more, _} = C -> C; - {done, Ret0, R} -> - Ret1 = case Ret0 of - {ok, T, {L,_}} -> {ok, T, L}; - {eof, {L,_}} -> {eof, L}; - {error, {{EL,_},M,D},{L,_}} -> {error, {EL,M,D},L} - end, - {done, Ret1, R} - end. - -do_tokens([], Chars, Line, Col) -> - tokens(yystate(), Chars, Line, Col, Chars, 0, Line, Col, [], reject, 0); -do_tokens({tokens,State,Line,Col,Tcs,Tlen,Tline,Tcol,Ts,Action,Alen}, Chars, _,_) -> - tokens(State, Chars, Line, Col, Tcs ++ Chars, Tlen, Tline, Tcol, Ts, Action, Alen); -do_tokens({skip_tokens,State,Line, Col, Tcs,Tlen,Tline,Tcol,Error,Action,Alen}, Chars, _,_) -> - skip_tokens(State, Chars, Line, Col, Tcs ++ Chars, Tlen, Tline, Tcol, Error, Action, Alen). - -%% tokens(State, InChars, Line, Col, TokenChars, TokenLen, TokenLine, TokenCol,Tokens, -%% AcceptAction, AcceptLen) -> -%% {more,Continuation} | {done,ReturnVal,RestChars}. - -tokens(S0, Ics0, L0, C0, Tcs, Tlen0, Tline, Tcol, Ts, A0, Alen0) -> - case yystate(S0, Ics0, L0, C0, Tlen0, A0, Alen0) of - %% Accepting end state, we have a token. - {A1,Alen1,Ics1,L1,C1} -> - C2 = adjust_col(Tcs, Alen1, C1), - tokens_cont(Ics1, L1, C2, yyaction(A1, Alen1, Tcs, Tline, Tcol), Ts); - %% Accepting transition state, can take more chars. - {A1,Alen1,[],L1,C1,S1} -> % Need more chars to check - {more,{tokens,S1,L1,C1,Tcs,Alen1,Tline,Tcol,Ts,A1,Alen1}}; - {A1,Alen1,Ics1,L1,C1,_S1} -> % Take what we got - C2 = adjust_col(Tcs, Alen1, C1), - tokens_cont(Ics1, L1, C2, yyaction(A1, Alen1, Tcs, Tline,Tcol), Ts); - %% After a non-accepting state, maybe reach accept state later. - {A1,Alen1,Tlen1,[],L1,C1,S1} -> % Need more chars to check - {more,{tokens,S1,L1,C1,Tcs,Tlen1,Tline,Tcol,Ts,A1,Alen1}}; - {reject,_Alen1,Tlen1,eof,L1,C1,_S1} -> % No token match - %% Check for partial token which is error, no need to skip here. - Ret = if Tlen1 > 0 -> {error,{{Tline,Tcol},?MODULE, - %% Skip eof tail in Tcs. - {illegal,yypre(Tcs, Tlen1)}},{L1,C1}}; - Ts == [] -> {eof,{L1,C1}}; - true -> {ok,yyrev(Ts),{L1,C1}} - end, - {done,Ret,eof}; - {reject,_Alen1,Tlen1,_Ics1,L1,C1,_S1} -> - %% Skip rest of tokens. - Error = {{L1,C1},?MODULE,{illegal,yypre(Tcs, Tlen1+1)}}, - skip_tokens(yysuf(Tcs, Tlen1+1), L1, C1, Error); - {A1,Alen1,Tlen1,_Ics1,L1,_C1,_S1} -> - Token = yyaction(A1, Alen1, Tcs, Tline,Tcol), - Tcs1 = yysuf(Tcs, Alen1), - L2 = adjust_line(Tlen1, Alen1, Tcs1, L1), - C2 = C0 + Alen1, - tokens_cont(Tcs1, L2, C2, Token, Ts) - end. - -%% tokens_cont(RestChars, Line, Column, Token, Tokens) -%% If we have an end_token or error then return done, else if we have -%% a token then save it and continue, else if we have a skip_token -%% just continue. - --dialyzer({nowarn_function, tokens_cont/5}). - -tokens_cont(Rest, Line, Col, {token,T}, Ts) -> - tokens(yystate(), Rest, Line, Col, Rest, 0, Line, Col, [T|Ts], reject, 0); -tokens_cont(Rest, Line, Col, {token,T,Push}, Ts) -> - NewRest = Push ++ Rest, - tokens(yystate(), NewRest, Line, Col, NewRest, 0, Line, Col, [T|Ts], reject, 0); -tokens_cont(Rest, Line, Col, {end_token,T}, Ts) -> - {done,{ok,yyrev(Ts, [T]),{Line,Col}},Rest}; -tokens_cont(Rest, Line, Col, {end_token,T,Push}, Ts) -> - NewRest = Push ++ Rest, - {done,{ok,yyrev(Ts, [T]),{Line, Col}},NewRest}; -tokens_cont(Rest, Line, Col, skip_token, Ts) -> - tokens(yystate(), Rest, Line, Col, Rest, 0, Line, Col, Ts, reject, 0); -tokens_cont(Rest, Line, Col, {skip_token,Push}, Ts) -> - NewRest = Push ++ Rest, - tokens(yystate(), NewRest, Line, Col, NewRest, 0, Line, Col, Ts, reject, 0); -tokens_cont(Rest, Line, Col, {error,S}, _Ts) -> - skip_tokens(Rest, Line, Col, {{Line,Col},?MODULE,{user,S}}). - -%% skip_tokens(InChars, Line, Col, Error) -> {done,{error,Error,{Line,Col}},Ics}. -%% Skip tokens until an end token, junk everything and return the error. - -skip_tokens(Ics, Line, Col, Error) -> - skip_tokens(yystate(), Ics, Line, Col, Ics, 0, Line, Col, Error, reject, 0). - -%% skip_tokens(State, InChars, Line, Col, TokenChars, TokenLen, TokenLine, TokenCol, Tokens, -%% AcceptAction, AcceptLen) -> -%% {more,Continuation} | {done,ReturnVal,RestChars}. - -skip_tokens(S0, Ics0, L0, C0, Tcs, Tlen0, Tline, Tcol, Error, A0, Alen0) -> - case yystate(S0, Ics0, L0, C0, Tlen0, A0, Alen0) of - {A1,Alen1,Ics1,L1, C1} -> % Accepting end state - skip_cont(Ics1, L1, C1, yyaction(A1, Alen1, Tcs, Tline, Tcol), Error); - {A1,Alen1,[],L1,C1, S1} -> % After an accepting state - {more,{skip_tokens,S1,L1,C1,Tcs,Alen1,Tline,Tcol,Error,A1,Alen1}}; - {A1,Alen1,Ics1,L1,C1,_S1} -> - skip_cont(Ics1, L1, C1, yyaction(A1, Alen1, Tcs, Tline, Tcol), Error); - {A1,Alen1,Tlen1,[],L1,C1,S1} -> % After a non-accepting state - {more,{skip_tokens,S1,L1,C1,Tcs,Tlen1,Tline,Tcol,Error,A1,Alen1}}; - {reject,_Alen1,_Tlen1,eof,L1,C1,_S1} -> - {done,{error,Error,{L1,C1}},eof}; - {reject,_Alen1,Tlen1,_Ics1,L1,C1,_S1} -> - skip_tokens(yysuf(Tcs, Tlen1+1), L1, C1,Error); - {A1,Alen1,Tlen1,_Ics1,L1,C1,_S1} -> - Token = yyaction(A1, Alen1, Tcs, Tline, Tcol), - Tcs1 = yysuf(Tcs, Alen1), - L2 = adjust_line(Tlen1, Alen1, Tcs1, L1), - skip_cont(Tcs1, L2, C1, Token, Error) - end. - -%% skip_cont(RestChars, Line, Col, Token, Error) -%% Skip tokens until we have an end_token or error then return done -%% with the original rror. - --dialyzer({nowarn_function, skip_cont/5}). - -skip_cont(Rest, Line, Col, {token,_T}, Error) -> - skip_tokens(yystate(), Rest, Line, Col, Rest, 0, Line, Col, Error, reject, 0); -skip_cont(Rest, Line, Col, {token,_T,Push}, Error) -> - NewRest = Push ++ Rest, - skip_tokens(yystate(), NewRest, Line, Col, NewRest, 0, Line, Col, Error, reject, 0); -skip_cont(Rest, Line, Col, {end_token,_T}, Error) -> - {done,{error,Error,{Line,Col}},Rest}; -skip_cont(Rest, Line, Col, {end_token,_T,Push}, Error) -> - NewRest = Push ++ Rest, - {done,{error,Error,{Line,Col}},NewRest}; -skip_cont(Rest, Line, Col, skip_token, Error) -> - skip_tokens(yystate(), Rest, Line, Col, Rest, 0, Line, Col, Error, reject, 0); -skip_cont(Rest, Line, Col, {skip_token,Push}, Error) -> - NewRest = Push ++ Rest, - skip_tokens(yystate(), NewRest, Line, Col, NewRest, 0, Line, Col, Error, reject, 0); -skip_cont(Rest, Line, Col, {error,_S}, Error) -> - skip_tokens(yystate(), Rest, Line, Col, Rest, 0, Line, Col, Error, reject, 0). - --compile({nowarn_unused_function, [yyrev/1, yyrev/2, yypre/2, yysuf/2]}). - -yyrev(List) -> lists:reverse(List). -yyrev(List, Tail) -> lists:reverse(List, Tail). -yypre(List, N) -> lists:sublist(List, N). -yysuf(List, N) -> lists:nthtail(N, List). - -%% adjust_line(TokenLength, AcceptLength, Chars, Line) -> NewLine -%% Make sure that newlines in Chars are not counted twice. -%% Line has been updated with respect to newlines in the prefix of -%% Chars consisting of (TokenLength - AcceptLength) characters. - --compile({nowarn_unused_function, adjust_line/4}). - -adjust_line(N, N, _Cs, L) -> L; -adjust_line(T, A, [$\n|Cs], L) -> - adjust_line(T-1, A, Cs, L-1); -adjust_line(T, A, [_|Cs], L) -> - adjust_line(T-1, A, Cs, L). - -%% adjust_col(Chars, AcceptLength, Col) -> NewCol -%% Handle newlines, tabs and unicode chars. -adjust_col(_, 0, Col) -> - Col; -adjust_col([$\n | R], L, _) -> - adjust_col(R, L-1, 1); -adjust_col([$\t | R], L, Col) -> - adjust_col(R, L-1, tab_forward(Col)+1); -adjust_col([C | R], L, Col) when C>=0 andalso C=< 16#7F -> - adjust_col(R, L-1, Col+1); -adjust_col([C | R], L, Col) when C>= 16#80 andalso C=< 16#7FF -> - adjust_col(R, L-1, Col+2); -adjust_col([C | R], L, Col) when C>= 16#800 andalso C=< 16#FFFF -> - adjust_col(R, L-1, Col+3); -adjust_col([C | R], L, Col) when C>= 16#10000 andalso C=< 16#10FFFF -> - adjust_col(R, L-1, Col+4). - -tab_forward(C) -> - D = C rem tab_size(), - A = tab_size()-D, - C+A. - -tab_size() -> 8. - -%% yystate() -> InitialState. -%% yystate(State, InChars, Line, Col, CurrTokLen, AcceptAction, AcceptLen) -> -%% {Action, AcceptLen, RestChars, Line, Col} | -%% {Action, AcceptLen, RestChars, Line, Col, State} | -%% {reject, AcceptLen, CurrTokLen, RestChars, Line, Col, State} | -%% {Action, AcceptLen, CurrTokLen, RestChars, Line, Col, State}. -%% Generated state transition functions. The non-accepting end state -%% return signal either an unrecognised character or end of current -%% input. - --file("rabbit_jms_selector_lexer.erl", 404). -yystate() -> 66. - -yystate(69, [101|Ics], Line, Col, Tlen, _, _) -> - yystate(67, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(69, [95|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(69, [69|Ics], Line, Col, Tlen, _, _) -> - yystate(67, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(69, [45|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(69, [46|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(69, [36|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(69, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(69, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 68 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(69, [C|Ics], Line, Col, Tlen, _, _) when C >= 70, C =< 90 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(69, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 100 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(69, [C|Ics], Line, Col, Tlen, _, _) when C >= 102, C =< 122 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(69, Ics, Line, Col, Tlen, _, _) -> - {29,Tlen,Ics,Line,Col,69}; -yystate(68, Ics, Line, Col, Tlen, _, _) -> - {30,Tlen,Ics,Line,Col}; -yystate(67, [101|Ics], Line, Col, Tlen, _, _) -> - yystate(63, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(67, [95|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(67, [69|Ics], Line, Col, Tlen, _, _) -> - yystate(63, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(67, [45|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(67, [46|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(67, [36|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(67, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(67, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 68 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(67, [C|Ics], Line, Col, Tlen, _, _) when C >= 70, C =< 90 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(67, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 100 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(67, [C|Ics], Line, Col, Tlen, _, _) when C >= 102, C =< 122 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(67, Ics, Line, Col, Tlen, _, _) -> - {29,Tlen,Ics,Line,Col,67}; -yystate(66, [116|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(62, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [111|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(46, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [110|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(38, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [109|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(60, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [108|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(14, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [106|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(60, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [107|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(60, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [105|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(1, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [103|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(60, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [104|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(60, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [102|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(13, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [101|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(33, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [99|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(60, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [100|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(60, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [98|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(57, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [97|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(55, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [96|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(68, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [95|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(60, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [84|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(62, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [79|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(46, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [78|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(38, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [77|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(60, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [76|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(14, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [74|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(60, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [75|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(60, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [73|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(1, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [71|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(60, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [72|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(60, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [70|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(13, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [69|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(33, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [67|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(60, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [68|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(60, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [66|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(57, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [65|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(55, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [63|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(68, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [64|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(68, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [62|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(43, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [61|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(35, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [60|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(31, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [58|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(68, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [59|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(68, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [47|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(12, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [46|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(16, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [45|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(24, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [44|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(28, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [43|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(32, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [42|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(36, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [41|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(40, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [40|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(44, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [39|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(48, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [37|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(68, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [38|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(68, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [36|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(60, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [32|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(64, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [12|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(64, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [13|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(64, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [11|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(68, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [10|Ics], Line, _, Tlen, Action, Alen) -> - yystate(64, Ics, Line+1, 1, Tlen+1, Action, Alen); -yystate(66, [9|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(64, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [C|Ics], Line, Col, Tlen, Action, Alen) when C >= 0, C =< 8 -> - yystate(68, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [C|Ics], Line, Col, Tlen, Action, Alen) when C >= 14, C =< 31 -> - yystate(68, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [C|Ics], Line, Col, Tlen, Action, Alen) when C >= 33, C =< 35 -> - yystate(68, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [C|Ics], Line, Col, Tlen, Action, Alen) when C >= 48, C =< 57 -> - yystate(7, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [C|Ics], Line, Col, Tlen, Action, Alen) when C >= 80, C =< 83 -> - yystate(60, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [C|Ics], Line, Col, Tlen, Action, Alen) when C >= 85, C =< 90 -> - yystate(60, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [C|Ics], Line, Col, Tlen, Action, Alen) when C >= 91, C =< 94 -> - yystate(68, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [C|Ics], Line, Col, Tlen, Action, Alen) when C >= 112, C =< 115 -> - yystate(60, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [C|Ics], Line, Col, Tlen, Action, Alen) when C >= 117, C =< 122 -> - yystate(60, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, [C|Ics], Line, Col, Tlen, Action, Alen) when C >= 123 -> - yystate(68, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(66, Ics, Line, Col, Tlen, Action, Alen) -> - {Action,Alen,Tlen,Ics,Line,Col,66}; -yystate(65, [119|Ics], Line, Col, Tlen, _, _) -> - yystate(69, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(65, [95|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(65, [87|Ics], Line, Col, Tlen, _, _) -> - yystate(69, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(65, [45|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(65, [46|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(65, [36|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(65, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(65, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 86 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(65, [C|Ics], Line, Col, Tlen, _, _) when C >= 88, C =< 90 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(65, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 118 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(65, [C|Ics], Line, Col, Tlen, _, _) when C >= 120, C =< 122 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(65, Ics, Line, Col, Tlen, _, _) -> - {29,Tlen,Ics,Line,Col,65}; -yystate(64, [32|Ics], Line, Col, Tlen, _, _) -> - yystate(64, Ics, Line, Col, Tlen+1, 0, Tlen); -yystate(64, [12|Ics], Line, Col, Tlen, _, _) -> - yystate(64, Ics, Line, Col, Tlen+1, 0, Tlen); -yystate(64, [13|Ics], Line, Col, Tlen, _, _) -> - yystate(64, Ics, Line, Col, Tlen+1, 0, Tlen); -yystate(64, [9|Ics], Line, Col, Tlen, _, _) -> - yystate(64, Ics, Line, Col, Tlen+1, 0, Tlen); -yystate(64, [10|Ics], Line, _, Tlen, _, _) -> - yystate(64, Ics, Line+1, 1, Tlen+1, 0, Tlen); -yystate(64, Ics, Line, Col, Tlen, _, _) -> - {0,Tlen,Ics,Line,Col,64}; -yystate(63, [110|Ics], Line, Col, Tlen, _, _) -> - yystate(59, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(63, [95|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(63, [78|Ics], Line, Col, Tlen, _, _) -> - yystate(59, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(63, [45|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(63, [46|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(63, [36|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(63, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(63, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 77 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(63, [C|Ics], Line, Col, Tlen, _, _) when C >= 79, C =< 90 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(63, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 109 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(63, [C|Ics], Line, Col, Tlen, _, _) when C >= 111, C =< 122 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(63, Ics, Line, Col, Tlen, _, _) -> - {29,Tlen,Ics,Line,Col,63}; -yystate(62, [114|Ics], Line, Col, Tlen, _, _) -> - yystate(58, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(62, [95|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(62, [82|Ics], Line, Col, Tlen, _, _) -> - yystate(58, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(62, [45|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(62, [46|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(62, [36|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(62, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(62, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 81 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(62, [C|Ics], Line, Col, Tlen, _, _) when C >= 83, C =< 90 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(62, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 113 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(62, [C|Ics], Line, Col, Tlen, _, _) when C >= 115, C =< 122 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(62, Ics, Line, Col, Tlen, _, _) -> - {29,Tlen,Ics,Line,Col,62}; -yystate(61, [116|Ics], Line, Col, Tlen, _, _) -> - yystate(65, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(61, [95|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(61, [84|Ics], Line, Col, Tlen, _, _) -> - yystate(65, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(61, [45|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(61, [46|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(61, [36|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(61, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(61, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 83 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(61, [C|Ics], Line, Col, Tlen, _, _) when C >= 85, C =< 90 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(61, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 115 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(61, [C|Ics], Line, Col, Tlen, _, _) when C >= 117, C =< 122 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(61, Ics, Line, Col, Tlen, _, _) -> - {29,Tlen,Ics,Line,Col,61}; -yystate(60, [95|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(60, [45|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(60, [46|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(60, [36|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(60, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(60, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 90 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(60, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 122 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(60, Ics, Line, Col, Tlen, _, _) -> - {29,Tlen,Ics,Line,Col,60}; -yystate(59, [95|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 4, Tlen); -yystate(59, [45|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 4, Tlen); -yystate(59, [46|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 4, Tlen); -yystate(59, [36|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 4, Tlen); -yystate(59, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> - yystate(60, Ics, Line, Col, Tlen+1, 4, Tlen); -yystate(59, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 90 -> - yystate(60, Ics, Line, Col, Tlen+1, 4, Tlen); -yystate(59, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 122 -> - yystate(60, Ics, Line, Col, Tlen+1, 4, Tlen); -yystate(59, Ics, Line, Col, Tlen, _, _) -> - {4,Tlen,Ics,Line,Col,59}; -yystate(58, [117|Ics], Line, Col, Tlen, _, _) -> - yystate(54, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(58, [95|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(58, [85|Ics], Line, Col, Tlen, _, _) -> - yystate(54, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(58, [45|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(58, [46|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(58, [36|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(58, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(58, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 84 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(58, [C|Ics], Line, Col, Tlen, _, _) when C >= 86, C =< 90 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(58, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 116 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(58, [C|Ics], Line, Col, Tlen, _, _) when C >= 118, C =< 122 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(58, Ics, Line, Col, Tlen, _, _) -> - {29,Tlen,Ics,Line,Col,58}; -yystate(57, [101|Ics], Line, Col, Tlen, _, _) -> - yystate(61, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(57, [95|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(57, [69|Ics], Line, Col, Tlen, _, _) -> - yystate(61, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(57, [45|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(57, [46|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(57, [36|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(57, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(57, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 68 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(57, [C|Ics], Line, Col, Tlen, _, _) when C >= 70, C =< 90 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(57, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 100 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(57, [C|Ics], Line, Col, Tlen, _, _) when C >= 102, C =< 122 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(57, Ics, Line, Col, Tlen, _, _) -> - {29,Tlen,Ics,Line,Col,57}; -yystate(56, [39|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(52, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(56, [10|Ics], Line, _, Tlen, Action, Alen) -> - yystate(56, Ics, Line+1, 1, Tlen+1, Action, Alen); -yystate(56, [C|Ics], Line, Col, Tlen, Action, Alen) when C >= 0, C =< 9 -> - yystate(56, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(56, [C|Ics], Line, Col, Tlen, Action, Alen) when C >= 11, C =< 38 -> - yystate(56, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(56, [C|Ics], Line, Col, Tlen, Action, Alen) when C >= 40 -> - yystate(56, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(56, Ics, Line, Col, Tlen, Action, Alen) -> - {Action,Alen,Tlen,Ics,Line,Col,56}; -yystate(55, [110|Ics], Line, Col, Tlen, _, _) -> - yystate(51, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(55, [95|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(55, [78|Ics], Line, Col, Tlen, _, _) -> - yystate(51, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(55, [45|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(55, [46|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(55, [36|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(55, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(55, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 77 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(55, [C|Ics], Line, Col, Tlen, _, _) when C >= 79, C =< 90 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(55, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 109 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(55, [C|Ics], Line, Col, Tlen, _, _) when C >= 111, C =< 122 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(55, Ics, Line, Col, Tlen, _, _) -> - {29,Tlen,Ics,Line,Col,55}; -yystate(54, [101|Ics], Line, Col, Tlen, _, _) -> - yystate(50, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(54, [95|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(54, [69|Ics], Line, Col, Tlen, _, _) -> - yystate(50, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(54, [45|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(54, [46|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(54, [36|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(54, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(54, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 68 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(54, [C|Ics], Line, Col, Tlen, _, _) when C >= 70, C =< 90 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(54, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 100 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(54, [C|Ics], Line, Col, Tlen, _, _) when C >= 102, C =< 122 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(54, Ics, Line, Col, Tlen, _, _) -> - {29,Tlen,Ics,Line,Col,54}; -yystate(53, [95|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 9, Tlen); -yystate(53, [45|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 9, Tlen); -yystate(53, [46|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 9, Tlen); -yystate(53, [36|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 9, Tlen); -yystate(53, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> - yystate(60, Ics, Line, Col, Tlen+1, 9, Tlen); -yystate(53, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 90 -> - yystate(60, Ics, Line, Col, Tlen+1, 9, Tlen); -yystate(53, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 122 -> - yystate(60, Ics, Line, Col, Tlen+1, 9, Tlen); -yystate(53, Ics, Line, Col, Tlen, _, _) -> - {9,Tlen,Ics,Line,Col,53}; -yystate(52, [39|Ics], Line, Col, Tlen, _, _) -> - yystate(56, Ics, Line, Col, Tlen+1, 28, Tlen); -yystate(52, Ics, Line, Col, Tlen, _, _) -> - {28,Tlen,Ics,Line,Col,52}; -yystate(51, [100|Ics], Line, Col, Tlen, _, _) -> - yystate(47, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(51, [95|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(51, [68|Ics], Line, Col, Tlen, _, _) -> - yystate(47, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(51, [45|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(51, [46|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(51, [36|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(51, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(51, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 67 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(51, [C|Ics], Line, Col, Tlen, _, _) when C >= 69, C =< 90 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(51, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 99 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(51, [C|Ics], Line, Col, Tlen, _, _) when C >= 101, C =< 122 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(51, Ics, Line, Col, Tlen, _, _) -> - {29,Tlen,Ics,Line,Col,51}; -yystate(50, [95|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 10, Tlen); -yystate(50, [45|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 10, Tlen); -yystate(50, [46|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 10, Tlen); -yystate(50, [36|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 10, Tlen); -yystate(50, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> - yystate(60, Ics, Line, Col, Tlen+1, 10, Tlen); -yystate(50, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 90 -> - yystate(60, Ics, Line, Col, Tlen+1, 10, Tlen); -yystate(50, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 122 -> - yystate(60, Ics, Line, Col, Tlen+1, 10, Tlen); -yystate(50, Ics, Line, Col, Tlen, _, _) -> - {10,Tlen,Ics,Line,Col,50}; -yystate(49, [101|Ics], Line, Col, Tlen, _, _) -> - yystate(53, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(49, [95|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(49, [69|Ics], Line, Col, Tlen, _, _) -> - yystate(53, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(49, [45|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(49, [46|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(49, [36|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(49, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(49, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 68 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(49, [C|Ics], Line, Col, Tlen, _, _) when C >= 70, C =< 90 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(49, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 100 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(49, [C|Ics], Line, Col, Tlen, _, _) when C >= 102, C =< 122 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(49, Ics, Line, Col, Tlen, _, _) -> - {29,Tlen,Ics,Line,Col,49}; -yystate(48, [39|Ics], Line, Col, Tlen, _, _) -> - yystate(52, Ics, Line, Col, Tlen+1, 30, Tlen); -yystate(48, [10|Ics], Line, _, Tlen, _, _) -> - yystate(56, Ics, Line+1, 1, Tlen+1, 30, Tlen); -yystate(48, [C|Ics], Line, Col, Tlen, _, _) when C >= 0, C =< 9 -> - yystate(56, Ics, Line, Col, Tlen+1, 30, Tlen); -yystate(48, [C|Ics], Line, Col, Tlen, _, _) when C >= 11, C =< 38 -> - yystate(56, Ics, Line, Col, Tlen+1, 30, Tlen); -yystate(48, [C|Ics], Line, Col, Tlen, _, _) when C >= 40 -> - yystate(56, Ics, Line, Col, Tlen+1, 30, Tlen); -yystate(48, Ics, Line, Col, Tlen, _, _) -> - {30,Tlen,Ics,Line,Col,48}; -yystate(47, [95|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 1, Tlen); -yystate(47, [45|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 1, Tlen); -yystate(47, [46|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 1, Tlen); -yystate(47, [36|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 1, Tlen); -yystate(47, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> - yystate(60, Ics, Line, Col, Tlen+1, 1, Tlen); -yystate(47, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 90 -> - yystate(60, Ics, Line, Col, Tlen+1, 1, Tlen); -yystate(47, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 122 -> - yystate(60, Ics, Line, Col, Tlen+1, 1, Tlen); -yystate(47, Ics, Line, Col, Tlen, _, _) -> - {1,Tlen,Ics,Line,Col,47}; -yystate(46, [114|Ics], Line, Col, Tlen, _, _) -> - yystate(42, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(46, [95|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(46, [82|Ics], Line, Col, Tlen, _, _) -> - yystate(42, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(46, [45|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(46, [46|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(46, [36|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(46, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(46, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 81 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(46, [C|Ics], Line, Col, Tlen, _, _) when C >= 83, C =< 90 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(46, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 113 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(46, [C|Ics], Line, Col, Tlen, _, _) when C >= 115, C =< 122 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(46, Ics, Line, Col, Tlen, _, _) -> - {29,Tlen,Ics,Line,Col,46}; -yystate(45, [112|Ics], Line, Col, Tlen, _, _) -> - yystate(49, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(45, [95|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(45, [80|Ics], Line, Col, Tlen, _, _) -> - yystate(49, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(45, [45|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(45, [46|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(45, [36|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(45, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(45, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 79 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(45, [C|Ics], Line, Col, Tlen, _, _) when C >= 81, C =< 90 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(45, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 111 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(45, [C|Ics], Line, Col, Tlen, _, _) when C >= 113, C =< 122 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(45, Ics, Line, Col, Tlen, _, _) -> - {29,Tlen,Ics,Line,Col,45}; -yystate(44, Ics, Line, Col, Tlen, _, _) -> - {22,Tlen,Ics,Line,Col}; -yystate(43, [61|Ics], Line, Col, Tlen, _, _) -> - yystate(39, Ics, Line, Col, Tlen+1, 16, Tlen); -yystate(43, Ics, Line, Col, Tlen, _, _) -> - {16,Tlen,Ics,Line,Col,43}; -yystate(42, [95|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 2, Tlen); -yystate(42, [45|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 2, Tlen); -yystate(42, [46|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 2, Tlen); -yystate(42, [36|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 2, Tlen); -yystate(42, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> - yystate(60, Ics, Line, Col, Tlen+1, 2, Tlen); -yystate(42, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 90 -> - yystate(60, Ics, Line, Col, Tlen+1, 2, Tlen); -yystate(42, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 122 -> - yystate(60, Ics, Line, Col, Tlen+1, 2, Tlen); -yystate(42, Ics, Line, Col, Tlen, _, _) -> - {2,Tlen,Ics,Line,Col,42}; -yystate(41, [97|Ics], Line, Col, Tlen, _, _) -> - yystate(45, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(41, [95|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(41, [65|Ics], Line, Col, Tlen, _, _) -> - yystate(45, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(41, [45|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(41, [46|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(41, [36|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(41, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(41, [C|Ics], Line, Col, Tlen, _, _) when C >= 66, C =< 90 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(41, [C|Ics], Line, Col, Tlen, _, _) when C >= 98, C =< 122 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(41, Ics, Line, Col, Tlen, _, _) -> - {29,Tlen,Ics,Line,Col,41}; -yystate(40, Ics, Line, Col, Tlen, _, _) -> - {23,Tlen,Ics,Line,Col}; -yystate(39, Ics, Line, Col, Tlen, _, _) -> - {14,Tlen,Ics,Line,Col}; -yystate(38, [117|Ics], Line, Col, Tlen, _, _) -> - yystate(34, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(38, [111|Ics], Line, Col, Tlen, _, _) -> - yystate(22, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(38, [95|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(38, [85|Ics], Line, Col, Tlen, _, _) -> - yystate(34, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(38, [79|Ics], Line, Col, Tlen, _, _) -> - yystate(22, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(38, [45|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(38, [46|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(38, [36|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(38, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(38, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 78 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(38, [C|Ics], Line, Col, Tlen, _, _) when C >= 80, C =< 84 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(38, [C|Ics], Line, Col, Tlen, _, _) when C >= 86, C =< 90 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(38, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 110 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(38, [C|Ics], Line, Col, Tlen, _, _) when C >= 112, C =< 116 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(38, [C|Ics], Line, Col, Tlen, _, _) when C >= 118, C =< 122 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(38, Ics, Line, Col, Tlen, _, _) -> - {29,Tlen,Ics,Line,Col,38}; -yystate(37, [99|Ics], Line, Col, Tlen, _, _) -> - yystate(41, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(37, [97|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(37, [98|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(37, [95|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(37, [67|Ics], Line, Col, Tlen, _, _) -> - yystate(41, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(37, [65|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(37, [66|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(37, [45|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(37, [46|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(37, [36|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(37, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(37, [C|Ics], Line, Col, Tlen, _, _) when C >= 68, C =< 90 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(37, [C|Ics], Line, Col, Tlen, _, _) when C >= 100, C =< 122 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(37, Ics, Line, Col, Tlen, _, _) -> - {29,Tlen,Ics,Line,Col,37}; -yystate(36, Ics, Line, Col, Tlen, _, _) -> - {20,Tlen,Ics,Line,Col}; -yystate(35, Ics, Line, Col, Tlen, _, _) -> - {12,Tlen,Ics,Line,Col}; -yystate(34, [108|Ics], Line, Col, Tlen, _, _) -> - yystate(30, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(34, [95|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(34, [76|Ics], Line, Col, Tlen, _, _) -> - yystate(30, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(34, [45|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(34, [46|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(34, [36|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(34, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(34, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 75 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(34, [C|Ics], Line, Col, Tlen, _, _) when C >= 77, C =< 90 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(34, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 107 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(34, [C|Ics], Line, Col, Tlen, _, _) when C >= 109, C =< 122 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(34, Ics, Line, Col, Tlen, _, _) -> - {29,Tlen,Ics,Line,Col,34}; -yystate(33, [115|Ics], Line, Col, Tlen, _, _) -> - yystate(37, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(33, [95|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(33, [83|Ics], Line, Col, Tlen, _, _) -> - yystate(37, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(33, [45|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(33, [46|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(33, [36|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(33, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(33, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 82 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(33, [C|Ics], Line, Col, Tlen, _, _) when C >= 84, C =< 90 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(33, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 114 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(33, [C|Ics], Line, Col, Tlen, _, _) when C >= 116, C =< 122 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(33, Ics, Line, Col, Tlen, _, _) -> - {29,Tlen,Ics,Line,Col,33}; -yystate(32, Ics, Line, Col, Tlen, _, _) -> - {18,Tlen,Ics,Line,Col}; -yystate(31, [62|Ics], Line, Col, Tlen, _, _) -> - yystate(27, Ics, Line, Col, Tlen+1, 17, Tlen); -yystate(31, [61|Ics], Line, Col, Tlen, _, _) -> - yystate(23, Ics, Line, Col, Tlen+1, 17, Tlen); -yystate(31, Ics, Line, Col, Tlen, _, _) -> - {17,Tlen,Ics,Line,Col,31}; -yystate(30, [108|Ics], Line, Col, Tlen, _, _) -> - yystate(26, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(30, [95|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(30, [76|Ics], Line, Col, Tlen, _, _) -> - yystate(26, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(30, [45|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(30, [46|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(30, [36|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(30, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(30, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 75 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(30, [C|Ics], Line, Col, Tlen, _, _) when C >= 77, C =< 90 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(30, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 107 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(30, [C|Ics], Line, Col, Tlen, _, _) when C >= 109, C =< 122 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(30, Ics, Line, Col, Tlen, _, _) -> - {29,Tlen,Ics,Line,Col,30}; -yystate(29, [95|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 11, Tlen); -yystate(29, [45|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 11, Tlen); -yystate(29, [46|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 11, Tlen); -yystate(29, [36|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 11, Tlen); -yystate(29, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> - yystate(60, Ics, Line, Col, Tlen+1, 11, Tlen); -yystate(29, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 90 -> - yystate(60, Ics, Line, Col, Tlen+1, 11, Tlen); -yystate(29, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 122 -> - yystate(60, Ics, Line, Col, Tlen+1, 11, Tlen); -yystate(29, Ics, Line, Col, Tlen, _, _) -> - {11,Tlen,Ics,Line,Col,29}; -yystate(28, Ics, Line, Col, Tlen, _, _) -> - {24,Tlen,Ics,Line,Col}; -yystate(27, Ics, Line, Col, Tlen, _, _) -> - {13,Tlen,Ics,Line,Col}; -yystate(26, [95|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 8, Tlen); -yystate(26, [45|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 8, Tlen); -yystate(26, [46|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 8, Tlen); -yystate(26, [36|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 8, Tlen); -yystate(26, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> - yystate(60, Ics, Line, Col, Tlen+1, 8, Tlen); -yystate(26, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 90 -> - yystate(60, Ics, Line, Col, Tlen+1, 8, Tlen); -yystate(26, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 122 -> - yystate(60, Ics, Line, Col, Tlen+1, 8, Tlen); -yystate(26, Ics, Line, Col, Tlen, _, _) -> - {8,Tlen,Ics,Line,Col,26}; -yystate(25, [101|Ics], Line, Col, Tlen, _, _) -> - yystate(29, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(25, [95|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(25, [69|Ics], Line, Col, Tlen, _, _) -> - yystate(29, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(25, [45|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(25, [46|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(25, [36|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(25, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(25, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 68 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(25, [C|Ics], Line, Col, Tlen, _, _) when C >= 70, C =< 90 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(25, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 100 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(25, [C|Ics], Line, Col, Tlen, _, _) when C >= 102, C =< 122 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(25, Ics, Line, Col, Tlen, _, _) -> - {29,Tlen,Ics,Line,Col,25}; -yystate(24, Ics, Line, Col, Tlen, _, _) -> - {19,Tlen,Ics,Line,Col}; -yystate(23, Ics, Line, Col, Tlen, _, _) -> - {15,Tlen,Ics,Line,Col}; -yystate(22, [116|Ics], Line, Col, Tlen, _, _) -> - yystate(18, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(22, [95|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(22, [84|Ics], Line, Col, Tlen, _, _) -> - yystate(18, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(22, [45|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(22, [46|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(22, [36|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(22, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(22, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 83 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(22, [C|Ics], Line, Col, Tlen, _, _) when C >= 85, C =< 90 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(22, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 115 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(22, [C|Ics], Line, Col, Tlen, _, _) when C >= 117, C =< 122 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(22, Ics, Line, Col, Tlen, _, _) -> - {29,Tlen,Ics,Line,Col,22}; -yystate(21, [115|Ics], Line, Col, Tlen, _, _) -> - yystate(25, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(21, [95|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(21, [83|Ics], Line, Col, Tlen, _, _) -> - yystate(25, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(21, [45|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(21, [46|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(21, [36|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(21, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(21, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 82 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(21, [C|Ics], Line, Col, Tlen, _, _) when C >= 84, C =< 90 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(21, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 114 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(21, [C|Ics], Line, Col, Tlen, _, _) when C >= 116, C =< 122 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(21, Ics, Line, Col, Tlen, _, _) -> - {29,Tlen,Ics,Line,Col,21}; -yystate(20, [101|Ics], Line, Col, Tlen, _, _) -> - yystate(3, Ics, Line, Col, Tlen+1, 26, Tlen); -yystate(20, [69|Ics], Line, Col, Tlen, _, _) -> - yystate(3, Ics, Line, Col, Tlen+1, 26, Tlen); -yystate(20, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> - yystate(20, Ics, Line, Col, Tlen+1, 26, Tlen); -yystate(20, Ics, Line, Col, Tlen, _, _) -> - {26,Tlen,Ics,Line,Col,20}; -yystate(19, [45|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(11, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(19, [43|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(11, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(19, [C|Ics], Line, Col, Tlen, Action, Alen) when C >= 48, C =< 57 -> - yystate(15, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(19, Ics, Line, Col, Tlen, Action, Alen) -> - {Action,Alen,Tlen,Ics,Line,Col,19}; -yystate(18, [95|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 3, Tlen); -yystate(18, [45|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 3, Tlen); -yystate(18, [46|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 3, Tlen); -yystate(18, [36|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 3, Tlen); -yystate(18, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> - yystate(60, Ics, Line, Col, Tlen+1, 3, Tlen); -yystate(18, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 90 -> - yystate(60, Ics, Line, Col, Tlen+1, 3, Tlen); -yystate(18, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 122 -> - yystate(60, Ics, Line, Col, Tlen+1, 3, Tlen); -yystate(18, Ics, Line, Col, Tlen, _, _) -> - {3,Tlen,Ics,Line,Col,18}; -yystate(17, [108|Ics], Line, Col, Tlen, _, _) -> - yystate(21, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(17, [95|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(17, [76|Ics], Line, Col, Tlen, _, _) -> - yystate(21, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(17, [45|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(17, [46|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(17, [36|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(17, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(17, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 75 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(17, [C|Ics], Line, Col, Tlen, _, _) when C >= 77, C =< 90 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(17, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 107 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(17, [C|Ics], Line, Col, Tlen, _, _) when C >= 109, C =< 122 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(17, Ics, Line, Col, Tlen, _, _) -> - {29,Tlen,Ics,Line,Col,17}; -yystate(16, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> - yystate(20, Ics, Line, Col, Tlen+1, 30, Tlen); -yystate(16, Ics, Line, Col, Tlen, _, _) -> - {30,Tlen,Ics,Line,Col,16}; -yystate(15, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> - yystate(15, Ics, Line, Col, Tlen+1, 27, Tlen); -yystate(15, Ics, Line, Col, Tlen, _, _) -> - {27,Tlen,Ics,Line,Col,15}; -yystate(14, [105|Ics], Line, Col, Tlen, _, _) -> - yystate(10, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(14, [95|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(14, [73|Ics], Line, Col, Tlen, _, _) -> - yystate(10, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(14, [45|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(14, [46|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(14, [36|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(14, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(14, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 72 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(14, [C|Ics], Line, Col, Tlen, _, _) when C >= 74, C =< 90 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(14, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 104 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(14, [C|Ics], Line, Col, Tlen, _, _) when C >= 106, C =< 122 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(14, Ics, Line, Col, Tlen, _, _) -> - {29,Tlen,Ics,Line,Col,14}; -yystate(13, [97|Ics], Line, Col, Tlen, _, _) -> - yystate(17, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(13, [95|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(13, [65|Ics], Line, Col, Tlen, _, _) -> - yystate(17, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(13, [45|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(13, [46|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(13, [36|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(13, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(13, [C|Ics], Line, Col, Tlen, _, _) when C >= 66, C =< 90 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(13, [C|Ics], Line, Col, Tlen, _, _) when C >= 98, C =< 122 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(13, Ics, Line, Col, Tlen, _, _) -> - {29,Tlen,Ics,Line,Col,13}; -yystate(12, Ics, Line, Col, Tlen, _, _) -> - {21,Tlen,Ics,Line,Col}; -yystate(11, [C|Ics], Line, Col, Tlen, Action, Alen) when C >= 48, C =< 57 -> - yystate(15, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(11, Ics, Line, Col, Tlen, Action, Alen) -> - {Action,Alen,Tlen,Ics,Line,Col,11}; -yystate(10, [107|Ics], Line, Col, Tlen, _, _) -> - yystate(6, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(10, [95|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(10, [75|Ics], Line, Col, Tlen, _, _) -> - yystate(6, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(10, [45|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(10, [46|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(10, [36|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(10, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(10, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 74 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(10, [C|Ics], Line, Col, Tlen, _, _) when C >= 76, C =< 90 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(10, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 106 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(10, [C|Ics], Line, Col, Tlen, _, _) when C >= 108, C =< 122 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(10, Ics, Line, Col, Tlen, _, _) -> - {29,Tlen,Ics,Line,Col,10}; -yystate(9, [95|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 6, Tlen); -yystate(9, [45|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 6, Tlen); -yystate(9, [46|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 6, Tlen); -yystate(9, [36|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 6, Tlen); -yystate(9, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> - yystate(60, Ics, Line, Col, Tlen+1, 6, Tlen); -yystate(9, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 90 -> - yystate(60, Ics, Line, Col, Tlen+1, 6, Tlen); -yystate(9, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 122 -> - yystate(60, Ics, Line, Col, Tlen+1, 6, Tlen); -yystate(9, Ics, Line, Col, Tlen, _, _) -> - {6,Tlen,Ics,Line,Col,9}; -yystate(8, [101|Ics], Line, Col, Tlen, _, _) -> - yystate(3, Ics, Line, Col, Tlen+1, 26, Tlen); -yystate(8, [69|Ics], Line, Col, Tlen, _, _) -> - yystate(3, Ics, Line, Col, Tlen+1, 26, Tlen); -yystate(8, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> - yystate(8, Ics, Line, Col, Tlen+1, 26, Tlen); -yystate(8, Ics, Line, Col, Tlen, _, _) -> - {26,Tlen,Ics,Line,Col,8}; -yystate(7, [101|Ics], Line, Col, Tlen, _, _) -> - yystate(19, Ics, Line, Col, Tlen+1, 25, Tlen); -yystate(7, [69|Ics], Line, Col, Tlen, _, _) -> - yystate(19, Ics, Line, Col, Tlen+1, 25, Tlen); -yystate(7, [46|Ics], Line, Col, Tlen, _, _) -> - yystate(8, Ics, Line, Col, Tlen+1, 25, Tlen); -yystate(7, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> - yystate(7, Ics, Line, Col, Tlen+1, 25, Tlen); -yystate(7, Ics, Line, Col, Tlen, _, _) -> - {25,Tlen,Ics,Line,Col,7}; -yystate(6, [101|Ics], Line, Col, Tlen, _, _) -> - yystate(2, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(6, [95|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(6, [69|Ics], Line, Col, Tlen, _, _) -> - yystate(2, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(6, [45|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(6, [46|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(6, [36|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(6, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(6, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 68 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(6, [C|Ics], Line, Col, Tlen, _, _) when C >= 70, C =< 90 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(6, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 100 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(6, [C|Ics], Line, Col, Tlen, _, _) when C >= 102, C =< 122 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(6, Ics, Line, Col, Tlen, _, _) -> - {29,Tlen,Ics,Line,Col,6}; -yystate(5, [95|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 7, Tlen); -yystate(5, [45|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 7, Tlen); -yystate(5, [46|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 7, Tlen); -yystate(5, [36|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 7, Tlen); -yystate(5, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> - yystate(60, Ics, Line, Col, Tlen+1, 7, Tlen); -yystate(5, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 90 -> - yystate(60, Ics, Line, Col, Tlen+1, 7, Tlen); -yystate(5, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 122 -> - yystate(60, Ics, Line, Col, Tlen+1, 7, Tlen); -yystate(5, Ics, Line, Col, Tlen, _, _) -> - {7,Tlen,Ics,Line,Col,5}; -yystate(4, [C|Ics], Line, Col, Tlen, Action, Alen) when C >= 48, C =< 57 -> - yystate(0, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(4, Ics, Line, Col, Tlen, Action, Alen) -> - {Action,Alen,Tlen,Ics,Line,Col,4}; -yystate(3, [45|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(4, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(3, [43|Ics], Line, Col, Tlen, Action, Alen) -> - yystate(4, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(3, [C|Ics], Line, Col, Tlen, Action, Alen) when C >= 48, C =< 57 -> - yystate(0, Ics, Line, Col, Tlen+1, Action, Alen); -yystate(3, Ics, Line, Col, Tlen, Action, Alen) -> - {Action,Alen,Tlen,Ics,Line,Col,3}; -yystate(2, [95|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 5, Tlen); -yystate(2, [45|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 5, Tlen); -yystate(2, [46|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 5, Tlen); -yystate(2, [36|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 5, Tlen); -yystate(2, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> - yystate(60, Ics, Line, Col, Tlen+1, 5, Tlen); -yystate(2, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 90 -> - yystate(60, Ics, Line, Col, Tlen+1, 5, Tlen); -yystate(2, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 122 -> - yystate(60, Ics, Line, Col, Tlen+1, 5, Tlen); -yystate(2, Ics, Line, Col, Tlen, _, _) -> - {5,Tlen,Ics,Line,Col,2}; -yystate(1, [115|Ics], Line, Col, Tlen, _, _) -> - yystate(5, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(1, [110|Ics], Line, Col, Tlen, _, _) -> - yystate(9, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(1, [95|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(1, [83|Ics], Line, Col, Tlen, _, _) -> - yystate(5, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(1, [78|Ics], Line, Col, Tlen, _, _) -> - yystate(9, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(1, [45|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(1, [46|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(1, [36|Ics], Line, Col, Tlen, _, _) -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(1, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(1, [C|Ics], Line, Col, Tlen, _, _) when C >= 65, C =< 77 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(1, [C|Ics], Line, Col, Tlen, _, _) when C >= 79, C =< 82 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(1, [C|Ics], Line, Col, Tlen, _, _) when C >= 84, C =< 90 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(1, [C|Ics], Line, Col, Tlen, _, _) when C >= 97, C =< 109 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(1, [C|Ics], Line, Col, Tlen, _, _) when C >= 111, C =< 114 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(1, [C|Ics], Line, Col, Tlen, _, _) when C >= 116, C =< 122 -> - yystate(60, Ics, Line, Col, Tlen+1, 29, Tlen); -yystate(1, Ics, Line, Col, Tlen, _, _) -> - {29,Tlen,Ics,Line,Col,1}; -yystate(0, [C|Ics], Line, Col, Tlen, _, _) when C >= 48, C =< 57 -> - yystate(0, Ics, Line, Col, Tlen+1, 26, Tlen); -yystate(0, Ics, Line, Col, Tlen, _, _) -> - {26,Tlen,Ics,Line,Col,0}; -yystate(S, Ics, Line, Col, Tlen, Action, Alen) -> - {Action,Alen,Tlen,Ics,Line,Col,S}. - -%% yyaction(Action, TokenLength, TokenChars, TokenLine, TokenCol) -> -%% {token,Token} | {end_token, Token} | skip_token | {error,String}. -%% Generated action function. - -yyaction(0, _, _, _, _) -> - yyaction_0(); -yyaction(1, _, _, TokenLine, _) -> - yyaction_1(TokenLine); -yyaction(2, _, _, TokenLine, _) -> - yyaction_2(TokenLine); -yyaction(3, _, _, TokenLine, _) -> - yyaction_3(TokenLine); -yyaction(4, _, _, TokenLine, _) -> - yyaction_4(TokenLine); -yyaction(5, _, _, TokenLine, _) -> - yyaction_5(TokenLine); -yyaction(6, _, _, TokenLine, _) -> - yyaction_6(TokenLine); -yyaction(7, _, _, TokenLine, _) -> - yyaction_7(TokenLine); -yyaction(8, _, _, TokenLine, _) -> - yyaction_8(TokenLine); -yyaction(9, _, _, TokenLine, _) -> - yyaction_9(TokenLine); -yyaction(10, _, _, TokenLine, _) -> - yyaction_10(TokenLine); -yyaction(11, _, _, TokenLine, _) -> - yyaction_11(TokenLine); -yyaction(12, _, _, TokenLine, _) -> - yyaction_12(TokenLine); -yyaction(13, _, _, TokenLine, _) -> - yyaction_13(TokenLine); -yyaction(14, _, _, TokenLine, _) -> - yyaction_14(TokenLine); -yyaction(15, _, _, TokenLine, _) -> - yyaction_15(TokenLine); -yyaction(16, _, _, TokenLine, _) -> - yyaction_16(TokenLine); -yyaction(17, _, _, TokenLine, _) -> - yyaction_17(TokenLine); -yyaction(18, _, _, TokenLine, _) -> - yyaction_18(TokenLine); -yyaction(19, _, _, TokenLine, _) -> - yyaction_19(TokenLine); -yyaction(20, _, _, TokenLine, _) -> - yyaction_20(TokenLine); -yyaction(21, _, _, TokenLine, _) -> - yyaction_21(TokenLine); -yyaction(22, _, _, TokenLine, _) -> - yyaction_22(TokenLine); -yyaction(23, _, _, TokenLine, _) -> - yyaction_23(TokenLine); -yyaction(24, _, _, TokenLine, _) -> - yyaction_24(TokenLine); -yyaction(25, TokenLen, YYtcs, TokenLine, _) -> - TokenChars = yypre(YYtcs, TokenLen), - yyaction_25(TokenChars, TokenLine); -yyaction(26, TokenLen, YYtcs, TokenLine, _) -> - TokenChars = yypre(YYtcs, TokenLen), - yyaction_26(TokenChars, TokenLine); -yyaction(27, TokenLen, YYtcs, TokenLine, _) -> - TokenChars = yypre(YYtcs, TokenLen), - yyaction_27(TokenChars, TokenLine); -yyaction(28, TokenLen, YYtcs, TokenLine, _) -> - TokenChars = yypre(YYtcs, TokenLen), - yyaction_28(TokenChars, TokenLine); -yyaction(29, TokenLen, YYtcs, TokenLine, _) -> - TokenChars = yypre(YYtcs, TokenLen), - yyaction_29(TokenChars, TokenLine); -yyaction(30, TokenLen, YYtcs, _, _) -> - TokenChars = yypre(YYtcs, TokenLen), - yyaction_30(TokenChars); -yyaction(_, _, _, _, _) -> error. - --compile({inline,yyaction_0/0}). --file("rabbit_jms_selector_lexer.xrl", 20). -yyaction_0() -> - skip_token . - --compile({inline,yyaction_1/1}). --file("rabbit_jms_selector_lexer.xrl", 23). -yyaction_1(TokenLine) -> - { token, { 'AND', TokenLine } } . - --compile({inline,yyaction_2/1}). --file("rabbit_jms_selector_lexer.xrl", 24). -yyaction_2(TokenLine) -> - { token, { 'OR', TokenLine } } . - --compile({inline,yyaction_3/1}). --file("rabbit_jms_selector_lexer.xrl", 25). -yyaction_3(TokenLine) -> - { token, { 'NOT', TokenLine } } . - --compile({inline,yyaction_4/1}). --file("rabbit_jms_selector_lexer.xrl", 28). -yyaction_4(TokenLine) -> - { token, { 'BETWEEN', TokenLine } } . - --compile({inline,yyaction_5/1}). --file("rabbit_jms_selector_lexer.xrl", 29). -yyaction_5(TokenLine) -> - { token, { 'LIKE', TokenLine } } . - --compile({inline,yyaction_6/1}). --file("rabbit_jms_selector_lexer.xrl", 30). -yyaction_6(TokenLine) -> - { token, { 'IN', TokenLine } } . - --compile({inline,yyaction_7/1}). --file("rabbit_jms_selector_lexer.xrl", 31). -yyaction_7(TokenLine) -> - { token, { 'IS', TokenLine } } . - --compile({inline,yyaction_8/1}). --file("rabbit_jms_selector_lexer.xrl", 32). -yyaction_8(TokenLine) -> - { token, { 'NULL', TokenLine } } . - --compile({inline,yyaction_9/1}). --file("rabbit_jms_selector_lexer.xrl", 33). -yyaction_9(TokenLine) -> - { token, { 'ESCAPE', TokenLine } } . - --compile({inline,yyaction_10/1}). --file("rabbit_jms_selector_lexer.xrl", 36). -yyaction_10(TokenLine) -> - { token, { boolean, TokenLine, true } } . - --compile({inline,yyaction_11/1}). --file("rabbit_jms_selector_lexer.xrl", 37). -yyaction_11(TokenLine) -> - { token, { boolean, TokenLine, false } } . - --compile({inline,yyaction_12/1}). --file("rabbit_jms_selector_lexer.xrl", 40). -yyaction_12(TokenLine) -> - { token, { '=', TokenLine } } . - --compile({inline,yyaction_13/1}). --file("rabbit_jms_selector_lexer.xrl", 41). -yyaction_13(TokenLine) -> - { token, { '<>', TokenLine } } . - --compile({inline,yyaction_14/1}). --file("rabbit_jms_selector_lexer.xrl", 42). -yyaction_14(TokenLine) -> - { token, { '>=', TokenLine } } . - --compile({inline,yyaction_15/1}). --file("rabbit_jms_selector_lexer.xrl", 43). -yyaction_15(TokenLine) -> - { token, { '<=', TokenLine } } . - --compile({inline,yyaction_16/1}). --file("rabbit_jms_selector_lexer.xrl", 44). -yyaction_16(TokenLine) -> - { token, { '>', TokenLine } } . - --compile({inline,yyaction_17/1}). --file("rabbit_jms_selector_lexer.xrl", 45). -yyaction_17(TokenLine) -> - { token, { '<', TokenLine } } . - --compile({inline,yyaction_18/1}). --file("rabbit_jms_selector_lexer.xrl", 48). -yyaction_18(TokenLine) -> - { token, { '+', TokenLine } } . - --compile({inline,yyaction_19/1}). --file("rabbit_jms_selector_lexer.xrl", 49). -yyaction_19(TokenLine) -> - { token, { '-', TokenLine } } . - --compile({inline,yyaction_20/1}). --file("rabbit_jms_selector_lexer.xrl", 50). -yyaction_20(TokenLine) -> - { token, { '*', TokenLine } } . - --compile({inline,yyaction_21/1}). --file("rabbit_jms_selector_lexer.xrl", 51). -yyaction_21(TokenLine) -> - { token, { '/', TokenLine } } . - --compile({inline,yyaction_22/1}). --file("rabbit_jms_selector_lexer.xrl", 54). -yyaction_22(TokenLine) -> - { token, { '(', TokenLine } } . - --compile({inline,yyaction_23/1}). --file("rabbit_jms_selector_lexer.xrl", 55). -yyaction_23(TokenLine) -> - { token, { ')', TokenLine } } . - --compile({inline,yyaction_24/1}). --file("rabbit_jms_selector_lexer.xrl", 56). -yyaction_24(TokenLine) -> - { token, { ',', TokenLine } } . - --compile({inline,yyaction_25/2}). --file("rabbit_jms_selector_lexer.xrl", 59). -yyaction_25(TokenChars, TokenLine) -> - { token, { integer, TokenLine, list_to_integer (TokenChars) } } . - --compile({inline,yyaction_26/2}). --file("rabbit_jms_selector_lexer.xrl", 60). -yyaction_26(TokenChars, TokenLine) -> - { token, { float, TokenLine, list_to_float (to_float (TokenChars)) } } . - --compile({inline,yyaction_27/2}). --file("rabbit_jms_selector_lexer.xrl", 61). -yyaction_27(TokenChars, TokenLine) -> - { token, { float, TokenLine, parse_scientific_notation (TokenChars) } } . - --compile({inline,yyaction_28/2}). --file("rabbit_jms_selector_lexer.xrl", 62). -yyaction_28(TokenChars, TokenLine) -> - { token, { string, TokenLine, process_string (TokenChars) } } . - --compile({inline,yyaction_29/2}). --file("rabbit_jms_selector_lexer.xrl", 63). -yyaction_29(TokenChars, TokenLine) -> - { token, { identifier, TokenLine, unicode : characters_to_binary (TokenChars) } } . - --compile({inline,yyaction_30/1}). --file("rabbit_jms_selector_lexer.xrl", 66). -yyaction_30(TokenChars) -> - { error, { illegal_character, TokenChars } } . --file("leexinc.hrl", 377). diff --git a/deps/rabbit/src/rabbit_jms_selector_lexer.xrl b/deps/rabbit/src/rabbit_jms_selector_lexer.xrl deleted file mode 100644 index 423a0f2b8d0..00000000000 --- a/deps/rabbit/src/rabbit_jms_selector_lexer.xrl +++ /dev/null @@ -1,102 +0,0 @@ -%%% This is the definitions file for JMS message selectors: -%%% https://jakarta.ee/specifications/messaging/3.1/jakarta-messaging-spec-3.1#message-selector -%%% -%%% To manually generate the scanner file rabbit_jms_selector_lexer.erl run: -%%% leex:file("rabbit_jms_selector_lexer.xrl", [deterministic]). - -Definitions. -WHITESPACE = [\s\t\f\n\r] -DIGIT = [0-9] -INT = {DIGIT}+ -% Approximate numeric literal with a decimal -FLOAT = ({DIGIT}+\.{DIGIT}*|\.{DIGIT}+)([eE][\+\-]?{INT})? -% Approximate numeric literal in scientific notation without a decimal -EXPONENT = {DIGIT}+[eE][\+\-]?{DIGIT}+ -% We extend the allowed JMS identifier syntax with '.' and '-' even though -% these two characters return false for Character.isJavaIdentifierPart() -% to allow identifiers such as properties.group-id -IDENTIFIER = [a-zA-Z_$][a-zA-Z0-9_$.\-]* -STRING = '([^']|'')*' - -Rules. -{WHITESPACE}+ : skip_token. - -% Logical operators (case insensitive) -[aA][nN][dD] : {token, {'AND', TokenLine}}. -[oO][rR] : {token, {'OR', TokenLine}}. -[nN][oO][tT] : {token, {'NOT', TokenLine}}. - -% Special operators (case insensitive) -[bB][eE][tT][wW][eE][eE][nN] : {token, {'BETWEEN', TokenLine}}. -[lL][iI][kK][eE] : {token, {'LIKE', TokenLine}}. -[iI][nN] : {token, {'IN', TokenLine}}. -[iI][sS] : {token, {'IS', TokenLine}}. -[nN][uU][lL][lL] : {token, {'NULL', TokenLine}}. -[eE][sS][cC][aA][pP][eE] : {token, {'ESCAPE', TokenLine}}. - -% Boolean literals (case insensitive) -[tT][rR][uU][eE] : {token, {boolean, TokenLine, true}}. -[fF][aA][lL][sS][eE] : {token, {boolean, TokenLine, false}}. - -% Comparison operators -= : {token, {'=', TokenLine}}. -<> : {token, {'<>', TokenLine}}. ->= : {token, {'>=', TokenLine}}. -<= : {token, {'<=', TokenLine}}. -> : {token, {'>', TokenLine}}. -< : {token, {'<', TokenLine}}. - -% Arithmetic operators -\+ : {token, {'+', TokenLine}}. -- : {token, {'-', TokenLine}}. -\* : {token, {'*', TokenLine}}. -/ : {token, {'/', TokenLine}}. - -% Parentheses and comma -\( : {token, {'(', TokenLine}}. -\) : {token, {')', TokenLine}}. -, : {token, {',', TokenLine}}. - -% Literals -{INT} : {token, {integer, TokenLine, list_to_integer(TokenChars)}}. -{FLOAT} : {token, {float, TokenLine, list_to_float(to_float(TokenChars))}}. -{EXPONENT} : {token, {float, TokenLine, parse_scientific_notation(TokenChars)}}. -{STRING} : {token, {string, TokenLine, process_string(TokenChars)}}. -{IDENTIFIER} : {token, {identifier, TokenLine, unicode:characters_to_binary(TokenChars)}}. - -% Catch any other characters as errors -. : {error, {illegal_character, TokenChars}}. - -Erlang code. - -%% "Approximate literals use the Java floating-point literal syntax." -to_float([$. | _] = Chars) -> - %% . Digits [ExponentPart] - "0" ++ Chars; -to_float(Chars) -> - %% Digits . [Digits] [ExponentPart] - case lists:last(Chars) of - $. -> - Chars ++ "0"; - _ -> - Chars1 = string:lowercase(Chars), - Chars2 = string:replace(Chars1, ".e", ".0e"), - lists:flatten(Chars2) - end. - -parse_scientific_notation(Chars) -> - Str = string:lowercase(Chars), - {Before, After0} = lists:splitwith(fun(C) -> C =/= $e end, Str), - [$e | After] = After0, - Base = list_to_integer(Before), - Exp = list_to_integer(After), - Base * math:pow(10, Exp). - -process_string(Chars) -> - %% remove surrounding quotes - Chars1 = lists:sublist(Chars, 2, length(Chars) - 2), - Bin = unicode:characters_to_binary(Chars1), - process_escaped_quotes(Bin). - -process_escaped_quotes(Binary) -> - binary:replace(Binary, <<"''">>, <<"'">>, [global]). diff --git a/deps/rabbit/src/rabbit_stream_queue.erl b/deps/rabbit/src/rabbit_stream_queue.erl index 8421cd0b432..3a14d63c00e 100644 --- a/deps/rabbit/src/rabbit_stream_queue.erl +++ b/deps/rabbit/src/rabbit_stream_queue.erl @@ -1344,9 +1344,10 @@ capabilities() -> consumer_arguments => [<<"x-stream-offset">>, <<"x-stream-filter">>, <<"x-stream-match-unfiltered">>], - %% AMQP property filter expressions - %% https://groups.oasis-open.org/higherlogic/ws/public/document?document_id=66227 - amqp_capabilities => [<<"AMQP_FILTEX_PROP_V1_0">>], + %% [Filter-Expressions-v1.0] § 2.2 + %% https://docs.oasis-open.org/amqp/filtex/v1.0/csd01/filtex-v1.0-csd01.html#_Toc67929253 + amqp_capabilities => [<<"AMQP_FILTEX_PROP_V1_0">>, + <<"AMQP_FILTEX_SQL_V1_0">>], server_named => false, rebalance_module => ?MODULE, can_redeliver => true, diff --git a/deps/rabbit/test/amqp_filter_sql_SUITE.erl b/deps/rabbit/test/amqp_filter_sql_SUITE.erl index 97820f6c66e..07222ad5d36 100644 --- a/deps/rabbit/test/amqp_filter_sql_SUITE.erl +++ b/deps/rabbit/test/amqp_filter_sql_SUITE.erl @@ -94,7 +94,7 @@ multiple_sections(Config) -> {ok, Sender} = amqp10_client:attach_sender_link(Session, <<"sender">>, Address), ok = wait_for_credit(Sender), - Now = erlang:system_time(millisecond), + Now = os:system_time(millisecond), To = rabbitmq_amqp_address:exchange(<<"some exchange">>, <<"routing key">>), ReplyTo = rabbitmq_amqp_address:queue(<<"some queue">>), @@ -155,19 +155,19 @@ multiple_sections(Config) -> Filter2 = filter( <<"header.priority = 200 AND " - "properties.message-id = 999 AND " - "properties.user-id = 'guest' AND " - "properties.to LIKE '/exch_nges/some=%20exchange/rout%' ESCAPE '=' AND " - "properties.subject = '🐇' AND " - "properties.reply-to LIKE '/queues/some%' AND " - "properties.correlation-id IN ('corr-345', 'corr-123') AND " - "properties.content-type = 'text/plain' AND " - "properties.content-encoding = 'some encoding' AND " - "properties.absolute-expiry-time > 0 AND " - "properties.creation-time > 0 AND " - "properties.group-id IS NOT NULL AND " - "properties.group-sequence = 4294967295 AND " - "properties.reply-to-group-id = 'other group ID' AND " + "p.message_id = 999 AND " + "p.user_id = 0x6775657374 AND " + "p.to LIKE '/exch_nges/some=%20exchange/rout%' ESCAPE '=' AND " + "p.subject = '🐇' AND " + "p.reply_to LIKE '/queues/some%' AND " + "p.correlation_id IN ('corr-345', 'corr-123') AND " + "p.content_type = 'text/plain' AND " + "p.content_encoding = 'some encoding' AND " + "p.absolute_expiry_time > UTC() AND " + "p.creation_time > UTC() - 60000 AND " + "p.group_id IS NOT NULL AND " + "p.group_sequence = 4294967295 AND " + "p.reply_to_group_id = 'other group ID' AND " "k1 < 0 AND " "NOT k2 AND " "k3 AND " @@ -239,7 +239,7 @@ filter_few_messages_from_many(Config) -> %% Our filter should cause us to receive only the first and %% last message out of the 1002 messages in the stream. - Filter = filter(<<"properties.group-id is not null">>), + Filter = filter(<<"properties.group_id IS NOT NULL">>), {ok, Receiver} = amqp10_client:attach_receiver_link( Session, <<"receiver">>, Address, unsettled, configuration, Filter), @@ -338,7 +338,7 @@ invalid_filter(Config) -> #{arguments => #{<<"x-queue-type">> => {utf8, <<"stream">>}}}), %% Trigger a lexer error. - Filter1 = #{?FILTER_NAME_SQL => #filter{descriptor = ?DESCRIPTOR_CODE_SELECTOR_FILTER, + Filter1 = #{?FILTER_NAME_SQL => #filter{descriptor = ?DESCRIPTOR_CODE_SQL_FILTER, value = {utf8, <<"@#$%^&">>}}}, {ok, Receiver1} = amqp10_client:attach_receiver_link( Session, <<"receiver 1">>, Address, @@ -356,7 +356,7 @@ invalid_filter(Config) -> ok = detach_link_sync(Receiver1), %% Trigger a parser error. We use allowed tokens here, but the grammar is incorrect. - Filter2 = #{?FILTER_NAME_SQL => #filter{descriptor = ?DESCRIPTOR_CODE_SELECTOR_FILTER, + Filter2 = #{?FILTER_NAME_SQL => #filter{descriptor = ?DESCRIPTOR_CODE_SQL_FILTER, value = {utf8, <<"FALSE FALSE">>}}}, {ok, Receiver2} = amqp10_client:attach_receiver_link( Session, <<"receiver 2">>, Address, @@ -375,7 +375,7 @@ invalid_filter(Config) -> PropsFilter = [{{symbol, <<"subject">>}, {utf8, <<"some subject">>}}], Filter3 = #{<<"prop name">> => #filter{descriptor = ?DESCRIPTOR_NAME_PROPERTIES_FILTER, value = {map, PropsFilter}}, - ?FILTER_NAME_SQL => #filter{descriptor = ?DESCRIPTOR_CODE_SELECTOR_FILTER, + ?FILTER_NAME_SQL => #filter{descriptor = ?DESCRIPTOR_CODE_SQL_FILTER, value = {utf8, <<"TRUE">>}}}, {ok, Receiver3} = amqp10_client:attach_receiver_link( Session, <<"receiver 3">>, Address, @@ -393,7 +393,7 @@ invalid_filter(Config) -> %% Send invalid UTF-8 in the SQL expression. InvalidUTF8 = <<255>>, - Filter4 = #{?FILTER_NAME_SQL => #filter{descriptor = ?DESCRIPTOR_CODE_SELECTOR_FILTER, + Filter4 = #{?FILTER_NAME_SQL => #filter{descriptor = ?DESCRIPTOR_CODE_SQL_FILTER, value = {utf8, InvalidUTF8}}}, {ok, Receiver4} = amqp10_client:attach_receiver_link( Session, <<"receiver 4">>, Address, @@ -432,7 +432,7 @@ filter(String) when is_binary(String) -> #{<<"from start">> => #filter{descriptor = <<"rabbitmq:stream-offset-spec">>, value = {symbol, <<"first">>}}, - ?FILTER_NAME_SQL => #filter{descriptor = ?DESCRIPTOR_NAME_SELECTOR_FILTER, + ?FILTER_NAME_SQL => #filter{descriptor = ?DESCRIPTOR_NAME_SQL_FILTER, value = {utf8, String}}}. assert_credit_exhausted(Receiver, Line) -> diff --git a/deps/rabbit/test/amqp_jms_unit_SUITE.erl b/deps/rabbit/test/amqp_filter_sql_unit_SUITE.erl similarity index 57% rename from deps/rabbit/test/amqp_jms_unit_SUITE.erl rename to deps/rabbit/test/amqp_filter_sql_unit_SUITE.erl index c453b23eb94..7e94ea67362 100644 --- a/deps/rabbit/test/amqp_jms_unit_SUITE.erl +++ b/deps/rabbit/test/amqp_filter_sql_unit_SUITE.erl @@ -4,7 +4,7 @@ %% %% Copyright (c) 2007-2025 Broadcom. All Rights Reserved. The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. All rights reserved. --module(amqp_jms_unit_SUITE). +-module(amqp_filter_sql_unit_SUITE). -compile([export_all, nowarn_export_all]). @@ -27,10 +27,11 @@ groups() -> logical_operators, comparison_operators, arithmetic_operators, - string_comparison, + single_quoted_strings, + double_quoted_strings, + binary_constants, like_operator, in_operator, - between_operator, null_handling, literals, scientific_notation, @@ -39,10 +40,12 @@ groups() -> complex_expressions, case_sensitivity, whitespace_handling, - identifier_rules, + identifiers, header_section, properties_section, multiple_sections, + section_qualifier, + utc_function, parse_errors ] }]. @@ -116,20 +119,29 @@ comparison_operators(_Config) -> %% Inequality true = match("country <> 'US'", app_props()), + true = match("country != 'US'", app_props()), false = match("country <> 'UK'", app_props()), + false = match("country != 'UK'", app_props()), %% Greater than true = match("weight > 3", app_props()), false = match("weight > 5", app_props()), + true = match("country > 'DE'", app_props()), + false = match("country > 'US'", app_props()), + true = match("'Zurich' > city", app_props()), %% Less than true = match("weight < 10", app_props()), false = match("weight < 5", app_props()), + true = match("country < 'US'", app_props()), + false = match("country < 'DE'", app_props()), %% Greater than or equal true = match("weight >= 5", app_props()), true = match("weight >= 4", app_props()), false = match("weight >= 6", app_props()), + true = match("country >= 'UK'", app_props()), + true = match("country >= 'DE'", app_props()), %% "Only like type values can be compared. One exception is that it is %% valid to compare exact numeric values and approximate numeric value" true = match("weight >= 5.0", app_props()), @@ -147,30 +159,29 @@ comparison_operators(_Config) -> false = match("weight <= 4", app_props()), true = match("price <= 10.6", app_props()), false = match("price <= 10", app_props()), + true = match("country <= 'US'", app_props()), + true = match("country <= 'UK'", app_props()), + false = match("country <= 'DE'", app_props()), - %% "String and Boolean comparison is restricted to = and <>." + %% "Boolean comparison is restricted to = and <>." %% "If the comparison of non-like type values is attempted, the value of the operation is false." - true = match("active = true", app_props()), - true = match("premium = false", app_props()), - false = match("premium <> false", app_props()), + true = match("active = TRUE", app_props()), + true = match("premium = FALSE", app_props()), + false = match("premium <> FALSE", app_props()), false = match("premium >= 'false'", app_props()), false = match("premium <= 'false'", app_props()), false = match("premium >= 0", app_props()), false = match("premium <= 0", app_props()), - false = match("country >= 'UK'", app_props()), - false = match("country > 'UA'", app_props()), - false = match("country >= 'UA'", app_props()), - false = match("country < 'UA'", app_props()), - false = match("country <= 'UA'", app_props()), - false = match("country < 'UL'", app_props()), - false = match("country < true", app_props()), - false = match("weight = '5'", app_props()), false = match("weight >= '5'", app_props()), false = match("weight <= '5'", app_props()), + false = match("country <= TRUE", app_props()), + false = match("country >= TRUE", app_props()), false = match("country > 1", app_props()), - false = match("country < 1", app_props()). + false = match("country >= 1", app_props()), + false = match("country < 1", app_props()), + false = match("country <= 1", app_props()). arithmetic_operators(_Config) -> %% Addition @@ -191,6 +202,18 @@ arithmetic_operators(_Config) -> true = match("quantity / 10 = 10", app_props()), true = match("quantity / 10 = 10.000", app_props()), + %% Modulo + true = match("weight % 2 = 1", app_props()), + true = match("quantity % weight = 0.00", app_props()), + true = match("score = quantity % quantity", app_props()), + true = match("quantity % percentage = 25", app_props()), + true = match("24 < quantity % percentage", app_props()), + true = match("7 % temperature = 2", app_props()), % mod negative number + false = match("quantity % score = 0", app_props()), % mod 0 + true = match("101 % percentage % weight = 1", app_props()), % left associative + true = match("(quantity + 1) % percentage % weight = 1", app_props()), + true = match("101 % (percentage % 30) = 11", app_props()), + %% Nested arithmetic true = match("(weight + 5) * 2 = 20", app_props()), true = match("price / (weight - 3) = 5.25", app_props()), @@ -220,19 +243,176 @@ arithmetic_operators(_Config) -> false = match("absent + 4 = 5", app_props()), false = match("2 * absent = 0", app_props()). -string_comparison(_Config) -> +single_quoted_strings(_Config) -> %% "Two strings are equal if and only if they contain the same sequence of characters." false = match("country = '🇬🇧'", app_props()), true = match("country = '🇬🇧'", [{{utf8, <<"country">>}, {utf8, <<"🇬🇧"/utf8>>}}]), - %% "A string literal is enclosed in single quotes, with an included - %% single quote represented by doubled single quote" + %% "A quotation mark inside the string is represented by two consecutive quotation marks." true = match("'UK''s' = 'UK''s'", app_props()), true = match("country = 'UK''s'", [{{utf8, <<"country">>}, {utf8, <<"UK's">>}}]), true = match("country = '🇬🇧''s'", [{{utf8, <<"country">>}, {utf8, <<"🇬🇧's"/utf8>>}}]), true = match("country = ''", [{{utf8, <<"country">>}, {utf8, <<>>}}]), true = match("country = ''''", [{{utf8, <<"country">>}, {utf8, <<$'>>}}]). +double_quoted_strings(_Config) -> + %% Basic double-quoted string equality + true = match("\"UK\" = \"UK\""), + true = match("country = \"UK\"", app_props()), + false = match("country = \"US\"", app_props()), + + %% Mix of single and double quotes + true = match("'UK' = \"UK\""), + true = match("\"UK\" = 'UK'"), + true = match("country = 'UK' AND country = \"UK\"", app_props()), + + %% Empty strings + true = match("\"\" = ''"), + true = match("\"\" = country", [{{utf8, <<"country">>}, {utf8, <<>>}}]), + true = match("'' = country", [{{utf8, <<"country">>}, {utf8, <<>>}}]), + + %% Escaped quotes inside strings + true = match("country = \"UK\"\"s\"", [{{utf8, <<"country">>}, {utf8, <<"UK\"s">>}}]), + true = match("country = \"\"\"\"", [{{utf8, <<"country">>}, {utf8, <<$">>}}]), + true = match("country = \"\"\"\"\"\"", [{{utf8, <<"country">>}, {utf8, <<$", $">>}}]), + true = match(" \"\"\"\"\"\" = '\"\"' "), + true = match("\"UK\"\"s\" = \"UK\"\"s\""), + true = match("\"They said \"\"Hello\"\"\" = key", [{{utf8, <<"key">>}, {utf8, <<"They said \"Hello\"">>}}]), + + %% Single quotes inside double-quoted strings (no escaping needed) + true = match("country = \"UK's\"", [{{utf8, <<"country">>}, {utf8, <<"UK's">>}}]), + true = match("key = \"It's working\"", [{{utf8, <<"key">>}, {utf8, <<"It's working">>}}]), + + %% Double quotes inside single-quoted strings (no escaping needed) + true = match("country = 'UK\"s'", [{{utf8, <<"country">>}, {utf8, <<"UK\"s">>}}]), + true = match("key = 'They said \"Hello\"'", [{{utf8, <<"key">>}, {utf8, <<"They said \"Hello\"">>}}]), + + %% LIKE operator with double-quoted strings + true = match("description LIKE \"%test%\"", app_props()), + true = match("description LIKE \"This is a %\"", app_props()), + true = match("country LIKE \"U_\"", app_props()), + true = match("country LIKE \"UK\"", app_props()), + false = match("country LIKE \"US\"", app_props()), + + %% ESCAPE with double-quoted strings + true = match("product_id LIKE \"ABC\\_%\" ESCAPE \"\\\"", app_props()), + true = match("key LIKE \"z_%\" ESCAPE \"z\"", [{{utf8, <<"key">>}, {utf8, <<"_foo">>}}]), + + %% IN operator with double-quoted strings + true = match("country IN (\"US\", \"UK\", \"France\")", app_props()), + true = match("country IN ('US', \"UK\", 'France')", app_props()), + true = match("\"London\" IN (city, country)", app_props()), + false = match("country IN (\"US\", \"France\")", app_props()), + + %% NOT LIKE with double-quoted strings + true = match("country NOT LIKE \"US\"", app_props()), + false = match("country NOT LIKE \"U_\"", app_props()), + + %% Complex expressions with double-quoted strings + true = match("country = \"UK\" AND description LIKE \"%test%\" AND city = 'London'", app_props()), + true = match("(country IN (\"UK\", \"US\") OR city = \"London\") AND weight > 3", app_props()), + + %% Unicode in double-quoted strings + true = match("country = \"🇬🇧\"", [{{utf8, <<"country">>}, {utf8, <<"🇬🇧"/utf8>>}}]), + true = match("\"🇬🇧\" = '🇬🇧'"), + false = match("\"🇬🇧\" != '🇬🇧'"), + true = match("country = \"🇬🇧\"\"s\"", [{{utf8, <<"country">>}, {utf8, <<"🇬🇧\"s"/utf8>>}}]), + + %% Whitespace inside double-quoted strings + true = match("description = \"This is a test message\"", app_props()), + true = match("key = \" spaces \"", [{{utf8, <<"key">>}, {utf8, <<" spaces ">>}}]), + + %% Properties section with double-quoted strings + Props = #'v1_0.properties'{ + message_id = {utf8, <<"id-123">>}, + subject = {utf8, <<"test">>} + }, + true = match("p.message_id = \"id-123\"", Props, []), + true = match("p.subject = \"test\"", Props, []), + true = match("p.message_id = 'id-123' AND p.subject = \"test\"", Props, []), + + true = match("country < \"US\"", app_props()), + true = match("\"US\" >= country", app_props()), + ok. + +binary_constants(_Config) -> + true = match("0x48656C6C6F = 0x48656C6C6F", app_props()), % "Hello" = "Hello" + false = match("0x48656C6C6F = 0x48656C6C6F21", app_props()), % "Hello" != "Hello!" + + AppProps = [ + {{utf8, <<"data">>}, {binary, <<"Hello">>}}, + {{utf8, <<"signature">>}, {binary, <<16#DE, 16#AD, 16#BE, 16#EF>>}}, + {{utf8, <<"empty">>}, {binary, <<>>}}, + {{utf8, <<"single">>}, {binary, <<255>>}}, + {{utf8, <<"zeros">>}, {binary, <<0, 0, 0>>}} + ], + + true = match("data = 0x48656C6C6F", AppProps), % data = "Hello" + false = match("data = 0x48656C6C", AppProps), % data != "Hell" + true = match("signature = 0xDEADBEEF", AppProps), + false = match("signature = 0xDEADBEEE", AppProps), + true = match("single = 0xFF", AppProps), + false = match("single = 0xFE", AppProps), + true = match("zeros = 0x000000", AppProps), + false = match("empty = 0x00", AppProps), + + true = match("signature IN (0xCAFEBABE, 0xDEADBEEF)", AppProps), + false = match("signature IN (0xCAFEBABE, 0xFEEDFACE)", AppProps), + true = match("data IN (0x48656C6C6F, 0x576F726C64)", AppProps), % "Hello" or "World" + true = match("data IN (data)", AppProps), + + true = match("signature NOT IN (0xCAFEBABE, 0xFEEDFACE)", AppProps), + false = match("signature NOT IN (0xDEADBEEF, 0xCAFEBABE)", AppProps), + + true = match("0xAB <> 0xAC", AppProps), + true = match("0xAB != 0xAC", AppProps), + false = match("0xAB = 0xAC", AppProps), + + true = match("data = 0x48656C6C6F AND signature = 0xDEADBEEF", AppProps), + true = match("data = 0x576F726C64 OR data = 0x48656C6C6F", AppProps), + false = match("data = 0x576F726C64 AND signature = 0xDEADBEEF", AppProps), + + true = match("missing_binary IS NULL", AppProps), + false = match("data IS NULL", AppProps), + true = match("data IS NOT NULL", AppProps), + + Props = #'v1_0.properties'{ + user_id = {binary, <<255>>}, + correlation_id = {binary, <<"correlation">>} + }, + true = match("p.user_id = 0xFF", Props, []), + false = match("p.user_id = 0xAA", Props, []), + true = match("p.correlation_id = 0x636F7272656C6174696F6E", Props, []), + + true = match( + "(data = 0x576F726C64 OR data = 0x48656C6C6F) AND signature IN (0xDEADBEEF, 0xCAFEBABE)", + AppProps + ), + + %% Whitespace around binary constants + true = match("signature = 0xDEADBEEF", AppProps), + true = match("signature=0xDEADBEEF", AppProps), + true = match("signature = 0xDEADBEEF", AppProps), + + false = match("weight = 0x05", app_props()), % number != binary + false = match("active = 0x01", app_props()), % boolean != binary + + %% Arithmetic operations with binary constants should fail + %% since binaries are not numerical values. + false = match("0x01 + 0x02 = 0x03", AppProps), + false = match("signature + 1 = 0xDEADBEF0", AppProps), + + %% "The left operand is of greater value than the right operand if: + %% the left operand is of the same type as the right operand and the value is greater" + true = match("0xBB > 0xAA", AppProps), + true = match("0x010101 > zeros", AppProps), + true = match("0x010101 >= zeros", AppProps), + false = match("0x010101 < zeros", AppProps), + false = match("0x010101 <= zeros", AppProps), + true = match("0xFE < single", AppProps), + true = match("0xFE <= single", AppProps), + ok. + like_operator(_Config) -> %% Basic LIKE operations true = match("description LIKE '%test%'", app_props()), @@ -330,12 +510,25 @@ in_operator(_Config) -> true = match("country IN ('UK')", app_props()), true = match("country IN ('🇫🇷', '🇬🇧')", AppPropsUtf8), false = match("country IN ('US', 'France')", app_props()), + true = match("'London' IN (city, country)", app_props()), + + true = match("price IN (h.priority - 0.5)", + #'v1_0.header'{priority = {ubyte, 11}}, #'v1_0.properties'{}, app_props()), + false = match("price IN (h.priority + 0.5)", + #'v1_0.header'{priority = {ubyte, 11}}, #'v1_0.properties'{}, app_props()), + true = match("10.0 IN (TRUE, p.group_sequence)", + #'v1_0.properties'{group_sequence = {uint, 10}}, app_props()), + true = match("10.00 IN (FALSE, p.group_sequence)", + #'v1_0.properties'{group_sequence = {uint, 10}}, app_props()), %% NOT IN true = match("country NOT IN ('US', 'France', 'Germany')", app_props()), true = match("country NOT IN ('🇬🇧')", app_props()), false = match("country NOT IN ('🇫🇷', '🇬🇧')", AppPropsUtf8), false = match("country NOT IN ('US', 'UK', 'France')", app_props()), + false = match("'London' NOT IN (city, country)", app_props()), + false = match("10.0 NOT IN (TRUE, p.group_sequence)", + #'v1_0.properties'{group_sequence = {uint, 10}}, app_props()), %% Combined with other operators true = match("country IN ('UK', 'US') AND weight > 3", app_props()), @@ -347,43 +540,6 @@ in_operator(_Config) -> false = match("missing NOT IN ('UK', 'US')", app_props()), false = match("absent NOT IN ('UK', 'US')", app_props()). -between_operator(_Config) -> - %% Basic BETWEEN operations - true = match("weight BETWEEN 3 AND 7", app_props()), - true = match("weight BETWEEN 5 AND 7", app_props()), - true = match("weight BETWEEN 3 AND 5", app_props()), - false = match("weight BETWEEN 6 AND 10", app_props()), - true = match("price BETWEEN 10 AND 11", app_props()), - true = match("price BETWEEN 10 AND 10.5", app_props()), - false = match("price BETWEEN -1 AND 10", app_props()), - false = match("score BETWEEN tiny_value AND quantity", app_props()), - true = match("score BETWEEN -tiny_value AND quantity", app_props()), - - %% NOT BETWEEN - true = match("weight NOT BETWEEN 6 AND 10", app_props()), - false = match("weight NOT BETWEEN 3 AND 7", app_props()), - false = match("weight NOT BETWEEN 3 AND 5", app_props()), - true = match("score NOT BETWEEN tiny_value AND quantity", app_props()), - false = match("score NOT BETWEEN -tiny_value AND quantity", app_props()), - - %% Combined with other operators - true = match("weight BETWEEN 4 AND 6 AND country = 'UK'", app_props()), - true = match("(price BETWEEN 20 AND 30) OR (weight BETWEEN 5 AND 6)", app_props()), - - %% "a string cannot be used in an arithmetic expression" - false = match("weight BETWEEN 1 AND 'Z'", app_props()), - false = match("country BETWEEN 'A' AND 'Z'", app_props()), - - %% "Comparison or arithmetic with an unknown value always yields an unknown value." - false = match("weight BETWEEN absent AND 10", app_props()), - false = match("weight BETWEEN 2 AND absent", app_props()), - false = match("weight BETWEEN absent AND absent", app_props()), - false = match("absent BETWEEN 2 AND 10", app_props()), - false = match("weight NOT BETWEEN absent AND 10", app_props()), - false = match("weight NOT BETWEEN 2 AND absent", app_props()), - false = match("weight NOT BETWEEN absent AND absent", app_props()), - false = match("absent NOT BETWEEN 2 AND 10", app_props()). - null_handling(_Config) -> %% IS NULL / IS NOT NULL true = match("missing IS NULL", app_props()), @@ -406,10 +562,11 @@ null_handling(_Config) -> false = match("missing <= 0", app_props()), false = match("missing = 0", app_props()), false = match("missing <> 0", app_props()), + false = match("0 != missing", app_props()), false = match("missing = missing", app_props()), false = match("absent = absent", app_props()), - false = match("missing AND true", app_props()), - false = match("missing OR false", app_props()). + false = match("missing AND TRUE", app_props()), + false = match("missing OR FALSE", app_props()). literals(_Config) -> %% Exact numeric literals @@ -420,13 +577,10 @@ literals(_Config) -> true = match("10.5 = 10.5", app_props()), true = match("price = 10.5", app_props()), true = match("5.0 > 4.999", app_props()), - true = match("10 = 10.", app_props()), true = match("0 = 0.0", app_props()), - true = match("0 = 0.", app_props()), - true = match("0 = .0", app_props()), true = match("weight = 5.0", app_props()), % int = float - true = match("5. = weight", app_props()), % float = int + true = match("5.0 = weight", app_props()), % float = int %% String literals true = match("'UK' = 'UK'", app_props()), @@ -445,7 +599,13 @@ literals(_Config) -> %% Literals in expressions true = match("weight + 2 > 6", app_props()), true = match("price * 2 > 20.0", app_props()), - true = match("'UK' <> 'US'", app_props()). + true = match("'UK' <> 'US'", app_props()), + + ?assertEqual(error, parse("5. > 0")), + ?assertEqual(error, parse(".5 > 0")), + ?assertEqual(error, parse(".5E2 > 0")), + ?assertEqual(error, parse("5E2 > 0")), + ok. scientific_notation(_Config) -> %% Basic scientific notation comparisons @@ -456,24 +616,21 @@ scientific_notation(_Config) -> %% Scientific notation literals in expressions true = match("1.2E3 = 1200", app_props()), - true = match("5E2 = 500", app_props()), - true = match("5.E2 = 500", app_props()), - true = match("-5E-2 = -0.05", app_props()), - true = match("-5.E-2 = -0.05", app_props()), - true = match(".5E-1 = 0.05", app_props()), - true = match("-.5E-1 = -0.05", app_props()), - true = match("1E0 = 1", app_props()), + true = match("5.0E2 = 500", app_props()), + true = match("5.0E+2 = 500", app_props()), + true = match("5.0E-2 = 0.05", app_props()), + true = match("-5.0E-2 = -0.05", app_props()), + true = match("1.0E0 = 1", app_props()), %% Arithmetic with scientific notation true = match("distance / 1.2E5 = 10", app_props()), - true = match("tiny_value * 1E6 = 350", app_props()), + true = match("tiny_value * 1.0E+6 = 350", app_props()), true = match("1.5E2 + 2.5E2 = 400", app_props()), - true = match("3E3 - 2E3 = 1000", app_props()), + true = match("3.0E3 - 2.0E3 = 1000", app_props()), %% Comparisons with scientific notation - true = match("distance > 1E6", app_props()), - true = match("tiny_value < 1E-3", app_props()), - true = match("distance BETWEEN 1E6 AND 2E6", app_props()), + true = match("distance > 1.0E6", app_props()), + true = match("tiny_value < 1.0E-3", app_props()), %% Mixed numeric formats true = match("distance / 1200 = 1000", app_props()), @@ -495,6 +652,8 @@ precedence_and_parentheses(_Config) -> %% Mixed precedence true = match("weight * 2 > 5 + 3", app_props()), + true = match("weight = -(-81) % percentage -1", app_props()), + true = match("weight -(-2.0) = -(-81) % (percentage -1)", app_props()), true = match("price < 20 OR country = 'US' AND weight > 3", app_props()), true = match("weight > 3 AND price < 20 OR country = 'US'", app_props()), false = match("weight > 3 AND (price > 20 OR country = 'US')", app_props()), @@ -538,7 +697,6 @@ type_handling(_Config) -> false = match("weight / score = 5", app_props()), false = match("0 / 0 = 0", app_props()), false = match("0 / 0.0 = 0", app_props()), - false = match("0 / 0. = 0", app_props()), false = match("-1 / 0 = 0", app_props()), false = match("score / score = score", app_props()), @@ -550,7 +708,7 @@ type_handling(_Config) -> complex_expressions(_Config) -> true = match( - "country = 'UK' AND price > 10.0 AND (weight BETWEEN 4 AND 6) AND description LIKE '%test%'", + "country = 'UK' AND price > 10.0 AND description LIKE '%test%' AND 2 = 101 % 3", app_props() ), true = match( @@ -573,44 +731,14 @@ complex_expressions(_Config) -> true = match( "((country = 'UK' OR country = 'US') AND (city IN ('London', 'New York', 'Paris'))) OR " ++ "(price * (1 - discount) < 10.0 AND quantity > 50 AND description LIKE '%test%') OR " ++ - "(active = TRUE AND premium = FALSE AND (weight BETWEEN 4 AND 10))", + "(active AND NOT premium)", app_props() ). -%% "Predefined selector literals and operator names are [...] case insensitive." -%% "Identifiers are case sensitive." case_sensitivity(_Config) -> - AppProps = app_props(), - - %% 1. Test that operators and literals are case insensitive - true = match("country = 'UK' AnD weight = 5", AppProps), - true = match("country = 'UK' and weight = 5", AppProps), - true = match("country = 'France' Or weight < 6", AppProps), - true = match("country = 'France' or weight < 6", AppProps), - true = match("NoT country = 'France'", AppProps), - true = match("not country = 'France'", AppProps), - true = match("weight BeTwEeN 3 AnD 7", AppProps), - true = match("weight between 3 AnD 7", AppProps), - true = match("description LiKe '%test%'", AppProps), - true = match("description like '%test%'", AppProps), - true = match("country In ('US', 'UK', 'France')", AppProps), - true = match("country in ('US', 'UK', 'France')", AppProps), - true = match("missing Is NuLl", AppProps), - true = match("missing is null", AppProps), - true = match("active = TrUe", AppProps), - true = match("active = true", AppProps), - true = match("premium = FaLsE", AppProps), - true = match("premium = false", AppProps), - true = match("distance = 1.2e6", app_props()), - true = match("tiny_value = 3.5e-4", app_props()), - true = match("3 = 3e0", app_props()), - true = match("3 = 3e-0", app_props()), - true = match("300 = 3e2", app_props()), - true = match("0.03 = 3e-2", app_props()), - - %% 2. Test that identifiers are case sensitive - AppPropsCaseSensitiveKeys = AppProps ++ [{{utf8, <<"COUNTRY">>}, {utf8, <<"France">>}}, - {{utf8, <<"Weight">>}, {uint, 10}}], + %% Test that identifiers are case sensitive + AppPropsCaseSensitiveKeys = app_props() ++ [{{utf8, <<"COUNTRY">>}, {utf8, <<"France">>}}, + {{utf8, <<"Weight">>}, {uint, 10}}], true = match("country = 'UK'", AppPropsCaseSensitiveKeys), true = match("COUNTRY = 'France'", AppPropsCaseSensitiveKeys), @@ -622,7 +750,7 @@ case_sensitivity(_Config) -> false = match("WEIGHT = 5", AppPropsCaseSensitiveKeys), true = match( - "country = 'UK' aNd COUNTRY = 'France' and (weight Between 4 AnD 6) AND Weight = 10", + "country = 'UK' AND COUNTRY = 'France' AND weight < 6 AND Weight = 10", AppPropsCaseSensitiveKeys ). @@ -660,52 +788,129 @@ whitespace_handling(_Config) -> %% 10. Whitespace at beginning and end of expression true = match(" \t\n\r country = 'UK' \t\n\r ", app_props()). -%% "An identifier is an unlimited-length character sequence that must begin with a -%% Java identifier start character; all following characters must be Java identifier -%% part characters. An identifier start character is any character for which the method -%% Character.isJavaIdentifierStart returns true. This includes '_' and '$'. An -%% identifier part character is any character for which the method -%% Character.isJavaIdentifierPart returns true." -identifier_rules(_Config) -> +identifiers(_Config) -> Identifiers = [<<"simple">>, - <<"a1b2c3">>, <<"x">>, - <<"_underscore">>, - <<"$dollar">>, - <<"_">>, - <<"$">>, - <<"with_underscore">>, - <<"with$dollar">>, - <<"mixed_$_identifiers_$_123">>], - AppProps = [{{utf8, Id}, {utf8, <<"value">>}} || Id <- Identifiers], - true = match("simple = 'value'", AppProps), - true = match("a1b2c3 = 'value'", AppProps), - true = match("x = 'value'", AppProps), - true = match("_underscore = 'value'", AppProps), - true = match("$dollar = 'value'", AppProps), - true = match("_ = 'value'", AppProps), - true = match("$ = 'value'", AppProps), - true = match("with_underscore = 'value'", AppProps), - true = match("with$dollar = 'value'", AppProps), - true = match("mixed_$_identifiers_$_123 = 'value'", AppProps). + <<"with_underscore_123">>, + <<"🥕"/utf8>>, + <<"ニンジン"/utf8>>, + <<"with four spaces">>, + <<" ">>, + <<"">>, + <<"NOT">>, + <<"not">>, + <<"AND">>, + <<"OR">>, + <<"IN">>, + <<"NULL">>, + <<"-">>, + <<"+">>, + <<"FALSE">>, + <<"!@#$%^&*()_+~`|{}?<>">>, + <<"[ key ]">>, + <<"[[key]]">>, + <<"]">>, + <<"][">>, + <<"[]">>, + <<"properties.to">>, + <<"p.to">> + ], + AppProps = [{{utf8, Id}, {boolean, true}} || Id <- Identifiers], + + %% regular identifiers + true = match("simple", AppProps), + true = match("x", AppProps), + + true = match("with_underscore_123", AppProps), + true = match("application_properties.with_underscore_123", AppProps), + true = match("a.with_underscore_123", AppProps), + true = match("[with_underscore_123]", AppProps), + + %% delimited identifiers + true = match("[🥕]", AppProps), + true = match("[ニンジン]", AppProps), + true = match("[with four spaces]", AppProps), + true = match("[ ]", AppProps), + true = match("[]", AppProps), + true = match("[]", AppProps), + true = match("[NOT]", AppProps), + true = match("[not]", AppProps), + true = match("[AND]", AppProps), + true = match("[OR]", AppProps), + true = match("[IN]", AppProps), + true = match("[NULL]", AppProps), + true = match("[-]", AppProps), + true = match("[+]", AppProps), + true = match("[FALSE]", AppProps), + true = match("[!@#$%^&*()_+~`|{}?<>]", AppProps), + true = match("[[[ key ]]]", AppProps), + true = match("[[[[[key]]]]]", AppProps), + true = match("[]]]", AppProps), + true = match("[]][[]", AppProps), + true = match("[[[]]]", AppProps), + + Props = #'v1_0.properties'{to = {utf8, <<"q1">>}}, + true = match("properties.to = 'q1'", Props, AppProps), + true = match("p.to = 'q1'", Props, AppProps), + true = match("[properties.to] = TRUE", Props, AppProps), + true = match("[p.to] = TRUE", Props, AppProps), + + %% Reserved keywords should not be allowed in regular identifiers. + ?assertEqual(error, parse("not")), + ?assertEqual(error, parse("Not")), + ?assertEqual(error, parse("and")), + ?assertEqual(error, parse("or")), + ?assertEqual(error, parse("true")), + ?assertEqual(error, parse("True")), + ?assertEqual(error, parse("false")), + ?assertEqual(error, parse("False")), + ?assertEqual(error, parse("upper")), + ?assertEqual(error, parse("lower")), + ?assertEqual(error, parse("left")), + ?assertEqual(error, parse("right")), + ?assertEqual(error, parse("substring")), + ?assertEqual(error, parse("utc")), + ?assertEqual(error, parse("date")), + ?assertEqual(error, parse("exists")), + ?assertEqual(error, parse("null")), + ?assertEqual(error, parse("is")), + ?assertEqual(error, parse("Is")), + ?assertEqual(error, parse("in")), + ?assertEqual(error, parse("like")), + ?assertEqual(error, parse("escape")), + ?assertEqual(error, parse("nan")), + ?assertEqual(error, parse("inf")), + + %% Regular identifier allows only: + %% { | | } + ?assertEqual(error, parse("my.key")), + ?assertEqual(error, parse("my$key")), + ?assertEqual(error, parse("$mykey")), + ?assertEqual(error, parse("_mykey")), + ?assertEqual(error, parse("1mykey")), + + %% Even in delimited identifiers, "Control characters are not permitted". + ?assertEqual(error, parse("[\n]")), + ?assertEqual(error, parse("[\r]")), + + ok. header_section(_Config) -> Hdr = #'v1_0.header'{priority = {ubyte, 7}}, Ps = #'v1_0.properties'{}, APs = [], - true = match("header.priority > 5", Hdr, Ps, APs), - true = match("header.priority = 7", Hdr, Ps, APs), - false = match("header.priority < 7", Hdr, Ps, APs), + true = match("h.priority > 5", Hdr, Ps, APs), + true = match("h.priority = 7", Hdr, Ps, APs), + false = match("h.priority < 7", Hdr, Ps, APs), - %% Since the default priority is 4 in both AMQP and JMS, we expect the - %% following expression to evaluate to true if matched against a message - %% without an explicit priority level set. - true = match("header.priority = 4", []). + %% Since the default priority is 4, we expect the following expression to evaluate + %% to true if matched against a message without an explicit priority level set. + true = match("h.priority = 4"). properties_section(_Config) -> Ps = #'v1_0.properties'{ message_id = {utf8, <<"id-123">>}, - user_id = {binary,<<"some user ID">>}, + user_id = {binary, <<10, 11, 12>>}, to = {utf8, <<"to some queue">>}, subject = {utf8, <<"some subject">>}, reply_to = {utf8, <<"reply to some topic">>}, @@ -719,69 +924,64 @@ properties_section(_Config) -> reply_to_group_id = {utf8, <<"other group ID">>}}, APs = [], - true = match("properties.message-id = 'id-123'", Ps, APs), - false = match("'id-123' <> properties.message-id", Ps, APs), - true = match("properties.message-id LIKE 'id-%'", Ps, APs), - true = match("properties.message-id IN ('id-123', 'id-456')", Ps, APs), + true = match("p.message_id = 'id-123'", Ps, APs), + false = match("'id-123' != p.message_id", Ps, APs), + true = match("p.message_id LIKE 'id-%'", Ps, APs), + true = match("p.message_id IN ('id-123', 'id-456')", Ps, APs), - true = match("properties.user-id = 'some user ID'", Ps, APs), - true = match("properties.user-id LIKE '%user%'", Ps, APs), - false = match("properties.user-id = 'other user ID'", Ps, APs), + true = match("p.user_id = 0x0A0B0C", Ps, APs), + false = match("p.user_id = 0xFF", Ps, APs), - true = match("properties.to = 'to some queue'", Ps, APs), - true = match("properties.to LIKE 'to some%'", Ps, APs), - true = match("properties.to NOT LIKE '%topic'", Ps, APs), + true = match("p.to = 'to some queue'", Ps, APs), + true = match("p.to LIKE 'to some%'", Ps, APs), + true = match("p.to NOT LIKE '%topic'", Ps, APs), - true = match("properties.subject = 'some subject'", Ps, APs), - true = match("properties.subject LIKE '%subject'", Ps, APs), - true = match("properties.subject IN ('some subject', 'other subject')", Ps, APs), + true = match("p.subject = 'some subject'", Ps, APs), + true = match("p.subject LIKE '%subject'", Ps, APs), + true = match("p.subject IN ('some subject', 'other subject')", Ps, APs), - true = match("properties.reply-to = 'reply to some topic'", Ps, APs), - true = match("properties.reply-to LIKE 'reply%topic'", Ps, APs), - false = match("properties.reply-to LIKE 'reply%queue'", Ps, APs), + true = match("p.reply_to = 'reply to some topic'", Ps, APs), + true = match("p.reply_to LIKE 'reply%topic'", Ps, APs), + false = match("p.reply_to LIKE 'reply%queue'", Ps, APs), - true = match("properties.correlation-id = 789", Ps, APs), - true = match("500 < properties.correlation-id", Ps, APs), - true = match("properties.correlation-id BETWEEN 700 AND 800", Ps, APs), - false = match("properties.correlation-id < 700", Ps, APs), + true = match("p.correlation_id = 789", Ps, APs), + true = match("500 < p.correlation_id", Ps, APs), + false = match("p.correlation_id < 700", Ps, APs), - true = match("properties.content-type = 'text/plain'", Ps, APs), - true = match("properties.content-type LIKE 'text/%'", Ps, APs), - true = match("properties.content-type IN ('text/plain', 'text/html')", Ps, APs), + true = match("p.content_type = 'text/plain'", Ps, APs), + true = match("p.content_type LIKE 'text/%'", Ps, APs), + true = match("p.content_type IN ('text/plain', 'text/html')", Ps, APs), - true = match("'deflate' = properties.content-encoding", Ps, APs), - false = match("properties.content-encoding = 'gzip'", Ps, APs), - true = match("properties.content-encoding NOT IN ('gzip', 'compress')", Ps, APs), + true = match("'deflate' = p.content_encoding", Ps, APs), + false = match("p.content_encoding = 'gzip'", Ps, APs), + true = match("p.content_encoding NOT IN ('gzip', 'compress')", Ps, APs), - true = match("properties.absolute-expiry-time = 1311999988888", Ps, APs), - true = match("properties.absolute-expiry-time > 1311999988000", Ps, APs), - true = match("properties.absolute-expiry-time BETWEEN 1311999988000 AND 1311999989000", Ps, APs), + true = match("p.absolute_expiry_time = 1311999988888", Ps, APs), + true = match("p.absolute_expiry_time > 1311999988000", Ps, APs), - true = match("properties.creation-time = 1311704463521", Ps, APs), - true = match("properties.creation-time < 1311999988888", Ps, APs), - true = match("properties.creation-time NOT BETWEEN 1311999988000 AND 1311999989000", Ps, APs), + true = match("p.creation_time = 1311704463521", Ps, APs), + true = match("p.creation_time < 1311999988888", Ps, APs), - true = match("properties.group-id = 'some group ID'", Ps, APs), - true = match("properties.group-id LIKE 'some%ID'", Ps, APs), - false = match("properties.group-id = 'other group ID'", Ps, APs), + true = match("p.group_id = 'some group ID'", Ps, APs), + true = match("p.group_id LIKE 'some%ID'", Ps, APs), + false = match("p.group_id = 'other group ID'", Ps, APs), - true = match("properties.group-sequence = 999", Ps, APs), - true = match("properties.group-sequence >= 999", Ps, APs), - true = match("properties.group-sequence BETWEEN 900 AND 1000", Ps, APs), - false = match("properties.group-sequence > 999", Ps, APs), + true = match("p.group_sequence = 999", Ps, APs), + true = match("p.group_sequence >= 999", Ps, APs), + false = match("p.group_sequence > 999", Ps, APs), - true = match("properties.reply-to-group-id = 'other group ID'", Ps, APs), - true = match("properties.reply-to-group-id LIKE '%group ID'", Ps, APs), - true = match("properties.reply-to-group-id <> 'some group ID'", Ps, APs), - true = match("properties.reply-to-group-id IS NOT NULL", Ps, APs), - false = match("properties.reply-to-group-id IS NULL", Ps, APs), + true = match("p.reply_to_group_id = 'other group ID'", Ps, APs), + true = match("p.reply_to_group_id LIKE '%group ID'", Ps, APs), + true = match("p.reply_to_group_id != 'some group ID'", Ps, APs), + true = match("p.reply_to_group_id IS NOT NULL", Ps, APs), + false = match("p.reply_to_group_id IS NULL", Ps, APs), - true = match("properties.message-id = 'id-123' and 'some subject' = properties.subject", Ps, APs), - true = match("properties.group-sequence < 500 or properties.correlation-id > 700", Ps, APs), - true = match("(properties.content-type LIKE 'text/%') AND properties.content-encoding = 'deflate'", Ps, APs), + true = match("p.message_id = 'id-123' AND 'some subject' = p.subject", Ps, APs), + true = match("p.group_sequence < 500 OR p.correlation_id > 700", Ps, APs), + true = match("(p.content_type LIKE 'text/%') AND p.content_encoding = 'deflate'", Ps, APs), - true = match("properties.subject IS NULL", #'v1_0.properties'{}, APs), - false = match("properties.subject IS NOT NULL", #'v1_0.properties'{}, APs). + true = match("p.subject IS NULL", #'v1_0.properties'{}, APs), + false = match("p.subject IS NOT NULL", #'v1_0.properties'{}, APs). multiple_sections(_Config) -> Hdr = #'v1_0.header'{durable = true, @@ -802,8 +1002,76 @@ multiple_sections(_Config) -> reply_to_group_id = {utf8, <<"other group ID">>}}, APs = [{{utf8, <<"key_1">>}, {byte, -1}}], - true = match("-1.0 = key_1 AND 4 < header.priority AND properties.group-sequence > 90", Hdr, Ps, APs), - false = match("-1.0 = key_1 AND 4 < header.priority AND properties.group-sequence < 90", Hdr, Ps, APs). + true = match("-1.0 = key_1 AND 4 < header.priority AND properties.group_sequence > 90", Hdr, Ps, APs), + false = match("-1.0 = key_1 AND 4 < header.priority AND properties.group_sequence < 90", Hdr, Ps, APs). + +section_qualifier(_Config) -> + Hdr = #'v1_0.header'{priority = {ubyte, 7}}, + Ps = #'v1_0.properties'{message_id = {utf8, <<"id-123">>}}, + APs = [{{utf8, <<"key_1">>}, {byte, -1}}], + + %% supported section qualifiers + true = match("header.priority = 7", Hdr, Ps, APs), + true = match("h.priority = 7", Hdr, Ps, APs), + true = match("properties.message_id = 'id-123'", Hdr, Ps, APs), + true = match("p.message_id = 'id-123'", Hdr, Ps, APs), + true = match("application_properties.key_1 = -1", Hdr, Ps, APs), + true = match("a.key_1 = -1", Hdr, Ps, APs), + true = match("key_1 = -1", Hdr, Ps, APs), + + %% (currently) unsupported section qualifiers + ?assertEqual(error, parse("delivery_annotations.abc")), + ?assertEqual(error, parse("delivery-annotations.abc")), + ?assertEqual(error, parse("d.abc")), + ?assertEqual(error, parse("message_annotations.abc")), + ?assertEqual(error, parse("message-annotations.abc")), + ?assertEqual(error, parse("m.abc")), + ?assertEqual(error, parse("application-properties.foo = 'bar'")), + ?assertEqual(error, parse("footer.abc")), + ?assertEqual(error, parse("f.abc")), + ok. + +utc_function(_Config) -> + true = match("UTC() > 1000000000000"), % After year 2001 + true = match("UTC() < 9999999999999"), % Before year 2286 + + %% UTC() should work multiple times in same expression + true = match("UTC() < UTC() + 30000"), + true = match("UTC() > UTC() - 30000"), + + BeforeTest = os:system_time(millisecond) - 30_000, + Props = #'v1_0.properties'{ + creation_time = {timestamp, BeforeTest}, + absolute_expiry_time = {timestamp, BeforeTest + 3_600_000} % 1 hour later + }, + + true = match("UTC() >= p.creation_time", Props, []), + true = match("p.creation_time <= UTC()", Props, []), + false = match("p.creation_time >= UTC()", Props, []), + true = match("UTC() < p.absolute_expiry_time", Props, []), + true = match("p.absolute_expiry_time > UTC()", Props, []), + true = match("UTC() - properties.creation_time < 300000", Props, []), + true = match("country = 'UK' AND UTC() > 0", Props, app_props()), + true = match("(FALSE OR p.creation_time < UTC()) AND weight = 5", Props, app_props()), + true = match("p.creation_time IS NULL AND UTC() > 0", #'v1_0.properties'{}, []), + + %% Timestamp in application-properties + true = match("ts1 < UTC()", [{{utf8, <<"ts1">>}, {timestamp, BeforeTest}}]), + + %% Test with different amount of white spaces + true = match("UTC()>=p.creation_time", Props, []), + true = match("UTC () >= p.creation_time", Props, []), + true = match("UTC ( ) >= p.creation_time", Props, []), + true = match(" UTC ( ) >= p.creation_time", Props, []), + true = match("(UTC()) >= p.creation_time", Props, []), + true = match("( UTC () ) >= p.creation_time", Props, []), + + %% Ensure UTC() doesn't accept arguments + ?assertEqual(error, parse("UTC(123)")), + ?assertEqual(error, parse("UTC( 123 )")), + ?assertEqual(error, parse("UTC('arg')")), + ?assertEqual(error, parse("UTC(TRUE)")), + ok. parse_errors(_Config) -> %% Parsing a non-UTF-8 encoded message selector should fail. @@ -831,6 +1099,23 @@ parse_errors(_Config) -> %% that do not refer to supported field names are disallowed. ?assertEqual(error, parse("header.invalid")), ?assertEqual(error, parse("properties.invalid")), + %% Invalid binary constants + %% No hex digits + ?assertEqual(error, parse("data = 0x")), + %% Odd number of hex digits + ?assertEqual(error, parse("data = 0x1")), + ?assertEqual(error, parse("data = 0x123")), + %% Invalid hex digit + ?assertEqual(error, parse("data = 0xG1")), + ?assertEqual(error, parse("data = 0x1G")), + %% Lowercase hex letters not allowed + ?assertEqual(error, parse("data = 0x1a")), + ?assertEqual(error, parse("data = 0xab")), + ?assertEqual(error, parse("data = 0xAb")), + ?assertEqual(error, parse("data = 0xdead")), + %% LIKE operator should not work with binary constants because + %% "The pattern expression is evaluated as a string." + ?assertEqual(error, parse("data LIKE 0x48")), ok. %%%=================================================================== @@ -867,6 +1152,9 @@ app_props() -> {{utf8, <<"percentage">>}, {ubyte, 75}} ]. +match(Selector) -> + match(Selector, []). + match(Selector, AppProps) -> match(Selector, #'v1_0.properties'{}, AppProps). @@ -881,12 +1169,12 @@ match(Selector, Header, Props, AppProps) Sections = [Header, Props, AP, Body], Payload = amqp_encode_bin(Sections), Mc = mc_amqp:init_from_stream(Payload, #{}), - rabbit_amqp_filter_jms:eval(ParsedSelector, Mc). + rabbit_amqp_filter_sql:eval(ParsedSelector, Mc). parse(Selector) -> - Descriptor = {ulong, ?DESCRIPTOR_CODE_SELECTOR_FILTER}, + Descriptor = {ulong, ?DESCRIPTOR_CODE_SQL_FILTER}, Filter = {described, Descriptor, {utf8, Selector}}, - rabbit_amqp_filter_jms:parse(Filter). + rabbit_amqp_filter_sql:parse(Filter). amqp_encode_bin(L) when is_list(L) -> iolist_to_binary([amqp10_framing:encode_bin(X) || X <- L]).