25 points · by Anon84 · 17y ago · 15 comments
The grammar itself (which, in this case, is expressed in EBNF notation) says nothing about details such as the size of numbers. Grammars only describe what can be said, not what that means.
The C grammar, for example, has many different number types. But it's not the grammar which determines if an unsigned long is 32 or 64-bit. That's determined by parts of the language specification outside of the grammar.
Now, you too can share some of this glory by writing your own compiler for the Microsoft® .NET Framework.
Made me ready to pick up the phone and buy a "10 Steps to Making Trillions on eBay" book... or write a CLR-targeted compiler.
If you have never actually made a language from the ground up, then please do so ! It will teach you plenty and it will also help you to write better code because you understand better what a compiler will do internally with the code you wrote. Another great source of insight is the 'produce assembly output' switch for your favourite compiler. Have a look at what the compiler does when it parses your code and turns it in to assembler ready to be turned into machine language.