1 /*============================================================================
2 CMake - Cross Platform Makefile Generator
3 Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
5 Distributed under the OSI-approved BSD License (the "License");
6 see accompanying file Copyright.txt for details.
8 This software is distributed WITHOUT ANY WARRANTY; without even the
9 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 See the License for more information.
11 ============================================================================*/
12 #ifndef cmExprParserHelper_h
13 #define cmExprParserHelper_h
15 #include "cmStandardIncludes.h"
17 #define YYSTYPE cmExprParserHelper::ParserType
18 #define YYSTYPE_IS_DECLARED
19 #define YY_EXTRA_TYPE cmExprParserHelper*
20 #define YY_DECL int cmExpr_yylex(YYSTYPE* yylvalp, yyscan_t yyscanner)
22 /** \class cmExprParserHelper
23 * \brief Helper class for parsing java source files
25 * Finds dependencies for java file and list of outputs
30 class cmExprParserHelper
38 ~cmExprParserHelper();
40 int ParseString(const char* str, int verb);
42 int LexInput(char* buf, int maxlen);
43 void Error(const char* str);
45 void SetResult(int value);
47 int GetResult() { return this->Result; }
49 const char* GetError() { return this->ErrorString.c_str(); }
52 cmStdString::size_type InputBufferPos;
53 cmStdString InputBuffer;
54 std::vector<char> OutputBuffer;
58 void Print(const char* place, const char* str);
65 std::string ErrorString;