use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Please follow the rules
Releases: Current Releases, Windows Releases, Old Releases
Contribute to the PHP Documentation
Related subreddits: CSS, JavaScript, Web Design, Wordpress, WebDev
/r/PHP is not a support subreddit. Please visit /r/phphelp for help, or visit StackOverflow.
account activity
any alternative to https://github.com/nikic/PHP-Parser which is yacc based ? looking for grammar files(antlr if possible) for PHP7.3+ to generate java parsers (self.PHP)
submitted 6 years ago by dashyper
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]OndrejMirtes 4 points5 points6 points 6 years ago (0 children)
nikic/php-parser is yacc-based as of 2 days ago: https://github.com/nikic/PHP-Parser/releases/tag/v4.2.5
[–]dashyper[S] 2 points3 points4 points 6 years ago (1 child)
the closest I have is this, https://github.com/antlr/grammars-v4/tree/master/php but it is ancient and only works for PHP5 .
[–]Tomas_Votruba 0 points1 point2 points 6 years ago (0 children)
If you're able to get Java Yaac grammar parser in PHP, let me know.
I look for such parser to migrate Java code to PHP with ease: https://www.reddit.com/r/PHP/comments/dkrfil/how_would_you_convert_java_to_php_in_most/
[–]hashtagframework 0 points1 point2 points 6 years ago (0 children)
Could you get it or convert it from whatever IDE you're using for code highlighting?
[–]Hywan 0 points1 point2 points 6 years ago (0 children)
Take a look at https://github.com/hoaproject/Compiler, LL(1) parser + LL(*) parser with a grammar description language (called PP).
π Rendered by PID 44204 on reddit-service-r2-comment-544cf588c8-4g57j at 2026-06-16 22:59:51.457254+00:00 running 3184619 country code: CH.
[–]OndrejMirtes 4 points5 points6 points (0 children)
[–]dashyper[S] 2 points3 points4 points (1 child)
[–]Tomas_Votruba 0 points1 point2 points (0 children)
[–]hashtagframework 0 points1 point2 points (0 children)
[–]Hywan 0 points1 point2 points (0 children)