/ missing in echar grammar rule

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

/ missing in echar grammar rule

Gunnar Aastrand Grimnes-3
Hi,

This is a minor thing, but the ECHAR grammar rule is given as:

ECHAR  ::=   '\' [tbnrf\"']

but a \\ is missing it has to be

ECHAR  ::=   '\' [tbnrf\"'\\]

so that you can parse escaped \'s like the one from test-case regex-query-003:

SELECT ?val
WHERE {
        ex:foo rdf:value ?val .
        FILTER regex(?val, "example\\.com")
}

Thanks!

- Gunnar


--
http://gromgull.net


Reply | Threaded
Open this post in threaded view
|

Re: / missing in echar grammar rule

Andy Seaborne-3


On 11/10/12 15:27, Gunnar Aastrand Grimnes wrote:

> Hi,
>
> This is a minor thing, but the ECHAR grammar rule is given as:
>
> ECHAR  ::=   '\' [tbnrf\"']
>
> but a \\ is missing it has to be
>
> ECHAR  ::=   '\' [tbnrf\"'\\]
>
> so that you can parse escaped \'s like the one from test-case regex-query-003:
>
> SELECT ?val
> WHERE {
> ex:foo rdf:value ?val .
> FILTER regex(?val, "example\\.com")
> }
>
> Thanks!
>
> - Gunnar

[tbnrf\"'] is a set of characters - no escape rules.

So the character \ really is a \, not an escape of the "

i.e. it is there already.

        Andy