News for hackers. Stuff that matters.
Re:Visualization of the Grammars of Ruby, Java and Javascript by DTrejo on Sunday December 06, 2009 @04:47PM (#980206)
ANSI C and Python grammars:

Nick said ...

@Adam: check out http://www.flickr.com/photos/nicksieger/281055530/ and http://www.flickr.com/photos/nicksieger/281055485/. I can’t even imagine what a Perl grammar would look like

Re:Visualization of the Grammars of Ruby, Java and Javascript by jazzdev on Sunday December 06, 2009 @07:12PM (#980398)
I can’t even imagine what a Perl grammar would look like

Since there's no BNF for Perl it would be hard to visualize its grammar.

Re:Visualization of the Grammars of Ruby, Java and Javascript by james2vegas on Monday December 07, 2009 @12:03PM (#981518)
perly.y might help (sadly it recently went from yacc to bison).
Re:Visualization of the Grammars of Ruby, Java and Javascript by martythemaniak on Monday December 07, 2009 @01:32AM (#980834)
Well, you could use perl6's grammar, which is the closest you can get. Comparing it to python is rather funny:

http://www.python.org/doc/2.5.1/ref/grammar.txt

http://svn.pugscode.org/pugs/src/perl6/STD.pm

If you do a wc, perl6 is about 12-20 times the size of python (depending if you use lines or chars). It would be funny to see the per6 graph...

Re:Visualization of the Grammars of Ruby, Java and Javascript by chromatic on Monday December 07, 2009 @02:21AM (#980874)
> [Perl 6] is about 12-20 times the size of python....

The Perl 6 grammar also includes comments and is itself written in Perl 6. A metacircular Python grammar would look different from the existing Python grammar.

Re:Visualization of the Grammars of Ruby, Java and Javascript by Periodic on Sunday December 06, 2009 @05:18PM (#980249)
Both of those are fairly simple! It's refreshing. I know some python people claim that the more rigid syntax of Python helps you code better. But I wouldn't be surprised if there was some motivation from the interpreter writers.