michael@0: /* michael@0: ******************************************************************************* michael@0: * michael@0: * Copyright (C) 1998-2011, International Business Machines michael@0: * Corporation and others. All Rights Reserved. michael@0: * michael@0: ******************************************************************************* michael@0: * michael@0: * File read.h michael@0: * michael@0: * Modification History: michael@0: * michael@0: * Date Name Description michael@0: * 05/26/99 stephen Creation. michael@0: * 5/10/01 Ram removed ustdio dependency michael@0: ******************************************************************************* michael@0: */ michael@0: michael@0: #ifndef READ_H michael@0: #define READ_H 1 michael@0: michael@0: #include "unicode/utypes.h" michael@0: #include "ustr.h" michael@0: #include "ucbuf.h" michael@0: michael@0: /* The types of tokens which may be returned by getNextToken. michael@0: NOTE: Keep these in sync with tokenNames in parse.c */ michael@0: enum ETokenType michael@0: { michael@0: TOK_STRING, /* A string token, such as "MonthNames" */ michael@0: TOK_OPEN_BRACE, /* An opening brace character */ michael@0: TOK_CLOSE_BRACE, /* A closing brace character */ michael@0: TOK_COMMA, /* A comma */ michael@0: TOK_COLON, /* A colon */ michael@0: michael@0: TOK_EOF, /* End of the file has been reached successfully */ michael@0: TOK_ERROR, /* An error, such an unterminated quoted string */ michael@0: TOK_TOKEN_COUNT /* Number of "real" token types */ michael@0: }; michael@0: michael@0: U_CFUNC UChar32 unescape(UCHARBUF *buf, UErrorCode *status); michael@0: michael@0: U_CFUNC void resetLineNumber(void); michael@0: michael@0: U_CFUNC enum ETokenType michael@0: getNextToken(UCHARBUF *buf, michael@0: struct UString *token, michael@0: uint32_t *linenumber, /* out: linenumber of token */ michael@0: struct UString *comment, michael@0: UErrorCode *status); michael@0: michael@0: #endif