CRT in generated parser

<[email protected]>
Newsgroups gmane.comp.parsers.bison.bugs
Message-ID <[email protected]>
Hi folks, I'm working on a tool that uses flex/bison and runs in rather
scarce environment thus needs C runtime substitution.

Tool employs reentrant scanner/parser. As far as I can see bison 3.0.4
(default on Ubuntu 18.04) and latest git version both

generates yypstate_new/yypstate_delete using straightforward calls to
malloc() and free(). Is it possible to override this?

I see YYMALLOC/YYFREE used in other parts of generated parser's code,
perhaps, they could be used in yypstate* routines as well?

Is there any best known method for substituting runtime in generated parser
code? (besides, SED-like search-replace).

WBR,

--Kovalex
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.