--- temp/ogre/OgreMain/src/OgreScriptLexer.cpp	2008-06-29 20:24:28.000000000 +0200
+++ ogre/OgreMain/src/OgreScriptLexer.cpp	2008-10-22 21:54:38.000000000 +0200
@@ -39,7 +39,7 @@
 	ScriptTokenListPtr ScriptLexer::tokenize(const String &str, const String &source)
 	{
 		// State enums
-		enum{ READY = 0, COMMENT, MULTICOMMENT, WORD, QUOTE, VAR };
+		enum{ READY = 0, COMMENT, MULTICOMMENT, WORD, QUOTE, VAR, POSSIBLECOMMENT };
 
 		// Set up some constant characters of interest
 #if OGRE_WCHAR_T_STRINGS
@@ -67,13 +67,7 @@
 			switch(state)
 			{
 			case READY:
-				if(c == slash && lastc == slash)
-				{
-					// Comment start, clear out the lexeme
-					lexeme = "";
-					state = COMMENT;
-				}
-				else if(c == star && lastc == slash)
+				if(c == star && lastc == slash)
 				{
 					lexeme = "";
 					state = MULTICOMMENT;
@@ -95,11 +89,14 @@
 					lexeme = c;
 					setToken(lexeme, line, source, tokens.get());
 				}
-				else if(!isWhitespace(c) && c != slash)
-				{
+				else if(!isWhitespace(c)) {
 					lexeme = c;
+					if (c == slash) {
+						state = POSSIBLECOMMENT;
+					} else {
 					state = WORD;
 				}
+				}
 				break;
 			case COMMENT:
 				// This newline happens to be ignored automatically
@@ -110,6 +107,18 @@
 				if(c == slash && lastc == star)
 					state = READY;
 				break;
+			case POSSIBLECOMMENT:
+				//We're not sure if it's a comment yet, it could also be a regular word (just starting with a slash).
+				if(c == slash && lastc == slash)
+				{
+					// Comment start, clear out the lexeme
+					lexeme = "";
+					state = COMMENT;
+					break;
+				} else {
+					state = WORD;
+					//If it's not a comment, fall through to the WORD state below
+				}
 			case WORD:
 				if(isNewline(c))
 				{

