work on PowerPtg
PR: Obtained from: Submitted by: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@352521 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
700efbc430
commit
fd71ea023c
@ -310,10 +310,11 @@ public class FormulaParser {
|
||||
/** 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();
|
||||
}
|
||||
}
|
||||
|
||||
@ -332,6 +333,12 @@ public class FormulaParser {
|
||||
tokens.add(new SubtractPtg());
|
||||
}
|
||||
|
||||
private void Power() {
|
||||
Match('^');
|
||||
Term();
|
||||
tokens.add(new PowerPtg());
|
||||
}
|
||||
|
||||
|
||||
/** Parse and Translate an Expression */
|
||||
private void Expression() {
|
||||
|
Loading…
Reference in New Issue
Block a user