Mercurial > octave-nkf
diff libinterp/parse-tree/parse.h @ 16237:70f465930546
rearrange class heirarchy for tree_cell and tree_matrix
* pt-array-list.h, pt-array-list.cc: New files.
(tree_array_list): New class.
* pt-cell.h, pt-cell.cc (tree_cell): Derive from tree_array_list.
* pt-mat.h, pt-mat.cc (tree_matrix): Derive from tree_array_list.
* oct-parse.in.yy (octave_parser::finish_array_list): New function
adapted from octave_parser::finish_matrix.
(octave_parser::finish_matrix, octave_parser::finish_cell):
Call finish_array_list to do the work.
* pt-arg-list.h: Include symtab.h.
* base-list.h: Include cstdlib.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sat, 09 Mar 2013 18:04:51 -0500 |
parents | 78365c56a762 |
children | 90dfd98a915a c5e5f6ccac5d |
line wrap: on
line diff
--- a/libinterp/parse-tree/parse.h Sat Mar 09 18:42:43 2013 +0000 +++ b/libinterp/parse-tree/parse.h Sat Mar 09 18:04:51 2013 -0500 @@ -41,6 +41,7 @@ class tree; class tree_anon_fcn_handle; class tree_argument_list; +class tree_array_list; class tree_cell; class tree_colon_expression; class tree_command; @@ -330,6 +331,10 @@ // Validate argument list forming a matrix or cell row. tree_argument_list *validate_matrix_row (tree_argument_list *row); + // Finish building an array_list (common action for finish_matrix + // and finish_cell). + tree_expression *finish_array_list (tree_array_list *a); + // Finish building a matrix list. tree_expression *finish_matrix (tree_matrix *m);