Download the PHP package vovan-ve/lr0-parser without Composer
On this page you can find all versions of the php package vovan-ve/lr0-parser. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download vovan-ve/lr0-parser
More information about vovan-ve/lr0-parser
Files in vovan-ve/lr0-parser
Download vovan-ve/lr0-parser
More information about vovan-ve/lr0-parser
Files in vovan-ve/lr0-parser
Vendor vovan-ve
Package lr0-parser
Short Description LR(0) parser with state table generator for any LR(0) grammar
License MIT
Package lr0-parser
Short Description LR(0) parser with state table generator for any LR(0) grammar
License MIT
Please rate this library. Is it a good library?
Informations about the package lr0-parser
LR(0) parser
This package contains LR(0) parser to parse texts according to custom LR(0) grammar.
Synopsis
See also following example in examples/.
Output:
Result is 42
Tree:
`- Sum(sub)
`- Sum(P)
| `- Product(mul)
| `- Product(V)
| | `- Value
| | `- int <2>
| `- Value
| `- Sum(add)
| `- Sum(P)
| | `- Product(V)
| | `- Value(neg)
| | `- Value
| | `- int <10>
| `- Product(V)
| `- Value
| `- int <33>
`- Product(V)
`- Value
`- int <4>
Description
This package contains:
- Lexer to parse input string into tokens. There is separate Lexer configurable by regexps.
- Grammar object to describe a grammar of a language.
- Parsing table to let parser to switch states with respect to grammar.
- LR(0) parser itself. It parse input string for AST using the table.
First this package was made just to apply the theory in practice. It may easily be used for small grammars to parse small source codes. But later I did apply it in my another package.
Installation
Install through composer:
composer require vovan-ve/lr0-parser
or add to require
section in your composer.json:
"vovan-ve/lr0-parser": "~2.0.0"
Theory
License
This package is under MIT License
All versions of lr0-parser with dependencies
PHP Build Version
Package Version
Requires
php Version
^7.1
lib-pcre Version *
ext-json Version *
vovan-ve/array-dumper Version ~1.0.0
lib-pcre Version *
ext-json Version *
vovan-ve/array-dumper Version ~1.0.0
The package vovan-ve/lr0-parser contains the following files
Loading the files please wait ....