scala/scala — pull request #4182 by som-snytt (2014-12-03 01:31:34+00:00)
Title: SI-9015 Test for rejected literals and clean up parser 

There was no negative test for what constitutes a legal literal.

The ultimate goal is for the test to report all errors in
one compilation.

This commit follows up the removal of "1." syntax to simplify
number parsing. It removes previous paulp code to contain the
erstwhile complexity.

Leading zero is not immediately put to the buffer. Instead,
the empty buffer is handled on evaluation. In particular, an
empty buffer due to `0x` is a syntax error.

The message for obsolete octal syntax is nuanced and deferred
until evaluation by the parser, which is slightly simpler to
reason about.