vsql_parser 0.2 → 0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/vsql_parser.treetop +8 -4
  2. metadata +10 -10
@@ -3,7 +3,7 @@ grammar VSql
3
3
  rule query
4
4
  space*
5
5
  select_statement
6
- (space from_statement (space join_statement)*
6
+ (space from_statement
7
7
  (space where_statement)?
8
8
  (space group_by_statement)?
9
9
  (space having_statement)?
@@ -121,13 +121,17 @@ grammar VSql
121
121
  end
122
122
 
123
123
  rule primitive_literal
124
- interval_literal / numeric_literal / string_literal / date_literal
124
+ interval_literal / numeric_literal / string_literal / date_literal / ts_literal
125
125
  end
126
126
 
127
127
  rule interval_literal
128
128
  'interval' space "'" [\w ]+ "'"
129
129
  end
130
130
 
131
+ rule ts_literal
132
+ '{ts' space+ "'" [^\'\}]+ "'}"
133
+ end
134
+
131
135
  rule date_literal
132
136
  '{d' space+ "'" [^\'\}]+ "'}"
133
137
  end
@@ -151,7 +155,7 @@ grammar VSql
151
155
  end
152
156
 
153
157
  rule operator
154
- [+\-/=\|><!]+
158
+ [+\-\*/=\|><!]+
155
159
  /
156
160
  ('is not' / 'is' / 'like' / 'between' / 'and' / 'or') &space
157
161
  end
@@ -188,7 +192,7 @@ grammar VSql
188
192
  end
189
193
 
190
194
  rule from_statement
191
- 'from' space+ from_expression (expression_separator from_expression)* <FromStatement>
195
+ 'from' space+ from_expression (space join_statement / expression_separator from_expression)* <FromStatement>
192
196
  end
193
197
 
194
198
  rule from_expression
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vsql_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.2'
4
+ version: '0.3'
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-09-04 00:00:00.000000000Z
12
+ date: 2013-11-10 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: treetop
16
- requirement: &70201796873120 !ruby/object:Gem::Requirement
16
+ requirement: &70108659858580 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '1.4'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70201796873120
24
+ version_requirements: *70108659858580
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: ruby-debug19
27
- requirement: &70201796872740 !ruby/object:Gem::Requirement
27
+ requirement: &70108659858200 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70201796872740
35
+ version_requirements: *70108659858200
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rspec
38
- requirement: &70201796872140 !ruby/object:Gem::Requirement
38
+ requirement: &70108659857620 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - =
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 2.10.0
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70201796872140
46
+ version_requirements: *70108659857620
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: pry
49
- requirement: &70201796871700 !ruby/object:Gem::Requirement
49
+ requirement: &70108659857200 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70201796871700
57
+ version_requirements: *70108659857200
58
58
  description: Provides treetop grammar for Vertica SQL. (Most likely works with Postgres
59
59
  SQL as well)
60
60
  email: