Changeset 117805 in git
- Timestamp:
- Sep 27, 2019, 10:52:33 AM (5 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 9f69236bcf902f89a283a358142966405d5b1d32
- Parents:
- 409d9300e30627a7d5fc798ebdff59b15ba0e166
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/HOWTO.addKernelCmds
r409d930 r117805 1 1 How 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 14 extern "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 ----------------------------------------------------------------------------- 21 The following describes how the main Singular kernel commands were constructed, 22 but we do not want to change this any more as this would change the Singular 23 language (unless an error is found). 24 The files not to change are: grammar.y, scanner.l, table.h, tok.h 25 and the derived files: grammar.cc, grammar.h, scanner.cc, iparith.inc 26 If one of these files really need a change, run make_grammar (for grammar.*) 27 or make_table (for table.h). 28 The following text serves only as a remainder how iiExprArith etc. work: 2 29 3 30 Example: bla
Note: See TracChangeset
for help on using the changeset viewer.