Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any documentation? #1

Open
kse300489 opened this issue Apr 6, 2015 · 3 comments
Open

Any documentation? #1

kse300489 opened this issue Apr 6, 2015 · 3 comments

Comments

@kse300489
Copy link

Hi, where i can find any documentation for parser generator?

@jgmdev
Copy link
Member

jgmdev commented Apr 8, 2015

For now you can find generated documentation here http://peg-org.github.io/api/

@kse300489
Copy link
Author

I already can use this generator? Any examples?

@jgmdev
Copy link
Member

jgmdev commented Apr 9, 2015

Rigth now a doxygen xml parser/extractor is implemented to obtain symbols. On the generation side I started writing a Zend Engine Extension generator which generates wrappers for functions, variables, constants and some other minor stuff.

I use a CLI interface which isn't the official one at this repo https://github.com/peg-org/peg-custom for development purpose, it is mostly self documented, you can try peg-custom help The official CLI interface https://github.com/peg-org/peg-cli is going to be developed by some PHP-GTK developers, but for now they haven't found the time to keep working on it.

On my side, mostly what is missing is the generation of code that wraps C++ classes/structs which shouldn't be that hard to implement using the code that generates functions as a base example. Our idea is to easily generate wrappers for existing libraries like GTK, wxWidgets, QT, etc...

For now you can try the project by using peg-custom cli interface. The idea iis to first create the directory which will hold your extension

mkdir myextension
cd myextension

Then initialize that directory

peg-custom init

Afterwards extract symbols from a source like doxygen xml files (only supported source for now)

peg-custom parse --source "/my-C-library/doxygen/xml/files" --headers "/path/to/my-C-library/header/files"

Finally generate source code for the extension from previously extracted symbols.

peg generate

For more information, a discussion on the development of peg can be found here: https://gist.github.com/auroraeosrose/e90155727703190ab64c

When Im back to my development computer I will try to comment here on my testing with wxWidgets

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants