software-engineering-amsterdam / software-construction

Software Construction Course Information at Universiteit van Amsterdam
17 stars 11 forks source link

Add/Sub error in QLParser.rats? #2

Open LE-Blythe opened 11 years ago

LE-Blythe commented 11 years ago
constant Action<Expr> AddTail = 
    "+" Spacing right:MulExpr { 
        yyValue = new Action<Expr>() {
            public Expr run(Expr left) {
              return new Add(left, right);
            }
        };
    }
    / "-" Spacing right:MulExpr { 
        yyValue = new Action<Expr>() {
            public Expr run(Expr left) {
              return new Add(left, right);
            }
        };
    }; 

I think that 2nd Add(left, right) should be Sub(left, right). Is that right?

tvdstorm commented 11 years ago

Asking the question is answering it :)

Proof that you should never copy-paste code.