{"action":"created","comment":{"url":"https://api.github.com/repos/tarantool/graphql/pulls/comments/215385179","pull_request_review_id":152637823,"id":215385179,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNTM4NTE3OQ==","diff_hunk":"@@ -0,0 +1,217 @@\n+local lpeg = require('lulpeg')\n+local P, R, S, V = lpeg.P, lpeg.R, lpeg.S, lpeg.V\n+local C = lpeg.C\n+\n+-- Some special symbols.\n+local space_symbol = S(' \\t\\r\\n')\n+local eof = P(-1)\n+local some_spaces = space_symbol ^ 0\n+\n+--\n+-- Possible identifier patterns:\n+--   1) Number.\n+local digit = R('09')\n+local integer = (S('-+') ^ -1) * (digit ^ 1)\n+local decimal = integer * '.' * (digit ^ 1)\n+local number_pat = decimal + integer\n+--   2) Boolean.\n+local bool_pat = P('false') + P('true')\n+--   3) String.\n+local string_pat = P'\\\"' * C((P'\\\\\"' + 1 - S'\\\"') ^ 0) * P'\"'\n+--   4) Variable.\n+local variable_name = ('_' + R('az', 'AZ')) *\n+                      (('_' + R('09', 'az', 'AZ')) ^ 0)\n+--   5) Object's field path.\n+local field = ('_' + R('az', 'AZ')) * ('_' + R('09', 'az', 'AZ')) ^ 0\n+local field_path = field * ('.' * field) ^ 0\n+\n+--\n+-- Possible logical function patterns:\n+--   1) is_null.\n+local is_null = P('is_null')\n+--   2) not_null.\n+local not_null = P('not_null')\n+--   3) regexp.\n+local regexp = P('regexp')\n+\n+--\n+-- Possible unary operator patterns:\n+--   1) Logical negation.\n+local negation = P('!')\n+\n+-- Possible binary operator patterns:\n+--   1) Logical and.\n+local logic_and = P('&&')\n+--   2) logical or.\n+local logic_or = P('||')\n+--   3) +\n+local addition = P('+')\n+--   4) -\n+local subtraction = P('-')\n+--   5) ==\n+local eq = P('==')\n+--   6) !=\n+local not_eq = P('!=')\n+--   7) >\n+local gt = P('>')\n+--   8) >=\n+local ge = P('>=')\n+--   9) <\n+local lt = P('<')\n+--   10) <=\n+local le = P('<=')\n+\n+--\n+-- AST nodes generating functions.\n+--\n+local function identical(arg)\n+    return arg\n+end\n+\n+local function root_expr_node(expr)\n+    return {\n+        kind = 'root_expression',\n+        entity = expr\n+    }\n+end\n+\n+local function bin_op_node(...)\n+    local args = {...}\n+    if select('#', ...) == 1 then\n+        return identical(args[1])\n+    end\n+    local operators, nodes = {}, {}\n+    for i, v in ipairs(args) do\n+        if i % 2 == 0 then\n+            table.insert(operators, v)\n+        else\n+            table.insert(nodes, v)\n+        end\n+    end\n+    return {\n+        kind = 'binary_operations',\n+        operators = operators,\n+        nodes = nodes\n+    }\n+--    return {\n+--        kind = 'binary_operation',\n+--        op = binary_operator,\n+--        node_1 = operand_1,\n+--        node_2 = operand_2\n+--    }\n+end\n+\n+local function unary_op_node(unary_operator, operand_1)\n+    return {\n+        kind = 'unary_operation',\n+        op = unary_operator,\n+        node = operand_1\n+    }\n+end\n+\n+local function func_node(name, ...)\n+    local args = {...}\n+    return {\n+        kind = 'function',\n+        name = name,\n+        args = args\n+    }\n+end\n+\n+local function op_name(string)\n+    return string\n+end\n+\n+local function number_node(value)\n+    return {\n+        kind = 'const',\n+        data_class = 'number',\n+        value = value\n+    }\n+end\n+\n+local function string_node(value)\n+    return {\n+        kind = 'const',\n+        data_class = 'string',\n+        value = value\n+    }\n+end\n+\n+local function bool_node(value)\n+    return {\n+        kind = 'const',\n+        data_class = 'bool',\n+        value = value\n+    }\n+end\n+\n+local function variable_node(name)\n+    return {\n+        kind = 'variable',\n+        name = name\n+    }\n+end\n+\n+local function path_node(path)\n+    return {\n+        kind = 'object_field',\n+        path = path\n+    }\n+end\n+\n+-- Patterns returning corresponding nodes.\n+local _number = number_pat / number_node\n+local _bool = bool_pat / bool_node\n+local _string = string_pat / string_node\n+local _variable = '$' * C(variable_name) / variable_node\n+local _field_path = field_path / path_node\n+\n+local _logic_or = logic_or / op_name\n+local _logic_and = logic_and / op_name\n+local _comparison_op = (eq + not_eq + ge + gt + le + lt) / op_name\n+local _arithmetic_op = (addition + subtraction) / op_name\n+local _unary_op = negation / op_name\n+local _functions = (is_null + not_null + regexp) / identical\n+\n+--\n+-- Grammar rules for C-style expressions positioned ascending in\n+-- terms of priority.\n+--\n+local expression_grammar = P {\n+    'init_expr',\n+    init_expr = V('expr') * eof / root_expr_node,\n+    expr = some_spaces * V('log_expr_or') * some_spaces / identical,\n+\n+    log_expr_or = V('log_expr_and') * (some_spaces * _logic_or *\n+                  some_spaces * V('log_expr_and')) ^ 0 / bin_op_node,\n+    log_expr_and = V('comparison') * (some_spaces * _logic_and *\n+                   some_spaces * V('comparison')) ^ 0 / bin_op_node,\n+    comparison = V('arithmetic_expr') * (some_spaces * _comparison_op *\n+                 some_spaces * V('arithmetic_expr')) ^ 0 / bin_op_node,\n+    arithmetic_expr = V('unary_expr') * (some_spaces * _arithmetic_op *\n+                      some_spaces * V('unary_expr')) ^ 0 / bin_op_node,\n+\n+    unary_expr = (_unary_op * V('first_prio') / unary_op_node) +\n+            (V('first_prio') / identical),\n+    first_prio = (V('_function') + V('identifier') + '(' * some_spaces *\n+            V('expr') * some_spaces * ')') / identical,\n+    _function = _functions * '(' * some_spaces * (V('identifier') *","path":"graphql/expressions.lua","position":199,"original_position":199,"commit_id":"f082069b7313e6fe3de8579fb9eb1512d5af42ac","original_commit_id":"f082069b7313e6fe3de8579fb9eb1512d5af42ac","user":{"login":"Totktonada","id":92749,"node_id":"MDQ6VXNlcjkyNzQ5","avatar_url":"https://avatars1.githubusercontent.com/u/92749?v=4","gravatar_id":"","url":"https://api.github.com/users/Totktonada","html_url":"https://github.com/Totktonada","followers_url":"https://api.github.com/users/Totktonada/followers","following_url":"https://api.github.com/users/Totktonada/following{/other_user}","gists_url":"https://api.github.com/users/Totktonada/gists{/gist_id}","starred_url":"https://api.github.com/users/Totktonada/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Totktonada/subscriptions","organizations_url":"https://api.github.com/users/Totktonada/orgs","repos_url":"https://api.github.com/users/Totktonada/repos","events_url":"https://api.github.com/users/Totktonada/events{/privacy}","received_events_url":"https://api.github.com/users/Totktonada/received_events","type":"User","site_admin":false},"body":"Ouch, it was just typos, sorry. I mean left/right associalivity. B * (OP * B)^0 vs (B * OP)^0 * B.","created_at":"2018-09-05T18:46:56Z","updated_at":"2018-09-05T18:46:56Z","html_url":"https://github.com/tarantool/graphql/pull/209#discussion_r215385179","pull_request_url":"https://api.github.com/repos/tarantool/graphql/pulls/209","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/tarantool/graphql/pulls/comments/215385179"},"html":{"href":"https://github.com/tarantool/graphql/pull/209#discussion_r215385179"},"pull_request":{"href":"https://api.github.com/repos/tarantool/graphql/pulls/209"}},"in_reply_to_id":214767731},"pull_request":{"url":"https://api.github.com/repos/tarantool/graphql/pulls/209","id":212805032,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEyODA1MDMy","html_url":"https://github.com/tarantool/graphql/pull/209","diff_url":"https://github.com/tarantool/graphql/pull/209.diff","patch_url":"https://github.com/tarantool/graphql/pull/209.patch","issue_url":"https://api.github.com/repos/tarantool/graphql/issues/209","number":209,"state":"open","locked":false,"title":"graphql: implement c-style expressions parser","user":{"login":"Hollow111","id":24634892,"node_id":"MDQ6VXNlcjI0NjM0ODky","avatar_url":"https://avatars2.githubusercontent.com/u/24634892?v=4","gravatar_id":"","url":"https://api.github.com/users/Hollow111","html_url":"https://github.com/Hollow111","followers_url":"https://api.github.com/users/Hollow111/followers","following_url":"https://api.github.com/users/Hollow111/following{/other_user}","gists_url":"https://api.github.com/users/Hollow111/gists{/gist_id}","starred_url":"https://api.github.com/users/Hollow111/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hollow111/subscriptions","organizations_url":"https://api.github.com/users/Hollow111/orgs","repos_url":"https://api.github.com/users/Hollow111/repos","events_url":"https://api.github.com/users/Hollow111/events{/privacy}","received_events_url":"https://api.github.com/users/Hollow111/received_events","type":"User","site_admin":false},"body":"Needed for #13","created_at":"2018-09-03T18:37:38Z","updated_at":"2018-09-05T18:46:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2938eb253773e5247f7a0042e19f4841c44db989","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/tarantool/graphql/pulls/209/commits","review_comments_url":"https://api.github.com/repos/tarantool/graphql/pulls/209/comments","review_comment_url":"https://api.github.com/repos/tarantool/graphql/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tarantool/graphql/issues/209/comments","statuses_url":"https://api.github.com/repos/tarantool/graphql/statuses/f082069b7313e6fe3de8579fb9eb1512d5af42ac","head":{"label":"Hollow111:N_Tatunov/gh-13-c-style-expressions","ref":"N_Tatunov/gh-13-c-style-expressions","sha":"f082069b7313e6fe3de8579fb9eb1512d5af42ac","user":{"login":"Hollow111","id":24634892,"node_id":"MDQ6VXNlcjI0NjM0ODky","avatar_url":"https://avatars2.githubusercontent.com/u/24634892?v=4","gravatar_id":"","url":"https://api.github.com/users/Hollow111","html_url":"https://github.com/Hollow111","followers_url":"https://api.github.com/users/Hollow111/followers","following_url":"https://api.github.com/users/Hollow111/following{/other_user}","gists_url":"https://api.github.com/users/Hollow111/gists{/gist_id}","starred_url":"https://api.github.com/users/Hollow111/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hollow111/subscriptions","organizations_url":"https://api.github.com/users/Hollow111/orgs","repos_url":"https://api.github.com/users/Hollow111/repos","events_url":"https://api.github.com/users/Hollow111/events{/privacy}","received_events_url":"https://api.github.com/users/Hollow111/received_events","type":"User","site_admin":false},"repo":{"id":147238340,"node_id":"MDEwOlJlcG9zaXRvcnkxNDcyMzgzNDA=","name":"graphql","full_name":"Hollow111/graphql","owner":{"login":"Hollow111","id":24634892,"node_id":"MDQ6VXNlcjI0NjM0ODky","avatar_url":"https://avatars2.githubusercontent.com/u/24634892?v=4","gravatar_id":"","url":"https://api.github.com/users/Hollow111","html_url":"https://github.com/Hollow111","followers_url":"https://api.github.com/users/Hollow111/followers","following_url":"https://api.github.com/users/Hollow111/following{/other_user}","gists_url":"https://api.github.com/users/Hollow111/gists{/gist_id}","starred_url":"https://api.github.com/users/Hollow111/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hollow111/subscriptions","organizations_url":"https://api.github.com/users/Hollow111/orgs","repos_url":"https://api.github.com/users/Hollow111/repos","events_url":"https://api.github.com/users/Hollow111/events{/privacy}","received_events_url":"https://api.github.com/users/Hollow111/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Hollow111/graphql","description":"Set of adapters for GraphQL query language to the Tarantool data model","fork":true,"url":"https://api.github.com/repos/Hollow111/graphql","forks_url":"https://api.github.com/repos/Hollow111/graphql/forks","keys_url":"https://api.github.com/repos/Hollow111/graphql/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Hollow111/graphql/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Hollow111/graphql/teams","hooks_url":"https://api.github.com/repos/Hollow111/graphql/hooks","issue_events_url":"https://api.github.com/repos/Hollow111/graphql/issues/events{/number}","events_url":"https://api.github.com/repos/Hollow111/graphql/events","assignees_url":"https://api.github.com/repos/Hollow111/graphql/assignees{/user}","branches_url":"https://api.github.com/repos/Hollow111/graphql/branches{/branch}","tags_url":"https://api.github.com/repos/Hollow111/graphql/tags","blobs_url":"https://api.github.com/repos/Hollow111/graphql/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Hollow111/graphql/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Hollow111/graphql/git/refs{/sha}","trees_url":"https://api.github.com/repos/Hollow111/graphql/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Hollow111/graphql/statuses/{sha}","languages_url":"https://api.github.com/repos/Hollow111/graphql/languages","stargazers_url":"https://api.github.com/repos/Hollow111/graphql/stargazers","contributors_url":"https://api.github.com/repos/Hollow111/graphql/contributors","subscribers_url":"https://api.github.com/repos/Hollow111/graphql/subscribers","subscription_url":"https://api.github.com/repos/Hollow111/graphql/subscription","commits_url":"https://api.github.com/repos/Hollow111/graphql/commits{/sha}","git_commits_url":"https://api.github.com/repos/Hollow111/graphql/git/commits{/sha}","comments_url":"https://api.github.com/repos/Hollow111/graphql/comments{/number}","issue_comment_url":"https://api.github.com/repos/Hollow111/graphql/issues/comments{/number}","contents_url":"https://api.github.com/repos/Hollow111/graphql/contents/{+path}","compare_url":"https://api.github.com/repos/Hollow111/graphql/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Hollow111/graphql/merges","archive_url":"https://api.github.com/repos/Hollow111/graphql/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Hollow111/graphql/downloads","issues_url":"https://api.github.com/repos/Hollow111/graphql/issues{/number}","pulls_url":"https://api.github.com/repos/Hollow111/graphql/pulls{/number}","milestones_url":"https://api.github.com/repos/Hollow111/graphql/milestones{/number}","notifications_url":"https://api.github.com/repos/Hollow111/graphql/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Hollow111/graphql/labels{/name}","releases_url":"https://api.github.com/repos/Hollow111/graphql/releases{/id}","deployments_url":"https://api.github.com/repos/Hollow111/graphql/deployments","created_at":"2018-09-03T18:08:22Z","updated_at":"2018-09-03T18:08:24Z","pushed_at":"2018-09-03T18:36:16Z","git_url":"git://github.com/Hollow111/graphql.git","ssh_url":"git@github.com:Hollow111/graphql.git","clone_url":"https://github.com/Hollow111/graphql.git","svn_url":"https://github.com/Hollow111/graphql","homepage":"","size":1042,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"tarantool:master","ref":"master","sha":"2ce2d888dc538c84254e000570673af1e52648b0","user":{"login":"tarantool","id":2344919,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzNDQ5MTk=","avatar_url":"https://avatars0.githubusercontent.com/u/2344919?v=4","gravatar_id":"","url":"https://api.github.com/users/tarantool","html_url":"https://github.com/tarantool","followers_url":"https://api.github.com/users/tarantool/followers","following_url":"https://api.github.com/users/tarantool/following{/other_user}","gists_url":"https://api.github.com/users/tarantool/gists{/gist_id}","starred_url":"https://api.github.com/users/tarantool/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tarantool/subscriptions","organizations_url":"https://api.github.com/users/tarantool/orgs","repos_url":"https://api.github.com/users/tarantool/repos","events_url":"https://api.github.com/users/tarantool/events{/privacy}","received_events_url":"https://api.github.com/users/tarantool/received_events","type":"Organization","site_admin":false},"repo":{"id":118764574,"node_id":"MDEwOlJlcG9zaXRvcnkxMTg3NjQ1NzQ=","name":"graphql","full_name":"tarantool/graphql","owner":{"login":"tarantool","id":2344919,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzNDQ5MTk=","avatar_url":"https://avatars0.githubusercontent.com/u/2344919?v=4","gravatar_id":"","url":"https://api.github.com/users/tarantool","html_url":"https://github.com/tarantool","followers_url":"https://api.github.com/users/tarantool/followers","following_url":"https://api.github.com/users/tarantool/following{/other_user}","gists_url":"https://api.github.com/users/tarantool/gists{/gist_id}","starred_url":"https://api.github.com/users/tarantool/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tarantool/subscriptions","organizations_url":"https://api.github.com/users/tarantool/orgs","repos_url":"https://api.github.com/users/tarantool/repos","events_url":"https://api.github.com/users/tarantool/events{/privacy}","received_events_url":"https://api.github.com/users/tarantool/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tarantool/graphql","description":"Set of adapters for GraphQL query language to the Tarantool data model","fork":false,"url":"https://api.github.com/repos/tarantool/graphql","forks_url":"https://api.github.com/repos/tarantool/graphql/forks","keys_url":"https://api.github.com/repos/tarantool/graphql/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tarantool/graphql/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tarantool/graphql/teams","hooks_url":"https://api.github.com/repos/tarantool/graphql/hooks","issue_events_url":"https://api.github.com/repos/tarantool/graphql/issues/events{/number}","events_url":"https://api.github.com/repos/tarantool/graphql/events","assignees_url":"https://api.github.com/repos/tarantool/graphql/assignees{/user}","branches_url":"https://api.github.com/repos/tarantool/graphql/branches{/branch}","tags_url":"https://api.github.com/repos/tarantool/graphql/tags","blobs_url":"https://api.github.com/repos/tarantool/graphql/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tarantool/graphql/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tarantool/graphql/git/refs{/sha}","trees_url":"https://api.github.com/repos/tarantool/graphql/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tarantool/graphql/statuses/{sha}","languages_url":"https://api.github.com/repos/tarantool/graphql/languages","stargazers_url":"https://api.github.com/repos/tarantool/graphql/stargazers","contributors_url":"https://api.github.com/repos/tarantool/graphql/contributors","subscribers_url":"https://api.github.com/repos/tarantool/graphql/subscribers","subscription_url":"https://api.github.com/repos/tarantool/graphql/subscription","commits_url":"https://api.github.com/repos/tarantool/graphql/commits{/sha}","git_commits_url":"https://api.github.com/repos/tarantool/graphql/git/commits{/sha}","comments_url":"https://api.github.com/repos/tarantool/graphql/comments{/number}","issue_comment_url":"https://api.github.com/repos/tarantool/graphql/issues/comments{/number}","contents_url":"https://api.github.com/repos/tarantool/graphql/contents/{+path}","compare_url":"https://api.github.com/repos/tarantool/graphql/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tarantool/graphql/merges","archive_url":"https://api.github.com/repos/tarantool/graphql/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tarantool/graphql/downloads","issues_url":"https://api.github.com/repos/tarantool/graphql/issues{/number}","pulls_url":"https://api.github.com/repos/tarantool/graphql/pulls{/number}","milestones_url":"https://api.github.com/repos/tarantool/graphql/milestones{/number}","notifications_url":"https://api.github.com/repos/tarantool/graphql/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tarantool/graphql/labels{/name}","releases_url":"https://api.github.com/repos/tarantool/graphql/releases{/id}","deployments_url":"https://api.github.com/repos/tarantool/graphql/deployments","created_at":"2018-01-24T12:47:42Z","updated_at":"2018-09-05T01:22:01Z","pushed_at":"2018-09-05T18:26:57Z","git_url":"git://github.com/tarantool/graphql.git","ssh_url":"git@github.com:tarantool/graphql.git","clone_url":"https://github.com/tarantool/graphql.git","svn_url":"https://github.com/tarantool/graphql","homepage":"","size":1073,"stargazers_count":9,"watchers_count":9,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":67,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":2,"open_issues":67,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tarantool/graphql/pulls/209"},"html":{"href":"https://github.com/tarantool/graphql/pull/209"},"issue":{"href":"https://api.github.com/repos/tarantool/graphql/issues/209"},"comments":{"href":"https://api.github.com/repos/tarantool/graphql/issues/209/comments"},"review_comments":{"href":"https://api.github.com/repos/tarantool/graphql/pulls/209/comments"},"review_comment":{"href":"https://api.github.com/repos/tarantool/graphql/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tarantool/graphql/pulls/209/commits"},"statuses":{"href":"https://api.github.com/repos/tarantool/graphql/statuses/f082069b7313e6fe3de8579fb9eb1512d5af42ac"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"Totktonada"}}