version 1.1, 1999/12/09 22:44:56 |
version 1.3, 2000/01/17 19:55:56 |
|
|
/* -*- mode: C; coding: euc-japan -*- */ |
/* -*- mode: C -*- */ |
/* $OpenXM$ */ |
/* $OpenXM: OpenXM/src/ox_toolkit/parse.h,v 1.2 1999/12/22 11:26:37 ohara Exp $ */ |
|
|
#ifndef _PARSE_H_ |
#ifndef _PARSE_H_ |
|
|
|
|
|
|
#define _PARSE_H_ |
#define _PARSE_H_ |
|
|
/* トークンの定義 */ |
/* Remarks: a token, which is less than 256, means a one character token. */ |
/* 256 より小さいものは、一文字だけのトークンである */ |
|
|
|
#define T_INTEGER 257 |
/* The followings are definitions of some tokens. */ |
|
#define T_DIGIT 257 |
#define T_STRING 258 |
#define T_STRING 258 |
#define T_MAGIC 2048 |
#define T_MAGIC 2048 |
#define TOKEN(x) (T_MAGIC + (x)) |
#define TOKEN(x) (T_MAGIC + (x)) |
#define SM SM_popCMO |
#define SM SM_popCMO |
|
|
/* トークンの種類を判定するためのマクロ */ |
/* Macros for distinction of kinds of tokens. */ |
#define MIN_T_CMO TOKEN(0) |
#define MIN_T_CMO TOKEN(0) |
#define MAX_T_CMO TOKEN(256) |
#define MAX_T_CMO TOKEN(256) |
#define MIN_T_OX TOKEN(512) |
#define MIN_T_OX TOKEN(512) |
|
|
#define IS_OX 3 |
#define IS_OX 3 |
|
|
#define PFLAG_ADDREV 1 |
#define PFLAG_ADDREV 1 |
int setflag_parse(int flag); |
|
|
|
|
int setflag_parse(int flag); |
cmo *parse(); |
cmo *parse(); |
|
int init_parser(char *s); |
int setgetc(int (*foo)()); |
|
int resetgetc(); |
|
int mygetc(); |
|
int setmode_mygetc(char *s, int len); |
|
|
|
typedef struct { |
typedef struct { |
char *key; |
char *key; |