-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMongbBNF
100 lines (46 loc) · 2.5 KB
/
MongbBNF
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<statement> ::= <db-token> <db-aux> || <use-token> <dbName-token>
<db-aux> ::= . <collection_idf> . <function> | epsilon
<function> ::= insert_token ( <request> ) | find_token ( <request> ) | remove_token ( <request> ) | update_token ( <pars_update> )
<pars_update> ::= <request> , <set>
<setaux> ::= <clause_list> } | $set : <request> }
<set> ::= { <setaux>
<request> ::= { <clause-list> } | epsilon
<clause-list> ::= <clause> <clause-inter>
<clause-inter> ::= <comma-token> <clause-list> | epsilon
<clause> ::= <expression-logic-clause> | <leaf-clause> | <text-clause> | <comment-clause>
<comment-clause> ::= { <comment-operator> : <string> }
<text-clause> ::= { <text-operator> : { <search-operator> : <string> } } |
{ <text-operator> : { <search-operator> : <string> , <language-operator> : <language> } }
<expression-logic-clause> ::= <logic-operator> : [ <expression-list> ]
<expression-list> ::= <request> <expression-inter>
<expression-inter> ::= , <expression-list> | epsilon
<logic-operator> ::= <or-operator> |
<nor-operator>
<leaf-clause> ::= <key> : <value>
<key> ::= <id-token>
<value> ::= <operator-object> | <leaf-value>
<leaf-value> ::= <string_token> | <number-token> | <array> | { <aux>
<aux> ::= <operator-object> || <document>
<operator-object> ::= <operator-list> }
<operator-list> ::= <operators> <operator-inter>
<operator-inter> ::= , <key> : { <operator-list> | epsilon
<operators> ::= <value-operator> : <leaf-value> } | <array-operator> : [ <leaf-value-list> ] | <not-operator> : <operator> | <elemmatch-operator> : <expression> }
<value-operator> ::= <gt-operator> |
<gte-operator> |
<lt-operator> |
<lte-operator> |
<eq-operator> |
<ne-operator> |
<type-operator> |
<size-operator> |
<regex-operator> |
<exists-operator>
<document> ::= <attributs-list> }
<comment-clause> ::= { <comment-operator> : <string> }
<array-operator> ::= <in-operator> | <nin-operator>
<attributs-list> ::= <attributs> <attributs-inter>
<attributs-inter> ::= , <attributs-list> | epsilon
<attributs> ::= <key> : <leaf-value>
<array> ::= [ <leaf-value-list> ]
<leaf-value-list> ::= <leaf-value> <leaf-inter>
<leaf-inter> ::= , <leaf-value-list> | epsilon