Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
gml_scanner.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file gml_scanner.h
1
/* This software is distributed under the GNU Lesser General Public License */
2
//==========================================================================
3
//
4
// gml_scanner.h
5
//
6
//==========================================================================
7
// $Id: gml_scanner.h,v 1.11 2000/03/06 15:16:52 raitner Exp $
8
9
#ifndef GTL_GML_SCANNER_H
10
#define GTL_GML_SCANNER_H
11
12
#include <
GTL/GTL.h
>
13
14
#include <cstdio>
15
16
__GTL_BEGIN_NAMESPACE
17
18
/*
19
* start-size of buffers for reading strings. If too small it will be enlarged
20
* dynamically
21
*/
22
23
#define INITIAL_SIZE 1024
24
25
GTL_EXTERN
typedef
enum
{
26
GML_KEY
,
GML_INT
,
GML_DOUBLE
,
GML_STRING
,
GML_L_BRACKET
,
27
GML_R_BRACKET
,
GML_END
,
GML_LIST
,
GML_ERROR
28
}
GML_value
;
29
30
34
GTL_EXTERN
typedef
enum
{
35
GML_UNEXPECTED
,
GML_SYNTAX
,
GML_PREMATURE_EOF
,
GML_TOO_MANY_DIGITS
,
36
GML_OPEN_BRACKET
,
GML_TOO_MANY_BRACKETS
,
GML_OK
,
GML_FILE_NOT_FOUND
37
}
GML_error_value
;
38
39
52
struct
GTL_EXTERN
GML_error
{
77
GML_error_value
err_num
;
78
84
int
line
;
85
89
int
column
;
90
};
91
92
93
union
GTL_EXTERN
GML_tok_val
{
94
long
integer
;
95
double
floating
;
96
char
*
str
;
97
struct
GML_error
err
;
98
};
99
103
struct
GTL_EXTERN
GML_token
{
104
GML_value
kind
;
105
union
GML_tok_val
value
;
106
};
107
108
/*
109
* global variables
110
*/
111
112
GTL_EXTERN
extern
unsigned
int
GML_line
;
113
GTL_EXTERN
extern
unsigned
int
GML_column
;
114
115
/*
116
* if you are interested in the position where an error occured it is a good
117
* idea to set GML_line and GML_column back.
118
* This is what GML_init does.
119
*/
120
121
GTL_EXTERN
void
GML_init
();
122
123
/*
124
* returns the next token in file. If an error occured it will be stored in
125
* GML_token.
126
*/
127
128
GTL_EXTERN
struct
GML_token
GML_scanner
(FILE*);
129
130
GTL_EXTERN
extern
const
char
*
GML_table
[];
131
132
__GTL_END_NAMESPACE
133
134
#endif // GTL_GML_SCANNER_H
135
136
//--------------------------------------------------------------------------
137
// end of file
138
//--------------------------------------------------------------------------
JETSCAPE
blob
main
external_packages
gtl
include
GTL
gml_scanner.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:23
using
1.8.2 with
sPHENIX GitHub integration