GithubHelp home page GithubHelp logo

kawolum / jetbrains Goto Github PK

View Code? Open in Web Editor NEW

This project forked from antlr/antlr4-intellij-adaptor

0.0 1.0 0.0 238 KB

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

License: BSD 2-Clause "Simplified" License

Java 96.80% ANTLR 3.20%

jetbrains's Introduction

ANTLR support in jetbrains IDEs

A library to support the use of ANTLR grammars for custom languages in jetbrains IDEs plug-in development.

This library has adaptors that convert ANTLR-generated parse trees into jetbrains 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<? extends PsiElement> allfuncs =
    XPath.findAll(SampleLanguage.INSTANCE, tree,
                  "/script/function/ID");

I have made a sample plug-in that demonstrates the use of this library: antlr/jetbrains-plugin-sample.

I can't use mvn to build and publish this library (see pom.xml but you can use a git submodule to clone this library underneath your plug-in root directory as, perhaps, adaptor directory:

$ cd myplugin
$ git submodule add [email protected]:antlr/jetbrains.git adaptor
$ ls adaptor
./                .git              LICENSE           contributors.txt  pom.xml
../               .gitignore        README.md         doc/              src/

Then tell your plug-in build to look in that directory for source code. This is what the sample plug-in does.

jetbrains's People

Contributors

bjansen avatar parrt avatar vemilyus avatar yegorpetrov avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.