[Flex-help] [suggestion] Include a means to put items in the header file.
flex is a tool for generating scanners
Brought to you by:
wlestes
From: slipbits <ho...@sl...> - 2023-06-25 21:04:34
|
Flex 2.6.4 I've looked at the Flex manual and I can't seem to find any way of inserting anything into the output header file. It would be useful to allow an option to put things into the header file. Let me give an example. I have a bison parser using Flex. In the parser I detect an include statement (similar to a #include) which requires that activity in the current file be suspended, the data relevant to the current process be stacked, and a new one opened and processed. Flex provides a mechanism to do this. I would like to provide my own interface to the Flex functions to the Bison parser. There is no way to do this other than to hand code the function prototype. This hand coding is something that Flex can do if there were a means to insert a function prototype into the Flex generated header file. |