|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #58841 Expose parser stream
Submitted: 2009-08-30 10:59 UTC Modified: 2009-10-05 11:40 UTC
From: drslump at pollinimini dot net Assigned:
Status: Wont fix Package: spidermonkey (PECL)
PHP Version: 5.3.0RC4 OS:
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2009-08-30 10:59 UTC] drslump at pollinimini dot net
I was wondering if it'll be possible to expose Spidermonkey's parser token stream to PHP. It'd allow to create some nice tools to process javascript code be it for minification (ala YUI Compressor) or more advanced behaviors like removing log calls or injecting custom code based on a solid parser instead of regular expressions.

Unfortunately my knowledge of C is very limited and glancing over the extension source code scared the hell out of me with all the PHP related macros :(


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-10-05 11:40 UTC] c dot robin at smartphp dot org
Unfortunately spidermonkey doesn't provide such a thing as a "parser token stream", most tools use Rhino as it is the only one allowing to manually parse a tokenised javascript code. So until spidermonkey provide this kind of functionnality I will not be able to do this feature ( Even though I need it too ).
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 15 06:01:31 2024 UTC