1 [+ AutoGen5 template .cpp +][+
2 COMMENT a part of GiNaC parser -- construct functions from a byte stream.
4 (use-modules (ice-9 format))
6 (define (sequence start end . step)
7 (let ((step (if (null? step) 1 (car step))))
9 (if (> n end) '() (cons n (loop (+ step n)))))))
11 [+ (dne " * " " * " ) +]
13 * If you want to change this file, edit either `[+ (def-file) +]' or
14 * `[+ (tpl-file) +]' file, and run the following command:
16 * autogen -T [+ (tpl-file) +] [+ (def-file) +]
18 #include "parse_context.h"
20 #include "operators.h"
26 static ex [+ (get "name") +]_reader(const exvector& ev)
28 return GiNaC::[+ (get "name") +]([+
29 (let ((nargs (if (exist? "args")
30 (string->number (get "args")) 1)))
31 (format '#f "~{ev[~a]~^, ~}" (sequence 0 (- nargs 1)))) +]);
34 const prototype_table& get_default_reader()
37 static bool initialized = false;
38 static prototype_table reader;
41 reader[make_pair("[+ (get "name") +]", [+
42 (if (exist? "args") (get "args") "1")
43 +])] = [+ (get "name") +]_reader;[+