{"action":"created","issue":{"url":"https://api.github.com/repos/eclipse/xtext-core/issues/773","repository_url":"https://api.github.com/repos/eclipse/xtext-core","labels_url":"https://api.github.com/repos/eclipse/xtext-core/issues/773/labels{/name}","comments_url":"https://api.github.com/repos/eclipse/xtext-core/issues/773/comments","events_url":"https://api.github.com/repos/eclipse/xtext-core/issues/773/events","html_url":"https://github.com/eclipse/xtext-core/issues/773","id":335170102,"node_id":"MDU6SXNzdWUzMzUxNzAxMDI=","number":773,"title":"Parsing in reconciler failed issue when feature is not assigned","user":{"login":"karypid","id":1221101,"node_id":"MDQ6VXNlcjEyMjExMDE=","avatar_url":"https://avatars2.githubusercontent.com/u/1221101?v=4","gravatar_id":"","url":"https://api.github.com/users/karypid","html_url":"https://github.com/karypid","followers_url":"https://api.github.com/users/karypid/followers","following_url":"https://api.github.com/users/karypid/following{/other_user}","gists_url":"https://api.github.com/users/karypid/gists{/gist_id}","starred_url":"https://api.github.com/users/karypid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karypid/subscriptions","organizations_url":"https://api.github.com/users/karypid/orgs","repos_url":"https://api.github.com/users/karypid/repos","events_url":"https://api.github.com/users/karypid/events{/privacy}","received_events_url":"https://api.github.com/users/karypid/received_events","type":"User","site_admin":false},"labels":[{"id":385480022,"node_id":"MDU6TGFiZWwzODU0ODAwMjI=","url":"https://api.github.com/repos/eclipse/xtext-core/labels/bug","name":"bug","color":"e6bebe","default":true},{"id":454953587,"node_id":"MDU6TGFiZWw0NTQ5NTM1ODc=","url":"https://api.github.com/repos/eclipse/xtext-core/labels/confirmed","name":"confirmed","color":"128a8a","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-06-24T10:56:48Z","updated_at":"2018-06-25T14:55:32Z","closed_at":null,"author_association":"NONE","body":"From [this forum thread](https://www.eclipse.org/forums/index.php/t/1093873/):\r\n\r\nWhen the entry rule references another rule without assignment, unstable behaviour can occur. The parser will fail if the first expression is missing with exception:\r\n\r\n```\r\n4719 [Worker-6] ERROR org.eclipse.xtext.ui.editor.reconciler.XtextDocumentReconcileStrategy  - Parsing in reconciler failed.\r\njava.lang.NullPointerException\r\n\tat org.eclipse.xtext.resource.XtextResource.update(XtextResource.java:263)\r\n\tat org.eclipse.xtext.ui.editor.reconciler.XtextDocumentReconcileStrategy.doReconcile(XtextDocumentReconcileStrategy.java:182)\r\n\tat org.eclipse.xtext.ui.editor.reconciler.XtextDocumentReconcileStrategy.reconcile(XtextDocumentReconcileStrategy.java:90)\r\n\tat org.eclipse.xtext.ui.editor.reconciler.XtextReconciler.doRun(XtextReconciler.java:450)\r\n\tat org.eclipse.xtext.ui.editor.reconciler.XtextReconciler.access$3(XtextReconciler.java:430)\r\n\tat org.eclipse.xtext.ui.editor.reconciler.XtextReconciler$1.process(XtextReconciler.java:364)\r\n\tat org.eclipse.xtext.ui.editor.reconciler.XtextReconciler$1.process(XtextReconciler.java:1)\r\n\tat org.eclipse.xtext.util.concurrent.IUnitOfWork$Void.exec(IUnitOfWork.java:37)\r\n\tat org.eclipse.xtext.resource.OutdatedStateManager.exec(OutdatedStateManager.java:91)\r\n\tat org.eclipse.xtext.ui.editor.model.XtextDocument$XtextDocumentLocker.modify(XtextDocument.java:433)\r\n\tat org.eclipse.xtext.ui.editor.model.XtextDocument.internalModify(XtextDocument.java:166)\r\n\tat org.eclipse.xtext.ui.editor.reconciler.XtextReconciler.run(XtextReconciler.java:361)\r\n\tat org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)\r\n```\r\nTo reproduce use grammar:\r\n\r\n```\r\ngrammar org.xtext.example.mydsl.MyDsl with org.eclipse.xtext.common.Terminals\r\n\r\ngenerate myDsl \"http://www.xtext.org/example/mydsl/MyDsl\"\r\n\r\nModel: {Model}\r\n    'greetings' '{'\r\n    greetings+=Greeting*\r\n    '}';\r\n\r\nGreeting:\r\n    SimpleGreeting | GoodMorning | GoodEvening | CompoundGreeting;\r\n\r\nCompoundGreeting:\r\n    'greet' name=ID '{' \r\n        lines+=CompoundGreetingMember*\r\n    '}'\r\n;\r\n\r\nCompoundGreetingMember:\r\n    RefGreeting | InlineGreeting\r\n;\r\n\r\nInlineGreeting:\r\n    GoodMorning | GoodEvening\r\n;\r\n\r\nRefGreeting:\r\n    'and' name=ID greet=[Greeting]\r\n;\r\n\r\nSimpleGreeting:\r\n    'Hello' name=ID '!';\r\n\r\nGoodMorning:\r\n    'Good' 'morning' name=ID '!';\r\n\r\nGoodEvening:\r\n    'Good' 'evening' name=ID '!';\r\n```\r\n\r\nand create test file:\r\n\r\n```\r\n// day HappyDay\r\n\r\ngreetings {\r\n\tHello X !\r\n\tGood morning Y !\r\n\tGood evening Z !\r\n\t\r\n\tgreet script {\r\n\t\tGood morning A !\r\n\t\tGood evening B !\r\n\t\tand Thinking X\r\n\t}\r\n}\r\n```\r\n\r\nThen modify grammar to require the commented-out top portion of the test file:\r\n\r\n```\r\ngrammar org.xtext.example.mydsl.MyDsl with org.eclipse.xtext.common.Terminals\r\n\r\ngenerate myDsl \"http://www.xtext.org/example/mydsl/MyDsl\"\r\n\r\nModel:\r\n    Day\r\n    'greetings' '{'\r\n    greetings+=Greeting*\r\n    '}';\r\n\r\nDay:\r\n    'day' name=ID;\r\n\r\nGreeting:\r\n    SimpleGreeting | GoodMorning | GoodEvening | CompoundGreeting;\r\n\r\nCompoundGreeting:\r\n    'greet' name=ID '{' \r\n        lines+=CompoundGreetingMember*\r\n    '}'\r\n;\r\n\r\nCompoundGreetingMember:\r\n    RefGreeting | InlineGreeting\r\n;\r\n\r\nInlineGreeting:\r\n    GoodMorning | GoodEvening\r\n;\r\n\r\nRefGreeting:\r\n    'and' name=ID greet=[Greeting]\r\n;\r\n\r\nSimpleGreeting:\r\n    'Hello' name=ID '!';\r\n\r\nGoodMorning:\r\n    'Good' 'morning' name=ID '!';\r\n\r\nGoodEvening:\r\n    'Good' 'evening' name=ID '!';\r\n```\r\n\r\nAdditional exception/issue mentioned in forum thread seem to be cascading errors that stem from above."},"comment":{"url":"https://api.github.com/repos/eclipse/xtext-core/issues/comments/399981283","html_url":"https://github.com/eclipse/xtext-core/issues/773#issuecomment-399981283","issue_url":"https://api.github.com/repos/eclipse/xtext-core/issues/773","id":399981283,"node_id":"MDEyOklzc3VlQ29tbWVudDM5OTk4MTI4Mw==","user":{"login":"szarnekow","id":375492,"node_id":"MDQ6VXNlcjM3NTQ5Mg==","avatar_url":"https://avatars2.githubusercontent.com/u/375492?v=4","gravatar_id":"","url":"https://api.github.com/users/szarnekow","html_url":"https://github.com/szarnekow","followers_url":"https://api.github.com/users/szarnekow/followers","following_url":"https://api.github.com/users/szarnekow/following{/other_user}","gists_url":"https://api.github.com/users/szarnekow/gists{/gist_id}","starred_url":"https://api.github.com/users/szarnekow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/szarnekow/subscriptions","organizations_url":"https://api.github.com/users/szarnekow/orgs","repos_url":"https://api.github.com/users/szarnekow/repos","events_url":"https://api.github.com/users/szarnekow/events{/privacy}","received_events_url":"https://api.github.com/users/szarnekow/received_events","type":"User","site_admin":false},"created_at":"2018-06-25T14:55:32Z","updated_at":"2018-06-25T14:55:32Z","author_association":"CONTRIBUTOR","body":"> should create an error marker \"An assignement is not allowed after an unassigned rule call, when the 'current' was already created.\"\r\n\r\nThis is actually not true. Xtext.xtext contains this pattern: \r\n```\r\nTerminalToken returns AbstractElement:\r\n\tTerminalTokenElement cardinality=('?'|'*'|'+')?\r\n;\r\n```\r\n\r\nSubsequent assignments will simply manipulate the `current` instance which was returned by the unassigned rule call.\r\n\r\nNot sure why this is not handled correctly on the root node."}}
{"actor":{"display_login":"szarnekow"}}