Aladdin - Scala Bugtracking
[#138] project: specification priority: medium category: bug
submitter assigned to status date submitted
Burak Burak fixed 2003-09-12 12:53:48.0
subject 8.1 in patterns, id and +?*@ clash
code
<pre>
TreePattern    ::=    varid `:' Type
                 |    `_' `:' Type
                 |    SimplePattern [ '*' |'?' | '+' ]
                 |    SimplePattern { id SimplePattern }

SimplePattern    ::=    varid [ '@' SimplePattern ]
                   |    `_'
                   |    literal
                   |    StableId [ `(' [Patterns] `)' ]
                   |    `(' Patterns `)'
                   |
</pre>
what happened
n/a
what expected the spec should express that the regular operators *,?,+, and the pattern thingies _ and @ are not considered as identifiers in patterns. Furthermore, empty sequence patterns (the last line of SimplePattern) can not be arguments of infix op patterns (last line of TreePattern)
[back to overview]
Changes of this bug report
Burak  edited on  2003-09-12 12:55:14.0
added the paragraph empty sequence patterns.
Burak  edited on  2003-09-29 17:11:43.0
Martin  edited on  2003-10-09 16:18:48.0
Burak  edited on  2003-12-01 11:13:52.0
I updated the section by merely copying and pasting the agreed grammar from the end of the file and reworking the inaccuracies of the text. Comments welcome.
Burak  edited on  2003-12-01 11:49:02.0
also fixed the operator problem, by a semi-formal rule
id' ::= id $but not$ * ? + | @