diff options
author | Jeffrey Overbey | 2011-05-25 16:53:26 +0000 |
---|---|---|
committer | Jeffrey Overbey | 2011-05-25 16:53:26 +0000 |
commit | 8c95e1a2672a0de2f075e26c5f3d5f113b62500b (patch) | |
tree | 7be13cee1edd72c1d05fd36ea84494792a3dbaa0 | |
parent | 525b1bb82427d3fb463b7e5411efe2c0f6ad1ef0 (diff) | |
download | org.eclipse.photran-8c95e1a2672a0de2f075e26c5f3d5f113b62500b.tar.gz org.eclipse.photran-8c95e1a2672a0de2f075e26c5f3d5f113b62500b.tar.xz org.eclipse.photran-8c95e1a2672a0de2f075e26c5f3d5f113b62500b.zip |
Corrected handling of whitespace in constant loop bound calculation
-rw-r--r-- | org.eclipse.photran.core.vpg/src/org/eclipse/photran/internal/core/analysis/loops/ASTProperLoopConstructNode.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/org.eclipse.photran.core.vpg/src/org/eclipse/photran/internal/core/analysis/loops/ASTProperLoopConstructNode.java b/org.eclipse.photran.core.vpg/src/org/eclipse/photran/internal/core/analysis/loops/ASTProperLoopConstructNode.java index 9f2213a2..2e83f3c4 100644 --- a/org.eclipse.photran.core.vpg/src/org/eclipse/photran/internal/core/analysis/loops/ASTProperLoopConstructNode.java +++ b/org.eclipse.photran.core.vpg/src/org/eclipse/photran/internal/core/analysis/loops/ASTProperLoopConstructNode.java @@ -169,7 +169,7 @@ public class ASTProperLoopConstructNode extends ASTNode implements IExecutableCo IExpr expr = node.getLb(); if (expr instanceof ASTIntConstNode) { - return Integer.parseInt(expr.findFirstToken().getText()); + return Integer.parseInt(expr.findFirstToken().getText().trim()); } else { @@ -187,7 +187,7 @@ public class ASTProperLoopConstructNode extends ASTNode implements IExecutableCo IExpr expr = node.getUb(); if (expr instanceof ASTIntConstNode) { - return Integer.parseInt(expr.findFirstToken().getText()); + return Integer.parseInt(expr.findFirstToken().getText().trim()); } else { @@ -201,7 +201,7 @@ public class ASTProperLoopConstructNode extends ASTNode implements IExecutableCo IExpr expr = node.getStep(); if (expr instanceof ASTIntConstNode || (expr instanceof ASTUnaryExprNode && ((ASTUnaryExprNode)expr).getOperand() instanceof ASTIntConstNode)) - return Integer.parseInt(expr.toString()); + return Integer.parseInt(expr.toString().trim()); else if (expr == null) return 1; else |