Skip to content
This repository was archived by the owner on Jul 15, 2021. It is now read-only.

Commit 6253875

Browse files
committed
comment rules no longer allow you to put a space between the two symbols at the start and/or end of a comment. added some extra helper rules to CREATE statement rules to help the tracer avoid traversing the wrong create statement type. characters in identifiers now includes dollar sign and no longer includes dash for unquoted values. since SQLite itself is tolerant of this behavior, although it is non-standard, parser allows single-quoted string literals to be interpreted as aliases. refs #2
1 parent f2adb07 commit 6253875

File tree

12 files changed

+8963
-6040
lines changed

12 files changed

+8963
-6040
lines changed

CHANGELOG.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,27 @@ All notable changes to this project will be documented in this file.
88
### Changed
99
- added a bunch of missing descriptions for grammar rules in `grammar.pegjs`
1010
- make sure that a `description` is not repeated in smart error message
11-
12-
### Notes
13-
- `comment` rules should not use `sym_*` rules since you should not be able to put a space between the two symbols at the start and/or end of a comment.
11+
- `comment` rules no longer allow you to put a space between the two symbols at the start and/or end of a comment.
1412

1513
```
1614
SELECT * - - not valid but is being accepted
1715
```
1816

17+
- added some extra helper rules to `CREATE` statement rules to help the tracer avoid traversing the wrong create statement type
18+
- allowed characters in identifiers now includes dollar sign `$` and no longer includes dash `-` for unquoted values
19+
- Since `SQLite` itself is tolerant of this behavior, although it is non-standard, parser allows single-quoted string literals to be interpreted as aliases.
20+
21+
``` sql
22+
select
23+
'hat'.*,
24+
COUNT(*) as 'pants'
25+
from
26+
hats 'hat'
27+
```
28+
29+
### Notes
30+
- there is way too much magic/nonsense in the `smartError()` method of `Tracer`. need to come up with an alternative approach to getting the right information for syntax errors.
31+
1932
## [v0.9.1] - 2015-07-05
2033
### Changed
2134
- removed `private` flag in `package.json` ahead of first published release

TODO.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292

9393
- [x] Need to display correct error location when there are multiple statements in the input SQL
9494
- [ ] **[In Progress]** Finish standardizing AST format across all types of statements
95-
- [ ] `comment` rules should not use `sym_*` rules since you should not be able to put a space between the two symbols at the start and/or end of a comment.
95+
- [x] `comment` rules should not use `sym_*` rules since you should not be able to put a space between the two symbols at the start and/or end of a comment.
9696

9797
```
9898
SELECT * - - not valid but is being accepted

0 commit comments

Comments
 (0)