\newtoks\CarbonToks
\def\startCarbon#1{%
  \ifx#1\stopCarbon\relax\stopCarbon\else%
  \bgroup\aftergroup\startCarbon%
  \doCarbon#1\fi\egroup%
  }

\def\dodoCarbon#1{%
  \ifcat#1a
     \ifx#1a
          \doglobal\appendtoks o\to\CarbonToks%
     \else\ifx#1b
          \doglobal\appendtoks p\to\CarbonToks%
     \else\ifx#1c
          \doglobal\appendtoks g\to\CarbonToks%
     \else\ifx#1d
          \doglobal\appendtoks t\to\CarbonToks%
     \else\ifx#1e
          \doglobal\appendtoks i\to\CarbonToks%
     \else\ifx#1f
          \doglobal\appendtoks v\to\CarbonToks%
     \else\ifx#1g
          \doglobal\appendtoks c\to\CarbonToks%
     \else\ifx#1i
          \doglobal\appendtoks e\to\CarbonToks%
     \else\ifx#1l
          \doglobal\appendtoks r\to\CarbonToks%
     \else\ifx#1m
          \doglobal\appendtoks n\to\CarbonToks%
     \else\ifx#1n
          \doglobal\appendtoks m\to\CarbonToks%
     \else\ifx#1o
          \doglobal\appendtoks a\to\CarbonToks%
     \else\ifx#1p
          \doglobal\appendtoks b\to\CarbonToks%
     \else\ifx#1r
          \doglobal\appendtoks l\to\CarbonToks%
     \else\ifx#1s
          \doglobal\appendtoks z\to\CarbonToks%
     \else\ifx#1t
          \doglobal\appendtoks d\to\CarbonToks%
     \else\ifx#1v
          \doglobal\appendtoks f\to\CarbonToks%
     \else\ifx#1z
          \doglobal\appendtoks s\to\CarbonToks%
     \else\ifx#1A
          \doglobal\appendtoks O\to\CarbonToks%
     \else\ifx#1B
          \doglobal\appendtoks P\to\CarbonToks%
     \else\ifx#1C
          \doglobal\appendtoks G\to\CarbonToks%
     \else\ifx#1D
          \doglobal\appendtoks T\to\CarbonToks%
     \else\ifx#1E
          \doglobal\appendtoks I\to\CarbonToks%
     \else\ifx#1F
          \doglobal\appendtoks V\to\CarbonToks%
     \else\ifx#1G
          \doglobal\appendtoks C\to\CarbonToks%
     \else\ifx#1I
          \doglobal\appendtoks E\to\CarbonToks%
     \else\ifx#1L
          \doglobal\appendtoks R\to\CarbonToks%
     \else\ifx#1M
          \doglobal\appendtoks N\to\CarbonToks%
     \else\ifx#1N
          \doglobal\appendtoks M\to\CarbonToks%
     \else\ifx#1O
          \doglobal\appendtoks A\to\CarbonToks%
     \else\ifx#1P
          \doglobal\appendtoks B\to\CarbonToks%
     \else\ifx#1R
          \doglobal\appendtoks L\to\CarbonToks%
     \else\ifx#1S
          \doglobal\appendtoks Z\to\CarbonToks%
     \else\ifx#1T
          \doglobal\appendtoks T\to\CarbonToks%
     \else\ifx#1V
          \doglobal\appendtoks F\to\CarbonToks%
     \else\ifx#1Z
          \doglobal\appendtoks S\to\CarbonToks%
     \else\doglobal\appendtoks#1\to\CarbonToks%
     \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
     \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
     \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
     \fi\fi\fi\fi\fi\fi%
     \else\doglobal\appendtoks#1\to\CarbonToks%
     \fi
     }
\def\stopCarbon{\showthe\CarbonToks\the\CarbonToks\relax}

\starttext

\startCarbon
Ecco una prova di alfabeto carbonaro.
\stopCarbon

\stoptext
