evaldefs.h
1#ifndef EVALDEFS_H
2#define EVALDEFS_H
3
4#ifdef __cplusplus
5extern "C" {
6#endif
7
8/*****************************************************************
9
10 EVALDEFS.H
11
12 Interface declarations for EVALKERN.SYN
13 Copyright (c) 1996 - 1999 Parsifal Software. All Rights Reserved.
14
15 For further information about this program, contact
16 Parsifal Software
17 http://www.parsifalsoft.com
18 info@parsifalsoft.com
19 1-800-879-2755, Voice/Fax 1-508-358-2564
20 P.O. Box 219
21 Wayland, MA 01778
22
23*****************************************************************/
24
25
26/*****************************************************************
27
28Override AnaGram defaults
29
30*****************************************************************/
31
32/* override default definition of SYNTAX_ERROR */
33
34#define SYNTAX_ERROR diagnoseError(evalKernel_pcb.error_message)
35
36
37/*****************************************************************
38
39Define compile time constants
40
41*****************************************************************/
42
43/* define array sizes */
44#define CHAR_STACK_LENGTH 1000 /* Length of char stack */
45#define ARG_STACK_LENGTH 200 /* Length of arg stack */
46#define N_VARIABLES 100 /* Size of symbol table */
47
48
49/*****************************************************************
50
51Define data types
52
53*****************************************************************/
54
55/* Define an error record */
56typedef struct {
57 char *message; /* identifies error */
58 int line; /* location of error */
59 int column;
60} ErrorRecord;
61
62/* Define a symbol table entry */
63typedef struct {
64 char *name;
65 double value;
66} VariableDescriptor;
67
68
69/**********************************************************************
70
71Function prototypes
72
73**********************************************************************/
74
75void pushChar(int character);
76void pushArg(double value);
77double checkZero(double value);
78double *locateVariable(int nameLength);
79double callFunction(int nameLength, int argCount);
80void diagnoseError(char *message);
81int evaluateExpression(char *expressionString);
82
83/**********************************************************************
84
85Global data
86
87**********************************************************************/
88
89/* Support for error diagnostics */
90extern ErrorRecord errorRecord;
91
92/* Symbol table */
93extern VariableDescriptor variable[];
94extern int nVariables;
95
96#ifdef __cplusplus
97}
98#endif
99
100#endif

Generated using doxygen 1.14.0