[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CRT in generated parser
From: |
kovalex.pro |
Subject: |
CRT in generated parser |
Date: |
Sat, 22 Aug 2020 18:55:31 +0300 |
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
- CRT in generated parser,
kovalex.pro <=