Example #1
0
 def __init__(self, s):
     try:
         self.__s = s
         lexer = ExcelFormulaLexer.Lexer(s)
         self.__parser = ExcelFormulaParser.Parser(lexer)
         self.__parser.formula()
     except ANTLRException:
         raise Exception, "can't parse formula " + s
Example #2
0
 def __init__(self, s, default=None, opts=None):
     self.__default = default
     self.__opts = opts
     try:
         self.__s = s
         lexer = ExcelFormulaLexer.Lexer(s)
         self.__parser = ExcelFormulaParser.Parser(lexer)
         self.__parser.formula()
     except ANTLRException:
         raise Exception, "can't parse formula " + s
Example #3
0
 def __init__(self, s):
     try:
         self.__s = s
         lexer = ExcelFormulaLexer.Lexer(s)
         self.__parser = ExcelFormulaParser.Parser(lexer)
         self.__parser.formula()
         self.__sheet_refs = self.__parser.sheet_references
         self.__xcall_refs = self.__parser.xcall_references
     except ANTLRException, e:
         # print e
         raise ExcelFormulaParser.FormulaParseException, "can't parse formula " + s