X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=lib%2Fas3%2Ftokenizer.lex;h=54d04c5e4605dfff114c5c77e6e27a1f1b93966c;hp=bffdc93baa867e32018b133bcfc6aeb30f7b87e7;hb=4b34eeaf1908b9978c072ca4e8e5b3eee8a1c0f1;hpb=618a86d162d32d7b64cdf872d3033a56d548b526 diff --git a/lib/as3/tokenizer.lex b/lib/as3/tokenizer.lex index bffdc93..54d04c5 100644 --- a/lib/as3/tokenizer.lex +++ b/lib/as3/tokenizer.lex @@ -245,6 +245,12 @@ static string_t string_unescape(const char*in, int l) return out; } +static void handleCData(char*s, int len) +{ + a3_lval.str.str = s+9; // +} + static void handleString(char*s, int len) { if(as3_pass < 2) { @@ -508,6 +514,7 @@ HEXFLOATWITHSIGN [+-]?({HEXFLOAT}) INTWITHSIGN [+-]?({INT}) FLOATWITHSIGN [+-]?({FLOAT}) +CDATA ])*\]*\]\]\> STRING ["](\\[\x00-\xff]|[^\\"\n])*["]|['](\\[\x00-\xff]|[^\\'\n])*['] S [ \n\r\t] MULTILINE_COMMENT [/][*]+([*][^/]|[^/*]|[^*][/]|[\x00-\x1f])*[*]+[/] @@ -523,6 +530,7 @@ REGEXP [/]([^/\n]|\\[/])*[/][a-zA-Z]* ^include{S}+{STRING}{S}*/\n {l();handleInclude(yytext, yyleng, 1);} ^include{S}+[^" \t\r\n][\x20-\xff]*{S}*/\n {l();handleInclude(yytext, yyleng, 0);} {STRING} {l(); BEGIN(INITIAL);handleString(yytext, yyleng);return T_STRING;} +{CDATA} {l(); BEGIN(INITIAL);handleCData(yytext, yyleng);return T_STRING;} { {REGEXP} {c(); BEGIN(INITIAL);return handleregexp();}