IDEA 2016.2 builds different Psi Tree

Answered

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

IDEA 14

IDEA 2016.2 tree:

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

extends("use_statement.*")=statement

directive.

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.

 

3 comments
Comment actions Permalink

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

Grab the latest Grammar-Kit snapshot build here: 

https://teamcity.jetbrains.com/viewType.html?buildTypeId=IntellijIdeaPlugins_GrammarKit_Build&guest=1

 

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

0
Comment actions Permalink

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.

0
Comment actions Permalink

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/GeneratedParserUtilBase.java so that GPUB can be placed in a plugin project via Generate action or some quick-fix.

0

Please sign in to leave a comment.