Cool. Looking at listings.dvi (the original latex package doc), I see in that things like 'a <= b' were printed as 'a \le b'. Does listings do this automatically? (Doesn't seem be be doing that in my test)? Or, maybe this used mathescape?
This is an advanced feature of listings called literate programming, and I have never used it before. Please read page 48-49 of the latest listings package for details. It is likely that you will have to 'bypass validation' for this 'literate' option if you use lyx 1.5.0 rc1 or rc2. Cheers, Bo