- Neat: http://www.google.com/codesearch
- SymbolStorage maps Word Tokens to Identifiers.
- Flex maps strings to Word Tokens.
- Bison parses Word Tokens using a LALR engine.
- A way to convert "a_class.ToString().c_str()" to "a_class.ToString()" for use in sprintf()--statically allocate a fixed character buffer within ToString() and return a pointer to it. No memory management, no extra class member variables, no repeat allocation. The only catch--this technique only works for predictable string lengths. For example, sprintf()'ing an integer into a string--2^64 fits into a null-terminated string of 21 bytes.
Unrestricted string lengths necessitate dynamic memory allocation.
Google prohibits C++ streams (except for logging), which seems to rule out std::string--I haven't seen or thought of a way other than std::ostringstream.
Sunday, August 31, 2008
Sunday Development Log
Sunday:
No comments:
Post a Comment