aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAvik Sengupta <avik@apache.org>2002-05-03 16:12:03 +0000
committerAvik Sengupta <avik@apache.org>2002-05-03 16:12:03 +0000
commit579eb0a3f472c3294fed9a85a9c02cf9acf4a09c (patch)
tree4e2bb4685e7c30537d92d598d808293f9d871b93
parentfeae8a5d0876f4d6a9cab34c56d51e0c429984e3 (diff)
downloadpoi-579eb0a3f472c3294fed9a85a9c02cf9acf4a09c.tar.gz
poi-579eb0a3f472c3294fed9a85a9c02cf9acf4a09c.zip
Make jdepend happy - removing test main method since package records should not depend on package usermodel
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@352597 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/java/org/apache/poi/hssf/record/formula/FormulaParser.java35
1 files changed, 2 insertions, 33 deletions
diff --git a/src/java/org/apache/poi/hssf/record/formula/FormulaParser.java b/src/java/org/apache/poi/hssf/record/formula/FormulaParser.java
index de8e3e3eb8..50f7e8dfdb 100644
--- a/src/java/org/apache/poi/hssf/record/formula/FormulaParser.java
+++ b/src/java/org/apache/poi/hssf/record/formula/FormulaParser.java
@@ -60,7 +60,6 @@ import java.util.List;
import java.util.ArrayList;
import java.util.Stack;
-import org.apache.poi.hssf.usermodel.*;
import java.io.FileOutputStream;
import java.io.File;
@@ -72,7 +71,8 @@ import java.io.File;
* BNF for the formula expression is :
* <expression> ::= <term> [<addop> <term>]*
* <term> ::= <factor> [ <mulop> <factor ]*
- * <factor> ::= <number> | (<expression>) | <cellRef>
+ * <factor> ::= <number> | (<expression>) | <cellRef> | <function>
+ * <function> ::= <functionName> ([expression [, expression]*])
*
* @author Avik Sengupta <avik AT Avik Sengupta DOT com>
* @author Andrew C. oliver (acoliver at apache dot org)
@@ -483,35 +483,4 @@ end;
}
- /** Main Program for testing*/
- public static void main(String[] argv) {
- FormulaParser fp = new FormulaParser(argv[0]+";");
- System.out.println("\nFormula is: ");
- fp.parse();
- System.out.println("RPN Form is: " +fp.toString());
-
- System.out.println("Converted Text form is : "+fp.toFormulaString(fp.getRPNPtg()));
- try {
- short rownum = 0;
- File file = File.createTempFile("testFormula",".xls");
- FileOutputStream out = new FileOutputStream(file);
- HSSFWorkbook wb = new HSSFWorkbook();
- HSSFSheet s = wb.createSheet();
- HSSFRow r = null;
- HSSFCell c = null;
-
- r = s.createRow((short) 0);
- c = r.createCell((short) 0);
- c.setCellFormula(argv[0]);
-
- wb.write(out);
- out.close();
-
- System.out.println(file.getCanonicalPath());
- } catch (java.io.IOException ioe) {
- ioe.printStackTrace();
- }
- //If Look <> CR then Expected('NewLine');
- }
-
} \ No newline at end of file