Something changed in the parenthesizer that triggered this bug report by Lennart:

> De unit tests falen nu door een fout in de Java pretty-printer/parenthesizer.
>
> Het komt er op neer dat de volgende twee aterms niet meer gelijk
> zijn, omdat de haakjes wegvallen:
>
> $ echo ‘(x ? y : z) == 6’ | parse-java -s Expr | pp-aterm
> Eq(
> Cond(
> ExprName(Id(“x”))
> , ExprName(Id(“y”))
> , ExprName(Id(“z”))
> )
> , Lit(Deci(“6”))
> )
>
> $ echo ‘(x ? y : z) == 6’ | parse-java -s Expr | pp-java | parse-java
> -s Expr | pp-aterm
> Cond(
> ExprName(Id(“x”))
> , ExprName(Id(“y”))
> , Eq(ExprName(Id(“z”)), Lit(Deci(“6”)))
> )
>
> Hoop dat je er wat mee kan :)

Submitted on 8 January 2007 at 15:29

On 9 January 2007 at 09:04 Jira commented:

JFR-57, martin:

Dit is vreemd: de == werkt hier wel goed, maar de != niet …

martin@nisaaw:~/wc/nix-release/trunk> echo ‘(x ? y : z) == 6’ |
parse-java -s Expr | pp-java | parse-java -s Expr | pp-aterm
Eq(
Cond(
ExprName(Id(“x”))
, ExprName(Id(“y”))
, ExprName(Id(“z”))
)
, Lit(Deci(“6”))
)

martin@nisaaw:~/wc/nix-release/trunk> echo ‘(x ? y : z) != 6’ |
parse-java -s Expr | pp-java | parse-java -s Expr | pp-aterm
Cond(
ExprName(Id(“x”))
, ExprName(Id(“y”))
, NotEq(ExprName(Id(“z”)), Lit(Deci(“6”)))
)


On 9 January 2007 at 11:08 Jira commented:

JFR-57, martin:

Fixed in Stratego/XT (revision 16366).

Log in to post comments