Login   Register  
PHP Classes
elePHPant
Icontem

SourceMap: Tokenize source code in several languages

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   View files View files (12)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2006-08-01 (8 years ago) RSS 2.0 feedNot enough user ratingsTotal: 1,311 All time: 2,717 This week: 1,463Up
Version License Categories  
sourcemap 1.0.0GNU General Public Lice...Text processing
Description Author  

This class can be used to parse and extract a list of tokens from source code in one of several supported languages.

It can parse source code in a given language and extract tokens according to the definitions of token delimiter character sequences for that language. The class supports PHP, Javascript and Python.

It can extract several types of tokens: comments in one or more lines, single or double quoted strings and pure code. Other tokens may be supported by adding rules for them to the delimiters definitions.

The parsed tokens are returned as an array that includes the name of the token delimiter as well its start and end positions in the original source code text.

Picture of Andrea Giammarchi
Name: Andrea Giammarchi <contact>
Classes: 17 packages by
Country: Italy Italy
Age: 36
All time rank: 182 in Italy Italy
Week rank: 133 Down8 in Italy Italy Down
Innovation award
Innovation award
Nominee: 5x

  Files folder image Files  
File Role Description
Plain text file SourceMap.class.php Class PHP Version
Accessible without login Plain text file delimeters.php Aux. Delimeters Example
Accessible without login Plain text file common.php Aux. External Utilities
Accessible without login Plain text file testphp.php Example SimpleTest File
Accessible without login Plain text file common.js Data JavaScript External Utilities
Accessible without login Plain text file common.py Data Python External Utilities
Accessible without login Plain text file delimeters.js Data JavaScript Delimeters Example
Accessible without login Plain text file delimeters.py Data Python Delimeters Example
Accessible without login Plain text file SourceMap.js Data JavaScript Version
Accessible without login Plain text file SourceMap.py Data Python Version
Accessible without login Plain text file testjs.php Aux. JavaScript Test Page
Accessible without login Plain text file testpy.py Data Python Test File

 Version Control Reuses Unique User Downloads Download Rankings  
 0%3Total:1,311All time:2,717
 This week:0This week:1,463Up