Escape syntax for Cypher queries?

Showing 1-6 of 6 messages
Escape syntax for Cypher queries? Harald Wellmann 1/25/12 1:10 PM
Cypher throws a syntax exception for a query of the following form:

     start user=node:com.example.User(id={login}) ...

Apparently it doesn't like the dots in my index name "com.example.User".

What's the escape syntax for special characters in names?

By the way, is the Cypher grammar documented? The Neo4j manual only
seems to contain examples.

Best regards,
Harald

Re: [Neo4j] Escape syntax for Cypher queries? Michael Hunger 1/25/12 5:16 PM
You escape with backquotes:

> start user=node:`com.example.User`(id={login}) ...

Michael

Re: [Neo4j] Escape syntax for Cypher queries? Peter Neubauer 1/26/12 2:53 AM
Harald,
you mean like a formal grammar specification? I don't think there is,
however we have been wanting to do that since the beginning. How would
you suggest to go about it?

Cheers,

/peter neubauer

G:  neubauer.peter
S:  peter.neubauer
P:  +46 704 106975
L:   http://www.linkedin.com/in/neubauer
T:   @peterneubauer

Neo4j 1.6 released                 - dzone.com/6S4K
The Neo4j Heroku Challenge   - http://neo4j-challenge.herokuapp.com/

Re: [Neo4j] Escape syntax for Cypher queries? Andres Taylor 1/26/12 3:32 AM


On Thu, Jan 26, 2012 at 11:53 AM, Peter Neubauer <peter.n...@neotechnology.com> wrote:
Harald,
you mean like a formal grammar specification? I don't think there is,
however we have been wanting to do that since the beginning. How would
you suggest to go about it?

Yeah, I'd love to have it, but I don't know how to describe the ascii-graphic-art part of the language. Any ideas on how to do that would be very interesting!

Andrés
Re: [Neo4j] Escape syntax for Cypher queries? Peter Hunsberger 1/26/12 8:33 AM

The "ASCII art" is no different from any other string of chars as far as something like BNF would be concerned.  Consider any language that uses operators such as ":=" or match brackets, quotes, etc. of any kind...

On Jan 26, 2012 5:32 AM, "Andres Taylor" <and...@neotechnology.com> wrote:



On Thu, Jan 26, 2012 at 11:53 AM, Peter Neubauer <peter.n...@neotechnology.com> wrote:
>
> Haral...

Yeah, I'd love to have it, but I don't know how to describe the ascii-graphic-art part of the language. Any ideas on how to do that would be very interesting!

Andrés

Re: [Neo4j] Escape syntax for Cypher queries? Harald Wellmann 1/26/12 8:52 AM
Am 26.01.2012 11:53, schrieb Peter Neubauer:
> Harald,
> you mean like a formal grammar specification? I don't think there is,
> however we have been wanting to do that since the beginning. How would
> you suggest to go about it?
>

EBNF and/or railway diagrams are fairly common grammar representations:
http://en.wikipedia.org/wiki/Syntax_diagram

ANTLR also has some visualization tools:
http://www.antlr.org/works/screenshots/interpreter.png

If Scala is so great for building parsers, I'd expect it to be able to
produce some kind of EBNF extract of a given parser grammar. If not, it
shouldn't be too hard to do it by hand.

Cheers,
Harald