[Flex-help] search and substitute constants in C
flex is a tool for generating scanners
Brought to you by:
wlestes
From: Roberto V. C. <rvc...@es...> - 2016-02-24 21:44:42
|
Hello to all, I’m new to flex and i wanted to know how to parse a C example file and when a #define statement is found, substitute all the instances of that constant with its value. For example: <input file> #define TRUE 1 … … … .. a = TRUE; … <output file> … .. … ... a = 1; is this possible? Thank you in advance! |