Jaa


Yhdistetty kielioppi

Sanastollinen kielioppi

lexical-unit:
      lexical-elementsopt
lexical-elements:
      lexical-element lexical-elementsopt
lexical-element:
      whitespace
      rahake
      kommentti

Tyhjä tila

Välilyönnit:
      Mikä tahansa merkki, jolla on Unicode-luokka Zs
      Vaakasuuntaisen sarkaimen merkki (U+0009)
      Pystysuuntaisen sarkaimen merkki (U+000B)
      Lomakkeen syöttömerkki (U+000C)
      Rivinvaihdon merkki (U+000D) ja sen jälkeen rivinsyöttömerkki (U+000A) new-line-character
new-line-character:

      Rivinvaihdon merkki (U+000D)
      Rivinsyötön merkki (U+000A)
      Seuraavan rivin merkki (U+0085)
      Rivierottimen merkki (U+2028)
      Kappale-erottimen merkki (U+2029)

Kommentti

kommentti:
      yksirivinen kommentti
      delimited-comment

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

      Mikä tahansa Unicode-merkki paitsi new-line-character
delimited-comment:

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

      /
      asterisksopt not-slash-or-asterisk
Tähti:

      *tähtiävalitsemalla
not-slash-or-asterisk:

      Mikä tahansa Unicode-merkki paitsi * tai /

Rahakkeita

rahake:
      tunniste
      avainsana
      kirjaimellinen
      operator-or-punctuator

Merkkien tilanvaihdot

character-escape-sequence:
      #( 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:

      cr
      lf
      tab
escape-escape:
      #

Literaalit

kirjaimellinen:
      logical-literal
      number-literal
      text-literal
      null-literal
      sanatarkka–literaali
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
hexadecimal-number-literal:
      0x heksanumerot
      0X heksanumerot
hex-digits:
      hex-digit hex-digitsopt
hex-digit:
joku seuraavista
      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-partopt
      . decimal-digits exponent-partopt
      decimal-digits exponent-partopt
exponent-part:

      e signopt decimal-digits
      E signopt decimal-digits
sign:
joku seuraavista
      + -
text-literal:
      " text-literal-charactersopt "
text-literal-characters:
      text-literal-character text-literal-charactersopt
text-literal-character:
      yksitekstinen-merkki
      character-escape-sequence
      double-quote-escape-sequence
single-text-character:

      Kaikki merkit paitsi " (U+0022) tai # (U+0023) minkä jälkeen ( (U+0028)
double-quote-escape-sequence:
      "" (U+0022, U+0022)
null-literal:
      null
verbatim-literal:
      #!"text-literal-charactersopt "

Tunnisteet

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

      avainsana tai tunniste , joka ei ole avainsana
keyword-or-identifier:
      letter-character
      alaviiva-merkki
      identifier-start-character identifier-part-characters
identifier-start-character:
      letter-character
      alaviiva-merkki
identifier-part-characters:
      identifier-part-character identifier-part-charactersopt
identifier-part-character:
      letter-character
      decimal-digit-character
      alaviiva-merkki
      connecting-character
      yhdistä-merkki
      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)
underscore-character:
      _ (U+005F)
letter-character:_
      Unicode-merkki luokissa Lu, Ll, Lt, Lm, Lo tai Nl
combining-character:
      Unicode-merkki luokissa Mn tai Mc
decimal-digit-character:
      Unicode-merkki luokassa Nd
connecting-character:
      Unicode-merkki luokassa Pc
formatting-character:
      Unicode-merkki luokassa Cf
quoted-identifier:
      #" text-literal-charactersopt "

Avainsanat ja esimääritetyt tunnisteet

Ennalta määritettyjä tunnisteita ja avainsanoja ei voi määrittää uudelleen. Lainausmerkeissä olevaa tunnistetta voidaan käyttää käsittelemään tunnisteita, jotka muutoin ovat ristiriidassa esimääritettyjen tunnisteiden tai avainsanojen kanssa.

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

Operaattorit ja erottimen

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

Syntaktinen kielioppi

Tiedostot

asiakirja:
      section-document
      expression-document

Osan asiakirjat

section-document:
      osa
osa:
      literal-attributesopt
sectionsection-name;section-members opt
section-name:
      tunniste
section-members:
      section-member section-membersopt
section-member:
      literal-attributesopt sharedopt section-member-name
= expression ;
section-member-name:
      tunniste

Lausekeasiakirjat

Lausekkeet

expression-document:
      lauseke
lauseke:
      logical-or-expression
