From cf55f2bddc498c18db13244b94cad715bf608fe7 Mon Sep 17 00:00:00 2001 From: Alexandre Bique Date: Sat, 16 May 2009 05:15:44 +0100 Subject: [PATCH] [ozulis] typo --- src/plugins/lang/mugiwara/bison/parser.y | 42 ++++++++++++++++---------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/src/plugins/lang/mugiwara/bison/parser.y b/src/plugins/lang/mugiwara/bison/parser.y index 77c881f..a6e2026 100644 --- a/src/plugins/lang/mugiwara/bison/parser.y +++ b/src/plugins/lang/mugiwara/bison/parser.y @@ -31,7 +31,7 @@ const char *str) { if (file) - std::cerr << file->path << ":" ; + std::cerr << file->path << ":"; std::cerr << yyloccp->first_line << "." << yyloccp->first_column << "-" << yyloccp->last_line << "." << yyloccp->last_column << ": " << str << std::endl; @@ -39,10 +39,10 @@ #define MAKE_BINARY_EXP(Type, Out, Left, Right) \ do { \ - ozulis::ast::Type * exp = new ozulis::ast::Type(); \ + ozulis::ast::Type * exp = new ozulis::ast::Type; \ assert(Left); \ assert(Right); \ - exp = new ozulis::ast::Type(); \ + exp = new ozulis::ast::Type; \ exp->left = (Left); \ exp->right = (Right); \ (Out) = exp; \ @@ -50,9 +50,9 @@ #define MAKE_UNARY_EXP(Type, Out, Exp) \ do { \ - ozulis::ast::Type * exp = new ozulis::ast::Type(); \ + ozulis::ast::Type * exp = new ozulis::ast::Type; \ assert(Exp); \ - exp = new ozulis::ast::Type(); \ + exp = new ozulis::ast::Type; \ exp->exp = (Exp); \ (Out) = exp; \ } while (0) @@ -81,7 +81,7 @@ createType(const char * name) for (int i = 0; integerTypes[i].name; i++) if (!strcmp(name, integerTypes[i].name)) { - ozulis::ast::IntegerType * itype = new ozulis::ast::IntegerType(); + ozulis::ast::IntegerType * itype = new ozulis::ast::IntegerType; itype->isSigned = integerTypes[i].isSigned; itype->size = integerTypes[i].size; return itype; @@ -160,7 +160,7 @@ createType(const char * name) %% file: decls { - file = new ozulis::ast::File(); + file = new ozulis::ast::File; file->decls = $1; if (!file->varDecls) file->varDecls = new ozulis::ast::File::varDecls_t; @@ -172,7 +172,7 @@ decls: decl decls { assert($2); $$ = $2; $$->push_back($1); - } | /* epsilon */ { $$ = new std::vector (); }; + } | /* epsilon */ { $$ = new std::vector; }; decl: func_dec { $$ = $1; @@ -196,10 +196,10 @@ func_dec: type ID '(' func_params ')' ';' { }; func_params: func_params_non_empty { $$ = $1; } -| /* epsilon */ { $$ = new std::vector(); }; +| /* epsilon */ { $$ = new std::vector; }; func_params_non_empty: var_decl { - $$ = new std::vector(); + $$ = new std::vector; $$->push_back($1); } | func_params_non_empty ',' var_decl { $$ = $1; @@ -207,7 +207,7 @@ func_params_non_empty: var_decl { }; block: '{' var_decls statements '}' { - $$ = new ozulis::ast::Block(); + $$ = new ozulis::ast::Block; $$->varDecls = $2; $$->statements = $3; }; @@ -217,10 +217,10 @@ var_decls: var_decls var_decl ';' { assert($2); $$ = $1; $$->push_back($2); - } | /* epsilon */ { $$ = new std::vector (); }; + } | /* epsilon */ { $$ = new std::vector; }; var_decl: type ID { - $$ = new ozulis::ast::VarDecl(); + $$ = new ozulis::ast::VarDecl; $$->type = $1; $$->name = $2; free($2); @@ -231,7 +231,7 @@ statements: statements statement { assert($2); $$ = $1; $$->push_back($2); -} | /* epsilon */ { $$ = new std::vector (); }; +} | /* epsilon */ { $$ = new std::vector; }; statement: exp_statement { $$ = $1; } | label_statement { $$ = $1; } @@ -241,7 +241,7 @@ statement: exp_statement { $$ = $1; } | do_while_statement { $$ = $1; } | return_statement { $$ = $1; } | block { $$ = $1; } -| ';' { $$ = new ozulis::ast::EmptyStatement(); }; +| ';' { $$ = new ozulis::ast::EmptyStatement; }; exp_statement: exp ';' { assert($1); @@ -249,21 +249,21 @@ exp_statement: exp ';' { }; label_statement: ID ':' { - ozulis::ast::Label * label = new ozulis::ast::Label(); + ozulis::ast::Label * label = new ozulis::ast::Label; label->name = $1; $$ = label; free($1); }; goto_statement: "goto" ID ';' { - ozulis::ast::Goto * gt = new ozulis::ast::Goto(); + ozulis::ast::Goto * gt = new ozulis::ast::Goto; gt->label = $2; $$ = gt; free($2); }; if_statement: "if" '(' exp ')' statement else_statement { - ozulis::ast::If * ifStmt = new ozulis::ast::If(); + ozulis::ast::If * ifStmt = new ozulis::ast::If; assert($3); assert($5); assert($6); @@ -332,7 +332,7 @@ exp: assign_exp { }; assign_exp: exp '=' oror_exp { - ozulis::ast::AssignExp * exp = new ozulis::ast::AssignExp(); + ozulis::ast::AssignExp * exp = new ozulis::ast::AssignExp; exp->dest = $1; exp->value = $3; $$ = exp; @@ -427,11 +427,11 @@ call_exp: ID '(' call_exp_args ')' { }; call_exp_args: call_exp_args_non_empty { $$ = $1; } -| /* empty */ { $$ = new std::vector(); }; +| /* empty */ { $$ = new std::vector; }; call_exp_args_non_empty: exp { assert($1); - $$ = new std::vector(); + $$ = new std::vector; $$->push_back($1); } | call_exp_args_non_empty ',' exp { assert($1); -- 2.11.4.GIT