Subversion Repositories filter_foundry

Rev

Rev 8 | Rev 18 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8 Rev 15
Line 25... Line 25...
25
#ifndef false
25
#ifndef false
26
#define false 0
26
#define false 0
27
#define true 1
27
#define true 1
28
#endif
28
#endif
29
 
29
 
-
 
30
#include "node.h"
-
 
31
#include "y.tab.h"
-
 
32
 
30
//#ifdef MAC_ENV
33
//#ifdef MAC_ENV
31
int yyparse(void);
34
int yyparse(void);
32
int yylex(void); // hack. correct prototype is buried in lex output
35
int yylex(void); // hack. correct prototype is buried in lex output
33
//#endif
36
//#endif
34
 
-
 
35
#include "node.h"
-
 
36
#include "y.tab.h"
-
 
37
 
-
 
38
void yyerror(char*);
37
void yyerror(char*);
-
 
38
int pushflag(int x);
-
 
39
struct node *parseexpr(char *s);
39
 
40
 
40
#define DPARSE 
41
#define DPARSE 
41
 
42
 
42
struct node *parsetree;
43
struct node *parsetree;
43
char *errstr;
44
char *errstr;
44
 
45
 
45
enum{ PARENSTACK = 100 };
46
enum{ PARENSTACK = 100 };
46
 
47
 
47
int inarglist[PARENSTACK],arglistptr; // keep track of whether a comma is an function argument separator, or operator
48
int inarglist[PARENSTACK],arglistptr; // keep track of whether a comma is an function argument separator, or operator
48
 
49
 
49
int pushflag(int x);
-
 
50
 
-
 
51
int pushflag(int x){
50
int pushflag(int x){
52
	if(arglistptr < (PARENSTACK-1))
51
	if(arglistptr < (PARENSTACK-1))
53
		inarglist[++arglistptr] = x;
52
		inarglist[++arglistptr] = x;
54
	else{
53
	else{
55
		yyerror("too many nested parentheses or function calls");
54
		yyerror("too many nested parentheses or function calls");