Bug 8687 - Formula Parser Chokes on Spaces
Summary: Formula Parser Chokes on Spaces
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 2.0-dev
Hardware: Other other
: P3 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-05-01 01:50 UTC by Andy Oliver
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments
Working test case (1.68 KB, text/plain)
2002-05-01 19:36 UTC, Avik Sengupta
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andy Oliver 2002-05-01 01:50:02 UTC
FormulaParser currently throws an "Expected" if a " " is in between ()'s for
instance.

SUM( A1:A2 ) should be acceptable as should SUM(A1:A2) --  currently onlt the
latter is.  Basically any whitespace not in " " or ' ' should be ignored however
SUM(A 1:A2) should be illegal.

Excel can acutally preserve these spaces.  (we should try and do that )
Excel chokes on SUM (A1:A2) as I guess SUM( is the token and ) is the end tag.
Comment 1 Avik Sengupta 2002-05-01 19:35:28 UTC
The attached tests work for me. Please supply me with a failing testcase. 

Testing org.apache.poi.hssf.record.formula.FormulaParser
....
Time: 0.181

OK (4 tests)

Comment 2 Avik Sengupta 2002-05-01 19:36:56 UTC
Created attachment 1753 [details]
Working test case
Comment 3 Andy Oliver 2002-05-02 04:30:20 UTC
do AVERAGE( A1:A2 ) or SUM( A1:A2 ) with no other elements and it chokes.
Comment 4 Avik Sengupta 2002-05-02 12:53:25 UTC
I've commited the test for formula parser with the case you suggest. Can u pls 
run it and tell me the results??
Comment 5 Avik Sengupta 2002-05-13 16:20:00 UTC
No testcases show aberrant behaviour. Setting to fixed, reopen with a failing 
testcase.