Grammatica consolidataConsolidated Grammar

Grammatica lessicaleLexical grammar

lexical-unit:
      lexical-elements opt
lexical-elements:
      lexical-element lexical-elements opt
lexical-element:
      whitespace
      token comment
lexical-unit:
      lexical-elementsopt
lexical-elements:
      lexical-element lexical-elementsopt
lexical-element:
      whitespace
      token comment

Spazi vuotiWhite space

whitespace:whitespace:
      Qualsiasi carattere con classe Unicode Zs      Any character with Unicode class Zs
      Carattere di tabulazione orizzontale (U+0009)      Horizontal tab character (U+0009)
      Carattere di tabulazione verticale (U+000B)      Vertical tab character (U+000B)
      Carattere di avanzamento carta (U+000C)      Form feed character (U+000C)
      Carattere di ritorno a capo (U+000D) seguito dal carattere di avanzamento riga (U+000A)       new-line-character
new-line-character:
      Carriage return character (U+000D) followed by line feed character (U+000A)       new-line-character
new-line-character:

      Carattere di ritorno a capo (U+000D)      Carriage return character (U+000D)
      Carattere di avanzamento riga (U+000A)      Line feed character (U+000A)
      Carattere di nuova riga (U+0085)      Next line character (U+0085)
      Carattere separatore di riga (U+2028)      Line separator character (U+2028)
      Carattere separatore di paragrafo (U+2029)      Paragraph separator character (U+2029)

Aggiungere commentiComment

comment:
      single-line-comment
      delimited-comment

single-line-comment:
comment:
      single-line-comment
      delimited-comment

single-line-comment:

      // single-line-comment-characters opt
single-line-comment-characters:
      single-line-comment-character single-line-comment-characters opt
single-line-comment-character:
      // single-line-comment-charactersopt
single-line-comment-characters:
      single-line-comment-character single-line-comment-charactersopt
single-line-comment-character:

      Qualsiasi carattere Unicode ad eccezione di new-line-character
delimited-comment:
      Any Unicode character except a new-line-character
