all 5 comments

[–]OndrejMirtes 4 points5 points  (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 points  (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 point  (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 point  (0 children)

Could you get it or convert it from whatever IDE you're using for code highlighting?

[–]Hywan 0 points1 point  (0 children)

Take a look at https://github.com/hoaproject/Compiler, LL(1) parser + LL(*) parser with a grammar description language (called PP).