1

Can any one give me some idea about how does a php file get parsed? I'm actually looking for the finite state machine structure for the parser. If anyone has any idea please share.

2 Answers 2

2

PHP uses bison/yacc to generate a parser. Have a look at the grammar here: http://svn.php.net/viewvc/php/php-src/trunk/Zend/zend_language_parser.y?view=markup

Sign up to request clarification or add additional context in comments.

Comments

1

You better use an existing one:

Any decent PHP parser written in PHP?

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.