int _find_key_word(const char* text);
+static scf_key_word_t number_postfix[] =
+{
+ {"l", SCF_LEX_WORD_CONST_INT},
+ {"ll", SCF_LEX_WORD_CONST_I64},
+
+ {"u", SCF_LEX_WORD_CONST_U32},
+ {"ul", SCF_LEX_WORD_CONST_U32},
+ {"ull", SCF_LEX_WORD_CONST_U64},
+
+ {"f", SCF_LEX_WORD_CONST_FLOAT},
+ {"lf", SCF_LEX_WORD_CONST_DOUBLE},
+};
+
+static int _lex_number_postfix(const char* postfix, int n)
+{
+ scf_key_word_t* key;
+ int i;
+
+ for (i = 0; i < sizeof(number_postfix) / sizeof(number_postfix[0]); i++) {
+ key = &number_postfix[i];
+
+ if (!strncmp(key->text, postfix, n))
+ return key->type;
+ }
+
+ return -EINVAL;
+}
+
static int __lex_getc(scf_lex_t* lex)
{
if (lex->fp)
return 0;
}
-static scf_key_word_t number_postfix[] =
-{
- {"l", SCF_LEX_WORD_CONST_INT},
- {"ll", SCF_LEX_WORD_CONST_I64},
-
- {"u", SCF_LEX_WORD_CONST_U32},
- {"ul", SCF_LEX_WORD_CONST_U32},
- {"ull", SCF_LEX_WORD_CONST_U64},
-
- {"f", SCF_LEX_WORD_CONST_FLOAT},
- {"lf", SCF_LEX_WORD_CONST_DOUBLE},
-};
-
-static int _lex_number_postfix(const char* postfix, int n)
-{
- scf_key_word_t* key;
- int i;
-
- for (i = 0; i < sizeof(number_postfix) / sizeof(number_postfix[0]); i++) {
- key = &number_postfix[i];
-
- if (!strncmp(key->text, postfix, n))
- return key->type;
- }
-
- return -EINVAL;
-}
-
int _lex_number_base_10(scf_lex_t* lex, scf_lex_word_t** pword, scf_string_t* s)
{
scf_char_t* c2;