version 1.1, 1999/09/28 21:26:20
|
version 1.5, 1999/12/07 19:10:47
|
Line 380 EndLine ([\r][\n]|[\n])
|
Line 380 EndLine ([\r][\n]|[\n])
|
^{Spaces}"/BEG" { LLDBUG_PRL1("[LET]"); Pcount = 0; init_funcstack(); BEGIN S_LET; RETURN(CAPA_LET); } |
^{Spaces}"/BEG" { LLDBUG_PRL1("[LET]"); Pcount = 0; init_funcstack(); BEGIN S_LET; RETURN(CAPA_LET); } |
^{Spaces}"/VERB" { |
^{Spaces}"/VERB" { |
LLDBUG_PRL1("[VERBATIM]"); |
LLDBUG_PRL1("[VERBATIM]"); |
Dynamic_buf = (char *)capa_malloc(sizeof(char),1); |
Dynamic_buf = (char *)capa_malloc(sizeof(char),10); |
Dynamic_buf_max = 1; |
Dynamic_buf_max = 10; |
Dynamic_buf_cur = 0; |
Dynamic_buf_cur = 0; |
Dynamic_buf[0] = '\0'; |
Dynamic_buf[0] = '\0'; |
BEGIN S_VERB; |
BEGIN S_VERB; |
Line 789 EndLine ([\r][\n]|[\n])
|
Line 789 EndLine ([\r][\n]|[\n])
|
} |
} |
} |
} |
|
|
<S_VARIABLE,S_ANSWER>[:]{Number}+[EeFf] { char num[ONE_TWO_EIGHT], fmt[SIXTEEN]; |
<S_VARIABLE,S_ANSWER>[:]{Number}+[EeFf] { char num[ONE_TWO_EIGHT], fmt[SMALL_LINE_BUFFER]; |
int i; |
int i; |
LLDBUG_PR2("[FORMAT<%s>]",yytext); |
LLDBUG_PR2("[FORMAT<%s>]",yytext); |
for(i=0;i<yyleng-2;i++) { |
for(i=0;i<yyleng-2;i++) { |
Line 1135 char *
|
Line 1135 char *
|
strsave(char *s) |
strsave(char *s) |
{ |
{ |
char *p; |
char *p; |
|
if (s==NULL) {return s;} |
p=capa_malloc(strlen(s)+1,1); |
p=capa_malloc(strlen(s)+1,1); |
strcpy(p,s); |
strcpy(p,s); |
return (p); |
return (p); |
Line 1194 capa_msg(int type, char *p)
|
Line 1195 capa_msg(int type, char *p)
|
} |
} |
warn_msg[idx]=0; |
warn_msg[idx]=0; |
append_error(warn_msg); append_error(p); |
append_error(warn_msg); append_error(p); |
break; |
break; |
case MESSAGE_WARN: |
case MESSAGE_WARN: |
default: |
default: |
sprintf(tmp_line,", Line %d: WARNING:", Current_line[Input_idx]); |
sprintf(tmp_line,", Line %d: WARNING:", Current_line[Input_idx]); |
Line 1478 void append_dynamic_buf(new_str) char *n
|
Line 1479 void append_dynamic_buf(new_str) char *n
|
|
|
if(new_str==NULL) return; |
if(new_str==NULL) return; |
len=strlen(new_str); |
len=strlen(new_str); |
#define LEX_DBUG 1 |
|
#ifdef LEX_DBUG |
#ifdef LEX_DBUG |
printf("before: len %d; Dynamic_buf_cur %d; Dynamic_buf_max %d\n", |
printf("before: len %d; Dynamic_buf_cur %d; Dynamic_buf_max %d\n", |
len,Dynamic_buf_cur,Dynamic_buf_max); |
len,Dynamic_buf_cur,Dynamic_buf_max); |
Line 1499 void append_dynamic_buf(new_str) char *n
|
Line 1499 void append_dynamic_buf(new_str) char *n
|
#ifdef LEX_DBUG |
#ifdef LEX_DBUG |
printf("after: len %d; Dynamic_buf_cur %d; Dynamic_buf_max %d\n", |
printf("after: len %d; Dynamic_buf_cur %d; Dynamic_buf_max %d\n", |
len,Dynamic_buf_cur,Dynamic_buf_max); |
len,Dynamic_buf_cur,Dynamic_buf_max); |
|
printf("Dyn_buf %s; added %s\n",Dynamic_buf,new_str); |
#endif /* LEX_DBUG */ |
#endif /* LEX_DBUG */ |
} |
} |
|
|