Permalink
Browse files

drop operator '%%' from stage 0

  • Loading branch information...
1 parent c7fdf88 commit 9c7d206d14f51d337991ed75f413475afa7d8b04 @NotFound committed May 24, 2012
Showing with 2 additions and 40 deletions.
  1. +1 −11 token.cpp
  2. +1 −29 winxedst0.cpp
View
12 token.cpp
@@ -1,5 +1,5 @@
// token.cpp
-// Revision 24-may-2012
+// Revision 25-may-2012
#include "token.h"
#include "errors.h"
@@ -507,16 +507,6 @@ Token Tokenizer::getany ()
else
ungetchar(c);
break;
- case '%':
- switch (c= getchar())
- {
- case '%':
- s+= c;
- break;
- default:
- ungetchar(c);
- }
- break;
case '$':
c = getchar();
if (isidentifier(c))
View
30 winxedst0.cpp
@@ -3571,32 +3571,6 @@ class OpModExpr : public CommonBinOpExpr
}
};
-
-//**********************************************************************
-
-class OpCModExpr : public CommonBinOpExpr
-{
-public:
- OpCModExpr(BlockBase &block,
- Token t, Expr *first, Expr *second) :
- CommonBinOpExpr(block, t, first, second)
- {
- }
-private:
- void emit(Emit &e, const std::string &result)
- {
- char type= lexpr->isinteger() && rexpr->isinteger() ? REGint : REGvar;
- std::string res= result.empty() ? gentemp(type) : result;
- std::string op1= gentemp(type);
- std::string op2= gentemp(type);
- lexpr->emit(e, op1);
- rexpr->emit(e, op2);
- e << op_cmod(res, op1, op2);
- if (!result.empty())
- e << '\n';
- }
-};
-
//**********************************************************************
class OpShiftleftExpr : public CommonBinOpExpr
@@ -4692,7 +4666,7 @@ Expr * parseExpr_5(BlockBase &block, Tokenizer &tk)
{
Expr *subexpr= parseExpr_4(block, tk);
Token t;
- while ((t= tk.get()).isop('*') || t.isop('/') || t.isop('%') || t.isop("%%"))
+ while ((t= tk.get()).isop('*') || t.isop('/') || t.isop('%'))
{
Expr *subexpr2= parseExpr_4(block, tk);
if (t.isop('*'))
@@ -4701,8 +4675,6 @@ Expr * parseExpr_5(BlockBase &block, Tokenizer &tk)
subexpr= new OpDivExpr(block, t, subexpr, subexpr2);
else if (t.isop('%'))
subexpr= new OpModExpr(block, t, subexpr, subexpr2);
- else
- subexpr= new OpCModExpr(block, t, subexpr, subexpr2);
}
tk.unget(t);
return subexpr;

0 comments on commit 9c7d206

Please sign in to comment.