{"action":"created","comment":{"url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/pulls/comments/36574014","id":36574014,"diff_hunk":"@@ -0,0 +1,320 @@\n+/*\n+ * Copyright 2015 the original author or authors.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *      http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+package org.springframework.cloud.data.core.dsl;\n+\n+import java.util.ArrayList;\n+import java.util.List;\n+\n+/**\n+ * @author Michael Minella\n+ */\n+public class TaskDslParser {\n+\n+\tprivate String expressionString;\n+\n+\tprivate List<Token> tokenStream;\n+\n+\tprivate int tokenStreamLength;\n+\n+\tprivate int tokenStreamPointer; // Current location in the token stream when\n+\n+\t// processing tokens\n+\n+\tprivate int lastGoodPoint;\n+\n+\t/**\n+\t * Parse a task definition without supplying the task name up front.\n+\t * The task name may be embedded in the definition.\n+\t * For example: <code>myTask = filejdbc</code>\n+\t *\n+\t * @return the AST for the parsed stream\n+\t */\n+\tpublic ModuleNode parse(String stream) {","path":"spring-cloud-data-core/src/main/java/org/springframework/cloud/data/core/dsl/TaskDslParser.java","position":45,"original_position":45,"commit_id":"23b4563ee6a1fb7b873282a25f52622fdcf7ceaa","original_commit_id":"23b4563ee6a1fb7b873282a25f52622fdcf7ceaa","user":{"login":"markfisher","id":140784,"avatar_url":"https://avatars.githubusercontent.com/u/140784?v=3","gravatar_id":"","url":"https://api.github.com/users/markfisher","html_url":"https://github.com/markfisher","followers_url":"https://api.github.com/users/markfisher/followers","following_url":"https://api.github.com/users/markfisher/following{/other_user}","gists_url":"https://api.github.com/users/markfisher/gists{/gist_id}","starred_url":"https://api.github.com/users/markfisher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markfisher/subscriptions","organizations_url":"https://api.github.com/users/markfisher/orgs","repos_url":"https://api.github.com/users/markfisher/repos","events_url":"https://api.github.com/users/markfisher/events{/privacy}","received_events_url":"https://api.github.com/users/markfisher/received_events","type":"User","site_admin":false},"body":"We can revisit the factoring-out of the common code for streams/tasks. I just don't want to lose track of it. So, if there's a JIRA issue or even GH issue to record that \"todo\", then I'm fine with merging some duplication for now.","created_at":"2015-08-08T02:25:06Z","updated_at":"2015-08-08T02:25:06Z","html_url":"https://github.com/spring-cloud/spring-cloud-data/pull/26#discussion_r36574014","pull_request_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/pulls/26","_links":{"self":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-data/pulls/comments/36574014"},"html":{"href":"https://github.com/spring-cloud/spring-cloud-data/pull/26#discussion_r36574014"},"pull_request":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-data/pulls/26"}}},"pull_request":{"url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/pulls/26","id":41942059,"html_url":"https://github.com/spring-cloud/spring-cloud-data/pull/26","diff_url":"https://github.com/spring-cloud/spring-cloud-data/pull/26.diff","patch_url":"https://github.com/spring-cloud/spring-cloud-data/pull/26.patch","issue_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/issues/26","number":26,"state":"open","locked":false,"title":"XD-2398: Adding functionality to parse Task based DSL","user":{"login":"mminella","id":630743,"avatar_url":"https://avatars.githubusercontent.com/u/630743?v=3","gravatar_id":"","url":"https://api.github.com/users/mminella","html_url":"https://github.com/mminella","followers_url":"https://api.github.com/users/mminella/followers","following_url":"https://api.github.com/users/mminella/following{/other_user}","gists_url":"https://api.github.com/users/mminella/gists{/gist_id}","starred_url":"https://api.github.com/users/mminella/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mminella/subscriptions","organizations_url":"https://api.github.com/users/mminella/orgs","repos_url":"https://api.github.com/users/mminella/repos","events_url":"https://api.github.com/users/mminella/events{/privacy}","received_events_url":"https://api.github.com/users/mminella/received_events","type":"User","site_admin":false},"body":"This commit introduces the ability to parse the DSL to define a task and\r\nregister the resulting task in an in memory registry.  Future commits\r\nwill address the launching of this task via various mechanisms.","created_at":"2015-08-07T23:22:33Z","updated_at":"2015-08-08T02:25:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"27029e57935abc0d20f67637ec50e61489a7a6fc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/pulls/26/commits","review_comments_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/pulls/26/comments","review_comment_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/pulls/comments{/number}","comments_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/issues/26/comments","statuses_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/statuses/23b4563ee6a1fb7b873282a25f52622fdcf7ceaa","head":{"label":"mminella:XD-3298","ref":"XD-3298","sha":"23b4563ee6a1fb7b873282a25f52622fdcf7ceaa","user":{"login":"mminella","id":630743,"avatar_url":"https://avatars.githubusercontent.com/u/630743?v=3","gravatar_id":"","url":"https://api.github.com/users/mminella","html_url":"https://github.com/mminella","followers_url":"https://api.github.com/users/mminella/followers","following_url":"https://api.github.com/users/mminella/following{/other_user}","gists_url":"https://api.github.com/users/mminella/gists{/gist_id}","starred_url":"https://api.github.com/users/mminella/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mminella/subscriptions","organizations_url":"https://api.github.com/users/mminella/orgs","repos_url":"https://api.github.com/users/mminella/repos","events_url":"https://api.github.com/users/mminella/events{/privacy}","received_events_url":"https://api.github.com/users/mminella/received_events","type":"User","site_admin":false},"repo":{"id":39954448,"name":"spring-cloud-data","full_name":"mminella/spring-cloud-data","owner":{"login":"mminella","id":630743,"avatar_url":"https://avatars.githubusercontent.com/u/630743?v=3","gravatar_id":"","url":"https://api.github.com/users/mminella","html_url":"https://github.com/mminella","followers_url":"https://api.github.com/users/mminella/followers","following_url":"https://api.github.com/users/mminella/following{/other_user}","gists_url":"https://api.github.com/users/mminella/gists{/gist_id}","starred_url":"https://api.github.com/users/mminella/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mminella/subscriptions","organizations_url":"https://api.github.com/users/mminella/orgs","repos_url":"https://api.github.com/users/mminella/repos","events_url":"https://api.github.com/users/mminella/events{/privacy}","received_events_url":"https://api.github.com/users/mminella/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mminella/spring-cloud-data","description":"","fork":true,"url":"https://api.github.com/repos/mminella/spring-cloud-data","forks_url":"https://api.github.com/repos/mminella/spring-cloud-data/forks","keys_url":"https://api.github.com/repos/mminella/spring-cloud-data/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mminella/spring-cloud-data/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mminella/spring-cloud-data/teams","hooks_url":"https://api.github.com/repos/mminella/spring-cloud-data/hooks","issue_events_url":"https://api.github.com/repos/mminella/spring-cloud-data/issues/events{/number}","events_url":"https://api.github.com/repos/mminella/spring-cloud-data/events","assignees_url":"https://api.github.com/repos/mminella/spring-cloud-data/assignees{/user}","branches_url":"https://api.github.com/repos/mminella/spring-cloud-data/branches{/branch}","tags_url":"https://api.github.com/repos/mminella/spring-cloud-data/tags","blobs_url":"https://api.github.com/repos/mminella/spring-cloud-data/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mminella/spring-cloud-data/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mminella/spring-cloud-data/git/refs{/sha}","trees_url":"https://api.github.com/repos/mminella/spring-cloud-data/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mminella/spring-cloud-data/statuses/{sha}","languages_url":"https://api.github.com/repos/mminella/spring-cloud-data/languages","stargazers_url":"https://api.github.com/repos/mminella/spring-cloud-data/stargazers","contributors_url":"https://api.github.com/repos/mminella/spring-cloud-data/contributors","subscribers_url":"https://api.github.com/repos/mminella/spring-cloud-data/subscribers","subscription_url":"https://api.github.com/repos/mminella/spring-cloud-data/subscription","commits_url":"https://api.github.com/repos/mminella/spring-cloud-data/commits{/sha}","git_commits_url":"https://api.github.com/repos/mminella/spring-cloud-data/git/commits{/sha}","comments_url":"https://api.github.com/repos/mminella/spring-cloud-data/comments{/number}","issue_comment_url":"https://api.github.com/repos/mminella/spring-cloud-data/issues/comments{/number}","contents_url":"https://api.github.com/repos/mminella/spring-cloud-data/contents/{+path}","compare_url":"https://api.github.com/repos/mminella/spring-cloud-data/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mminella/spring-cloud-data/merges","archive_url":"https://api.github.com/repos/mminella/spring-cloud-data/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mminella/spring-cloud-data/downloads","issues_url":"https://api.github.com/repos/mminella/spring-cloud-data/issues{/number}","pulls_url":"https://api.github.com/repos/mminella/spring-cloud-data/pulls{/number}","milestones_url":"https://api.github.com/repos/mminella/spring-cloud-data/milestones{/number}","notifications_url":"https://api.github.com/repos/mminella/spring-cloud-data/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mminella/spring-cloud-data/labels{/name}","releases_url":"https://api.github.com/repos/mminella/spring-cloud-data/releases{/id}","created_at":"2015-07-30T14:20:26Z","updated_at":"2015-07-30T14:20:26Z","pushed_at":"2015-08-07T23:22:15Z","git_url":"git://github.com/mminella/spring-cloud-data.git","ssh_url":"git@github.com:mminella/spring-cloud-data.git","clone_url":"https://github.com/mminella/spring-cloud-data.git","svn_url":"https://github.com/mminella/spring-cloud-data","homepage":null,"size":103,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"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":"spring-cloud:master","ref":"master","sha":"ed67af9b79e97668060af1bec0f35989c7a03d2b","user":{"login":"spring-cloud","id":7815877,"avatar_url":"https://avatars.githubusercontent.com/u/7815877?v=3","gravatar_id":"","url":"https://api.github.com/users/spring-cloud","html_url":"https://github.com/spring-cloud","followers_url":"https://api.github.com/users/spring-cloud/followers","following_url":"https://api.github.com/users/spring-cloud/following{/other_user}","gists_url":"https://api.github.com/users/spring-cloud/gists{/gist_id}","starred_url":"https://api.github.com/users/spring-cloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spring-cloud/subscriptions","organizations_url":"https://api.github.com/users/spring-cloud/orgs","repos_url":"https://api.github.com/users/spring-cloud/repos","events_url":"https://api.github.com/users/spring-cloud/events{/privacy}","received_events_url":"https://api.github.com/users/spring-cloud/received_events","type":"Organization","site_admin":false},"repo":{"id":39469487,"name":"spring-cloud-data","full_name":"spring-cloud/spring-cloud-data","owner":{"login":"spring-cloud","id":7815877,"avatar_url":"https://avatars.githubusercontent.com/u/7815877?v=3","gravatar_id":"","url":"https://api.github.com/users/spring-cloud","html_url":"https://github.com/spring-cloud","followers_url":"https://api.github.com/users/spring-cloud/followers","following_url":"https://api.github.com/users/spring-cloud/following{/other_user}","gists_url":"https://api.github.com/users/spring-cloud/gists{/gist_id}","starred_url":"https://api.github.com/users/spring-cloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spring-cloud/subscriptions","organizations_url":"https://api.github.com/users/spring-cloud/orgs","repos_url":"https://api.github.com/users/spring-cloud/repos","events_url":"https://api.github.com/users/spring-cloud/events{/privacy}","received_events_url":"https://api.github.com/users/spring-cloud/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spring-cloud/spring-cloud-data","description":"","fork":false,"url":"https://api.github.com/repos/spring-cloud/spring-cloud-data","forks_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/forks","keys_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/teams","hooks_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/hooks","issue_events_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/issues/events{/number}","events_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/events","assignees_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/assignees{/user}","branches_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/branches{/branch}","tags_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/tags","blobs_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/git/refs{/sha}","trees_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/statuses/{sha}","languages_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/languages","stargazers_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/stargazers","contributors_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/contributors","subscribers_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/subscribers","subscription_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/subscription","commits_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/commits{/sha}","git_commits_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/git/commits{/sha}","comments_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/comments{/number}","issue_comment_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/issues/comments{/number}","contents_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/contents/{+path}","compare_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/merges","archive_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/downloads","issues_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/issues{/number}","pulls_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/pulls{/number}","milestones_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/milestones{/number}","notifications_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/labels{/name}","releases_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/releases{/id}","created_at":"2015-07-21T20:56:11Z","updated_at":"2015-08-07T16:39:03Z","pushed_at":"2015-08-08T00:33:25Z","git_url":"git://github.com/spring-cloud/spring-cloud-data.git","ssh_url":"git@github.com:spring-cloud/spring-cloud-data.git","clone_url":"https://github.com/spring-cloud/spring-cloud-data.git","svn_url":"https://github.com/spring-cloud/spring-cloud-data","homepage":null,"size":562,"stargazers_count":4,"watchers_count":4,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":1,"forks":13,"open_issues":1,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-data/pulls/26"},"html":{"href":"https://github.com/spring-cloud/spring-cloud-data/pull/26"},"issue":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-data/issues/26"},"comments":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-data/issues/26/comments"},"review_comments":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-data/pulls/26/comments"},"review_comment":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-data/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-data/pulls/26/commits"},"statuses":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-data/statuses/23b4563ee6a1fb7b873282a25f52622fdcf7ceaa"}}}}