{"action":"closed","issue":{"url":"https://api.github.com/repos/JetBrains/Grammar-Kit/issues/97","repository_url":"https://api.github.com/repos/JetBrains/Grammar-Kit","labels_url":"https://api.github.com/repos/JetBrains/Grammar-Kit/issues/97/labels{/name}","comments_url":"https://api.github.com/repos/JetBrains/Grammar-Kit/issues/97/comments","events_url":"https://api.github.com/repos/JetBrains/Grammar-Kit/issues/97/events","html_url":"https://github.com/JetBrains/Grammar-Kit/issues/97","id":142247255,"number":97,"title":"Deal with unsupported/conflicting rule and token names in some way","user":{"login":"calexHG","id":17525307,"avatar_url":"https://avatars.githubusercontent.com/u/17525307?v=3","gravatar_id":"","url":"https://api.github.com/users/calexHG","html_url":"https://github.com/calexHG","followers_url":"https://api.github.com/users/calexHG/followers","following_url":"https://api.github.com/users/calexHG/following{/other_user}","gists_url":"https://api.github.com/users/calexHG/gists{/gist_id}","starred_url":"https://api.github.com/users/calexHG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calexHG/subscriptions","organizations_url":"https://api.github.com/users/calexHG/orgs","repos_url":"https://api.github.com/users/calexHG/repos","events_url":"https://api.github.com/users/calexHG/events{/privacy}","received_events_url":"https://api.github.com/users/calexHG/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-21T03:53:37Z","updated_at":"2016-04-19T15:44:25Z","closed_at":"2016-04-19T15:44:25Z","body":"When debugging, I somehow noticed that my naming of a subset of my rules with the naming pattern \"*NameThatThisGroupOfRulesIsKnownAsToTheRestOfTheGrammar*_\" (essentially just adding an underscore to the end of name of rules that used to implement other non-underscored names) might invisibly be causing errors in the logic, because the underscore, I think -- for some unknown reason -- isn't being carried over into the names of generated PSI classes and the generated code was thus likely unknowingly referencing one class when it thinks its referencing another class.\r\n\r\nI say this was \"likely\" happening because I've run into too many subtleties like this when trying to use Grammar-Kit recently, so didn't want bother with wasting time thinking about it much more. So, I changed the naming pattern from an `_` at the end, to an `_Impl` at the end.\r\n\r\nUnfortunately, I later detected that that was likely creating similarly unreported errors in the execution logic, for similar reasons: the underscore was being stripped (and thus my \\*`_Impl` classes were probably getting referenced instead of the auto-generated \\*`Impl` classes). At least, that's what half-a-second of headache-avoidance–reasoning lead me to be afraid of happening.\r\n\r\nSo, unfortunately, again, even though I don't think there should have been a conflict (because of the underscore), just to avoid invisible bugs potentially costing more hours/days of time, I unfortunately resorted to renaming my rules to something less readable and unfriendly — just because it seems that underscores aren't carried over.\r\n\r\nIf all of my caution was indeed warranted, **please either warn users when their rule names are unsupported, or work around their chosen rule names**. (Of course I expect you to choose the latter.)\r\n\r\n**And less importantly: you shouldn't strip underscores from our rule and token names**. Is it doing this? Is there a reason it's doing this? Can you disable that, or allow us to disable that?"}}