Open michael-becker opened 4 years ago
Hi Michael,
Sounds great. I'm sure plenty of people will find your PHP work useful.
It looks like you are translating the Java code to PHP. Makes sense.
Long story short, development is stalled for Java. The parser internals have been rewritten, but need to be merged into master. I believe #25 is mostly done, but there are now merge conflicts, and the TypeScript version may have since made further improvements.
Are you able to help us with the Java version too? I believe @glebm has offered to do code review.
The current JavaScript (TypeScript) version would be the best one to base the new PHP or Java parser on, because it's non-recursive. Recursive parsers in these languages can easily run out of stack on inputs only a few KiB in size.
The Java code in #25 should already be close to equivalent to the current TypeScript version. Aside from changes to handle Unicode, were there any big changes to Joshua's JavaScript/CoffeScript version?
I think the merge conflicts in #25 are related to the generation code having migrated from PLT Scheme to Racket, and perhaps some stuff with the test harness.
There were no other big changes. I've now skimmed through the code in #25 and it does look equivalent. Unicode support can be implemented in a very similar way (both Java and JavaScript use UTF-16).
Thanks for the reply. We are also using the Java and Typescript versions. Since I am more a Java-guy, I will have a look at #25 and hopefully might be able to contribute necessary adaptions.
Just to give an update: I have rewritten the PHP implementation according to your remarks. It is now non-recursive. In additiona, I implemented the calc example. Works as a charm from my point of view :)
Currently, there is some code cleaning and minor bugfixing necessary. But I think we should be able to start a code review at the end of this or beginning with next week.
I'd really find support for PHP (either directly or via Haxe #43) useful, as it is a pretty common freely hosted server side language. Can we perhaps somehow give a hand at finishing this up?
Hey folks,
thanks for the good work with waxeye. Since we need this in a project, I am currently developing support for PHP parser generation (https://github.com/michael-becker/waxeye-php).
As of now, generation of PHP parsers is possible. Still missing is finalising the implementation of the different Transitions. This should be finalised finished next week. Feel free to comment and suggest improvements.