Changeset 3848e0e for translator/Parser/cfa.y
- Timestamp:
- Dec 3, 2014, 3:08:38 PM (10 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
- Children:
- d9a0e76
- Parents:
- 42dcae7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
translator/Parser/cfa.y
r42dcae7 r3848e0e 10 10 * Created On : Sat Sep 1 20:22:55 2001 11 11 * Last Modified By : Peter A. Buhr 12 * Last Modified On : Sun Nov 9 22:45:42201413 * Update Count : 8 8112 * Last Modified On : Tue Nov 25 23:52:54 2014 13 * Update Count : 890 14 14 */ 15 15 … … 563 563 | tuple assignment_opt /* CFA, tuple expression */ 564 564 { 565 if ( $2 == 0 ) {565 if ( $2 == 0 ) { 566 566 $$ = $1; 567 567 } else { … … 654 654 block_item 655 655 | block_item_list push block_item 656 { if ($1 != 0) { $1->set_link($3); $$ = $1; } }656 { if ($1 != 0) { $1->set_link($3); $$ = $1; } } 657 657 ; 658 658 … … 668 668 statement 669 669 | statement_list statement 670 { if ($1 != 0) { $1->set_link($2); $$ = $1; } }670 { if ($1 != 0) { $1->set_link($2); $$ = $1; } } 671 671 ; 672 672 … … 1870 1870 | external_definition_list 1871 1871 { 1872 if ( theTree ) {1872 if ( theTree ) { 1873 1873 theTree->appendList( $1 ); 1874 1874 } else { … … 1882 1882 | external_definition_list push external_definition 1883 1883 { 1884 if ( $1 ) {1884 if ( $1 ) { 1885 1885 $$ = $1->appendList( $3 ); 1886 1886 } else { … … 2732 2732 /* ----end of grammar----*/ 2733 2733 2734 void yyerror( char *string) {2734 void yyerror( char *string ) { 2735 2735 using std::cout; 2736 2736 using std::endl; 2737 if( yyfilename ) { 2738 cout << yyfilename << ":" << endl; 2737 cout << "Error "; 2738 if ( yyfilename ) { 2739 cout << "in file " << yyfilename << " "; 2739 2740 } 2740 cout << yylineno << ": syntax error reading token " << *(yylval.tok.str)<< endl;2741 cout << "at line " << yylineno << " reading token \"" << *(yylval.tok.str) << "\"" << endl; 2741 2742 } 2742 2743
Note: See TracChangeset
for help on using the changeset viewer.