sh: Pass multiple bytes at a time to lex.
This speeds up the expansion/arith6.0 test considerably.
This commit is contained in:
parent
c4779c39ab
commit
0bee28331e
@ -53,7 +53,15 @@ int yylex(void);
|
||||
|
||||
#undef YY_INPUT
|
||||
#define YY_INPUT(buf,result,max) \
|
||||
result = (*buf = *arith_buf++) ? 1 : YY_NULL;
|
||||
do { \
|
||||
result = strnlen(arith_buf, max); \
|
||||
if (result == 0) \
|
||||
result = YY_NULL; \
|
||||
else { \
|
||||
memcpy(buf, arith_buf, result); \
|
||||
arith_buf += result; \
|
||||
} \
|
||||
} while (0);
|
||||
#define YY_NO_UNPUT
|
||||
#define YY_NO_INPUT
|
||||
%}
|
||||
|
Loading…
Reference in New Issue
Block a user