comparison libinterp/parse-tree/oct-parse.yy @ 30145:cd6f7957c889

* oct-parse.yy (OCTAVE_YYUSE): Use variadic macro.
author John W. Eaton <jwe@octave.org>
date Thu, 09 Sep 2021 13:36:50 -0400
parents 3c2dee80b542
children f692ecc135d6
comparison
equal deleted inserted replaced
30144:3c2dee80b542 30145:cd6f7957c889
97 // warnings about unused values in rules. But that Bison macro was 97 // warnings about unused values in rules. But that Bison macro was
98 // apparently never intended to be public. So define our own. All we 98 // apparently never intended to be public. So define our own. All we
99 // need to do is mention the symantic value somewhere in the rule. It 99 // need to do is mention the symantic value somewhere in the rule. It
100 // doesn't actually need to be used to avoid the Bison warning, so just 100 // doesn't actually need to be used to avoid the Bison warning, so just
101 // define this macro to discard its parameter. 101 // define this macro to discard its parameter.
102 #define OCTAVE_YYUSE(X) 102 #define OCTAVE_YYUSE(X, ...)
103 103
104 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) 104 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
105 // Disable this warning for code that is generated by Bison, 105 // Disable this warning for code that is generated by Bison,
106 // including grammar rules. Push the current state so we can 106 // including grammar rules. Push the current state so we can
107 // restore the warning state prior to functions we define at 107 // restore the warning state prior to functions we define at
620 620
621 $$ = $2; 621 $$ = $2;
622 } 622 }
623 | ',' arg_list ',' 623 | ',' arg_list ','
624 { 624 {
625 OCTAVE_YYUSE ($1); 625 OCTAVE_YYUSE ($1, $3);
626 OCTAVE_YYUSE ($3);
627 626
628 $$ = $2; 627 $$ = $2;
629 } 628 }
630 ; 629 ;
631 630
649 lexer.m_parsing_anon_fcn_body = false; 648 lexer.m_parsing_anon_fcn_body = false;
650 lexer.m_nesting_level.remove (); 649 lexer.m_nesting_level.remove ();
651 } 650 }
652 | '@' param_list anon_fcn_begin error 651 | '@' param_list anon_fcn_begin error
653 { 652 {
654 OCTAVE_YYUSE ($1); 653 OCTAVE_YYUSE ($1, $2);
655 OCTAVE_YYUSE ($2);
656 654
657 lexer.m_parsing_anon_fcn_body = false; 655 lexer.m_parsing_anon_fcn_body = false;
658 656
659 $$ = nullptr; 657 $$ = nullptr;
660 parser.bison_error ("anonymous function bodies must be single expressions"); 658 parser.bison_error ("anonymous function bodies must be single expressions");
679 { $$ = $1; } 677 { $$ = $1; }
680 | superclass_identifier 678 | superclass_identifier
681 { $$ = $1; } 679 { $$ = $1; }
682 | '(' expression ')' 680 | '(' expression ')'
683 { 681 {
684 OCTAVE_YYUSE ($1); 682 OCTAVE_YYUSE ($1, $3);
685 OCTAVE_YYUSE ($3);
686 683
687 $$ = $2->mark_in_parens (); 684 $$ = $2->mark_in_parens ();
688 } 685 }
689 ; 686 ;
690 687
741 { $$ = parser.make_postfix_op (PLUS_PLUS, $1, $2); } 738 { $$ = parser.make_postfix_op (PLUS_PLUS, $1, $2); }
742 | oper_expr MINUS_MINUS 739 | oper_expr MINUS_MINUS
743 { $$ = parser.make_postfix_op (MINUS_MINUS, $1, $2); } 740 { $$ = parser.make_postfix_op (MINUS_MINUS, $1, $2); }
744 | oper_expr '(' ')' 741 | oper_expr '(' ')'
745 { 742 {
746 OCTAVE_YYUSE ($2); 743 OCTAVE_YYUSE ($2, $3);
747 OCTAVE_YYUSE ($3);
748 744
749 $$ = parser.make_index_expression ($1, nullptr, '('); 745 $$ = parser.make_index_expression ($1, nullptr, '(');
750 if (! $$) 746 if (! $$)
751 { 747 {
752 // make_index_expression deleted $1. 748 // make_index_expression deleted $1.
753 YYABORT; 749 YYABORT;
754 } 750 }
755 } 751 }
756 | oper_expr '(' arg_list ')' 752 | oper_expr '(' arg_list ')'
757 { 753 {
758 OCTAVE_YYUSE ($2); 754 OCTAVE_YYUSE ($2, $4);
759 OCTAVE_YYUSE ($4);
760 755
761 $$ = parser.make_index_expression ($1, $3, '('); 756 $$ = parser.make_index_expression ($1, $3, '(');
762 if (! $$) 757 if (! $$)
763 { 758 {
764 // make_index_expression deleted $1 and $3. 759 // make_index_expression deleted $1 and $3.
765 YYABORT; 760 YYABORT;
766 } 761 }
767 } 762 }
768 | oper_expr '{' '}' 763 | oper_expr '{' '}'
769 { 764 {
770 OCTAVE_YYUSE ($2); 765 OCTAVE_YYUSE ($2, $3);
771 OCTAVE_YYUSE ($3);
772 766
773 $$ = parser.make_index_expression ($1, nullptr, '{'); 767 $$ = parser.make_index_expression ($1, nullptr, '{');
774 if (! $$) 768 if (! $$)
775 { 769 {
776 // make_index_expression deleted $1. 770 // make_index_expression deleted $1.
777 YYABORT; 771 YYABORT;
778 } 772 }
779 } 773 }
780 | oper_expr '{' arg_list '}' 774 | oper_expr '{' arg_list '}'
781 { 775 {
782 OCTAVE_YYUSE ($2); 776 OCTAVE_YYUSE ($2, $4);
783 OCTAVE_YYUSE ($4);
784 777
785 $$ = parser.make_index_expression ($1, $3, '{'); 778 $$ = parser.make_index_expression ($1, $3, '{');
786 if (! $$) 779 if (! $$)
787 { 780 {
788 // make_index_expression deleted $1 and $3. 781 // make_index_expression deleted $1 and $3.
795 { $$ = parser.make_postfix_op (TRANSPOSE, $1, $2); } 788 { $$ = parser.make_postfix_op (TRANSPOSE, $1, $2); }
796 | oper_expr indirect_ref_op STRUCT_ELT 789 | oper_expr indirect_ref_op STRUCT_ELT
797 { $$ = parser.make_indirect_ref ($1, $3->text ()); } 790 { $$ = parser.make_indirect_ref ($1, $3->text ()); }
798 | oper_expr indirect_ref_op '(' expression ')' 791 | oper_expr indirect_ref_op '(' expression ')'
799 { 792 {
800 OCTAVE_YYUSE ($3); 793 OCTAVE_YYUSE ($3, $5);
801 OCTAVE_YYUSE ($5);
802 794
803 $$ = parser.make_indirect_ref ($1, $4); 795 $$ = parser.make_indirect_ref ($1, $4);
804 } 796 }
805 | PLUS_PLUS oper_expr %prec UNARY 797 | PLUS_PLUS oper_expr %prec UNARY
806 { $$ = parser.make_prefix_op (PLUS_PLUS, $2, $1); } 798 { $$ = parser.make_prefix_op (PLUS_PLUS, $2, $1); }
844 { $$ = parser.make_postfix_op (PLUS_PLUS, $1, $2); } 836 { $$ = parser.make_postfix_op (PLUS_PLUS, $1, $2); }
845 | power_expr MINUS_MINUS 837 | power_expr MINUS_MINUS
846 { $$ = parser.make_postfix_op (MINUS_MINUS, $1, $2); } 838 { $$ = parser.make_postfix_op (MINUS_MINUS, $1, $2); }
847 | power_expr '(' ')' 839 | power_expr '(' ')'
848 { 840 {
849 OCTAVE_YYUSE ($2); 841 OCTAVE_YYUSE ($2, $3);
850 OCTAVE_YYUSE ($3);
851 842
852 $$ = parser.make_index_expression ($1, nullptr, '('); 843 $$ = parser.make_index_expression ($1, nullptr, '(');
853 if (! $$) 844 if (! $$)
854 { 845 {
855 // make_index_expression deleted $1. 846 // make_index_expression deleted $1.
856 YYABORT; 847 YYABORT;
857 } 848 }
858 } 849 }
859 | power_expr '(' arg_list ')' 850 | power_expr '(' arg_list ')'
860 { 851 {
861 OCTAVE_YYUSE ($2); 852 OCTAVE_YYUSE ($2, $4);
862 OCTAVE_YYUSE ($4);
863 853
864 $$ = parser.make_index_expression ($1, $3, '('); 854 $$ = parser.make_index_expression ($1, $3, '(');
865 if (! $$) 855 if (! $$)
866 { 856 {
867 // make_index_expression deleted $1 and $3. 857 // make_index_expression deleted $1 and $3.
868 YYABORT; 858 YYABORT;
869 } 859 }
870 } 860 }
871 | power_expr '{' '}' 861 | power_expr '{' '}'
872 { 862 {
873 OCTAVE_YYUSE ($2); 863 OCTAVE_YYUSE ($2, $3);
874 OCTAVE_YYUSE ($3);
875 864
876 $$ = parser.make_index_expression ($1, nullptr, '{'); 865 $$ = parser.make_index_expression ($1, nullptr, '{');
877 if (! $$) 866 if (! $$)
878 { 867 {
879 // make_index_expression deleted $1. 868 // make_index_expression deleted $1.
880 YYABORT; 869 YYABORT;
881 } 870 }
882 } 871 }
883 | power_expr '{' arg_list '}' 872 | power_expr '{' arg_list '}'
884 { 873 {
885 OCTAVE_YYUSE ($2); 874 OCTAVE_YYUSE ($2, $4);
886 OCTAVE_YYUSE ($4);
887 875
888 $$ = parser.make_index_expression ($1, $3, '{'); 876 $$ = parser.make_index_expression ($1, $3, '{');
889 if (! $$) 877 if (! $$)
890 { 878 {
891 // make_index_expression deleted $1 and $3. 879 // make_index_expression deleted $1 and $3.
894 } 882 }
895 | power_expr indirect_ref_op STRUCT_ELT 883 | power_expr indirect_ref_op STRUCT_ELT
896 { $$ = parser.make_indirect_ref ($1, $3->text ()); } 884 { $$ = parser.make_indirect_ref ($1, $3->text ()); }
897 | power_expr indirect_ref_op '(' expression ')' 885 | power_expr indirect_ref_op '(' expression ')'
898 { 886 {
899 OCTAVE_YYUSE ($3); 887 OCTAVE_YYUSE ($3, $5);
900 OCTAVE_YYUSE ($5);
901 888
902 $$ = parser.make_indirect_ref ($1, $4); 889 $$ = parser.make_indirect_ref ($1, $4);
903 } 890 }
904 | PLUS_PLUS power_expr %prec POW 891 | PLUS_PLUS power_expr %prec POW
905 { $$ = parser.make_prefix_op (PLUS_PLUS, $2, $1); } 892 { $$ = parser.make_prefix_op (PLUS_PLUS, $2, $1); }
925 YYABORT; 912 YYABORT;
926 } 913 }
927 } 914 }
928 | oper_expr ':' oper_expr ':' oper_expr 915 | oper_expr ':' oper_expr ':' oper_expr
929 { 916 {
930 OCTAVE_YYUSE ($2); 917 OCTAVE_YYUSE ($2, $4);
931 OCTAVE_YYUSE ($4);
932 918
933 $$ = parser.make_colon_expression ($1, $5, $3); 919 $$ = parser.make_colon_expression ($1, $5, $3);
934 920
935 if (! $$) 921 if (! $$)
936 { 922 {
1126 { $$ = parser.append_if_clause ($1, $2); } 1112 { $$ = parser.append_if_clause ($1, $2); }
1127 ; 1113 ;
1128 1114
1129 elseif_clause : ELSEIF stash_comment opt_sep expression stmt_begin opt_sep opt_list 1115 elseif_clause : ELSEIF stash_comment opt_sep expression stmt_begin opt_sep opt_list
1130 { 1116 {
1131 OCTAVE_YYUSE ($3); 1117 OCTAVE_YYUSE ($3, $6);
1132 OCTAVE_YYUSE ($6);
1133 1118
1134 $4->mark_braindead_shortcircuit (); 1119 $4->mark_braindead_shortcircuit ();
1135 1120
1136 $$ = parser.make_elseif_clause ($1, $4, $7, $2); 1121 $$ = parser.make_elseif_clause ($1, $4, $7, $2);
1137 } 1122 }
1177 { $$ = parser.append_switch_case ($1, $2); } 1162 { $$ = parser.append_switch_case ($1, $2); }
1178 ; 1163 ;
1179 1164
1180 switch_case : CASE stash_comment opt_sep expression stmt_begin opt_sep opt_list 1165 switch_case : CASE stash_comment opt_sep expression stmt_begin opt_sep opt_list
1181 { 1166 {
1182 OCTAVE_YYUSE ($3); 1167 OCTAVE_YYUSE ($3, $6);
1183 OCTAVE_YYUSE ($6);
1184 1168
1185 $$ = parser.make_switch_case ($1, $4, $7, $2); 1169 $$ = parser.make_switch_case ($1, $4, $7, $2);
1186 } 1170 }
1187 ; 1171 ;
1188 1172
1210 YYABORT; 1194 YYABORT;
1211 } 1195 }
1212 } 1196 }
1213 | DO stash_comment opt_sep opt_list UNTIL expression 1197 | DO stash_comment opt_sep opt_list UNTIL expression
1214 { 1198 {
1215 OCTAVE_YYUSE ($1); 1199 OCTAVE_YYUSE ($1, $3);
1216 OCTAVE_YYUSE ($3);
1217 1200
1218 $$ = parser.make_do_until_command ($5, $4, $6, $2); 1201 $$ = parser.make_do_until_command ($5, $4, $6, $2);
1219 } 1202 }
1220 | FOR stash_comment assign_lhs '=' expression stmt_begin opt_sep opt_list END 1203 | FOR stash_comment assign_lhs '=' expression stmt_begin opt_sep opt_list END
1221 { 1204 {
1222 OCTAVE_YYUSE ($4); 1205 OCTAVE_YYUSE ($4, $7);
1223 OCTAVE_YYUSE ($7);
1224 1206
1225 if (! ($$ = parser.make_for_command (FOR, $1, $3, $5, 1207 if (! ($$ = parser.make_for_command (FOR, $1, $3, $5,
1226 nullptr, $8, $9, $2))) 1208 nullptr, $8, $9, $2)))
1227 { 1209 {
1228 // make_for_command deleted $3, $5, and $8. 1210 // make_for_command deleted $3, $5, and $8.
1229 YYABORT; 1211 YYABORT;
1230 } 1212 }
1231 } 1213 }
1232 | FOR stash_comment '(' assign_lhs '=' expression ')' opt_sep opt_list END 1214 | FOR stash_comment '(' assign_lhs '=' expression ')' opt_sep opt_list END
1233 { 1215 {
1234 OCTAVE_YYUSE ($3); 1216 OCTAVE_YYUSE ($3, $5, $7, $8);
1235 OCTAVE_YYUSE ($5);
1236 OCTAVE_YYUSE ($7);
1237 OCTAVE_YYUSE ($8);
1238 1217
1239 if (! ($$ = parser.make_for_command (FOR, $1, $4, $6, 1218 if (! ($$ = parser.make_for_command (FOR, $1, $4, $6,
1240 nullptr, $9, $10, $2))) 1219 nullptr, $9, $10, $2)))
1241 { 1220 {
1242 // make_for_command deleted $4, $6, and $9. 1221 // make_for_command deleted $4, $6, and $9.
1243 YYABORT; 1222 YYABORT;
1244 } 1223 }
1245 } 1224 }
1246 | PARFOR stash_comment assign_lhs '=' expression stmt_begin opt_sep opt_list END 1225 | PARFOR stash_comment assign_lhs '=' expression stmt_begin opt_sep opt_list END
1247 { 1226 {
1248 OCTAVE_YYUSE ($4); 1227 OCTAVE_YYUSE ($4, $7);
1249 OCTAVE_YYUSE ($7);
1250 1228
1251 if (! ($$ = parser.make_for_command (PARFOR, $1, $3, $5, 1229 if (! ($$ = parser.make_for_command (PARFOR, $1, $3, $5,
1252 nullptr, $8, $9, $2))) 1230 nullptr, $8, $9, $2)))
1253 { 1231 {
1254 // make_for_command deleted $3, $5, and $8. 1232 // make_for_command deleted $3, $5, and $8.
1255 YYABORT; 1233 YYABORT;
1256 } 1234 }
1257 } 1235 }
1258 | PARFOR stash_comment '(' assign_lhs '=' expression ',' expression ')' opt_sep opt_list END 1236 | PARFOR stash_comment '(' assign_lhs '=' expression ',' expression ')' opt_sep opt_list END
1259 { 1237 {
1260 OCTAVE_YYUSE ($3); 1238 OCTAVE_YYUSE ($3, $5, $7, $9, $10);
1261 OCTAVE_YYUSE ($5);
1262 OCTAVE_YYUSE ($7);
1263 OCTAVE_YYUSE ($9);
1264 OCTAVE_YYUSE ($10);
1265 1239
1266 if (! ($$ = parser.make_for_command (PARFOR, $1, $4, $6, 1240 if (! ($$ = parser.make_for_command (PARFOR, $1, $4, $6,
1267 $8, $11, $12, $2))) 1241 $8, $11, $12, $2)))
1268 { 1242 {
1269 // make_for_command deleted $4, $6, $8, and $11. 1243 // make_for_command deleted $4, $6, $8, and $11.
1314 // ========== 1288 // ==========
1315 1289
1316 except_command : UNWIND stash_comment opt_sep opt_list CLEANUP 1290 except_command : UNWIND stash_comment opt_sep opt_list CLEANUP
1317 stash_comment opt_sep opt_list END 1291 stash_comment opt_sep opt_list END
1318 { 1292 {
1319 OCTAVE_YYUSE ($3); 1293 OCTAVE_YYUSE ($3, $5, $7);
1320 OCTAVE_YYUSE ($5);
1321 OCTAVE_YYUSE ($7);
1322 1294
1323 if (! ($$ = parser.make_unwind_command ($1, $4, $8, $9, $2, $6))) 1295 if (! ($$ = parser.make_unwind_command ($1, $4, $8, $9, $2, $6)))
1324 { 1296 {
1325 // make_unwind_command deleted $4 and $8. 1297 // make_unwind_command deleted $4 and $8.
1326 YYABORT; 1298 YYABORT;
1327 } 1299 }
1328 } 1300 }
1329 | TRY stash_comment opt_sep opt_list CATCH stash_comment 1301 | TRY stash_comment opt_sep opt_list CATCH stash_comment
1330 opt_sep opt_list END 1302 opt_sep opt_list END
1331 { 1303 {
1332 OCTAVE_YYUSE ($3); 1304 OCTAVE_YYUSE ($3, $5, $7);
1333 OCTAVE_YYUSE ($5);
1334 OCTAVE_YYUSE ($7);
1335 1305
1336 if (! ($$ = parser.make_try_command ($1, $4, $7, $8, $9, $2, $6))) 1306 if (! ($$ = parser.make_try_command ($1, $4, $7, $8, $9, $2, $6)))
1337 { 1307 {
1338 // make_try_command deleted $4 and $8. 1308 // make_try_command deleted $4 and $8.
1339 YYABORT; 1309 YYABORT;
1458 // List of function return value names 1428 // List of function return value names
1459 // =================================== 1429 // ===================================
1460 1430
1461 return_list : '[' ']' 1431 return_list : '[' ']'
1462 { 1432 {
1463 OCTAVE_YYUSE ($1); 1433 OCTAVE_YYUSE ($1, $2);
1464 OCTAVE_YYUSE ($2);
1465 1434
1466 lexer.m_looking_at_return_list = false; 1435 lexer.m_looking_at_return_list = false;
1467 1436
1468 $$ = parser.make_parameter_list (octave::tree_parameter_list::out); 1437 $$ = parser.make_parameter_list (octave::tree_parameter_list::out);
1469 } 1438 }
1486 YYABORT; 1455 YYABORT;
1487 } 1456 }
1488 } 1457 }
1489 | '[' return_list1 ']' 1458 | '[' return_list1 ']'
1490 { 1459 {
1491 OCTAVE_YYUSE ($1); 1460 OCTAVE_YYUSE ($1, $3);
1492 OCTAVE_YYUSE ($3);
1493 1461
1494 lexer.m_looking_at_return_list = false; 1462 lexer.m_looking_at_return_list = false;
1495 1463
1496 // Check for duplicate parameter names, varargin, 1464 // Check for duplicate parameter names, varargin,
1497 // or varargout. 1465 // or varargout.
1575 1543
1576 $$ = nullptr; 1544 $$ = nullptr;
1577 } 1545 }
1578 | begin_file opt_nl classdef parsing_local_fcns opt_sep opt_fcn_list END_OF_INPUT 1546 | begin_file opt_nl classdef parsing_local_fcns opt_sep opt_fcn_list END_OF_INPUT
1579 { 1547 {
1580 OCTAVE_YYUSE ($2); 1548 OCTAVE_YYUSE ($2, $5, $7);
1581 OCTAVE_YYUSE ($5);
1582 OCTAVE_YYUSE ($7);
1583 1549
1584 // Unused symbol table context. 1550 // Unused symbol table context.
1585 lexer.m_symtab_context.pop (); 1551 lexer.m_symtab_context.pop ();
1586 1552
1587 if (! parser.finish_classdef_file ($3, $6)) 1553 if (! parser.finish_classdef_file ($3, $6))
1614 1580
1615 lexer.m_arguments_is_keyword = true; 1581 lexer.m_arguments_is_keyword = true;
1616 } 1582 }
1617 | GET '.' identifier 1583 | GET '.' identifier
1618 { 1584 {
1619 OCTAVE_YYUSE ($1); 1585 OCTAVE_YYUSE ($1, $2);
1620 OCTAVE_YYUSE ($2);
1621 1586
1622 $$ = $3; 1587 $$ = $3;
1623 1588
1624 lexer.m_parsed_function_name.top () = true; 1589 lexer.m_parsed_function_name.top () = true;
1625 lexer.m_maybe_classdef_get_set_method = false; 1590 lexer.m_maybe_classdef_get_set_method = false;
1626 lexer.m_parsing_classdef_get_method = true; 1591 lexer.m_parsing_classdef_get_method = true;
1627 lexer.m_arguments_is_keyword = true; 1592 lexer.m_arguments_is_keyword = true;
1628 } 1593 }
1629 | SET '.' identifier 1594 | SET '.' identifier
1630 { 1595 {
1631 OCTAVE_YYUSE ($1); 1596 OCTAVE_YYUSE ($1, $2);
1632 OCTAVE_YYUSE ($2);
1633 1597
1634 $$ = $3; 1598 $$ = $3;
1635 1599
1636 lexer.m_parsed_function_name.top () = true; 1600 lexer.m_parsed_function_name.top () = true;
1637 lexer.m_maybe_classdef_get_set_method = false; 1601 lexer.m_maybe_classdef_get_set_method = false;
1696 $$ = parser.make_function ($1, nullptr, $3, $4, $6, $7, $2); 1660 $$ = parser.make_function ($1, nullptr, $3, $4, $6, $7, $2);
1697 } 1661 }
1698 | function_beg stash_comment return_list '=' fcn_name 1662 | function_beg stash_comment return_list '=' fcn_name
1699 opt_param_list opt_sep function_body function_end 1663 opt_param_list opt_sep function_body function_end
1700 { 1664 {
1701 OCTAVE_YYUSE ($4); 1665 OCTAVE_YYUSE ($4, $7);
1702 OCTAVE_YYUSE ($7);
1703 1666
1704 $$ = parser.make_function ($1, $3, $5, $6, $8, $9, $2); 1667 $$ = parser.make_function ($1, $3, $5, $6, $8, $9, $2);
1705 } 1668 }
1706 ; 1669 ;
1707 1670
1742 ; 1705 ;
1743 1706
1744 arguments_block : arguments_beg stash_comment opt_sep args_attr_list 1707 arguments_block : arguments_beg stash_comment opt_sep args_attr_list
1745 args_validation_list opt_sep END 1708 args_validation_list opt_sep END
1746 { 1709 {
1747 OCTAVE_YYUSE ($3); 1710 OCTAVE_YYUSE ($3, $6);
1748 OCTAVE_YYUSE ($6);
1749 1711
1750 octave::comment_list *lc = $2; 1712 octave::comment_list *lc = $2;
1751 octave::comment_list *tc = lexer.get_comment (); 1713 octave::comment_list *tc = lexer.get_comment ();
1752 1714
1753 if (! ($$ = parser.make_arguments_block ($1, $4, $5, $7, lc, tc))) 1715 if (! ($$ = parser.make_arguments_block ($1, $4, $5, $7, lc, tc)))
1769 1731
1770 args_attr_list : // empty 1732 args_attr_list : // empty
1771 { $$ = nullptr; } 1733 { $$ = nullptr; }
1772 | '(' identifier ')' 1734 | '(' identifier ')'
1773 { 1735 {
1774 OCTAVE_YYUSE ($1); 1736 OCTAVE_YYUSE ($1, $3);
1775 OCTAVE_YYUSE ($3);
1776 1737
1777 // Error if $$ is nullptr. 1738 // Error if $$ is nullptr.
1778 if (! ($$ = parser.make_args_attribute_list ($2))) 1739 if (! ($$ = parser.make_args_attribute_list ($2)))
1779 { 1740 {
1780 // make_args_attribute_list deleted $2. 1741 // make_args_attribute_list deleted $2.
1818 1779
1819 size_spec : // empty 1780 size_spec : // empty
1820 { $$ = nullptr; } 1781 { $$ = nullptr; }
1821 | '(' arg_list ')' 1782 | '(' arg_list ')'
1822 { 1783 {
1823 OCTAVE_YYUSE ($1); 1784 OCTAVE_YYUSE ($1, $3);
1824 OCTAVE_YYUSE ($3);
1825 1785
1826 if (! ($$ = parser.make_arg_size_spec ($2))) 1786 if (! ($$ = parser.make_arg_size_spec ($2)))
1827 { 1787 {
1828 // make_arg_size_spec deleted $2. 1788 // make_arg_size_spec deleted $2.
1829 YYABORT; 1789 YYABORT;
1840 // Use argument list so we can accept anonymous functions. 1800 // Use argument list so we can accept anonymous functions.
1841 validation_fcns : // empty 1801 validation_fcns : // empty
1842 { $$ = nullptr; } 1802 { $$ = nullptr; }
1843 | '{' arg_list '}' 1803 | '{' arg_list '}'
1844 { 1804 {
1845 OCTAVE_YYUSE ($1); 1805 OCTAVE_YYUSE ($1, $3);
1846 OCTAVE_YYUSE ($3);
1847 1806
1848 if (! ($$ = parser.make_arg_validation_fcns ($2))) 1807 if (! ($$ = parser.make_arg_validation_fcns ($2)))
1849 { 1808 {
1850 // make_arg_validation_fcns deleted $2. 1809 // make_arg_validation_fcns deleted $2.
1851 YYABORT; 1810 YYABORT;
1906 1865
1907 attr_list : // empty 1866 attr_list : // empty
1908 { $$ = nullptr; } 1867 { $$ = nullptr; }
1909 | '(' attr_list1 ')' opt_sep 1868 | '(' attr_list1 ')' opt_sep
1910 { 1869 {
1911 OCTAVE_YYUSE ($1); 1870 OCTAVE_YYUSE ($1, $3, $4);
1912 OCTAVE_YYUSE ($3);
1913 OCTAVE_YYUSE ($4);
1914 1871
1915 $$ = $2; 1872 $$ = $2;
1916 } 1873 }
1917 ; 1874 ;
1918 1875
2288 } 2245 }
2289 ; 2246 ;
2290 2247
2291 class_enum : stash_comment identifier '(' expression ')' 2248 class_enum : stash_comment identifier '(' expression ')'
2292 { 2249 {
2293 OCTAVE_YYUSE ($3); 2250 OCTAVE_YYUSE ($3, $5);
2294 OCTAVE_YYUSE ($5);
2295 2251
2296 $$ = parser.make_classdef_enum ($2, $4, $1); 2252 $$ = parser.make_classdef_enum ($2, $4, $1);
2297 } 2253 }
2298 ; 2254 ;
2299 2255