comparison src/pt-idx.h @ 2980:cd5ad3fd8049

[project @ 1997-05-16 01:12:13 by jwe]
author jwe
date Fri, 16 May 1997 01:13:19 +0000
parents
children daa1ed1f5462
comparison
equal deleted inserted replaced
2979:a3556d2adec9 2980:cd5ad3fd8049
1 /*
2
3 Copyright (C) 1996, 1997 John W. Eaton
4
5 This file is part of Octave.
6
7 Octave is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by the
9 Free Software Foundation; either version 2, or (at your option) any
10 later version.
11
12 Octave is distributed in the hope that it will be useful, but WITHOUT
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with Octave; see the file COPYING. If not, write to the Free
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20
21 */
22
23 #if !defined (octave_tree_index_h)
24 #define octave_tree_index_h 1
25
26 #if defined (__GNUG__)
27 #pragma interface
28 #endif
29
30 class tree_argument_list;
31
32 class tree_walker;
33
34 class octave_value;
35 class octave_value_list;
36 class octave_lvalue;
37
38 #include "str-vec.h"
39
40 #include "pt-exp.h"
41
42 // Index expressions.
43
44 class
45 tree_index_expression : public tree_expression
46 {
47 public:
48
49 tree_index_expression (tree_expression *e = 0, tree_argument_list *lst = 0,
50 int l = -1, int c = -1)
51 : tree_expression (l, c), expr (e), list (lst), arg_nm () { }
52
53 ~tree_index_expression (void);
54
55 bool is_index_expression (void) const
56 { return true; }
57
58 tree_expression *expression (void)
59 { return expr; }
60
61 tree_argument_list *arg_list (void)
62 { return list; }
63
64 bool rvalue_ok (void) const
65 { return true; }
66
67 octave_value rvalue (void);
68
69 octave_value_list rvalue (int nargout);
70
71 octave_lvalue lvalue (void);
72
73 void eval_error (void);
74
75 void accept (tree_walker& tw);
76
77 private:
78
79 tree_expression *expr;
80
81 tree_argument_list *list;
82
83 string_vector arg_nm;
84 };
85
86 #endif
87
88 /*
89 ;;; Local Variables: ***
90 ;;; mode: C++ ***
91 ;;; End: ***
92 */