Can I use eclipse JDT / AST for other programming languages?

Can I use AST / JDT for other languages? For example, write your own parser for C # that somehow uses AST technology?

+3
source share
3 answers

If you look at the article " Eclipse JDT - Abstract Syntax Tree (AST) and Java Model - Tutorial , JDT and its AST are for Java.

Eclipse Java Development Tools (JDT) API- Java .
AST - Java. AST API , , .
AST org.eclipse.jdt.core.dom Eclipse org.eclipse.jdt.core.

AST , , XText

alt text http://www.eclipse.org/Xtext/images/screenshot-title.png

, jdt, Java. ASTView

alt text

. Eclipse ASTParser Java Eclipse AST.

+4

JDT ( , . Mark), Java, . #, antlr - , . - , Antlr #.

0

ANTLR (ANother Tool for Language Recognition), , . , , github. https://www.antlr.org/ https://github.com/antlr/grammars-v4

You will need to create your own AST model.

0
source

Source: https://habr.com/ru/post/1725139/


All Articles