From: Akim D. <ak...@lr...> - 2015-12-04 15:17:01
|
Hi, I’m happy to see that the C++ code is renovated. While at it, please s/struct yy_buffer_state/yy_buffer_state/g, the struct keyword is absolutely useless, and clutters the flex-lexer.hh file. Also, really, FLEX_STD is, IMHO, very useless. Just spread std:: everywhere. std:: is 17 years old! Actually, reading the generated code, one reads: /* The contents of this function are C++ specific, so the () macro is not used. * This constructor simply maintains backward compatibility. * DEPRECATED */ yyFlexLexer::yyFlexLexer( FLEX_STD istream* arg_yyin, FLEX_STD ostream* arg_yyout ): yyin(arg_yyin ? arg_yyin->rdbuf() : std::cin.rdbuf()), yyout(arg_yyout ? arg_yyout->rdbuf() : std::cout.rdbuf()) { ctor_common(); } /* The contents of this function are C++ specific, so the () macro is not used. */ yyFlexLexer::yyFlexLexer( std::istream& arg_yyin, std::ostream& arg_yyout ): one has std::, the other has FLEX_STD. So compliance with std:: is already assumed. |