/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1989-2012 AT&T Intellectual Property *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
* Florham Park NJ *
* *
* Glenn Fowler <gsf@research.att.com> *
* *
***********************************************************************/
#pragma prototyped
/*
* Glenn Fowler
* AT&T Research
*
* expression library definitions
*/
#ifndef _EXPR_H
#define _EXPR_H
#include <ast.h>
#if _BLD_expr && defined(__EXPORT__)
#define extern __EXPORT__
#endif
#if !_BLD_expr && defined(__IMPORT__)
#define extern extern __IMPORT__
#endif
/*
* bison -pPREFIX misses YYSTYPE
*/
#else
#include <exparse.h>
#endif
#endif
#undef extern
#include <cdt.h>
#include <vmalloc.h>
/*
* flags
*/
#define EXID(n,l,i,t,f) {{0},(l),(i),(t),(f),0,{0},0,n}
/*
* arg 0 is the return value type
*/
#define F 01 /* FLOATING */
#define I 02 /* INTEGER */
#define S 03 /* STRING */
#define A(n,t) ((t)<<((n)*2)) /* function arg n is type t */
#define N(t) ((t)>>=2) /* shift for next arg */
typedef int Exshort_t;
#else
typedef short Exshort_t;
#endif
{
char* pointer;
} Exlocal_t;
{
} Exid_t;
{
};
{
} Exbuf_t;
union Exdata_u
{
struct
{
struct
{
struct
{
struct
{
#ifdef _EX_DATA_PRIVATE_
#endif
};
{
union
{
#ifdef _EX_NODE_PRIVATE_
#endif
};
{
/* unknown cast function */
/* type conversion function */
/* get value function */
/* reference value function */
/* set value function */
};
{
#ifdef _EX_PROG_PRIVATE_
#endif
};
{
/* program generator function */
};
{
#ifdef _EX_CC_PRIVATE_
#endif
};
#if _BLD_expr && defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern void exerror(const char*, ...);
extern char* exnospace(void);
extern void exstatement(Expr_t*);
extern char* extype(int);
#undef extern
#endif