def _parse_action(action):
i_open = action.find('<STR_LIT:(>')<EOL>if i_open is -<NUM_LIT:1>:<EOL><INDENT>return {'<STR_LIT:name>': action, '<STR_LIT:args>': [], '<STR_LIT>': False}<EOL><DEDENT>i_close = action.rfind('<STR_LIT:)>')<EOL>if i_close is -<NUM_LIT:1>:<EOL><INDENT>raise Exception('<STR_LIT>')<EOL><DEDENT>action_name = action[:i_open]<EOL>arglist = action[i_open+<NUM_LIT:1>:i_close].strip()<EOL>if not arglist:<EOL><INDENT>return {'<STR_LIT:name>': action_name, '<STR_LIT:args>': [], '<STR_LIT>': False}<EOL><DEDENT>if '<STR_LIT:*>' in arglist:<EOL><INDENT>return {'<STR_LIT:name>': action_name, '<STR_LIT:args>': [], '<STR_LIT>': True}<EOL><DEDENT>return {'<STR_LIT:name>': action_name, '<STR_LIT:args>': _parse_arg_list(arglist), '<STR_LIT>': False}<EOL>
Parses a single action item, for instance one of the following:

    m; m(); m(True); m(*)

The brackets must match.