<commit_before>/* $Id: types.h,v 1.39 2012/03/06 06:09:30 mit-sato Exp $ */

#ifndef __TYPES__
#define __TYPES__

#include <stdio.h>
#include <stdlib.h>
#include <wchar.h>
#include <setjmp.h>
#include <sys/types.h>
#include <pcl.h>
#include <gmp.h>
#include "cell.h"
#include "hash.h"
#include "array.h"
#include "bulk.h"
#include "binbulk.h"
#include "t_gc.h"

#define    BOOL			0	/* bool */
#define    SYMBOL  		1	/* symbol */
#define	   REF			2	/* reference (e.g. $XX) */
#define    LIST	  		3	/* list (e.g. (...)) */
#define    INTEGER  		4	/* big integer */
#define    REAL	  		5	/* 64bit real */
#define    STRING		6	/* string (e.g. "...") */
#define    SCRIPT		7	/* script is some statements */
#define    STATEMENT		8	/* statement (e.g. ...;) */
#define    BLOCK		9	/* block (e.g. {...} */
#define    EVAL	  		10	/* eval (e.g. [...] */
#define    NATIVE		11	/* C native code (e.g. <NATIVE>) */
#define    OBJECT		12	/* a object */
#define    EXCEPTION		13	/* throwable object */
#define    CLOSURE		14	/* closure */
#define    FUNC	  		15	/* function object */
#define	   CONTROL		16	/* control object (e.g. return, break, or continue) */
#define    CONTAINER		17	/* C object container */
#define    GETMACRO		18	/* GET Macro */
#define    ALIAS		19	/* variable alias */
#define    RQUOTE		20	/* reguler expresion string (e.g. '...') */
#define	   INITMACRO		21	/* INIT Macro */
#define	   BIND			22	/* bind var list (e.g. | ... |) */
#define	   DICT			23	/* dictionary (as primitive hash) */
#define	   VECTOR		24	/* vector (as primitive array) */
#define	   COROUTINE		25	/* coroutine */
#define	   BULK			26	/* bulk data store */
#define    __TYPE_LAST__	27

#define	   FALSE                0	/* BOOL value, FALSE */
#define	   TRUE                 1	/* BOOL value, TRUE */

#define S_NIL	L"nil"
#define S_T	L"t"

#define TAG_MASK		(0x000000ff)
#define GET_TAG(p)		((p==NULL) ? -1 : (TAG_MASK & (p->tag)))
#define IS_LIST_NULL(l)		((l==NULL) ? 1 : ((NULL==l->u.list.item)&&(NULL==l->u.list.nextp)))
#define IS_NIL(x)		((GET_TAG(x)==BOOL) ? (x->u.bool.value==FALSE) : 0)

#define TAG_NAMED_MASK		(0x00008000)
#define TAG_SWITCH_MASK		(0x00004000)
#define IS_NAMED_SYM(p)		((p==NULL) ? 0 : (TAG_NAMED_MASK & (p->tag)))
#define IS_SWITCH_SYM(p)	((p==NULL) ? 0 : (TAG_SWITCH_MASK & (p->tag)))

#define SET_SCRIPT_ID(p,i)	(p->tag|=((i<<16)&0xffff0000))
#define GET_SCRIPT_ID(p)	(int)((p->tag&0xffff0000)>>16)

#define TAG_LAZY_MASK		(0x00002000)
#define SET_LAZY(p)		(p->tag|=TAG_LAZY_MASK)
#define CLEAR_LAZY(p)		(p->tag&=(~TAG_LAZY_MASK))
#define IS_LAZY(p)		(p->tag&TAG_LAZY_MASK)

#define TAG_NOPRINTABLE		(0x00000200)
#define SET_NOPRINTABLE(p)	(p->tag|=TAG_NOPRINTABLE)
#define IS_NOPRINTABLE(p)	(p->tag&TAG_NOPRINTABLE)
<commit_msg>Change boolean literal expression: true was change t to <t> and false was change nil to <nil>.<commit_after>/* $Id: types.h,v 1.39 2012/03/06 06:09:30 mit-sato Exp $ */

