%D \module
%D   [      file=s-syn-01,
%D        version=0000.00.00,
%D          title=\CONTEXT\ Style File,
%D       subtitle=Preliminary Syntax Stuff,
%D         author=Hans Hagen,
%D           date=\currentdate,
%D      copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

%D This is needed for the \METAFUN\ manual (this module was
%D called \type {p-syn-01} on my machine).

\unprotect

\def\Indent   #1{\ifvmode\noindent\hbox to 2em{\hss#1}\else#1\fi}
\def\Sugar    #1{\ifhmode\unskip\unskip\unskip\fi\kern.25em{#1}\kern.25em\ignorespaces}
\def\Something#1{\Sugar{\mathematics{\langle\hbox{#1}\rangle}}}
\def\Lbrace     {\Sugar{\tttf\leftargument}}
\def\Rbrace     {\Sugar{\tttf\rightargument}}
\def\Or         {\Sugar{\mathematics{\vert}}}
\def\Optional #1{\Sugar{\mathematics{[\hbox{#1}]}}}
\def\Means      {\Sugar{\mathematics{\rightarrow}}}
\def\Tex      #1{\Sugar{\type{#1}}}
\def\Literal  #1{\Sugar{\type{#1}}}
\def\Syntax   #1{\strut\kern-.25em{#1}\kern-.25em}
\def\Next       {\crlf\hbox to 2em{}\nobreak}
\def\Whatever #1{\Sugar{\mathematics{(\hbox{#1})}}}
\def\Quote    #1{\Sugar{\quote{#1}}}

\def\Or         {\Sugar{\Indent{\mathematics{\vert}}}}
\def\Means      {\Sugar{\Indent{\mathematics{\rightarrow}}}}

\def\StartSyntax
  {\goodbreak
   \startlines
   \catcode`\#=12
   \let\L \Literal
   \let\S \Something
   \def\FL##1{\color[darkred]{\L{##1}}}
   \def\FS##1{\S{\color[darkred]{##1}}}
   \let\M \Means
   \let\O \Or
   \let\Q \Quote
   \let\LB\Lbrace
   \let\RB\Rbrace}

\def\StopSyntax
  {\stoplines}

\protect \endinput