Flex / lex yacc / bison multithreaded environment

Can I use the code generated by flex / bison | lex / yacc in a multithreading environment? I am afraid that there are many global variables. How can this be fixed?

+4
source share
1 answer

With flex, you can use %option reentrant with bison %pure-parser to generate %option reentrant code that does not have global data. You may need some synchronization to prevent multiple threads from using the same data blocks at the same time.

+8
source

All Articles