Custom Language Development - GeneratedParserUtilBase?

I'm following the tutorial here:

However, when I copy the GeneratedParserUtilBase class, it won't compile.  There are several methods that are not found:


I'm using IDEA Ultimate 12.

Is this class necessary anymore?  I'm able to generate the parser without it.

CORRECTION: I can generate the parser, but it contains a referece to this class.  So, I guess I need to know how to get GeneratedParserUtilBase to compile.

Comment actions Permalink

I think I've solved the problem.....

The SimpleParser generated had the following import statement:

import static com.simpleplugin.parser.GeneratedParserUtilBase.*;

I found the following on page

There's no need to keep a copy of GeneratedParserUtilBase in a project, it is included in IntelliJ Platform since version 12.1.

So I changed the generated import statment in SimpleParser to:

import static com.intellij.lang.parser.GeneratedParserUtilBase.*;

And everything compiles.

Is there anyway to force Grammar-Kit to generate the correct import statement?

Comment actions Permalink

Doh!  I figured it out again......

The example bnf file contained:


Change it to:


And the parser generates successfully and compiles cleanly.

Please sign in to leave a comment.