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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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

Add a Patch

Pull Requests

Add a Pull Request

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 Mar 28 10:01:26 2024 UTC