1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmListFileLexer.h,v $
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
;
43 typedef struct cmListFileLexer_s cmListFileLexer
;
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
*);