Gram

Record _ Pattern _

Pattern

PatternElement _ "," _ PatternElement

PatternElement

Annotation _ Subject Path Reference

Subject

"[" _ Attributes _ Association "]"

Association

"|" _ Pattern

Reference

Identity

Path

Node Relationship

Node

"(" _ Attributes _ ")"

Relationship

Node Arrow Path

Annotation

Annotate Symbol "(" Value ")" ":"

Arrow

PlainArrow QualifiedArrow

PlainArrow

"-->" "<--" "<->" "==>" "<==" "<=>" "~~>" "<~~" "<~>"

QualifiedArrow

"-[" Attributes "]->" "<-[" Attributes "]-" "<-[" Attributes "]->" "=[" Attributes "]=>" "<=[" Attributes "]=" "<=[" Attributes "]=>" "~[" Attributes "]~>" "<~[" Attributes "]~" "<~[" Attributes "]~>"

Attributes

Identity Labels Record

Identity

Key

Labels

Define Declare Key

Record

"{" _ "}" "{" _ Property "," _ Property "}"

Property

Key _ Define Declare _ Value

Define

":"

Declare

"::"

Annotate

"@"

Key

Symbol StringLiteral Integer

Value

Null Boolean Symbol NumericLiteral StringLiteral Measurement TaggedStringLiteral Range Record ValueList

ValueList

"[" _ "]" "[" _ Value _ "," _ Value _ "]"

Null

"null"

Boolean

"true" "false"

Symbol

/[a-zA-Z_]/ /[0-9a-zA-Z_\-@]/

Range

NumericLiteral ".." NumericLiteral NumericLiteral "..." "..." NumericLiteral

NumericLiteral

Integer Decimal Hexadecimal Octal Percentage

Integer

"-" "+" /[0-9]/

Decimal

"-" /[0-9]/ "." /[0-9]/ /[eE]/ /[+-]/ /[0-9]/

Hexadecimal

"-" "0x" /[0-9a-fA-F]/

Octal

"-" "0" /[0-7]/

Measurement

NumericLiteral Symbol

Percentage

NumericLiteral "%"

StringLiteral

DoubleQuotedLiteral SingleQuotedLiteral BacktickStringLiteral FencedStringLiteral

DoubleQuotedLiteral

"\"" NonDoubleQuoteChar "\""

SingleQuotedLiteral

"'" NonSingleQuoteChar "'"

BacktickStringLiteral

"`" NonBacktickChar "`"

FencedStringLiteral

"```\n" /[\s\S]/ "\n```"

TaggedStringLiteral

Symbol BacktickStringLiteral

NonDoubleQuoteChar

/[^\\"\n]/ "\\" EscapedChars

NonSingleQuoteChar

/[^\\'\n]/ "\\" EscapedChars "\\'"

NonBacktickChar

/[^`\n]/ "\\" EscapedChars "\\`"

EscapedChars

/["\\/bfnrt]/ "u" /[a-fA-F0-9]/ /[a-fA-F0-9]/ /[a-fA-F0-9]/ /[a-fA-F0-9]/

_

wschar

__

wschar

wschar

/[ \t\n\v\f]/