--- scanner.l.orig	Sun May  2 06:41:57 2004
+++ scanner.l	Fri Jun 18 09:25:16 2004
@@ -695,6 +695,7 @@
 %x	SkipCurlyCpp
 %x	SkipCurlyEndDoc
 %x      SkipString
+%x      SkipSingleQuoteString
 %x	SkipInits
 %x	SkipCPP
 %x	SkipCPPBlock
@@ -776,6 +777,7 @@
 %x	SkipTemplate
 %x	EndTemplate
 %x      CopyArgString
+%x      CopyArgSingleQuoteString
 %x	CopyArgRound
 %x	CopyArgSharp
 %x	CopyArgComment
@@ -790,6 +792,7 @@
 %x	AnchorLabel
 %x	ReadInitializer
 %x	CopyString
+%x     CopySingleQuoteString
 %x	CopyRound
 %x	CopyCurly
 %x	IDLUnionCase
@@ -888,6 +891,13 @@
   					  lastStringContext=NextSemi;
 					  BEGIN(SkipString);
   					}
+<NextSemi>\'                           {
+            if (!insidePHP)
+              REJECT;
+
+                                         lastStringContext=NextSemi;
+                                         BEGIN(SkipSingleQuoteString);
+                                       }
 <NextSemi>[;,]				{ 
   					  unput(*yytext);
   					  BEGIN( FindMembers ); 
@@ -2009,6 +2019,15 @@
 					    BEGIN(CopyString);
 					  }
 					}
+<ReadInitializer>\'                    {
+                                         if (!insidePHP)
+                                         REJECT;
+
+                                            lastStringContext=YY_START;
+                                           current->initializer+=*yytext; 
+                                           pCopyQuotedString=&current->initializer;
+                                           BEGIN(CopySingleQuoteString);
+                                       }
   /*
 <ReadInitializer>"->"			{
   					  current->initializer+=yytext; 
@@ -2070,7 +2089,7 @@
   					  *pCopyQuotedString+=*yytext;
   					  BEGIN( lastStringContext ); 
 					}
-<CopyString>"/*"|"*/"|"//"		{
+<CopyString>"/*"|"*/"|"//"|#|\'                {
   					  *pCopyQuotedString+=yytext;
   					}
 <CopyString>\n				{
@@ -2081,6 +2100,25 @@
   					  *pCopyQuotedString+=*yytext;
   					}
 
+  /* generic single-quoted string copy rules */
+<CopySingleQuoteString>\\.                             {
+                                         *pCopyQuotedString+=yytext;
+                                       }
+<CopySingleQuoteString>\'                              { 
+                                         *pCopyQuotedString+=*yytext;
+                                         BEGIN( lastStringContext ); 
+                                       }
+<CopySingleQuoteString>"/*"|"*/"|"//"|#|\"             {
+                                         *pCopyQuotedString+=yytext;
+                                       }
+<CopySingleQuoteString>\n                              {
+                                         *pCopyQuotedString+=*yytext;
+                                         yyLineNr++;
+                                       }
+<CopySingleQuoteString>.                               {
+                                         *pCopyQuotedString+=*yytext;
+                                       }
+
   /* generic round bracket list copy rules */
 <CopyRound>\"				{
 					  *pCopyRoundString+=*yytext;
@@ -2088,6 +2126,15 @@
 					  lastStringContext=YY_START;
 					  BEGIN(CopyString);
 					}
+<CopyRound>\'                          {
+            if (!insidePHP)
+              REJECT;
+
+                                         *pCopyRoundString+=*yytext;
+                                         pCopyQuotedString=pCopyRoundString;
+                                         lastStringContext=YY_START;
+                                         BEGIN(CopySingleQuoteString);
+                                       }
 <CopyRound>"("				{
   					  *pCopyRoundString+=*yytext;
   					  roundCount++;
@@ -2113,6 +2160,15 @@
 					  lastStringContext=YY_START;
 					  BEGIN(CopyString);
 					}
+<CopyCurly>\'                          {
+            if (!insidePHP)
+              REJECT;
+
+                                         *pCopyCurlyString+=*yytext;
+                                         pCopyQuotedString=pCopyCurlyString;
+                                         lastStringContext=YY_START;
+                                         BEGIN(CopySingleQuoteString);
+                                       }
 <CopyCurly>"{"				{
   					  *pCopyCurlyString+=*yytext;
 					  curlyCount++;
@@ -2224,6 +2280,13 @@
   					  lastStringContext=YY_START;
   				          BEGIN( SkipString ); 
 					}
+<SkipSquare>\'                         {
+              if (!insidePHP)
+                REJECT;
+
+                                         lastStringContext=YY_START;
+                                         BEGIN( SkipSingleQuoteString ); 
+                                       }
 <SkipSquare>[^\n\[\]\"]+
 <FindMembers>"<"			{ addType( current ) ;
 					  current->type += yytext ;
@@ -2297,6 +2360,15 @@
                                           lastStringContext=YY_START;
                                           BEGIN( CopyString );
 					}
+<ReadBody,ReadNSBody,ReadBodyIntf>\'   { 
+                                          if (!insidePHP)
+                                            REJECT;
+
+                                          current->program += yytext ; 
+                                          pCopyQuotedString = &current->program;
+                                          lastStringContext=YY_START;
+                                          BEGIN( CopySingleQuoteString );
+                                       }
 <ReadBody,ReadNSBody,ReadBodyIntf>"/*"{B}*		{ current->program += yytext ;
 					  lastContext = YY_START ;
 					  BEGIN( Comment ) ;
@@ -2709,6 +2781,15 @@
 					  lastCopyArgStringContext = YY_START;
   					  BEGIN( CopyArgString );
   					}
