> 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 ed
>> Nonetheless, it's a significant undertaking to deal with the complexity of
>> the language. There are dozens of tiny little edge cases in PHP's parsing
>> that require bunches of extra parser rules. An example from above is the
>> difference between using "statement" and "inner-statement" for
Hi Guilherme
You wrote that Java spec? Cool! Also very nice example of the PHP
EBNF! I think PHP needs a canonical one of those and that the parser
should be rewritten to represent said EBNF. Thats what I'm dreaming of
at least :)
Cheers
Rune
On Sat, Jan 1, 2011 at 5:23 PM, guilhermebla...@gmail
As a final note, I'd like to mention that even PHP grammar being quite
simple, it is light-years more complex (due to the lack of
standardization) than other languages.
You can compare this initial description I wrote to the Java
Specification and get your own conclusions:
http://java.sun.com/docs
Hi all,
PHP grammar is far from being complex. It is possible to describe most
of the syntax with a simple explanation.
Example:
* We can separate a program into several statements.
* There're a couple of items that cannot be declared into different
places (namespace, use), so consider them as to
> There has never been a language grammar, so there's been nothing to refer to
> at all. As for why no one's made one more recently, for fun I snagged the .l
> and .y files from trunk and W3C's version of EBNF from XML. In two hours of
> hacking away, I managed to come up with this sort-of begin
On Dec 31, 2010, at 6:54 AM, Enrico Weigelt wrote:
>> After enviously looking at pythons grammar
>> (http://docs.python.org/dev/reference/grammar.html) I keep feeling
>> that PHP is missing out on a lot of interesting meta projects by not
>> having an official EBNF.
> ACK. PHP also misses a lot of
Hi!
But still I have to ask if I'm the only one thinking about this or is
there something I'm being completely ignorant about?
You're not the only one thinking about it. But so far nobody moved from
thinking about it to actually doing it :)
--
Stanislav Malyshev, Software Architect
SugarCRM
* Rune Kaagaard wrote:
> Dear internals
>
> After enviously looking at pythons grammar
> (http://docs.python.org/dev/reference/grammar.html) I keep feeling
> that PHP is missing out on a lot of interesting meta projects by not
> having an official EBNF.
ACK. PHP also misses a lot of other fundam
Dear internals
After enviously looking at pythons grammar
(http://docs.python.org/dev/reference/grammar.html) I keep feeling
that PHP is missing out on a lot of interesting meta projects by not
having an official EBNF.
Building your own PHP parser is _very_ hard and is PhD (Paul Biggar:)
level st
10 matches
Mail list logo