]> www.ginac.de Git - ginac.git/commitdiff
parser: change order of the constructor optional arguments.
authorAlexei Sheplyakov <varg@theor.jinr.ru>
Sat, 13 Sep 2008 00:55:23 +0000 (04:55 +0400)
committerAlexei Sheplyakov <varg@theor.jinr.ru>
Fri, 19 Sep 2008 09:15:49 +0000 (13:15 +0400)
Functions/methods having multiple optional arguments are not very convenient
to use in C++ (to put it mildly). Shuffle parser ctor arguments so not so
frequently used argument is the last one.

ginac/parser/parser.cpp
ginac/parser/parser.hpp

index 1e905cf5ff1133e4d2074cf05dd5992a9d813467..0ee682ab7f108bc60a6a47d1141b65208a461abb 100644 (file)
@@ -150,9 +150,9 @@ int parser::get_next_tok()
        return token;
 }
 
        return token;
 }
 
-parser::parser(const symtab& syms_, const prototype_table& funcs_,
-              const bool strict_) : strict(strict_), funcs(funcs_),
-       syms(syms_)
+parser::parser(const symtab& syms_, const bool strict_,
+              const prototype_table& funcs_) : strict(strict_),
+       funcs(funcs_), syms(syms_)
 {
        scanner = new lexer();
 }
 {
        scanner = new lexer();
 }
index dbe60ee0946bf8fd668b84d485caeefe3408d1bf..eb50adc09b5d38ba17e0ccea866f85c70eaa9f28 100644 (file)
@@ -62,8 +62,8 @@ public:
         *        symbol is encountered.
         */
        parser(const symtab& syms_ = symtab(),
         *        symbol is encountered.
         */
        parser(const symtab& syms_ = symtab(),
-               const prototype_table& funcs_ = get_default_reader(),
-               const bool strict_ = false);
+               const bool strict_ = false,
+               const prototype_table& funcs_ = get_default_reader());
        ~parser();
 
        /// parse the stream @a input
        ~parser();
 
        /// parse the stream @a input