You can have a look at source file: JavaScriptCore/parser/Parser.cpp. Inside this file, you will come across the function:
*parse**(JSGlobalData* globalData, int* errLine, UString* errMsg) * This function in turn invokes the routines of *Lexer.cpp* and *grammar.cpp*. Lexer.cpp resides in JavaScriptCore/parser directory. However, grammar.cpp is generated during build and in generally placed inside DerivedSources. The parsing of JavaScript code is initiated by call to function: *jscyyparse**() * that is available inside grammar.cpp. I hope this gives you a starting point. (I am using WebKit revision: *41242*) Regards, J R Shah On Thu, Feb 26, 2009 at 5:45 AM, zhenghe zhang <[email protected]>wrote: > Hi all > I am learning the kjs of webkit, now I encounter some questions, > could you help me? > As followed: > If I define a js function, for example: > > Function fun() > { > Var a = 5; > Var b = 6; > Var c = a+b; > } > I would like to know how to parse the js code through the function of > webkit. > Could you tell me the main functions and the files? > Thank you > Best Regards > > > _______________________________________________ > 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

