ChangeLog:19990622-00:35
This commit is contained in:
@@ -1,3 +1,12 @@
|
||||
19990622-00:35 Ryszard Glab <rglab@imid.med.pl>
|
||||
* source/compiler/harbour.y
|
||||
* source/compiler/harbour.l
|
||||
* removed some unnecessary rules
|
||||
* added the very begginning of MEMVAR support
|
||||
|
||||
* include/compiler.h
|
||||
+ added pMemvars member to _FUNC structure
|
||||
|
||||
19990622-14:00 CET Victor Szel <info@szelvesz.hu>
|
||||
* source/rdd/rdd.api moved to /include
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ typedef struct __FUNC /* functions definition support */
|
||||
PVAR pLocals; /* pointer to local variables list */
|
||||
PVAR pStatics; /* pointer to static variables list */
|
||||
PVAR pFields; /* pointer to fields variables list */
|
||||
PVAR pMemvars; /* pointer to memvar variables list */
|
||||
BYTE * pCode; /* pointer to a memory block where pcode is stored */
|
||||
LONG lPCodeSize; /* total memory size for pcode */
|
||||
LONG lPCodePos; /* actual pcode offset */
|
||||
@@ -66,6 +67,6 @@ WORD GetFunctionPos( char * szSymbolName ); /* returns the index + 1 of a functi
|
||||
|
||||
void * OurMalloc( LONG lSize ); /* our malloc with error control */
|
||||
void * OurRealloc( void * p, LONG lSize ); /* our malloc with error control */
|
||||
#define OurFree( p ) free( (p) ); /* just for symetry -we can expand it later */
|
||||
void OurFree( void * p ); /* releases allocated memory */
|
||||
|
||||
#endif /* COMPILER_H_ */
|
||||
|
||||
@@ -19,9 +19,13 @@
|
||||
#include "hberrors.h"
|
||||
#include "types.h"
|
||||
|
||||
void yyerror( char * );
|
||||
/* Functions defined in harbour.y */
|
||||
char *yy_strupr( char * );
|
||||
char * yy_strdup( char *p );
|
||||
void OurFree( void * );
|
||||
|
||||
/* YACC functions */
|
||||
void yyerror( char * );
|
||||
static void yyunput( int, char * );
|
||||
#undef yywrap /* to implement our own yywrap() funtion to handle EOFs */
|
||||
#ifdef __cplusplus
|
||||
@@ -31,7 +35,8 @@ int yywrap( void );
|
||||
#endif
|
||||
#undef YY_INPUT /* to implement our own YY_INPUT function to manage PRGs without \n at the end */
|
||||
extern FILE * yyin; /* currently yacc parsed file */
|
||||
/* Following three lines added for preprocessor */
|
||||
|
||||
/* Following three lines added for preprocessor */
|
||||
extern FILE *yyppo; /* output .ppo file */
|
||||
extern int lPpo; /* flag indicating, is ppo output needed */
|
||||
extern int PreProcess( FILE*, FILE*, char *);
|
||||
@@ -97,7 +102,7 @@ SubArray "]"[ \t]*"["
|
||||
|
||||
Separator {SpaceTab}
|
||||
|
||||
%x DEFINE STRING1 STRING2 STRING3
|
||||
%x STRING1 STRING2 STRING3
|
||||
%x NEXT_ BREAK_ CASE_ DO_ WHILE_ WITH_ END_ EXIT_ EXTERNAL_ FIELD_
|
||||
%x FOR_ FUNCTION_ IIF_ IF_ IN_ INIT_ LOCAL_ LOOP_
|
||||
%x LINECONT_
|
||||
@@ -195,8 +200,6 @@ Separator {SpaceTab}
|
||||
return yytext[ 0 ];
|
||||
}
|
||||
|
||||
<DEFINE>{Identifier}/{SpaceTab}*\n BEGIN 0;
|
||||
|
||||
{SpaceTab} ;
|
||||
|
||||
\n.* _iState=LOOKUP; yyless( 1 ); ++iLine; if( ! _iQuiet ) printf( "\rline: %i", iLine ); return '\n';
|
||||
@@ -279,7 +282,6 @@ Separator {SpaceTab}
|
||||
return IDENTIFIER;
|
||||
}
|
||||
}
|
||||
<BREAK_>. { if( i_INDEX_STATE ) BEGIN INDEX; else BEGIN 0; unput( yytext[ yyleng-1 ] ); }
|
||||
%{
|
||||
/* ************************************************************************ */
|
||||
%}
|
||||
@@ -477,7 +479,7 @@ Separator {SpaceTab}
|
||||
if( i_INDEX_STATE ) BEGIN INDEX; else BEGIN 0;
|
||||
if( _iState == LOOKUP )
|
||||
{
|
||||
free( yylval.string );
|
||||
OurFree( (void *) yylval.string );
|
||||
_iState =EXTERN;
|
||||
return EXTERN;
|
||||
}
|
||||
@@ -510,7 +512,7 @@ Separator {SpaceTab}
|
||||
if( i_INDEX_STATE ) BEGIN INDEX; else BEGIN 0;
|
||||
if( _iState == LOOKUP )
|
||||
{
|
||||
free( yylval.string );
|
||||
OurFree( (void *) yylval.string );
|
||||
_iState =FIELD;
|
||||
return FIELD;
|
||||
}
|
||||
@@ -1172,6 +1174,10 @@ Separator {SpaceTab}
|
||||
|
||||
int yy_lex_input( char *buffer, int iBufferSize )
|
||||
{
|
||||
#ifdef __WATCOMC__
|
||||
iBufferSize =iBufferSize;
|
||||
#else
|
||||
if( 0 && iBufferSize ) printf( "/* compiler warning */" );
|
||||
#endif
|
||||
return PreProcess( yyin, (lPpo)? yyppo:NULL, buffer );
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user