Rodrigo Bonifacio
Rodrigo Bonifacio

Reputation: 262

Error using rascal Java15 grammar

I tried to parse some Java Code using the Java15 grammar of Rascal. However, it does not accept the declaration of local variable of parameterized types. In more details:

It seems to me that the problem is related to some ambiguity involving LocalVarDecStatements and expressions involving "<" and ">". However, I could not figure out how to fix the problem.

Upvotes: 1

Views: 155

Answers (1)

Jurgen Vinju
Jurgen Vinju

Reputation: 6696

I'm not one to say "works for me", but it does :-) See:

rascal>import lang::java::\syntax::Java15;
ok
rascal>import ParseTree;
ok
rascal>parse(#LocalVarDec, "List\<String\> files = null")
LocalVarDec: (LocalVarDec) `List<String> files = null`

Could you provide the example or a simplified example which has the error in it?

Upvotes: 1

Related Questions