This mailing list is for discussing the development of WebKit. For
help in using WebKit, please post to <[email protected]>.
On Jul 9, 2009, at 2:55 AM, Suk Zhong wrote:
Hi All:
I want to understand the javascript grammar from Grammar.y in
JavascriptCore,for the script "var a=9;",we find the following code:
VariableStatement:
VAR VariableDeclarationList ';' {...}
VariableDeclarationList:
IDENT {...}
| IDENT Initializer {...}
Initializer:
'=' AssignmentExpr { $$ = $2; }
AssignmentExpr:
ConditionalExpr
| LeftHandSideExpr AssignmentOperator AssignmentExpr {...}
in my understand, '9' maybe be as Literal/PrimaryExprNoBrace/
PrimaryExpr/MemberExpr/LeftHandSideExpr etc,but why can be converted
as AssignmentExpr?
in the script "a=b;", i also encounter the same case, why the 'b'
can be converted as AssignmentExpr?
the following update can be correct?
AssignmentExpr:
ConditionalExpr
|LeftHandSideExpr
| LeftHandSideExpr AssignmentOperator AssignmentExpr {...}
someone can help me understand the grammar?
Thanks and Best Regards
Suk
_______________________________________________
webkit-dev mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
_______________________________________________
webkit-dev mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev