1999-08-16 21:50:52 +00:00
|
|
|
/*
|
|
|
|
*******************************************************************************
|
1999-12-13 22:28:37 +00:00
|
|
|
*
|
2001-03-21 23:22:16 +00:00
|
|
|
* Copyright (C) 1998-2000, International Business Machines
|
1999-12-13 22:28:37 +00:00
|
|
|
* Corporation and others. All Rights Reserved.
|
|
|
|
*
|
1999-08-16 21:50:52 +00:00
|
|
|
*******************************************************************************
|
|
|
|
*
|
|
|
|
* File read.h
|
|
|
|
*
|
|
|
|
* Modification History:
|
|
|
|
*
|
|
|
|
* Date Name Description
|
|
|
|
* 05/26/99 stephen Creation.
|
2001-05-10 16:54:09 +00:00
|
|
|
* 5/10/01 Ram removed ustdio dependency
|
1999-08-16 21:50:52 +00:00
|
|
|
*******************************************************************************
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef READ_H
|
|
|
|
#define READ_H 1
|
|
|
|
|
1999-12-28 23:57:50 +00:00
|
|
|
#include "unicode/utypes.h"
|
1999-08-16 21:50:52 +00:00
|
|
|
#include "ustr.h"
|
2001-05-10 16:54:09 +00:00
|
|
|
#include "ucbuf.h"
|
1999-08-16 21:50:52 +00:00
|
|
|
|
2001-07-11 20:31:32 +00:00
|
|
|
/* The types of tokens which may be returned by getNextToken.
|
|
|
|
NOTE: Keep these in sync with tokenNames in parse.c */
|
1999-08-16 21:50:52 +00:00
|
|
|
enum ETokenType
|
|
|
|
{
|
2001-07-11 20:31:32 +00:00
|
|
|
TOK_STRING, /* A string token, such as "MonthNames" */
|
|
|
|
TOK_OPEN_BRACE, /* An opening brace character */
|
|
|
|
TOK_CLOSE_BRACE, /* A closing brace character */
|
|
|
|
TOK_COMMA, /* A comma */
|
|
|
|
TOK_COLON, /* A colon */
|
|
|
|
|
|
|
|
TOK_EOF, /* End of the file has been reached successfully */
|
|
|
|
TOK_ERROR, /* An error, such an unterminated quoted string */
|
|
|
|
TOK_TOKEN_COUNT /* Number of "real" token types */
|
1999-08-16 21:50:52 +00:00
|
|
|
};
|
|
|
|
|
2001-07-11 20:31:32 +00:00
|
|
|
UChar32 unescape(UCHARBUF *buf, UErrorCode *status);
|
|
|
|
|
|
|
|
void resetLineNumber(void);
|
|
|
|
|
|
|
|
enum ETokenType getNextToken(UCHARBUF *buf,
|
1999-08-16 21:50:52 +00:00
|
|
|
struct UString *token,
|
2001-07-11 20:31:32 +00:00
|
|
|
uint32_t *linenumber, /* out: linenumber of token */
|
1999-08-16 21:50:52 +00:00
|
|
|
UErrorCode *status);
|
|
|
|
|
|
|
|
#endif
|