def action_parser(*args):
    """
    <action> ::= <behaviour> <m-conf>
    <behaviour> ::= {<task>}
    <m-conf> ::= <id>
    <task> ::= {"L" | "R" | "P" <id> | "E" | "N" | "PNone"}

    The "P" (for the printing task) isn't separated from the <id> by the
    tokenizer. See TuringMachine.perform for more information about the tasks.
    """
    return args[:-1], args[-1]
