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 cmListFileLexer_h
13 #define cmListFileLexer_h
15 typedef enum cmListFileLexer_Type_e
17 cmListFileLexer_Token_None,
18 cmListFileLexer_Token_Space,
19 cmListFileLexer_Token_Newline,
20 cmListFileLexer_Token_Identifier,
21 cmListFileLexer_Token_ParenLeft,
22 cmListFileLexer_Token_ParenRight,
23 cmListFileLexer_Token_ArgumentUnquoted,
24 cmListFileLexer_Token_ArgumentQuoted,
25 cmListFileLexer_Token_BadCharacter,
26 cmListFileLexer_Token_BadString
27 } cmListFileLexer_Type;
29 typedef struct cmListFileLexer_Token_s cmListFileLexer_Token;
30 struct cmListFileLexer_Token_s
32 cmListFileLexer_Type type;
39 typedef struct cmListFileLexer_s cmListFileLexer;
46 cmListFileLexer* cmListFileLexer_New();
47 int cmListFileLexer_SetFileName(cmListFileLexer*, const char*);
48 int cmListFileLexer_SetString(cmListFileLexer*, const char*);
49 cmListFileLexer_Token* cmListFileLexer_Scan(cmListFileLexer*);
50 long cmListFileLexer_GetCurrentLine(cmListFileLexer*);
51 long cmListFileLexer_GetCurrentColumn(cmListFileLexer*);
52 const char* cmListFileLexer_GetTypeAsString(cmListFileLexer*,
53 cmListFileLexer_Type);
54 void cmListFileLexer_Delete(cmListFileLexer*);