[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Scheme-reports] Issues with R7RS draft 8 section 7.1.1 <symbol element>

On Sun, Jan 13, 2013 at 4:29 AM, David A. Wheeler <dwheeler@x> wrote:
I just found some issues in R7RS draft 8 section 7.1.1
But these productions have two issues:
1. Having <symbol element> list double-quote is pointless, since that
   is already covered by "<any character other than <vertical line> or \>".
2. More importantly, the call to <string element> creates a useless
   ambiguity, because string element's <any character other than " or \>
   ALSO matches almost all the same characters.

Thanks for catching this.  Note that there was another issue which
is that we hadn't updated the draft after removing support for raw
symbol escapes outside of vertical bars.

I've fixed both of these, moving the mnemonic escapes up into
the identifier section so there are no forward-references from
symbol syntax to strings.

Note that we voted to add both hex escapes and mnemonic
escapes (like \t and \n) to symbols, but said nothing about
the trailing whitespace escapes, so these are left unspecified
for symbols.

The relevant definitions are:

<identifier> : <initial> <subsequent>*
  | <vertical line> <symbol element>* <vertical line>
  | <peculiar identifier>

<symbol element> :
  <any character other than <vertical line> or \ >
  | <inline hex escape> | <mnemonic escape> | \|

<mnemonic escape> : \a | \b | \t | \n | \r

<string> : " <string element>* "
<string element> : <any character other than <doublequote> or \ >
 | <mnemonic escape> | \" | \\
 | \ <intraline whitespace>* <line ending> \ <intraline whitespace>*
 | <inline hex escape>


Scheme-reports mailing list