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. For backwards compatibility, setting this property changes the default of purgeOldFiles to false. Otherwise, the value of this property is only used when purgeOldFiles is set to true. When this property is set, only the given file or directory is deleted before re-generating the parser.
The location of the generated PSI files, relative to the targetRootOutputDir. For backwards compatibility, setting this property changes the default of purgeOldFiles to false. Otherwise, the value of this property is only used when purgeOldFiles is set to true. When this property is set, only the given file or directory is deleted before re-generating the parser.
Purge old files from the target directory before generating the parser. By default, old files are purged unless pathToParser and pathToPsiRoot have been specified. If you want to disable this option because the output directory is shared with another task, note that you may run into issues with stale files. Also note that overlapping task outputs are discouraged by Gradle and may cause issues when using the build cache.
Required. The source BNF file to generate the parser from.
Required. The output root directory.
Functions
The output parser file computed from the pathToParser property.
The output PSI directory computed from the pathToPsiRoot property.