+<ReadFuncArgType,CopyArgRound,CopyArgSharp,ReadTempArgs>\'     {
+            if (!insidePHP)
+              REJECT;
+
+                                         *copyArgString+=*yytext;
+                                         fullArgString+=*yytext;
+                                         lastCopyArgStringContext = YY_START;
+                                         BEGIN( CopyArgSingleQuoteString );
+                                       }
 <ReadFuncArgType,ReadTempArgs>"("	{
   					  *copyArgString+=*yytext;
   					  fullArgString+=*yytext;
@@ -2880,6 +2961,15 @@
   					  fullArgString+=*yytext;
 					  BEGIN( lastCopyArgStringContext );
   					}
+<CopyArgSingleQuoteString>\\.                  {
+                                         *copyArgString+=yytext;
+                                         fullArgString+=yytext;
+                                       }
+<CopyArgSingleQuoteString>\'                   {
+                                         *copyArgString+=*yytext;
+                                         fullArgString+=*yytext;
+                                         BEGIN( lastCopyArgStringContext );
+                                       }
 <ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSharp>{CHARLIT}     { 
   					  *copyArgString+=yytext; 
   					  fullArgString+=yytext; 
@@ -2972,6 +3062,15 @@
 					  lastStringContext=FuncPtrInit;
 					  BEGIN(CopyString);
 					}
+<FuncPtrInit>\'                                {
+            if (!insidePHP)
+              REJECT;
+
+                                          current->args += *yytext; 
+                                         pCopyQuotedString=&current->args;
+                                         lastStringContext=FuncPtrInit;
+                                         BEGIN(CopySingleQuoteString);
+                                       }
 <FuncPtrInit>{CHARLIT}			{
                                           current->args += yytext; 
   					}
@@ -3264,6 +3363,14 @@
   					  lastStringContext=SkipCurly;
   				          BEGIN( SkipString ); 
 					}
+<SkipCurly>\'                          { 
+              if (!insidePHP)
+                REJECT;
+
+                                         //addToBody(yytext);
+                                         lastStringContext=SkipCurly;
+                                         BEGIN( SkipSingleQuoteString ); 
+                                       }
 <SkipCurly>^{B}*"#"			{ 
   				          if (insidePHP)
   				            REJECT;
@@ -3301,6 +3408,13 @@
   					  lastStringContext=YY_START;
   				          BEGIN( SkipString ); 
 					}
+<SkipInits>\'                          {
+              if (!insidePHP)
+                REJECT;
+
+                                         lastStringContext=YY_START;
+                                         BEGIN( SkipSingleQuoteString ); 
+                                       }
 <SkipInits>;	                        {
   					  warn(yyFileName,yyLineNr,
 					      "Warning: Found ';' while parsing initializer list! "
@@ -3334,7 +3448,7 @@
   				          //addToBodyCond(yytext);
   					  BEGIN( lastStringContext ); 
 					}
-<SkipString>"/*"|"*/"|"//"		{
+<SkipString>"/*"|"*/"|"//"|#|\'                {
   				          //addToBodyCond(yytext);
   					}
 <SkipString>\n				{
@@ -3344,6 +3458,23 @@
 <SkipString>.				{
   				          //addToBodyCond(yytext);
   					}
+<SkipSingleQuoteString>\\.                             {
+                                         //addToBodyCond(yytext);
+                                       }
+<SkipSingleQuoteString>\'                              { 
+                                         //addToBodyCond(yytext);
+                                         BEGIN( lastStringContext ); 
+                                       }
+<SkipSingleQuoteString>"/*"|"*/"|"//"|#|\"             {
+                                         //addToBodyCond(yytext);
+                                       }
+<SkipSingleQuoteString>\n                              {
+                                         yyLineNr++;
+                                         //addToBodyCond(yytext);
+                                       }
+<SkipSingleQuoteString>.                               {
+                                         //addToBodyCond(yytext);
+                                       }
 <Bases,CompoundName>";"			{ 
 					  current->section = Entry::EMPTY_SEC ;
 					  current->type.resize(0) ;
@@ -5465,7 +5596,7 @@
 					  //}
   					}
 <DefLineDoc,LineDoc,ClassDoc,PageDoc,Doc>"/*"|"//"   { current->doc += yytext; }
-<SkipCxxComment>.*/\n			{ 
+<SkipCxxComment>[^\n]*                 { 
 					  BEGIN( lastCContext ) ;
 					}
 <SkipComment>[^\*\n]+
@@ -5483,7 +5614,7 @@
 					  BEGIN( SkipCxxComment ) ;
 					}
 <*>.
-<SkipComment>"//"|"/*"
+<SkipComment>"//"|"/*"|#
 <*>"/*"					{ lastCContext = YY_START ;
 					  BEGIN( SkipComment ) ;
 					}
