3 ms·
Semicolons in a grammar are nothing like nails or screws. Nails and screws hold things together. The vast majority of the time, semicolons in code are only visu
by groovy2shoes 15y ago
Semicolons in a grammar are nothing like nails or screws. Nails and screws hold things together. The vast majority of the time, semicolons in code are only visual indicators of the end of a statement; another perfectly good visual indicator is a newline. Many languages that require semicolons could (with minor modifications to the grammar) be cleanly parsed without any sort of statement terminator. See the Lua grammar for an example: http://www.lua.org/manual/5.1/manual.html#8 http://www.lua.org/manual/5.1/manual.html#8