Added user defined attribute declarations.

This is such that if you mis-spell an attribute, it doesn't get
silently ignored.

Bug: 18294628
Change-Id: I10013f5b2a21048b7daba2e9410678f528e09761
Tested: on Linux.
This commit is contained in:
Wouter van Oortmerssen
2014-11-17 17:27:26 -08:00
parent 0ce53c96c3
commit 0952143971
7 changed files with 45 additions and 14 deletions

View File

@@ -1,12 +1,15 @@
# Formal Grammar of the schema language
schema = include*
( namespace\_decl | type\_decl | enum\_decl | root\_decl | object )*
( namespace\_decl | type\_decl | enum\_decl | root\_decl |
attribute\_decl | object )*
include = `include` string\_constant `;`
namespace\_decl = `namespace` ident ( `.` ident )* `;`
attribute\_decl = `attribute` string\_constant `;`
type\_decl = ( `table` | `struct` ) ident metadata `{` field\_decl+ `}`
enum\_decl = ( `enum` | `union` ) ident [ `:` type ] metadata `{` commasep(