summaryrefslogtreecommitdiff
path: root/src/increasebuffer.py
blob: e2b2d0cbede339cb1b5ce4f4306662a796cadce1 (plain)
1
2
3
4
5
6
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'))