mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 04:33:05 +00:00
Fix problem with flex scanners and huge token sizes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5410 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6520785dcd
commit
6d131b4582
@ -467,8 +467,17 @@ YACC_OUTPUT = $(addprefix $(YACC_FILES:%.y=%), .h .cpp .output)
|
|||||||
|
|
||||||
# Create a .cpp source file from a flex input file... this uses sed to cut down
|
# Create a .cpp source file from a flex input file... this uses sed to cut down
|
||||||
# on the warnings emited by GCC...
|
# on the warnings emited by GCC...
|
||||||
|
#
|
||||||
|
# The last line is a gross hack to work around flex aparently not being able to
|
||||||
|
# resize the buffer on a large token input. Currently, for uninitialized string
|
||||||
|
# buffers in LLVM we can generate very long tokens, so this is a hack around it.
|
||||||
|
# FIXME. (f.e. char Buffer[10000]; )
|
||||||
|
#
|
||||||
%.cpp: %.l
|
%.cpp: %.l
|
||||||
flex -t $< | sed '/^find_rule/d' | sed 's/void yyunput/inline void yyunput/' | sed 's/void \*yy_flex_realloc/inline void *yy_flex_realloc/' > $@
|
flex -t $< | sed '/^find_rule/d' | \
|
||||||
|
sed 's/void yyunput/inline void yyunput/' | \
|
||||||
|
sed 's/void \*yy_flex_realloc/inline void *yy_flex_realloc/' | \
|
||||||
|
sed 's/#define YY_BUF_SIZE 16384/#define YY_BUF_SIZE (16384*64)/' > $@
|
||||||
|
|
||||||
# Rule for building the bison parsers...
|
# Rule for building the bison parsers...
|
||||||
|
|
||||||
|
@ -467,8 +467,17 @@ YACC_OUTPUT = $(addprefix $(YACC_FILES:%.y=%), .h .cpp .output)
|
|||||||
|
|
||||||
# Create a .cpp source file from a flex input file... this uses sed to cut down
|
# Create a .cpp source file from a flex input file... this uses sed to cut down
|
||||||
# on the warnings emited by GCC...
|
# on the warnings emited by GCC...
|
||||||
|
#
|
||||||
|
# The last line is a gross hack to work around flex aparently not being able to
|
||||||
|
# resize the buffer on a large token input. Currently, for uninitialized string
|
||||||
|
# buffers in LLVM we can generate very long tokens, so this is a hack around it.
|
||||||
|
# FIXME. (f.e. char Buffer[10000]; )
|
||||||
|
#
|
||||||
%.cpp: %.l
|
%.cpp: %.l
|
||||||
flex -t $< | sed '/^find_rule/d' | sed 's/void yyunput/inline void yyunput/' | sed 's/void \*yy_flex_realloc/inline void *yy_flex_realloc/' > $@
|
flex -t $< | sed '/^find_rule/d' | \
|
||||||
|
sed 's/void yyunput/inline void yyunput/' | \
|
||||||
|
sed 's/void \*yy_flex_realloc/inline void *yy_flex_realloc/' | \
|
||||||
|
sed 's/#define YY_BUF_SIZE 16384/#define YY_BUF_SIZE (16384*64)/' > $@
|
||||||
|
|
||||||
# Rule for building the bison parsers...
|
# Rule for building the bison parsers...
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user