1giac use several global variables that must be initialized in a very 2specific order: 3- the global var of input_lexer.ll must be loaded first because 4they contain tables to auto-registering functions of all other modules 5- then the global var of gen.cc 6- the global var of identificateur.cc must be loaded before the 7global var of usual.cc 8- the global var of symbolic.cc should be loaded last 9FIXME: all unary_function_ptr tables should be replace by 10unary_function_ptr * tables. 11Under linux and win32 gcc, it seems the loader make static 12initializations in object file in reversed order, therefore linking 13must be done finishing with usual.o identificateur.o and input_lexer.o 14Under MacOSX gcc, the converse rule should be applied. 15 16List of global variables in modules (function not included) 17input_lexer.o: syms, lexer_functions, lexer_function_registered 18gen.o: zero, minus_one, plus_one, plus_two, plus_three, cst_i 19identificateur.o and or usual.o: cst_pi, cst_two_pi, 1/2, ..., 20tables of unary_function_ptr 21 22********** 23Modifs a faire: 24linalg[ker] ou linalg::ker qui doit se traduire en linalg[ker] 25linalg doit etre declare comme unary_op 26si f est un unary_function_ptr, 27f[qqchose](x) doit renvoyer f([qqchose,x]) avec un vecteur de subtype 28special. Pour les fonctions comme linalg, on utilise la meme fonction 29giac qui forme la chaine "f[qqchose]", cherche dans la table du lexer 30la fonction correspondante et l'appelle sur x. 31Donc with(linalg) ou export(linalg) 32rajoute les fonctions renvoyees par linalg() dans la liste reconnue 33par le lexer de la maniere suivante 34il doit y avoir une premiere table nom de commande tap� 35-> nom de commande interprete par le lexer -> puis traduction 36Par exemple, si on fait with(linalg), la 1ere table contient 37"ker" -> "linalg[ker]" 38alors que la fonction ker est renommee "linalg[ker]" 39On peut aussi ajouter et enlever des fonctions de la 1ere table 40avec register et unregister. 41Protect et unprotect: on cree un vecteur string unprotected, si le nom 42lexe appartient a ce vecteur alors le teste d'appartenance a la 1ere 43table n'est pas effectue (le nom devient donc un nom de variable)