/** * Constructor */ public ParseItem() { volatileFunction = false; alternateCode = false; valid = true; parseContext = ParseContext.DEFAULT; }
/** * Constructor */ public TokenFormulaParser(byte[] data, Cell c, ExternalSheet es, WorkbookMethods nt, WorkbookSettings ws, ParseContext pc) { tokenData = data; pos = 0; relativeTo = c; workbook = es; nameTable = nt; tokenStack = new Stack<ParseItem>(); settings = ws; parseContext = pc; Assert.verify(nameTable != null); }
/** * Constructor which creates the parse tree out of tokens * * @param tokens the list of parsed tokens * @param rt the cell containing the formula * @param es a handle to the external sheet * @param nt a handle to the name table * @param ws the workbook settings * @param pc the parse context * @exception FormulaException */ public FormulaParser(byte[] tokens, Cell rt, ExternalSheet es, WorkbookMethods nt, WorkbookSettings ws, ParseContext pc) { // A null workbook bof means that it is a writable workbook and therefore // must be biff8 if (es.getWorkbookBof() != null && !es.getWorkbookBof().isBiff8()) { throw new FormulaException(FormulaException.BIFF8_SUPPORTED); } Assert.verify(nt != null); parser = new TokenFormulaParser(tokens,rt,es,nt,ws,pc); }
/** * Constructor which creates the parse tree out of the string * * @param form the formula string * @param es the external sheet handle * @param nt the name table * @param ws the workbook settings * @param pc the context of the parse */ public FormulaParser(string form, ExternalSheet es, WorkbookMethods nt, WorkbookSettings ws, ParseContext pc) { parser = new StringFormulaParser(form,es,nt,ws,pc); }
/** * Constructor * @param f * @param ws */ public StringFormulaParser(string f,ExternalSheet es,WorkbookMethods nt,WorkbookSettings ws,ParseContext pc) { formula = f; settings = ws; externalSheet = es; nameTable = nt; parseContext = pc; }
/** * Tells the operands to use the alternate code * * @pc the parse context */ public void setParseContext(ParseContext pc) { parseContext = pc; }