Annotation of parser3/src/include/pa_value.h, revision 1.5
1.1 paf 1: /*
1.5 ! paf 2: $Id: pa_value.h,v 1.4 2001/02/13 12:59:57 paf Exp $
1.1 paf 3: */
4:
5: /*
6: data core
7: */
8:
9: #ifndef PA_VALUE_H
10: #define PA_VALUE_H
11:
12: #include "pa_string.h"
13:
14: class Method {
15: public:
16: Array param_names;
1.4 paf 17: Array local_names;
1.1 paf 18: String code;
19: };
20:
1.2 paf 21: class Method_ref {
22: public:
23: Value *self;
24: Method& method;
25: };
26:
1.1 paf 27: class Value {
28: public:
29: // text: value
30: virtual String *get_string() const =0;
31: virtual String *put_string(const String *astring)=0;
32:
1.3 paf 33: // method_ref: "self" part, method
34: virtual Method_ref *get_method_ref() const =0;
35:
1.1 paf 36: // hash: (key)=value
1.2 paf 37: // object_class: (field)=STATIC.value;(STATIC)=hash;(method)=method_ref with self=object_class
1.1 paf 38: // object_instance: (field)=value;(STATIC)=hash;(method)=method_ref
39: virtual Value *get_element(const String& name) const =0;
40: virtual Value *put_element(const String& name, const Value *avalue)=0;
41:
42: // object_instance, object_class: method
1.2 paf 43: virtual Method *get_method(const String& name) const =0;
1.5 ! paf 44:
! 45: // object_class, object_instance: object_class
! 46: virtual Class *get_class() const =0;
1.1 paf 47: };
48:
49: /*
50: descendants:
51: text:+ value:String
52: hash:+ keys&values:Hash
53: table:+ columns_order:Array, columns:Hash, rows:Array
54: object_class:+ STATIC:Hash, methods:Hash
55: object_instance:+ object_class, fields:Hash
1.2 paf 56: method_ref:+ self:Value/object_class, method:String
1.4 paf 57: method_self_n_params_n_locals:+ self:Value/object_class[1st try], params_locals&values:Hash[2nd try]
1.1 paf 58:
59:
60: */
61:
62: #endif
E-mail: