{"action":"created","issue":{"url":"https://api.github.com/repos/elixir-lang/elixir/issues/3166","labels_url":"https://api.github.com/repos/elixir-lang/elixir/issues/3166/labels{/name}","comments_url":"https://api.github.com/repos/elixir-lang/elixir/issues/3166/comments","events_url":"https://api.github.com/repos/elixir-lang/elixir/issues/3166/events","html_url":"https://github.com/elixir-lang/elixir/pull/3166","id":60768565,"number":3166,"title":"WIP: Refine no parens parsing (second attempt)","user":{"login":"oneeman","id":4543438,"avatar_url":"https://avatars.githubusercontent.com/u/4543438?v=3","gravatar_id":"","url":"https://api.github.com/users/oneeman","html_url":"https://github.com/oneeman","followers_url":"https://api.github.com/users/oneeman/followers","following_url":"https://api.github.com/users/oneeman/following{/other_user}","gists_url":"https://api.github.com/users/oneeman/gists{/gist_id}","starred_url":"https://api.github.com/users/oneeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oneeman/subscriptions","organizations_url":"https://api.github.com/users/oneeman/orgs","repos_url":"https://api.github.com/users/oneeman/repos","events_url":"https://api.github.com/users/oneeman/events{/privacy}","received_events_url":"https://api.github.com/users/oneeman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-03-12T04:09:46Z","updated_at":"2015-03-13T01:59:46Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/elixir-lang/elixir/pulls/3166","html_url":"https://github.com/elixir-lang/elixir/pull/3166","diff_url":"https://github.com/elixir-lang/elixir/pull/3166.diff","patch_url":"https://github.com/elixir-lang/elixir/pull/3166.patch"},"body":"Second attempt at resolving #3074, after the first attempt (#3109) had to be reverted.  This contains:\r\n\r\n* The changes from the previous PR\r\n* A regression test for the regression which made the revert necessary\r\n* The changes needed to fix that regression (namely, adding the `no_parens_one_ambig_op_expr` non-terminal)\r\n\r\nI'm marking this as WIP because:\r\n(a) The fact that `one_parens_ambig_op_expr` is needed makes me wonder whether there may be other similar ones needed as well to prevent other regressions we don't have tests for and are not aware of yet.  I will try in the coming days to go through the parser to identify whether there are any, but the more eyes on this the better.\r\n(b) I didn't know where to put the regression test, so I created a new file `parser_test.exs` (and I wasn't sure where to put it either, there or in `kernel`).  This doesn't fit the overall pattern of test modules corresponding to the modules they're testing, since there is no Elixir Parser module.  But neither is there a an Erlang test module for `elixir_parser.yrl`, and writing these tests in Erlang would probably be considerably messier.  So any suggestions on where to put tests of this type would be welcome.\r\n(c) I wonder whether and to what degree this will make it harder later on to warn on `no_parens_expr op expr` or similar (including, I believe, `no_parens_one`, e.g. in `f a |> b`, so we may not be able to reduce `no_parens_one_expr` to `matched_expr` any more either, not sure though).  The reason is that the grammar is getting hairier with this PR.  So I wonder whether there might be a way to simplify at this point with that later need in mind or whether there's nothing to do about it at this stage.  My understanding of LALR is still pretty rudimentary, so any real simplification in this would be beyond me at this point.\r\n(d) I need to write a more decent commit message :-)"},"comment":{"url":"https://api.github.com/repos/elixir-lang/elixir/issues/comments/78745468","html_url":"https://github.com/elixir-lang/elixir/pull/3166#issuecomment-78745468","issue_url":"https://api.github.com/repos/elixir-lang/elixir/issues/3166","id":78745468,"user":{"login":"oneeman","id":4543438,"avatar_url":"https://avatars.githubusercontent.com/u/4543438?v=3","gravatar_id":"","url":"https://api.github.com/users/oneeman","html_url":"https://github.com/oneeman","followers_url":"https://api.github.com/users/oneeman/followers","following_url":"https://api.github.com/users/oneeman/following{/other_user}","gists_url":"https://api.github.com/users/oneeman/gists{/gist_id}","starred_url":"https://api.github.com/users/oneeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oneeman/subscriptions","organizations_url":"https://api.github.com/users/oneeman/orgs","repos_url":"https://api.github.com/users/oneeman/repos","events_url":"https://api.github.com/users/oneeman/events{/privacy}","received_events_url":"https://api.github.com/users/oneeman/received_events","type":"User","site_admin":false},"created_at":"2015-03-13T01:59:46Z","updated_at":"2015-03-13T01:59:46Z","body":"Rebased and squashed it, should be good to go."}}