Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Tweaks to tokenizer requirements. Add an outline for syntax requirements. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
f2f70f988e1dc401d1e69c173a0bd753 |
User & Date: | drh 2008-08-07 01:30:44.000 |
Context
2008-08-07
| ||
11:33 | Merge changes back into a single branch. (check-in: 420b6c5ef7 user: drh tags: trunk) | |
01:30 | Tweaks to tokenizer requirements. Add an outline for syntax requirements. (check-in: f2f70f988e user: drh tags: trunk) | |
2008-08-06
| ||
22:02 | Add the tokenizer requirements file. Updates to system requirements. (check-in: 92de1a1982 user: drh tags: trunk) | |
Changes
Added pages/syntax.in.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 | <title>SQLite SQL Syntax Requirements</title> <h1>SQLite Syntax Requirements</h1> <h2>1.0 Transaction Control</h2> <h3>1.1 BEGIN</h3> <h3>1.2 COMMIT</h3> <h3>1.3 ROLLBACK</h3> <h2>2.0 Data Definition Language (DDL)</h2> <h3>2.1 CREATE TABLE</h3> <h3>2.2 DROP TABLE</h3> <h3>2.3 CREATE INDEX</h3> <h3>2.4 DROP INDEX</h3> <h3>2.5 CREATE VIEW</h3> <h3>2.6 DROP VIEW</h3> <h3>2.7 CREATE TRIGGER</h3> <h3>2.8 DROP TRIGGER</h3> <h3>2.9 CREATE VIRTUAL TABLE</h3> <h3>2.10 ALTER TABLE</h3> <h4>2.11 ALTER TABLE RENAME</h4> <h4>2.12 ALTER TABLE ADD COLUMN</h4> <h2>3.0 Data Manipulation Language (DML)</h2> <h3>3.1 INSERT</h3> <h4>3.1.1 INSERT VALUE</h4> <h4>3.1.2 INSERT SELECT</h4> <h3>3.2 DELETE</h3> <h3>3.3 UPDATE</h3> <h3>3.4 SELECT</h3> <h2>4.0 Other Language Elements</h2> <h3>4.1 VACUUM</h3> <h3>4.2 ANALYZE</h3> <h3>4.3 REINDEX</h3> <h3>4.4 PRAGMA</h3> <h3>4.5 ATTACH</h3> <h3>4.6 DETACH</h3> <h3>4.7 EXPLAIN</h3> <h3>4.8 EXPLAIN QUERY PLAN</h3> <h2>5.0 Common Language Subelements</h2> <h3>5.1 Expressions</h3> <h3>5.2 Functions</h3> <h4>5.2.1 Core Scalar Functions</h4> <h4>5.2.2 Date and Time Functions</h4> <h4>5.2.3 Aggregate Functions</h4> |
Changes to pages/tokenreq.in.
︙ | ︙ | |||
77 78 79 80 81 82 83 84 85 86 87 88 89 90 | The standard practice in SQL, as with most context-free grammar based programming languages, is to resolve ambiguities in tokenizing by selecting the option that results in the longest tokens. } { At each step in the SQL tokenization process, SQLite shall extract the longest possible token from the remaining input text. } </tcl> <h3>Whitespace tokens</h3> <tcl> tokenreq H41100 {} { Whitespace has the usual definition. | > > > > > > > > > > > > > > > > > > > > > > > > > > | 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | The standard practice in SQL, as with most context-free grammar based programming languages, is to resolve ambiguities in tokenizing by selecting the option that results in the longest tokens. } { At each step in the SQL tokenization process, SQLite shall extract the longest possible token from the remaining input text. } tokenreq H41030 {} { The tokenizer recognizes tokens one by one and passes them on to the parser. Except whitespace is ignored. The only use for whitespace is as a separator between tokens. } { The tokenizer shall pass each non-WHITESPACE token seen on to the parser in the order in which the tokens are seen. } tokenreq H41040 {} { The tokenizer appends a semicolon to the end of input if necessary. This ensures that every SQL statement is terminated by a semicolon. } { When the tokenizer reaches the end of input where the last token sent to the parser was not a SEMI token, it shall immediately send a SEMI token to the parser. } tokenreq H41050 {} { An unrecognized token generates an immediate error and aborts the parse. } { When the tokenizer encounters text that is not a valid token, it shall cause the [sqlite3_prepare()], [sqlite3_prepare16()], [sqlite3_prepare_v2()], or higher-level interface call that provoked the SQL parse to fail. } </tcl> <h3>Whitespace tokens</h3> <tcl> tokenreq H41100 {} { Whitespace has the usual definition. |
︙ | ︙ | |||
239 240 241 242 243 244 245 | } tokenreq H42030 {} {} { SQLite shall recognize as a VARIABLE token the shape-sign (u0023) followed by a parameter name that does not begin with a NUMERIC character. } | | | > | | 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 | } tokenreq H42030 {} {} { SQLite shall recognize as a VARIABLE token the shape-sign (u0023) followed by a parameter name that does not begin with a NUMERIC character. } tokenreq L42040 {} { The REGISTER token is a special token used internally. It does not appear as part of the published user interface. Hence, the following is a low-level requirement: } { SQLite shall recognize as a REGISTER token a sharp-sign (u0023) followed by one or more NUMERIC characters. } </tcl> <h3>Operator tokens</h3> |
︙ | ︙ |