{"action":"created","issue":{"url":"https://api.github.com/repos/usethesource/rascal/issues/951","repository_url":"https://api.github.com/repos/usethesource/rascal","labels_url":"https://api.github.com/repos/usethesource/rascal/issues/951/labels{/name}","comments_url":"https://api.github.com/repos/usethesource/rascal/issues/951/comments","events_url":"https://api.github.com/repos/usethesource/rascal/issues/951/events","html_url":"https://github.com/usethesource/rascal/issues/951","id":153981629,"number":951,"title":"weird bug in generated parser","user":{"login":"jurgenvinju","id":1990295,"avatar_url":"https://avatars.githubusercontent.com/u/1990295?v=3","gravatar_id":"","url":"https://api.github.com/users/jurgenvinju","html_url":"https://github.com/jurgenvinju","followers_url":"https://api.github.com/users/jurgenvinju/followers","following_url":"https://api.github.com/users/jurgenvinju/following{/other_user}","gists_url":"https://api.github.com/users/jurgenvinju/gists{/gist_id}","starred_url":"https://api.github.com/users/jurgenvinju/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jurgenvinju/subscriptions","organizations_url":"https://api.github.com/users/jurgenvinju/orgs","repos_url":"https://api.github.com/users/jurgenvinju/repos","events_url":"https://api.github.com/users/jurgenvinju/events{/privacy}","received_events_url":"https://api.github.com/users/jurgenvinju/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/usethesource/rascal/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-10T11:15:25Z","updated_at":"2016-05-10T21:32:51Z","closed_at":null,"body":"The following simple grammar for Bexpr has an unexpected parse error. If we remove `Bfactor*` the bug is gone. If we replace `Bfactor*` by another simpler nullable non-terminal like `\"\"` or `A?` the bug remains. If we replace `Bfactor*` by a non-nullable like `\"aap\"` and add `aap` to the input, same problem. \r\n\r\n@arnoldlankamp; it's been a while :-) never discovered anything like this in the parser! \r\n\r\n@cdegouw thanks for the report.\r\n\r\n```\r\nsyntax Bexpr = Bfactor Bfactor*; \r\nsyntax Bfactor = \"t\" | \"f\" Bexpr;  \r\n\r\n/* this does not work:\r\nrascal>parse(#Bexpr, \"ft\");\r\nReloading module lang::deploy2\r\n|project://rascal/src/org/rascalmpl/library/ParseTree.rsc|(13418,964,<407,0>,<442,87>): ParseError(|unknown:///|(3,0,<1,2>,<1,2>))\r\n        at *** somewhere ***(|project://rascal/src/org/rascalmpl/library/ParseTree.rsc|(13418,964,<407,0>,<442,87>))\r\n        at parse(|project://rascal/src/org/rascalmpl/library/ParseTree.rsc|(14375,5,<442,80>,<442,85>))\r\n*/\r\n\r\nsyntax Cexpr = Cfactor+;\r\nsyntax Cfactor = \"t\" | \"f\" Cexpr;\r\n\r\n/* this works:\r\nrascal>parse(#Cexpr, \"ft\");\r\nReloading module lang::deploy2\r\nCexpr: (Cexpr) `ft`\r\n*/\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/usethesource/rascal/issues/comments/218298537","html_url":"https://github.com/usethesource/rascal/issues/951#issuecomment-218298537","issue_url":"https://api.github.com/repos/usethesource/rascal/issues/951","id":218298537,"user":{"login":"arnoldlankamp","id":1299065,"avatar_url":"https://avatars.githubusercontent.com/u/1299065?v=3","gravatar_id":"","url":"https://api.github.com/users/arnoldlankamp","html_url":"https://github.com/arnoldlankamp","followers_url":"https://api.github.com/users/arnoldlankamp/followers","following_url":"https://api.github.com/users/arnoldlankamp/following{/other_user}","gists_url":"https://api.github.com/users/arnoldlankamp/gists{/gist_id}","starred_url":"https://api.github.com/users/arnoldlankamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arnoldlankamp/subscriptions","organizations_url":"https://api.github.com/users/arnoldlankamp/orgs","repos_url":"https://api.github.com/users/arnoldlankamp/repos","events_url":"https://api.github.com/users/arnoldlankamp/events{/privacy}","received_events_url":"https://api.github.com/users/arnoldlankamp/received_events","type":"User","site_admin":false},"created_at":"2016-05-10T21:32:51Z","updated_at":"2016-05-10T21:32:51Z","body":"If you add another sort like `syntax S = Bexpr` and use `S` as start symbol it does work.\r\n\r\n@jurgenvinju I'll have a better look at the issue as soon as I can find some time (hopefully this weekend). If there's progress I'll let you know.\r\n"}}