#ifndef __TYPES__
#define __TYPES__

#include <stdio.h>
#include <stdlib.h>
#include <wchar.h>
#include <setjmp.h>
#include <sys/types.h>
#include <pcl.h>
#include <gmp.h>
#include "cell.h"
#include "hash.h"
#include "array.h"
#include "bulk.h"
#include "binbulk.h"
#include "t_gc.h"

#define    BOOL			0	/* bool */
#define    SYMBOL  		1	/* symbol */
#define	   REF			2	/* reference (e.g. $XX) */
#define    LIST	  		3	/* list (e.g. (...)) */
#define    INTEGER  		4	/* big integer */
#define    REAL	  		5	/* 64bit real */
#define    STRING		6	/* string (e.g. "...") */
#define    SCRIPT		7	/* script is some statements */
#define    STATEMENT		8	/* statement (e.g. ...;) */
#define    BLOCK		9	/* block (e.g. {...} */
#define    EVAL	  		10	/* eval (e.g. [...] */
#define    NATIVE		11	/* C native code (e.g. <NATIVE>) */
#define    OBJECT		12	/* a object */
#define    EXCEPTION		13	/* throwable object */
#define    CLOSURE		14	/* closure */
#define    FUNC	  		15	/* function object */
#define	   CONTROL		16	/* control object (e.g. return, break, or continue) */
#define    CONTAINER		17	/* C object container */
#define    GETMACRO		18	/* GET Macro */
#define    ALIAS		19	/* variable alias */
#define    RQUOTE		20	/* reguler expresion string (e.g. '...') */
#define	   INITMACRO		21	/* INIT Macro */
#define	   BIND			22	/* bind var list (e.g. | ... |) */
#define	   DICT			23	/* dictionary (as primitive hash) */
#define	   VECTOR		24	/* vector (as primitive array) */
#define	   COROUTINE		25	/* coroutine */
#define	   BULK			26	/* bulk data store */
#define    __TYPE_LAST__	27

#define	   FALSE                0	/* BOOL value, FALSE */
#define	   TRUE                 1	/* BOOL value, TRUE */

#define S_NIL	L"<nil>"
#define S_T	L"<t>"

#define TAG_MASK		(0x000000ff)
#define GET_TAG(p)		((p==NULL) ? -1 : (TAG_MASK & (p->tag)))
#define IS_LIST_NULL(l)		((l==NULL) ? 1 : ((NULL==l->u.list.item)&&(NULL==l->u.list.nextp)))
#define IS_NIL(x)		((GET_TAG(x)==BOOL) ? (x->u.bool.value==FALSE) : 0)

#define TAG_NAMED_MASK		(0x00008000)
#define TAG_SWITCH_MASK		(0x00004000)
#define IS_NAMED_SYM(p)		((p==NULL) ? 0 : (TAG_NAMED_MASK & (p->tag)))
#define IS_SWITCH_SYM(p)	((p==NULL) ? 0 : (TAG_SWITCH_MASK & (p->tag)))

#define SET_SCRIPT_ID(p,i)	(p->tag|=((i<<16)&0xffff0000))
#define GET_SCRIPT_ID(p)	(int)((p->tag&0xffff0000)>>16)

#define TAG_LAZY_MASK		(0x00002000)
#define SET_LAZY(p)		(p->tag|=TAG_LAZY_MASK)
#define CLEAR_LAZY(p)		(p->tag&=(~TAG_LAZY_MASK))
#define IS_LAZY(p)		(p->tag&TAG_LAZY_MASK)

#define TAG_NOPRINTABLE		(0x00000200)
#define SET_NOPRINTABLE(p)	(p->tag|=TAG_NOPRINTABLE)
#define IS_NOPRINTABLE(p)	(p->tag&TAG_NOPRINTABLE)

{'fraction_non_alphanumeric': 0.18367713004484304, 'fraction_numerical': 0.0462780269058296, 'mean_word_length': 3.0, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 53, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2661834', 'n_tokens_mistral': 2638, 'n_tokens_neox': 2419, 'n_words': 566}