Changeset 6d539f83
- Timestamp:
- May 2, 2018, 3:28:07 PM (6 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, with_gc
- Children:
- 623c16a
- Parents:
- 44bca7f
- Location:
- src/Parser
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/ParseNode.h
r44bca7f r6d539f83 10 10 // Created On : Sat May 16 13:28:16 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sun Apr 29 14:04:05201813 // Update Count : 83 012 // Last Modified On : Mon Apr 30 09:19:17 2018 13 // Update Count : 831 14 14 // 15 15 … … 416 416 Statement * build_finally( StatementNode * stmt ); 417 417 Statement * build_compound( StatementNode * first ); 418 Statement * build_asm stmt( bool voltile, Expression * instruction, ExpressionNode * output = nullptr, ExpressionNode * input = nullptr, ExpressionNode * clobber = nullptr, LabelNode * gotolabels = nullptr );419 Statement * build_dir stmt( std::string * directive );418 Statement * build_asm( bool voltile, Expression * instruction, ExpressionNode * output = nullptr, ExpressionNode * input = nullptr, ExpressionNode * clobber = nullptr, LabelNode * gotolabels = nullptr ); 419 Statement * build_directive( std::string * directive ); 420 420 WaitForStmt * build_waitfor( ExpressionNode * target, StatementNode * stmt, ExpressionNode * when ); 421 421 WaitForStmt * build_waitfor( ExpressionNode * target, StatementNode * stmt, ExpressionNode * when, WaitForStmt * existing ); -
src/Parser/StatementNode.cc
r44bca7f r6d539f83 10 10 // Created On : Sat May 16 14:59:41 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sun Apr 29 14:21:45201813 // Update Count : 35 312 // Last Modified On : Mon Apr 30 09:21:16 2018 13 // Update Count : 354 14 14 // 15 15 … … 310 310 } 311 311 312 Statement * build_asm stmt( bool voltile, Expression * instruction, ExpressionNode * output, ExpressionNode * input, ExpressionNode * clobber, LabelNode * gotolabels ) {312 Statement * build_asm( bool voltile, Expression * instruction, ExpressionNode * output, ExpressionNode * input, ExpressionNode * clobber, LabelNode * gotolabels ) { 313 313 std::list< Expression * > out, in; 314 314 std::list< ConstantExpr * > clob; … … 320 320 } 321 321 322 Statement * build_dir stmt( string * directive ) {322 Statement * build_directive( string * directive ) { 323 323 cout << *directive << endl; 324 324 return nullptr; -
src/Parser/parser.yy
r44bca7f r6d539f83 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sun Apr 29 14:20:17 201813 // Update Count : 320 612 // Last Modified On : Mon Apr 30 09:20:47 2018 13 // Update Count : 3207 14 14 // 15 15 … … 877 877 | asm_statement 878 878 | DIRECTIVE 879 { $$ = new StatementNode( build_dir stmt( $1 ) ); }879 { $$ = new StatementNode( build_directive( $1 ) ); } 880 880 ; 881 881 … … 1207 1207 asm_statement: 1208 1208 ASM asm_volatile_opt '(' string_literal ')' ';' 1209 { $$ = new StatementNode( build_asm stmt( $2, $4, 0 ) ); }1209 { $$ = new StatementNode( build_asm( $2, $4, 0 ) ); } 1210 1210 | ASM asm_volatile_opt '(' string_literal ':' asm_operands_opt ')' ';' // remaining GCC 1211 { $$ = new StatementNode( build_asm stmt( $2, $4, $6 ) ); }1211 { $$ = new StatementNode( build_asm( $2, $4, $6 ) ); } 1212 1212 | ASM asm_volatile_opt '(' string_literal ':' asm_operands_opt ':' asm_operands_opt ')' ';' 1213 { $$ = new StatementNode( build_asm stmt( $2, $4, $6, $8 ) ); }1213 { $$ = new StatementNode( build_asm( $2, $4, $6, $8 ) ); } 1214 1214 | ASM asm_volatile_opt '(' string_literal ':' asm_operands_opt ':' asm_operands_opt ':' asm_clobbers_list_opt ')' ';' 1215 { $$ = new StatementNode( build_asm stmt( $2, $4, $6, $8, $10 ) ); }1215 { $$ = new StatementNode( build_asm( $2, $4, $6, $8, $10 ) ); } 1216 1216 | ASM asm_volatile_opt GOTO '(' string_literal ':' ':' asm_operands_opt ':' asm_clobbers_list_opt ':' label_list ')' ';' 1217 { $$ = new StatementNode( build_asm stmt( $2, $5, 0, $8, $10, $12 ) ); }1217 { $$ = new StatementNode( build_asm( $2, $5, 0, $8, $10, $12 ) ); } 1218 1218 ; 1219 1219 … … 2405 2405 | ASM '(' string_literal ')' ';' // GCC, global assembler statement 2406 2406 { 2407 $$ = DeclarationNode::newAsmStmt( new StatementNode( build_asm stmt( false, $3, 0 ) ) );2407 $$ = DeclarationNode::newAsmStmt( new StatementNode( build_asm( false, $3, 0 ) ) ); 2408 2408 } 2409 2409 | EXTERN STRINGliteral // C++-style linkage specifier
Note: See TracChangeset
for help on using the changeset viewer.