From 180bd00fe69cec5a7dac0a75ee7f7abfb1820cc1 Mon Sep 17 00:00:00 2001 From: Ulya Trofimovich Date: Fri, 14 Aug 2015 14:37:12 +0100 Subject: [PATCH] Store lexer buffer size inside of lexer class. --- re2c/src/globals.h | 2 -- re2c/src/parse/scanner.cc | 2 ++ re2c/src/parse/scanner.h | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/re2c/src/globals.h b/re2c/src/globals.h index 30a0b4e9..569733a6 100644 --- a/re2c/src/globals.h +++ b/re2c/src/globals.h @@ -13,8 +13,6 @@ namespace re2c { -enum BUFFERSIZE { BSIZE = 8192}; - extern bool bFlag; extern bool cFlag; extern bool dFlag; diff --git a/re2c/src/parse/scanner.cc b/re2c/src/parse/scanner.cc index 7073db73..f53e4fef 100644 --- a/re2c/src/parse/scanner.cc +++ b/re2c/src/parse/scanner.cc @@ -12,6 +12,8 @@ namespace re2c { +const uint32_t Scanner::BSIZE = 8192; + void Scanner::config(const std::string & cfg, int num) { if (cfg == "indent:top") diff --git a/re2c/src/parse/scanner.h b/re2c/src/parse/scanner.h index 34f160c0..2f707683 100644 --- a/re2c/src/parse/scanner.h +++ b/re2c/src/parse/scanner.h @@ -52,7 +52,8 @@ struct ScannerState class Scanner: private ScannerState { -private: + static const uint32_t BSIZE; + Input & in; OutputFile & out; -- 2.40.0