Changeset e319fc5 for src/Parser/parser.yy
- Timestamp:
- Jun 19, 2021, 3:53:18 PM (3 years ago)
- Branches:
- ADT, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 15f769c
- Parents:
- 6992f95 (diff), c7d8696a (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/parser.yy
r6992f95 re319fc5 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Apr 26 18:41:54202113 // Update Count : 499012 // Last Modified On : Wed May 19 14:20:36 2021 13 // Update Count : 5022 14 14 // 15 15 … … 287 287 288 288 // names and constants: lexer differentiates between identifier and typedef names 289 %token<tok> IDENTIFIER QUOTED_IDENTIFIER TYPED EFname TYPEGENname289 %token<tok> IDENTIFIER QUOTED_IDENTIFIER TYPEDIMname TYPEDEFname TYPEGENname 290 290 %token<tok> TIMEOUT WOR CATCH RECOVER CATCHRESUME FIXUP FINALLY // CFA 291 291 %token<tok> INTEGERconstant CHARACTERconstant STRINGliteral … … 586 586 | quasi_keyword 587 587 { $$ = new ExpressionNode( build_varref( $1 ) ); } 588 | TYPEDIMname // CFA, generic length argument 589 // { $$ = new ExpressionNode( new TypeExpr( maybeMoveBuildType( DeclarationNode::newFromTypedef( $1 ) ) ) ); } 590 // { $$ = new ExpressionNode( build_varref( $1 ) ); } 591 { $$ = new ExpressionNode( build_dimensionref( $1 ) ); } 588 592 | tuple 589 593 | '(' comma_expression ')' … … 2535 2539 | '[' identifier_or_type_name ']' 2536 2540 { 2537 typedefTable.addToScope( *$2, TYPED EFname, "9" );2538 $$ = DeclarationNode::newTypeParam( TypeDecl:: ALtype, $2 );2541 typedefTable.addToScope( *$2, TYPEDIMname, "9" ); 2542 $$ = DeclarationNode::newTypeParam( TypeDecl::Dimension, $2 ); 2539 2543 } 2540 2544 // | type_specifier identifier_parameter_declarator … … 2590 2594 { $$ = new ExpressionNode( new TypeExpr( maybeMoveBuildType( $1 ) ) ); } 2591 2595 | assignment_expression 2592 { SemanticError( yylloc, toString("Expression generic parameters are currently unimplemented: ", $1->build()) ); $$ = nullptr; }2593 2596 | type_list ',' type 2594 2597 { $$ = (ExpressionNode *)($1->set_last( new ExpressionNode( new TypeExpr( maybeMoveBuildType( $3 ) ) ) )); } 2595 2598 | type_list ',' assignment_expression 2596 { SemanticError( yylloc, toString("Expression generic parameters are currently unimplemented: ", $3->build()) ); $$ = nullptr; } 2597 // { $$ = (ExpressionNode *)( $1->set_last( $3 )); } 2599 { $$ = (ExpressionNode *)( $1->set_last( $3 )); } 2598 2600 ; 2599 2601
Note: See TracChangeset
for help on using the changeset viewer.