rascal - Java 1.5 grammar doesn't build -
anybody java 1.5 grammar working in rascal?
https://raw.github.com/cwi-swat/rascal/master/src/org/rascalmpl/library/lang/java/syntax/java15.rsc
i get:
$ java -jar rascal-0.5.1.jar java15.rsc disambiguate.rsc parse error in cwd:///java15.rsc <997,24> <997,25>
997 freaky stuff:
bool expectedamb({(expr)`(<reftype t>) <expr e>`, appl(_,[(expr)`(<exprname n>)`,_*])}) = true; // (a) + 1 bool expectedamb({appl(_,[_*,(expr)`(<reftype t>) <expr e>`]), appl(_,[appl(_,[_*,(expr)`(<exprname n>)`]),_*])}) = true; // 1 + (a) + 1 default bool expectedamb(set[tree] t) = false;
char 24 ` think.
terence
yes, grammar uses newer syntax concrete syntax. current stable rascal release not support this. (that why public release not contain grammar yet)
to use grammar have download unstable release (replace stable
in update url unstable
) or build rascal locally rascal shell. in these cases, won't need separate files.
to answer question, yes grammar works, , we've been able parse quite java files it.
Comments
Post a Comment