I want to define a macro with two parameters which delimited by optional spaces. For example, from the following code
\def\mymacro #1 #2 {#1:#2 }
\mymacro one two others
I get one:two others. But if some argument is ended by a control sequence, such as
\mymacro \foo \bar others
I could not get \foo:\bar others since TeX will ignore spaces after control sequences.
How could I resolve this problem?
[Edit] Add some background: for some reasons, I need to redefine a primitive command as a macro and make it behave like the primitive command. For example, the <number> arguments of the primitive command may be of the forms 64 or "5B or `\a or \foo, etc. And the spaces are optional in the sense of primitive commands.

\mymacro {\foo} {\bar} others. But then, why not just define the macro as\def\mymacro#1#2{#1:#2}? – A.Ellett Jan 21 '15 at 03:27