Sub Articulo 124.1
Using pstricks for this job seems to be an overkill.
The cleanest and most efficient (and even simplest?) approach is
a small special signals font which handles / and \ via ligatures.
(See below).
But even without that
it should suffice to use rules for the horizontal bars and
a slash and a backslash for / and \
In this case, instead of recursion I would use active characters . and -
The first appearance in a row would insert \ or /
and redefine . and - accordingly.
At the beginning . and - must have a special meaning to avoid
a starting \ or /.
\begingroup
\catcode`\. \active \catcode`\- \active
\gdef\signals {\catcode`\. \active \catcode`\- \active
\let . \startdot \let-\startbar }
\gdef\startdot {\let-\firstbar \let .\lowbar \lowbar }
\gdef\startbar {\let.\firstdot \let -\highbar \highbar }
\gdef\firstdot {\let-\firstbar \let .\lowbar \downslash \lowbar }
\gdef\firstbar {\let.\firstdot \let -\highbar \upslash \highbar }
\endgroup
%% The following definitions are crude.
%% They do not fit together
%% Moreover, for better efficiency they should by stored in boxes
%% with \setbox and called with \copy
\def \downslash {$\backslash$}
\def \upslash {/}
\def \highbar {$\overline{\phantom/}$}
\def \lowbar {$\underline{\phantom/}$}
Test: {\signals ..-.--..---../-- }
%%%%
But now to the optimal ( I think :-) solution:
%% signals.mf %% the MetaFont code
font_size=12pt#;
mode_setup;
D# := 3pt# ; % depth
H# := 9pt# ; % height
W# := 10pt# ; % width
S# := 8pt# ; % width of slash
p# := .7pt# ; % pen
define_pixels ( D,H,W, S,p ) ;
ligtable ".": "-" |=:| "/" ;
ligtable "-": "." |=:| "\" ;
beginchar (".", W#, H#, D# );
pickup pencircle scaled p ;
draw (0,-D)--(W,-D);
endchar;
beginchar ("-", W#, H#, D# );
pickup pencircle scaled p ;
draw (0,H)--(W,H);
endchar;
beginchar ("/", S#, H#, D# );
pickup pencircle scaled p ;
draw (0,-D)--(S,H);
endchar;
beginchar ("\", S#, H#, D# );
pickup pencircle scaled p ;
draw (0,H)--(S,-D);
endchar;
end
%% end : signals.mf %%
%% test.tex :
\font\signals signals at 12truept
Test: {\signals ..-.--..---../-- }
\end