Go to the documentation of this file.
2 #ifndef UGDK_UTIL_GDD_PARSERUTILITY_H_
3 #define UGDK_UTIL_GDD_PARSERUTILITY_H_
9 #define ASSERT_PARSE(test, print_err, err_value) \
16 #define VALID_NAME_BEGIN(token) ((isalnum((token))) || ((token) == '_'))
18 #define ERR_LOCATION(read) \
19 fprintf(stderr, "%s:%u: ", read.file_path().c_str(), (unsigned)(read.line()));
22 #define ERR_BAD_NAME_BEGIN(read) \
24 "%s:%u: Names and types must begin with an alphanumeric character or '_'.", \
25 read.file_path().c_str(), \
26 (unsigned)(read.line()))
29 #define VALID_NAME_TOKEN(token) ((isalnum((token))) || ((token) == '_'))
32 #define VALID_VALUE_TOKEN(token) ((isalnum((token))) || ((token) == '_') || ((token) == '.') || ((token) == '-'))
35 #define ERR_EMPTY_FIELD(read, type) \
37 "%s:%u: syntax error: %s name must not be empty.\n", \
38 read.file_path().c_str(), \
39 (unsigned)(read.line()), \