quote:Original post by OldGuy I didn''t know there was a ''Son of Dragon''. I''ll have to pick it up; I thought the first one was excellent. I actually caught myself reading it for fun (what a nerd, right? )
Nah, not really. I did the same thing - read Son of... when I was 17 and really had no reason to.
CoiN, I agree with Oluseyi and TerranFury that you should probably stick to straight C/C++. It could take a couple days to get the hang of regular expressions and LALR(1) parsing. However, recognize that lex and yacc are the "right way" to handle you parsing problem. Those tools are specifically designed for what you are doing (operator precedence, string tokenizing, recursion - aka context free grammar). Why spend hours writing that yourself when lex and yacc will generate a complete parser in a matter of minutes?
Oluseyi and TerranFury, yes, I know what an "expression tree" is. Like most programmers, I was required to write one in my data structures class in school. But I never think about writing one now. Just like I avoid writing my own hash tables and linked lists.
1) Do it once yourself, so you understand and appreciate the area. 2) Then use the standard tools provided, as they are well-tested and well optimised.