Esempio n. 1
0
void CfgSpecialToken (const IdentTok* Table, unsigned Size, const char* Name)
/* Map an identifier to one of the special tokens in the table */
{
    unsigned I;

    /* We need an identifier */
    if (CfgTok == CFGTOK_IDENT) {

        /* Make it upper case */
        SB_ToUpper (&CfgSVal);

        /* Linear search */
        for (I = 0; I < Size; ++I) {
            if (SB_CompareStr (&CfgSVal, Table[I].Ident) == 0) {
                CfgTok = Table[I].Tok;
                return;
            }
        }

    }

    /* Not found or no identifier */
    CfgError (&CfgErrorPos, "%s expected", Name);
}
Esempio n. 2
0
void UpcaseSVal (void)
/* Make SVal upper case */
{
    SB_ToUpper (&CurTok.SVal);
}