Using "begin" and "BEGIN" instead of "start" and "START" for "end" and "END"
This commit is contained in:
parent
0fd5761860
commit
8ac4abef5f
@ -430,18 +430,18 @@ int code_context_set_identifier(Code * code, char const * identifier)
|
|||||||
"NULL",
|
"NULL",
|
||||||
"assignment",
|
"assignment",
|
||||||
"declaration",
|
"declaration",
|
||||||
|
"declaration begin",
|
||||||
"declaration end",
|
"declaration end",
|
||||||
"declaration or function",
|
"declaration or function",
|
||||||
"declaration parameters",
|
"declaration parameters",
|
||||||
"declaration start",
|
|
||||||
"enumeration constant",
|
"enumeration constant",
|
||||||
"enumeration name",
|
"enumeration name",
|
||||||
"enumeration value",
|
"enumeration value",
|
||||||
"function",
|
"function",
|
||||||
|
"function begin",
|
||||||
"function call",
|
"function call",
|
||||||
"function end",
|
"function end",
|
||||||
"function parameters",
|
"function parameters",
|
||||||
"function start",
|
|
||||||
"label",
|
"label",
|
||||||
"parameters",
|
"parameters",
|
||||||
"parameters type",
|
"parameters type",
|
||||||
|
@ -34,18 +34,18 @@ typedef enum _CodeContext
|
|||||||
CODE_CONTEXT_NULL = 0,
|
CODE_CONTEXT_NULL = 0,
|
||||||
CODE_CONTEXT_ASSIGNMENT,
|
CODE_CONTEXT_ASSIGNMENT,
|
||||||
CODE_CONTEXT_DECLARATION,
|
CODE_CONTEXT_DECLARATION,
|
||||||
|
CODE_CONTEXT_DECLARATION_BEGIN,
|
||||||
CODE_CONTEXT_DECLARATION_END,
|
CODE_CONTEXT_DECLARATION_END,
|
||||||
CODE_CONTEXT_DECLARATION_OR_FUNCTION,
|
CODE_CONTEXT_DECLARATION_OR_FUNCTION,
|
||||||
CODE_CONTEXT_DECLARATION_PARAMETERS,
|
CODE_CONTEXT_DECLARATION_PARAMETERS,
|
||||||
CODE_CONTEXT_DECLARATION_START,
|
|
||||||
CODE_CONTEXT_ENUMERATION_CONSTANT,
|
CODE_CONTEXT_ENUMERATION_CONSTANT,
|
||||||
CODE_CONTEXT_ENUMERATION_NAME,
|
CODE_CONTEXT_ENUMERATION_NAME,
|
||||||
CODE_CONTEXT_ENUMERATION_VALUE,
|
CODE_CONTEXT_ENUMERATION_VALUE,
|
||||||
CODE_CONTEXT_FUNCTION,
|
CODE_CONTEXT_FUNCTION,
|
||||||
|
CODE_CONTEXT_FUNCTION_BEGIN,
|
||||||
CODE_CONTEXT_FUNCTION_CALL,
|
CODE_CONTEXT_FUNCTION_CALL,
|
||||||
CODE_CONTEXT_FUNCTION_END,
|
CODE_CONTEXT_FUNCTION_END,
|
||||||
CODE_CONTEXT_FUNCTION_PARAMETERS,
|
CODE_CONTEXT_FUNCTION_PARAMETERS,
|
||||||
CODE_CONTEXT_FUNCTION_START,
|
|
||||||
CODE_CONTEXT_LABEL,
|
CODE_CONTEXT_LABEL,
|
||||||
CODE_CONTEXT_PARAMETERS,
|
CODE_CONTEXT_PARAMETERS,
|
||||||
CODE_CONTEXT_PARAMETERS_TYPE,
|
CODE_CONTEXT_PARAMETERS_TYPE,
|
||||||
|
@ -310,7 +310,7 @@ static int _function_definition(C99 * c99)
|
|||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
DEBUG_GRAMMAR();
|
DEBUG_GRAMMAR();
|
||||||
code_context_set(c99->code, CODE_CONTEXT_FUNCTION_START);
|
code_context_set(c99->code, CODE_CONTEXT_FUNCTION_BEGIN);
|
||||||
ret |= _compound_statement(c99);
|
ret |= _compound_statement(c99);
|
||||||
code_context_set(c99->code, CODE_CONTEXT_FUNCTION_END);
|
code_context_set(c99->code, CODE_CONTEXT_FUNCTION_END);
|
||||||
return ret;
|
return ret;
|
||||||
@ -364,10 +364,10 @@ static int _declaration_specifiers(C99 * c99)
|
|||||||
* function-specifier [ declaration-specifiers ] */
|
* function-specifier [ declaration-specifiers ] */
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
int looped = 0;
|
int looped;
|
||||||
|
|
||||||
DEBUG_GRAMMAR();
|
DEBUG_GRAMMAR();
|
||||||
for(;; looped = 1)
|
for(looped = 0;; looped = 1)
|
||||||
if(_parse_in_set(c99, c99set_storage_class_specifier))
|
if(_parse_in_set(c99, c99set_storage_class_specifier))
|
||||||
ret |= _storage_class_specifier(c99);
|
ret |= _storage_class_specifier(c99);
|
||||||
else if(_parse_in_set(c99, c99set_type_specifier))
|
else if(_parse_in_set(c99, c99set_type_specifier))
|
||||||
|
Loading…
Reference in New Issue
Block a user