I have created a small parser in c using flex and bison. The parser writes the result to some global variables and the caller function reads it from there.
I am trying to package my parser as a php extension. From what i understand from the php documentation true global variables are not recommended because they are not thread-safe and i have to use module globals instead.
In order to use module globals you have to pass in the function TSRMLS_DC as its last argument.
To you know if i can modify the yyparse to accept TSRMLS_DC as an argument. Or if there is another way to access global variable?