Identifiers

An identifier is a sequence of characters conforming to the following rules:
  • It starts with a latin alphabet character (characters 'a' to 'z' and 'A' to 'Z').
  • The characters after the first one may be any combination of latin alphabet characters, decimal digits ('0' to '9'), or the underscore character ('_').
  • It is not one of the reserved words. The only reserved words are the literals TRUE, FALSE, and NULL.

ID is the terminal that represents the identifiers. However, in the grammar rules presented in this document we will use the non-terminal symbol id to denote identifiers.

Syntax

ID ::= ALPHABET (ALPHABET | DIGIT | '_')*
ALPHABET ::= 'a'..'z'|'A'..'Z'
DIGIT ::= '0'..'9'

id ::= 
ID | 
ADD | ALTER | ANCESTORS | AND |
ANY | ANYATOMIC | ANYJSONATOMIC | ANYRECORD | 
ARRAY | AS | ASC |
BINARY | BOOLEAN | BY |
CASCADE | CASE | CAST | COMMENT | COUNT | CREATE |
DAYS | DECLARE | DEFAULT | DESC | DESCENDANTS | DISTINCT | DOUBLE | DROP |
ELSE | END | ENUM | EXISTS | EXTRACT | FIRST | FLOAT | FROM |
GEOMETRY | GROUP | HOURS | IF | IN | INDEX | INTEGER | IS |
JSON | KEY | KEYS |
LAST | LIMIT | LONG | MAP | 
NAMESPACE | NESTED | NO | NOT | NULLS |
OF | OFFSET | ON | OR | ORDER | 
POINT | PRIMARY | RECORD |
SELECT | SHARD | STRING |
TABLE | TABLES | THEN | TTL | TYPE | 
USING | VALUES |
WHEN | WHERE | WITH