diff anagram/agcore/stacks.h @ 0:13d2b8934445

Import AnaGram (near-)release tree into Mercurial.
author David A. Holland
date Sat, 22 Dec 2007 17:52:45 -0500
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/anagram/agcore/stacks.h	Sat Dec 22 17:52:45 2007 -0500
@@ -0,0 +1,76 @@
+/*
+ * AnaGram, A System for Syntax Directed Programming
+ * Copyright 1993-2002 Parsifal Software. All Rights Reserved.
+ * See the file COPYING for license and usage terms.
+ *
+ * stacks.h - old stacks
+ */
+
+#ifndef STACKS_H
+#define STACKS_H
+
+#include <stdio.h>
+#include "port.h"
+
+class AgString; // from agstring.h
+struct list_dict; // from dict.h
+#include "agarray.h"
+
+extern unsigned nc, nw;
+extern unsigned int_stack_top;
+
+extern char *string_base;
+extern int *list_base;
+
+void           init_stk(void);
+void           reset_stk(void);
+
+int            apprintf(const char *fs, ...) PRINTFFY(1,2);
+int           *build_list(void);
+char          *build_string(void);
+AgString       buildAgString(void);
+AgArray<int>   buildStaticList(void);
+void           concat_list(void);
+void           concat_string(void);
+int           *list_space(int n);
+int            ssprintf(const char *fs, ...) PRINTFFY(1,2);
+char          *string_space(int n);
+
+/*
+ * These names are all acronyms. Sometime, someone ought to sort out
+ * what they stand for and/or what they do and pick clearer names.
+ */
+void           acs(int c);
+void           ass(const char *s);
+void           aws(int c);
+int            fis(void);
+int            fps(FILE *f);
+int            fws(void);
+void           fdl(list_dict *d, unsigned k);
+void           ics(void);
+int            idl(list_dict *d);
+int            isws(int);
+void           iws(void);
+int            rcs(void);
+int            rps(void);
+int            rws(void);
+void           scs(int c);
+void           sis(int i);
+void           sps(int c1, int c2);
+void           sss(const char *s);
+void           sws(int c);
+int            tis(void);
+void           tss(void);
+int            xws(int c);
+int            xps(int c1, int c2);
+
+//void         ast(void);
+//void         dcs(int n);                    /* delete char from string */
+//void         delete_stack(void);
+//int          ids(string_dict *d);
+//void         ist(void);
+//void         its(char c, int n);
+//void         slide_stack(void);
+//void         slns(const char *s);           /* extract line from string */
+
+#endif /* STACKS_H */