Parsing
This page provides a general overview of how Cypher® parses an input string.
The Cypher parser takes an arbitrary input string. While the syntax of Cypher is described in subsequent chapters, the following details the general rules on which characters are considered valid input.
Using unicodes in Cypher
Unicodes can generally be escaped as \uxxx
.
Additional documentation on escaping rules for string literals, names and regular expressions can be found here:
The following example escapes the unicode character A
(\u0041
) in the keyword MATCH
:
M\u0041TCH (m) RETURN m;
Supported whitespace
Whitespace can be used as a separator between keywords and has no semantic meaning. The following unicode characters are considered as whitespace:
Description | List of included Unicode Characters |
---|---|
Unicode General Category Zp |
|
Unicode General Category Zs |
|
Unicode General Category class Zl |
|
Horizontal Tabulation |
|
Line Feed |
|
Vertical Tabulation |
|
Form Feed |
|
Carriage Return |
|
File Separator |
|
Group Separator |
|
Record Separator |
|
Unit Separator |
|
It is possible to have multiple whitespace characters in a row, and will have the same effect as using a single whitespace.
The following example query uses vertical tabulation (\u000B
) as whitespace between the RETURN
keyword and the variable m
:
MATCH (m) RETURN\u000Bm;
Was this page helpful?