%
% Set colours for syntax highlighting
%
\usepackage{color}
\definecolor{commentcolour}{rgb}{0.69, 0.13, 0.13}
\definecolor{tagcolour}{rgb}{0.0, 0.0, 1.0}
\definecolor{keywordcolour}{rgb}{0.72, 0.52, 0.04}
\definecolor{stringcolour}{rgb}{0.73, 0.56, 0.56}
\definecolor{identifiercolour}{rgb}{0.0, 0.0, 0.0}
\definecolor{xmlheadercolour}{rgb}{0.62, 0.12, 0.94}

\usepackage{listings}
\lstset{
  basicstyle=\ttfamily\small,
  keywordstyle=[0]\color{tagcolour},
  keywordstyle=[1]\color{keywordcolour},
  keywordstyle=[2]\color{xmlheadercolour},
  identifierstyle=\color{identifiercolour},
  commentstyle=\color{commentcolour},
  stringstyle=\color{stringcolour},
  showstringspaces=false
}

\lstdefinelanguage{PML}{
  morekeywords=[0]{commit,request,include,pracro,template,macro,
    scripts,script,maps,map,window,frame,spacer,label,lineedit,textedit,
    button,metawidget,checkbox,togglebutton,radiobuttons,combobox,listbox,
    multilist,field}, %
  morekeywords=[1]{user,name,value,caption,version,encoding,cpr,width,height,layout,%
    action,regexp,format}, %
  morekeywords=[2]{xml},%
  tag=**[s]<>,%
  sensitive=f,%
  morestring=[d]",% ??? doubled
  morecomment=[s]{<!--}{-->}%
}[keywords,comments,strings,html]%
\lstset{language=PML}
