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
|
|
|
|
|
|
|
/* The types of tokens which may be returned by getNextToken. */
|
|
|
|
enum ETokenType
|
|
|
|
{
|
|
|
|
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 */
|
2000-05-18 21:25:51 +00:00
|
|
|
tok_colon, /* A colon */
|
2000-05-15 18:39:17 +00:00
|
|
|
tok_start_string, /* :String */
|
|
|
|
tok_start_binary, /* :Binary */
|
|
|
|
tok_start_table, /* :Table */
|
|
|
|
tok_start_int, /* :Integer */
|
|
|
|
tok_start_array, /* :Array */
|
|
|
|
tok_start_intvector, /* :IntVector */
|
|
|
|
tok_start_reserved, /* :Reserved - treat like a string */
|
2001-03-21 23:22:16 +00:00
|
|
|
|
1999-08-16 21:50:52 +00:00
|
|
|
tok_EOF, /* End of the file has been reached successfully */
|
|
|
|
tok_error, /* An error, such an unterminated quoted string */
|
2000-05-18 21:25:51 +00:00
|
|
|
tok_token_type_count = 12 /* Number of "real" token types */
|
1999-08-16 21:50:52 +00:00
|
|
|
};
|
|
|
|
|
2001-05-25 00:16:28 +00:00
|
|
|
UChar32 unescape(UCHARBUF* buf, UErrorCode *status);
|
2001-05-10 16:54:09 +00:00
|
|
|
enum ETokenType getNextToken(UCHARBUF* buf,
|
1999-08-16 21:50:52 +00:00
|
|
|
struct UString *token,
|
|
|
|
UErrorCode *status);
|
|
|
|
|
|
|
|
#endif
|