{"action":"created","issue":{"url":"https://api.github.com/repos/erezsh/lark/issues/21","repository_url":"https://api.github.com/repos/erezsh/lark","labels_url":"https://api.github.com/repos/erezsh/lark/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/erezsh/lark/issues/21/comments","events_url":"https://api.github.com/repos/erezsh/lark/issues/21/events","html_url":"https://github.com/erezsh/lark/issues/21","id":250045067,"number":21,"title":"Bug in handling ambiguity?","user":{"login":"uriva","id":2490655,"avatar_url":"https://avatars2.githubusercontent.com/u/2490655?v=4","gravatar_id":"","url":"https://api.github.com/users/uriva","html_url":"https://github.com/uriva","followers_url":"https://api.github.com/users/uriva/followers","following_url":"https://api.github.com/users/uriva/following{/other_user}","gists_url":"https://api.github.com/users/uriva/gists{/gist_id}","starred_url":"https://api.github.com/users/uriva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uriva/subscriptions","organizations_url":"https://api.github.com/users/uriva/orgs","repos_url":"https://api.github.com/users/uriva/repos","events_url":"https://api.github.com/users/uriva/events{/privacy}","received_events_url":"https://api.github.com/users/uriva/received_events","type":"User","site_admin":false},"labels":[{"id":532274366,"url":"https://api.github.com/repos/erezsh/lark/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":38,"created_at":"2017-08-14T14:19:12Z","updated_at":"2017-11-26T10:51:48Z","closed_at":null,"author_association":"NONE","body":"When running this code:\r\n\r\n```\r\ngrammar = \"\"\"\r\nexpression: \"c\" | \"d\" | \"c\" \"d\"\r\nunit: expression \"a\"\r\n    | \"a\" expression\r\n    | \"b\" unit\r\n    | \"b\" expression\r\nstart: unit*\r\n\r\n%import common.WS\r\n%ignore WS\r\n\"\"\"\r\n\r\nl = Lark(grammar, parser='earley', ambiguity='explicit')\r\nprint(l.parse('b c d a a c').pretty())\r\n```\r\n\r\nIt is expected to have an ambiguous parse, but there is no '_ambig' node.\r\n\r\nAt least these options are valid:\r\n```\r\nunit(\r\n    b\r\n    unit(\r\n        expression(\r\n            c\r\n            d\r\n        )\r\n        a\r\n    )\r\n)\r\nunit(\r\n    a\r\n    expression(\r\n        c\r\n    )\r\n)\r\n```\r\nand this parse:\r\n```\r\nunit(\r\n    b\r\n    expression(\r\n        c\r\n    )\r\n)\r\nunit(\r\n    expression(\r\n        d\r\n    )\r\n    a\r\n)\r\nunit(\r\n    a\r\n    expression(\r\n        c\r\n    )\r\n)\r\n```\r\n\r\nThe only parse that comes back is the second one.\r\nWhen one removes the `\"b\" expression` option, you get the first one."},"comment":{"url":"https://api.github.com/repos/erezsh/lark/issues/comments/346999531","html_url":"https://github.com/erezsh/lark/issues/21#issuecomment-346999531","issue_url":"https://api.github.com/repos/erezsh/lark/issues/21","id":346999531,"user":{"login":"erezsh","id":731464,"avatar_url":"https://avatars3.githubusercontent.com/u/731464?v=4","gravatar_id":"","url":"https://api.github.com/users/erezsh","html_url":"https://github.com/erezsh","followers_url":"https://api.github.com/users/erezsh/followers","following_url":"https://api.github.com/users/erezsh/following{/other_user}","gists_url":"https://api.github.com/users/erezsh/gists{/gist_id}","starred_url":"https://api.github.com/users/erezsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erezsh/subscriptions","organizations_url":"https://api.github.com/users/erezsh/orgs","repos_url":"https://api.github.com/users/erezsh/repos","events_url":"https://api.github.com/users/erezsh/events{/privacy}","received_events_url":"https://api.github.com/users/erezsh/received_events","type":"User","site_admin":false},"created_at":"2017-11-26T10:51:48Z","updated_at":"2017-11-26T10:51:48Z","author_association":"OWNER","body":"Thanks for bringing this to my attention. I'll look into it."}}
{"actor":{"display_login":"erezsh"}}