Changes in src/Parser/parser.yy [58dd019:4cb935e]
- File:
-
- 1 edited
-
src/Parser/parser.yy (modified) (27 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/parser.yy
r58dd019 r4cb935e 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Dec 13 14:14:52 201613 // Update Count : 20 8112 // Last Modified On : Tue Nov 29 11:35:52 2016 13 // Update Count : 2069 14 14 // 15 15 … … 153 153 %type<fctl> for_control_expression 154 154 %type<en> subrange 155 %type<constant> asm_name_opt156 155 %type<en> asm_operands_opt asm_operands_list asm_operand 157 156 %type<label> label_list … … 413 412 argument_expression: 414 413 // empty 415 { $$ = nullptr; }// use default argument414 { $$ = 0; } // use default argument 416 415 | assignment_expression 417 416 ; … … 685 684 comma_expression_opt: 686 685 // empty 687 { $$ = nullptr; }686 { $$ = 0; } 688 687 | comma_expression 689 688 ; … … 819 818 switch_clause_list_opt: // CFA 820 819 // empty 821 { $$ = nullptr; }820 { $$ = 0; } 822 821 | switch_clause_list 823 822 ; … … 832 831 choose_clause_list_opt: // CFA 833 832 // empty 834 { $$ = nullptr; }833 { $$ = 0; } 835 834 | choose_clause_list 836 835 ; … … 855 854 fall_through: // CFA 856 855 FALLTHRU 857 { $$ = nullptr; }856 { $$ = 0; } 858 857 | FALLTHRU ';' 859 { $$ = nullptr; }858 { $$ = 0; } 860 859 ; 861 860 … … 991 990 asm_operands_opt: // GCC 992 991 // empty 993 { $$ = nullptr; }// use default argument992 { $$ = 0; } // use default argument 994 993 | asm_operands_list 995 994 ; … … 1010 1009 asm_clobbers_list_opt: // GCC 1011 1010 // empty 1012 { $$ = nullptr; }// use default argument1011 { $$ = 0; } // use default argument 1013 1012 | string_literal 1014 1013 { $$ = new ExpressionNode( $1 ); } … … 1034 1033 declaration_list_opt: // used at beginning of switch statement 1035 1034 pop 1036 { $$ = nullptr; }1035 { $$ = 0; } 1037 1036 | declaration_list 1038 1037 ; … … 1046 1045 old_declaration_list_opt: // used to declare parameter types in K&R style functions 1047 1046 pop 1048 { $$ = nullptr; }1047 { $$ = 0; } 1049 1048 | old_declaration_list 1050 1049 ; … … 1121 1120 { 1122 1121 typedefTable.setNextIdentifier( *$2 ); 1123 $$ = $1->addName( $2 ) ->addAsmName( $3 );1122 $$ = $1->addName( $2 ); 1124 1123 } 1125 1124 | new_abstract_tuple identifier_or_type_name asm_name_opt 1126 1125 { 1127 1126 typedefTable.setNextIdentifier( *$2 ); 1128 $$ = $1->addName( $2 ) ->addAsmName( $3 );1127 $$ = $1->addName( $2 ); 1129 1128 } 1130 1129 | type_qualifier_list new_abstract_tuple identifier_or_type_name asm_name_opt 1131 1130 { 1132 1131 typedefTable.setNextIdentifier( *$3 ); 1133 $$ = $2->addQualifiers( $1 )->addName( $3 ) ->addAsmName( $4 );1132 $$ = $2->addQualifiers( $1 )->addName( $3 ); 1134 1133 } 1135 1134 ; … … 1282 1281 { 1283 1282 typedefTable.addToEnclosingScope( TypedefTable::ID ); 1284 $$ = ( $2->addType( $1 ))->add AsmName( $3 )->addInitializer( $4 );1283 $$ = ( $2->addType( $1 ))->addInitializer( $4 ); 1285 1284 } 1286 1285 | declaring_list ',' attribute_list_opt declarator asm_name_opt initializer_opt 1287 1286 { 1288 1287 typedefTable.addToEnclosingScope( TypedefTable::ID ); 1289 $$ = $1->appendList( $1->cloneBaseType( $4->add AsmName( $5 )->addInitializer( $6 ) ) );1288 $$ = $1->appendList( $1->cloneBaseType( $4->addInitializer( $6 ) ) ); 1290 1289 } 1291 1290 ; … … 1307 1306 type_qualifier_list_opt: // GCC, used in asm_statement 1308 1307 // empty 1309 { $$ = nullptr; }1308 { $$ = 0; } 1310 1309 | type_qualifier_list 1311 1310 ; … … 1533 1532 field_declaration_list: 1534 1533 // empty 1535 { $$ = nullptr; }1534 { $$ = 0; } 1536 1535 | field_declaration_list field_declaration 1537 1536 { $$ = $1 != 0 ? $1->appendList( $2 ) : $2; } … … 1584 1583 bit_subrange_size_opt: 1585 1584 // empty 1586 { $$ = nullptr; }1585 { $$ = 0; } 1587 1586 | bit_subrange_size 1588 1587 { $$ = $1; } … … 1621 1620 enumerator_value_opt: 1622 1621 // empty 1623 { $$ = nullptr; }1622 { $$ = 0; } 1624 1623 | '=' constant_expression 1625 1624 { $$ = $2; } … … 1630 1629 new_parameter_type_list_opt: // CFA 1631 1630 // empty 1632 { $$ = nullptr; }1631 { $$ = 0; } 1633 1632 | new_parameter_type_list 1634 1633 ; … … 1665 1664 parameter_type_list_opt: 1666 1665 // empty 1667 { $$ = nullptr; }1666 { $$ = 0; } 1668 1667 | parameter_type_list 1669 1668 ; … … 1774 1773 initializer_opt: 1775 1774 // empty 1776 { $$ = nullptr; }1775 { $$ = 0; } 1777 1776 | '=' initializer 1778 1777 { $$ = $2; } … … 1788 1787 initializer_list: 1789 1788 // empty 1790 { $$ = nullptr; }1789 { $$ = 0; } 1791 1790 | initializer 1792 1791 | designation initializer { $$ = $2->set_designators( $1 ); } … … 1899 1898 assertion_list_opt: // CFA 1900 1899 // empty 1901 { $$ = nullptr; }1900 { $$ = 0; } 1902 1901 | assertion_list_opt assertion 1903 1902 { $$ = $1 != 0 ? $1->appendList( $2 ) : $2; } … … 1913 1912 { $$ = $4; } 1914 1913 | '|' '(' push type_parameter_list pop ')' '{' push trait_declaration_list '}' '(' type_name_list ')' 1915 { $$ = nullptr; }1914 { $$ = 0; } 1916 1915 ; 1917 1916 … … 2033 2032 external_definition_list_opt: 2034 2033 // empty 2035 { $$ = nullptr; }2034 { $$ = 0; } 2036 2035 | external_definition_list 2037 2036 ; … … 2156 2155 asm_name_opt: // GCC 2157 2156 // empty 2158 { $$ = nullptr; } 2159 | ASM '(' string_literal ')' attribute_list_opt 2160 { $$ = $3; } 2157 | ASM '(' string_literal_list ')' attribute_list_opt { delete $3; } // FIX ME: unimplemented 2161 2158 ; 2162 2159 2163 2160 attribute_list_opt: // GCC 2164 2161 // empty 2165 { $$ = nullptr; }2162 { $$ = 0; } 2166 2163 | attribute_list 2167 2164 ; … … 2176 2173 ATTRIBUTE '(' '(' attribute_parameter_list ')' ')' 2177 2174 // { $$ = DeclarationNode::newQualifier( DeclarationNode::Attribute ); } 2178 { $$ = nullptr; }2175 { $$ = 0; } 2179 2176 ; 2180 2177 … … 2885 2882 assignment_opt: 2886 2883 // empty 2887 { $$ = nullptr; }2884 { $$ = 0; } 2888 2885 | '=' assignment_expression 2889 2886 { $$ = $2; }
Note:
See TracChangeset
for help on using the changeset viewer.