From 641c1d7e94552a40af1015c31ba33736232d3453 Mon Sep 17 00:00:00 2001 From: walter-weinmann Date: Wed, 19 Apr 2017 13:57:10 +0200 Subject: [PATCH 1/2] Minor corrections. --- .gitignore | 2 - src/oclexer.xrl | 7 +- src/ocparse_util.erl | 540 +++++++++++++++++++++---------------------- 3 files changed, 273 insertions(+), 276 deletions(-) diff --git a/.gitignore b/.gitignore index 2fbcb46..cd8eb1a 100644 --- a/.gitignore +++ b/.gitignore @@ -4,10 +4,8 @@ code_templates erl_crash.dump rebar.lock rebar3.crashdump -src/oclexer.dot src/oclexer.erl src/ocparse.erl -test/*.beam test/reliability_*.tst test/reliability_*_SUITE.erl test/wwe.* diff --git a/src/oclexer.xrl b/src/oclexer.xrl index 051b41c..eacc7e0 100644 --- a/src/oclexer.xrl +++ b/src/oclexer.xrl @@ -40,7 +40,7 @@ Rules. %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% symbolic names (`([^`]*)*`) : {token, {'ESCAPED_SYMBOLIC_NAME', TokenLine, TokenChars}}. -([A-Za-z_@#][A-Za-z0-9_@#]*) : match_any(TokenChars, TokenLen, TokenLine, ?TokenPatterns). +([A-Za-z_@#][A-Za-z0-9_@#]*) : match_any(TokenChars, TokenLen, TokenLine, ?TOKEN_PATTERNS). %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% string literals @@ -90,8 +90,7 @@ Erlang code. -export([reserved_keywords/0]). --define(TokenPatterns, [ - +-define(TOKEN_PATTERNS, [ {"^(?i)(ALL)$", 'ALL'}, {"^(?i)(ALLSHORTESTPATHS)$", 'ALLSHORTESTPATHS'}, {"^(?i)(AND)$", 'AND'}, @@ -176,7 +175,7 @@ Erlang code. -define(Dbg(F,A), ok). -endif. -reserved_keywords() -> [T || {_, T} <- ?TokenPatterns]. +reserved_keywords() -> [T || {_, T} <- ?TOKEN_PATTERNS]. match_any(TokenChars, TokenLen, _TokenLine, []) -> {token, {'UNESCAPED_SYMBOLIC_NAME', TokenLen, TokenChars}}; diff --git a/src/ocparse_util.erl b/src/ocparse_util.erl index 7875756..ef78384 100644 --- a/src/ocparse_util.erl +++ b/src/ocparse_util.erl @@ -32,7 +32,7 @@ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pt_to_source(FType, Fun, Ctx, _Lvl, {"[", [], []} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [_Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [_Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -42,10 +42,10 @@ pt_to_source(FType, Fun, Ctx, _Lvl, {"[", [], []} = ST) -> bottom_up -> Fun(ST, NewCtx) end, RT = {"[..]", NewCtx1}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {"[" = Type, {expression, _} = Value} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -56,10 +56,10 @@ pt_to_source(FType, Fun, Ctx, Lvl, {"[" = Type, {expression, _} = Value} = ST) - bottom_up -> Fun(ST, NewCtx1) end, RT = {Type ++ ValueNew ++ "]", NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {"[", [], {expression, _} = Value} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -70,10 +70,10 @@ pt_to_source(FType, Fun, Ctx, Lvl, {"[", [], {expression, _} = Value} = ST) -> bottom_up -> Fun(ST, NewCtx1) end, RT = {"[.." ++ ValueNew ++ "]", NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {"[", {expression, _} = Value, []} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -84,10 +84,10 @@ pt_to_source(FType, Fun, Ctx, Lvl, {"[", {expression, _} = Value, []} = ST) -> bottom_up -> Fun(ST, NewCtx1) end, RT = {"[" ++ ValueNew ++ "..]", NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {"[", {expression, _} = Value1, {expression, _} = Value2} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -103,7 +103,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {"[", {expression, _} = Value1, {expression, bottom_up -> Fun(ST, NewCtx3) end, RT = {"[" ++ Value1New ++ ".." ++ Value2New ++ "]", NewCtx4}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {Type, {Expression, _, _} = Value} = ST) when Expression == andExpression andalso Type == "xor" orelse @@ -124,7 +124,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {Type, {Expression, _, _} = Value} = ST) Type == "ends with") orelse Expression == unaryAddOrSubtractExpression andalso Type == "^" orelse Expression == xorExpression andalso Type == "or" -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -135,7 +135,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {Type, {Expression, _, _} = Value} = ST) bottom_up -> Fun(ST, NewCtx1) end, RT = {Type ++ " " ++ ValueNew, NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -153,7 +153,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {Type, Value, []} = ST) Type == stringListNullOperatorExpression; Type == unaryAddOrSubtractExpression; Type == xorExpression -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -164,12 +164,12 @@ pt_to_source(FType, Fun, Ctx, Lvl, {Type, Value, []} = ST) bottom_up -> Fun(ST, NewCtx1) end, RT = {ValueNew, NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {Type, Expression, ExpressionAddonList} = ST) when Type == notExpression; Type == unaryAddOrSubtractExpression -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -190,7 +190,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {Type, Expression, ExpressionAddonList} = ST) false -> " " end ++ ExpressionNew, NewCtx4}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {Type, Expression, ExpressionAddonList} = ST) when Type == addOrSubtractExpression; @@ -201,7 +201,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {Type, Expression, ExpressionAddonList} = ST) Type == powerOfExpression; Type == stringListNullOperatorExpression; Type == xorExpression -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -217,7 +217,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {Type, Expression, ExpressionAddonList} = ST) bottom_up -> Fun(ST, NewCtx3) end, RT = {ExpressionNew ++ " " ++ ExpressionAddonListNew, NewCtx4}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -236,7 +236,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {Type, Values} = ST) Type == unaryAddOrSubtractExpressionAddonList orelse Type == xorExpressionAddonList) andalso is_list(Values) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -246,7 +246,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {Type, Values} = ST) {Operator, _, _} when Type == comparisonExpressionAddonList andalso Operator == partialComparisonExpression orelse Type == stringListNullOperatorExpressionAddonList andalso Operator == "[" -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n F: ~p~n", [F]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n F: ~p~n", [F]), {SubAcc, CtxAcc1} = pt_to_source(FType, Fun, CtxAcc, Lvl + 1, F), {Acc ++ case length(Acc) of 0 -> []; @@ -271,7 +271,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {Type, Values} = ST) Operator == "ends with" orelse Operator == "contains") orelse Type == xorExpressionAddonList andalso Operator == "xor" -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n F: ~p~n", [F]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n F: ~p~n", [F]), {SubAcc, CtxAcc1} = pt_to_source(FType, Fun, CtxAcc, Lvl + 1, F), {Acc ++ case length(Acc) of 0 -> []; @@ -281,7 +281,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {Type, Values} = ST) when Type == notExpressionAddonList andalso Operator == "not" orelse Type == stringListNullOperatorExpressionAddonList andalso Operator == "is null" orelse Type == stringListNullOperatorExpressionAddonList andalso Operator == "is not null" -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n F: ~p~n", [F]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n F: ~p~n", [F]), {Acc ++ case length(Acc) of 0 -> []; _ -> " " @@ -289,7 +289,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {Type, Values} = ST) {Operator} when Type == unaryAddOrSubtractExpressionAddonList andalso Operator == "+" orelse Type == unaryAddOrSubtractExpressionAddonList andalso Operator == "-" -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n F: ~p~n", [F]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n F: ~p~n", [F]), {Acc ++ Operator ++ " ", CtxAcc} end end, @@ -300,7 +300,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {Type, Values} = ST) bottom_up -> Fun(ST, NewCtx1) end, RT = {ValuesNew, NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -321,7 +321,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {Type, Value} = ST) Type == sortItem; Type == statement; Type == variable -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -332,7 +332,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {Type, Value} = ST) bottom_up -> Fun(ST, NewCtx1) end, RT = {ValueNew, NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -348,7 +348,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {atom, {Type, _} = Value} = ST) Type == patternComprehension; Type == terminal; Type == variable -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -359,7 +359,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {atom, {Type, _} = Value} = ST) bottom_up -> Fun(ST, NewCtx1) end, RT = {ValueNew, NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {atom, {Type, Value}} = ST) when Type == all; @@ -367,7 +367,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {atom, {Type, Value}} = ST) Type == filter; Type == none; Type == single -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -378,10 +378,10 @@ pt_to_source(FType, Fun, Ctx, Lvl, {atom, {Type, Value}} = ST) bottom_up -> Fun(ST, NewCtx1) end, RT = {atom_to_list(Type) ++ "(" ++ ValueNew ++ ")", NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {atom, {extract = Type, FilterExpression, []}} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -392,10 +392,10 @@ pt_to_source(FType, Fun, Ctx, Lvl, {atom, {extract = Type, FilterExpression, []} bottom_up -> Fun(ST, NewCtx1) end, RT = {atom_to_list(Type) ++ "(" ++ FilterExpressionNew ++ ")", NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {atom, {extract = Type, FilterExpression, Expression}} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -411,13 +411,13 @@ pt_to_source(FType, Fun, Ctx, Lvl, {atom, {extract = Type, FilterExpression, Exp bottom_up -> Fun(ST, NewCtx3) end, RT = {atom_to_list(Type) ++ "(" ++ FilterExpressionNew ++ "|" ++ ExpressionNew ++ ")", NewCtx4}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {atom, {Type, _, _} = Value} = ST) when Type == functionInvocation; Type == listComprehension; Type == relationshipsPattern -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -428,10 +428,10 @@ pt_to_source(FType, Fun, Ctx, Lvl, {atom, {Type, _, _} = Value} = ST) bottom_up -> Fun(ST, NewCtx1) end, RT = {ValueNew, NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {atom, {functionInvocation, _, _, _} = Value} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -442,11 +442,11 @@ pt_to_source(FType, Fun, Ctx, Lvl, {atom, {functionInvocation, _, _, _} = Value} bottom_up -> Fun(ST, NewCtx1) end, RT = {ValueNew, NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {atom, {Type, _, _, _, _} = Value} = ST) when Type == patternComprehension -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -457,7 +457,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {atom, {Type, _, _, _, _} = Value} = ST) bottom_up -> Fun(ST, NewCtx1) end, RT = {ValueNew, NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -465,7 +465,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {atom, {Type, _, _, _, _} = Value} = ST) % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pt_to_source(FType, Fun, Ctx, Lvl, {booleanLiteral, {terminal, _} = Value} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -476,7 +476,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {booleanLiteral, {terminal, _} = Value} = ST) bottom_up -> Fun(ST, NewCtx1) end, RT = {ValueNew, NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -489,7 +489,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {Type, {SubType, _} = Value} = ST) Type == numberLiteral andalso ( SubType == doubleLiteral orelse SubType == integerLiteral) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -500,10 +500,10 @@ pt_to_source(FType, Fun, Ctx, Lvl, {Type, {SubType, _} = Value} = ST) bottom_up -> Fun(ST, NewCtx1) end, RT = {ValueNew, NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {clause, {create, _} = Value} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -514,14 +514,14 @@ pt_to_source(FType, Fun, Ctx, Lvl, {clause, {create, _} = Value} = ST) -> bottom_up -> Fun(ST, NewCtx1) end, RT = {ValueNew, NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {clause, {Type, _, _} = Value} = ST) when Type == delete; Type == merge; Type == return; Type == unwind -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -532,10 +532,10 @@ pt_to_source(FType, Fun, Ctx, Lvl, {clause, {Type, _, _} = Value} = ST) bottom_up -> Fun(ST, NewCtx1) end, RT = {ValueNew, NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {clause, {with, _, _, _} = Value} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -546,10 +546,10 @@ pt_to_source(FType, Fun, Ctx, Lvl, {clause, {with, _, _, _} = Value} = ST) -> bottom_up -> Fun(ST, NewCtx1) end, RT = {ValueNew, NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {clause, {match, _, _, _} = Value} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -560,7 +560,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {clause, {match, _, _, _} = Value} = ST) -> bottom_up -> Fun(ST, NewCtx1) end, RT = {ValueNew, NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -573,7 +573,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {Type, Values} = ST) Type == nodeLabels; Type == unionList, is_list(Values) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -583,7 +583,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {Type, Values} = ST) {ListType, _} when Type == clauseList, ListType == clause; Type == nodeLabels, ListType == nodeLabel -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n F: ~p~n", [F]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n F: ~p~n", [F]), {SubAcc, CtxAcc1} = pt_to_source(FType, Fun, CtxAcc, Lvl + 1, F), {Acc ++ case length(Acc) of 0 -> []; @@ -592,7 +592,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {Type, Values} = ST) {ListType, _, _} when Type == mergeActionList, ListType == mergeAction; Type == unionList, ListType == union -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n F: ~p~n", [F]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n F: ~p~n", [F]), {SubAcc, CtxAcc1} = pt_to_source(FType, Fun, CtxAcc, Lvl + 1, F), {Acc ++ case length(Acc) of 0 -> []; @@ -607,7 +607,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {Type, Values} = ST) bottom_up -> Fun(ST, NewCtx1) end, RT = {ValueNew, NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -615,7 +615,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {Type, Values} = ST) % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pt_to_source(FType, Fun, Ctx, Lvl, {create, Pattern} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -626,12 +626,12 @@ pt_to_source(FType, Fun, Ctx, Lvl, {create, Pattern} = ST) -> bottom_up -> Fun(ST, NewCtx1) end, RT = {"create " ++ PatternNew, NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {Type, Value} = ST) when Type == limit; Type == skip -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -642,7 +642,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {Type, Value} = ST) bottom_up -> Fun(ST, NewCtx1) end, RT = {atom_to_list(Type) ++ " " ++ ValueNew, NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -650,7 +650,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {Type, Value} = ST) % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pt_to_source(FType, Fun, Ctx, Lvl, {cypher, Value, Semicolon} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -661,7 +661,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {cypher, Value, Semicolon} = ST) -> bottom_up -> Fun(ST, NewCtx1) end, RT = {ValueNew ++ Semicolon, NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -669,7 +669,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {cypher, Value, Semicolon} = ST) -> % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pt_to_source(FType, Fun, Ctx, Lvl, {delete, Detach, ExpressionCommalist} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -683,7 +683,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {delete, Detach, ExpressionCommalist} = ST) - [] -> []; _ -> "detach " end ++ "delete " ++ ExpressionCommalistNew, NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -704,7 +704,7 @@ pt_to_source(FType, Fun, Ctx, _Lvl, {Type, Value} = ST) Type == symbolicName orelse Type == terminal orelse Type == "*" andalso Value == "*" -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [_Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [_Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -714,7 +714,7 @@ pt_to_source(FType, Fun, Ctx, _Lvl, {Type, Value} = ST) bottom_up -> Fun(ST, NewCtx) end, RT = {Value, NewCtx1}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -732,7 +732,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {Type, Values} = ST) Type == setItemCommalist; Type == sortItemCommalist; Type == variableCommalist, is_list(Values) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -746,7 +746,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {Type, Values} = ST) Type == returnItemCommalist, ListType == returnItem; Type == sortItemCommalist, ListType == sortItem; Type == variableCommalist, ListType == variable -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n F: ~p~n", [F]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n F: ~p~n", [F]), {SubAcc, CtxAcc1} = pt_to_source(FType, Fun, CtxAcc, Lvl + 1, F), {Acc ++ case length(Acc) of 0 -> []; @@ -758,7 +758,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {Type, Values} = ST) Type == returnItemCommalist, ListType == returnItem; Type == setItemCommalist, ListType == setItem; Type == sortItemCommalist, ListType == sortItem -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n F: ~p~n", [F]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n F: ~p~n", [F]), {SubAcc, CtxAcc1} = pt_to_source(FType, Fun, CtxAcc, Lvl + 1, F), {Acc ++ case length(Acc) of 0 -> []; @@ -766,7 +766,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {Type, Values} = ST) end ++ SubAcc, CtxAcc1}; {ListType, _, _, _} when Type == setItemCommalist, ListType == setItem -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n F: ~p~n", [F]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n F: ~p~n", [F]), {SubAcc, CtxAcc1} = pt_to_source(FType, Fun, CtxAcc, Lvl + 1, F), {Acc ++ case length(Acc) of 0 -> []; @@ -774,7 +774,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {Type, Values} = ST) end ++ SubAcc, CtxAcc1}; {{propertyKeyName, _}, {expression, _}} when Type == propertyKeyNameExpressionCommalist -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n F: ~p~n", [F]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n F: ~p~n", [F]), {SubAcc, CtxAcc1} = pt_to_source(FType, Fun, CtxAcc, Lvl + 1, F), {Acc ++ case length(Acc) of 0 -> []; @@ -789,7 +789,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {Type, Values} = ST) bottom_up -> Fun(ST, NewCtx1) end, RT = {ValueNew, NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -797,7 +797,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {Type, Values} = ST) % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pt_to_source(FType, Fun, Ctx, Lvl, {filterExpression, IdInColl, []} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -808,10 +808,10 @@ pt_to_source(FType, Fun, Ctx, Lvl, {filterExpression, IdInColl, []} = ST) -> bottom_up -> Fun(ST, NewCtx1) end, RT = {IdInCollNew, NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {filterExpression, IdInColl, Where} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -827,7 +827,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {filterExpression, IdInColl, Where} = ST) -> bottom_up -> Fun(ST, NewCtx3) end, RT = {IdInCollNew ++ " " ++ WhereNew, NewCtx4}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -835,7 +835,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {filterExpression, IdInColl, Where} = ST) -> % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pt_to_source(FType, Fun, Ctx, Lvl, {functionInvocation, FunctionName, Distinct, []} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -846,11 +846,11 @@ pt_to_source(FType, Fun, Ctx, Lvl, {functionInvocation, FunctionName, Distinct, bottom_up -> Fun(ST, NewCtx1) end, RT = {FunctionNameNew ++ "(" ++ Distinct ++ ")", NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {functionInvocation, FunctionName, Distinct, ExpressionCommalist} = ST) when is_list(ExpressionCommalist) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -869,7 +869,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {functionInvocation, FunctionName, Distinct, 0 -> []; _ -> Distinct ++ " " end ++ ExpressionCommalistNew ++ ")", NewCtx4}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -877,7 +877,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {functionInvocation, FunctionName, Distinct, % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pt_to_source(FType, Fun, Ctx, Lvl, {idInColl, Variable, Expression} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -893,7 +893,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {idInColl, Variable, Expression} = ST) -> bottom_up -> Fun(ST, NewCtx3) end, RT = {VariableNew ++ " in " ++ ExpressionNew, NewCtx4}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -901,7 +901,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {idInColl, Variable, Expression} = ST) -> % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pt_to_source(FType, Fun, Ctx, Lvl, {listComprehension, FilterExpression, []} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -912,10 +912,10 @@ pt_to_source(FType, Fun, Ctx, Lvl, {listComprehension, FilterExpression, []} = S bottom_up -> Fun(ST, NewCtx1) end, RT = {"[" ++ FilterExpressionNew ++ "]", NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {listComprehension, FilterExpression, Expression} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -931,7 +931,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {listComprehension, FilterExpression, Express bottom_up -> Fun(ST, NewCtx3) end, RT = {"[" ++ FilterExpressionNew ++ "|" ++ ExpressionNew ++ "]", NewCtx4}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -939,7 +939,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {listComprehension, FilterExpression, Express % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pt_to_source(FType, Fun, Ctx, Lvl, {listLiteral, ExpressionCommalist} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -950,7 +950,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {listLiteral, ExpressionCommalist} = ST) -> bottom_up -> Fun(ST, NewCtx1) end, RT = {"[" ++ ExpressionCommalistNew ++ "]", NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -964,7 +964,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {literal, {Type, _} = Value} = ST) Type == numberLiteral; Type == stringLiteral; Type == terminal -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -975,7 +975,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {literal, {Type, _} = Value} = ST) bottom_up -> Fun(ST, NewCtx1) end, RT = {ValueNew, NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -984,7 +984,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {literal, {Type, _} = Value} = ST) pt_to_source(FType, Fun, Ctx, Lvl, {mapLiteral, Value} = ST) when is_list(Value) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -995,7 +995,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {mapLiteral, Value} = ST) bottom_up -> Fun(ST, NewCtx1) end, RT = {"{" ++ ValueNew ++ "}", NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -1003,7 +1003,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {mapLiteral, Value} = ST) % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pt_to_source(FType, Fun, Ctx, Lvl, {match, Optional, Pattern, []} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -1017,10 +1017,10 @@ pt_to_source(FType, Fun, Ctx, Lvl, {match, Optional, Pattern, []} = ST) -> [] -> []; _ -> "optional " end ++ "match " ++ PatternNew, NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {match, Optional, Pattern, Where} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -1039,7 +1039,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {match, Optional, Pattern, Where} = ST) -> [] -> []; _ -> "optional " end ++ "match " ++ PatternNew ++ " " ++ WhereNew, NewCtx4}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -1047,7 +1047,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {match, Optional, Pattern, Where} = ST) -> % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pt_to_source(FType, Fun, Ctx, Lvl, {merge, PatternPart, []} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -1058,10 +1058,10 @@ pt_to_source(FType, Fun, Ctx, Lvl, {merge, PatternPart, []} = ST) -> bottom_up -> Fun(ST, NewCtx1) end, RT = {"merge " ++ PatternPartNew, NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {merge, PatternPart, MergeActionList} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -1077,7 +1077,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {merge, PatternPart, MergeActionList} = ST) - bottom_up -> Fun(ST, NewCtx3) end, RT = {"merge " ++ PatternPartNew ++ " " ++ MergeActionListNew, NewCtx4}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -1085,7 +1085,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {merge, PatternPart, MergeActionList} = ST) - % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pt_to_source(FType, Fun, Ctx, Lvl, {mergeAction, Type, Value} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -1096,7 +1096,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {mergeAction, Type, Value} = ST) -> bottom_up -> Fun(ST, NewCtx1) end, RT = {"on " ++ Type ++ " " ++ ValueNew, NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -1108,7 +1108,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {Type, Value} = ST) Type == properties; Type == relType; Type == where -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -1123,7 +1123,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {Type, Value} = ST) where -> "where "; _ -> [] end ++ ValueNew, NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -1131,7 +1131,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {Type, Value} = ST) % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pt_to_source(FType, Fun, Ctx, _Lvl, {nodePattern, [], [], []} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [_Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [_Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -1141,10 +1141,10 @@ pt_to_source(FType, Fun, Ctx, _Lvl, {nodePattern, [], [], []} = ST) -> bottom_up -> Fun(ST, NewCtx) end, RT = {"()", NewCtx1}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {nodePattern, [], [], Properties} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -1155,10 +1155,10 @@ pt_to_source(FType, Fun, Ctx, Lvl, {nodePattern, [], [], Properties} = ST) -> bottom_up -> Fun(ST, NewCtx1) end, RT = {"(" ++ PropertiesNew ++ ")", NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {nodePattern, [], NodeLabels, []} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -1169,10 +1169,10 @@ pt_to_source(FType, Fun, Ctx, Lvl, {nodePattern, [], NodeLabels, []} = ST) -> bottom_up -> Fun(ST, NewCtx1) end, RT = {"(" ++ NodeLabelsNew ++ ")", NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {nodePattern, [], NodeLabels, Properties} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -1188,10 +1188,10 @@ pt_to_source(FType, Fun, Ctx, Lvl, {nodePattern, [], NodeLabels, Properties} = S bottom_up -> Fun(ST, NewCtx3) end, RT = {"(" ++ NodeLabelsNew ++ PropertiesNew ++ ")", NewCtx4}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {nodePattern, Variable, [], []} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -1202,10 +1202,10 @@ pt_to_source(FType, Fun, Ctx, Lvl, {nodePattern, Variable, [], []} = ST) -> bottom_up -> Fun(ST, NewCtx1) end, RT = {"(" ++ VariableNew ++ ")", NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {nodePattern, Variable, [], Properties} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -1221,10 +1221,10 @@ pt_to_source(FType, Fun, Ctx, Lvl, {nodePattern, Variable, [], Properties} = ST) bottom_up -> Fun(ST, NewCtx3) end, RT = {"(" ++ VariableNew ++ " " ++ PropertiesNew ++ ")", NewCtx4}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {nodePattern, Variable, NodeLabels, []} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -1240,10 +1240,10 @@ pt_to_source(FType, Fun, Ctx, Lvl, {nodePattern, Variable, NodeLabels, []} = ST) bottom_up -> Fun(ST, NewCtx3) end, RT = {"(" ++ VariableNew ++ " " ++ NodeLabelsNew ++ ")", NewCtx4}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {nodePattern, Variable, NodeLabels, Properties} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -1264,7 +1264,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {nodePattern, Variable, NodeLabels, Propertie bottom_up -> Fun(ST, NewCtx5) end, RT = {"(" ++ VariableNew ++ " " ++ NodeLabelsNew ++ PropertiesNew ++ ")", NewCtx6}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -1272,7 +1272,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {nodePattern, Variable, NodeLabels, Propertie % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pt_to_source(FType, Fun, Ctx, Lvl, {order, SortItemCommalist} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -1283,7 +1283,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {order, SortItemCommalist} = ST) -> bottom_up -> Fun(ST, NewCtx1) end, RT = {"order by " ++ SortItemCommalistNew, NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -1291,7 +1291,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {order, SortItemCommalist} = ST) -> % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pt_to_source(FType, Fun, Ctx, Lvl, {parameter, {symbolicName, _} = Value} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -1302,10 +1302,10 @@ pt_to_source(FType, Fun, Ctx, Lvl, {parameter, {symbolicName, _} = Value} = ST) bottom_up -> Fun(ST, NewCtx1) end, RT = {"$" ++ ValueNew, NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, _Lvl, {parameter, Value} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [_Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [_Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -1315,7 +1315,7 @@ pt_to_source(FType, Fun, Ctx, _Lvl, {parameter, Value} = ST) -> bottom_up -> Fun(ST, NewCtx) end, RT = {"$" ++ Value, NewCtx1}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -1323,7 +1323,7 @@ pt_to_source(FType, Fun, Ctx, _Lvl, {parameter, Value} = ST) -> % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pt_to_source(FType, Fun, Ctx, Lvl, {parenthesizedExpression, Value} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -1334,7 +1334,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {parenthesizedExpression, Value} = ST) -> bottom_up -> Fun(ST, NewCtx1) end, RT = {"(" ++ ValueNew ++ ")", NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -1342,7 +1342,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {parenthesizedExpression, Value} = ST) -> % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pt_to_source(FType, Fun, Ctx, Lvl, {partialComparisonExpression, Value, Terminal} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -1353,7 +1353,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {partialComparisonExpression, Value, Terminal bottom_up -> Fun(ST, NewCtx1) end, RT = {Terminal ++ " " ++ ValueNew, NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -1362,7 +1362,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {partialComparisonExpression, Value, Terminal pt_to_source(FType, Fun, Ctx, Lvl, {pattern, Value} = ST) when is_list(Value) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -1373,7 +1373,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {pattern, Value} = ST) bottom_up -> Fun(ST, NewCtx1) end, RT = {ValueNew, NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -1381,7 +1381,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {pattern, Value} = ST) % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pt_to_source(FType, Fun, Ctx, Lvl, {patternComprehension, [], RelationshipsPattern, [], Expression} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -1397,10 +1397,10 @@ pt_to_source(FType, Fun, Ctx, Lvl, {patternComprehension, [], RelationshipsPatte bottom_up -> Fun(ST, NewCtx3) end, RT = {"[" ++ RelationshipsPatternNew ++ "|" ++ ExpressionNew ++ "]", NewCtx4}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {patternComprehension, [], RelationshipsPattern, WhereExpression, Expression} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -1421,10 +1421,10 @@ pt_to_source(FType, Fun, Ctx, Lvl, {patternComprehension, [], RelationshipsPatte bottom_up -> Fun(ST, NewCtx5) end, RT = {"[" ++ RelationshipsPatternNew ++ " where " ++ WhereExpressionNew ++ "|" ++ ExpressionNew ++ "]", NewCtx6}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {patternComprehension, Variable, RelationshipsPattern, [], Expression} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -1445,10 +1445,10 @@ pt_to_source(FType, Fun, Ctx, Lvl, {patternComprehension, Variable, Relationship bottom_up -> Fun(ST, NewCtx5) end, RT = {"[" ++ VariableNew ++ "=" ++ RelationshipsPatternNew ++ "|" ++ ExpressionNew ++ "]", NewCtx6}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {patternComprehension, Variable, RelationshipsPattern, WhereExpression, Expression} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -1474,7 +1474,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {patternComprehension, Variable, Relationship bottom_up -> Fun(ST, NewCtx7) end, RT = {"[" ++ VariableNew ++ "=" ++ RelationshipsPatternNew ++ " where " ++ WhereExpressionNew ++ "|" ++ ExpressionNew ++ "]", NewCtx8}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -1482,7 +1482,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {patternComprehension, Variable, Relationship % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pt_to_source(FType, Fun, Ctx, Lvl, {patternElement, PatternElement, "("} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -1493,10 +1493,10 @@ pt_to_source(FType, Fun, Ctx, Lvl, {patternElement, PatternElement, "("} = ST) - bottom_up -> Fun(ST, NewCtx1) end, RT = {"(" ++ PatternElementNew ++ ")", NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {patternElement, NodePattern, []} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -1507,10 +1507,10 @@ pt_to_source(FType, Fun, Ctx, Lvl, {patternElement, NodePattern, []} = ST) -> bottom_up -> Fun(ST, NewCtx1) end, RT = {NodePatternNew, NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {patternElement, NodePattern, PatternElementChainList} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -1526,7 +1526,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {patternElement, NodePattern, PatternElementC bottom_up -> Fun(ST, NewCtx3) end, RT = {NodePatternNew ++ PatternElementChainListNew, NewCtx4}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -1534,7 +1534,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {patternElement, NodePattern, PatternElementC % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pt_to_source(FType, Fun, Ctx, Lvl, {patternElementChain, Value_1, Value_2} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -1550,7 +1550,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {patternElementChain, Value_1, Value_2} = ST) bottom_up -> Fun(ST, NewCtx3) end, RT = {Value_1New ++ Value_2New, NewCtx4}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -1560,7 +1560,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {patternElementChain, Value_1, Value_2} = ST) pt_to_source(FType, Fun, Ctx, Lvl, {Type, Values} = ST) when Type == patternElementChainList; Type == propertyLookupList, is_list(Values) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -1569,12 +1569,12 @@ pt_to_source(FType, Fun, Ctx, Lvl, {Type, Values} = ST) case F of {patternElementChain, _, _} when Type == patternElementChainList -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n F: ~p~n", [F]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n F: ~p~n", [F]), {SubAcc, CtxAcc1} = pt_to_source(FType, Fun, CtxAcc, Lvl + 1, F), {Acc ++ SubAcc, CtxAcc1}; {propertyLookup, _} when Type == propertyLookupList -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n F: ~p~n", [F]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n F: ~p~n", [F]), {SubAcc, CtxAcc1} = pt_to_source(FType, Fun, CtxAcc, Lvl + 1, F), {Acc ++ SubAcc, CtxAcc1} end @@ -1586,7 +1586,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {Type, Values} = ST) bottom_up -> Fun(ST, NewCtx1) end, RT = {ValueNew, NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -1594,7 +1594,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {Type, Values} = ST) % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pt_to_source(FType, Fun, Ctx, Lvl, {patternPart, [], Value} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -1605,10 +1605,10 @@ pt_to_source(FType, Fun, Ctx, Lvl, {patternPart, [], Value} = ST) -> bottom_up -> Fun(ST, NewCtx1) end, RT = {ValueNew, NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {patternPart, Value_1, Value_2} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -1624,7 +1624,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {patternPart, Value_1, Value_2} = ST) -> bottom_up -> Fun(ST, NewCtx3) end, RT = {Value_1New ++ "=" ++ Value_2New, NewCtx4}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -1632,7 +1632,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {patternPart, Value_1, Value_2} = ST) -> % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pt_to_source(FType, Fun, Ctx, Lvl, {propertyExpression, Atom, PropertyLookUpList} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -1648,7 +1648,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {propertyExpression, Atom, PropertyLookUpList bottom_up -> Fun(ST, NewCtx3) end, RT = {AtomNew ++ " " ++ PropertyLookUpListNew, NewCtx4}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -1656,7 +1656,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {propertyExpression, Atom, PropertyLookUpList % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pt_to_source(FType, Fun, Ctx, Lvl, {{propertyKeyName, _} = PropertyKeyName, {expression, _} = Expression} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -1672,7 +1672,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {{propertyKeyName, _} = PropertyKeyName, {exp bottom_up -> Fun(ST, NewCtx3) end, RT = {PropertyKeyNameNew ++ ":" ++ ExpressionNew, NewCtx4}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -1680,7 +1680,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {{propertyKeyName, _} = PropertyKeyName, {exp % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pt_to_source(FType, Fun, Ctx, Lvl, {propertyLookup, Value} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -1691,7 +1691,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {propertyLookup, Value} = ST) -> bottom_up -> Fun(ST, NewCtx1) end, RT = {"." ++ ValueNew, NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -1699,7 +1699,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {propertyLookup, Value} = ST) -> % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pt_to_source(FType, Fun, Ctx, Lvl, {propertyOrLabelsExpression, Atom, []} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -1710,11 +1710,11 @@ pt_to_source(FType, Fun, Ctx, Lvl, {propertyOrLabelsExpression, Atom, []} = ST) bottom_up -> Fun(ST, NewCtx1) end, RT = {AtomNew, NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {propertyOrLabelsExpression, Atom, Addons} = ST) when is_list(Addons) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -1727,11 +1727,11 @@ pt_to_source(FType, Fun, Ctx, Lvl, {propertyOrLabelsExpression, Atom, Addons} = {AddonsNew, NewCtx3} = lists:foldl(fun(F, {Acc, CtxAcc}) -> case F of {nodeLabels, _} -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n F: ~p~n", [F]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n F: ~p~n", [F]), {SubAcc, CtxAcc1} = pt_to_source(FType, Fun, CtxAcc, Lvl + 1, F), {Acc ++ SubAcc, CtxAcc1}; {propertyLookup, _} -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n F: ~p~n", [F]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n F: ~p~n", [F]), {SubAcc, CtxAcc1} = pt_to_source(FType, Fun, CtxAcc, Lvl + 1, F), {Acc ++ SubAcc, CtxAcc1} end @@ -1743,7 +1743,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {propertyOrLabelsExpression, Atom, Addons} = bottom_up -> Fun(ST, NewCtx3) end, RT = {AtomNew ++ " " ++ AddonsNew, NewCtx4}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -1751,7 +1751,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {propertyOrLabelsExpression, Atom, Addons} = % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pt_to_source(FType, Fun, Ctx, _Lvl, {rangeLiteral, [], [], []} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [_Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [_Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -1761,10 +1761,10 @@ pt_to_source(FType, Fun, Ctx, _Lvl, {rangeLiteral, [], [], []} = ST) -> bottom_up -> Fun(ST, NewCtx) end, RT = {"*", NewCtx1}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {rangeLiteral, Value, [], []} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -1775,10 +1775,10 @@ pt_to_source(FType, Fun, Ctx, Lvl, {rangeLiteral, Value, [], []} = ST) -> bottom_up -> Fun(ST, NewCtx1) end, RT = {"*" ++ ValueNew, NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {rangeLiteral, Value, ".." = Op, []} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -1789,10 +1789,10 @@ pt_to_source(FType, Fun, Ctx, Lvl, {rangeLiteral, Value, ".." = Op, []} = ST) -> bottom_up -> Fun(ST, NewCtx1) end, RT = {"*" ++ ValueNew ++ Op, NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {rangeLiteral, Value_1, ".." = Op, Value_2} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -1808,7 +1808,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {rangeLiteral, Value_1, ".." = Op, Value_2} = bottom_up -> Fun(ST, NewCtx3) end, RT = {"*" ++ Value_1New ++ Op ++ Value_2New, NewCtx4}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -1816,7 +1816,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {rangeLiteral, Value_1, ".." = Op, Value_2} = % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pt_to_source(FType, Fun, Ctx, Lvl, {regularQuery, SingularQuery, []} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -1827,10 +1827,10 @@ pt_to_source(FType, Fun, Ctx, Lvl, {regularQuery, SingularQuery, []} = ST) -> bottom_up -> Fun(ST, NewCtx1) end, RT = {SingularQueryNew, NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {regularQuery, SingularQuery, UnionList} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -1846,7 +1846,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {regularQuery, SingularQuery, UnionList} = ST bottom_up -> Fun(ST, NewCtx3) end, RT = {SingularQueryNew ++ " " ++ UnionListNew, NewCtx4}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -1854,7 +1854,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {regularQuery, SingularQuery, UnionList} = ST % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pt_to_source(FType, Fun, Ctx, _Lvl, {relationshipDetail, [], [], [], []} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [_Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [_Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -1864,10 +1864,10 @@ pt_to_source(FType, Fun, Ctx, _Lvl, {relationshipDetail, [], [], [], []} = ST) - bottom_up -> Fun(ST, NewCtx) end, RT = {"[]", NewCtx1}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {relationshipDetail, [], [], [], Properties} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -1878,10 +1878,10 @@ pt_to_source(FType, Fun, Ctx, Lvl, {relationshipDetail, [], [], [], Properties} bottom_up -> Fun(ST, NewCtx1) end, RT = {"[" ++ PropertiesNew ++ "]", NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {relationshipDetail, [], [], RangeLiteral, []} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -1892,10 +1892,10 @@ pt_to_source(FType, Fun, Ctx, Lvl, {relationshipDetail, [], [], RangeLiteral, [] bottom_up -> Fun(ST, NewCtx1) end, RT = {"[" ++ RangeLiteralNew ++ "]", NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {relationshipDetail, [], [], RangeLiteral, Properties} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -1911,10 +1911,10 @@ pt_to_source(FType, Fun, Ctx, Lvl, {relationshipDetail, [], [], RangeLiteral, Pr bottom_up -> Fun(ST, NewCtx3) end, RT = {"[" ++ RangeLiteralNew ++ PropertiesNew ++ "]", NewCtx4}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {relationshipDetail, [], RelationshipTypes, [], []} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -1925,10 +1925,10 @@ pt_to_source(FType, Fun, Ctx, Lvl, {relationshipDetail, [], RelationshipTypes, [ bottom_up -> Fun(ST, NewCtx1) end, RT = {"[" ++ RelationshipTypesNew ++ "]", NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {relationshipDetail, [], RelationshipTypes, [], Properties} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -1944,10 +1944,10 @@ pt_to_source(FType, Fun, Ctx, Lvl, {relationshipDetail, [], RelationshipTypes, [ bottom_up -> Fun(ST, NewCtx3) end, RT = {"[" ++ RelationshipTypesNew ++ PropertiesNew ++ "]", NewCtx4}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {relationshipDetail, [], RelationshipTypes, RangeLiteral, []} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -1963,10 +1963,10 @@ pt_to_source(FType, Fun, Ctx, Lvl, {relationshipDetail, [], RelationshipTypes, R bottom_up -> Fun(ST, NewCtx3) end, RT = {"[" ++ RelationshipTypesNew ++ RangeLiteralNew ++ "]", NewCtx4}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {relationshipDetail, [], RelationshipTypes, RangeLiteral, Properties} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -1987,10 +1987,10 @@ pt_to_source(FType, Fun, Ctx, Lvl, {relationshipDetail, [], RelationshipTypes, R bottom_up -> Fun(ST, NewCtx5) end, RT = {"[" ++ RelationshipTypesNew ++ RangeLiteralNew ++ PropertiesNew ++ "]", NewCtx6}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {relationshipDetail, Variable, [], [], []} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -2001,10 +2001,10 @@ pt_to_source(FType, Fun, Ctx, Lvl, {relationshipDetail, Variable, [], [], []} = bottom_up -> Fun(ST, NewCtx1) end, RT = {"[" ++ VariableNew ++ "]", NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {relationshipDetail, Variable, [], [], Properties} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -2020,10 +2020,10 @@ pt_to_source(FType, Fun, Ctx, Lvl, {relationshipDetail, Variable, [], [], Proper bottom_up -> Fun(ST, NewCtx3) end, RT = {"[" ++ VariableNew ++ PropertiesNew ++ "]", NewCtx4}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {relationshipDetail, Variable, [], RangeLiteral, []} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -2039,10 +2039,10 @@ pt_to_source(FType, Fun, Ctx, Lvl, {relationshipDetail, Variable, [], RangeLiter bottom_up -> Fun(ST, NewCtx3) end, RT = {"[" ++ VariableNew ++ RangeLiteralNew ++ "]", NewCtx4}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {relationshipDetail, Variable, [], RangeLiteral, Properties} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -2063,10 +2063,10 @@ pt_to_source(FType, Fun, Ctx, Lvl, {relationshipDetail, Variable, [], RangeLiter bottom_up -> Fun(ST, NewCtx5) end, RT = {"[" ++ VariableNew ++ RangeLiteralNew ++ PropertiesNew ++ "]", NewCtx6}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {relationshipDetail, Variable, RelationshipTypes, [], []} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -2082,10 +2082,10 @@ pt_to_source(FType, Fun, Ctx, Lvl, {relationshipDetail, Variable, RelationshipTy bottom_up -> Fun(ST, NewCtx3) end, RT = {"[" ++ VariableNew ++ RelationshipTypesNew ++ "]", NewCtx4}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {relationshipDetail, Variable, RelationshipTypes, [], Properties} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -2106,10 +2106,10 @@ pt_to_source(FType, Fun, Ctx, Lvl, {relationshipDetail, Variable, RelationshipTy bottom_up -> Fun(ST, NewCtx5) end, RT = {"[" ++ VariableNew ++ RelationshipTypesNew ++ PropertiesNew ++ "]", NewCtx6}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {relationshipDetail, Variable, RelationshipTypes, RangeLiteral, []} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -2130,10 +2130,10 @@ pt_to_source(FType, Fun, Ctx, Lvl, {relationshipDetail, Variable, RelationshipTy bottom_up -> Fun(ST, NewCtx5) end, RT = {"[" ++ VariableNew ++ RelationshipTypesNew ++ RangeLiteralNew ++ "]", NewCtx6}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {relationshipDetail, Variable, RelationshipTypes, RangeLiteral, Properties} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -2159,7 +2159,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {relationshipDetail, Variable, RelationshipTy bottom_up -> Fun(ST, NewCtx7) end, RT = {"[" ++ VariableNew ++ RelationshipTypesNew ++ RangeLiteralNew ++ PropertiesNew ++ "]", NewCtx8}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -2167,7 +2167,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {relationshipDetail, Variable, RelationshipTy % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pt_to_source(FType, Fun, Ctx, _Lvl, {relationshipPattern, Left, [], Right} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [_Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [_Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -2177,10 +2177,10 @@ pt_to_source(FType, Fun, Ctx, _Lvl, {relationshipPattern, Left, [], Right} = ST) bottom_up -> Fun(ST, NewCtx) end, RT = {Left ++ Right, NewCtx1}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {relationshipPattern, Left, Value, Right} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -2191,7 +2191,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {relationshipPattern, Left, Value, Right} = S bottom_up -> Fun(ST, NewCtx1) end, RT = {Left ++ ValueNew ++ Right, NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -2199,7 +2199,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {relationshipPattern, Left, Value, Right} = S % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pt_to_source(FType, Fun, Ctx, Lvl, {relationshipsPattern, NodePattern, PatternElementChainList} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -2215,7 +2215,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {relationshipsPattern, NodePattern, PatternEl bottom_up -> Fun(ST, NewCtx3) end, RT = {NodePatternNew ++ PatternElementChainListNew, NewCtx4}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -2223,7 +2223,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {relationshipsPattern, NodePattern, PatternEl % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pt_to_source(FType, Fun, Ctx, Lvl, {relationshipTypes, RelType, RelTypeVerticalbarlist} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -2239,7 +2239,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {relationshipTypes, RelType, RelTypeVerticalb bottom_up -> Fun(ST, NewCtx3) end, RT = {":" ++ RelTypeNew ++ RelTypeVerticalbarlistNew, NewCtx4}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -2248,7 +2248,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {relationshipTypes, RelType, RelTypeVerticalb pt_to_source(FType, Fun, Ctx, Lvl, {relTypeVerticalbarlist, Values} = ST) when is_list(Values) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -2256,7 +2256,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {relTypeVerticalbarlist, Values} = ST) {ValueNew, NewCtx1} = lists:foldl(fun(F, {Acc, CtxAcc}) -> case F of {{relTypeName, _} = RTN, Colon} -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n F: ~p~n", [F]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n F: ~p~n", [F]), {SubAcc, CtxAcc1} = pt_to_source(FType, Fun, CtxAcc, Lvl + 1, RTN), {Acc ++ "|" ++ Colon ++ SubAcc, CtxAcc1} end @@ -2268,7 +2268,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {relTypeVerticalbarlist, Values} = ST) bottom_up -> Fun(ST, NewCtx1) end, RT = {ValueNew, NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -2276,7 +2276,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {relTypeVerticalbarlist, Values} = ST) % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pt_to_source(FType, Fun, Ctx, Lvl, {remove, Value} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -2287,7 +2287,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {remove, Value} = ST) -> bottom_up -> Fun(ST, NewCtx1) end, RT = {"remove " ++ ValueNew, NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -2295,7 +2295,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {remove, Value} = ST) -> % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pt_to_source(FType, Fun, Ctx, Lvl, {removeItem, Value_1, Value_2} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -2311,7 +2311,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {removeItem, Value_1, Value_2} = ST) -> bottom_up -> Fun(ST, NewCtx3) end, RT = {Value_1New ++ Value_2New, NewCtx4}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -2319,7 +2319,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {removeItem, Value_1, Value_2} = ST) -> % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pt_to_source(FType, Fun, Ctx, Lvl, {return, Distinct, ReturnBody} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -2333,7 +2333,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {return, Distinct, ReturnBody} = ST) -> [] -> []; _ -> "distinct " end ++ ReturnBodyNew, NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -2341,7 +2341,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {return, Distinct, ReturnBody} = ST) -> % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pt_to_source(FType, Fun, Ctx, Lvl, {returnBody, ReturnItems, [], [], []} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -2352,10 +2352,10 @@ pt_to_source(FType, Fun, Ctx, Lvl, {returnBody, ReturnItems, [], [], []} = ST) - bottom_up -> Fun(ST, NewCtx1) end, RT = {ReturnItemsNew, NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {returnBody, ReturnItems, [], [], Limit} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -2371,10 +2371,10 @@ pt_to_source(FType, Fun, Ctx, Lvl, {returnBody, ReturnItems, [], [], Limit} = ST bottom_up -> Fun(ST, NewCtx3) end, RT = {ReturnItemsNew ++ " " ++ LimitNew, NewCtx4}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {returnBody, ReturnItems, [], Skip, []} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -2390,10 +2390,10 @@ pt_to_source(FType, Fun, Ctx, Lvl, {returnBody, ReturnItems, [], Skip, []} = ST) bottom_up -> Fun(ST, NewCtx3) end, RT = {ReturnItemsNew ++ " " ++ SkipNew, NewCtx4}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {returnBody, ReturnItems, [], Skip, Limit} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -2414,10 +2414,10 @@ pt_to_source(FType, Fun, Ctx, Lvl, {returnBody, ReturnItems, [], Skip, Limit} = bottom_up -> Fun(ST, NewCtx5) end, RT = {ReturnItemsNew ++ " " ++ SkipNew ++ " " ++ LimitNew, NewCtx6}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {returnBody, ReturnItems, Order, [], []} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -2433,10 +2433,10 @@ pt_to_source(FType, Fun, Ctx, Lvl, {returnBody, ReturnItems, Order, [], []} = ST bottom_up -> Fun(ST, NewCtx3) end, RT = {ReturnItemsNew ++ " " ++ OrderNew, NewCtx4}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {returnBody, ReturnItems, Order, [], Limit} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -2457,10 +2457,10 @@ pt_to_source(FType, Fun, Ctx, Lvl, {returnBody, ReturnItems, Order, [], Limit} = bottom_up -> Fun(ST, NewCtx5) end, RT = {ReturnItemsNew ++ " " ++ OrderNew ++ " " ++ LimitNew, NewCtx6}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {returnBody, ReturnItems, Order, Skip, []} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -2481,10 +2481,10 @@ pt_to_source(FType, Fun, Ctx, Lvl, {returnBody, ReturnItems, Order, Skip, []} = bottom_up -> Fun(ST, NewCtx5) end, RT = {ReturnItemsNew ++ " " ++ OrderNew ++ " " ++ SkipNew, NewCtx6}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {returnBody, ReturnItems, Order, Skip, Limit} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -2510,7 +2510,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {returnBody, ReturnItems, Order, Skip, Limit} bottom_up -> Fun(ST, NewCtx7) end, RT = {ReturnItemsNew ++ " " ++ OrderNew ++ " " ++ SkipNew ++ " " ++ LimitNew, NewCtx8}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -2518,7 +2518,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {returnBody, ReturnItems, Order, Skip, Limit} % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pt_to_source(FType, Fun, Ctx, Lvl, {returnItem, Expression, []} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -2529,10 +2529,10 @@ pt_to_source(FType, Fun, Ctx, Lvl, {returnItem, Expression, []} = ST) -> bottom_up -> Fun(ST, NewCtx1) end, RT = {ExpressionNew, NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {returnItem, Expression, Variable} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -2548,7 +2548,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {returnItem, Expression, Variable} = ST) -> bottom_up -> Fun(ST, NewCtx3) end, RT = {ExpressionNew ++ " as " ++ VariableNew, NewCtx4}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -2556,7 +2556,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {returnItem, Expression, Variable} = ST) -> % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pt_to_source(FType, Fun, Ctx, _Lvl, {returnItems, Asterik, Comma, []} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [_Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [_Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -2566,10 +2566,10 @@ pt_to_source(FType, Fun, Ctx, _Lvl, {returnItems, Asterik, Comma, []} = ST) -> bottom_up -> Fun(ST, NewCtx) end, RT = {Asterik ++ Comma, NewCtx1}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {returnItems, Asterik, Comma, ReturnItemCommalist} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -2580,7 +2580,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {returnItems, Asterik, Comma, ReturnItemComma bottom_up -> Fun(ST, NewCtx1) end, RT = {Asterik ++ Comma ++ ReturnItemCommalistNew, NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -2588,7 +2588,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {returnItems, Asterik, Comma, ReturnItemComma % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pt_to_source(FType, Fun, Ctx, Lvl, {set, Value} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -2599,7 +2599,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {set, Value} = ST) -> bottom_up -> Fun(ST, NewCtx1) end, RT = {"set " ++ ValueNew, NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -2607,7 +2607,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {set, Value} = ST) -> % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pt_to_source(FType, Fun, Ctx, Lvl, {setItem, Value_1, Operation, Value_2} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -2626,7 +2626,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {setItem, Value_1, Operation, Value_2} = ST) [] -> []; _ -> " " ++ Operation ++ " " end ++ Value_2New, NewCtx4}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -2634,7 +2634,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {setItem, Value_1, Operation, Value_2} = ST) % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pt_to_source(FType, Fun, Ctx, Lvl, {singleQuery, Value} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -2645,7 +2645,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {singleQuery, Value} = ST) -> bottom_up -> Fun(ST, NewCtx1) end, RT = {ValueNew, NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -2653,7 +2653,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {singleQuery, Value} = ST) -> % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pt_to_source(FType, Fun, Ctx, Lvl, {sortItem, Value, Type} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -2667,7 +2667,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {sortItem, Value, Type} = ST) -> [] -> []; _ -> " " end ++ Type, NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -2675,7 +2675,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {sortItem, Value, Type} = ST) -> % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pt_to_source(FType, Fun, Ctx, Lvl, {union, All, SingleQuery} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -2689,7 +2689,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {union, All, SingleQuery} = ST) -> 0 -> []; _ -> All ++ " " end ++ SingleQueryNew, NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -2697,7 +2697,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {union, All, SingleQuery} = ST) -> % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pt_to_source(FType, Fun, Ctx, Lvl, {unwind, Expression, Variable} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -2713,7 +2713,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {unwind, Expression, Variable} = ST) -> bottom_up -> Fun(ST, NewCtx3) end, RT = {"unwind " ++ ExpressionNew ++ " as " ++ VariableNew, NewCtx4}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -2721,7 +2721,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {unwind, Expression, Variable} = ST) -> % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pt_to_source(FType, Fun, Ctx, Lvl, {with, Distinct, ReturnBody, []} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -2735,10 +2735,10 @@ pt_to_source(FType, Fun, Ctx, Lvl, {with, Distinct, ReturnBody, []} = ST) -> [] -> []; _ -> "distinct " end ++ ReturnBodyNew, NewCtx2}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; pt_to_source(FType, Fun, Ctx, Lvl, {with, Distinct, ReturnBody, Where} = ST) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n ST: ~p~n", [Lvl, ST]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx @@ -2757,7 +2757,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {with, Distinct, ReturnBody, Where} = ST) -> [] -> []; _ -> "distinct " end ++ ReturnBodyNew ++ " " ++ WhereNew, NewCtx4}, - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> ~n RT: ~p~n", [RT]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -2765,6 +2765,6 @@ pt_to_source(FType, Fun, Ctx, Lvl, {with, Distinct, ReturnBody, Where} = ST) -> % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pt_to_source(_FType, Fun, Ctx, _Lvl, PTree) -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source/5 ===> Start ~p~n PTree: ~p~n", [_Lvl, PTree]), + ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n PTree: ~p~n", [_Lvl, PTree]), Fun(PTree, Ctx), throw({"Parse tree not supported", PTree}). From bc7adab6486115395ec6567c402f7a33c9cf6a5f Mon Sep 17 00:00:00 2001 From: walter-weinmann Date: Thu, 20 Apr 2017 15:08:31 +0200 Subject: [PATCH 2/2] Removing unit-productions. --- src/ocparse.yrl | 179 ++++++++++++++++---------------------- src/ocparse_generator.erl | 3 - src/ocparse_util.erl | 57 +++++------- test/ocparse_test.erl | 1 + 4 files changed, 99 insertions(+), 141 deletions(-) diff --git a/src/ocparse.yrl b/src/ocparse.yrl index 62d80ba..8fe6aac 100644 --- a/src/ocparse.yrl +++ b/src/ocparse.yrl @@ -32,7 +32,6 @@ Nonterminals add_or_subtract_expression and_expression and_expression_addon_list - anonymous_pattern_part atom boolean_literal clause @@ -42,14 +41,11 @@ Nonterminals cypher delete double_literal - expression expression_commalist filter_expression function_invocation - function_name integer_literal id_in_coll - label_name limit list_comprehension list_literal @@ -87,7 +83,6 @@ Nonterminals power_of_expression_addon_list properties property_expression - property_key_name property_key_name_expression property_key_name_expression_commalist property_lookup @@ -95,10 +90,8 @@ Nonterminals property_or_labels_expression property_or_labels_expression_addon property_or_labels_expression_addon_list - query range_literal regular_query - rel_type_name rel_type_verticalbarlist relationship_detail relationship_pattern @@ -119,7 +112,6 @@ Nonterminals skip sort_item sort_item_commalist - statement string_list_null_operator_expression symbolic_name unary_add_or_subtract @@ -129,7 +121,6 @@ Nonterminals union union_list unwind - variable where with xor_expression @@ -253,8 +244,8 @@ Left 410 unary_add_or_subtract. %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Grammar rules. %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -cypher -> statement ';' : {cypher, '$1', ";"}. -cypher -> statement : {cypher, '$1', []}. +cypher -> regular_query ';' : {cypher, '$1', ";"}. +cypher -> regular_query : {cypher, '$1', []}. %% ============================================================================= %% Helper definitions - test purposes. @@ -263,10 +254,6 @@ cypher -> atom % cypher -> parenthesized_expression : '$1'. %% ============================================================================= -statement -> query : {statement, '$1'}. - -query -> regular_query : {query, '$1'}. - regular_query -> single_query union_list : {regularQuery, '$1', '$2'}. regular_query -> single_query : {regularQuery, '$1', []}. @@ -304,7 +291,7 @@ match -> OPTIONAL MATCH pattern match -> MATCH pattern where : {match, [], '$2', '$3'}. match -> MATCH pattern : {match, [], '$2', []}. -unwind -> UNWIND expression AS variable : {unwind, '$2', '$4'}. +unwind -> UNWIND or_expression AS symbolic_name : {unwind, '$2', '$4'}. merge -> MERGE pattern_part merge_action_list : {merge, '$2', '$3'}. merge -> MERGE pattern_part : {merge, '$2', []}. @@ -330,10 +317,10 @@ set_item_commalist -> set_item ',' set_item_commalist set_item_commalist -> set_item : ['$1']. %% ----------------------------------------------------------------------------- -set_item -> property_expression '=' expression : {setItem, '$1', "=", '$3'}. -set_item -> variable '=' expression : {setItem, '$1', "=", '$3'}. -set_item -> variable '+=' expression : {setItem, '$1', "+=", '$3'}. -set_item -> variable node_labels : {setItem, '$1', [], '$2'}. +set_item -> property_expression '=' or_expression : {setItem, '$1', "=", '$3'}. +set_item -> symbolic_name '=' or_expression : {setItem, '$1', "=", '$3'}. +set_item -> symbolic_name '+=' or_expression : {setItem, '$1', "+=", '$3'}. +set_item -> symbolic_name node_labels : {setItem, '$1', [], '$2'}. delete -> DETACH DELETE expression_commalist : {delete, "detach", '$3'}. delete -> DELETE expression_commalist : {delete, [], '$2'}. @@ -341,8 +328,8 @@ delete -> DELETE expression_commalist %% ============================================================================= %% Helper definitions. %% ----------------------------------------------------------------------------- -expression_commalist -> expression ',' expression_commalist : ['$1' | '$3']. -expression_commalist -> expression : ['$1']. +expression_commalist -> or_expression ',' expression_commalist : ['$1' | '$3']. +expression_commalist -> or_expression : ['$1']. %% ----------------------------------------------------------------------------- remove -> REMOVE remove_item_commalist : {remove, '$2'}. @@ -354,7 +341,7 @@ remove_item_commalist -> remove_item ',' remove_item_commalist remove_item_commalist -> remove_item : ['$1']. %% ----------------------------------------------------------------------------- -remove_item -> variable node_labels : {removeItem, '$1', '$2'}. +remove_item -> symbolic_name node_labels : {removeItem, '$1', '$2'}. remove_item -> property_expression : {removeItem, '$1'}. with -> WITH DISTINCT return_body where : {with, "distinct", '$3', '$4'}. @@ -385,8 +372,8 @@ return_item_commalist -> return_item ',' return_item_commalist return_item_commalist -> return_item : ['$1']. %% ----------------------------------------------------------------------------- -return_item -> expression AS variable : {returnItem, '$1', '$3'}. -return_item -> expression : {returnItem, '$1', []}. +return_item -> or_expression AS symbolic_name : {returnItem, '$1', '$3'}. +return_item -> or_expression : {returnItem, '$1', []}. order -> ORDER BY sort_item_commalist : {order, '$3'}. @@ -397,17 +384,17 @@ sort_item_commalist -> sort_item ',' sort_item_commalist sort_item_commalist -> sort_item : ['$1']. %% ----------------------------------------------------------------------------- -skip -> SKIP expression : {skip, '$2'}. +skip -> SKIP or_expression : {skip, '$2'}. -limit -> LIMIT expression : {limit, '$2'}. +limit -> LIMIT or_expression : {limit, '$2'}. -sort_item -> expression ASCENDING : {sortItem, '$1', "ascending"}. -sort_item -> expression ASC : {sortItem, '$1', "asc"}. -sort_item -> expression DESCENDING : {sortItem, '$1', "descending"}. -sort_item -> expression DESC : {sortItem, '$1', "desc"}. -sort_item -> expression : {sortItem, '$1', []}. +sort_item -> or_expression ASCENDING : {sortItem, '$1', "ascending"}. +sort_item -> or_expression ASC : {sortItem, '$1', "asc"}. +sort_item -> or_expression DESCENDING : {sortItem, '$1', "descending"}. +sort_item -> or_expression DESC : {sortItem, '$1', "desc"}. +sort_item -> or_expression : {sortItem, '$1', []}. -where -> WHERE expression : {where, '$2'}. +where -> WHERE or_expression : {where, '$2'}. pattern -> pattern_part_commalist : {pattern, '$1'}. @@ -418,10 +405,8 @@ pattern_part_commalist -> pattern_part ',' pattern_part_commalist pattern_part_commalist -> pattern_part : ['$1']. %% ============================================================================= -pattern_part -> variable '=' anonymous_pattern_part : {patternPart, '$1', '$3'}. -pattern_part -> anonymous_pattern_part : {patternPart, [], '$1'}. - -anonymous_pattern_part -> pattern_element : {anonymousPatternPart, '$1'}. +pattern_part -> symbolic_name '=' pattern_element : {patternPart, '$1', '$3'}. +pattern_part -> pattern_element : {patternPart, [], '$1'}. pattern_element -> node_pattern pattern_element_chain_list : {patternElement, '$1', '$2'}. pattern_element -> node_pattern : {patternElement, '$1', []}. @@ -434,14 +419,14 @@ pattern_element_chain_list -> pattern_element_chain_list pattern_element_chain pattern_element_chain_list -> pattern_element_chain : ['$1']. %% ============================================================================= -node_pattern -> '(' variable node_labels properties ')' : {nodePattern, '$2', '$3', '$4'}. -node_pattern -> '(' variable node_labels ')' : {nodePattern, '$2', '$3', []}. -node_pattern -> '(' variable properties ')' : {nodePattern, '$2', [], '$3'}. -node_pattern -> '(' variable ')' : {nodePattern, '$2', [], []}. -node_pattern -> '(' node_labels properties ')' : {nodePattern, [], '$2', '$3'}. -node_pattern -> '(' node_labels ')' : {nodePattern, [], '$2', []}. -node_pattern -> '(' properties ')' : {nodePattern, [], [], '$2'}. -node_pattern -> '(' ')' : {nodePattern, [], [], []}. +node_pattern -> '(' symbolic_name node_labels properties ')' : {nodePattern, '$2', '$3', '$4'}. +node_pattern -> '(' symbolic_name node_labels ')' : {nodePattern, '$2', '$3', []}. +node_pattern -> '(' symbolic_name properties ')' : {nodePattern, '$2', [], '$3'}. +node_pattern -> '(' symbolic_name ')' : {nodePattern, '$2', [], []}. +node_pattern -> '(' node_labels properties ')' : {nodePattern, [], '$2', '$3'}. +node_pattern -> '(' node_labels ')' : {nodePattern, [], '$2', []}. +node_pattern -> '(' properties ')' : {nodePattern, [], [], '$2'}. +node_pattern -> '(' ')' : {nodePattern, [], [], []}. pattern_element_chain -> relationship_pattern node_pattern : {patternElementChain, '$1', '$2'}. @@ -454,36 +439,36 @@ relationship_pattern -> '<' '-' '-' relationship_pattern -> '-' '-' '>' : {relationshipPattern, "-->", [], []}. relationship_pattern -> '-' '-' : {relationshipPattern, "--", [], []}. -relationship_detail -> '[' variable relationship_types range_literal properties ']' : {relationshipDetail, '$2', '$3', '$4', '$5'}. -relationship_detail -> '[' variable relationship_types range_literal ']' : {relationshipDetail, '$2', '$3', '$4', []}. -relationship_detail -> '[' variable relationship_types properties ']' : {relationshipDetail, '$2', '$3', [], '$4'}. -relationship_detail -> '[' variable relationship_types ']' : {relationshipDetail, '$2', '$3', [], []}. -relationship_detail -> '[' variable range_literal properties ']' : {relationshipDetail, '$2', [], '$3', '$4'}. -relationship_detail -> '[' variable range_literal ']' : {relationshipDetail, '$2', [], '$3', []}. -relationship_detail -> '[' variable properties ']' : {relationshipDetail, '$2', [], [], '$3'}. -relationship_detail -> '[' variable ']' : {relationshipDetail, '$2', [], [], []}. -relationship_detail -> '[' relationship_types range_literal properties ']' : {relationshipDetail, [], '$2', '$3', '$4'}. -relationship_detail -> '[' relationship_types range_literal ']' : {relationshipDetail, [], '$2', '$3', []}. -relationship_detail -> '[' relationship_types properties ']' : {relationshipDetail, [], '$2', [], '$3'}. -relationship_detail -> '[' relationship_types ']' : {relationshipDetail, [], '$2', [], []}. -relationship_detail -> '[' range_literal properties ']' : {relationshipDetail, [], [], '$2', '$3'}. -relationship_detail -> '[' range_literal ']' : {relationshipDetail, [], [], '$2', []}. -relationship_detail -> '[' properties ']' : {relationshipDetail, [], [], [], '$2'}. -relationship_detail -> '[' ']' : {relationshipDetail, [], [], [], []}. +relationship_detail -> '[' symbolic_name relationship_types range_literal properties ']' : {relationshipDetail, '$2', '$3', '$4', '$5'}. +relationship_detail -> '[' symbolic_name relationship_types range_literal ']' : {relationshipDetail, '$2', '$3', '$4', []}. +relationship_detail -> '[' symbolic_name relationship_types properties ']' : {relationshipDetail, '$2', '$3', [], '$4'}. +relationship_detail -> '[' symbolic_name relationship_types ']' : {relationshipDetail, '$2', '$3', [], []}. +relationship_detail -> '[' symbolic_name range_literal properties ']' : {relationshipDetail, '$2', [], '$3', '$4'}. +relationship_detail -> '[' symbolic_name range_literal ']' : {relationshipDetail, '$2', [], '$3', []}. +relationship_detail -> '[' symbolic_name properties ']' : {relationshipDetail, '$2', [], [], '$3'}. +relationship_detail -> '[' symbolic_name ']' : {relationshipDetail, '$2', [], [], []}. +relationship_detail -> '[' relationship_types range_literal properties ']' : {relationshipDetail, [], '$2', '$3', '$4'}. +relationship_detail -> '[' relationship_types range_literal ']' : {relationshipDetail, [], '$2', '$3', []}. +relationship_detail -> '[' relationship_types properties ']' : {relationshipDetail, [], '$2', [], '$3'}. +relationship_detail -> '[' relationship_types ']' : {relationshipDetail, [], '$2', [], []}. +relationship_detail -> '[' range_literal properties ']' : {relationshipDetail, [], [], '$2', '$3'}. +relationship_detail -> '[' range_literal ']' : {relationshipDetail, [], [], '$2', []}. +relationship_detail -> '[' properties ']' : {relationshipDetail, [], [], [], '$2'}. +relationship_detail -> '[' ']' : {relationshipDetail, [], [], [], []}. properties -> map_literal : {properties, '$1'}. properties -> parameter : {properties, '$1'}. -relationship_types -> ':' rel_type_name rel_type_verticalbarlist : {relationshipTypes, '$2', '$3'}. -relationship_types -> ':' rel_type_name : {relationshipTypes, '$2', []}. +relationship_types -> ':' symbolic_name rel_type_verticalbarlist : {relationshipTypes, '$2', '$3'}. +relationship_types -> ':' symbolic_name : {relationshipTypes, '$2', []}. %% ============================================================================= %% Helper definitions. %% ----------------------------------------------------------------------------- -rel_type_verticalbarlist -> rel_type_verticalbarlist '|' ':' rel_type_name : '$1' ++ [{'$4', ":"}]. -rel_type_verticalbarlist -> rel_type_verticalbarlist '|' rel_type_name : '$1' ++ [{'$3', []}]. -rel_type_verticalbarlist -> '|' ':' rel_type_name : [{'$3', ":"}]. -rel_type_verticalbarlist -> '|' rel_type_name : [{'$2', []}]. +rel_type_verticalbarlist -> rel_type_verticalbarlist '|' ':' symbolic_name : '$1' ++ [{'$4', ":"}]. +rel_type_verticalbarlist -> rel_type_verticalbarlist '|' symbolic_name : '$1' ++ [{'$3', []}]. +rel_type_verticalbarlist -> '|' ':' symbolic_name : [{'$3', ":"}]. +rel_type_verticalbarlist -> '|' symbolic_name : [{'$2', []}]. %% ============================================================================= node_labels -> node_label_list : {nodeLabels, '$1'}. @@ -495,19 +480,13 @@ node_label_list -> node_label_list node_label node_label_list -> node_label : ['$1']. %% ============================================================================= -node_label -> ':' label_name : {nodeLabel, '$2'}. +node_label -> ':' symbolic_name : {nodeLabel, '$2'}. range_literal -> '*' integer_literal '..' integer_literal : {rangeLiteral, '$2', "..", '$4'}. range_literal -> '*' integer_literal '..' : {rangeLiteral, '$2', "..", []}. range_literal -> '*' integer_literal : {rangeLiteral, '$2', [], []}. range_literal -> '*' : {rangeLiteral, [], [], []}. -label_name -> symbolic_name : {labelName, '$1'}. - -rel_type_name -> symbolic_name : {relTypeName, '$1'}. - -expression -> or_expression : {expression, '$1'}. - or_expression -> xor_expression xor_expression_addon_list : {orExpression, '$1', '$2'}. or_expression -> xor_expression : {orExpression, '$1', []}. @@ -631,10 +610,10 @@ property_or_labels_expression_addon_list -> property_or_labels_expression_addon_ property_or_labels_expression_addon_list -> property_or_labels_expression_addon : ['$1']. -property_or_labels_expression_addon -> '[' expression '..' expression ']' : {"[", '$2', '$4'}. -property_or_labels_expression_addon -> '[' expression '..' ']' : {"[", '$2', []}. -property_or_labels_expression_addon -> '[' expression ']' : {"[", '$2'}. -property_or_labels_expression_addon -> '[' '..' expression ']' : {"[", [], '$3'}. +property_or_labels_expression_addon -> '[' or_expression '..' or_expression ']' : {"[", '$2', '$4'}. +property_or_labels_expression_addon -> '[' or_expression '..' ']' : {"[", '$2', []}. +property_or_labels_expression_addon -> '[' or_expression ']' : {"[", '$2'}. +property_or_labels_expression_addon -> '[' '..' or_expression ']' : {"[", [], '$3'}. property_or_labels_expression_addon -> '[' '..' ']' : {"[", [], []}. property_or_labels_expression_addon -> '=~' property_or_labels_expression : {"=~", '$2'}. property_or_labels_expression_addon -> IN property_or_labels_expression : {"in", '$2'}. @@ -659,7 +638,7 @@ node_labels_property_lookup_list -> property_lo atom -> COUNT '(' '*' ')' : {atom, {terminal, "count(*)"}}. atom -> FILTER '(' filter_expression ')' : {atom, {'filter', '$3'}}. -atom -> EXTRACT '(' filter_expression '|' expression ')' : {atom, {'extract', '$3', '$5'}}. +atom -> EXTRACT '(' filter_expression '|' or_expression ')' : {atom, {'extract', '$3', '$5'}}. atom -> EXTRACT '(' filter_expression ')' : {atom, {'extract', '$3', []}}. atom -> ALL '(' filter_expression ')' : {atom, {'all', '$3'}}. atom -> ANY '(' filter_expression ')' : {atom, {'any', '$3'}}. @@ -672,7 +651,7 @@ atom -> parameter atom -> parenthesized_expression : {atom, '$1'}. atom -> pattern_comprehension : {atom, '$1'}. atom -> relationships_pattern : {atom, '$1'}. -atom -> variable : {atom, '$1'}. +atom -> symbolic_name : {atom, '$1'}. literal -> boolean_literal : {literal, '$1'}. literal -> list_literal : {literal, '$1'}. @@ -695,46 +674,42 @@ partial_comparison_expression -> '>' add_or_subtract_expression partial_comparison_expression -> '<=' add_or_subtract_expression : {partialComparisonExpression, '$2', "<="}. partial_comparison_expression -> '>=' add_or_subtract_expression : {partialComparisonExpression, '$2', ">="}. -parenthesized_expression -> '(' expression ')' : {parenthesizedExpression, '$2'}. +parenthesized_expression -> '(' or_expression ')' : {parenthesizedExpression, '$2'}. relationships_pattern -> node_pattern pattern_element_chain_list : {relationshipsPattern, '$1', '$2'}. filter_expression -> id_in_coll where : {filterExpression, '$1', '$2'}. filter_expression -> id_in_coll : {filterExpression, '$1', []}. -id_in_coll -> variable IN expression : {idInColl, '$1', '$3'}. +id_in_coll -> symbolic_name IN or_expression : {idInColl, '$1', '$3'}. -function_invocation -> function_name '(' DISTINCT expression_commalist ')' : {functionInvocation, '$1', "distinct", '$4'}. -function_invocation -> function_name '(' DISTINCT ')' : {functionInvocation, '$1', "distinct", []}. -function_invocation -> function_name '(' expression_commalist ')' : {functionInvocation, '$1', [], '$3'}. -function_invocation -> function_name '(' ')' : {functionInvocation, '$1', [], []}. +function_invocation -> symbolic_name '(' DISTINCT expression_commalist ')' : {functionInvocation, '$1', "distinct", '$4'}. +function_invocation -> symbolic_name '(' DISTINCT ')' : {functionInvocation, '$1', "distinct", []}. +function_invocation -> symbolic_name '(' expression_commalist ')' : {functionInvocation, '$1', [], '$3'}. +function_invocation -> symbolic_name '(' ')' : {functionInvocation, '$1', [], []}. %% ============================================================================= %% Helper definitions. %% ----------------------------------------------------------------------------- -function_invocation -> COUNT '(' DISTINCT expression_commalist ')' : {functionInvocation, {functionName, {symbolicName, "count"}}, "distinct", '$4'}. -function_invocation -> COUNT '(' DISTINCT ')' : {functionInvocation, {functionName, {symbolicName, "count"}}, "distinct", []}. -function_invocation -> COUNT '(' expression_commalist ')' : {functionInvocation, {functionName, {symbolicName, "count"}}, [], '$3'}. -function_invocation -> COUNT '(' ')' : {functionInvocation, {functionName, {symbolicName, "count"}}, [], []}. +function_invocation -> COUNT '(' DISTINCT expression_commalist ')' : {functionInvocation, {symbolicName, "count"}, "distinct", '$4'}. +function_invocation -> COUNT '(' DISTINCT ')' : {functionInvocation, {symbolicName, "count"}, "distinct", []}. +function_invocation -> COUNT '(' expression_commalist ')' : {functionInvocation, {symbolicName, "count"}, [], '$3'}. +function_invocation -> COUNT '(' ')' : {functionInvocation, {symbolicName, "count"}, [], []}. % ============================================================================= -function_name -> symbolic_name : {functionName, '$1'}. - -list_comprehension -> '[' filter_expression '|' expression ']' : {listComprehension, '$2', '$4'}. +list_comprehension -> '[' filter_expression '|' or_expression ']' : {listComprehension, '$2', '$4'}. list_comprehension -> '[' filter_expression ']' : {listComprehension, '$2', []}. -pattern_comprehension -> '[' variable '=' relationships_pattern WHERE expression '|' expression ']' +pattern_comprehension -> '[' symbolic_name '=' relationships_pattern WHERE or_expression '|' or_expression ']' : {patternComprehension, '$2', '$4', '$6', '$8'}. -pattern_comprehension -> '[' variable '=' relationships_pattern '|' expression ']' +pattern_comprehension -> '[' symbolic_name '=' relationships_pattern '|' or_expression ']' : {patternComprehension, '$2', '$4', [], '$6'}. -pattern_comprehension -> '[' relationships_pattern WHERE expression '|' expression ']' +pattern_comprehension -> '[' relationships_pattern WHERE or_expression '|' or_expression ']' : {patternComprehension, [], '$2', '$4', '$6'}. -pattern_comprehension -> '[' relationships_pattern '|' expression ']' +pattern_comprehension -> '[' relationships_pattern '|' or_expression ']' : {patternComprehension, [], '$2', [], '$4'}. -property_lookup -> '.' property_key_name : {propertyLookup, '$2'}. - -variable -> symbolic_name : {variable, '$1'}. +property_lookup -> '.' symbolic_name : {propertyLookup, '$2'}. number_literal -> double_literal : {numberLiteral, '$1'}. number_literal -> integer_literal : {numberLiteral, '$1'}. @@ -749,7 +724,7 @@ property_key_name_expression_commalist -> property_key_name_expression ',' prope : ['$1' | '$3']. property_key_name_expression_commalist -> property_key_name_expression : ['$1']. -property_key_name_expression -> property_key_name ':' expression : {'$1', '$3'}. +property_key_name_expression -> symbolic_name ':' or_expression : {propertyKeyNameExpression, '$1', '$3'}. %% ============================================================================= parameter -> '$' symbolic_name : {parameter, '$2'}. @@ -764,8 +739,6 @@ property_lookup_list -> property_lookup_list property_lookup property_lookup_list -> property_lookup : ['$1']. %% ============================================================================= -property_key_name -> symbolic_name : {propertyKeyName, '$1'}. - integer_literal -> DECIMAL_INTEGER : {integerLiteral, unwrap('$1')}. integer_literal -> HEX_INTEGER : {integerLiteral, unwrap('$1')}. integer_literal -> OCTAL_INTEGER : {integerLiteral, unwrap('$1')}. diff --git a/src/ocparse_generator.erl b/src/ocparse_generator.erl index f212e78..6c96f72 100644 --- a/src/ocparse_generator.erl +++ b/src/ocparse_generator.erl @@ -31,16 +31,13 @@ ]). -define(ALL_CLAUSE_CT_RELIABILITY, [ create, - cypher, delete, match, merge, - query, remove, return, set, special, - statement, unwind, with ]). diff --git a/src/ocparse_util.erl b/src/ocparse_util.erl index ef78384..70c85bb 100644 --- a/src/ocparse_util.erl +++ b/src/ocparse_util.erl @@ -44,7 +44,7 @@ pt_to_source(FType, Fun, Ctx, _Lvl, {"[", [], []} = ST) -> RT = {"[..]", NewCtx1}, ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; -pt_to_source(FType, Fun, Ctx, Lvl, {"[" = Type, {expression, _} = Value} = ST) -> +pt_to_source(FType, Fun, Ctx, Lvl, {"[" = Type, {orExpression, _, _} = Value} = ST) -> ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); @@ -58,7 +58,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {"[" = Type, {expression, _} = Value} = ST) - RT = {Type ++ ValueNew ++ "]", NewCtx2}, ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; -pt_to_source(FType, Fun, Ctx, Lvl, {"[", [], {expression, _} = Value} = ST) -> +pt_to_source(FType, Fun, Ctx, Lvl, {"[", [], {orExpression, _, _} = Value} = ST) -> ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); @@ -72,7 +72,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {"[", [], {expression, _} = Value} = ST) -> RT = {"[.." ++ ValueNew ++ "]", NewCtx2}, ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; -pt_to_source(FType, Fun, Ctx, Lvl, {"[", {expression, _} = Value, []} = ST) -> +pt_to_source(FType, Fun, Ctx, Lvl, {"[", {orExpression, _, _} = Value, []} = ST) -> ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); @@ -86,7 +86,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {"[", {expression, _} = Value, []} = ST) -> RT = {"[" ++ ValueNew ++ "..]", NewCtx2}, ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; -pt_to_source(FType, Fun, Ctx, Lvl, {"[", {expression, _} = Value1, {expression, _} = Value2} = ST) -> +pt_to_source(FType, Fun, Ctx, Lvl, {"[", {orExpression, _, _} = Value1, {orExpression, _, _} = Value2} = ST) -> ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); @@ -304,23 +304,17 @@ pt_to_source(FType, Fun, Ctx, Lvl, {Type, Values} = ST) RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% anonymousPatternPart / expression / functionName / labelName / patternPart / -% propertyKeyName / query / relTypeName / removeItem / sortItem / statement / variable +% orExpression / patternElement / patternPart / regularQuery / removeItem / +% sortItem % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pt_to_source(FType, Fun, Ctx, Lvl, {Type, Value} = ST) - when Type == anonymousPatternPart; - Type == expression; - Type == functionName; - Type == labelName; + when Type == orExpression; + Type == patternElement; Type == patternPart; - Type == propertyKeyName; - Type == query; - Type == relTypeName; + Type == regularQuery; Type == removeItem; - Type == sortItem; - Type == statement; - Type == variable -> + Type == sortItem -> ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); @@ -346,8 +340,8 @@ pt_to_source(FType, Fun, Ctx, Lvl, {atom, {Type, _} = Value} = ST) Type == parameter; Type == parenthesizedExpression; Type == patternComprehension; - Type == terminal; - Type == variable -> + Type == symbolicName; + Type == terminal -> ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); @@ -740,12 +734,11 @@ pt_to_source(FType, Fun, Ctx, Lvl, {Type, Values} = ST) {ValueNew, NewCtx1} = lists:foldl(fun(F, {Acc, CtxAcc}) -> case F of {ListType, _} - when Type == expressionCommalist, ListType == expression; - Type == patternPartCommalist, ListType == patternPart; + when Type == patternPartCommalist, ListType == patternPart; Type == removeItemCommalist, ListType == removeItem; Type == returnItemCommalist, ListType == returnItem; Type == sortItemCommalist, ListType == sortItem; - Type == variableCommalist, ListType == variable -> + Type == variableCommalist, ListType == symbolicName -> ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n F: ~p~n", [F]), {SubAcc, CtxAcc1} = pt_to_source(FType, Fun, CtxAcc, Lvl + 1, F), {Acc ++ case length(Acc) of @@ -753,7 +746,9 @@ pt_to_source(FType, Fun, Ctx, Lvl, {Type, Values} = ST) _ -> "," end ++ SubAcc, CtxAcc1}; {ListType, _, _} - when Type == patternPartCommalist, ListType == patternPart; + when Type == expressionCommalist, ListType == orExpression; + Type == patternPartCommalist, ListType == patternPart; + Type == propertyKeyNameExpressionCommalist, ListType == propertyKeyNameExpression; Type == removeItemCommalist, ListType == removeItem; Type == returnItemCommalist, ListType == returnItem; Type == setItemCommalist, ListType == setItem; @@ -768,14 +763,6 @@ pt_to_source(FType, Fun, Ctx, Lvl, {Type, Values} = ST) when Type == setItemCommalist, ListType == setItem -> ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n F: ~p~n", [F]), {SubAcc, CtxAcc1} = pt_to_source(FType, Fun, CtxAcc, Lvl + 1, F), - {Acc ++ case length(Acc) of - 0 -> []; - _ -> "," - end ++ SubAcc, CtxAcc1}; - {{propertyKeyName, _}, {expression, _}} - when Type == propertyKeyNameExpressionCommalist -> - ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n F: ~p~n", [F]), - {SubAcc, CtxAcc1} = pt_to_source(FType, Fun, CtxAcc, Lvl + 1, F), {Acc ++ case length(Acc) of 0 -> []; _ -> "," @@ -1652,16 +1639,16 @@ pt_to_source(FType, Fun, Ctx, Lvl, {propertyExpression, Atom, PropertyLookUpList RT; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% propertyKeyNameExpression (Helper definition) +% propertyKeyNameExpression % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -pt_to_source(FType, Fun, Ctx, Lvl, {{propertyKeyName, _} = PropertyKeyName, {expression, _} = Expression} = ST) -> +pt_to_source(FType, Fun, Ctx, Lvl, {propertyKeyNameExpression, SymbolicName, Expression} = ST) -> ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> Start ~p~n ST: ~p~n", [Lvl, ST]), NewCtx = case FType of top_down -> Fun(ST, Ctx); bottom_up -> Ctx end, - {PropertyKeyNameNew, NewCtx1} = pt_to_source(FType, Fun, NewCtx, Lvl + 1, PropertyKeyName), + {SymbolicNameNew, NewCtx1} = pt_to_source(FType, Fun, NewCtx, Lvl + 1, SymbolicName), NewCtx2 = case FType of top_down -> NewCtx1; bottom_up -> Fun(ST, NewCtx1) @@ -1671,7 +1658,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {{propertyKeyName, _} = PropertyKeyName, {exp top_down -> NewCtx3; bottom_up -> Fun(ST, NewCtx3) end, - RT = {PropertyKeyNameNew ++ ":" ++ ExpressionNew, NewCtx4}, + RT = {SymbolicNameNew ++ ":" ++ ExpressionNew, NewCtx4}, ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n RT: ~p~n", [RT]), RT; @@ -2255,7 +2242,7 @@ pt_to_source(FType, Fun, Ctx, Lvl, {relTypeVerticalbarlist, Values} = ST) end, {ValueNew, NewCtx1} = lists:foldl(fun(F, {Acc, CtxAcc}) -> case F of - {{relTypeName, _} = RTN, Colon} -> + {{symbolicName, _} = RTN, Colon} -> ?debugFmt(?MODULE_STRING ++ ":pt_to_source ===> ~n F: ~p~n", [F]), {SubAcc, CtxAcc1} = pt_to_source(FType, Fun, CtxAcc, Lvl + 1, RTN), {Acc ++ "|" ++ Colon ++ SubAcc, CtxAcc1} diff --git a/test/ocparse_test.erl b/test/ocparse_test.erl index 667d2fb..c6cdba4 100644 --- a/test/ocparse_test.erl +++ b/test/ocparse_test.erl @@ -243,6 +243,7 @@ eunit_test_source(_TestGroup, Source, Logs) -> NSource_TD = case ?PARSER_MODULE:pt_to_source_td(ParseTree) of {error, Error_TD} -> ?D_("~n[TD] Error ParseTree -> NewSource : ParseTree~n > ~p", [ParseTree]), + ?D_("~n[TD] Error ParseTree -> NewSource : Error~n > ~p", [Error_TD]), throw({error, Error_TD}); NS_TD -> NS_TD