% Sytax highlighting for the MPass language

\usepackage{listings}

\lstdefinestyle{verb}{
  basicstyle=\ttfamily\small,
  commentstyle=\itshape\color{red},
  keywordstyle=[1]\color{brown},   % labels
  keywordstyle=[2]\bfseries\color{blue},
  keywordstyle=[3]\bfseries\color{teal},
  % identifierstyle=
  numbers=left,
  numberstyle=\tiny,
  captionpos=b,
}

\lstdefinelanguage{mpass}{
  keywords=[1]{},  % for labels
  keywords=[2]{type,proc,exec,fail},
  morekeywords=[3]{send,recv,fwd,call},
  % otherkeywords={1,+,\&,*,-o,<-}, % : | ; ,
  alsoletter={'},
  keywordsprefix=', 
  sensitive=true,
  comment=[l]\%,
  morecomment=[n]{(*}{*)},
  % morecomment=[l]\#,  % for compiler directives
}

% in the individual files, if desired
% \lstset{style=verb,language=mpass}

% \begin{lstlisting}[language=mpass,style=verb,
%   caption={<caption text>},label=lst:<name>]
%   ... lambda code ...
% \end{lstlisting}
%
% \lstinline{...code...}
%
% \begin{lstlisting}[language=mpass,style=verb,numbers=none]
%   ...
% \end{lstlisting}
