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