summaryrefslogtreecommitdiffstats
path: root/src/increasebuffer.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/increasebuffer.py')
-rwxr-xr-xsrc/increasebuffer.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/increasebuffer.py b/src/increasebuffer.py
new file mode 100755
index 0000000..e2b2d0c
--- /dev/null
+++ b/src/increasebuffer.py
@@ -0,0 +1,7 @@
+# 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.
+import sys
+sys.stdout.write(sys.stdin.read().
+ replace('YY_BUF_SIZE 16384','YY_BUF_SIZE 262144').
+ replace('YY_READ_BUF_SIZE 8192','YY_READ_BUF_SIZE 262144'))