PHP Classes

PHPCC: Parse language string according to a given grammar

Recommend this page to a friend!
  Info   View files View files (14)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 64%Total: 1,074 This week: 1All time: 3,465 This week: 560Up
Version License PHP version Categories
phpcc 0.5GNU General Publi...4.0Language, Code Generation
Description 

Author

This package can be used to parse code in any language given the definition of the language grammar, much like YACC or BISON for C.

It takes as parameter a definition of a language grammar as a string. Then the main class can parse and process source code in the defined language.

The main compiler class can assign callback functions that are invoked to process different types of elements of the language syntax.

Innovation Award
PHP Programming Innovation award nominee
April 2007
Number 5


Prize: One copy of Delphi for PHP
Languages provide means to define how programs should behave using a lists of statements. Such statements must be composed with a given syntax.

If you want to process a program in a given language, you need to have a parser that extracts the statements that define the program and validate the statements syntax.

This class provides a generic solution to implement language parsers in PHP. It can be used to process programs with an user-defined syntax.

Manuel Lemos
Picture of Alejandro Siri
Name: Alejandro Siri is available for providing paid consulting. Contact Alejandro Siri .
Classes: 2 packages by
Country: United Kingdom
Age: 40
All time rank: 169575 in United Kingdom
Week rank: 411 Up12 in United Kingdom Up
Innovation award
Innovation award
Nominee: 1x

  Files folder image Files  
File Role Description
Plain text file AltParser.class.php Class AltParser
Plain text file example.php Example An Example
Plain text file FunctionObject.class.php Class FunctionObject
Plain text file Grammar.class.php Class Grammar
Plain text file ListParser.class.php Class List Parser
Plain text file MaybeParser.class.php Class Maybe Parser
Plain text file MultiParser.class.php Class Multi Parser
Plain text file Parser.class.php Class Parser
Plain text file pgpcc-manual.txt Doc. A simple manual
Plain text file PHPCC.class.php Class PHPCC
Plain text file PHPGrammar.class.php Class PHP Grammar
Plain text file SeqParser.class.php Class Seq Parser
Plain text file SubParser.class.php Class Sub Parser
Accessible without login Plain text file Symbol.class.php Class Symbol

 Version Control Unique User Downloads Download Rankings  
 0%
Total:1,074
This week:1
All time:3,465
This week:560Up
 User Ratings  
 
 All time
Utility:87%StarStarStarStarStar
Consistency:87%StarStarStarStarStar
Documentation:56%StarStarStar
Examples:62%StarStarStarStar
Tests:-
Videos:-
Overall:64%StarStarStarStar
Rank:706