Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java parser written in JavaScript

I'm looking for implementation of Java source code parser written in JavaScript language. Do you know any?

like image 211
Ilya Lakhin Avatar asked May 13 '11 14:05

Ilya Lakhin


2 Answers

Have a look at ANTLR which can have Javascript as a target, with the Java 1.5 grammar at http://www.antlr.org/grammar/1152141644268/Java.g

Edit: link stopped working - try https://github.com/antlr/grammars-v4/blob/master/java/Java.g4 :)

like image 151
Chris Dennett Avatar answered Oct 23 '22 14:10

Chris Dennett


Here is Java 1.7 parser http://mazko.github.io/jsjavaparser/ using PEG grammar by Roman R Redziejowski http://www.romanredz.se/Mouse/Java.1.7.peg

like image 26
Oleg Mazko Avatar answered Oct 23 '22 13:10

Oleg Mazko