Community
Participate
Working Groups
Consider the following snippet within a role class of MyTeam: callin void m() { within (MyTeam.this) base.m; // missing "()" } This gives two errors which are not very helpful: within (MyTeam.this) ^ Syntax error on tokens, delete these tokens base.m; ^ Syntax error, insert ") Statement" to complete plus a warning: Unnecessary semicolon By comparison a "super.m" is interpreted as an (unresolvable) field access with no secondary errors. This lets me think that with this rule FieldAccess ::= 'base' '.' 'Identifier' /.$putCase consumeInvalidBaseAccess(true); $break ./ we could give a much more precise error message.
The proposed fixed cannot easily be applied, because the additional rule renders the grammar invalid. I could not find a legal grammar extension for this particular case (LALR(1) constraints). Closing as WONTFIX given that current reporting still somehow points to the actual cause/syntax error.
.