From 463b2a324caefcf9df5aa74bcf55f54db181e24a Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Fri, 1 May 2015 19:26:09 +0100 Subject: [PATCH] Cosmetic rename COPERATOR to CONVERSIONOPERATOR Was never very obvious what C in COPERATOR was. --- Source/CParse/cscanner.c | 2 +- Source/CParse/parser.y | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Source/CParse/cscanner.c b/Source/CParse/cscanner.c index 788445d88..637ac9d60 100644 --- a/Source/CParse/cscanner.c +++ b/Source/CParse/cscanner.c @@ -722,7 +722,7 @@ int yylex(void) { Setfile(cs,cparse_file); Scanner_push(scan,cs); Delete(cs); - return COPERATOR; + return CONVERSIONOPERATOR; } } if (termtoken) diff --git a/Source/CParse/parser.y b/Source/CParse/parser.y index 3050cd02a..08d391b38 100644 --- a/Source/CParse/parser.y +++ b/Source/CParse/parser.y @@ -1372,7 +1372,7 @@ static void mark_nodes_as_extend(Node *n) { %token NONID DSTAR DCNOT %token TEMPLATE %token OPERATOR -%token COPERATOR +%token CONVERSIONOPERATOR %token PARSETYPE PARSEPARM PARSEPARMS %left CAST @@ -1530,11 +1530,11 @@ declaration : swig_directive { $$ = $1; } This is nearly impossible to parse normally. We just let the first part generate a syntax error and then resynchronize on the - COPERATOR token---discarding the rest of the definition. Ugh. + CONVERSIONOPERATOR token---discarding the rest of the definition. Ugh. */ - | error COPERATOR { + | error CONVERSIONOPERATOR { $$ = 0; skip_decl(); } @@ -4435,7 +4435,7 @@ cpp_destructor_decl : NOT idtemplate LPAREN parms RPAREN cpp_end { /* C++ type conversion operator */ -cpp_conversion_operator : storage_class COPERATOR type pointer LPAREN parms RPAREN cpp_vend { +cpp_conversion_operator : storage_class CONVERSIONOPERATOR type pointer LPAREN parms RPAREN cpp_vend { $$ = new_node("cdecl"); Setattr($$,"type",$3); Setattr($$,"name",$2); @@ -4450,7 +4450,7 @@ cpp_conversion_operator : storage_class COPERATOR type pointer LPAREN parms RPAR Setattr($$,"conversion_operator","1"); add_symbols($$); } - | storage_class COPERATOR type AND LPAREN parms RPAREN cpp_vend { + | storage_class CONVERSIONOPERATOR type AND LPAREN parms RPAREN cpp_vend { SwigType *decl; $$ = new_node("cdecl"); Setattr($$,"type",$3); @@ -4467,7 +4467,7 @@ cpp_conversion_operator : storage_class COPERATOR type pointer LPAREN parms RPAR Setattr($$,"conversion_operator","1"); add_symbols($$); } - | storage_class COPERATOR type LAND LPAREN parms RPAREN cpp_vend { + | storage_class CONVERSIONOPERATOR type LAND LPAREN parms RPAREN cpp_vend { SwigType *decl; $$ = new_node("cdecl"); Setattr($$,"type",$3); @@ -4485,7 +4485,7 @@ cpp_conversion_operator : storage_class COPERATOR type pointer LPAREN parms RPAR add_symbols($$); } - | storage_class COPERATOR type pointer AND LPAREN parms RPAREN cpp_vend { + | storage_class CONVERSIONOPERATOR type pointer AND LPAREN parms RPAREN cpp_vend { SwigType *decl; $$ = new_node("cdecl"); Setattr($$,"type",$3); @@ -4504,7 +4504,7 @@ cpp_conversion_operator : storage_class COPERATOR type pointer LPAREN parms RPAR add_symbols($$); } - | storage_class COPERATOR type LPAREN parms RPAREN cpp_vend { + | storage_class CONVERSIONOPERATOR type LPAREN parms RPAREN cpp_vend { String *t = NewStringEmpty(); $$ = new_node("cdecl"); Setattr($$,"type",$3); @@ -6471,7 +6471,7 @@ idcolontail : DCOLON idtemplate idcolontail { | DCOLON OPERATOR { $$ = NewStringf("::%s",$2); } -/* | DCOLON COPERATOR { +/* | DCOLON CONVERSIONOPERATOR { $$ = NewString($2); } */