\RequirePackage{tikz}
\RequirePackage{listings}
\RequirePackage{stmaryrd}
\RequirePackage{amsmath}
\RequirePackage{TBcolors}

\lstdefinelanguage{FSP}{
  keywords={range,const,forall,if,then,else,set,property,when,progress},%
  otherkeywords={@},%
  sensitive,%
  morestring=[b]",%
  morecomment=[l]//,%
  morecomment=[s]{/*}{*/},%
  mathescape=true,%
  moredelim={**[is][\color{Orange}]{/*|*/}{/*|*/}},%
  extendedchars=true,%
  literate={à}{{\`a}}1 {À}{{\`A}}1 {ä}{{\"a}}1 {Ä}{{\"A}}1 {á}{{\'a}}1 {ã}{{\~a}}1 {é}{{\'e}}1 {è}{{\`e}}1 {Ç}{{\c C}}1 {ç}{{\c c}}1 {€}{\euro}1 {ö}{{\"o}}1 {ü}{{\"u}} 1{Ö}{{\"O}}1 {Ü}{{\"U}}1 {µ}{\textmu}1 {ß}{{\ss}}1 {î}{{\^i}}1,%TODO: add more possibilities
}
%{}{{\}}1

\tikzset{lts/.style={font=\footnotesize,line width=1pt,every state/.style={fill=cyan,inner sep=2mm,minimum size=0mm},baseline=(0.base)}}

\newcommand{\fsp}[2][]{\lstinline[language=FSP,basicstyle=\ttfamily,identifierstyle=\color{Bleu},#1]!#2!}

\lstnewenvironment{FSP}[1][]{\lstset{language=FSP,basicstyle=\ttfamily,identifierstyle=\color{Bleu},commentstyle=\rmfamily\color{gray},#1}}{}%

\newcommand{\inputFSP}[2][]{%
  \lstinputlisting[language=FSP,basicstyle=\ttfamily,identifierstyle=\color{Bleu},#1]{#2}%
}
