# definition of zendparse

- Thread: https://externals.io/message/101919
- Original archive: https://news-web.php.net/php.internals/101919
- Started by Ryan McCullagh on 2018-02-25T02:42:54+00:00
- Messages: 4
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · RFCs at https://externals.io/rfc.md · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #101919 — Ryan McCullagh — 2018-02-25T02:42:54+00:00

URL: https://externals.io/message/101919#101919

I can't find this anywhere after a compile of master. `grep -r -n 'zendparse' *`. I see that there are declarations of zendparse, but there is no definition as far as I can see. How is this happening?

-- 
Ryan McCullagh
ryanmccullagh.com | +1 847-791-4066

---

## #101920 — Kalle Sommer Nielsen — 2018-02-25T03:02:21+00:00

URL: https://externals.io/message/101919#101920 · In reply to: #101919

Hi Ryan

2018-02-25 3:42 GMT+01:00 Ryan McCullagh <me@ryanmccullagh.com>:
> I can't find this anywhere after a compile of master. `grep -r -n 'zendparse' *`. I see that there are declarations of zendparse, but there is no definition as far as I can see. How is this happening?

This comes from the Zend/zend_language_parser.y file in its generated
form, the yyparse name is set to zendparse (through #define yyparse
zendparse)

-- 
regards,

Kalle Sommer Nielsen
kalle@php.net

---

## #101936 — Ryan McCullagh — 2018-02-26T19:24:20+00:00

URL: https://externals.io/message/101919#101936 · In reply to: #101920

It seems that the define is backwards though. ‘#define yyparse zendparse’ still depends on a zendparse symbol. There is no function definition for zendparse. All I can see is yyparse in the generated file. What are your thoughts?

Sent from my iPhone

> 
> 
> Hi Ryan
> 
> 2018-02-25 3:42 GMT+01:00 Ryan McCullagh <me@ryanmccullagh.com>:
> > […]
> 
> This comes from the Zend/zend_language_parser.y file in its generated
> form, the yyparse name is set to zendparse (through #define yyparse
> zendparse)
> 
> -- 
> regards,
> 
> Kalle Sommer Nielsen
> kalle@php.net

---

## #101937 — Thomas Punt — 2018-02-26T19:43:32+00:00

URL: https://externals.io/message/101919#101937

Hi!

> It seems that the define is backwards though. ‘#define yyparse zendparse’ still depends on a zendparse symbol. There is no function definition for zendparse. All I can see is yyparse in the generated file. What are your thoughts?

Right, yyparse is aliased to zendparse. yyparse is used for the symbol definition name (instead of zendparse) in the generated parser[1], where it will be replaced with zendparse by the preprocessor.

Thanks,
Tom

[1]: https://gist.github.com/tpunt/c22aea1602594d6cfcc94f801d580241#file-zend_language_parser-c-L4489
<https://gist.github.com/tpunt/c22aea1602594d6cfcc94f801d580241#file-zend_language_parser-c-L4489
