I am using the listings package for LaTex to include GAMS-Code in my LaTex-file. The package does not support GAMS as a language. So I have to define the language like descriped in this article. In GAMS, after declaring a symbol there is place for an explanatory text. I want to make the listings package to recognize this as a comment, so I can set special color options and keywords are not formated as keywords. But I can only define comments by their delimiters and not by their position (starting the second word after certain keywords). So as an example the GAMS code contains
sets i decision variables
Then "decision variables" is the explanatory text and I want it to have a different color (blue). "variables" is a keyword but it should not be marked as one in my Latex-file because it is inside the explanatory text. Is there any chance of making the listings package recognizing the explanatory text as a comment. What would my LaTex command
\lstdefinelanguage{GAMS}{
morekeywords={sets, variables,...}
morecomment= <This should be the interesting part>
look like?