Changes in / [8fc9a5f:40a1392]
- Location:
- src
- Files:
-
- 4 edited
-
Parser/DeclarationNode.cc (modified) (5 diffs)
-
Parser/parser.yy (modified) (5 diffs)
-
SynTree/TypeDecl.cc (modified) (2 diffs)
-
main.cc (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/DeclarationNode.cc
r8fc9a5f r40a1392 10 10 // Created On : Sat May 16 12:34:05 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T ue Jun 9 20:26:55202013 // Update Count : 113 412 // Last Modified On : Thu Oct 8 08:03:38 2020 13 // Update Count : 1135 14 14 // 15 15 … … 1016 1016 if ( DeclarationWithType * dwt = dynamic_cast< DeclarationWithType * >( decl ) ) { 1017 1017 dwt->location = cur->location; 1018 * out++ = dwt;1018 *out++ = dwt; 1019 1019 } else if ( StructDecl * agg = dynamic_cast< StructDecl * >( decl ) ) { 1020 1020 // e.g., int foo(struct S) {} … … 1022 1022 auto obj = new ObjectDecl( "", Type::StorageClasses(), linkage, nullptr, inst, nullptr ); 1023 1023 obj->location = cur->location; 1024 * out++ = obj;1024 *out++ = obj; 1025 1025 delete agg; 1026 1026 } else if ( UnionDecl * agg = dynamic_cast< UnionDecl * >( decl ) ) { … … 1029 1029 auto obj = new ObjectDecl( "", Type::StorageClasses(), linkage, nullptr, inst, nullptr ); 1030 1030 obj->location = cur->location; 1031 * out++ = obj;1031 *out++ = obj; 1032 1032 } else if ( EnumDecl * agg = dynamic_cast< EnumDecl * >( decl ) ) { 1033 1033 // e.g., int foo(enum E) {} … … 1035 1035 auto obj = new ObjectDecl( "", Type::StorageClasses(), linkage, nullptr, inst, nullptr ); 1036 1036 obj->location = cur->location; 1037 * out++ = obj;1037 *out++ = obj; 1038 1038 } // if 1039 1039 } catch( SemanticErrorException & e ) { -
src/Parser/parser.yy
r8fc9a5f r40a1392 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Oct 6 18:24:18202013 // Update Count : 461 012 // Last Modified On : Fri Oct 9 18:09:09 2020 13 // Update Count : 4614 14 14 // 15 15 … … 204 204 return forCtrl( type, new string( identifier->name ), start, compop, comp, inc ); 205 205 } else { 206 SemanticError( yylloc, "Expression disallowed. Only loop-index name allowed " ); return nullptr;206 SemanticError( yylloc, "Expression disallowed. Only loop-index name allowed." ); return nullptr; 207 207 } // if 208 208 } else { 209 SemanticError( yylloc, "Expression disallowed. Only loop-index name allowed " ); return nullptr;209 SemanticError( yylloc, "Expression disallowed. Only loop-index name allowed." ); return nullptr; 210 210 } // if 211 211 } // forCtrl … … 2412 2412 // Overloading: function, data, and operator identifiers may be overloaded. 2413 2413 // 2414 // Type declarations: " type" is used to generate new types for declaring objects. Similarly, "dtype" is used for object2414 // Type declarations: "otype" is used to generate new types for declaring objects. Similarly, "dtype" is used for object 2415 2415 // and incomplete types, and "ftype" is used for function types. Type declarations with initializers provide 2416 2416 // definitions of new types. Type declarations with storage class "extern" provide opaque types. … … 2441 2441 type_class identifier_or_type_name 2442 2442 { typedefTable.addToScope( *$2, TYPEDEFname, "9" ); } 2443 type_initializer_opt assertion_list_opt2443 type_initializer_opt assertion_list_opt 2444 2444 { $$ = DeclarationNode::newTypeParam( $1, $2 )->addTypeInitializer( $4 )->addAssertions( $5 ); } 2445 2445 | type_specifier identifier_parameter_declarator … … 2468 2468 assertion 2469 2469 | assertion_list assertion 2470 { $$ = $1 ? $1->appendList( $2 ) : $2; }2470 { $$ = $1->appendList( $2 ); } 2471 2471 ; 2472 2472 -
src/SynTree/TypeDecl.cc
r8fc9a5f r40a1392 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Dec 13 15:26:14 201913 // Update Count : 2 112 // Last Modified On : Thu Oct 8 18:18:55 2020 13 // Update Count : 22 14 14 // 15 15 … … 21 21 #include "Type.h" // for Type, Type::StorageClasses 22 22 23 TypeDecl::TypeDecl( const std::string & name, Type::StorageClasses scs, Type * type, Kind kind, bool sized, Type * init ) : Parent( name, scs, type ), kind( kind ), sized( kind == Ttype || sized ), init( init ) { 23 TypeDecl::TypeDecl( const std::string & name, Type::StorageClasses scs, Type * type, Kind kind, bool sized, Type * init ) : 24 Parent( name, scs, type ), kind( kind ), sized( kind == Ttype || sized ), init( init ) { 24 25 } 25 26 -
src/main.cc
r8fc9a5f r40a1392 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 : T ue May 19 12:03:00202013 // Update Count : 63 411 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Oct 8 18:17:46 2020 13 // Update Count : 637 14 14 // 15 15 … … 451 451 452 452 453 static const char optstring[] = ":c:ghlLmNnpd P:S:twW:D:";453 static const char optstring[] = ":c:ghlLmNnpdOAP:S:twW:D:"; 454 454 455 455 enum { PreludeDir = 128 }; … … 478 478 479 479 static const char * description[] = { 480 "diagnostic color: never, always, or auto.", // -c481 "wait for gdb to attach", // -g482 "print help message", // -h483 "generate libcfa.c", // -l484 "generate line marks", // -L485 "do not replace main", // -m486 "do not generate line marks", // -N487 "do not read prelude", // -n480 "diagnostic color: never, always, or auto.", // -c 481 "wait for gdb to attach", // -g 482 "print help message", // -h 483 "generate libcfa.c", // -l 484 "generate line marks", // -L 485 "do not replace main", // -m 486 "do not generate line marks", // -N 487 "do not read prelude", // -n 488 488 "generate prototypes for prelude functions", // -p 489 " don't print output that isn't deterministic",// -d490 "Use the old-ast", // -O491 "Use the new-ast", // -A492 "print", // -P489 "only print deterministic output", // -d 490 "Use the old-ast", // -O 491 "Use the new-ast", // -A 492 "print", // -P 493 493 "<directory> prelude directory for debug/nodebug", // no flag 494 494 "<option-list> enable profiling information:\n counters,heap,time,all,none", // -S 495 "building cfa standard lib", // -t496 "", // -w497 "", // -W498 "", // -D495 "building cfa standard lib", // -t 496 "", // -w 497 "", // -W 498 "", // -D 499 499 }; // description 500 500
Note:
See TracChangeset
for help on using the changeset viewer.