Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- retrieving the results of a reentrant lexing without file i/o
- void scanProcedure(...threadInfo...) {
- yyscan_t tscanner;
- yylex_init(tscanner);
- yy_scan_string(threadInfo->lexMe, tscanner);
- yylex(tscanner);
- /* how to retrieve results of lexing in a
- reentrant manner ( no global state info )
- without having to do any file i/o */
- /* threadInfo-> ?? */
- yylex_destroy(tscanner);
- }
- ...
- pthread_create( ... scanProcedure ... threadInfoA ... );
- pthread_create( ... scanProcedure ... threadInfoB ... );
- pthread_create( ... scanProcedure ... threadInfoC ... );
- pthread_join( ... );
Add Comment
Please, Sign In to add comment