IDEA 2016.2 builds different Psi Tree


Got a problem in my Perl plugin. Still digging where is the problem. But atm found difference in the psi tree:


IDEA 2016.2 tree:

Parser built with the Grammar-Kit 1.2.1 and there is a 



Still diggign, but if you've encountered the same problem, advices are welcome.

Problem seems can be fast solved by taking GeneratedParserUtilBase from IDEA 14 and using as parent for ParserUtil class.



There was a number of GPUB fixes with combined _COLLAPSE_, _UPPER_, _EXTEND_ flags.

Grab the latest Grammar-Kit snapshot build here:


On the screenshot it seems that PerlStatement is not collapsed meaning _COLLAPSE_ flag is missing in generated parser.

Permanently deleted user

Thanks for an answer. Created a task for myself to migrate a newer Grammar Kit with blackjack and hooks :) 

Just curious, why GeneratedParserUtilBase is part of a platform, instead of generated code? Even if it's being used in platform, it would be nice to have my own copy in generated code and not depend on platform version.


It's up to the plugin developer what GPUB to use. I try to keep GPUB API as stable as possible. Stuff may break when the generated code already contains errors due to problems in the old generator. Hopefully we'll see less of that in future :-)

In IntelliJ project there's a number of generated parsers so we have just on 'platform' GPUB to avoid duplication.

Historically there's even a grammar-kit.jar!/resources/ so that GPUB can be placed in a plugin project via Generate action or some quick-fix.


Please sign in to leave a comment.