DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
SqlGrammar_Keys.cs
Go to the documentation of this file.
1 //
2 // Copyright 2010-2015 Deveel
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16 
17 using System;
18 using System.Collections.Generic;
19 
20 using Irony.Parsing;
21 
22 namespace Deveel.Data.Sql.Parser {
23  partial class SqlGrammar {
24  #region Keywords
25 
26  private KeyTerm ACCOUNT;
27  private KeyTerm AFTER;
28  private KeyTerm ASC;
29  private KeyTerm BEFORE;
30  private KeyTerm BEGIN;
31  private KeyTerm BETWEEN;
32  private KeyTerm BINARY;
33  private KeyTerm BLOB;
34  private KeyTerm BOOLEAN;
35  private KeyTerm BY;
36  private KeyTerm CACHE;
37  private KeyTerm CALL;
38  private KeyTerm CALLBACK;
39  private KeyTerm CASCADE;
40  private KeyTerm CASE;
41  private KeyTerm CAST;
42  private KeyTerm CHECK;
43  private KeyTerm CONSTANT;
44  private KeyTerm CONSTRAINT;
45  private KeyTerm CREATE;
46  private KeyTerm CYCLE;
47  private KeyTerm DECLARE;
48  private KeyTerm DEFAULT;
49  private KeyTerm DELETE;
50  private KeyTerm EACH;
51  private KeyTerm END;
52  private KeyTerm ELSE;
53  private KeyTerm ELSIF;
54  private KeyTerm EXCEPTION;
55  private KeyTerm EXECUTE;
56  private KeyTerm EXISTS;
57  private KeyTerm FOR;
58  private KeyTerm FOREIGN;
59  private KeyTerm GROUPS;
60  private KeyTerm KEY;
61  private KeyTerm IDENTITY;
62  private KeyTerm IF;
63  private KeyTerm INCREMENT;
64  private KeyTerm INDEX;
65  private KeyTerm INSERT;
66  private KeyTerm LOCK;
67  private KeyTerm MAXVALUE;
68  private KeyTerm MINVALUE;
69  private KeyTerm NOT;
70  private KeyTerm NULL;
71  private KeyTerm ON;
72  private KeyTerm OR;
73  private KeyTerm PRIMARY;
74  private KeyTerm PROCEDURE;
75  private KeyTerm REFERENCES;
76  private KeyTerm REPLACE;
77  private KeyTerm ROW;
78  private KeyTerm SCHEMA;
79  private KeyTerm SEQUENCE;
80  private KeyTerm SET;
81  private KeyTerm START;
82  private KeyTerm TABLE;
83  private KeyTerm THEN;
84  private KeyTerm TRIGGER;
85  private KeyTerm TYPE;
86  private KeyTerm UPDATE;
87  private KeyTerm UNIQUE;
88  private KeyTerm UNLOCK;
89  private KeyTerm VIEW;
90  private KeyTerm WITH;
91 
92  #endregion
93 
94  protected override void ReservedWords() {
95  var reserved = new List<string> {
96  "ABSOLUTE",
97  "ACTION",
98  "ADD",
99  "AFTER",
100  "ALL",
101  "ALTER",
102  "AND",
103  "ANY",
104  "ARRAY",
105  "AS",
106  ASC.Text,
107  BEFORE.Text,
108  BEGIN.Text,
109  BETWEEN.Text,
110  BINARY.Text,
111  BLOB.Text,
112  BOOLEAN.Text,
113  BY.Text,
114  CALL.Text,
115  CASCADE.Text,
116  CASE.Text,
117  CAST.Text,
118  INSERT.Text,
119  SEQUENCE.Text,
120  TRIGGER.Text
121  };
122 
123  MarkReservedWords(reserved.ToArray());
124  }
125 
126  protected override void Keywords() {
127  ACCOUNT = ToTerm("ACCOUNT");
128  AFTER = ToTerm("AFTER");
129  ASC = ToTerm("ASC");
130  BEFORE = ToTerm("BEFORE");
131  BEGIN = ToTerm("BEGIN");
132  BETWEEN = ToTerm("BETWEEN");
133  BINARY = ToTerm("BINARY");
134  BLOB = ToTerm("BLOB");
135  BOOLEAN = ToTerm("BOOLEAN");
136  BY = ToTerm("BY");
137  CACHE = ToTerm("CACHE");
138  CALL = ToTerm("CALL");
139  CALLBACK = ToTerm("CALLBACK");
140  CASCADE = ToTerm("CASCADE");
141  CASE = ToTerm("CASE");
142  CAST = ToTerm("CAST");
143  CHECK = ToTerm("CHECK");
144  CONSTANT = ToTerm("CONSTANT");
145  CONSTRAINT = ToTerm("CONSTRAINT");
146  CREATE = ToTerm("CREATE");
147  CYCLE = ToTerm("CYCLE");
148  DECLARE = ToTerm("DECLARE");
149  DELETE = ToTerm("DELETE");
150  DEFAULT = ToTerm("DEFAULT");
151  EACH = ToTerm("EACH");
152  END = ToTerm("END");
153  ELSE = ToTerm("ELSE");
154  ELSIF = ToTerm("ELSIF");
155  EXCEPTION = ToTerm("EXCEPTION");
156  EXECUTE = ToTerm("EXECUTE");
157  EXISTS = ToTerm("EXISTS");
158  FOR = ToTerm("FOR");
159  FOREIGN = ToTerm("FOREIGN");
160  GROUPS = ToTerm("GROUPS");
161  KEY = ToTerm("KEY");
162  IDENTITY = ToTerm("IDENTITY");
163  IF = ToTerm("IF");
164  INCREMENT = ToTerm("INCREMENT");
165  INDEX = ToTerm("INDEX");
166  INSERT = ToTerm("INSERT");
167  LOCK = ToTerm("LOCK");
168  MAXVALUE = ToTerm("MAXVALUE");
169  MINVALUE = ToTerm("MINVALUE");
170  NOT = ToTerm("NOT");
171  NULL = ToTerm("NULL");
172  ON = ToTerm("ON");
173  OR = ToTerm("OR");
174  PRIMARY = ToTerm("PRIMARY");
175  PROCEDURE = ToTerm("PROCEDURE");
176  REPLACE = ToTerm("REPLACE");
177  REFERENCES = ToTerm("REFERENCES");
178  ROW = ToTerm("ROW");
179  SCHEMA = ToTerm("SCHEMA");
180  SEQUENCE = ToTerm("SEQUENCE");
181  SET = ToTerm("SET");
182  START = ToTerm("START");
183  TABLE = ToTerm("TABLE");
184  THEN = ToTerm("THEN");
185  TRIGGER = ToTerm("TRIGGER");
186  TYPE = ToTerm("TYPE");
187  UPDATE = ToTerm("UPDATE");
188  UNIQUE = ToTerm("UNIQUE");
189  UNLOCK = ToTerm("UNLOCK");
190  VIEW = ToTerm("VIEW");
191  WITH = ToTerm("WITH");
192  }
193  }
194 }