mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-25 10:05:33 +00:00
Re-introduced Yosys::readsome() helper function
(f.read() + f.gcount() made problems with lines > 16kB)
This commit is contained in:
parent
750c615e7f
commit
c5eb5e56b8
6 changed files with 25 additions and 21 deletions
|
@ -64,11 +64,7 @@ YOSYS_NAMESPACE_END
|
|||
return TOK_ID;
|
||||
|
||||
#define YY_INPUT(buf,result,max_size) \
|
||||
do { \
|
||||
lexin->read(buf, max_size-1); \
|
||||
result = lexin->gcount(); \
|
||||
if (result >= 0) buf[result] = '\0'; \
|
||||
} while (0)
|
||||
result = readsome(*VERILOG_FRONTEND::lexin, buf, max_size)
|
||||
|
||||
%}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue