Generate Parser Task
Task to generate a parser for the IntelliJ Platform Grammar Kit.
This task runs a Java process to generate parser and PSI files using a provided BNF file. It supports purging old files before generation, as well as specifying paths for outputs relative to a root output directory.
This task is part of the IntelliJ Platform plugin development process and integrates with Gradle for task registration and execution.
Properties
The location of the generated parser class, relative to the targetRootOutputDir. Setting this property with pathToPsiRoot allows the output directory to be shared because stale files are purged only from these paths.
The location of the generated PSI files, relative to the targetRootOutputDir. Setting this property with pathToParser allows the output directory to be shared because stale files are purged only from these paths.
Purge previously generated parser and PSI output before generating the parser. When pathToParser and pathToPsiRoot are set, only those outputs are removed. Otherwise, the exclusively owned output directory is removed.
Required. The source BNF file to generate the parser from.
Required. The output root directory. When pathToParser and pathToPsiRoot are not set, this directory is treated as an exclusively owned task output.
Functions
The output parser file computed from the pathToParser property.
The output PSI directory computed from the pathToPsiRoot property.