modify upstream makefile to allow hardening build flags to apply
[debian/yforth] / coree.h
1 /* yForth? - A Forth interpreter written in ANSI C
2  * Copyright (C) 2012 Luca Padovani
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16  * ------------------------------------------------------------------------
17  * Module name:     coree.h
18  * Abstract:        Include file for "core-extension" word set
19  */
20
21 #ifdef DECLARE_WORDS
22 #       ifdef PROTOTYPES
23 #               undef PROTOTYPES
24 #       endif
25 #       undef __COREE_H__
26 #else
27 #       ifndef PROTOTYPES
28 #               define PROTOTYPES
29 #       endif
30 #endif
31
32 #ifndef __COREE_H__
33 #define __COREE_H__
34
35 #include "yforth.h"
36 #include "macro.h"
37
38 /**************************************************************************/
39 /* VARIABLES **************************************************************/
40 /**************************************************************************/
41
42 variable(Char *, pad,                   "pad")
43 variable(Cell, source_id,               "source-id")
44
45 /**************************************************************************/
46 /* PROTOTYPES *************************************************************/
47 /**************************************************************************/
48
49 code(dot_paren,                     ".(",                   IMMEDIATE)
50 code(dot_r,                                                     ".r",                                   0)
51 code(zero_not_equals,               "0<>",                  0)
52 code(zero_greater,                  "0>",                   0)
53 code(two_to_r,                      "2>r",                  COMP_ONLY)
54 code(two_r_from,                    "2r>",                  COMP_ONLY)
55 code(two_r_fetch,                   "2r@",                  COMP_ONLY)
56 code(colon_no_name,                 ":noname",              0)
57 code(not_equals,                    "<>",                   0)
58 code(question_do,                   "?do",                  COMP_ONLY | IMMEDIATE)
59 code(again,                         "again",                COMP_ONLY | IMMEDIATE)
60 code(c_quote,                       "c\"",                  COMP_ONLY | IMMEDIATE)
61 code(compile_comma,                 "compile,",             COMP_ONLY)
62 code(erase,                         "erase",                0)
63 code(false,                         "false",                0)
64 code(hex,                           "hex",                  0)
65 code(marker,                        "marker",               0)
66 code(nip,                           "nip",                  0)
67 code(parse,                         "parse",                0)
68 code(pick,                          "pick",                 0)
69 code(refill,                        "refill",               0)
70 code(restore_input,                 "restore-input",        0)
71 code(roll,                          "roll",                 0)
72 code(save_input,                    "save-input",           0)
73 code(true,                          "true",                 0)
74 code(tuck,                          "tuck",                 0)
75 code(u_dot_r,                                           "u.r",                                  0)
76 code(u_greater_than,                "u>",                   0)
77 code(unused,                        "unused",               0)
78 code(within,                        "within",               0)
79 code(backslash,                     "\\",                   IMMEDIATE)
80 code(backslash,                     "#!",                   IMMEDIATE)
81 code(bracket_compile,               "[compile]",            COMP_ONLY)
82 code(value,                                                     "value",                                0)
83 code(to,                                                        "to",                                   IMMEDIATE)
84
85 code(paren_question_do_paren,       "(?do)",                0)
86 code(paren_write_value_paren,           "(wValue)",                             0)
87 code(paren_marker_paren,                        "(marker)",                             0)
88
89 #ifdef PROTOTYPES
90
91 /**************************************************************************/
92 /* AUXILIARY FUNCTIONS PROTOTYPES *****************************************/
93 /**************************************************************************/
94
95 void exec_marker(struct voc_marker *vm);
96
97 #endif
98
99 #endif
100