Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Lex and Flex both generate C (Flex has an option to output C++ instead, IIRC), yes. There are similar tools for other languages though: Java has JLex, ANTLR, etc. for example.

Re: the config file - how often does it change? Does it really need to be deferred to runtime, or is it just startup time? My (probably out-of-date) understanding of rewrite rules in apache, for example, is that you need to bounce the server for it to pick up changes; that would also be sufficient for it to pick up changes to the flex file and rebuild. Running flex and compiling the output is quick enough to be instantaneous from the point of the admin restarting a server.

If it really can change at runtime, I guess the point is to avoid downtime while updating the configuration? There are ways around this too, some more practical than others. If your servers are behind a load balancer you can do a rolling restart to pick up changes. If that's not an option it's possible, though probably not trivial, to hot-patch the native code. YMMV. :-)



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: