Aladdin - Scala Bugtracking
[#386] project: specification priority: low category: feature
submitter assigned to status date submitted
Philippe Martin open 2004-12-13 18:40:28.0
subject Identifiers can't contain the character `
code
what happened
With the notation `stringLit` it is possible to form identifiers containing any character excepted `. If it is u\
sed as is, it terminates the identifier and escaped with \ it isn't recognised as an escapable character.
what expected It should be possible to insert ` in identifiers.
[back to overview]
Changes of this bug report
Philippe  edited on  2004-12-13 18:41:52.0
Changed project to specification.
Burak  edited on  2004-12-16 15:04:22.0
We could specify \x = x for all characters except n,t,b,r,\.
Meanwhile I added a tentative case \` = ` to the scanner.
Philippe  edited on  2004-12-16 17:03:42.0
Don't forget that the definition of stringLit is as in Java and in java, the expression "\`" represents the string containing the two characters '\\' and '`'. Therefore, you can't change the meaning of \` to designate the character '`', at least not within stringLit. Maybe, we could use the following definition for id:
id         ::= ...
            |  ``' stringLit2 ``'
stringLit2 ::= "like stringLit + escape for character '`'"
stringLit  ::= "as in Java"