{"action":"created","issue":{"url":"https://api.github.com/repos/a-wortman/poggle/issues/10","labels_url":"https://api.github.com/repos/a-wortman/poggle/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/a-wortman/poggle/issues/10/comments","events_url":"https://api.github.com/repos/a-wortman/poggle/issues/10/events","html_url":"https://github.com/a-wortman/poggle/issues/10","id":52260799,"number":10,"title":"Unbounded-size expressions cause errors","user":{"login":"a-wortman","id":4615790,"avatar_url":"https://avatars.githubusercontent.com/u/4615790?v=3","gravatar_id":"","url":"https://api.github.com/users/a-wortman","html_url":"https://github.com/a-wortman","followers_url":"https://api.github.com/users/a-wortman/followers","following_url":"https://api.github.com/users/a-wortman/following{/other_user}","gists_url":"https://api.github.com/users/a-wortman/gists{/gist_id}","starred_url":"https://api.github.com/users/a-wortman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a-wortman/subscriptions","organizations_url":"https://api.github.com/users/a-wortman/orgs","repos_url":"https://api.github.com/users/a-wortman/repos","events_url":"https://api.github.com/users/a-wortman/events{/privacy}","received_events_url":"https://api.github.com/users/a-wortman/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/a-wortman/poggle/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2014-12-17T16:32:07Z","updated_at":"2015-01-10T01:35:38Z","closed_at":"2015-01-10T01:35:38Z","body":"When trying to parse\r\n```\r\n:functions:\r\nbuildShort(byte{2}): byte{2}\r\nfoo(byte{_}): buildShort\r\n\r\n:components:\r\nB: byte{_}\r\nroot := b\\B\r\n```\r\nPoggle ends up attempting to call `.force` on an `UnboundedSize` in `rule_body:14`, trying to compute the size of the argument to `foo`. Poggle would end up building an `AnyBytes` out of this value, and `AnyBytes`' matching isn't terminated. As a result, expressions like `byte{_}:0x50` on input like `0x00 0x50` would consume all input for the bytes, then fail to match, when the correct behavior is to return a result like [[0x00], 0x50].\r\n\r\nFuture notes: Poggle should be able to handle {_} in a greedy and non-greedy manner, possibly requiring a change to the syntax?\r\n\r\nFriendly reminder to the maintainers to come up with a consistent way to express match results!"},"comment":{"url":"https://api.github.com/repos/a-wortman/poggle/issues/comments/69431862","html_url":"https://github.com/a-wortman/poggle/issues/10#issuecomment-69431862","issue_url":"https://api.github.com/repos/a-wortman/poggle/issues/10","id":69431862,"user":{"login":"a-wortman","id":4615790,"avatar_url":"https://avatars.githubusercontent.com/u/4615790?v=3","gravatar_id":"","url":"https://api.github.com/users/a-wortman","html_url":"https://github.com/a-wortman","followers_url":"https://api.github.com/users/a-wortman/followers","following_url":"https://api.github.com/users/a-wortman/following{/other_user}","gists_url":"https://api.github.com/users/a-wortman/gists{/gist_id}","starred_url":"https://api.github.com/users/a-wortman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a-wortman/subscriptions","organizations_url":"https://api.github.com/users/a-wortman/orgs","repos_url":"https://api.github.com/users/a-wortman/repos","events_url":"https://api.github.com/users/a-wortman/events{/privacy}","received_events_url":"https://api.github.com/users/a-wortman/received_events","type":"User","site_admin":false},"created_at":"2015-01-10T01:35:38Z","updated_at":"2015-01-10T01:35:38Z","body":"This was actually closed by a change for bit-level parsing. [This is the specific change](https://github.com/a-wortman/poggle/commit/f6f444c28f73aea6750dd2e10e42dff7373c956b#diff-6ee3ebd570a00a6c83c5f0ec308a7bd3L3).\r\n\r\nThe rest will be moved forward to a new issue."}}