Changeset 117805 in git


Ignore:
Timestamp:
Sep 27, 2019, 10:52:33 AM (5 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
9f69236bcf902f89a283a358142966405d5b1d32
Parents:
409d9300e30627a7d5fc798ebdff59b15ba0e166
Message:
new commands should go to dynamic modules
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/HOWTO.addKernelCmds

    r409d930 r117805  
    11How to add new kernel commands
     2- create a new dynamic module, add your new commands as PROC:
     3  - create a sub directory of Singular/dyn_modules: Singular/dyn_modules/bla
     4  - add the name of your sub directory to Singular/dyn_modules/Makefile.am
     5  - create Singular/dyn_modules/bla/Makefile.am
     6    (have a look at the other Singular/dyn_modules/*/Makefile.am for an example)
     7  - your module must contain the following initialization routine,
     8    where "bla" refers to the (Singular) name for your new procedure
     9    and bla_proc refers to the C++-implementation of it with
     10    the following head: static BOOLEAN bla_proc(leftv result, leftv args)
     11
     12//------------------------------------------------------------------------
     13// initialisation of the module
     14extern "C" int SI_MOD_INIT(bla)(SModulFunctions* p)
     15{
     16  p->iiAddCproc("bla.so","bla",FALSE,bla_proc);
     17  return (MAX_TOK);
     18}
     19
     20-----------------------------------------------------------------------------
     21The following describes how the main Singular kernel commands were constructed,
     22but we do not want to change this any more as this would change the Singular
     23language (unless an error is found).
     24The files not to change are: grammar.y, scanner.l, table.h, tok.h
     25and the derived files: grammar.cc, grammar.h, scanner.cc, iparith.inc
     26If one of these files really need a change, run make_grammar (for grammar.*)
     27or make_table (for table.h).
     28The following text serves only as a remainder how iiExprArith etc. work:
    229
    330Example: bla
Note: See TracChangeset for help on using the changeset viewer.