each-expression
      function-expression
      let-expression
      if-expression
      virheiden lisäämisen lauseke
      error-handling-expression

Loogiset lausekkeet

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

Is-lauseke

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

      nullableopt primitive-type

As-lauseke

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

Yhtäläisyyslauseke

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

Relaatiolauseke

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

Aritmeettiset lausekkeet

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

Metatietolauseke

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

Yksiarvoinen lauseke

unary-expression:
      type-expression

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

Ensisijainen lauseke

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

Literaalilauseke

literal-expression:
      kirjaimellinen

Tunnistelauseke

identifier-expression:
      tunnisteviittaus
identifier-reference:
      exclusive-identifier-reference
      inclusive-identifier-reference
exclusive-identifier-reference:
      tunniste
inclusive-identifier-reference:

      @ tunniste

Osakäyttöoikeuslauseke

section-access-expression:
      tunniste
! tunniste

Sulkeiden suluissa ollut lauseke

parenthesized-expression:
      ( lauseke )

Ei toteutettu lauseke

not-implemented-expression:
      ...

Kutsulauseke

invoke-expression:
      primary-expression
( argument-listopt )
argument-list:
      lauseke
      expression
, argument-list

Luettelolauseke

list-expression:
      { item-listopt }
item-list:
      kohta
      item item-list
,
kohta:
      lauseke
      lausekelauseke
..

Tietuelauseke

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

Kohteen käyttölauseke

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

Kentän käyttölausekkeet

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

      [ field-name ]
optional-field-selector:
      [ field-name ] ?
implicit-target-field-selection:
      field-selector
projektio:
      primary-expression required-projection
      primary-expression optional-projection
required-projection:_
      [required-selector-list ]
optional-projection:
      [required-selector-list ] ?
required-selector-list:
      required-field-selector
      required-field-selector
, required-selector-list
implicit-target-projection:
      required-projection
      optional-projection

Funktiolauseke

function-expression:
      ( parameter-listopt)return-typeopt=>function-body
function-body:
      lauseke
parameter-list:
      fixed-parameter-list
      fixed-parameter-list
, optional-parameter-list
      optional-parameter-list
fixed-parameter-list:
      parametri
      parameter
, fixed-parameter-list
parametri:
      parameter-name primitive-parameter-typeopt
parameter-name:
      tunniste
primitive-parameter-type:
      primitive-assertion
return-type:
      primitive-assertion
primitive-assertion:

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

      optional parametri

Jokainen lauseke

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

Let-lauseke

let-expression:
      let variable-list-lausekein
variable-list:
      muuttuja
      variable variable-list
,
muuttuja:
      variable-name-lauseke
=
variable-name:
      tunniste

If-lauseke

if-expression:
      ifjos-ehtothentrue-expressionelsefalse-expression
if-condition:
      lauseke
true-expression:
      lauseke
false-expression:
      lauseke

Tyyppilauseke

type-expression:
      primary-expression

      type primary-type
tyyppi:
      primary-expression
      primary-type
primary-type:
      primitive-type
      record-type
      list-type
      function-type
      table-type
      nullable-type
primitive-type:
joku seuraavista
      any anynonnull binary date datetime datetimezone duration function
      list logical none null number record table text time type
record-type:
      [ open-record-marker ]
      [ field-specification-listopt ]
      [ field-specification-list , open-record-marker ]
field-specification-list:
      field-specification
      field-specification
, field-specification-list
field-specification:

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

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

      ...
list-type:
      { item-type }
item-type:
      tyyppi
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:

      optionalparameter-specification
parameter-specification:
      parameter-name parameter-type
parameter-type:
      assertion
väite:

      astyyppi
table-type:

      table row-type
row-type:

      [ field-specification-listopt ]
nullable-type:
      nullable tyyppi

Virheen nostaminen -lauseke

virhe-raising-expression:
      error lauseke_

Virheenkäsittelylauseke

error-handling-expression:
      tryprotected-expression error-handleropt
protected-expression:
      lauseke
error-handler:
      otherwise-clause
      catch-clause
otherwise-clause:

      otherwisedefault-expression
default-expression:
      lauseke
catch-clause:
      catchcatch-function
catch-function:
      (parameter-nameopt=>) function-body

Literaalimääritteet

literal-attributes:
      record-literal
record-literal:

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

      {literal-item-listopt }
literal-item-list:
      any-literal (mikä tahansa literaali)
      any-literal
, literal-item-list
any-literal:
      record-literal
      list-literal
      logical-literal
      number-literal
      text-literal
      null-literal