Grammar extracted by Vadim Zaytsev, see the Grammar Zoo entry for details: §wip/atl/SQLDDL/extracted
Source used for this grammar: Marcos Didonet Del Fabro, SQLDDL 1.0, SQLDDL.ecore
, 2006/08/28
Boolean
, Integer
, String
, LocatedElement
, NamedElement
, Database
, Table
, TableElement
, Column
, Key
, SimpleKey
, PrimaryKey
, ForeignKey
, Type
, Parameter
, Value
, IntegerVal
, NullVal
, StringVal
), 0 root (—), 1 top (LocatedElement
), 0 bottom (—).[tables]
, [database]
, [referencedBy]
2, [elements]
, [parameters]
, [name]
3, [type]
, [canBeNull]
, [default]
, [keys]
, [isUnique]
2, [columns]
2, [referencedTable]
, [referencedColumns]
, [length]
, [isUnsigned]
, [table]
, [value]
3.Boolean ::= "true" "false"
Integer ::= integer
String ::= string
LocatedElement ::= NamedElement
LocatedElement ::= TableElement
LocatedElement ::= Value
NamedElement ::= Database
NamedElement ::= Table
NamedElement ::= Type
NamedElement ::= Parameter
Database ::=
[tables]::Table
Table ::= [database]::Database [referencedBy]::ForeignKey[elements]::TableElement [parameters]::Parameter
TableElement ::= Column
TableElement ::= Key
Column ::= [referencedBy]::ForeignKey[name]::String [type]::Type [canBeNull]::Boolean [default]::Value [keys]::Key
Key ::= SimpleKey
Key ::= PrimaryKey
Key ::= ForeignKey
SimpleKey ::=
[isUnique]::Boolean [name]::String [columns]::Column
PrimaryKey ::=
[isUnique]::Boolean [name]::String [columns]::Column
ForeignKey ::=
[referencedTable]::Table [referencedColumns]::Column
Type ::= [length]::Integer [isUnsigned]::Boolean
Parameter ::= [table]::Table [value]::Value
Value ::= IntegerVal
Value ::= NullVal
Value ::= StringVal
IntegerVal ::= [value]::Integer
NullVal ::= ε
StringVal ::= [value]::String