Re: Re: EBNF
| From: | Rune Kaagaard | Date: | Tue, 04 Jan 2011 08:56:42 +0000 |
| Subject: | Re: Re: EBNF | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-51215@lists.php.net to get a copy of this message | ||
> Having an EBNF would be useful in cases where we want to write
> something like Ruby's CoffeeScript. After looking at PHP's grammar
> file, it's about 1,000 lines long. Since this is used to generate the
> parser, isn't it possible to strip out the C macros to create an EBNF
> that catches all edge cases?
Not being sure at all, but I reckon a lot of those edge cases are
handled in the c macros and not in the plain "yacc"-style grammar
definition.