\documentclass[a4paper,11pt]{article}
\usepackage[polish]{babel}
\usepackage[utf8]{inputenc} 
\usepackage[T1]{fontenc}
\usepackage{fourier}
\usepackage[scaled=0.85]{beramono}
\usepackage{listings}
\usepackage{xcolor}
\usepackage{geometry}

\geometry{width=126mm}


\lstdefinelanguage{Alvis}{
  keywords={agent, in, out, delay, jump, exec, alt, data, type, 
            critical, start, exit, far, loop, if, else, elseif, 
            select, cli, sti, proc, elseif, every, environment, null},
  keywords=[2]{Char, Bool ,Int, Double, String, rem, sqrt, head, tail, 
               signal, durable, queue},
  sensitive=true,
  morecomment=[l]{--},
  morecomment=[s]{/*}{*/},
  morestring=[b]",
}

\lstset{literate=
  {ą}{{\k{a}}}{1} {ć}{{\'c}}{1} {ę}{{\k{e}}}{1} 
  {ó}{{\'o}}{1}   {ń}{{\'n}}{1} {ł}{{\l{}}}{1} 
  {ś}{{\'s}}{1}   {ź}{{\'z}}{1} {ż}{{\.z}}{1} 
  {Ą}{{\k{A}}}{1} {Ć}{{\'C}}{1} {Ę}{{\k{E}}}{1} 
  {Ó}{{\'O}}{1}   {Ń}{{\'N}}{1} {Ł}{{\L{}}}{1} 
  {Ś}{{\'S}}{1}   {Ź}{{\'Z}}{1} {Ż}{{\.Z}}{1},
}

\lstset{language=Alvis,
  basicstyle=\ttfamily\small,
  keywordstyle=\bfseries,
  keywordstyle=[2]\bfseries\color{gray},
  commentstyle=\itshape\color{gray},
  numberstyle=\tiny\bfseries\color{gray},
  numbers=left,
}

\begin{document}

\begin{lstlisting}
agent Buffer {
  i :: Int = 0;   -- parametr typu całkowitego
  proc (i == 0) put { in put; i = 1; }
  proc (i /= 0) get { out get; i = 0; }}

/* agent Receiver {
  loop { in get; }} */
\end{lstlisting}

\end{document}