We’re rewarding the question askers & reputations are being recalculated! Read more.

New answers tagged

2

"several parameters" means you will likely forget which position is which if you set these with a constructor. There are ways around this problem but they depend on your language. If you use a language with named arguments like C# you can fix that problem: new Lexer( whitespaceSplit:true, otherParameter:"other" ); If you use a language without ...


1

What about letting those parameters which change the parsers behavior only to be passed with the construction of the instance? class Lexer { public: constructor Lexer(whitespaceSplit : boolean; otherParameter : ...) : whitespaceSplit_(whitespaceSplit ), otherParameter_(otherParameter) { } property whitespaceSplit : boolean read ...


Top 50 recent answers are included