Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(427)

Side by Side Diff: xfa/src/fxfa/src/fm2js/xfa_fmparse.h

Issue 1701363003: Fix some issues with CXFA_FMParse/CXFA_FMLexer infinite looping. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: delete more stuff Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef _XFA_FM_PARSE_H 7 #ifndef _XFA_FM_PARSE_H
8 #define _XFA_FM_PARSE_H 8 #define _XFA_FM_PARSE_H
9
10 #include <memory>
11
9 class CXFA_FMParse { 12 class CXFA_FMParse {
10 public: 13 public:
11 CXFA_FMParse(); 14 CXFA_FMParse();
12 ~CXFA_FMParse();
13 int32_t Init(const CFX_WideStringC& wsFormcalc, CXFA_FMErrorInfo* pErrorInfo); 15 int32_t Init(const CFX_WideStringC& wsFormcalc, CXFA_FMErrorInfo* pErrorInfo);
14 void NextToken(); 16 void NextToken();
15 void Check(XFA_FM_TOKEN op); 17 void Check(XFA_FM_TOKEN op);
16 void Error(FX_DWORD lineNum, XFA_FM_ERRMSG msg, ...); 18 void Error(FX_DWORD lineNum, XFA_FM_ERRMSG msg, ...);
17 CFX_PtrArray* ParseTopExpression(); 19 CFX_PtrArray* ParseTopExpression();
18 CXFA_FMExpression* ParseFunction(); 20 CXFA_FMExpression* ParseFunction();
19 CXFA_FMExpression* ParseExpression(); 21 CXFA_FMExpression* ParseExpression();
20 CXFA_FMExpression* ParseVarExpression(); 22 CXFA_FMExpression* ParseVarExpression();
21 CXFA_FMExpression* ParseExpExpression(); 23 CXFA_FMExpression* ParseExpExpression();
22 CXFA_FMExpression* ParseBlockExpression(); 24 CXFA_FMExpression* ParseBlockExpression();
(...skipping 10 matching lines...) Expand all
33 CXFA_FMSimpleExpression* ParseEqualityExpression(); 35 CXFA_FMSimpleExpression* ParseEqualityExpression();
34 CXFA_FMSimpleExpression* ParseRelationalExpression(); 36 CXFA_FMSimpleExpression* ParseRelationalExpression();
35 CXFA_FMSimpleExpression* ParseAddtiveExpression(); 37 CXFA_FMSimpleExpression* ParseAddtiveExpression();
36 CXFA_FMSimpleExpression* ParseMultiplicativeExpression(); 38 CXFA_FMSimpleExpression* ParseMultiplicativeExpression();
37 CXFA_FMSimpleExpression* ParseUnaryExpression(); 39 CXFA_FMSimpleExpression* ParseUnaryExpression();
38 CXFA_FMSimpleExpression* ParsePrimaryExpression(); 40 CXFA_FMSimpleExpression* ParsePrimaryExpression();
39 CXFA_FMSimpleExpression* ParsePostExpression(CXFA_FMSimpleExpression* e); 41 CXFA_FMSimpleExpression* ParsePostExpression(CXFA_FMSimpleExpression* e);
40 CXFA_FMSimpleExpression* ParseIndexExpression(); 42 CXFA_FMSimpleExpression* ParseIndexExpression();
41 43
42 private: 44 private:
43 const FX_WCHAR* m_pScript; 45 std::unique_ptr<CXFA_FMLexer> m_lexer;
Tom Sepez 2016/02/18 00:39:14 IWYU for CXFA_FMLexer?
Oliver Chang 2016/02/18 00:49:02 Done.
44 FX_STRSIZE m_uLength;
45 CXFA_FMLexer* m_lexer;
46 CXFA_FMToken* m_pToken; 46 CXFA_FMToken* m_pToken;
47 CXFA_FMErrorInfo* m_pErrorInfo; 47 CXFA_FMErrorInfo* m_pErrorInfo;
48 }; 48 };
49
49 #endif 50 #endif
OLDNEW
« no previous file with comments | « no previous file | xfa/src/fxfa/src/fm2js/xfa_fmparse.cpp » ('j') | xfa/src/fxfa/src/fm2js/xfa_fmparse.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698