summaryrefslogtreecommitdiff
path: root/src/increasebuffer.pl
diff options
context:
space:
mode:
Diffstat (limited to 'src/increasebuffer.pl')
-rw-r--r--src/increasebuffer.pl9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/increasebuffer.pl b/src/increasebuffer.pl
new file mode 100644
index 0000000..109f9ad
--- /dev/null
+++ b/src/increasebuffer.pl
@@ -0,0 +1,9 @@
+# Since the internal token buffer of a generated flex file is hardcoded
+# to 16K, this script is used to increase the buffer size of a flex
+# generated scanner to 256K.
+while (<>)
+{
+ s/YY_BUF_SIZE 16384/YY_BUF_SIZE 262144/g;
+ s/YY_READ_BUF_SIZE 8192/YY_READ_BUF_SIZE 262144/g;
+ print $_;
+}