00001 #ifndef stackish_h 00002 #define stackish_h 00003 00004 /* 00005 * Utu -- Saving The Internet With Hate 00006 * 00007 * Copyright (c) Zed A. Shaw 2005 (zedshaw@zedshaw.com) 00008 * 00009 * This file is modifiable/redistributable under the terms of the GNU 00010 * General Public License. 00011 * 00012 * You should have recieved a copy of the GNU General Public License along 00013 * with this program; see the file COPYING. If not, write to the Free Software 00014 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 0211-1307, USA. 00015 */ 00016 00017 00018 #include "stackish/node.h" 00019 #include "stackish/ragel_declare.h" 00020 00111 typedef struct stackish_parser { 00112 int cs; 00113 size_t more; 00114 size_t nread; 00115 size_t mark; 00116 Node *root; 00117 Node *current; 00118 } stackish_parser; 00119 00120 RAGEL_DECLARE_FUNCTIONS(stackish_parser); 00121 00122 void stackish_node_clear(stackish_parser *context); 00123 00124 void stackish_node_destroy(stackish_parser *context); 00125 00126 #define stackish_node_complete(P) ((P)->root->name && (P)->root == (P)->current) 00127 00128 #define stackish_node_root(P) ((P)->root) 00129 00130 #define stackish_more(P) ((P)->more) 00131 00132 #endif
1.5.1