{"action":"created","comment":{"url":"https://api.github.com/repos/jneen/rouge/pulls/comments/140490270","pull_request_review_id":64573805,"id":140490270,"diff_hunk":"@@ -0,0 +1,601 @@\n+# -*- coding: utf-8 -*- #\n+\n+module Rouge\n+  module Lexers\n+    class SQF < RegexLexer\n+      tag \"sqf\"\n+      filenames \"*.sqf\"\n+\n+      title \"SQF\"\n+      desc \"Status Quo Function, a Real Virtuality engine scripting language\"\n+\n+      def self.wordoperators\n+        @wordoperators = Set.new %w(\n+          and or not\n+        )\n+      end\n+\n+      def self.initializers\n+        @initializers = Set.new %w(\n+          private param params\n+        )\n+      end\n+\n+      def self.controlflow\n+        @controlflow = Set.new %w(\n+          if then else exitwith switch do case default while for from to step\n+          foreach\n+        )\n+      end\n+\n+      def self.constants\n+        @constants = Set.new %w(\n+          true false player confignull controlnull displaynull grpnull\n+          locationnull netobjnull objnull scriptnull tasknull teammembernull\n+        )\n+      end\n+\n+      def self.namespaces\n+        @namespaces = Set.new %w(\n+          currentnamespace missionnamespace parsingnamespace profilenamespace\n+          uinamespace\n+        )\n+      end\n+\n+      def self.commands\n+        @commands = Set.new %w(\n+          abs acctime acos action actionids actionkeys actionkeysimages","path":"lib/rouge/lexers/sqf.rb","position":47,"original_position":47,"commit_id":"5a9d5b12121b4c50c15deaf4183e0c42b59b6ba7","original_commit_id":"5a9d5b12121b4c50c15deaf4183e0c42b59b6ba7","user":{"login":"BaerMitUmlaut","id":9693842,"avatar_url":"https://avatars0.githubusercontent.com/u/9693842?v=4","gravatar_id":"","url":"https://api.github.com/users/BaerMitUmlaut","html_url":"https://github.com/BaerMitUmlaut","followers_url":"https://api.github.com/users/BaerMitUmlaut/followers","following_url":"https://api.github.com/users/BaerMitUmlaut/following{/other_user}","gists_url":"https://api.github.com/users/BaerMitUmlaut/gists{/gist_id}","starred_url":"https://api.github.com/users/BaerMitUmlaut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BaerMitUmlaut/subscriptions","organizations_url":"https://api.github.com/users/BaerMitUmlaut/orgs","repos_url":"https://api.github.com/users/BaerMitUmlaut/repos","events_url":"https://api.github.com/users/BaerMitUmlaut/events{/privacy}","received_events_url":"https://api.github.com/users/BaerMitUmlaut/received_events","type":"User","site_admin":false},"body":"It's generated using the spec/visual/samples/sqf script, with some manual filtering afterwards (because as mentioned in the OP, pretty much everything is a command). Since that is run in game, that's not an option.\r\nAlternatively, there's a wiki page that could be scraped. I will have to check how much it deviates from this list (there might be some outdated commands in there).","created_at":"2017-09-22T13:15:26Z","updated_at":"2017-09-22T13:15:26Z","html_url":"https://github.com/jneen/rouge/pull/761#discussion_r140490270","pull_request_url":"https://api.github.com/repos/jneen/rouge/pulls/761","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/jneen/rouge/pulls/comments/140490270"},"html":{"href":"https://github.com/jneen/rouge/pull/761#discussion_r140490270"},"pull_request":{"href":"https://api.github.com/repos/jneen/rouge/pulls/761"}},"in_reply_to_id":140421952},"pull_request":{"url":"https://api.github.com/repos/jneen/rouge/pulls/761","id":137048536,"html_url":"https://github.com/jneen/rouge/pull/761","diff_url":"https://github.com/jneen/rouge/pull/761.diff","patch_url":"https://github.com/jneen/rouge/pull/761.patch","issue_url":"https://api.github.com/repos/jneen/rouge/issues/761","number":761,"state":"open","locked":false,"title":"Add SQF lexer","user":{"login":"BaerMitUmlaut","id":9693842,"avatar_url":"https://avatars0.githubusercontent.com/u/9693842?v=4","gravatar_id":"","url":"https://api.github.com/users/BaerMitUmlaut","html_url":"https://github.com/BaerMitUmlaut","followers_url":"https://api.github.com/users/BaerMitUmlaut/followers","following_url":"https://api.github.com/users/BaerMitUmlaut/following{/other_user}","gists_url":"https://api.github.com/users/BaerMitUmlaut/gists{/gist_id}","starred_url":"https://api.github.com/users/BaerMitUmlaut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BaerMitUmlaut/subscriptions","organizations_url":"https://api.github.com/users/BaerMitUmlaut/orgs","repos_url":"https://api.github.com/users/BaerMitUmlaut/repos","events_url":"https://api.github.com/users/BaerMitUmlaut/events{/privacy}","received_events_url":"https://api.github.com/users/BaerMitUmlaut/received_events","type":"User","site_admin":false},"body":"This PR adds a lexer with a demo and an example for the SQF scripting language.\r\n\r\nThis scripting language is used in Bohemia Interactive's Arma series for creating singleplayer campaigns, multiplayer scenarios and gameplay addons. Github has had syntax highlighting for SQF for some time now, but Gitlab (which quite a few communities use for private developments) was unfortunately still lacking it.\r\n\r\nDon't be confused by the large list of command keywords. In SQF there are only commands and variables, no keywords or operators, with the exception of `private` and `=`. Even `if` or `:` (for switch case) are commands. Commands are defined by the engine and cannot be defined by a user. The whole grammar looks something like this:\r\n```\r\nblock := ((statement;)* statement)?;?\r\nstatement := (assignment)? code\r\nassignment := (private)? variable =\r\ncode := literal\r\n      | variable\r\n      | { block }\r\n      | [ ((code,)* code)? ]\r\n      | nular\r\n      | unary code\r\n      | code binary code\r\n```\r\n\r\nThe code in spec/visual/samples/sqf was used to generate the list of commands.","created_at":"2017-08-22T18:27:35Z","updated_at":"2017-09-22T13:15:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"396d39f8f13eeec80d7e162d18a6de7236cafece","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/jneen/rouge/pulls/761/commits","review_comments_url":"https://api.github.com/repos/jneen/rouge/pulls/761/comments","review_comment_url":"https://api.github.com/repos/jneen/rouge/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jneen/rouge/issues/761/comments","statuses_url":"https://api.github.com/repos/jneen/rouge/statuses/5a9d5b12121b4c50c15deaf4183e0c42b59b6ba7","head":{"label":"BaerMitUmlaut:feature.sqf","ref":"feature.sqf","sha":"5a9d5b12121b4c50c15deaf4183e0c42b59b6ba7","user":{"login":"BaerMitUmlaut","id":9693842,"avatar_url":"https://avatars0.githubusercontent.com/u/9693842?v=4","gravatar_id":"","url":"https://api.github.com/users/BaerMitUmlaut","html_url":"https://github.com/BaerMitUmlaut","followers_url":"https://api.github.com/users/BaerMitUmlaut/followers","following_url":"https://api.github.com/users/BaerMitUmlaut/following{/other_user}","gists_url":"https://api.github.com/users/BaerMitUmlaut/gists{/gist_id}","starred_url":"https://api.github.com/users/BaerMitUmlaut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BaerMitUmlaut/subscriptions","organizations_url":"https://api.github.com/users/BaerMitUmlaut/orgs","repos_url":"https://api.github.com/users/BaerMitUmlaut/repos","events_url":"https://api.github.com/users/BaerMitUmlaut/events{/privacy}","received_events_url":"https://api.github.com/users/BaerMitUmlaut/received_events","type":"User","site_admin":false},"repo":{"id":100883668,"name":"rouge","full_name":"BaerMitUmlaut/rouge","owner":{"login":"BaerMitUmlaut","id":9693842,"avatar_url":"https://avatars0.githubusercontent.com/u/9693842?v=4","gravatar_id":"","url":"https://api.github.com/users/BaerMitUmlaut","html_url":"https://github.com/BaerMitUmlaut","followers_url":"https://api.github.com/users/BaerMitUmlaut/followers","following_url":"https://api.github.com/users/BaerMitUmlaut/following{/other_user}","gists_url":"https://api.github.com/users/BaerMitUmlaut/gists{/gist_id}","starred_url":"https://api.github.com/users/BaerMitUmlaut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BaerMitUmlaut/subscriptions","organizations_url":"https://api.github.com/users/BaerMitUmlaut/orgs","repos_url":"https://api.github.com/users/BaerMitUmlaut/repos","events_url":"https://api.github.com/users/BaerMitUmlaut/events{/privacy}","received_events_url":"https://api.github.com/users/BaerMitUmlaut/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/BaerMitUmlaut/rouge","description":"A pure-ruby code highlighter that is compatible with pygments http://rouge.jneen.net/","fork":true,"url":"https://api.github.com/repos/BaerMitUmlaut/rouge","forks_url":"https://api.github.com/repos/BaerMitUmlaut/rouge/forks","keys_url":"https://api.github.com/repos/BaerMitUmlaut/rouge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BaerMitUmlaut/rouge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BaerMitUmlaut/rouge/teams","hooks_url":"https://api.github.com/repos/BaerMitUmlaut/rouge/hooks","issue_events_url":"https://api.github.com/repos/BaerMitUmlaut/rouge/issues/events{/number}","events_url":"https://api.github.com/repos/BaerMitUmlaut/rouge/events","assignees_url":"https://api.github.com/repos/BaerMitUmlaut/rouge/assignees{/user}","branches_url":"https://api.github.com/repos/BaerMitUmlaut/rouge/branches{/branch}","tags_url":"https://api.github.com/repos/BaerMitUmlaut/rouge/tags","blobs_url":"https://api.github.com/repos/BaerMitUmlaut/rouge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BaerMitUmlaut/rouge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BaerMitUmlaut/rouge/git/refs{/sha}","trees_url":"https://api.github.com/repos/BaerMitUmlaut/rouge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BaerMitUmlaut/rouge/statuses/{sha}","languages_url":"https://api.github.com/repos/BaerMitUmlaut/rouge/languages","stargazers_url":"https://api.github.com/repos/BaerMitUmlaut/rouge/stargazers","contributors_url":"https://api.github.com/repos/BaerMitUmlaut/rouge/contributors","subscribers_url":"https://api.github.com/repos/BaerMitUmlaut/rouge/subscribers","subscription_url":"https://api.github.com/repos/BaerMitUmlaut/rouge/subscription","commits_url":"https://api.github.com/repos/BaerMitUmlaut/rouge/commits{/sha}","git_commits_url":"https://api.github.com/repos/BaerMitUmlaut/rouge/git/commits{/sha}","comments_url":"https://api.github.com/repos/BaerMitUmlaut/rouge/comments{/number}","issue_comment_url":"https://api.github.com/repos/BaerMitUmlaut/rouge/issues/comments{/number}","contents_url":"https://api.github.com/repos/BaerMitUmlaut/rouge/contents/{+path}","compare_url":"https://api.github.com/repos/BaerMitUmlaut/rouge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BaerMitUmlaut/rouge/merges","archive_url":"https://api.github.com/repos/BaerMitUmlaut/rouge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BaerMitUmlaut/rouge/downloads","issues_url":"https://api.github.com/repos/BaerMitUmlaut/rouge/issues{/number}","pulls_url":"https://api.github.com/repos/BaerMitUmlaut/rouge/pulls{/number}","milestones_url":"https://api.github.com/repos/BaerMitUmlaut/rouge/milestones{/number}","notifications_url":"https://api.github.com/repos/BaerMitUmlaut/rouge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BaerMitUmlaut/rouge/labels{/name}","releases_url":"https://api.github.com/repos/BaerMitUmlaut/rouge/releases{/id}","deployments_url":"https://api.github.com/repos/BaerMitUmlaut/rouge/deployments","created_at":"2017-08-20T19:23:29Z","updated_at":"2017-08-20T19:23:32Z","pushed_at":"2017-09-21T18:20:10Z","git_url":"git://github.com/BaerMitUmlaut/rouge.git","ssh_url":"git@github.com:BaerMitUmlaut/rouge.git","clone_url":"https://github.com/BaerMitUmlaut/rouge.git","svn_url":"https://github.com/BaerMitUmlaut/rouge","homepage":"","size":2799,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jneen:master","ref":"master","sha":"11a9eabd05609075d965b624f185da8f0aa5a25c","user":{"login":"jneen","id":225017,"avatar_url":"https://avatars1.githubusercontent.com/u/225017?v=4","gravatar_id":"","url":"https://api.github.com/users/jneen","html_url":"https://github.com/jneen","followers_url":"https://api.github.com/users/jneen/followers","following_url":"https://api.github.com/users/jneen/following{/other_user}","gists_url":"https://api.github.com/users/jneen/gists{/gist_id}","starred_url":"https://api.github.com/users/jneen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jneen/subscriptions","organizations_url":"https://api.github.com/users/jneen/orgs","repos_url":"https://api.github.com/users/jneen/repos","events_url":"https://api.github.com/users/jneen/events{/privacy}","received_events_url":"https://api.github.com/users/jneen/received_events","type":"User","site_admin":false},"repo":{"id":5627139,"name":"rouge","full_name":"jneen/rouge","owner":{"login":"jneen","id":225017,"avatar_url":"https://avatars1.githubusercontent.com/u/225017?v=4","gravatar_id":"","url":"https://api.github.com/users/jneen","html_url":"https://github.com/jneen","followers_url":"https://api.github.com/users/jneen/followers","following_url":"https://api.github.com/users/jneen/following{/other_user}","gists_url":"https://api.github.com/users/jneen/gists{/gist_id}","starred_url":"https://api.github.com/users/jneen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jneen/subscriptions","organizations_url":"https://api.github.com/users/jneen/orgs","repos_url":"https://api.github.com/users/jneen/repos","events_url":"https://api.github.com/users/jneen/events{/privacy}","received_events_url":"https://api.github.com/users/jneen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jneen/rouge","description":"A pure-ruby code highlighter that is compatible with pygments http://rouge.jneen.net/","fork":false,"url":"https://api.github.com/repos/jneen/rouge","forks_url":"https://api.github.com/repos/jneen/rouge/forks","keys_url":"https://api.github.com/repos/jneen/rouge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jneen/rouge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jneen/rouge/teams","hooks_url":"https://api.github.com/repos/jneen/rouge/hooks","issue_events_url":"https://api.github.com/repos/jneen/rouge/issues/events{/number}","events_url":"https://api.github.com/repos/jneen/rouge/events","assignees_url":"https://api.github.com/repos/jneen/rouge/assignees{/user}","branches_url":"https://api.github.com/repos/jneen/rouge/branches{/branch}","tags_url":"https://api.github.com/repos/jneen/rouge/tags","blobs_url":"https://api.github.com/repos/jneen/rouge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jneen/rouge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jneen/rouge/git/refs{/sha}","trees_url":"https://api.github.com/repos/jneen/rouge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jneen/rouge/statuses/{sha}","languages_url":"https://api.github.com/repos/jneen/rouge/languages","stargazers_url":"https://api.github.com/repos/jneen/rouge/stargazers","contributors_url":"https://api.github.com/repos/jneen/rouge/contributors","subscribers_url":"https://api.github.com/repos/jneen/rouge/subscribers","subscription_url":"https://api.github.com/repos/jneen/rouge/subscription","commits_url":"https://api.github.com/repos/jneen/rouge/commits{/sha}","git_commits_url":"https://api.github.com/repos/jneen/rouge/git/commits{/sha}","comments_url":"https://api.github.com/repos/jneen/rouge/comments{/number}","issue_comment_url":"https://api.github.com/repos/jneen/rouge/issues/comments{/number}","contents_url":"https://api.github.com/repos/jneen/rouge/contents/{+path}","compare_url":"https://api.github.com/repos/jneen/rouge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jneen/rouge/merges","archive_url":"https://api.github.com/repos/jneen/rouge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jneen/rouge/downloads","issues_url":"https://api.github.com/repos/jneen/rouge/issues{/number}","pulls_url":"https://api.github.com/repos/jneen/rouge/pulls{/number}","milestones_url":"https://api.github.com/repos/jneen/rouge/milestones{/number}","notifications_url":"https://api.github.com/repos/jneen/rouge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jneen/rouge/labels{/name}","releases_url":"https://api.github.com/repos/jneen/rouge/releases{/id}","deployments_url":"https://api.github.com/repos/jneen/rouge/deployments","created_at":"2012-08-31T09:54:51Z","updated_at":"2017-09-20T19:53:24Z","pushed_at":"2017-09-22T08:57:37Z","git_url":"git://github.com/jneen/rouge.git","ssh_url":"git@github.com:jneen/rouge.git","clone_url":"https://github.com/jneen/rouge.git","svn_url":"https://github.com/jneen/rouge","homepage":"","size":2862,"stargazers_count":2052,"watchers_count":2052,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":371,"mirror_url":null,"open_issues_count":181,"forks":371,"open_issues":181,"watchers":2052,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jneen/rouge/pulls/761"},"html":{"href":"https://github.com/jneen/rouge/pull/761"},"issue":{"href":"https://api.github.com/repos/jneen/rouge/issues/761"},"comments":{"href":"https://api.github.com/repos/jneen/rouge/issues/761/comments"},"review_comments":{"href":"https://api.github.com/repos/jneen/rouge/pulls/761/comments"},"review_comment":{"href":"https://api.github.com/repos/jneen/rouge/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jneen/rouge/pulls/761/commits"},"statuses":{"href":"https://api.github.com/repos/jneen/rouge/statuses/5a9d5b12121b4c50c15deaf4183e0c42b59b6ba7"}},"author_association":"NONE"}}
{"actor":{"display_login":"BaerMitUmlaut"}}