From: Ulya Trofimovich Date: Fri, 14 Aug 2015 13:37:12 +0000 (+0100) Subject: Store lexer buffer size inside of lexer class. X-Git-Tag: 0.15~121 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=180bd00fe69cec5a7dac0a75ee7f7abfb1820cc1;p=re2c Store lexer buffer size inside of lexer class. --- 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;