- Timestamp:
- Feb 12, 2021, 12:27:38 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- eb24cec0
- Parents:
- da3963a (diff), 52f6250 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/parser.yy
rda3963a r565acf59 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Jan 26 11:18:19202113 // Update Count : 4 67412 // Last Modified On : Wed Feb 3 18:30:12 2021 13 // Update Count : 4700 14 14 // 15 15 … … 41 41 42 42 %{ 43 #define YYDEBUG_LEXER_TEXT (yylval)// lexer loads this up each time43 #define YYDEBUG_LEXER_TEXT( yylval ) // lexer loads this up each time 44 44 #define YYDEBUG 1 // get the pretty debugging code to compile 45 45 #define YYERROR_VERBOSE // more information in syntax errors … … 187 187 ConstantExpr * constant = dynamic_cast<ConstantExpr *>(type->expr.get()); 188 188 if ( constant && (constant->get_constant()->get_value() == "0" || constant->get_constant()->get_value() == "1") ) { 189 189 type = new ExpressionNode( new CastExpr( maybeMoveBuild<Expression>(type), new BasicType( Type::Qualifiers(), BasicType::SignedInt ) ) ); 190 190 } // if 191 191 return new ForCtrl( … … 618 618 postfix_expression: 619 619 primary_expression 620 | postfix_expression '[' assignment_expression ',' comma_expression ']' 621 // { $$ = new ExpressionNode( build_binary_val( OperKinds::Index, $1, new ExpressionNode( build_binary_val( OperKinds::Index, $3, $5 ) ) ) ); } 622 { SemanticError( yylloc, "New array subscript is currently unimplemented." ); $$ = nullptr; } 620 623 | postfix_expression '[' assignment_expression ']' 621 624 // CFA, comma_expression disallowed in this context because it results in a common user error: subscripting a … … 1247 1250 { $$ = new StatementNode( build_computedgoto( $3 ) ); } 1248 1251 // A semantic check is required to ensure fallthru appears only in the body of a choose statement. 1249 1252 | fall_through_name ';' // CFA 1250 1253 { $$ = new StatementNode( build_branch( BranchStmt::FallThrough ) ); } 1251 1254 | fall_through_name identifier_or_type_name ';' // CFA 1252 1255 { $$ = new StatementNode( build_branch( $2, BranchStmt::FallThrough ) ); } 1253 1256 | fall_through_name DEFAULT ';' // CFA … … 1739 1742 1740 1743 enum_specifier_nobody: // type specifier - {...} 1741 // Preclude SUE declarations in restricted scopes: 1742 // 1743 // int f( struct S { int i; } s1, Struct S s2 ) { struct S s3; ... } 1744 // 1745 // because it is impossible to call f due to name equivalence. 1744 // Preclude SUE declarations in restricted scopes (see type_specifier_nobody) 1746 1745 basic_type_specifier 1747 1746 | sue_type_specifier_nobody … … 2461 2460 { 2462 2461 typedefTable.addToScope( *$2, TYPEDEFname, "9" ); 2463 if ( $1 == TypeDecl::Otype ) { SemanticError( yylloc, "otype keyword is deprecated " ); }2464 if ( $1 == TypeDecl::Dtype ) { SemanticError( yylloc, "dtype keyword is deprecated " ); }2465 if ( $1 == TypeDecl::Ttype ) { SemanticError( yylloc, "ttype keyword is deprecated " ); }2462 if ( $1 == TypeDecl::Otype ) { SemanticError( yylloc, "otype keyword is deprecated, use T " ); } 2463 if ( $1 == TypeDecl::Dtype ) { SemanticError( yylloc, "dtype keyword is deprecated, use T &" ); } 2464 if ( $1 == TypeDecl::Ttype ) { SemanticError( yylloc, "ttype keyword is deprecated, use T ..." ); } 2466 2465 } 2467 2466 type_initializer_opt assertion_list_opt … … 3191 3190 | '[' ']' multi_array_dimension 3192 3191 { $$ = DeclarationNode::newArray( 0, 0, false )->addArray( $3 ); } 3192 | '[' push assignment_expression pop ',' comma_expression ']' 3193 { $$ = DeclarationNode::newArray( $3, 0, false )->addArray( DeclarationNode::newArray( $6, 0, false ) ); } 3194 // { SemanticError( yylloc, "New array dimension is currently unimplemented." ); $$ = nullptr; } 3193 3195 | multi_array_dimension 3194 3196 ; -
src/main.cc
rda3963a r565acf59 9 9 // Author : Peter Buhr and Rob Schluntz 10 10 // Created On : Fri May 15 23:12:02 2015 11 // Last Modified By : Andrew Beach12 // Last Modified On : Mon Dec 7 15:29:00 202013 // Update Count : 6 3911 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Feb 8 21:10:16 2021 13 // Update Count : 642 14 14 // 15 15 … … 492 492 493 493 static const char * description[] = { 494 "diagnostic color: never, always, or auto.",// -c494 "diagnostic color: never, always, auto", // -c 495 495 "wait for gdb to attach", // -g 496 "print help message",// -h496 "print translator help message", // -h 497 497 "generate libcfa.c", // -l 498 498 "generate line marks", // -L … … 500 500 "do not generate line marks", // -N 501 501 "do not read prelude", // -n 502 " generate prototypes for prelude functions",// -p502 "do not generate prelude prototypes => prelude not printed", // -p 503 503 "only print deterministic output", // -d 504 504 "Use the old-ast", // -O … … 506 506 "print", // -P 507 507 "<directory> prelude directory for debug/nodebug", // no flag 508 "<option-list> enable profiling information: \n counters,heap,time,all,none", // -S508 "<option-list> enable profiling information: counters, heap, time, all, none", // -S 509 509 "building cfa standard lib", // -t 510 510 "", // -w
Note:
See TracChangeset
for help on using the changeset viewer.