X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=lib%2Fas3%2Ftokenizer.lex;h=4e0495d5840e7cd1ac51603a80b552c3be35d9ef;hb=705ebea8b41e13fad737b55484cd071d857982f2;hp=ece94d035a742f3a1bd0a5d393ac422cf221e758;hpb=3e303bea7eb10c99a7b3808f0c355ee63188eb9b;p=swftools.git diff --git a/lib/as3/tokenizer.lex b/lib/as3/tokenizer.lex index ece94d0..4e0495d 100644 --- a/lib/as3/tokenizer.lex +++ b/lib/as3/tokenizer.lex @@ -481,7 +481,7 @@ void tokenizer_unregister_namespace(const char*id) }*/ static inline char tokenizer_is_namespace(const char*id) { - return trie_contains(active_namespaces, id); + return trie_contains(active_namespaces, (const unsigned char*)id); } static inline int handleIdentifier() @@ -514,8 +514,8 @@ static int tokenerror(); %x XMLTEXT %x XML -NAME [a-zA-Z_][a-zA-Z0-9_\\]* -_ [^a-zA-Z0-9_\\] +NAME [a-zA-Z_\x80-\xff][a-zA-Z0-9_\\\x80-\xff]* +_ [^a-zA-Z0-9_\\\x80-\xff] HEXINT 0x[a-zA-Z0-9]+ HEXFLOAT 0x[a-zA-Z0-9]*\.[a-zA-Z0-9]* @@ -534,7 +534,7 @@ XMLID [A-Za-z0-9_\x80-\xff]+([:][A-Za-z0-9_\x80-\xff]+)? XMLSTRING ["][^"]*["] STRING ["](\\[\x00-\xff]|[^\\"\n])*["]|['](\\[\x00-\xff]|[^\\'\n])*['] -S [ \n\r\t\xa0] +S ([ \n\r\t\xa0]|\xc2\xa0) MULTILINE_COMMENT [/][*]+([*][^/]|[^/*]|[^*][/]|[\x00-\x1f])*[*]+[/] SINGLELINE_COMMENT \/\/[^\n\r]*[\n\r] REGEXP [/]([^/\n]|\\[/])*[/][a-zA-Z]* @@ -731,7 +731,7 @@ static int tokenerror() if(c1>='0' && c1<='9') syntaxerror("syntax error: %s (identifiers must not start with a digit)"); else - syntaxerror("syntax error [%d]: %s", (yy_start-1)/2, buf); + syntaxerror("syntax error [state=%d]: %s", (yy_start-1)/2, buf); printf("\n"); exit(1); yyterminate();