[Getdp] How to add new commands to GetDP ?

Christophe Geuzaine cgeuzaine at ulg.ac.be
Thu Mar 24 19:08:48 CET 2016


Dear Guillaume,

What kind of commands do you want to add? If you only want to add a new function (say, like "XYZ[]"), you don't actually have to modify the parser: you can simply create your new function (see e.g. Legacy/F_Coord.cpp) and add the name in Interface/ProDefines.h.

The same holds for simple resolution operations and other common constructs: see Interface/ProDefines.h.

For more exotic commands, you will indeed have to modify the flex/bison parser. Once you have made a modification, you have to rebuild the C++ version with "make parser".

Hope this helps,

Christophe


> On 21 Mar 2016, at 16:05, DILASSER Guillaume <Guillaume.DILASSER at cea.fr> wrote:
> 
> Hello everyone,
>  
> I am writing to know how to expend GetDP with new custom functions. To be more precise, I am looking for some explanations on how to expend the vocabulary of the scanner and parser so that my own functions can be  recognized just as the built-in one. I have no previous experience with Flex and Bison, that is why I found myself struggling to understand what happens in the “ProParser” files. I would really appreciate your advice,
>  
> Faithfully Yours,
>  
> Guillaume DILASSER
> Doctorant SACM / LEAS
> CEA - Centre de Saclay - Bât.123 - PC 319c
> 91191 Gif sur Yvette Cedex - France -
>  
> guillaume.dilasser at cea.fr
>  
> _______________________________________________
> getdp mailing list
> getdp at onelab.info
> http://onelab.info/mailman/listinfo/getdp

-- 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://www.montefiore.ulg.ac.be/~geuzaine

Tetrahedron V, July 4-5 2016: http://tetrahedron.montefiore.ulg.ac.be
Free software: http://gmsh.info | http://getdp.info | http://onelab.info




More information about the getdp mailing list