diff options
author | Eugene Sandulenko | 2017-02-07 09:06:05 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2017-02-07 09:06:05 +0100 |
commit | 746777148022c95490c4ae8fb8f5259f7bab31a3 (patch) | |
tree | 708b322c0a2f7cd77540d7f8af5fe818b618cff5 /engines/director/lingo/lingo-lex.l | |
parent | dae115abaf2f7bee674a1bf15838e7c9c8d57434 (diff) | |
download | scummvm-rg350-746777148022c95490c4ae8fb8f5259f7bab31a3.tar.gz scummvm-rg350-746777148022c95490c4ae8fb8f5259f7bab31a3.tar.bz2 scummvm-rg350-746777148022c95490c4ae8fb8f5259f7bab31a3.zip |
DIRECTOR: Lingo: Documented D4 "Logical operators and functions" Lingo
Diffstat (limited to 'engines/director/lingo/lingo-lex.l')
-rw-r--r-- | engines/director/lingo/lingo-lex.l | 84 |
1 files changed, 42 insertions, 42 deletions
diff --git a/engines/director/lingo/lingo-lex.l b/engines/director/lingo/lingo-lex.l index ec9d6319bd..ac8fd63671 100644 --- a/engines/director/lingo/lingo-lex.l +++ b/engines/director/lingo/lingo-lex.l @@ -82,22 +82,22 @@ whitespace [\t ] %% --[^\r\n]* -^{whitespace}+ { count(); } -[\t]+ { count(); return ' '; } +^{whitespace}+ { count(); } +[\t]+ { count(); return ' '; } -[#]{identifier} { count(); yylval.s = new Common::String(yytext); return SYMBOL; } // D3 +[#]{identifier} { count(); yylval.s = new Common::String(yytext); return SYMBOL; } // D3 (?i:after) { count(); return tAFTER; } // D3 -(?i:and) { count(); return tAND; } +(?i:and) { count(); return tAND; } (?i:before) { count(); return tBEFORE; } // D3 -(?i:char) { count(); return tCHAR; } // 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: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(); @@ -110,33 +110,33 @@ whitespace [\t ] return ENDCLAUSE; } (?i:factory) { count(); return tFACTORY; } -(?i:exit) { count(); return tEXIT; } +(?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:go[\t ]+to) { count(); return tGO; } +(?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: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: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: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:put) { count(); return tPUT; } +(?i:put) { count(); return tPUT; } (?i:repeat) { count(); return checkImmediate(tREPEAT); } -(?i:set) { count(); return tSET; } +(?i:set) { count(); return tSET; } (?i:starts) { count(); return tSTARTS; } (?i:the[ \t]+sqrt[\t ]+of[\t ]+) { count(); @@ -236,21 +236,21 @@ whitespace [\t ] warning("Unhandled the entity %s", ptr); } -(?i:then) { count(); return tTHEN; } -(?i:to) { count(); return tTO; } +(?i:then) { count(); return tTHEN; } +(?i:to) { count(); return tTO; } (?i:sprite) { count(); return tSPRITE; } -(?i:with) { count(); return tWITH; } +(?i:with) { count(); return tWITH; } (?i:within) { count(); return tWITHIN; } -(?i:when) { count(); return tWHEN; } +(?i:when) { count(); return tWHEN; } (?i:while) { count(); return tWHILE; } -(?i:word) { count(); return tWORD; } +(?i:word) { count(); return tWORD; } -[<][>] { count(); return tNEQ; } -[>][=] { count(); return tGE; } -[<][=] { count(); return tLE; } -[&][&] { count(); return tCONCAT; } +[<][>] { count(); return tNEQ; } +[>][=] { count(); return tGE; } +[<][=] { count(); return tLE; } +[&][&] { count(); return tCONCAT; } -{identifier} { +{identifier} { count(); yylval.s = new Common::String(yytext); @@ -289,11 +289,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; } . %% |