Jabber WindowGram Client (JWGC)

Introduction Screenshots Installation Downloads
Documentation Browse Source Resources Project Site

Stable Version
-none-

Latest Version
beta5



Main Page | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

node.h

Go to the documentation of this file.
00001 #ifndef node_MODULE
00002 #define node_MODULE
00003 
00004 /*
00005  *      Copyright (c) 1989 by the Massachusetts Institute of Technology.
00006  *      For copying and distribution information, see the file
00007  *      "mit-copyright.h".
00008  *
00009  *      Modified for jwgc by Daniel Henninger.
00010  */
00011 
00012 #include "mit-copyright.h"
00013 
00014 #include "new_string.h"
00015 
00016 #define  STRING_CONSTANT_OPCODE         0
00017 #define  VARREF_OPCODE                  1
00018 #define  VARNAME_OPCODE                 2
00019 
00020 #define  NOT_OPCODE                     3
00021 
00022 #define  PLUS_OPCODE                    4
00023 #define  AND_OPCODE                     5
00024 #define  OR_OPCODE                      6
00025 #define  EQ_OPCODE                      7
00026 #define  NEQ_OPCODE                     8
00027 #define  REGEQ_OPCODE                   9
00028 #define  REGNEQ_OPCODE                  10
00029 
00030 #define  BUFFER_OPCODE                  11
00031 
00032 #define  SUBSTITUTE_OPCODE              12
00033 #define  PROTECT_OPCODE                 13
00034 #define  VERBATIM_OPCODE                14
00035 #define  GETENV_OPCODE                  15
00036 #define  UPCASE_OPCODE                  16
00037 #define  DOWNCASE_OPCODE                17
00038 #define  JVAR_OPCODE                    18
00039 #define  GET_OPCODE                     19
00040 
00041 #define  LANY_OPCODE                    20
00042 #define  RANY_OPCODE                    21
00043 #define  LBREAK_OPCODE                  22
00044 #define  RBREAK_OPCODE                  23
00045 #define  LSPAN_OPCODE                   24
00046 #define  RSPAN_OPCODE                   25
00047 #define  PARAGRAPH_OPCODE               26
00048 
00049 #define  LAST_EXPR_OPCODE               26
00050 
00051 #define  NOOP_OPCODE                    27
00052 #define  SET_OPCODE                     28
00053 #define  FIELDS_OPCODE                  29
00054 
00055 #define  PRINT_OPCODE                   30
00056 #define  CLEARBUF_OPCODE                31
00057 
00058 #define  APPENDPORT_OPCODE              32
00059 #define  EXECPORT_OPCODE                33
00060 #define  INPUTPORT_OPCODE               34
00061 #define  OUTPUTPORT_OPCODE              35
00062 #define  PUT_OPCODE                     36
00063 #define  CLOSEINPUT_OPCODE              37
00064 #define  CLOSEOUTPUT_OPCODE             38
00065 #define  CLOSEPORT_OPCODE               39
00066 
00067 #define  EXEC_OPCODE                    40
00068 
00069 #define  IF_STMT_OPCODE                 41
00070 #define  CASE_OPCODE                    42
00071 #define  WHILE_OPCODE                   43
00072 #define  BREAK_OPCODE                   44
00073 #define  EXIT_OPCODE                    45
00074 
00075 #define  IF_OPCODE                      46
00076 #define  ELSEIF_OPCODE                  47
00077 #define  ELSE_OPCODE                    48
00078 #define  MATCHLIST_OPCODE               49
00079 #define  DEFAULT_OPCODE                 50
00080 
00081 #define  NUMBER_OF_OPCODES              51
00082 
00083 typedef struct _Node {
00084     int opcode;                              /* Read-only */
00085     struct _Node *next;
00086     union {
00087         string string_constant;
00088         struct {
00089             struct _Node *first;
00090             struct _Node *second;
00091         } nodes;
00092     } d;
00093 } Node;
00094 
00095 /* Function externs */
00096 
00097 extern void node_DestroyAllNodes();
00098 
00099 extern Node *node_create_string_constant();
00100 
00101 extern Node *node_create_noary();
00102 extern Node *node_create_unary();
00103 extern Node *node_create_binary();
00104 
00105 /*
00106  *    Node *reverse_list_of_nodes(Node *list)
00107  *        Modifies: the nodes on the linked list list
00108  *        Effects: Reverses the linked list list and returns it.
00109  *                 This is done by modifing the next pointers of the
00110  *                 list elements to point to the previous node & returning
00111  *                 the address of the (previously) last node.
00112  */
00113 
00114 extern Node *reverse_list_of_nodes();
00115 
00116 #endif


Last updated at Tue Dec 18 21:07:42 PST 2007. This site and project hosted by...SourceForge.net Logo
Source Perspective by Fisheye