acoliver    02/04/28 08:17:44

  Modified:    src/java/org/apache/poi/hssf/record/formula
                        FormulaParser.java
  Log:
  work on PowerPtg
  
  Revision  Changes    Path
  1.5       +8 -1      
jakarta-poi/src/java/org/apache/poi/hssf/record/formula/FormulaParser.java
  
  Index: FormulaParser.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-poi/src/java/org/apache/poi/hssf/record/formula/FormulaParser.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- FormulaParser.java        28 Apr 2002 02:04:58 -0000      1.4
  +++ FormulaParser.java        28 Apr 2002 15:17:44 -0000      1.5
  @@ -310,10 +310,11 @@
       /** Parse and Translate a Math Term */
       private void  Term(){
           Factor();
  -        while (Look == '*' || Look == '/' ) {
  +        while (Look == '*' || Look == '/' || Look == '^') {
               ///TODO do we need to do anything here??
               if (Look == '*') Multiply();
               if (Look == '/') Divide();
  +            if (Look == '^') Power();
           }
       }
       
  @@ -330,6 +331,12 @@
           Match('-');
           Term();
           tokens.add(new SubtractPtg());
  +    }
  +    
  +    private void Power() {
  +        Match('^');
  +        Term();
  +        tokens.add(new PowerPtg());
       }
       
       
  
  
  


Reply via email to