Question: Creating a JRuby parser implementation to generate AST from java file

Question

Creating a JRuby parser implementation to generate AST from java file

Answers 1
Added at 2016-11-05 11:11
Tags
Question

I am currently trying to parse the following java code to get an AST from my .java files in a jrubyparser implementation:

import static org.junit.Assert.*;
import org.junit.Test;

public class testDeposit {

    public void test() {

        BankApplication b = new BankApplication();
        b.deposit("11117", "10.00");
        assertEquals("330.00", b.getAccountBalance("Seetha"));

    }

}

However when I run the code, it gives me the following error:

I have looked for the error information online but could not find anything regarding this error. Could anyone please explain what might be going wrong?

Thank you!

The following link is the repository for the jrubyparser that I am trying to use: https://github.com/jruby/jruby-parser

Answers to

Creating a JRuby parser implementation to generate AST from java file

nr: #1 dodano: 2016-11-05 23:11

The JRuby Ruby parser complains because the code you are parsing is not valid Ruby. It looks rather like Java to me.

Source Show
◀ Wstecz