|
7/9 |
1999/7/11-14 [Computer/SW/Compilers] UID:16105 Activity:high |
7/11 Since bison/yacc/(f)lex all act like state machines is there any way to implement a program with multiple context parsers (eg. a multithreaded network deamon that needs to parse an input)? \_ This problem is even worse in OpenGL that employ specialized rendering hardware since the GL libraries act on the state of the video card. In other words, there's only one rendering pipeline and you can't have multiple GL renderers (except on SGIs). \_ that's just sorry-ass driver design. 2D drivers also act directly on hardware but have been abstracted to share between clients efficiently. \_ flex & bison both allow you to specify names for your parser/scanner \_ Fuck bison and yak and all that shit! LINUX RULEZ! Use Linux instead! so you can have multiple per program - read the docs. \_ name changing wouldn't work if you want to have multiple instances of the same parser. too bad there's no OOP parser. \_ There is. Search for PCCTS and ANTLR. Current development is in java, but the C++ version still exists. \_ search on bison++ and flex++ for generators to get C++ encapsulated parser and scanner objects. these may be simple option flags to standard bison and flex these days... \_ -+ for flex |
7/9 |
|