PHP Classes

PHPCC: Parse language string according to a given grammar

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 64%Total: 1,074 All time: 3,465 This week: 660Up
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: 169675 in United Kingdom
Week rank: 195 Up8 in United Kingdom Up
Innovation award
Innovation award
Nominee: 1x

  Files folder image Files (14)  
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

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:1,074
This week:0
All time:3,465
This week:660Up
 User Ratings  
 
 All time
Utility:87%StarStarStarStarStar
Consistency:87%StarStarStarStarStar
Documentation:56%StarStarStar
Examples:62%StarStarStarStar
Tests:-
Videos:-
Overall:64%StarStarStarStar
Rank:707