commented code in lexact.c
This commit is contained in:
+8
-53
@@ -54,7 +54,6 @@
|
||||
#define LEX_ACTIONS_C
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
/*#include <strings.h>*/
|
||||
#include "express/lexact.h"
|
||||
|
||||
#include "string.h"
|
||||
@@ -79,10 +78,6 @@ extern char yytext[];
|
||||
static char last_comment_[256] = "";
|
||||
static char * last_comment = 0;
|
||||
|
||||
#if 0
|
||||
static Hash_Table macros;
|
||||
#endif
|
||||
|
||||
/* keyword lookup table */
|
||||
|
||||
static Hash_Table keyword_dictionary;
|
||||
@@ -258,14 +253,6 @@ SCANinitialize( void ) {
|
||||
/* not "unknown", but certainly won't be looked up by type! */
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* init macro table, destroy old one if any */
|
||||
if( macros ) {
|
||||
HASHdestroy( macros );
|
||||
}
|
||||
macros = HASHcreate( 16 );
|
||||
#endif
|
||||
|
||||
/* set up errors on first time through */
|
||||
if( ERROR_include_file == ERROR_none ) {
|
||||
ERROR_include_file =
|
||||
@@ -355,42 +342,17 @@ SCANprocess_identifier_or_keyword( void ) {
|
||||
return k->token;
|
||||
}
|
||||
}
|
||||
|
||||
/* now we have an identifier token */
|
||||
#if 0
|
||||
/* if macro invocation */
|
||||
/* SCANpush_buffer(); */
|
||||
/* strcpy(SCANbuffer.text, macro_expansion); */
|
||||
/* return yylex(); */
|
||||
/* else */
|
||||
element.key = test_string;
|
||||
if( ( found = HASHsearch( macros, &element, HASH_FIND ) ) != NULL ) {
|
||||
free( test_string );
|
||||
SCANpush_buffer();
|
||||
STRINGcopy_into( SCANbuffer.text, found->data );
|
||||
return yylex();
|
||||
yylval.symbol = SYMBOLcreate( test_string, yylineno, current_filename );
|
||||
if( k ) {
|
||||
/* built-in function/procedure */
|
||||
return( k->token );
|
||||
} else {
|
||||
#endif
|
||||
|
||||
yylval.symbol = SYMBOLcreate( test_string, yylineno, current_filename );
|
||||
if( k ) {
|
||||
/* built-in function/procedure */
|
||||
return( k->token );
|
||||
} else {
|
||||
/* plain identifier */
|
||||
/* translate back to lower-case */
|
||||
SCANlowerize( test_string );
|
||||
return TOK_IDENTIFIER;
|
||||
}
|
||||
#if 0
|
||||
return ( k ? k->token : TOK_IDENTIFIER );
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#if 0
|
||||
/* plain identifier */
|
||||
/* translate back to lower-case */
|
||||
SCANlowerize( test_string );
|
||||
return TOK_IDENTIFIER;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
int
|
||||
@@ -400,13 +362,6 @@ SCANprocess_string( void ) {
|
||||
/* strip off quotes */
|
||||
yylval.string = SCANstrdup( yytext + 1 ); /* remove 1st single quote */
|
||||
|
||||
#if 0
|
||||
s = strrchr( yylval.string, '\'' );
|
||||
if( s ) {
|
||||
*s = '\0'; /* remove last single quote */
|
||||
}
|
||||
#endif
|
||||
|
||||
/* change pairs of quotes to single quotes */
|
||||
for( s = d = yylval.string; *s; ) {
|
||||
if( *s != '\'' ) {
|
||||
|
||||
Reference in New Issue
Block a user