3 ms·
There was a longish discussion on the bitc language development list on exactly this issue. I think this is the first message: http://www.mail-archive.com/bitc
by ajb 16y ago
There was a longish discussion on the bitc language development list on exactly this issue. I think this is the first message: http://www.mail-archive.com/bitc-dev@coyotos.org/msg02389.html http://www.mail-archive.com/bitc-dev@coyotos.org/msg02389.ht.... Looks like they ended up with automatic insertion:
http://www.bitc-lang.org/docs/bitc/spec.html#layout http://www.bitc-lang.org/docs/bitc/spec.html#layout
- singular 16y agoCool; interesting to see how it's done elsewhere. In go:- http://code.google.com/p/go/source/browse/src/cmd/gc/go.y http://code.google.com/p/go/source/browse/src/cmd/gc/go.y /* * Go language grammar. * * The Go semicolon rules are: * * 1. all statements and declarations are terminated by semicolons. * 2. semicolons can be omitted before a closing ) or }. * 3. semicolons are inserted by the lexer before a newline * following a specific list of tokens. * * Rules #1 and #2 are accomplished by writing the lists as * semicolon-separated lists with an optional trailing semicolon. * Rule #3 is implemented in yylex. */ But obviously this is very language-specific and given the case discussed above likely not to work in quite the same way.