From 3c0819236e4f07c8f57aaf1ca46d0d68aa761558 Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Sat, 5 Sep 2026 17:14:53 +0200 Subject: Move source to src/prc1 --- kw.c | 41 ----------------------------------------- 1 file changed, 41 deletions(-) delete mode 100644 kw.c (limited to 'kw.c') diff --git a/kw.c b/kw.c deleted file mode 100644 index d5e22ca..0000000 --- a/kw.c +++ /dev/null @@ -1,41 +0,0 @@ -#include "prv.h" -#include -#include - -static const char *kws[] = -{ - /* headers */ - "public", "function", - /* sections */ - "types", "storage", "linkage", "procedure", "locals", "globals", "imports", - /* types */ - "union", "struct", "constant", "alias", "prototype", - /* operators */ - "add", "subtract", "multiply", "divide", "xor", "bitor", "bitand", - "leftshift", "rightshift", "address", "size", "call", "set", - /* procedures */ - "using", "returning", - /* built-in functions */ - "display", "warn", - /* flow control */ - "while", "if", "else", "end", "return", "go", "label", "default", - /* prepositions */ - "by", "from", "to", "than", "of", "etc", - /* comparators */ - "is", "not", "equal", "greater", "smaller", "and", "or", - /* built-in types */ - "void", "array", "pointer", - /* built-in signed types */ - "byte", "halfword", "word", "long", - /* built-in unsigned types */ - "ubyte", "uhalfword", "uword", "ulong" -}; - -int kw(const char *s) -{ - for (size_t i = 0; i < sizeof kws / sizeof *kws; i++) - if (!strcmp(s, kws[i])) - return 1; - - return 0; -} -- cgit v1.2.3