For java/C# There is my code: Can I merge AddTable and AddCup into one method like Add<T> like this: The problem is that there are too many if else. Do you have any better suggestions? Answer Name the methods the same so that they will be overloads of each other: The compiler is smart enough to call the correct method.
Tag: grammar
Coding a propositional logic parser by hand
I need to do a parser for propositional logic. I pretend to do it by hand implemented like a recursive descent parser in java. My question is about the lexer, is it really needed for this job? I mean …