Skip to content

The library does not handle action (call the function in part 3 of the bison file) #31

@leviettung200

Description

@leviettung200

My bison file contains the action in Grammar rules.
This action will call the functions declared at the end of the bison.
However your library doesn't handle it, what can I do to fix it?
Functions declared at the end of the bison file are necessary for business logic.

Sample Grammar rule:

CMD_LINE_RR :
    CMD_TOKEN_RR LT_INTVAL LT_COMMA LT_TEXT_EX LT_RETURN
	{
		_CMD_START("CMD_LINE_RR(0)");
		cmd_rr(cmd_line , $2, $4, "", "", "", "", "", "", "", "", "" );
	
		next_cmd();
	}
	|CMD_TOKEN_RR LT_INTVAL LT_COMMA LT_INTVAL LT_COMMA LT_INTVAL LT_COMMA LT_INTVAL LT_COMMA LT_INTVAL LT_COMMA LT_INTVAL LT_COMMA LT_INTVAL LT_COMMA LT_INTVAL LT_COMMA LT_INTVAL LT_COMMA LT_INTVAL LT_COMMA LT_INTVAL LT_RETURN
	{
		_CMD_START("CMD_LINE_RR(1)");
		cmd_rr(cmd_line , $2, $4, $6, $8, $10, $12, $14, $16, $18, $20, $22 );
	
		next_cmd();
	}
	|CMD_TOKEN_RR LT_INTVAL LT_COMMA LT_INTVAL LT_COMMA LT_INTVAL LT_COMMA LT_INTVAL LT_COMMA LT_INTVAL LT_COMMA LT_INTVAL LT_COMMA LT_INTVAL LT_COMMA LT_INTVAL LT_COMMA LT_INTVAL LT_RETURN
	{
		_CMD_START("CMD_LINE_RR(2)");
		cmd_rr(cmd_line , $2, $4, $6, $8, $10, $12, $14, $16, $18, "", "" );
	
		next_cmd();
	}
;

Sample c code(function):

int _CMD_START(char *s){
	#ifdef DEBUG
	printf("[%s][Line:%04d](+_+)%s\n",__FUNCTION__,__LINE__,s);
	#endif
	
	return 0;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions