Re: [Jastadd] Problems with Literals after change to Java 7 frontend

From: Jesper qvist <jesper.oqvist_at_cs.lth.se>
Date: Fri, 18 Jan 2013 16:20:58 +0100

Hi Eric,

It will not work to append Literals.flex because there are rules in
there that need to replace the ones in aspectj.flex. I am no flex wizard
either, and the file you attached seems a little more complex than the
one used in JastAddJ because it uses many different states, but here is
what I would do to modify aspectj.flex:

1. Replace the macro definitions from line 326 to 376 in aspectj.flex
with the contents of Java7Frontend/macros.flex
2. Replace lines 551-569 with line 4 from Java7Frontend/Literals.flex

/Jesper

On 01/18/2013 10:23 AM, Eric Bodden wrote:
> Ok, I think the reason for the malfunction is easy to explain: abc
> uses its own lexer definition, which is now missing the new rules for
> processing literals.
>
> Unfortunately I am not a flex wizard. Jesper do you know what's the
> easiest way to combine your Literals.flex with our aspectj.flex file?
> I have them both attached.
>
> Naively I tried to append Literals.ast to aspectj.ast but I got:
> [jflex] Error in file
> "/Users/eric/Documents/workspaces/clara-soot/abc-ja/src/abc/ja/parse/aspectj.flex"
> (line 825):
> [jflex] Macro has not been declared.
> [jflex] {NumericLiteral} { return
> sym(Terminals.NUMERIC_LITERAL); }
> [jflex] ^
>
> Cheers,
> Eric
Received on Fri Jan 18 2013 - 16:20:38 CET

This archive was generated by hypermail 2.3.0 : Wed Apr 16 2014 - 17:19:06 CEST