Changes in src/Parser/parser.yy [f6e3e34:f38e7d7]
- File:
-
- 1 edited
-
src/Parser/parser.yy (modified) (13 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/parser.yy
rf6e3e34 rf38e7d7 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T hu Mar 22 16:56:21201813 // Update Count : 31 2512 // Last Modified On : Tue Apr 17 17:10:30 2018 13 // Update Count : 3144 14 14 // 15 15 … … 391 391 %precedence '(' 392 392 393 %locations // support location tracking for error messages393 %locations // support location tracking for error messages 394 394 395 395 %start translation_unit // parse-tree root … … 497 497 { $$ = new ExpressionNode( build_func( new ExpressionNode( build_postfix_name( $5 ) ), $2 ) ); } 498 498 | type_name '.' no_attr_identifier // CFA, nested type 499 { SemanticError( yylloc, "Qualified names are currently unimplemented." ); $$ = nullptr; } // FIX ME499 { SemanticError( yylloc, "Qualified names are currently unimplemented." ); $$ = nullptr; } 500 500 | type_name '.' '[' push field_list pop ']' // CFA, nested type / tuple field selector 501 { SemanticError( yylloc, "Qualified names are currently unimplemented." ); $$ = nullptr; } // FIX ME501 { SemanticError( yylloc, "Qualified names are currently unimplemented." ); $$ = nullptr; } 502 502 | GENERIC '(' assignment_expression ',' generic_assoc_list ')' // C11 503 { SemanticError( yylloc, "_Generic is currently unimplemented." ); $$ = nullptr; } // FIX ME503 { SemanticError( yylloc, "_Generic is currently unimplemented." ); $$ = nullptr; } 504 504 ; 505 505 … … 687 687 | '(' type_no_function ')' cast_expression 688 688 { $$ = new ExpressionNode( build_cast( $2, $4 ) ); } 689 | '(' COROUTINE '&' ')' cast_expression // CFA 690 { SemanticError( yylloc, "coroutine cast is currently unimplemented." ); $$ = nullptr; } 691 | '(' THREAD '&' ')' cast_expression // CFA 692 { SemanticError( yylloc, "monitor cast is currently unimplemented." ); $$ = nullptr; } 693 | '(' MONITOR '&' ')' cast_expression // CFA 694 { SemanticError( yylloc, "thread cast is currently unimplemented." ); $$ = nullptr; } 689 695 // VIRTUAL cannot be opt because of look ahead issues 690 | '(' VIRTUAL ')' cast_expression 696 | '(' VIRTUAL ')' cast_expression // CFA 691 697 { $$ = new ExpressionNode( new VirtualCastExpr( maybeMoveBuild< Expression >( $4 ), maybeMoveBuildType( nullptr ) ) ); } 692 | '(' VIRTUAL type_no_function ')' cast_expression 698 | '(' VIRTUAL type_no_function ')' cast_expression // CFA 693 699 { $$ = new ExpressionNode( new VirtualCastExpr( maybeMoveBuild< Expression >( $5 ), maybeMoveBuildType( $3 ) ) ); } 694 700 // | '(' type_no_function ')' tuple … … 782 788 | logical_OR_expression '?' comma_expression ':' conditional_expression 783 789 { $$ = new ExpressionNode( build_cond( $1, $3, $5 ) ); } 784 // FIX ME: this hackcomputes $1 twice790 // FIX ME: computes $1 twice 785 791 | logical_OR_expression '?' /* empty */ ':' conditional_expression // GCC, omitted first operand 786 792 { $$ = new ExpressionNode( build_cond( $1, $1, $4 ) ); } … … 797 803 { $$ = new ExpressionNode( build_binary_val( $2, $1, $3 ) ); } 798 804 | unary_expression '=' '{' initializer_list comma_opt '}' 799 { SemanticError( yylloc, "Initializer assignment is currently unimplemented." ); $$ = nullptr; } // FIX ME805 { SemanticError( yylloc, "Initializer assignment is currently unimplemented." ); $$ = nullptr; } 800 806 ; 801 807 … … 867 873 | exception_statement 868 874 | enable_disable_statement 869 { SemanticError( yylloc, "enable/disable statement is currently unimplemented." ); $$ = nullptr; } // FIX ME875 { SemanticError( yylloc, "enable/disable statement is currently unimplemented." ); $$ = nullptr; } 870 876 | asm_statement 871 877 ; … … 1062 1068 { $$ = new StatementNode( build_return( $2 ) ); } 1063 1069 | RETURN '{' initializer_list comma_opt '}' 1064 { SemanticError( yylloc, "Initializer return is currently unimplemented." ); $$ = nullptr; } // FIX ME1070 { SemanticError( yylloc, "Initializer return is currently unimplemented." ); $$ = nullptr; } 1065 1071 | THROW assignment_expression_opt ';' // handles rethrow 1066 1072 { $$ = new StatementNode( build_throw( $2 ) ); } … … 1086 1092 mutex_statement: 1087 1093 MUTEX '(' argument_expression_list ')' statement 1088 { SemanticError( yylloc, "Mutex statement is currently unimplemented." ); $$ = nullptr; } // FIX ME1094 { SemanticError( yylloc, "Mutex statement is currently unimplemented." ); $$ = nullptr; } 1089 1095 ; 1090 1096 … … 1702 1708 | LONG 1703 1709 { $$ = DeclarationNode::newLength( DeclarationNode::Long ); } 1704 | ZERO_T1705 { $$ = DeclarationNode::newBuiltinType( DeclarationNode::Zero ); }1706 | ONE_T1707 { $$ = DeclarationNode::newBuiltinType( DeclarationNode::One ); }1708 1710 | VALIST // GCC, __builtin_va_list 1709 1711 { $$ = DeclarationNode::newBuiltinType( DeclarationNode::Valist ); } … … 1725 1727 basic_type_specifier: 1726 1728 direct_type 1729 // Cannot have type modifiers, e.g., short, long, etc. 1727 1730 | type_qualifier_list_opt indirect_type type_qualifier_list_opt 1728 1731 { $$ = $2->addQualifiers( $1 )->addQualifiers( $3 ); } … … 1730 1733 1731 1734 direct_type: 1732 // A semantic check is necessary for conflicting type qualifiers.1733 1735 basic_type_name 1734 1736 | type_qualifier_list basic_type_name … … 1749 1751 | ATTR_TYPEGENname '(' comma_expression ')' // CFA: e.g., @type(a+b) y; 1750 1752 { $$ = DeclarationNode::newAttr( $1, $3 ); } 1753 | ZERO_T // CFA 1754 { $$ = DeclarationNode::newBuiltinType( DeclarationNode::Zero ); } 1755 | ONE_T // CFA 1756 { $$ = DeclarationNode::newBuiltinType( DeclarationNode::One ); } 1751 1757 ; 1752 1758
Note:
See TracChangeset
for help on using the changeset viewer.