newlines, semicolons etc...
I support eliding semicolon before newline. There is an attempted rationale for this in design tactics. Basically, it's PHIM (parse how I mean).
Other elisions to make simple method calls concise are discussed in optional parenthesis.
I guess the straightforward way to specify this is to have a little nonterminal "OptNL" which is sprinkled liberally throughout the grammar, but which is conspicuously absent in the top-level structure of an expression statement.
A more tricky way to specify it is to define a token "NL" which acts as a statement separator, and which is coughed up by the lexer only when it is needed to break a run-on expression. Such potential NL points could be explicitly marked in the grammar by a "CheckNL" nonterminal.
Powered by a free Atlassian Confluence Open Source Project License granted to Codehaus. Evaluate Confluence today.