00001 /* File: token_defs_xsb.h 00002 ** Author(s): Kostis F. Sagonas, Jiyang Xu 00003 ** Contact: xsb-contact@cs.sunysb.edu 00004 ** 00005 ** Copyright (C) The Research Foundation of SUNY, 1986, 1993-1999 00006 ** Copyright (C) ECRC, Germany, 1990 00007 ** 00008 ** XSB is free software; you can redistribute it and/or modify it under the 00009 ** terms of the GNU Library General Public License as published by the Free 00010 ** Software Foundation; either version 2 of the License, or (at your option) 00011 ** any later version. 00012 ** 00013 ** XSB is distributed in the hope that it will be useful, but WITHOUT ANY 00014 ** WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 00015 ** FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for 00016 ** more details. 00017 ** 00018 ** You should have received a copy of the GNU Library General Public License 00019 ** along with XSB; if not, write to the Free Software Foundation, 00020 ** Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00021 ** 00022 ** $Id: token_defs_xsb.h,v 1.4 2005/12/15 16:39:52 dwarren Exp $ 00023 ** 00024 */ 00025 00026 00027 00028 #define TK_ERROR -1 00029 #define TK_PUNC 0 /* punctuation , ; ( ) [ ] ... */ 00030 #define TK_VARFUNC 1 /* type is a variable(... HiLog type */ 00031 #define TK_VAR 2 /* type is a variable */ 00032 #define TK_FUNC 3 /* type is atom( */ 00033 #define TK_INT 4 /* type is an integer number */ 00034 #define TK_ATOM 5 /* type is an atom */ 00035 #define TK_EOC 6 /* END of clause but not of file */ 00036 #define TK_VVAR 7 /* underscore '_' */ 00037 #define TK_VVARFUNC 8 /* type is underscore _(... HiLog type */ 00038 #define TK_REAL 9 /* type is a real number */ 00039 #define TK_EOF 10 /* END of file, not end of clause */ 00040 #define TK_STR 11 /* type is a char string */ 00041 #define TK_LIST 12 /* type is a char string */ 00042 #define TK_HPUNC 13 /* punctuation ) followed by a ( in HiLog terms */ 00043 #define TK_INTFUNC 14 /* type is an integer number functor */ 00044 #define TK_REALFUNC 15 /* type is a real number functor */ 00045 00046 00047 /* The following are for printing purposes only (writeq) */ 00048 #define TK_INT_0 16 00049 #define TK_FLOAT_0 17 00050 #define TK_PREOP 18 00051 #define TK_INOP 19 00052 #define TK_POSTOP 20 00053 #define TK_QATOM 21 /* atom, quoted if necessary */ 00054 #define TK_QSTR 22 /* double-quoted string */ 00055 #define TK_TERML 23 /* term, for write_canonical lettervar */ 00056 #define TK_TERM 24 /* term, for write_canonical */ 00057 #define TK_AQATOM 25 /* atom, ALWAYS quoted */ 00058 00059 #define DIGIT 0 /* 0 .. 9 */ 00060 #define BREAK 1 /* _ */ 00061 #define UPPER 2 /* A .. Z */ 00062 #define LOWER 3 /* a .. z */ 00063 #define SIGN 4 /* -/+*<=>#@$\^&~`:.? */ 00064 #define NOBLE 5 /* !; (don't form compounds) */ 00065 #define PUNCT 6 /* (),[]|{}% */ 00066 #define ATMQT 7 /* ' (atom quote) */ 00067 #define LISQT 8 /* " (list quote) */ 00068 #define STRQT 9 /* $ (string quote), not used, now $ is SIGN */ 00069 #define CHRQT 10 /* ` (character quote, maybe), not used, now ` is SIGN */ 00070 #define TILDE 11 /* ~ (like character quote but buggy), not used, now SIGN */ 00071 #define SPACE 12 /* layout and control chars */ 00072 #define EOLN 13 /* line terminators ^J ^L */ 00073 #define REALO 14 /* floating point number */ 00074 #define EOFCH 15 /* end of file */ 00075 #define ALPHA DIGIT /* any of digit, break, upper, lower */ 00076 #define BEGIN BREAK /* atom left-paren pair */ 00077 #define ENDCL EOLN /* end of clause token */ 00078 #define RREAL 16 /* radix number(real) - overflowed */ 00079 #define RDIGIT 17 /* radix number(int) */