[#291] | project: compiler | priority: low | category: bug | |
---|---|---|---|---|
submitter | assigned to | status | date submitted | |
Nikolay | Martin | fixed | 2004-02-02 18:57:08.0 | |
subject | [contrib #15] Bad identifier parsing | |||
code |
> val x_5 = 45 val x_5: scala.Int(45) = 45 > x_5 45: scala.Int(45) |
|||
what happened | "x_5" has been accepted as an identifier |
|||
what expected | According to Chapter 1 (Lexical Syntax), "x_5" cannot be an identifier. Therefore, the first line should trigger a parse error. | |||
[back to overview] |
Nikolay edited on 2004-02-02 18:59:26.0 |
I don't think this is a real problem but, indeed, it is disallowed by the spec. |
Burak edited on 2004-02-03 12:12:24.0 |
Hm, why not allow this ? by changing the rule to
ident = ... [ '_' {id|digit} ] |
Martin edited on 2004-04-05 15:57:13.0 |
fixed by changing the spec to allow this. |