I happened to write an inline member fn containing a '/' operator. That caused gengtype to complain about an unexpected '/' character. I thought I'd gone crazy until I determined it was gengtype complaining not cc1plus!

Anyway, this patch adds '/' to the set of single char tokens permitted inside a structure definition. I guess it was missed, what with / being rare and also involved with /* and // comments.

I'll commit next week unless someone points out an error, and this isn't obvious after all.

nathan
--
Nathan Sidwell
2017-02-10  Nathan Sidwell  <nat...@acm.org>

	* gengtype-lex.l (<in_struct>): Add '/'.

Index: gengtype-lex.l
===================================================================
--- gengtype-lex.l	(revision 245341)
+++ gengtype-lex.l	(working copy)
@@ -159,7 +159,7 @@ CXX_KEYWORD inline|public:|private:|prot
 }
 
 "..."				{ return ELLIPSIS; }
-[(){},*:<>;=%|+\!\?\.-]		{ return yytext[0]; }
+[(){},*:<>;=%/|+\!\?\.-]	{ return yytext[0]; }
 
    /* ignore pp-directives */
 ^{HWS}"#"{HWS}[a-z_]+[^\n]*\n   {lexer_line.line++;}

Reply via email to