aboutsummaryrefslogtreecommitdiff
path: root/engines/director/lingo/lingo-lex.l
diff options
context:
space:
mode:
authorEugene Sandulenko2019-12-02 21:37:17 +0100
committerEugene Sandulenko2019-12-02 21:37:17 +0100
commit2cc1c337c88e8af61e10df50f3dc2fd4524f4fb5 (patch)
tree6ec20018a0a4af59357aba5205d1ec6b0e72c5e0 /engines/director/lingo/lingo-lex.l
parent6706410a53e7fa64e789e5f9772de7c99d5afb89 (diff)
downloadscummvm-rg350-2cc1c337c88e8af61e10df50f3dc2fd4524f4fb5.tar.gz
scummvm-rg350-2cc1c337c88e8af61e10df50f3dc2fd4524f4fb5.tar.bz2
scummvm-rg350-2cc1c337c88e8af61e10df50f3dc2fd4524f4fb5.zip
DIRECTOR: LINGO: JANITORIAL: Whitespace fixes
Diffstat (limited to 'engines/director/lingo/lingo-lex.l')
-rw-r--r--engines/director/lingo/lingo-lex.l116
1 files changed, 58 insertions, 58 deletions
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