From 2cc1c337c88e8af61e10df50f3dc2fd4524f4fb5 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 2 Dec 2019 21:37:17 +0100 Subject: DIRECTOR: LINGO: JANITORIAL: Whitespace fixes --- engines/director/lingo/lingo-lex.cpp | 2 +- engines/director/lingo/lingo-lex.l | 116 +++++++++++++++++------------------ 2 files changed, 59 insertions(+), 59 deletions(-) diff --git a/engines/director/lingo/lingo-lex.cpp b/engines/director/lingo/lingo-lex.cpp index c35eafe492..2c1802c4d6 100644 --- a/engines/director/lingo/lingo-lex.cpp +++ b/engines/director/lingo/lingo-lex.cpp @@ -2586,5 +2586,5 @@ int Lingo::parse(const char *code) { return 0; } -} +} // End of namespace Director diff --git a/engines/director/lingo/lingo-lex.l b/engines/director/lingo/lingo-lex.l index d01849d772..2d69834115 100644 --- a/engines/director/lingo/lingo-lex.l +++ b/engines/director/lingo/lingo-lex.l @@ -80,21 +80,21 @@ whitespace [\t ] \xC2[\r\n] { g_lingo->_linenumber++; g_lingo->_colnumber = 0; } --[^\r\n]* ^{whitespace}+ { count(); } -[\t]+ { count(); return ' '; } +[\t]+ { count(); return ' '; } [#]{identifier} { count(); yylval.s = new Common::String(yytext); return SYMBOL; } // D3 -(?i:after) { count(); return tAFTER; } // D3 -(?i:and) { count(); return tAND; } -(?i:before) { count(); return tBEFORE; } // D3 -(?i:char) { count(); return tCHAR; } // D3 -(?i:contains) { count(); return tCONTAINS; } -(?i:done) { count(); return tDONE; } -(?i:down) { count(); return tDOWN; } -(?i:if) { count(); return tIF; } +(?i:after) { count(); return tAFTER; } // D3 +(?i:and) { count(); return tAND; } +(?i:before) { count(); return tBEFORE; } // D3 +(?i:char) { count(); return tCHAR; } // D3 +(?i:contains) { count(); return tCONTAINS; } +(?i:done) { count(); return tDONE; } +(?i:down) { count(); return tDOWN; } +(?i:if) { count(); return tIF; } (?i:[\n\r]+[\t ]*else[\t ]+if) { countnl(); return tNLELSIF; } (?i:[\n\r]+[\t ]*else) { countnl(); return tNLELSE; } -(?i:else) { count(); return tELSE; } +(?i:else) { count(); return tELSE; } (?i:end)([\t ]*{identifier})? { count(); @@ -106,37 +106,37 @@ whitespace [\t ] return ENDCLAUSE; } -(?i:factory) { count(); return tFACTORY; } -(?i:exit) { count(); return tEXIT; } -(?i:frame) { count(); return tFRAME; } -(?i:global) { count(); return tGLOBAL; } +(?i:factory) { count(); return tFACTORY; } +(?i:exit) { count(); return tEXIT; } +(?i:frame) { count(); return tFRAME; } +(?i:global) { count(); return tGLOBAL; } (?i:go[\t ]+to) { count(); return tGO; } -(?i:go) { count(); return tGO; } -(?i:instance) { count(); return tINSTANCE; } +(?i:go) { count(); return tGO; } +(?i:instance) { count(); return tINSTANCE; } (?i:intersects) { count(); return tINTERSECTS; } -(?i:into) { count(); return tINTO; } -(?i:item) { count(); return tITEM; } -(?i:line) { count(); return tLINE; } -(?i:loop) { count(); return checkImmediate(tLOOP); } -(?i:macro) { count(); return tMACRO; } -(?i:method) { count(); return tMETHOD; } -(?i:mod) { count(); return tMOD; } -(?i:movie) { count(); return tMOVIE; } -(?i:next) { count(); return tNEXT; } -(?i:not) { count(); return tNOT; } -(?i:of) { count(); return tOF; } -(?i:on) { count(); return tON; } // D3 -(?i:open) { count(); return tOPEN; } -(?i:or) { count(); return tOR; } -(?i:play) { count(); return tPLAY; } +(?i:into) { count(); return tINTO; } +(?i:item) { count(); return tITEM; } +(?i:line) { count(); return tLINE; } +(?i:loop) { count(); return checkImmediate(tLOOP); } +(?i:macro) { count(); return tMACRO; } +(?i:method) { count(); return tMETHOD; } +(?i:mod) { count(); return tMOD; } +(?i:movie) { count(); return tMOVIE; } +(?i:next) { count(); return tNEXT; } +(?i:not) { count(); return tNOT; } +(?i:of) { count(); return tOF; } +(?i:on) { count(); return tON; } // D3 +(?i:open) { count(); return tOPEN; } +(?i:or) { count(); return tOR; } +(?i:play) { count(); return tPLAY; } (?i:playAccel) { count(); yylval.s = new Common::String(yytext); return tPLAYACCEL; } -(?i:previous) { count(); return tPREVIOUS; } -(?i:property) { count(); return tPROPERTY; } // D4 -(?i:put) { count(); return tPUT; } -(?i:repeat) { count(); return checkImmediate(tREPEAT); } -(?i:set) { count(); return tSET; } -(?i:starts) { count(); return tSTARTS; } -(?i:tell) { count(); return tTELL; } +(?i:previous) { count(); return tPREVIOUS; } +(?i:property) { count(); return tPROPERTY; } // D4 +(?i:put) { count(); return tPUT; } +(?i:repeat) { count(); return checkImmediate(tREPEAT); } +(?i:set) { count(); return tSET; } +(?i:starts) { count(); return tSTARTS; } +(?i:tell) { count(); return tTELL; } (?i:the[ \t]+last[\t ]+of[\t ]+) { count(); @@ -250,21 +250,21 @@ whitespace [\t ] warning("Unhandled the entity %s", ptr); } -(?i:then) { count(); return tTHEN; } -(?i:then[\n\r]+) { count(); return tTHENNL; } -(?i:to) { count(); return tTO; } -(?i:sprite) { count(); return tSPRITE; } -(?i:with) { count(); return tWITH; } -(?i:within) { count(); return tWITHIN; } -(?i:when) { count(); return tWHEN; } -(?i:while) { count(); return tWHILE; } -(?i:word) { count(); return tWORD; } - -[<][>] { count(); return tNEQ; } -[>][=] { count(); return tGE; } -[<][=] { count(); return tLE; } -[&][&] { count(); return tCONCAT; } -[=] { count(); return tEQ; } +(?i:then) { count(); return tTHEN; } +(?i:then[\n\r]+) { count(); return tTHENNL; } +(?i:to) { count(); return tTO; } +(?i:sprite) { count(); return tSPRITE; } +(?i:with) { count(); return tWITH; } +(?i:within) { count(); return tWITHIN; } +(?i:when) { count(); return tWHEN; } +(?i:while) { count(); return tWHILE; } +(?i:word) { count(); return tWORD; } + +[<][>] { count(); return tNEQ; } +[>][=] { count(); return tGE; } +[<][=] { count(); return tLE; } +[&][&] { count(); return tCONCAT; } +[=] { count(); return tEQ; } {identifier} { count(); @@ -311,11 +311,11 @@ whitespace [\t ] return ID; } -{constfloat} { count(); yylval.f = atof(yytext); return FLOAT; } +{constfloat} { count(); yylval.f = atof(yytext); return FLOAT; } {constinteger} { count(); yylval.i = strtol(yytext, NULL, 10); return INT; } -{operator} { count(); return *yytext; } -{newline} { return '\n'; } -{conststring} { count(); yylval.s = new Common::String(&yytext[1]); yylval.s->deleteLastChar(); return STRING; } +{operator} { count(); return *yytext; } +{newline} { return '\n'; } +{conststring} { count(); yylval.s = new Common::String(&yytext[1]); yylval.s->deleteLastChar(); return STRING; } . { count(); } %% @@ -342,4 +342,4 @@ int Lingo::parse(const char *code) { return 0; } -} +} // End of namespace Director -- cgit v1.2.3