Crate tagua_parser [−] [src]
Tagua VM
Tagua VM is an experimental PHP Virtual Machine written with the Rust language and the LLVM Compiler Infrastructure.
This library contains lexical and syntactic analysers, aka the parser, for the PHP language.
This is a parser combinator. The immediate consequence is that the lexical and syntax analyzers form a monolithic algorithm. The organization is the following:
- The
tokens
module declares all the lexemes, - The
rules
module declares the grammar as a set of rules, - The
ast
module contains the structure that will constitute the AST.
The parser is based on nom. nom is a parser combinator library with a focus on safe parsing, streaming patterns, and as much as possible zero copy. We try to enforce the zero copy property to hold.
Reexports
pub use self::internal::*; |
Modules
ast |
Structures that will constitute the Abstract Syntax Tree. |
internal |
Internal utilities for the parser. |
macros |
Extra macros helping to write parsers. |
rules |
The grammar as a set of rules. |
tokens |
List of lexemes. |
Macros
exclude |
|
first |
|
itag |
|
keyword |
|
Functions
parse |
Complete parsing of a datum starting by the sentence symbol of the grammar. |