scuffed-code/icu4c/source/tools/genrb/read.h

52 lines
1.5 KiB
C
Raw Normal View History

1999-08-16 21:50:52 +00:00
/*
*******************************************************************************
*
* Copyright (C) 1998-2003, International Business Machines
* 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.
2002-04-02 02:55:31 +00:00
* 5/10/01 Ram removed ustdio dependency
1999-08-16 21:50:52 +00:00
*******************************************************************************
*/
#ifndef READ_H
#define READ_H 1
#include "unicode/utypes.h"
1999-08-16 21:50:52 +00:00
#include "ustr.h"
#include "ucbuf.h"
1999-08-16 21:50:52 +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
{
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
};
UChar32 unescape(UCHARBUF *buf, UErrorCode *status);
void resetLineNumber(void);
enum ETokenType getNextToken(UCHARBUF *buf,
2002-04-02 02:55:31 +00:00
struct UString *token,
uint32_t *linenumber, /* out: linenumber of token */
struct UString *comment,
2002-04-02 02:55:31 +00:00
UErrorCode *status);
1999-08-16 21:50:52 +00:00
#endif