php.net |  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
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: drslump at pollinimini dot net
New email:
PHP Version: OS:

 

 [2009-08-30 10:59 UTC] drslump at pollinimini dot net
Description:
------------
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 :(


Patches

Pull Requests

History

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: Thu Dec 26 10:01:29 2024 UTC