1 // Copyright (C) 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
4 *******************************************************************************
6 * Copyright (C) 1998-2011, International Business Machines
7 * Corporation and others. All Rights Reserved.
9 *******************************************************************************
13 * Modification History:
15 * Date Name Description
16 * 05/26/99 stephen Creation.
17 * 5/10/01 Ram removed ustdio dependency
18 *******************************************************************************
24 #include "unicode/utypes.h"
28 /* The types of tokens which may be returned by getNextToken.
29 NOTE: Keep these in sync with tokenNames in parse.c */
32 TOK_STRING, /* A string token, such as "MonthNames" */
33 TOK_OPEN_BRACE, /* An opening brace character */
34 TOK_CLOSE_BRACE, /* A closing brace character */
35 TOK_COMMA, /* A comma */
36 TOK_COLON, /* A colon */
38 TOK_EOF, /* End of the file has been reached successfully */
39 TOK_ERROR, /* An error, such an unterminated quoted string */
40 TOK_TOKEN_COUNT /* Number of "real" token types */
43 U_CFUNC UChar32 unescape(UCHARBUF *buf, UErrorCode *status);
45 U_CFUNC void resetLineNumber(void);
47 U_CFUNC enum ETokenType
48 getNextToken(UCHARBUF *buf,
49 struct UString *token,
50 uint32_t *linenumber, /* out: linenumber of token */
51 struct UString *comment,