3 ms·
If I remember correctly, Matz didn't approve a formal grammar for the language until a few years ago, with the idea that any language that can run rubyspec is R
by donw 15y ago
If I remember correctly, Matz didn't approve a formal grammar for the language until a few years ago, with the idea that any language that can run rubyspec is Ruby.
E.g., the language was defined not by a formal specification, but by implementation.
Then again, my memory is known for being incredibly unreliable; I could be wrong on this one.
- fizx 15y agoYou're both right.
- Goladus 15y agoRight, you rarely have to use the formally specified grammar to parse a language, so long as whatever parsing technique you use doesn't violate the spec. A 6000-line yacc file probably isn't an easily-read formal grammar and does more than a formal syntax specification would require.