[BACK]Return to parse.h CVS log [TXT][DIR] Up to [local] / OpenXM / src / ox_toolkit

Annotation of OpenXM/src/ox_toolkit/parse.h, Revision 1.3

1.3     ! ohara       1: /* -*- mode: C -*- */
        !             2: /* $OpenXM: OpenXM/src/ox_toolkit/parse.h,v 1.2 1999/12/22 11:26:37 ohara Exp $ */
1.1       ohara       3:
                      4: #ifndef _PARSE_H_
                      5:
                      6: #include "ox.h"
                      7:
                      8: #define _PARSE_H_
                      9:
1.3     ! ohara      10: /* Remarks: a token, which is less than 256, means a one character token. */
1.1       ohara      11:
1.3     ! ohara      12: /* The followings are definitions of some tokens. */
        !            13: #define T_DIGIT         257
1.1       ohara      14: #define T_STRING        258
                     15: #define T_MAGIC         2048
                     16: #define TOKEN(x)        (T_MAGIC + (x))
                     17: #define SM              SM_popCMO
                     18:
1.3     ! ohara      19: /* Macros for distinction of kinds of tokens. */
1.1       ohara      20: #define MIN_T_CMO     TOKEN(0)
                     21: #define MAX_T_CMO     TOKEN(256)
                     22: #define MIN_T_OX      TOKEN(512)
                     23: #define MAX_T_OX      TOKEN(600)
                     24:
                     25: #define IS_CMO   1
                     26: #define IS_SM    2
                     27: #define IS_OX    3
                     28:
                     29: #define PFLAG_ADDREV   1
1.3     ! ohara      30:
1.1       ohara      31: int setflag_parse(int flag);
                     32: cmo *parse();
1.2       ohara      33: int init_parser(char *s);
1.1       ohara      34:
                     35: typedef struct {
                     36:     char *key;
                     37:     int  tag;
                     38:     int  token;
                     39:     int  type;
                     40: } symbol;
                     41:
                     42: symbol* lookup_by_symbol(char *key);
                     43: symbol* lookup_by_token(int tok);
                     44: symbol* lookup_by_tag(int tag);
                     45: symbol* lookup(int i);
                     46:
                     47: #endif /* _PARSE_H_ */

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>