delimited-comment:

      /* delimited-comment-text opt asterisks /      /* delimited-comment-textopt asterisks /
delimited-comment-text:
      delimited-comment-section delimited-comment-text opt
delimited-comment-section:
delimited-comment-text:
      delimited-comment-section delimited-comment-textopt
delimited-comment-section:

      /      /
      asterisks opt not-slash-or-asterisk
asterisks:
      asterisksopt not-slash-or-asterisk
asterisks:

      * asterisks opt
not-slash-or-asterisk:
      * asterisksopt
not-slash-or-asterisk:

      Qualsiasi carattere Unicode ad eccezione di * o /      Any Unicode character except * or /

TokensTokens

token:
      identifier
      keyword
      literal
      operator-or-punctuator
token:
      identifier
      keyword
      literal
      operator-or-punctuator

Sequenze di escape dei caratteriCharacter escape sequences

character-escape-sequence:character-escape-sequence:
      #( escape-sequence-list )      #( escape-sequence-list )
escape-sequence-list:
      single-escape-sequence
      escape-sequence-list
, single-escape-sequence
single-escape-sequence:
      long-unicode-escape-sequence
      short-unicode-escape-sequence
      control-character-escape-sequence
      escape-escape
long-unicode-escape-sequence:
      hex-digit hex-digit hex-digit hex-digit hex-digit hex-digit hex-digit hex-digit
short-unicode-escape-sequence:
      hex-digit hex-digit hex-digit hex-digit
control-character-escape-sequence:
      control-character
control-character:
escape-sequence-list:
      single-escape-sequence
      escape-sequence-list
, single-escape-sequence
single-escape-sequence:
      long-unicode-escape-sequence
      short-unicode-escape-sequence
      control-character-escape-sequence
      escape-escape
long-unicode-escape-sequence:
      hex-digit hex-digit hex-digit hex-digit hex-digit hex-digit hex-digit hex-digit
short-unicode-escape-sequence:
      hex-digit hex-digit hex-digit hex-digit
control-character-escape-sequence:
      control-character
control-character:

      cr      cr
      lf      lf
      tab      tab
escape-escape:escape-escape:
      #      #

Valori letteraliLiterals

literal:
      logical-literal
      number-literal
      text-literal
      null-literal
      verbatim-literal
logical-literal:
      true
      false
number-literal:
      decimal-number-literal
      hexadecimal-number-literal
decimal-digits:
      decimal-digit decimal-digits opt
decimal-digit:
one of
literal:
      logical-literal
      number-literal
      text-literal
      null-literal
      verbatim-literal
logical-literal:
      true
      false
number-literal:
      decimal-number-literal
      hexadecimal-number-literal
decimal-digits:
      decimal-digit decimal-digitsopt
decimal-digit:
one of

      0 1 2 3 4 5 6 7 8 9      0 1 2 3 4 5 6 7 8 9
hexadecimal-number-literal:hexadecimal-number-literal:
      0x hex-digits      0x hex-digits
      0X hex-digits
hex-digits:
      hex-digit hex-digits opt
hex-digit:
uno tra
      0X hex-digits
hex-digits:
      hex-digit hex-digitsopt
hex-digit:
one of

      0 1 2 3 4 5 6 7 8 9 A B C D E F a b c d e f      0 1 2 3 4 5 6 7 8 9 A B C D E F a b c d e f
decimal-number-literal:
      decimal-digits
. decimal-digits exponent-part opt
decimal-number-literal:
      decimal-digits
. decimal-digits exponent-partopt

      . decimal-digits exponent-part opt
      decimal-digits exponent-part opt
exponent-part:
      . decimal-digits exponent-partopt
      decimal-digits exponent-partopt
exponent-part:

      e sign opt decimal-digits      e signopt decimal-digits
      E sign opt decimal-digits
sign:
uno tra
      E signopt decimal-digits
sign:
one of

      + -      + -
text-literal:text-literal:
      " text-literal-characters opt "      " text-literal-charactersopt "
text-literal-characters:
      text-literal-character text-literal-characters opt
text-literal-character:
      single-text-character
      character-escape-sequence
      double-quote-escape-sequence
single-text-character:
text-literal-characters:
      text-literal-character text-literal-charactersopt
text-literal-character:
      single-text-character
      character-escape-sequence
      double-quote-escape-sequence
single-text-character:

      Qualsiasi carattere ad eccezione di " (U+0022) o # (U+0023), seguito da ( (U+0028)      Any character except " (U+0022) or # (U+0023) followed by ( (U+0028)
double-quote-escape-sequence:double-quote-escape-sequence:
      "" (U+0022, U+0022)      "" (U+0022, U+0022)
null-literal:null-literal:
      null      null
verbatim-literal:verbatim-literal:
      #!" text-literal-characters opt "      #!" text-literal-charactersopt "

IdentificatoriIdentifiers

identifier:
      regular-identifier
      quoted-identifier
regular-identifier:
      available-identifier
      available-identifier dot-character regular-identifier
available-identifier:
identifier:
      regular-identifier
      quoted-identifier
regular-identifier:
      available-identifier
      available-identifier dot-character regular-identifier
available-identifier:

      A keyword-or-identifier che non è keyword
keyword-or-identifier:
      letter-character
      underscore-character
      identifier-start-character identifier-part-characters
identifier-start-character:
      letter-character
      underscore-character
identifier-part-characters:
      identifier-part-character identifier-part-characters opt
identifier-part-character:
      letter-character
      decimal-digit-character
      underscore-character
      connecting-character
      combining-character
      formatting-character
generalized-identifier:
      generalized-identifier-part
      generalized-identifier
separato solo da spazi vuoti (U+0020) generalized-identifier-part
generalized-identifier-part:
      generalized-identifier-segment
      decimal-digit-character generalized-identifier-segment
generalized-identifier-segment:
      keyword-or-identifier
      keyword-or-identifier dot-character keyword-or-identifier
dot-character:
      A keyword-or-identifier that is not a keyword
keyword-or-identifier:
      letter-character
      underscore-character
      identifier-start-character identifier-part-characters
identifier-start-character:
      letter-character
      underscore-character
identifier-part-characters:
      identifier-part-character identifier-part-characters opt
identifier-part-character:
      letter-character
      decimal-digit-character
      underscore-character
      connecting-character
      combining-character
      formatting-character
generalized-identifier:
      generalized-identifier-part
      generalized-identifier
separated only by blanks (U+0020) generalized-identifier-part
generalized-identifier-part:
      generalized-identifier-segment
      decimal-digit-character generalized-identifier-segment
generalized-identifier-segment:
      keyword-or-identifier
      keyword-or-identifier dot-character keyword-or-identifier
dot-character:

      . (U+002E)      . (U+002E)
underscore-character:underscore-character:
      _ (U+005F)      _ (U+005F)
letter-character:letter-character:
      Carattere Unicode di classe Lu, Ll, Lt, Lm, Lo o Nl      A Unicode character of classes Lu, Ll, Lt, Lm, Lo, or Nl
combining-character:combining-character:
      Carattere Unicode di classe Mn o Mc      A Unicode character of classes Mn or Mc
decimal-digit-character:decimal-digit-character:
      Carattere Unicode di classe Nd      A Unicode character of the class Nd
connecting-character:connecting-character:
      Carattere Unicode di classe Pc      A Unicode character of the class Pc
formatting-character:formatting-character:
      Carattere Unicode di classe Cf      A Unicode character of the class Cf
quoted-identifier:quoted-identifier:
      #" text-literal-characters opt "      #" text-literal-charactersopt "

Parole chiave e identificatori predefinitiKeywords and predefined identifiers

Non è possibile ridefinire le parole chiave e gli identificatori predefiniti.Predefined identifiers and keywords cannot be redefined. Un identificatore tra virgolette può essere usato per gestire gli identificatori che altrimenti sarebbero in conflitto con le parole chiave o gli identificatori predefiniti.A quoted identifier can be used to handle identifiers that would otherwise collide with predefined identifiers or keywords.

keyword: una trakeyword: one of
      and as each else error false if in is let meta not null or otherwise      and as each else error false if in is let meta not null or otherwise
      section shared then true try type #binary #date #datetime      section shared then true try type #binary #date #datetime
      #datetimezone #duration #infinity #nan #sections #shared #table #time      #datetimezone #duration #infinity #nan #sections #shared #table #time

Operatori e segni di punteggiaturaOperators and punctuators

operator-or-punctuator: uno traoperator-or-punctuator: one of
      , ; = < <= > >= <> + - * / & ( ) [ ] { } @ ? => .. ...      , ; = < <= > >= <> + - * / & ( ) [ ] { } @ ? => .. ...

Grammatica sintatticaSyntactic grammar

DocumentiDocuments

document:
      section-document
      expression-document
document:
      section-document
      expression-document

Documenti di sezioneSection Documents

section-document:
      section
section:
      literal-attributes opt
section section-name ; section-members opt
section-name:
      identifier
section-members:
      section-member section-members opt
section-member:
      literal-attributes opt shared opt section-member-name
= expression ;
section-document:
      section
section:
      literal-attributes opt
section section-name ; section-members opt
section-name:
      identifier
section-members:
      section-member section-members opt
section-member:
      literal-attributes opt shared opt section-member-name
= expression ;

section-member-name:
      identifier
section-member-name:
      identifier

Documenti di espressioneExpression Documents

EspressioniExpressions

expression-document:
      expression
expression:
      logical-or-expression
      each-expression
      function-expression
      let-expression
      if-expression
      error-raising-expression
      error-handling-expression
expression-document:
      expression
expression:
      logical-or-expression
      each-expression
      function-expression
      let-expression
      if-expression
      error-raising-expression
      error-handling-expression

Espressioni logicheLogical expressions

logical-or-expression:
      logical-and-expression
      logical-and-expression
or logical-or-expression
logical-and-expression:
      is-expression
      logical-and-expression
and is-expression
logical-or-expression:
      logical-and-expression
      logical-and-expression
or logical-or-expression
logical-and-expression:
      is-expression
      logical-and-expression
and is-expression

Espressione isIs expression

is-expression:
      as-expression
      is-expression
is nullable-primitive-type
nullable-primitive-type:
is-expression:
      as-expression
      is-expression
is nullable-primitive-type
nullable-primitive-type:

      nullableopt primitive-type      nullableopt primitive-type

Espressione asAs expression

as-expression:
      equality-expression
      as-expression
as nullable-primitive-type
as-expression:
      equality-expression
      as-expression
as nullable-primitive-type

Espressione di uguaglianzaEquality expression

equality-expression:
      relational-expression
      relational-expression
= equality-expression
      relational-expression
<> equality-expression
equality-expression:
      relational-expression
      relational-expression
= equality-expression
      relational-expression
<> equality-expression

Espressione relazionaleRelational expression

relational-expression:
      additive-expression
      additive-expression
< relational-expression
      additive-expression
> relational-expression
      additive-expression
<= relational-expression
      additive-expression
>= relational-expression
relational-expression:
      additive-expression
      additive-expression
< relational-expression
      additive-expression
> relational-expression
      additive-expression
<= relational-expression
      additive-expression
>= relational-expression

Espressioni aritmeticheArithmetic expressions

additive-expression:
      multiplicative-expression
      multiplicative-expression
+ additive-expression
      multiplicative-expression
- additive-expression
      multiplicative-expression
& _additive-expression
additive-expression:
      multiplicative-expression
      multiplicative-expression
+ additive-expression
      multiplicative-expression
- additive-expression
      multiplicative-expression
& _additive-expression

multiplicative-expression:
      metadata-expression
      metadata-expression
* multiplicative-expression
      metadata-expression
/ multiplicative-expression
multiplicative-expression:
      metadata-expression
      metadata-expression
* multiplicative-expression
      metadata-expression
/ multiplicative-expression

Espressione di metadatiMetadata expression

metadata-expression:
      unary-expression
      unary-expression
meta unary-expression
metadata-expression:
      unary-expression
      unary-expression
meta unary-expression

Espressione unariaUnary expression

unary-expression:
      type-expression
unary-expression:
      type-expression

      + unary-expression      + unary-expression
      - unary-expression      - unary-expression
      not unary-expression      not unary-expression

Espressione primariaPrimary expression

primary-expression:
      literal-expression
      list-expression
      record-expression
      identifier-expression
      section-access-expression
      parenthesized-expression
      field-access-expression
      item-access-expression
      invoke-expression
      not-implemented-expression
primary-expression:
      literal-expression
      list-expression
      record-expression
      identifier-expression
      section-access-expression
      parenthesized-expression
      field-access-expression
      item-access-expression
      invoke-expression
      not-implemented-expression

Espressione letteraleLiteral expression

literal-expression:
      literal
literal-expression:
      literal

Espressione identificatoreIdentifier expression

identifier-expression:
      identifier-reference
identifier-reference:
      exclusive-identifier-reference
      inclusive-identifier-reference
exclusive-identifier-reference:
      identifier
inclusive-identifier-reference:
identifier-expression:
      identifier-reference
identifier-reference:
      exclusive-identifier-reference
      inclusive-identifier-reference
exclusive-identifier-reference:
      identifier
inclusive-identifier-reference:

      @ identifier      @ identifier

Espressione di accesso alla sezioneSection-access expression

section-access-expression:
      identifier
! identifier
section-access-expression:
      identifier
! identifier

Espressione racchiusa tra parentesiParenthesized expression

parenthesized-expression:parenthesized-expression:
      ( expression )      ( expression )

Espressione non implementataNot-implemented expression

not-implemented-expression:not-implemented-expression:
      ...      ...

Espressione invokeInvoke expression

invoke-expression:
      primary-expression
( argument-list opt )
invoke-expression:
      primary-expression
( argument-listopt )

argument-list:
      expression
      expression
, argument-list
argument-list:
      expression
      expression
, argument-list

Espressione listList expression

list-expression:list-expression:
      { item-list opt }      { item-listopt }
item-list:
      item
      item
, item-list
item:
      expression
      expression
.. expression
item-list:
      item
      item
, item-list
item:
      expression
      expression
.. expression

Espressione di recordRecord expression

record-expression:record-expression:
      [ field-listopt ]      [ field-listopt ]
field-list:
      field
      field
, field-list
field:
      field-name
= expression
field-name:
      generalized-identifier
      quoted-identifier
field-list:
      field
      field
, field-list
field:
      field-name
= expression
field-name:
      generalized-identifier
      quoted-identifier

Espressione di accesso agli elementiItem access expression

item-access-expression:
      item-selection
      optional-item-selection
item-selection:
      primary-expression
{ item-selector }
item-access-expression:
      item-selection
      optional-item-selection
item-selection:
      primary-expression
{ item-selector }

optional-item-selection:
      primary-expression
{ item-selector } ?
optional-item-selection:
      primary-expression
{ item-selector } ?

item-selector:
      expression
item-selector:
      expression

Espressioni di accesso ai campiField access expressions

field-access-expression:
      field-selection
      implicit-target-field-selection
      projection
      implicit-target-projection
field-selection:
      primary-expression field-selector
field-selector:
      required-field-selector
      optional-field-selector
required-field-selector:
field-access-expression:
      field-selection
      implicit-target-field-selection
      projection
      implicit-target-projection
field-selection:
      primary-expression field-selector
field-selector:
      required-field-selector
      optional-field-selector
required-field-selector:

      [ field-name ]      [ field-name ]
optional-field-selector:optional-field-selector:
      [ field-name ] ?      [ field-name ] ?
field-name:
      generalized-identifier
      quoted-identifier
implicit-target-field-selection:
      field-selector
projection:
      primary-expression required-projection
      primary-expression optional-projection
required-projection:
field-name:
      generalized-identifier
      quoted-identifier
implicit-target-field-selection:
      field-selector
projection:
      primary-expression required-projection
      primary-expression optional-projection
required-projection:

      [ required-selector-list ]      [ required-selector-list ]
optional-projection:optional-projection:
      [ required-selector-list ] ?      [ required-selector-list ] ?
required-selector-list:
      required-field-selector
      required-field-selector
, required-selector-list
implicit-target-projection:
      required-projection
      optional-projection
required-selector-list:
      required-field-selector
      required-field-selector
, required-selector-list
implicit-target-projection:
      required-projection
      optional-projection

Espressione di funzioneFunction expression

function-expression:function-expression:
      ( parameter-list opt ) return-type opt => function-body
function-body:
      expression
parameter-list:
      fixed-parameter-list
      fixed-parameter-list
, optional-parameter-list
      optional-parameter-list
fixed-parameter-list:
      parameter
      parameter
, fixed-parameter-list
parameter:
      parameter-name parameter-type opt
parameter-name:
      identifier
parameter-type:
      assertion
return-type:
      assertion
assertion:
      ( parameter-list opt ) return-type opt => function-body
function-body:
      expression
parameter-list:
      fixed-parameter-list
      fixed-parameter-list
, optional-parameter-list
      optional-parameter-list
fixed-parameter-list:
      parameter
      parameter
, fixed-parameter-list
parameter:
      parameter-name parameter-typeopt
parameter-name:
      identifier
parameter-type:
      assertion
return-type:
      assertion
assertion:

      as nullable-primitive-type
optional-parameter-list:
      optional-parameter
      optional-parameter
, optional-parameter-list
optional-parameter:
      as nullable-primitive-type
optional-parameter-list:
      optional-parameter
      optional-parameter
, optional-parameter-list
optional-parameter:

      optional parameter      optional parameter

Espressione eachEach expression

each-expression:each-expression:
      each each-expression-body
each-expression-body:
      function-body
      each each-expression-body
each-expression-body:
      function-body

Espressione letLet expression

let-expression:let-expression:
      let variable-list in expression
variable-list:
      variable
      variable
, variable-list
variable:
      variable-name
= expression
variable-name:
      identifier
      let variable-list in expression
variable-list:
      variable
      variable
, variable-list
variable:
      variable-name
= expression
variable-name:
      identifier

Espressione ifIf expression

if-expression:if-expression:
      if if-condition then true-expression else false-expression
if-condition:
      expression
true-expression:
      expression
false-expression:
      expression
      if if-condition then true-expression else false-expression
if-condition:
      expression
true-expression:
      expression
false-expression:
      expression

Espressione tipoType expression

type-expression:
      primary-expression
type-expression:
      primary-expression

      type primary-type
type:
      parenthesized-expression
      primary-type
primary-type:
      primitive-type
      record-type
      list-type
      function-type
      table-type
      nullable-type
primitive-type:
uno tra
      type primary-type
type:
      parenthesized-expression
      primary-type
primary-type:
      primitive-type
      record-type
      list-type
      function-type
      table-type
      nullable-type
primitive-type:
one of

      any anynonnull binary date datetime datetimezone duration function      any anynonnull binary date datetime datetimezone duration function
      list logical none null number record table text type      list logical none null number record table text type
record-type: record-type:
      [ open-record-marker ]      [ open-record-marker ]
      [ field-specification-list opt ]      [ field-specification-listopt ]
      [ field-specification-list , open-record-marker ]      [ field-specification-list , open-record-marker ]
field-specification-list:
      field-specification
      field-specification
, field-specification-list
field-specification:
field-specification-list:
      field-specification
      field-specification
, field-specification-list
field-specification:

      optionalopt field-name field-type-specification opt
field-type-specification:
      optionalopt field-name field-type-specificationopt
field-type-specification:

      = field-type
field-type:
      type
open-record-marker:
      = field-type
field-type:
      type
open-record-marker:

      ...      ...
list-type:list-type:
      { item-type }      { item-type }
item-type:
      type
function-type:
item-type:
      type
function-type:

      function ( parameter-specification-listopt ) return-type
parameter-specification-list:
      required-parameter-specification-list
      required-parameter-specification-list
, optional-parameter-specification-list
      optional-parameter-specification-list
required-parameter-specification-list:
      required-parameter-specification
      required-parameter-specification
, required-parameter-specification-list
required-parameter-specification:
      parameter-specification
optional-parameter-specification-list:
      optional-parameter-specification
      optional-parameter-specification
, optional-parameter-specification-list
optional-parameter-specification:
      function ( parameter-specification-listopt ) return-type
parameter-specification-list:
      required-parameter-specification-list
      required-parameter-specification-list
, optional-parameter-specification-list
      optional-parameter-specification-list
required-parameter-specification-list:
      required-parameter-specification
      required-parameter-specification
, required-parameter-specification-list
required-parameter-specification:
      parameter-specification
optional-parameter-specification-list:
      optional-parameter-specification
      optional-parameter-specification
, optional-parameter-specification-list
optional-parameter-specification:

      optional parameter-specification
parameter-specification:
      parameter-name parameter-type
table-type:
      optional parameter-specification
parameter-specification:
      parameter-name parameter-type
table-type:

      table row-type
row-type:
      table row-type
row-type:

      [ field-specification-list ]      [ field-specification-list ]
nullable-type:nullable-type:
      nullable type      nullable type

Espressione di generazione erroreError raising expression

error-raising-expression:error-raising-expression:
      error expression_      error expression_

Espressione di gestione erroreError handling expression

error-handling-expression:error-handling-expression:
      try protected-expression otherwise-clause opt
protected-expression:
      expression
otherwise-clause:
      try protected-expression otherwise-clauseopt
protected-expression:
      expression
otherwise-clause:

      otherwise default-expression
default-expression:
      expression
      otherwise default-expression
default-expression:
      expression

Attributi letteraliLiteral Attributes

literal-attributes:
      record-literal
record-literal:
literal-attributes:
      record-literal
record-literal:

      [ literal-field-list opt ]      [ literal-field-listopt ]
literal-field-list:
      literal-field
      literal-field
, literal-field-list
literal-field:
      field-name
= any-literal
list-literal:
literal-field-list:
      literal-field
      literal-field
, literal-field-list
literal-field:
      field-name
= any-literal
list-literal:

      { literal-item-list opt }      { literal-item-listopt }
literal-item-list:
      any-literal
      any-literal
, literal-item-list
any-literal:
      record-literal
      list-literal
      logical-literal
      number-literal
      text-literal
      null-literal
literal-item-list:
      any-literal
      any-literal
, literal-item-list
any-literal:
      record-literal
      list-literal
      logical-literal
      number-literal
      text-literal
      null-literal