[RBMetacode] Integrated lexer into main project
Status: Planning
Brought to you by:
jstrout
From: Joe S. <jo...@st...> - 2008-02-28 16:36:58
|
Hi gang, Seth recently checked in an update to BKeeney's "OpenProjectReader" project, in the prototypes section of our repository. It eliminates the dependency on plugins and also fixed up the Unicode support in the lexer. So today, I integrated that lexer into the main project, and added unit tests as well as an interactive test window. You should give it a try -- it's fun! Just click the "Test Lexer" button on the main window, then type whatever source code you like. I encourage you to see if you can come up with some weird (yet valid) RB source that the lexer fails to handle properly. If I may be permitted to gush a bit, Seth's code was awesome. Clean, well-organized, interfaces well designed, private parts all properly hidden, no unnecessary dependencies... everything about it was a pleasure to work with. About the only thing I changed was to rename the StartPos and EndPos properties in Token to StartPosB and EndPosB, since it turns out that these are binary positions rather than character. For examples of how to use the lexer classes, see the "RunUnitTests" shared method that each now sports, or look at the lexer test window. It's really quite easy. I'd say we have a great lexer, and it's time to start thinking seriously about parsing. (Thank you, Seth and Bob!) Best, - Joe |