NAME
Muldis::DB::Language::Grammar - The string representation format of Muldis D
VERSION
This document is Muldis::DB::Language::Grammar version 0.2.0.
PREFACE
This document is part of the Muldis D language specification, whose root document is Muldis::DB::Language; you should read that root document before you read this one, which provides subservient details.
DESCRIPTION
This document outlines the grammer of Concrete Muldis D. This grammar is extremely simple such that any program or routine is simply a tuple literal, which is composed of relation and tuple and scalar literals. Whether or not these literals are valid is up to the Abstract Muldis D compiler, whose input is the AST resulting from parsing Concrete Muldis D.
This documentation is pending.
GRAMMAR OF CONCRETE MULDIS D
Note that the following is just illustrative and isn't meant to conform to any common grammar specifying formats. It should become formalized later.
start
= literal
;
literal
= bool
| order
| int
| blob
| text
| short_name
| long_name
| tuple
| relation
| set
| maybe
| seq
| bag
;
bool
= q(Bool:default)
| q(Bool:false)
| q(Bool:true)
;
order
= q(Order:default)
| q(Order:increase)
| q(Order:same)
| q(Order:decrease)
;
int
= q(Int:default)
| q(Int:) (q(2)..q(36)) q(:') /(0|-?[1-9A-Z][0-9A-Z]*)/ q(')
;
blob
= q(Blob:default)
| q(Blob:2:') /[0-1]*/ q(')
| q(Blob:16:') /[0-9A-F]*/ q(')
;
text
= q(Text:default)
| q(Text:') text_data q(')
;
text_data
= /(\\b|\\p|\\s|\\d|[^\\.'"])*/
;
short_name
= q(ShortName:default)
| /[\w_]+/
| q(") text_data q(")
;
long_name
= q(LongName:default)
| /[\w_]+/ long_name_e1
| q(") text_data long_name_e2 q(")
;
long_name_e1
= q(.) /[\w_]+/
| q(.) /[\w_]+/ long_name_e1
;
long_name_e2
= q(.) text_data
| q(.) text_data long_name_e2
;
tuple
= q(Tuple:default)
| q(Tuple:d0)
| q(Tuple:{) ws heading ws q(})
| q(Tuple:{) ws heading list_sep tuple_body ws q(})
;
relation
= q(Relation:default)
| q(Relation:d0c0)
| q(Relation:d0c1)
| q(Relation:{) ws heading list_sep relation_body ws q(})
;
set
= q(Set:default)
| q(Set:{) ws type_invo list_sep set_body ws q(})
;
maybe
= q(Maybe:default)
| q(Maybe:{) ws type_invo list_sep maybe_body ws q(})
;
seq
= q(Seq:default)
| q(Seq:{) ws type_invo list_sep seq_body ws q(})
;
bag
= q(Bag:default)
| q(Bag:{) ws type_invo list_sep bag_body ws q(})
;
ws
= /\S+/
;
list_sep
= q(,) ws
;
heading
= ...
type_invo
= ...
tuple_body
= ...
relation_body
= ...
This documentation is pending.
SEE ALSO
Go to Muldis::DB for the majority of distribution-internal references, and Muldis::DB::SeeAlso for the majority of distribution-external references.
AUTHOR
Darren Duncan (perl@DarrenDuncan.net
)
LICENSE AND COPYRIGHT
This file is part of the Muldis::DB framework.
Muldis::DB is Copyright © 2002-2007, Darren Duncan.
See the LICENSE AND COPYRIGHT of Muldis::DB for details.
ACKNOWLEDGEMENTS
The ACKNOWLEDGEMENTS in Muldis::DB apply to this file too.