PHP Classes
elePHPant
Icontem

SourceMap: Tokenize source code in several languages

Recommend this page to a friend!
  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 (10 years ago) RSS 2.0 feedNot enough user ratingsTotal: 1,321 All time: 2,821 This week: 871Up
Version License Categories
sourcemap 1.0.0GNU General Publi...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
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%3
Total:1,321
This week:0
All time:2,821
This week:871Up