git.asbjorn.biz
/
swftools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
extended error messages
[swftools.git]
/
lib
/
as3
/
parser.y
diff --git
a/lib/as3/parser.y
b/lib/as3/parser.y
index
06b5a4f
..
600c54c
100644
(file)
--- a/
lib/as3/parser.y
+++ b/
lib/as3/parser.y
@@
-243,7
+243,7
@@
extern int a3_lex();
%left new2
%left '[' ']' "new" '{' "{ (dictionary)" '.' ".." "::" '@'
%left new2
%left '[' ']' "new" '{' "{ (dictionary)" '.' ".." "::" '@'
-%nonassoc T_IDENTIFIER
+%left T_IDENTIFIER
%left above_identifier
%left below_else
%nonassoc "else"
%left above_identifier
%left below_else
%nonassoc "else"
@@
-1363,7
+1363,9
@@
code_t*converttype(code_t*c, classinfo_t*from, classinfo_t*to)
return c;
if(TYPE_IS_NULL(from) && !IS_NUMBER_OR_INT(to))
return c;
return c;
if(TYPE_IS_NULL(from) && !IS_NUMBER_OR_INT(to))
return c;
- syntaxerror("can't convert type %s to %s", from->name, to->name);
+ syntaxerror("can't convert type %s%s%s to %s%s%s",
+ from->package, from->package?".":"", from->name,
+ to->package, to->package?".":"", to->name);
return 0; // make gcc happy
}
return 0; // make gcc happy
}
@@
-1899,6
+1901,8
@@
FOR_INIT : VARIABLE_DECLARATION
FOR_INIT : VOIDEXPRESSION
// TODO: why doesn't an %prec above_identifier resolve the r-r conflict here?
FOR_INIT : VOIDEXPRESSION
// TODO: why doesn't an %prec above_identifier resolve the r-r conflict here?
+// (I don't see any easy way to revolve this conflict otherwise, as we
+// can't touch VAR_READ without upsetting the precedence about "return")
FOR_IN_INIT : "var" T_IDENTIFIER MAYBETYPE {
$$=$2;new_variable($2,$3,1);
}
FOR_IN_INIT : "var" T_IDENTIFIER MAYBETYPE {
$$=$2;new_variable($2,$3,1);
}