예제 #1
0
/*
 * Production: String Expression (P)
 * FIRST set: { <<, e }
 */
void string_expression_p(void) {
    /* If the current token code is not SCC_OP_T (string concatination operator), return. */
    if (lookahead.code != SCC_OP_T)
        return;
    
    match(SCC_OP_T, NO_ATTR);
    primary_string_expression();
    string_expression_p();
}
예제 #2
0
/* FIRST(string expression’)={<>,e} 
<string expression’> -> 
	<> <primary string expression> <string expression’> | e
Author: Kwok Hong Kelvin Chan */
void string_expression_p(void){
	switch (lookahead_token.code){
		case SCC_OP_T:
			match(SCC_OP_T, NO_ATTR);
			primary_string_expression();
			string_expression_p();
			break;
	}
}
예제 #3
0
/* FIRST(string expression)={SVID_T, STR_T}
<string expression> -> 
	<primary string expression> <string expression’>
Author: Kyle Hinskens */
void string_expression(void){
	switch (lookahead_token.code){
	case SVID_T:
	case STR_T:
		primary_string_expression();
		string_expression_p();
		gen_incode("String expression parsed");
		break;
	}
}
예제 #4
0
/*
 * Production: String Expression
 * FIRST set: { SVID_T, STR_T }
 */
void string_expression(void) {
    primary_string_expression();
    string_expression_p();
    gen_incode("PLATY: String expression parsed");
}