Permalink
Browse files

Whitespace for JOIN op

  • Loading branch information...
1 parent 49b9024 commit f9bb82a8d94535f4afc19abfb29461214f7bb7a7 @steveyen steveyen committed Apr 17, 2011
Showing with 10 additions and 6 deletions.
  1. +10 −6 sql.pegjs
View
@@ -244,7 +244,7 @@ result_column =
/ ( ( table_name dot )? star ) ) )
join_source =
- ( single_source ( ( join_op single_source join_constraint )+ )? )
+ ( single_source ( join_op single_source join_constraint )* )
single_source =
( whitespace
@@ -263,14 +263,18 @@ single_source =
) )
join_op =
- ( whitespace
- ( comma
- / ( NATURAL ?
- ( ( LEFT ( OUTER ) ? ) / INNER / CROSS )? JOIN ) ) )
+ ( ( ( NATURAL ?
+ ( ( LEFT ( OUTER )? )
+ / INNER
+ / CROSS )?
+ JOIN )
+ / ( whitespace comma ) ) )
join_constraint =
( ( ( ON expr )
- / ( USING lparen ( column_name comma )+ rparen ) )? )
+ / ( USING whitespace lparen
+ ( whitespace column_name ( whitespace comma whitespace column_name )* )
+ whitespace rparen ) )? )
ordering_term =
( whitespace

0 comments on commit f9bb82a

Please sign in to comment.