diff options
author | Avik Sengupta <avik@apache.org> | 2002-05-03 16:12:03 +0000 |
---|---|---|
committer | Avik Sengupta <avik@apache.org> | 2002-05-03 16:12:03 +0000 |
commit | 579eb0a3f472c3294fed9a85a9c02cf9acf4a09c (patch) | |
tree | 4e2bb4685e7c30537d92d598d808293f9d871b93 | |
parent | feae8a5d0876f4d6a9cab34c56d51e0c429984e3 (diff) | |
download | poi-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.java | 35 |
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 |