comparison src/parse.y @ 482:680426c10c5e

[project @ 1994-06-30 15:23:09 by jwe]
author jwe
date Thu, 30 Jun 1994 15:23:09 +0000
parents 90964309100b
children e7c5b23b34d3
comparison
equal deleted inserted replaced
481:376ac108f611 482:680426c10c5e
149 tree_function *tree_function_type; 149 tree_function *tree_function_type;
150 tree_index_expression *tree_index_expression_type; 150 tree_index_expression *tree_index_expression_type;
151 tree_colon_expression *tree_colon_expression_type; 151 tree_colon_expression *tree_colon_expression_type;
152 tree_argument_list *tree_argument_list_type; 152 tree_argument_list *tree_argument_list_type;
153 tree_parameter_list *tree_parameter_list_type; 153 tree_parameter_list *tree_parameter_list_type;
154 tree_word_list *tree_word_list_type;
155 tree_command *tree_command_type; 154 tree_command *tree_command_type;
156 tree_if_command *tree_if_command_type; 155 tree_if_command *tree_if_command_type;
157 tree_global_command *tree_global_command_type; 156 tree_global_command *tree_global_command_type;
158 tree_command_list *tree_command_list_type; 157 tree_command_list *tree_command_list_type;
159 tree_word_list_command *tree_word_list_command_type;
160 tree_plot_command *tree_plot_command_type; 158 tree_plot_command *tree_plot_command_type;
161 tree_subplot_list *tree_subplot_list_type; 159 tree_subplot_list *tree_subplot_list_type;
162 tree_plot_limits *tree_plot_limits_type; 160 tree_plot_limits *tree_plot_limits_type;
163 tree_plot_range *tree_plot_range_type; 161 tree_plot_range *tree_plot_range_type;
164 tree_subplot_using *tree_subplot_using_type; 162 tree_subplot_using *tree_subplot_using_type;
191 %type <tree_type> ans_expression expression simple_expr simple_expr1 189 %type <tree_type> ans_expression expression simple_expr simple_expr1
192 %type <tree_type> title 190 %type <tree_type> title
193 %type <tree_matrix_type> matrix 191 %type <tree_matrix_type> matrix
194 %type <tree_identifier_type> identifier 192 %type <tree_identifier_type> identifier
195 %type <tree_function_type> func_def func_def1 func_def2 func_def3 193 %type <tree_function_type> func_def func_def1 func_def2 func_def3
196 %type <tree_index_expression_type> variable 194 %type <tree_index_expression_type> variable word_list_cmd
197 %type <tree_colon_expression_type> colon_expr 195 %type <tree_colon_expression_type> colon_expr
198 %type <tree_argument_list_type> arg_list arg_list1 196 %type <tree_argument_list_type> arg_list arg_list1 word_list word_list1
199 %type <tree_parameter_list_type> param_list param_list1 func_def1a 197 %type <tree_parameter_list_type> param_list param_list1 func_def1a
200 %type <tree_word_list_type> word_list word_list1
201 %type <tree_command_type> statement 198 %type <tree_command_type> statement
202 %type <tree_if_command_type> elseif 199 %type <tree_if_command_type> elseif
203 %type <tree_global_command_type> global_decl global_decl1 200 %type <tree_global_command_type> global_decl global_decl1
204 %type <tree_command_list_type> simple_list simple_list1 list list1 opt_list 201 %type <tree_command_list_type> simple_list simple_list1 list list1 opt_list
205 %type <tree_word_list_command_type> word_list_cmd
206 %type <tree_plot_command_type> plot_command 202 %type <tree_plot_command_type> plot_command
207 %type <tree_subplot_list_type> plot_command1 plot_command2 plot_options 203 %type <tree_subplot_list_type> plot_command1 plot_command2 plot_options
208 %type <tree_plot_limits_type> ranges 204 %type <tree_plot_limits_type> ranges
209 %type <tree_plot_range_type> ranges1 205 %type <tree_plot_range_type> ranges1
210 %type <tree_subplot_using_type> using using1 206 %type <tree_subplot_using_type> using using1
853 } 849 }
854 } 850 }
855 ; 851 ;
856 852
857 word_list_cmd : identifier word_list 853 word_list_cmd : identifier word_list
858 { $$ = new tree_word_list_command ($1, $2); } 854 {
855 $$ = new tree_index_expression
856 ($1, $2, $1->line (), $1->column ());
857 }
859 ; 858 ;
860 859
861 word_list : word_list1 860 word_list : word_list1
862 { $$ = $1->reverse (); } 861 { $$ = $1->reverse (); }
863 ; 862 ;
864 863
865 word_list1 : TEXT 864 word_list1 : TEXT
866 { $$ = new tree_word_list ($1->string ()); } 865 {
866 tree_constant *tmp = new tree_constant ($1->string ());
867 $$ = new tree_argument_list (tmp);
868 }
867 | word_list1 TEXT 869 | word_list1 TEXT
868 { $$ = $1->chain ($2->string ()); } 870 {
871 tree_constant *tmp = new tree_constant ($2->string ());
872 $$ = $1->chain (tmp);
873 }
869 ; 874 ;
870 875
871 // This is truly disgusting. 876 // This is truly disgusting.
872 877
873 g_symtab : // empty 878 g_symtab : // empty