1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmExprParserHelper.h,v $
6 Date: $Date: 2006-03-15 16:02:01 $
7 Version: $Revision: 1.2 $
9 Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
10 See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notices for more information.
16 =========================================================================*/
17 #ifndef cmExprParserHelper_h
18 #define cmExprParserHelper_h
20 #include "cmStandardIncludes.h"
22 #define YYSTYPE cmExprParserHelper::ParserType
23 #define YYSTYPE_IS_DECLARED
24 #define YY_EXTRA_TYPE cmExprParserHelper*
25 #define YY_DECL int cmExpr_yylex(YYSTYPE* yylvalp, yyscan_t yyscanner)
27 /** \class cmExprParserHelper
28 * \brief Helper class for parsing java source files
30 * Finds dependencies for java file and list of outputs
35 class cmExprParserHelper
43 ~cmExprParserHelper();
45 int ParseString(const char* str
, int verb
);
47 int LexInput(char* buf
, int maxlen
);
48 void Error(const char* str
);
50 void SetResult(int value
);
52 int GetResult() { return this->Result
; }
54 void SetLineFile(long line
, const char* file
);
56 const char* GetError() { return this->ErrorString
.c_str(); }
59 cmStdString::size_type InputBufferPos
;
60 cmStdString InputBuffer
;
61 std::vector
<char> OutputBuffer
;
66 void Print(const char* place
, const char* str
);
73 std::string ErrorString
;