JetBrains/Grammar-Kit — pull request #31 by ligasgr (2014-04-26 22:00:20+00:00)
Title: Closes #30 - Incorrect error handling when frameName used near EOF.

I added a test case to ensure that proves that all variants if nextTokenIs is used just before EOF.
I'm not 100% sure this solution is the best one but it worked fine for me.
Before the change in the PSI dump was skipped in error message (PsiErrorElement).