tagua-vm / parser

Safe, fast and memory efficient PHP parser (lexical and syntactic analysers, and the Abstract Syntax Tree)
http://tagua.io/
119 stars 15 forks source link

Not sure about the usage of this parser #131

Closed subhojit777 closed 6 years ago

subhojit777 commented 6 years ago

I found other PHP parsers

In their examples, I found that they take a PHP code, or a PHP file, and outputs a tree (AST) representation of the code.

A similar example is not mentioned in this parser.

I understood that this parser is like a drop-in replacement of the core PHP (http://php.net/manual/en/install.php). I understood it from the text in the README "Tagua VM is an experimental PHP Virtual Machine". Correct me if I am wrong. How this is different from the parsers mentioned above? Or is this just a PHP parser, similar to others, but only written in Rust?


Sorry for asking this silly question. I am a complete newbie when it comes to parser. I want to write a PHP parser in Rust, then I came across this repository.

Hywan commented 6 years ago

Tagua VM is a set of multiple libraries/crates. This repository contains the parser, used inside the VM.

I'm about the refactor this whole stuff and merge everything in a single repository though.

subhojit777 commented 6 years ago

Thanks for the information. Do you have plans to make this as a standalone parser? Similar to https://github.com/nikic/PHP-Parser so that you could output the AST by running a command.

Hywan commented 6 years ago

No ETA yet :-).