Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A library to support the use of ANTLR grammars in jetbrains IDE plugins for building custom languages.

License

NotificationsYou must be signed in to change notification settings

antlr/antlr4-intellij-adaptor

Repository files navigation

A library to support the use of ANTLRv4 grammars for custom languages in IntelliJ-based IDEs plug-in development.

This library has adaptors that convert ANTLR-generated parse trees into IntelliJ PSI trees. Mostly this library is about adapting ANTLR parsers and trees, but there is considerable support to examine PSI trees derived from ANTLR parse trees. For example, if you're building a structure view for your plug-in and you want to get the list of function names you can use XPath-like specs such as"/script/function/ID":

Collection<?extendsPsiElement>allfuncs =XPath.findAll(SampleLanguage.INSTANCE,tree,"/script/function/ID");

Using the library in your project

The library ispublished on Maven Central which means you can download the JAR and add it to your classpath manually, or pull the dependency automatically if you are using a Gradle build:

repositories {    mavenCentral()}dependencies {    compile"org.antlr:antlr4-intellij-adaptor:0.1"}

In Maven builds, use:

<dependency>  <groupId>org.antlr</groupId>  <artifactId>antlr4-intellij-adaptor</artifactId>  <version>0.1</version></dependency>

You can now head over to theGetting started section of the wiki.

Examples

Here is a list of known plugins that use the adaptor:

Other usages can befound on GitHub

Migration from the pre-Maven version

Before 0.1, it was recommended to add this Git repo as a submodule of your own project, or to copy the source files directly.

It is now recommended to use the Maven dependency. The mainbreaking change is that the base package has been renamed fromorg.antlr.jetbrains.adaptor toorg.antlr.intellij.adaptor

About

A library to support the use of ANTLR grammars in jetbrains IDE plugins for building custom languages.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors7


[8]ページ先頭

©2009-2025 Movatter.jp