fixed build for clang
This commit is contained in:
@@ -65,9 +65,16 @@
|
|||||||
#define DOUBLEMARK 316
|
#define DOUBLEMARK 316
|
||||||
#define POINTSAT 317
|
#define POINTSAT 317
|
||||||
|
|
||||||
|
extern char* xmalloc(int size);
|
||||||
|
extern void Message(char *s, int l);
|
||||||
|
extern void set_up_momentum(int value,int token);
|
||||||
|
extern void automata_driver(int value);
|
||||||
|
extern char* copys(char *);
|
||||||
|
|
||||||
#line 5 "annotate.y"
|
#line 5 "annotate.y"
|
||||||
|
|
||||||
#include "macro.h"
|
#include "macro.h"
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "compatible.h"
|
#include "compatible.h"
|
||||||
#ifdef SYS5
|
#ifdef SYS5
|
||||||
@@ -146,8 +153,8 @@ typedef union {
|
|||||||
char AnnExTensionNumber[255]; /* to symbole right for the annotation */
|
char AnnExTensionNumber[255]; /* to symbole right for the annotation */
|
||||||
static int Recog_My_Token();
|
static int Recog_My_Token();
|
||||||
static int look_up_specialfunction();
|
static int look_up_specialfunction();
|
||||||
static unMYGETC();
|
static char unMYGETC(char c);
|
||||||
static MYGETC();
|
static char MYGETC();
|
||||||
static int map_assgn_op();
|
static int map_assgn_op();
|
||||||
|
|
||||||
#ifndef YYLTYPE
|
#ifndef YYLTYPE
|
||||||
@@ -623,6 +630,7 @@ while (0)
|
|||||||
#define YYERRCODE 256
|
#define YYERRCODE 256
|
||||||
|
|
||||||
#ifndef YYPURE
|
#ifndef YYPURE
|
||||||
|
int yylex_annotate();
|
||||||
#define YYLEX yylex_annotate()
|
#define YYLEX yylex_annotate()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -677,7 +685,7 @@ static int yydebug; /* nonzero means print parse trace */
|
|||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
int yyparse_annotate(void);
|
int yyparse_annotate(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
|
#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
|
||||||
#define __yy_bcopy(FROM,TO,COUNT) __builtin_memcpy(TO,FROM,COUNT)
|
#define __yy_bcopy(FROM,TO,COUNT) __builtin_memcpy(TO,FROM,COUNT)
|
||||||
#else /* not GNU C or C++ */
|
#else /* not GNU C or C++ */
|
||||||
@@ -2258,7 +2266,7 @@ char *p;
|
|||||||
register char *p2, *p1;
|
register char *p2, *p1;
|
||||||
//extern char *malloc();
|
//extern char *malloc();
|
||||||
|
|
||||||
newbuf = (char*)malloc((unsigned)(newlength+1));
|
newbuf = (char*)malloc(newlength+1);
|
||||||
#ifdef __SPF
|
#ifdef __SPF
|
||||||
addToCollection(__LINE__, __FILE__,newbuf, 0);
|
addToCollection(__LINE__, __FILE__,newbuf, 0);
|
||||||
#endif
|
#endif
|
||||||
@@ -2996,8 +3004,7 @@ look_up_annotate(st)
|
|||||||
return (PTR_HASH) pt;
|
return (PTR_HASH) pt;
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static char MYGETC()
|
||||||
MYGETC()
|
|
||||||
{
|
{
|
||||||
|
|
||||||
if (LENSTRINGTOPARSE <= PTTOSTRINGTOPARSE)
|
if (LENSTRINGTOPARSE <= PTTOSTRINGTOPARSE)
|
||||||
@@ -3013,9 +3020,7 @@ MYGETC()
|
|||||||
return STRINGTOPARSE[ PTTOSTRINGTOPARSE-1];
|
return STRINGTOPARSE[ PTTOSTRINGTOPARSE-1];
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static char unMYGETC(char c)
|
||||||
unMYGETC(c)
|
|
||||||
char c;
|
|
||||||
{
|
{
|
||||||
if (LENSTRINGTOPARSE <= PTTOSTRINGTOPARSE)
|
if (LENSTRINGTOPARSE <= PTTOSTRINGTOPARSE)
|
||||||
return EOF;
|
return EOF;
|
||||||
@@ -3086,10 +3091,10 @@ look_up_specialfunction(str)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
if (strcmp(specialfunction[i],"Dummy") == 0)
|
if (strcmp(specialfunction[i],"Dummy") == 0)
|
||||||
return NULL;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -71,5 +71,4 @@ typedef union {
|
|||||||
#define DOUBLEMARK 316
|
#define DOUBLEMARK 316
|
||||||
#define POINTSAT 317
|
#define POINTSAT 317
|
||||||
|
|
||||||
|
|
||||||
extern YYSTYPE yylval;
|
extern YYSTYPE yylval;
|
||||||
|
|||||||
@@ -16,6 +16,12 @@
|
|||||||
# include <alloca.h>
|
# include <alloca.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
extern char* xmalloc(int size);
|
||||||
|
extern void Message(char *s, int l);
|
||||||
|
extern void set_up_momentum(int value,int token);
|
||||||
|
extern void automata_driver(int value);
|
||||||
|
extern char* copys(char *);
|
||||||
|
|
||||||
#define ON 1
|
#define ON 1
|
||||||
#define OFF 0
|
#define OFF 0
|
||||||
#define OTHER 2
|
#define OTHER 2
|
||||||
@@ -182,8 +188,8 @@ extern POINTER newNode();
|
|||||||
char AnnExTensionNumber[255]; /* to symbole right for the annotation */
|
char AnnExTensionNumber[255]; /* to symbole right for the annotation */
|
||||||
static int Recog_My_Token();
|
static int Recog_My_Token();
|
||||||
static int look_up_specialfunction();
|
static int look_up_specialfunction();
|
||||||
static unMYGETC();
|
static char unMYGETC(char c);
|
||||||
static MYGETC();
|
static char MYGETC();
|
||||||
static int map_assgn_op();
|
static int map_assgn_op();
|
||||||
%}
|
%}
|
||||||
|
|
||||||
@@ -1114,7 +1120,7 @@ char *p;
|
|||||||
register char *p2, *p1;
|
register char *p2, *p1;
|
||||||
extern char *malloc();
|
extern char *malloc();
|
||||||
|
|
||||||
newbuf = malloc((unsigned)(newlength+1));
|
newbuf = malloc(newlength+1));
|
||||||
|
|
||||||
p2 = newbuf;
|
p2 = newbuf;
|
||||||
p1 = newbuf + newlength + 1;
|
p1 = newbuf + newlength + 1;
|
||||||
@@ -1844,8 +1850,7 @@ look_up(st)
|
|||||||
return (PTR_HASH) pt;
|
return (PTR_HASH) pt;
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static char MYGETC()
|
||||||
MYGETC()
|
|
||||||
{
|
{
|
||||||
|
|
||||||
if (LENSTRINGTOPARSE <= PTTOSTRINGTOPARSE)
|
if (LENSTRINGTOPARSE <= PTTOSTRINGTOPARSE)
|
||||||
@@ -1861,9 +1866,7 @@ MYGETC()
|
|||||||
return STRINGTOPARSE[ PTTOSTRINGTOPARSE-1];
|
return STRINGTOPARSE[ PTTOSTRINGTOPARSE-1];
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static char unMYGETC(char c)
|
||||||
unMYGETC(c)
|
|
||||||
char c;
|
|
||||||
{
|
{
|
||||||
if (LENSTRINGTOPARSE <= PTTOSTRINGTOPARSE)
|
if (LENSTRINGTOPARSE <= PTTOSTRINGTOPARSE)
|
||||||
return EOF;
|
return EOF;
|
||||||
@@ -1931,10 +1934,10 @@ look_up_specialfunction(str)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
if (strcmp(specialfunction[i],"Dummy") == 0)
|
if (strcmp(specialfunction[i],"Dummy") == 0)
|
||||||
return NULL;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -16,8 +16,15 @@
|
|||||||
#include "vextern.h"
|
#include "vextern.h"
|
||||||
#include "annotate.tab.h"
|
#include "annotate.tab.h"
|
||||||
|
|
||||||
|
extern void Message(char *s, int l);
|
||||||
|
|
||||||
void reset_semicoln_handler();
|
void reset_semicoln_handler();
|
||||||
void reset();
|
void reset();
|
||||||
|
int class_struct(int value);
|
||||||
|
int is_declare(int value);
|
||||||
|
int declare_symb(int value);
|
||||||
|
int block_like(int state);
|
||||||
|
int keep_original(int state);
|
||||||
|
|
||||||
int lastdecl_id; /* o if no main_type appeared */
|
int lastdecl_id; /* o if no main_type appeared */
|
||||||
int left_paren ;
|
int left_paren ;
|
||||||
@@ -484,8 +491,7 @@ int value ;
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class_struct(value)
|
int class_struct(int value)
|
||||||
register int value ;
|
|
||||||
{
|
{
|
||||||
switch (value) {
|
switch (value) {
|
||||||
case ENUM :
|
case ENUM :
|
||||||
@@ -496,8 +502,7 @@ register int value ;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
declare_symb(value)
|
int declare_symb(int value)
|
||||||
register int value ;
|
|
||||||
{
|
{
|
||||||
switch (value) {
|
switch (value) {
|
||||||
case TYPENAME :
|
case TYPENAME :
|
||||||
@@ -523,8 +528,7 @@ void reset()
|
|||||||
/* put_line_queue(line_pos_1,line_pos_fname); */
|
/* put_line_queue(line_pos_1,line_pos_fname); */
|
||||||
}
|
}
|
||||||
|
|
||||||
block_like(state)
|
int block_like(int state)
|
||||||
int state ;
|
|
||||||
{
|
{
|
||||||
|
|
||||||
switch( state) {
|
switch( state) {
|
||||||
@@ -541,9 +545,7 @@ int state ;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int is_declare(int value)
|
||||||
is_declare(value)
|
|
||||||
int value ;
|
|
||||||
{
|
{
|
||||||
switch (value) {
|
switch (value) {
|
||||||
case TYPENAME:
|
case TYPENAME:
|
||||||
@@ -594,8 +596,7 @@ void reset_semicoln_handler()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
keep_original(state)
|
int keep_original(int state)
|
||||||
int state;
|
|
||||||
{
|
{
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case ELSE_EXPECTED_STATE:
|
case ELSE_EXPECTED_STATE:
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ extern int PTTOSTRINGTOPARSE;
|
|||||||
extern PTR_BFND ANNOTATIONSCOPE;
|
extern PTR_BFND ANNOTATIONSCOPE;
|
||||||
extern PTR_TYPE global_int_annotation;
|
extern PTR_TYPE global_int_annotation;
|
||||||
extern char AnnExTensionNumber[];
|
extern char AnnExTensionNumber[];
|
||||||
|
extern int yyparse_annotate(void);
|
||||||
|
|
||||||
/* FORWARD DECLARATION */
|
/* FORWARD DECLARATION */
|
||||||
int Get_Scope_Of_Annotation();
|
int Get_Scope_Of_Annotation();
|
||||||
@@ -100,7 +101,7 @@ static char *Defined_Value_Str[MAX_ANNOTATION];
|
|||||||
static int Defined_Value_Value[MAX_ANNOTATION];
|
static int Defined_Value_Value[MAX_ANNOTATION];
|
||||||
|
|
||||||
/* Indicate if comment is an annotation */
|
/* Indicate if comment is an annotation */
|
||||||
Is_Annotation(str)
|
int Is_Annotation(str)
|
||||||
char *str;
|
char *str;
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -122,7 +123,7 @@ char *str;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Is_Annotation_Cont(str)
|
int Is_Annotation_Cont(str)
|
||||||
char *str;
|
char *str;
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -229,7 +230,7 @@ char *str;
|
|||||||
|
|
||||||
/* basically go thrue the program and parse annotation, and set
|
/* basically go thrue the program and parse annotation, and set
|
||||||
if they are defined */
|
if they are defined */
|
||||||
initAnnotation()
|
int initAnnotation()
|
||||||
{
|
{
|
||||||
PTR_CMNT cmnt;
|
PTR_CMNT cmnt;
|
||||||
PTR_BFND ptbif;
|
PTR_BFND ptbif;
|
||||||
|
|||||||
@@ -35,7 +35,9 @@ void errstr();
|
|||||||
|
|
||||||
PTR_HASH hash_table[hashMax];
|
PTR_HASH hash_table[hashMax];
|
||||||
|
|
||||||
|
#ifdef __SPF
|
||||||
|
extern void removeFromCollection(void *pointer);
|
||||||
|
#endif
|
||||||
/*
|
/*
|
||||||
* init_hash -- initialize the hash table
|
* init_hash -- initialize the hash table
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -37,6 +37,10 @@ extern char* Tool_Unparse_Type();
|
|||||||
#define MAXFIELDSYMB 10
|
#define MAXFIELDSYMB 10
|
||||||
#define MAXFIELDTYPE 10
|
#define MAXFIELDTYPE 10
|
||||||
|
|
||||||
|
#ifdef __SPF
|
||||||
|
extern void removeFromCollection(void *pointer);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
#ifdef __SPF_BUILT_IN_PARSER
|
||||||
static int Warning_count = 0;
|
static int Warning_count = 0;
|
||||||
//static PTR_FILE pointer_on_file_proj;
|
//static PTR_FILE pointer_on_file_proj;
|
||||||
@@ -73,6 +77,41 @@ char general_info[LAST_CODE][MAXFIELDSYMB];
|
|||||||
static struct bif_stack_level *current_level = NULL;*/
|
static struct bif_stack_level *current_level = NULL;*/
|
||||||
|
|
||||||
PTR_BFND getFunctionHeader();
|
PTR_BFND getFunctionHeader();
|
||||||
|
#ifdef __SPF_BUILT_IN_PARSER
|
||||||
|
|
||||||
|
#define xmalloc xmalloc_temp
|
||||||
|
#define make_a_malloc_stack make_a_malloc_stack_temp
|
||||||
|
#define mymalloc mymalloc_temp
|
||||||
|
#define isATypeNode isATypeNode_temp
|
||||||
|
#define isASymbNode isASymbNode_temp
|
||||||
|
#define isABifNode isABifNode_temp
|
||||||
|
#define isALoNode isALoNode_temp
|
||||||
|
#define hasTypeBaseType hasTypeBaseType_temp
|
||||||
|
#define isStructType isStructType_temp
|
||||||
|
#define isPointerType isPointerType_temp
|
||||||
|
#define isUnionType isUnionType_temp
|
||||||
|
#define isEnumType isEnumType_temp
|
||||||
|
#define hasTypeSymbol hasTypeSymbol_temp
|
||||||
|
#define isAtomicType isAtomicType_temp
|
||||||
|
#define hasNodeASymb hasNodeASymb_temp
|
||||||
|
#define isNodeAConst isNodeAConst_temp
|
||||||
|
#define isAStructDeclBif isAStructDeclBif_temp
|
||||||
|
#define isAUnionDeclBif isAUnionDeclBif_temp
|
||||||
|
#define isAEnumDeclBif isAEnumDeclBif_temp
|
||||||
|
#define isADeclBif isADeclBif_temp
|
||||||
|
#define isAControlEnd isAControlEnd_temp
|
||||||
|
#define Message Message_temp
|
||||||
|
#define Check_Lang_Fortran Check_Lang_Fortran_temp
|
||||||
|
#define filter filter_temp
|
||||||
|
#define allocateValueEvaluate allocateValueEvaluate_temp
|
||||||
|
#define addElementEvaluate addElementEvaluate_temp
|
||||||
|
#define getElementEvaluate getElementEvaluate_temp
|
||||||
|
#define resetPresetEvaluate resetPresetEvaluate_temp
|
||||||
|
#define evaluateExpression evaluateExpression_temp
|
||||||
|
#define patternMatchExpression patternMatchExpression_temp
|
||||||
|
#define Follow_Llnd Follow_Llnd_temp
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* *
|
* *
|
||||||
@@ -80,13 +119,21 @@ PTR_BFND getFunctionHeader();
|
|||||||
* *
|
* *
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
/***************************************************************************/
|
||||||
|
void Message(s, l)
|
||||||
|
char *s;
|
||||||
|
int l;
|
||||||
|
{
|
||||||
|
if (l != 0)
|
||||||
|
fprintf(stderr,"Warning : %s line %d\n",s, l);
|
||||||
|
else
|
||||||
|
fprintf(stderr,"Warning : %s\n",s);
|
||||||
|
Warning_count++;
|
||||||
|
}
|
||||||
|
|
||||||
/* Modified to return a pointer (64bit clean) (phb) */
|
/* Modified to return a pointer (64bit clean) (phb) */
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
char* xmalloc_temp(size)
|
|
||||||
#else
|
|
||||||
char* xmalloc(size)
|
char* xmalloc(size)
|
||||||
#endif
|
|
||||||
int size;
|
int size;
|
||||||
{
|
{
|
||||||
char *val;
|
char *val;
|
||||||
@@ -102,11 +149,7 @@ static ptstack_chaining Current_Allocated_Data = NULL;
|
|||||||
static ptstack_chaining First_STACK= NULL;
|
static ptstack_chaining First_STACK= NULL;
|
||||||
|
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
void make_a_malloc_stack_temp()
|
|
||||||
#else
|
|
||||||
void make_a_malloc_stack()
|
void make_a_malloc_stack()
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
ptstack_chaining pt;
|
ptstack_chaining pt;
|
||||||
|
|
||||||
@@ -133,11 +176,7 @@ void make_a_malloc_stack()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
char* mymalloc_temp(size)
|
|
||||||
#else
|
|
||||||
char* mymalloc(size)
|
char* mymalloc(size)
|
||||||
#endif
|
|
||||||
int size;
|
int size;
|
||||||
{
|
{
|
||||||
char *pt1;
|
char *pt1;
|
||||||
@@ -186,7 +225,6 @@ int size;
|
|||||||
* *
|
* *
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
#ifndef __SPF_BUILT_IN_PARSER
|
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
int isATypeNode(variant)
|
int isATypeNode(variant)
|
||||||
int variant;
|
int variant;
|
||||||
@@ -214,14 +252,9 @@ int variant;
|
|||||||
{
|
{
|
||||||
return (LLNODE == (int) node_code_kind[variant]);
|
return (LLNODE == (int) node_code_kind[variant]);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
int hasTypeBaseType_temp(variant)
|
|
||||||
#else
|
|
||||||
int hasTypeBaseType(variant)
|
int hasTypeBaseType(variant)
|
||||||
#endif
|
|
||||||
int variant;
|
int variant;
|
||||||
{
|
{
|
||||||
if (!isATypeNode(variant))
|
if (!isATypeNode(variant))
|
||||||
@@ -236,11 +269,7 @@ int variant;
|
|||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
int isStructType_temp(variant)
|
|
||||||
#else
|
|
||||||
int isStructType(variant)
|
int isStructType(variant)
|
||||||
#endif
|
|
||||||
int variant;
|
int variant;
|
||||||
{
|
{
|
||||||
if (!isATypeNode(variant))
|
if (!isATypeNode(variant))
|
||||||
@@ -255,11 +284,7 @@ int variant;
|
|||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
int isPointerType_temp(variant)
|
|
||||||
#else
|
|
||||||
int isPointerType(variant)
|
int isPointerType(variant)
|
||||||
#endif
|
|
||||||
int variant;
|
int variant;
|
||||||
{
|
{
|
||||||
if (!isATypeNode(variant))
|
if (!isATypeNode(variant))
|
||||||
@@ -275,11 +300,7 @@ int variant;
|
|||||||
|
|
||||||
|
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
int isUnionType_temp(variant)
|
|
||||||
#else
|
|
||||||
int isUnionType(variant)
|
int isUnionType(variant)
|
||||||
#endif
|
|
||||||
int variant;
|
int variant;
|
||||||
{
|
{
|
||||||
if (!isATypeNode(variant))
|
if (!isATypeNode(variant))
|
||||||
@@ -295,11 +316,7 @@ int variant;
|
|||||||
|
|
||||||
|
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
int isEnumType_temp(variant)
|
|
||||||
#else
|
|
||||||
int isEnumType(variant)
|
int isEnumType(variant)
|
||||||
#endif
|
|
||||||
int variant;
|
int variant;
|
||||||
{
|
{
|
||||||
if (!isATypeNode(variant))
|
if (!isATypeNode(variant))
|
||||||
@@ -315,11 +332,7 @@ int variant;
|
|||||||
|
|
||||||
|
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
int hasTypeSymbol_temp(variant)
|
|
||||||
#else
|
|
||||||
int hasTypeSymbol(variant)
|
int hasTypeSymbol(variant)
|
||||||
#endif
|
|
||||||
int variant;
|
int variant;
|
||||||
{
|
{
|
||||||
if (!isATypeNode(variant))
|
if (!isATypeNode(variant))
|
||||||
@@ -334,11 +347,7 @@ int variant;
|
|||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
int isAtomicType_temp(variant)
|
|
||||||
#else
|
|
||||||
int isAtomicType(variant)
|
int isAtomicType(variant)
|
||||||
#endif
|
|
||||||
int variant;
|
int variant;
|
||||||
{
|
{
|
||||||
if (!isATypeNode(variant))
|
if (!isATypeNode(variant))
|
||||||
@@ -353,11 +362,7 @@ int variant;
|
|||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
int hasNodeASymb_temp(variant)
|
|
||||||
#else
|
|
||||||
int hasNodeASymb(variant)
|
int hasNodeASymb(variant)
|
||||||
#endif
|
|
||||||
int variant;
|
int variant;
|
||||||
{
|
{
|
||||||
if ((!isABifNode(variant)) && (!isALoNode(variant)))
|
if ((!isABifNode(variant)) && (!isALoNode(variant)))
|
||||||
@@ -372,11 +377,7 @@ int variant;
|
|||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
int isNodeAConst_temp(variant)
|
|
||||||
#else
|
|
||||||
int isNodeAConst(variant)
|
int isNodeAConst(variant)
|
||||||
#endif
|
|
||||||
int variant;
|
int variant;
|
||||||
{
|
{
|
||||||
if ((!isABifNode(variant)) && (!isALoNode(variant)))
|
if ((!isABifNode(variant)) && (!isALoNode(variant)))
|
||||||
@@ -392,11 +393,7 @@ int variant;
|
|||||||
|
|
||||||
|
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
int isAStructDeclBif_temp(variant)
|
|
||||||
#else
|
|
||||||
int isAStructDeclBif(variant)
|
int isAStructDeclBif(variant)
|
||||||
#endif
|
|
||||||
int variant;
|
int variant;
|
||||||
{
|
{
|
||||||
if (!isABifNode(variant))
|
if (!isABifNode(variant))
|
||||||
@@ -411,11 +408,7 @@ int variant;
|
|||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
int isAUnionDeclBif_temp(variant)
|
|
||||||
#else
|
|
||||||
int isAUnionDeclBif(variant)
|
int isAUnionDeclBif(variant)
|
||||||
#endif
|
|
||||||
int variant;
|
int variant;
|
||||||
{
|
{
|
||||||
if (!isABifNode(variant))
|
if (!isABifNode(variant))
|
||||||
@@ -430,11 +423,7 @@ int variant;
|
|||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
int isAEnumDeclBif_temp(variant)
|
|
||||||
#else
|
|
||||||
int isAEnumDeclBif(variant)
|
int isAEnumDeclBif(variant)
|
||||||
#endif
|
|
||||||
int variant;
|
int variant;
|
||||||
{
|
{
|
||||||
if (!isABifNode(variant))
|
if (!isABifNode(variant))
|
||||||
@@ -449,11 +438,7 @@ int variant;
|
|||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
int isADeclBif_temp(variant)
|
|
||||||
#else
|
|
||||||
int isADeclBif(variant)
|
int isADeclBif(variant)
|
||||||
#endif
|
|
||||||
int variant;
|
int variant;
|
||||||
{
|
{
|
||||||
if (!isABifNode(variant))
|
if (!isABifNode(variant))
|
||||||
@@ -468,11 +453,7 @@ int variant;
|
|||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
int isAControlEnd_temp(variant)
|
|
||||||
#else
|
|
||||||
int isAControlEnd(variant)
|
int isAControlEnd(variant)
|
||||||
#endif
|
|
||||||
int variant;
|
int variant;
|
||||||
{
|
{
|
||||||
if (!isABifNode(variant))
|
if (!isABifNode(variant))
|
||||||
@@ -486,28 +467,8 @@ int variant;
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
void Message_temp(s, l)
|
|
||||||
#else
|
|
||||||
void Message(s, l)
|
|
||||||
#endif
|
|
||||||
char *s;
|
|
||||||
int l;
|
|
||||||
{
|
|
||||||
if (l != 0)
|
|
||||||
fprintf(stderr,"Warning : %s line %d\n",s, l);
|
|
||||||
else
|
|
||||||
fprintf(stderr,"Warning : %s\n",s);
|
|
||||||
Warning_count++;
|
|
||||||
}
|
|
||||||
/***************************************************************************/
|
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
int Check_Lang_Fortran_temp(proj)
|
|
||||||
#else
|
|
||||||
int Check_Lang_Fortran(proj)
|
int Check_Lang_Fortran(proj)
|
||||||
#endif
|
|
||||||
PTR_PROJ proj;
|
PTR_PROJ proj;
|
||||||
{
|
{
|
||||||
PTR_FILE ptf;
|
PTR_FILE ptf;
|
||||||
@@ -529,11 +490,7 @@ PTR_PROJ proj;
|
|||||||
|
|
||||||
|
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
char* filter_temp(s)
|
|
||||||
#else
|
|
||||||
char* filter(s)
|
char* filter(s)
|
||||||
#endif
|
|
||||||
char *s;
|
char *s;
|
||||||
{
|
{
|
||||||
char c;
|
char c;
|
||||||
@@ -693,11 +650,7 @@ static int NbValues = 0;
|
|||||||
static int NbElement = 0;
|
static int NbElement = 0;
|
||||||
|
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
void allocateValueEvaluate_temp()
|
|
||||||
#else
|
|
||||||
void allocateValueEvaluate()
|
void allocateValueEvaluate()
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
PTR_SYMB *pt1;
|
PTR_SYMB *pt1;
|
||||||
@@ -732,11 +685,7 @@ void allocateValueEvaluate()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
void addElementEvaluate_temp(symb, val)
|
|
||||||
#else
|
|
||||||
void addElementEvaluate(symb, val)
|
void addElementEvaluate(symb, val)
|
||||||
#endif
|
|
||||||
PTR_SYMB symb;
|
PTR_SYMB symb;
|
||||||
int val;
|
int val;
|
||||||
{
|
{
|
||||||
@@ -753,11 +702,7 @@ void addElementEvaluate(symb, val)
|
|||||||
|
|
||||||
|
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
int getElementEvaluate_temp(symb)
|
|
||||||
#else
|
|
||||||
int getElementEvaluate(symb)
|
int getElementEvaluate(symb)
|
||||||
#endif
|
|
||||||
PTR_SYMB symb;
|
PTR_SYMB symb;
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
@@ -773,11 +718,7 @@ int getElementEvaluate(symb)
|
|||||||
|
|
||||||
|
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
void resetPresetEvaluate_temp()
|
|
||||||
#else
|
|
||||||
void resetPresetEvaluate()
|
void resetPresetEvaluate()
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
NbValues = 0;
|
NbValues = 0;
|
||||||
NbElement = 0;
|
NbElement = 0;
|
||||||
@@ -800,11 +741,7 @@ void resetPresetEvaluate()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
int* evaluateExpression_temp(expr)
|
|
||||||
#else
|
|
||||||
int* evaluateExpression(expr)
|
int* evaluateExpression(expr)
|
||||||
#endif
|
|
||||||
PTR_LLND expr;
|
PTR_LLND expr;
|
||||||
{
|
{
|
||||||
int *res, *op1, *op2;
|
int *res, *op1, *op2;
|
||||||
@@ -958,11 +895,7 @@ int* evaluateExpression(expr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
int patternMatchExpression_temp(ll1, ll2)
|
|
||||||
#else
|
|
||||||
int patternMatchExpression(ll1,ll2)
|
int patternMatchExpression(ll1,ll2)
|
||||||
#endif
|
|
||||||
PTR_LLND ll1,ll2;
|
PTR_LLND ll1,ll2;
|
||||||
{
|
{
|
||||||
int *res1, *res2;
|
int *res1, *res2;
|
||||||
@@ -1044,11 +977,7 @@ int patternMatchExpression(ll1,ll2)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
PTR_LLND Follow_Llnd_temp(ll, c)
|
|
||||||
#else
|
|
||||||
PTR_LLND Follow_Llnd(ll,c)
|
PTR_LLND Follow_Llnd(ll,c)
|
||||||
#endif
|
|
||||||
PTR_LLND ll;
|
PTR_LLND ll;
|
||||||
int c;
|
int c;
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -35,6 +35,10 @@ extern PTR_SYMB head_symb;
|
|||||||
extern PTR_TYPE head_type;
|
extern PTR_TYPE head_type;
|
||||||
extern PTR_LABEL head_label;
|
extern PTR_LABEL head_label;
|
||||||
|
|
||||||
|
#ifdef __SPF
|
||||||
|
extern void removeFromCollection(void *pointer);
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* eqn -- checks if first n characters of two strings are the same
|
* eqn -- checks if first n characters of two strings are the same
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -54,8 +54,41 @@ char *hpfname;
|
|||||||
#define Fortran_Initialized 2
|
#define Fortran_Initialized 2
|
||||||
static int Parser_Initiated = 0;
|
static int Parser_Initiated = 0;
|
||||||
|
|
||||||
|
#ifdef __SPF
|
||||||
|
extern void removeFromCollection(void *pointer);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
#ifdef __SPF_BUILT_IN_PARSER
|
||||||
|
|
||||||
static PTR_FILE current_file = NULL;
|
static PTR_FILE current_file = NULL;
|
||||||
|
#define DealWith_Rid DealWith_Rid_temp
|
||||||
|
#define is_overloaded_type is_overloaded_type_temp
|
||||||
|
#define Find_Type_For_Bif Find_Type_For_Bif_temp
|
||||||
|
#define Find_Protection_For_Bif Find_Protection_For_Bif_temp
|
||||||
|
#define Find_BaseType Find_BaseType_temp
|
||||||
|
#define Find_BaseType2 Find_BaseType2_temp
|
||||||
|
#define create_unp_str create_unp_str_temp
|
||||||
|
#define alloc_str alloc_str_temp
|
||||||
|
#define Reset_Unparser Reset_Unparser_temp
|
||||||
|
#define BufPutChar BufPutChar_temp
|
||||||
|
#define BufPutString BufPutString_temp
|
||||||
|
#define BufPutInt BufPutInt_temp
|
||||||
|
#define Get_Flag_val Get_Flag_val_temp
|
||||||
|
#define Treat_Flag Treat_Flag_temp
|
||||||
|
#define PushPop_Flag PushPop_Flag_temp
|
||||||
|
#define Tool_Unparse_Symbol Tool_Unparse_Symbol_temp
|
||||||
|
#define Get_Type_Operand Get_Type_Operand_temp
|
||||||
|
#define Get_LL_Operand Get_LL_Operand_temp
|
||||||
|
#define Get_Bif_Operand Get_Bif_Operand_temp
|
||||||
|
#define GetComp GetComp_temp
|
||||||
|
#define Eval_Type_Condition Eval_Type_Condition_temp
|
||||||
|
#define Eval_LLND_Condition Eval_LLND_Condition_temp
|
||||||
|
#define Eval_Bif_Condition Eval_Bif_Condition_temp
|
||||||
|
#define SkipToEndif SkipToEndif_temp
|
||||||
|
#define Tool_Unparse_Type Tool_Unparse_Type_temp
|
||||||
|
#define Tool_Unparse2_LLnode Tool_Unparse2_LLnode_temp
|
||||||
|
#define Tool_Unparse_Bif Tool_Unparse_Bif_temp
|
||||||
|
|
||||||
#else
|
#else
|
||||||
PTR_FILE current_file=NULL;
|
PTR_FILE current_file=NULL;
|
||||||
#endif
|
#endif
|
||||||
@@ -440,11 +473,7 @@ for (symb = current_file->head_symb; symb ; symb = SYMB_NEXT (symb))
|
|||||||
|
|
||||||
/* manage the unparse buffer */
|
/* manage the unparse buffer */
|
||||||
|
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
void DealWith_Rid_temp(typei, flg)
|
|
||||||
#else
|
|
||||||
void DealWith_Rid(typei, flg)
|
void DealWith_Rid(typei, flg)
|
||||||
#endif
|
|
||||||
PTR_TYPE typei;
|
PTR_TYPE typei;
|
||||||
int flg; /* if 1 then do virtual */
|
int flg; /* if 1 then do virtual */
|
||||||
{ int j;
|
{ int j;
|
||||||
@@ -539,11 +568,7 @@ void DealWith_Rid(typei, flg)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
int is_overloaded_type_temp(bif)
|
|
||||||
#else
|
|
||||||
int is_overloaded_type(bif)
|
int is_overloaded_type(bif)
|
||||||
#endif
|
|
||||||
PTR_BFND bif;
|
PTR_BFND bif;
|
||||||
{
|
{
|
||||||
PTR_LLND ll;
|
PTR_LLND ll;
|
||||||
@@ -555,11 +580,7 @@ int is_overloaded_type(bif)
|
|||||||
else return 0;
|
else return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
PTR_TYPE Find_Type_For_Bif_temp(bif)
|
|
||||||
#else
|
|
||||||
PTR_TYPE Find_Type_For_Bif(bif)
|
PTR_TYPE Find_Type_For_Bif(bif)
|
||||||
#endif
|
|
||||||
PTR_BFND bif;
|
PTR_BFND bif;
|
||||||
{
|
{
|
||||||
PTR_TYPE type = NULL;
|
PTR_TYPE type = NULL;
|
||||||
@@ -603,11 +624,7 @@ PTR_TYPE Find_Type_For_Bif(bif)
|
|||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
int Find_Protection_For_Bif_temp(bif)
|
|
||||||
#else
|
|
||||||
int Find_Protection_For_Bif(bif)
|
int Find_Protection_For_Bif(bif)
|
||||||
#endif
|
|
||||||
PTR_BFND bif;
|
PTR_BFND bif;
|
||||||
{
|
{
|
||||||
int protect = 0;
|
int protect = 0;
|
||||||
@@ -642,11 +659,7 @@ int Find_Protection_For_Bif(bif)
|
|||||||
return protect;
|
return protect;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
PTR_TYPE Find_BaseType_temp(ptype)
|
|
||||||
#else
|
|
||||||
PTR_TYPE Find_BaseType(ptype)
|
PTR_TYPE Find_BaseType(ptype)
|
||||||
#endif
|
|
||||||
PTR_TYPE ptype;
|
PTR_TYPE ptype;
|
||||||
{
|
{
|
||||||
PTR_TYPE pt;
|
PTR_TYPE pt;
|
||||||
@@ -690,11 +703,7 @@ PTR_TYPE Find_BaseType(ptype)
|
|||||||
return pt;
|
return pt;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
PTR_TYPE Find_BaseType2_temp(ptype)
|
|
||||||
#else
|
|
||||||
PTR_TYPE Find_BaseType2(ptype) /* breaks out of the loop for pointers and references BW */
|
PTR_TYPE Find_BaseType2(ptype) /* breaks out of the loop for pointers and references BW */
|
||||||
#endif
|
|
||||||
PTR_TYPE ptype;
|
PTR_TYPE ptype;
|
||||||
{
|
{
|
||||||
PTR_TYPE pt;
|
PTR_TYPE pt;
|
||||||
@@ -739,12 +748,7 @@ PTR_TYPE Find_BaseType2(ptype) /* breaks out of the loop for pointers an
|
|||||||
return pt;
|
return pt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
char* create_unp_str_temp(str)
|
|
||||||
#else
|
|
||||||
char *create_unp_str(str)
|
char *create_unp_str(str)
|
||||||
#endif
|
|
||||||
char *str;
|
char *str;
|
||||||
{
|
{
|
||||||
char *pt;
|
char *pt;
|
||||||
@@ -758,11 +762,7 @@ char *create_unp_str(str)
|
|||||||
return pt;
|
return pt;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
char* alloc_str_temp(size)
|
|
||||||
#else
|
|
||||||
char *alloc_str(size)
|
char *alloc_str(size)
|
||||||
#endif
|
|
||||||
int size;
|
int size;
|
||||||
{
|
{
|
||||||
char *pt;
|
char *pt;
|
||||||
@@ -773,11 +773,7 @@ char *alloc_str(size)
|
|||||||
return pt;
|
return pt;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
int Reset_Unparser_temp()
|
|
||||||
#else
|
|
||||||
int Reset_Unparser()
|
int Reset_Unparser()
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
int i,j;
|
int i,j;
|
||||||
|
|
||||||
@@ -801,11 +797,7 @@ int Reset_Unparser()
|
|||||||
|
|
||||||
|
|
||||||
/* function to manage the unparse buffer */
|
/* function to manage the unparse buffer */
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
int BufPutChar_temp(c)
|
|
||||||
#else
|
|
||||||
int BufPutChar(c)
|
int BufPutChar(c)
|
||||||
#endif
|
|
||||||
char c;
|
char c;
|
||||||
{
|
{
|
||||||
if (Buf_pointer >= MAXLENGHTBUF)
|
if (Buf_pointer >= MAXLENGHTBUF)
|
||||||
@@ -818,11 +810,7 @@ int BufPutChar(c)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
int BufPutString_temp(s,len)
|
|
||||||
#else
|
|
||||||
int BufPutString(s, len)
|
int BufPutString(s, len)
|
||||||
#endif
|
|
||||||
char *s;
|
char *s;
|
||||||
int len;
|
int len;
|
||||||
{
|
{
|
||||||
@@ -846,11 +834,7 @@ int BufPutString(s, len)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
int BufPutInt_temp(i)
|
|
||||||
#else
|
|
||||||
int BufPutInt(i)
|
int BufPutInt(i)
|
||||||
#endif
|
|
||||||
int i;
|
int i;
|
||||||
{
|
{
|
||||||
int length;
|
int length;
|
||||||
@@ -869,11 +853,7 @@ int BufPutInt(i)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
int Get_Flag_val_temp(str, i)
|
|
||||||
#else
|
|
||||||
int Get_Flag_val(str, i)
|
int Get_Flag_val(str, i)
|
||||||
#endif
|
|
||||||
char *str;
|
char *str;
|
||||||
int *i;
|
int *i;
|
||||||
{
|
{
|
||||||
@@ -911,11 +891,7 @@ int Get_Flag_val(str, i)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
void Treat_Flag_temp(str, i, val)
|
|
||||||
#else
|
|
||||||
void Treat_Flag(str, i, val)
|
void Treat_Flag(str, i, val)
|
||||||
#endif
|
|
||||||
char *str;
|
char *str;
|
||||||
int *i;
|
int *i;
|
||||||
int val;
|
int val;
|
||||||
@@ -955,11 +931,7 @@ void Treat_Flag(str, i, val)
|
|||||||
*i += con;
|
*i += con;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
void PushPop_Flag_temp(str, i, val)
|
|
||||||
#else
|
|
||||||
void PushPop_Flag(str, i, val)
|
void PushPop_Flag(str, i, val)
|
||||||
#endif
|
|
||||||
char *str;
|
char *str;
|
||||||
int *i;
|
int *i;
|
||||||
int val;
|
int val;
|
||||||
@@ -1006,11 +978,7 @@ void PushPop_Flag(str, i, val)
|
|||||||
|
|
||||||
char * Tool_Unparse_Type();
|
char * Tool_Unparse_Type();
|
||||||
|
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
char* Tool_Unparse_Symbol_temp(symb)
|
|
||||||
#else
|
|
||||||
char *Tool_Unparse_Symbol (symb)
|
char *Tool_Unparse_Symbol (symb)
|
||||||
#endif
|
|
||||||
PTR_SYMB symb;
|
PTR_SYMB symb;
|
||||||
{
|
{
|
||||||
PTR_TYPE ov_type;
|
PTR_TYPE ov_type;
|
||||||
@@ -1103,11 +1071,7 @@ typedef struct
|
|||||||
#define COMP_DIFF 1
|
#define COMP_DIFF 1
|
||||||
|
|
||||||
|
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
void Get_Type_Operand_temp(str, iptr, ptype, Op)
|
|
||||||
#else
|
|
||||||
void Get_Type_Operand (str, iptr, ptype,Op)
|
void Get_Type_Operand (str, iptr, ptype,Op)
|
||||||
#endif
|
|
||||||
char *str;
|
char *str;
|
||||||
int *iptr;
|
int *iptr;
|
||||||
PTR_TYPE ptype;
|
PTR_TYPE ptype;
|
||||||
@@ -1154,11 +1118,7 @@ void Get_Type_Operand (str, iptr, ptype,Op)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
void Get_LL_Operand_temp(str, iptr, ll, Op)
|
|
||||||
#else
|
|
||||||
void Get_LL_Operand (str, iptr, ll, Op)
|
void Get_LL_Operand (str, iptr, ll, Op)
|
||||||
#endif
|
|
||||||
char *str;
|
char *str;
|
||||||
int *iptr;
|
int *iptr;
|
||||||
PTR_LLND ll;
|
PTR_LLND ll;
|
||||||
@@ -1292,11 +1252,7 @@ void Get_LL_Operand (str, iptr, ll, Op)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
void Get_Bif_Operand_temp(str, iptr, bif, Op)
|
|
||||||
#else
|
|
||||||
void Get_Bif_Operand (str, iptr, bif,Op)
|
void Get_Bif_Operand (str, iptr, bif,Op)
|
||||||
#endif
|
|
||||||
char *str;
|
char *str;
|
||||||
int *iptr;
|
int *iptr;
|
||||||
PTR_BFND bif;
|
PTR_BFND bif;
|
||||||
@@ -1504,11 +1460,7 @@ void Get_Bif_Operand (str, iptr, bif,Op)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
int GetComp_temp(str, iptr)
|
|
||||||
#else
|
|
||||||
int GetComp (str, iptr)
|
int GetComp (str, iptr)
|
||||||
#endif
|
|
||||||
char *str;
|
char *str;
|
||||||
int *iptr;
|
int *iptr;
|
||||||
{
|
{
|
||||||
@@ -1531,11 +1483,7 @@ int GetComp (str, iptr)
|
|||||||
return Comp;
|
return Comp;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
int Eval_Type_Condition_temp(str, ptype)
|
|
||||||
#else
|
|
||||||
int Eval_Type_Condition(str, ptype)
|
int Eval_Type_Condition(str, ptype)
|
||||||
#endif
|
|
||||||
char *str;
|
char *str;
|
||||||
PTR_TYPE ptype;
|
PTR_TYPE ptype;
|
||||||
{
|
{
|
||||||
@@ -1611,11 +1559,7 @@ int Eval_Type_Condition(str, ptype)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
int Eval_LLND_Condition_temp(str, ll)
|
|
||||||
#else
|
|
||||||
int Eval_LLND_Condition(str, ll)
|
int Eval_LLND_Condition(str, ll)
|
||||||
#endif
|
|
||||||
char *str;
|
char *str;
|
||||||
PTR_LLND ll;
|
PTR_LLND ll;
|
||||||
{
|
{
|
||||||
@@ -1692,11 +1636,7 @@ int Eval_LLND_Condition(str, ll)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
int Eval_Bif_Condition_temp(str, bif)
|
|
||||||
#else
|
|
||||||
int Eval_Bif_Condition(str, bif)
|
int Eval_Bif_Condition(str, bif)
|
||||||
#endif
|
|
||||||
char *str;
|
char *str;
|
||||||
PTR_BFND bif;
|
PTR_BFND bif;
|
||||||
{
|
{
|
||||||
@@ -1772,11 +1712,7 @@ int Eval_Bif_Condition(str, bif)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
int SkipToEndif_temp(str)
|
|
||||||
#else
|
|
||||||
int SkipToEndif (str)
|
int SkipToEndif (str)
|
||||||
#endif
|
|
||||||
char *str;
|
char *str;
|
||||||
{
|
{
|
||||||
int ifcount_local = 1;
|
int ifcount_local = 1;
|
||||||
@@ -1806,11 +1742,7 @@ int SkipToEndif (str)
|
|||||||
|
|
||||||
char *Tool_Unparse2_LLnode ();
|
char *Tool_Unparse2_LLnode ();
|
||||||
|
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
char* Tool_Unparse_Type_temp(ptype)
|
|
||||||
#else
|
|
||||||
char *Tool_Unparse_Type (ptype)
|
char *Tool_Unparse_Type (ptype)
|
||||||
#endif
|
|
||||||
PTR_TYPE ptype;
|
PTR_TYPE ptype;
|
||||||
/*int def;*/ /* def = 1 : defined type */
|
/*int def;*/ /* def = 1 : defined type */
|
||||||
/* def = 0 : named type */
|
/* def = 0 : named type */
|
||||||
@@ -2096,11 +2028,7 @@ char *Tool_Unparse_Type (ptype)
|
|||||||
return Buf_address;
|
return Buf_address;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
char* Tool_Unparse2_LLnode_temp(ll)
|
|
||||||
#else
|
|
||||||
char *Tool_Unparse2_LLnode(ll)
|
char *Tool_Unparse2_LLnode(ll)
|
||||||
#endif
|
|
||||||
PTR_LLND ll;
|
PTR_LLND ll;
|
||||||
{
|
{
|
||||||
int variant;
|
int variant;
|
||||||
@@ -2631,11 +2559,7 @@ char *Tool_Unparse2_LLnode(ll)
|
|||||||
return Buf_address;
|
return Buf_address;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __SPF_BUILT_IN_PARSER
|
|
||||||
char* Tool_Unparse_Bif_temp(bif)
|
|
||||||
#else
|
|
||||||
char *Tool_Unparse_Bif(bif)
|
char *Tool_Unparse_Bif(bif)
|
||||||
#endif
|
|
||||||
PTR_BFND bif;
|
PTR_BFND bif;
|
||||||
{
|
{
|
||||||
int variant;
|
int variant;
|
||||||
|
|||||||
@@ -48,6 +48,5 @@ if (MSVC_IDE)
|
|||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP")
|
||||||
else()
|
else()
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -O3")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
|
|
||||||
endif()
|
endif()
|
||||||
@@ -131,7 +131,7 @@ static int gcd(int b, int a)
|
|||||||
if (b == 1)
|
if (b == 1)
|
||||||
return (1);
|
return (1);
|
||||||
while (b != 0) {
|
while (b != 0) {
|
||||||
register int t = b;
|
int t = b;
|
||||||
b = a % b;
|
b = a % b;
|
||||||
a = t;
|
a = t;
|
||||||
};
|
};
|
||||||
@@ -1696,9 +1696,9 @@ void substitute(Problem * problemPtr, Eqn sub, int i, int c)
|
|||||||
SUBs[e].coef[i] = 0;
|
SUBs[e].coef[i] = 0;
|
||||||
|
|
||||||
if (i <= problemPtr->_safeVars && problemPtr->_var[i] >= 0) {
|
if (i <= problemPtr->_safeVars && problemPtr->_var[i] >= 0) {
|
||||||
//register Eqn eqn = &(SUBs[nSUB++]);
|
//Eqn eqn = &(SUBs[nSUB++]);
|
||||||
problemPtr->addNumSUBs(1);
|
problemPtr->addNumSUBs(1);
|
||||||
register Eqn eqn = &(SUBs[nSUB - 1]);
|
Eqn eqn = &(SUBs[nSUB - 1]);
|
||||||
|
|
||||||
for (k = nVars; k >= 0; k--)
|
for (k = nVars; k >= 0; k--)
|
||||||
eqn->coef[k] = 0;
|
eqn->coef[k] = 0;
|
||||||
@@ -1723,9 +1723,9 @@ void substitute(Problem * problemPtr, Eqn sub, int i, int c)
|
|||||||
SUBs[e].coef[i] = 0;
|
SUBs[e].coef[i] = 0;
|
||||||
};
|
};
|
||||||
if (i <= problemPtr->_safeVars && problemPtr->_var[i] >= 0) {
|
if (i <= problemPtr->_safeVars && problemPtr->_var[i] >= 0) {
|
||||||
//register Eqn eqn = &(SUBs[nSUB++]);
|
//Eqn eqn = &(SUBs[nSUB++]);
|
||||||
problemPtr->addNumSUBs(1);
|
problemPtr->addNumSUBs(1);
|
||||||
register Eqn eqn = &(SUBs[nSUB - 1]);
|
Eqn eqn = &(SUBs[nSUB - 1]);
|
||||||
|
|
||||||
for (k = nVars; k >= 1; k--)
|
for (k = nVars; k >= 1; k--)
|
||||||
eqn->coef[k] = 0;
|
eqn->coef[k] = 0;
|
||||||
@@ -1736,7 +1736,7 @@ void substitute(Problem * problemPtr, Eqn sub, int i, int c)
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
for (e = nEQ - 1; e >= 0; e--) {
|
for (e = nEQ - 1; e >= 0; e--) {
|
||||||
register Eqn eqn = &(EQs[e]);
|
Eqn eqn = &(EQs[e]);
|
||||||
k = eqn->coef[i];
|
k = eqn->coef[i];
|
||||||
if (k != 0) {
|
if (k != 0) {
|
||||||
k = c * k;
|
k = c * k;
|
||||||
@@ -1752,7 +1752,7 @@ void substitute(Problem * problemPtr, Eqn sub, int i, int c)
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
for (e = nGEQ - 1; e >= 0; e--) {
|
for (e = nGEQ - 1; e >= 0; e--) {
|
||||||
register Eqn eqn = &(GEQs[e]);
|
Eqn eqn = &(GEQs[e]);
|
||||||
k = eqn->coef[i];
|
k = eqn->coef[i];
|
||||||
if (k != 0) {
|
if (k != 0) {
|
||||||
k = c * k;
|
k = c * k;
|
||||||
@@ -1769,7 +1769,7 @@ void substitute(Problem * problemPtr, Eqn sub, int i, int c)
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
for (e = nSUB - 1; e >= 0; e--) {
|
for (e = nSUB - 1; e >= 0; e--) {
|
||||||
register Eqn eqn = &(SUBs[e]);
|
Eqn eqn = &(SUBs[e]);
|
||||||
k = eqn->coef[i];
|
k = eqn->coef[i];
|
||||||
if (k != 0) {
|
if (k != 0) {
|
||||||
k = c * k;
|
k = c * k;
|
||||||
@@ -1789,7 +1789,7 @@ void substitute(Problem * problemPtr, Eqn sub, int i, int c)
|
|||||||
if (DEBUG)
|
if (DEBUG)
|
||||||
fprintf(outputFile, "---\n\n");
|
fprintf(outputFile, "---\n\n");
|
||||||
if (i <= problemPtr->_safeVars && problemPtr->_var[i] >= 0) {
|
if (i <= problemPtr->_safeVars && problemPtr->_var[i] >= 0) {
|
||||||
register Eqn eqn;
|
Eqn eqn;
|
||||||
//eqn = &(SUBs[nSUB++]);
|
//eqn = &(SUBs[nSUB++]);
|
||||||
problemPtr->addNumSUBs(1);
|
problemPtr->addNumSUBs(1);
|
||||||
eqn = &(SUBs[nSUB - 1]);
|
eqn = &(SUBs[nSUB - 1]);
|
||||||
@@ -1831,7 +1831,7 @@ void substituteRed(Problem *problemPtr, Eqn sub, int i, int c, bool * foundBlack
|
|||||||
};
|
};
|
||||||
|
|
||||||
for (e = nEQ - 1; e >= 0; e--) {
|
for (e = nEQ - 1; e >= 0; e--) {
|
||||||
register Eqn eqn = &(EQs[e]);
|
Eqn eqn = &(EQs[e]);
|
||||||
k = eqn->coef[i];
|
k = eqn->coef[i];
|
||||||
if (k != 0) {
|
if (k != 0) {
|
||||||
if (!eqn->color)
|
if (!eqn->color)
|
||||||
@@ -1851,7 +1851,7 @@ void substituteRed(Problem *problemPtr, Eqn sub, int i, int c, bool * foundBlack
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
for (e = nGEQ - 1; e >= 0; e--) {
|
for (e = nGEQ - 1; e >= 0; e--) {
|
||||||
register Eqn eqn = &(GEQs[e]);
|
Eqn eqn = &(GEQs[e]);
|
||||||
k = eqn->coef[i];
|
k = eqn->coef[i];
|
||||||
if (k != 0) {
|
if (k != 0) {
|
||||||
if (!eqn->color)
|
if (!eqn->color)
|
||||||
@@ -1872,7 +1872,7 @@ void substituteRed(Problem *problemPtr, Eqn sub, int i, int c, bool * foundBlack
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
for (e = nSUB - 1; e >= 0; e--) {
|
for (e = nSUB - 1; e >= 0; e--) {
|
||||||
register Eqn eqn = &(SUBs[e]);
|
Eqn eqn = &(SUBs[e]);
|
||||||
k = eqn->coef[i];
|
k = eqn->coef[i];
|
||||||
if (k != 0) {
|
if (k != 0) {
|
||||||
if (!eqn->color)
|
if (!eqn->color)
|
||||||
@@ -2001,7 +2001,7 @@ static void doElimination(Problem *problemPtr, int e, int i)
|
|||||||
assert(inApproximateMode);
|
assert(inApproximateMode);
|
||||||
for (e = nEQ - 1; e >= 0; e--)
|
for (e = nEQ - 1; e >= 0; e--)
|
||||||
if (EQs[e].coef[i]) {
|
if (EQs[e].coef[i]) {
|
||||||
register Eqn eqn = &(EQs[e]);
|
Eqn eqn = &(EQs[e]);
|
||||||
int j, k;
|
int j, k;
|
||||||
for (j = nV; j >= 0; j--)
|
for (j = nV; j >= 0; j--)
|
||||||
eqn->coef[j] *= a;
|
eqn->coef[j] *= a;
|
||||||
@@ -2012,7 +2012,7 @@ static void doElimination(Problem *problemPtr, int e, int i)
|
|||||||
};
|
};
|
||||||
for (e = nGEQ - 1; e >= 0; e--)
|
for (e = nGEQ - 1; e >= 0; e--)
|
||||||
if (GEQs[e].coef[i]) {
|
if (GEQs[e].coef[i]) {
|
||||||
register Eqn eqn = &(GEQs[e]);
|
Eqn eqn = &(GEQs[e]);
|
||||||
int j, k;
|
int j, k;
|
||||||
for (j = nV; j >= 0; j--)
|
for (j = nV; j >= 0; j--)
|
||||||
eqn->coef[j] *= a;
|
eqn->coef[j] *= a;
|
||||||
@@ -2024,7 +2024,7 @@ static void doElimination(Problem *problemPtr, int e, int i)
|
|||||||
};
|
};
|
||||||
for (e = nSUB - 1; e >= 0; e--)
|
for (e = nSUB - 1; e >= 0; e--)
|
||||||
if (SUBs[e].coef[i]) {
|
if (SUBs[e].coef[i]) {
|
||||||
register Eqn eqn = &(SUBs[e]);
|
Eqn eqn = &(SUBs[e]);
|
||||||
int j, k;
|
int j, k;
|
||||||
assert(0);
|
assert(0);
|
||||||
for (j = nV; j >= 0; j--)
|
for (j = nV; j >= 0; j--)
|
||||||
@@ -2074,7 +2074,7 @@ static int solveEQ(Problem *problemPtr, int desiredResult)
|
|||||||
|
|
||||||
/* Eliminate all EQ equations */
|
/* Eliminate all EQ equations */
|
||||||
for (e = nEQ - 1; e >= 0; e--) {
|
for (e = nEQ - 1; e >= 0; e--) {
|
||||||
register Eqn eqn = &(EQs[e]);
|
Eqn eqn = &(EQs[e]);
|
||||||
int sv;
|
int sv;
|
||||||
|
|
||||||
if (inApproximateMode && !nGEQ && safeVars == nVars)
|
if (inApproximateMode && !nGEQ && safeVars == nVars)
|
||||||
@@ -2521,7 +2521,7 @@ solveGEQstart:
|
|||||||
coupledSubscripts = 1;
|
coupledSubscripts = 1;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
register int g;
|
int g;
|
||||||
int topVar;
|
int topVar;
|
||||||
int i0;
|
int i0;
|
||||||
int hashCode;
|
int hashCode;
|
||||||
@@ -2573,7 +2573,7 @@ solveGEQstart:
|
|||||||
if (g < 0)
|
if (g < 0)
|
||||||
g = -g;
|
g = -g;
|
||||||
for (; i0 >= 0; i0--) {
|
for (; i0 >= 0; i0--) {
|
||||||
register int x;
|
int x;
|
||||||
i = packing[i0];
|
i = packing[i0];
|
||||||
x = GEQs[e].coef[i];
|
x = GEQs[e].coef[i];
|
||||||
hashCode = hashCode * keyMult * (i + 3) + x;
|
hashCode = hashCode * keyMult * (i + 3) + x;
|
||||||
@@ -2588,7 +2588,7 @@ solveGEQstart:
|
|||||||
g = gcd(x, g);
|
g = gcd(x, g);
|
||||||
};
|
};
|
||||||
for (; i0 >= 0; i0--) {
|
for (; i0 >= 0; i0--) {
|
||||||
register int x;
|
int x;
|
||||||
i = packing[i0];
|
i = packing[i0];
|
||||||
x = GEQs[e].coef[i];
|
x = GEQs[e].coef[i];
|
||||||
hashCode = hashCode * keyMult * (i + 3) + x;
|
hashCode = hashCode * keyMult * (i + 3) + x;
|
||||||
@@ -2607,7 +2607,7 @@ solveGEQstart:
|
|||||||
};
|
};
|
||||||
|
|
||||||
{
|
{
|
||||||
register int g2 = abs(hashCode);
|
int g2 = abs(hashCode);
|
||||||
if (DEBUG) {
|
if (DEBUG) {
|
||||||
fprintf(outputFile, "Hash code = %d, eqn = ", hashCode);
|
fprintf(outputFile, "Hash code = %d, eqn = ", hashCode);
|
||||||
printGEQ(&GEQs[e]);
|
printGEQ(&GEQs[e]);
|
||||||
|
|||||||
Reference in New Issue
Block a user