I want to use math mode in lstlisting. How do I do that? How to put tab in this mode?
\begin{document}
\begin{lstlisting}[frame=single] % Start your code-block
module main()
enumerated States {$S_0$,$S_1$,$S_2$,$S_3$}
integer c;
initial : c = 0 and States = $S_0$;
endmodule
\end{lstlisting}
\end{document}
