diff --git a/docs/html/md__grammar.html b/docs/html/md__grammar.html index 33d6b8c1540..7431c6dcf8c 100644 --- a/docs/html/md__grammar.html +++ b/docs/html/md__grammar.html @@ -5,7 +5,7 @@ -FlatBuffers: Formal Grammar of the schema language +FlatBuffers: Grammar of the schema language @@ -55,7 +55,7 @@
-
Formal Grammar of the schema language
+
Grammar of the schema language

schema = include* ( namespace_decl | type_decl | enum_decl | root_decl | file_extension_decl | file_identifier_decl | attribute_decl | object )*

@@ -68,13 +68,16 @@

field_decl = ident : type [ = scalar ] metadata ;

type = bool | byte | ubyte | short | ushort | int | uint | float | long | ulong | double | string | [ type ] | ident

enumval_decl = ident [ = integer_constant ]

-

metadata = [ ( commasep( ident [ : scalar ] ) ) ]

-

scalar = integer_constant | float_constant | true | false

+

metadata = [ ( commasep( ident [ : single_value ] ) ) ]

+

scalar = integer_constant | float_constant

object = { commasep( ident : value ) }

-

value = scalar | object | string_constant | [ commasep( value ) ]

+

single_value = scalar | string_constant

+

value = single_value | object | [ commasep( value ) ]

commasep(x) = [ x ( , x )* ]

file_extension_decl = file_extension string_constant ;

-

file_identifier_decl = file_identifier string_constant ;

+

file_identifier_decl = file_identifier string_constant ;

+

integer_constant = -?[0-9]+ | true | false

+

float_constant = -?[0-9]+.[0-9]+((e|E)(+|-)?[0-9]+)?

diff --git a/docs/html/navtree.js b/docs/html/navtree.js index 58cf1e6c586..58fba48aba6 100644 --- a/docs/html/navtree.js +++ b/docs/html/navtree.js @@ -11,7 +11,7 @@ var NAVTREE = [ "Benchmarks", "md__benchmarks.html", null ], [ "FlatBuffers white paper", "md__white_paper.html", null ], [ "FlatBuffer Internals", "md__internals.html", null ], - [ "Formal Grammar of the schema language", "md__grammar.html", null ] + [ "Grammar of the schema language", "md__grammar.html", null ] ] ] ]; diff --git a/docs/html/pages.html b/docs/html/pages.html index 69d49a3b8ab..cbbe8464fd8 100644 --- a/docs/html/pages.html +++ b/docs/html/pages.html @@ -70,7 +70,7 @@  Benchmarks  FlatBuffers white paper  FlatBuffer Internals - Formal Grammar of the schema language + Grammar of the schema language diff --git a/docs/source/Grammar.md b/docs/source/Grammar.md index cafc05487c7..bcc5f7496f6 100755 --- a/docs/source/Grammar.md +++ b/docs/source/Grammar.md @@ -1,4 +1,4 @@ -# Formal Grammar of the schema language +# Grammar of the schema language schema = include* ( namespace\_decl | type\_decl | enum\_decl | root\_decl | @@ -26,13 +26,15 @@ type = `bool` | `byte` | `ubyte` | `short` | `ushort` | `int` | `uint` | enumval\_decl = ident [ `=` integer\_constant ] -metadata = [ `(` commasep( ident [ `:` scalar ] ) `)` ] +metadata = [ `(` commasep( ident [ `:` single\_value ] ) `)` ] -scalar = integer\_constant | float\_constant | `true` | `false` +scalar = integer\_constant | float\_constant object = { commasep( ident `:` value ) } -value = scalar | object | string\_constant | `[` commasep( value ) `]` +single\_value = scalar | string\_constant + +value = single\_value | object | `[` commasep( value ) `]` commasep(x) = [ x ( `,` x )\* ] @@ -40,3 +42,6 @@ file_extension_decl = `file_extension` string\_constant `;` file_identifier_decl = `file_identifier` string\_constant `;` +integer\_constant = -?[0-9]+ | `true` | `false` + +float\_constant = -?[0-9]+.[0-9]+((e|E)(+|-)?[0-9]+)?