]> granicus.if.org Git - re2c/commitdiff
Store lexer buffer size inside of lexer class.
authorUlya Trofimovich <skvadrik@gmail.com>
Fri, 14 Aug 2015 13:37:12 +0000 (14:37 +0100)
committerUlya Trofimovich <skvadrik@gmail.com>
Fri, 14 Aug 2015 13:37:12 +0000 (14:37 +0100)
re2c/src/globals.h
re2c/src/parse/scanner.cc
re2c/src/parse/scanner.h

index 30a0b4e92b50e290de7774a69141c4a66678f106..569733a60d3ad731a273cb44278c2f4081533dc8 100644 (file)
@@ -13,8 +13,6 @@
 namespace re2c
 {
 
-enum BUFFERSIZE { BSIZE = 8192};
-
 extern bool bFlag;
 extern bool cFlag;
 extern bool dFlag;
index 7073db731c26de8dffee78497cefa82d966a6f74..f53e4fef82aa7f39fecab033fdd1caa31b0eed7b 100644 (file)
@@ -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")
index 34f160c03e5762194cb0d04f2939ab2985336b11..2f7076838f19b6a66342011ff5c1148163099bb4 100644 (file)
@@ -52,7 +52,8 @@ struct ScannerState
 
 class Scanner: private ScannerState
 {
-private:
+       static const uint32_t BSIZE;
+
        Input & in;
        OutputFile & out;