KWSys Nightly Date Stamp
[cmake.git] / Source / cmListFileLexer.h
blob0ce82d3f1df0bbd473cc8e7df32bf520f5fd97da
1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmListFileLexer.h,v $
5 Language: C++
6 Date: $Date: 2004-08-31 22:39:42 $
7 Version: $Revision: 1.3 $
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 cmListFileLexer_h
18 #define cmListFileLexer_h
20 typedef enum cmListFileLexer_Type_e
22 cmListFileLexer_Token_None,
23 cmListFileLexer_Token_Newline,
24 cmListFileLexer_Token_Identifier,
25 cmListFileLexer_Token_ParenLeft,
26 cmListFileLexer_Token_ParenRight,
27 cmListFileLexer_Token_ArgumentUnquoted,
28 cmListFileLexer_Token_ArgumentQuoted,
29 cmListFileLexer_Token_BadCharacter,
30 cmListFileLexer_Token_BadString
31 } cmListFileLexer_Type;
33 typedef struct cmListFileLexer_Token_s cmListFileLexer_Token;
34 struct cmListFileLexer_Token_s
36 cmListFileLexer_Type type;
37 char* text;
38 int length;
39 int line;
40 int column;
43 typedef struct cmListFileLexer_s cmListFileLexer;
45 #ifdef __cplusplus
46 extern "C"
48 #endif
50 cmListFileLexer* cmListFileLexer_New();
51 int cmListFileLexer_SetFileName(cmListFileLexer*, const char*);
52 int cmListFileLexer_SetString(cmListFileLexer*, const char*);
53 cmListFileLexer_Token* cmListFileLexer_Scan(cmListFileLexer*);
54 long cmListFileLexer_GetCurrentLine(cmListFileLexer*);
55 long cmListFileLexer_GetCurrentColumn(cmListFileLexer*);
56 const char* cmListFileLexer_GetTypeAsString(cmListFileLexer*,
57 cmListFileLexer_Type);
58 void cmListFileLexer_Delete(cmListFileLexer*);
60 #ifdef __cplusplus
61 } /* extern "C" */
62 #endif
64 #endif