Skip to content

Commit

Permalink
Fix parsefuzz: Emit space between unary minusses
Browse files Browse the repository at this point in the history
  • Loading branch information
Kha committed Nov 8, 2014
1 parent 29c2a62 commit f8e2f08
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion parsefuzz.scala
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ lazy val ReturnStatement: Node = "return " ++ Expression.? ++ ";\n "
lazy val Expression: Node =
Ind(Expression) ++ " " ++ OneOf(List("!=", "*", "+", "-", "/", "<=", "<", "==", "=", ">=", ">", "%", "&&", "||")) ++ " " ++ Ind(Expression) |
UnaryExpression
lazy val UnaryExpression: Node = PostfixExpression | ("!" | "-") ++ Ind(UnaryExpression)
lazy val UnaryExpression: Node = PostfixExpression | ("!" | "- ") ++ Ind(UnaryExpression)
lazy val PostfixExpression: Node = PrimaryExpression ++ PostfixOp.*()
lazy val PostfixOp: Node = MethodInvocation | FieldAccess | ArrayAccess
lazy val MethodInvocation: Node = "." ++ IDENT ++ "(" ++ Arguments ++ ")"
Expand Down
14 changes: 7 additions & 7 deletions pos-parser/sane1.mj
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class z {
;
a[] e;
if (new boolean[false].f())
while (-7.k.n()[!5 - !!!!h % new t() < false != --!new a() - -false == true + u < false || -(!!true)][null].e().u.p())
while (-7.k.n()[!5 - !!!!h % new t() < false != - -!new a() - -false == true + u < false || -(!!true)][null].e().u.p())
{
return ;

Expand All @@ -51,7 +51,7 @@ int s;

}
public static void g(String[] k) {
while (----!!2)
while (- - - -!!2)
{
int d = -q;
{
Expand All @@ -70,14 +70,14 @@ int s;
}

}
boolean e = !-!-!true * new t() && new int[---new x[o()] >= -true / (-false) / this % !-(!4) != -this].q() < this || z(!w);
boolean e = !-!-!true * new t() && new int[- - -new x[o()] >= -true / (-false) / this % !-(!4) != -this].q() < this || z(!w);

}
public void m;
public static void p(String[] d) {
return ;
int z;
int k = !-new boolean[!--!m() && s()[8][(!--g) / -!this == new int[2 || new int[-(-this < 1)] < 3 < 5 || !new int[-!!-new g()] + -f <= -3] >= !true < new boolean[!-null]].u][];
int k = !-new boolean[!- -!m() && s()[8][(!- -g) / -!this == new int[2 || new int[-(-this < 1)] < 3 < 5 || !new int[-!!-new g()] + -f <= -3] >= !true < new boolean[!-null]].u][];

}
public static void a(String[] e) {
Expand All @@ -94,7 +94,7 @@ class g {

}
public g[] c(boolean l, d x) {
while (i()[!---b()].z.h.k())
while (i()[!- - -b()].z.h.k())
return -this <= 4[z[d() % -(r()) + 9 || c].i];

}
Expand All @@ -114,7 +114,7 @@ class i {
public int d(k v, void[][][] x) {
a v;
{
!a(null, this, --null)[!!true < 8].i.o().y[new int[new boolean[-n()] % 9 % --k()] % true == -j()];
!a(null, this, - -null)[!!true < 8].i.o().y[new int[new boolean[-n()] % 9 % - -k()] % true == -j()];

}

Expand All @@ -139,7 +139,7 @@ class u {

}
public void y() {
while ((!(2).u() = null[v() == b() + (this) * new r() && !--!(false == null) = !!new int[this != null > !m() / !w] = !6 <= false >= 0 + true * (3) = !-!6 = new c()] >= new int[l][][]))
while ((!(2).u() = null[v() == b() + (this) * new r() && !- -!(false == null) = !!new int[this != null > !m() / !w] = !6 <= false >= 0 + true * (3) = !-!6 = new c()] >= new int[l][][]))
;

}
Expand Down

0 comments on commit f8e2f08

Please sign in to comment.