All Projects → zephir-lang → Php Zephir Parser

zephir-lang / Php Zephir Parser

Licence: mit
The Zephir Parser delivered as a C extension for the PHP language.

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Php Zephir Parser

Pegparser
💡 Build your own programming language! A C++17 PEG parser generator supporting parser combination, memoization, left-recursion and context-dependent grammars.
Stars: ✭ 164 (+27.13%)
Mutual labels:  parser-generator, parser
Csly
a C# embeddable lexer and parser generator (.Net core)
Stars: ✭ 129 (+0%)
Mutual labels:  parser-generator, parser
Pigeon
Command pigeon generates parsers in Go from a PEG grammar.
Stars: ✭ 603 (+367.44%)
Mutual labels:  parser-generator, parser
Npeg
PEGs for Nim, another take
Stars: ✭ 163 (+26.36%)
Mutual labels:  parser-generator, parser
Tatsu
竜 TatSu generates Python parsers from grammars in a variation of EBNF
Stars: ✭ 198 (+53.49%)
Mutual labels:  parser-generator, parser
Intellij Plugin V4
An IntelliJ plugin for ANTLR v4
Stars: ✭ 318 (+146.51%)
Mutual labels:  parser-generator, parser
Gutenberg Parser Rs
An experimental Rust parser for WordPress Gutenberg post format
Stars: ✭ 76 (-41.09%)
Mutual labels:  parser, php-extension
Whois Parser
Go(Golang) module for domain whois information parsing.
Stars: ✭ 123 (-4.65%)
Mutual labels:  parser
Cphalcon
High performance, full-stack PHP framework delivered as a C extension.
Stars: ✭ 10,534 (+8065.89%)
Mutual labels:  php-extension
Awesome Hungarian Nlp
A curated list of NLP resources for Hungarian
Stars: ✭ 121 (-6.2%)
Mutual labels:  parser
Php Rdkafka
Production-ready, stable Kafka client for PHP
Stars: ✭ 1,703 (+1220.16%)
Mutual labels:  php-extension
Black Widow
GUI based offensive penetration testing tool (Open Source)
Stars: ✭ 124 (-3.88%)
Mutual labels:  parser
Typin
Declarative framework for interactive CLI applications
Stars: ✭ 126 (-2.33%)
Mutual labels:  parser
Vue Styleguide Generator
React inspired style guide generator for Vue.js
Stars: ✭ 123 (-4.65%)
Mutual labels:  parser
Baba Core
Mini-language for creating random text generators.
Stars: ✭ 127 (-1.55%)
Mutual labels:  parser
Resume Parser
AWS Lambda function queried using AWS API Gateway to parse resumes using Lever API
Stars: ✭ 123 (-4.65%)
Mutual labels:  parser
Tiny Json
The tiny-json is a versatile and easy to use json parser in C suitable for embedded systems. It is fast, robust and portable.
Stars: ✭ 127 (-1.55%)
Mutual labels:  parser
Irony
A modified version of the Irony project (https://irony.codeplex.com) with .NET Core support
Stars: ✭ 127 (-1.55%)
Mutual labels:  parser-generator
Gofeed
Parse RSS, Atom and JSON feeds in Go
Stars: ✭ 1,762 (+1265.89%)
Mutual labels:  parser
Prowide Core
Model and parsers for all SWIFT MT (FIN) messages
Stars: ✭ 125 (-3.1%)
Mutual labels:  parser

Zephir Parser

Actions Status Build on Windows Coverage Status License

The Zephir Parser delivered as a C extension for the PHP language.

Supported PHP versions: 7.0, 7.1, 7.2, 7.3, 7.4 and 8.0

NOTE: The development branch will always contain the latest unstable version. If you wish to check older versions or formal, tagged release, please switch to the relevant branch/tag.

Get Started

Build Requirements

Prerequisite packages are:

  • OS: Linux || Solaris || FreeBSD || macOS || Windows
  • Compiler: g++ >= 4.4 || clang++ >= 3.x || vc++ >= 11
  • re2c >= 0.13.6

To build extension from the source you will need the PHP development headers. If PHP was manually installed, these should be available by default. Otherwise, you will need to fetch them from a repository.

Windows

To install Zephir Parser on Windows:

  1. Download Zephir Parser for Windows
  2. Extract the DLL file and copy it to your PHP extensions directory
  3. Edit your php.ini file and add this line:
    [Zephir Parser]
    extension=php_zephir_parser.dll
    

Linux

On a Linux/Unix-based platform you can easily compile and install the extension from sources.

For Linux/Unix-based based systems you'll need also:

Ubuntu

sudo apt-get install php7.0-dev gcc make re2c autoconf automake

Suse

sudo zypper install php7.0-devel gcc make re2c autoconf automake

CentOS/Fedora/RHEL

sudo yum install php-devel gcc make re2c autoconf automake

General Compilation

Follow these instructions to generate a binary extension for your platform:

git clone git://github.com/phalcon/php-zephir-parser.git
cd php-zephir-parser
phpize
./configure
make
sudo make install

If you have multiple/specific PHP versions installed, you may be able to specify for which installation you'd like to build by using the --with-php-config option during configuration. For example:

git clone git://github.com/phalcon/php-zephir-parser.git
cd php-zephir-parser
/usr/local/bin/phpize
./configure --with-php-config=/usr/local/bin/php-config
make
sudo make install

Add the extension to your php.ini:

[Zephir Parser]
extension=zephir_parser.so

Usage

$program = <<<EOF
namespace Acme;

class Greeting
{
    public static function sayHello() -> void
    {
        echo "Hello, World!";
    }
}
EOF;

$retval = zephir_parse_file($program, '(eval code)');

var_dump($retval);

Sponsors

Become a sponsor and get your logo on our README on Github with a link to your site. [Become a sponsor]

Backers

Support us with a monthly donation and help us continue our activities. [Become a backer]

License

Zephir Parser is open source software licensed under the MIT License (MIT). See the LICENSE file for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].