-#define YY_INPUT(data, value, size) { \
- if (yyextra->data_.eof()) \
- value = YY_NULL; \
- else { \
- yyextra->data_.read(data, size); \
- size_t copy(yyextra->data_.gcount()); \
- value = copy == 0 ? YY_NULL : copy; \
- } \
-}
+#define YY_INPUT(data, value, size) do { \
+ value = yyextra->data_.sgetn(data, size) ?: YY_NULL; \
+} while (false)