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