Which revision of WebKit are you using (or closest to)? Which version of bison (bison --version) are you using to generate the grammar?
The incorrectly-parsed HTML works fine in Safari on Mac OS X for me. Dave ________________________________ From: Javed Rabbani <[email protected]> To: [email protected] Sent: Thursday, February 19, 2009 5:41:10 AM Subject: [webkit-dev] Problems with JavaScript bison parser Hello everyone, I am working on a WebKit port for some platform and facing an issue with working of JavaScript bison parser in "Grammar.cpp". If I execute the following HTML file, everything is parsed without error: <html> <body> <img src=" webkit_small.jpg" ALT=" " onclick="document.write('Hello World');" > </body> </html> However, as soon I specify the same functionality through a separate function; I run into trouble as the parser inside Grammar.cpp fails with return value of 1. Here is the source for the HTML file: <html> <body> <script language="JavaScript"> function OnClickHandler() { document.write('Hello World'); } </script> <img src=" webkit_small.jpg" ALT=" " onclick=OnClickHandler()> </body> </html> I have figured out so far that parsing fails as it does not get all the tokens. It only retrieves the first token and interprets it as "FUNCTION (269)". Afterwards, the execution terminates and no further tokens are read by the parser. Ideally it should continue with tokens for OPENBRACE (314), IDENT(317), STRING(318), CLOSEBRACE(315) etc. I am not sure what is going wrong to this bison parser? If anyone has faced somewhat similar issues; any help or suggestion is greatly appreciated Thanks. Regards, J R Shah
_______________________________________________ webkit-dev mailing list [email protected] http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

