Changeset: 8eed25a727a2 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8eed25a727a2
Modified Files:
        sql/server/sql_parser.y
Branch: graph1
Log Message:

Parser: reference to the edge table in CHEAPEST SUM ( )


diffs (90 lines):

diff --git a/sql/server/sql_parser.y b/sql/server/sql_parser.y
--- a/sql/server/sql_parser.y
+++ b/sql/server/sql_parser.y
@@ -301,6 +301,7 @@ int yydebug=1;
        graph_reaches_column_def
        graph_reaches_edges_table
        graph_cheapest_sum
+       graph_cheapest_sum_arg
 
 %type <type>
        data_type
@@ -338,7 +339,6 @@ int yydebug=1;
        XML_PI_target
        function_body
        aggr
-       graph_CS_opt_table_ref
 
 %type <l>
        passwd_schema
@@ -3772,51 +3772,27 @@ graph_reaches_edges_table:
                          append_list(l, $1);
                          append_symbol(l, $2);
                          $$ = _symbol_create_list(SQL_NAME, l); }
-
-
-graph_CS1_simple:
-       ':' scalar_exp { $$ = $2; }
-
-
-graph_CS2_end_part1:
-       %empty  { $$ = L(); }
-       | '.' ident { $$ = append_string(L(), $2); }
-       | '.' ident '.' ident { $$ = append_string(L(), $2), $4); }
-       ;
-
-graph_CS1_complex:
-       graph_CS2_end_part1
-
-
-graph_CS1_nonident: 
-
-graph_CS1_start: 
-       // simple case 
-       ident graph_CS1_simple {                        
-               dlist* l = L();
-               append_string(l, $1); // opt_table_name_ref
-               append_symbol(l, $2); // weight expression
-               $$ = _symbol_create_list( SQL_GRAPH_CHEAPEST_SUM, l ); 
-       }
+  ;
+
+    graph_cheapest_sum_arg:
+    ident ':' scalar_exp
+    {
+       dlist *l = L();
+       append_string(l, $1); // opt_table_name_ref
+       append_symbol(l, $3); // weight expression
+       $$ = _symbol_create_list( SQL_GRAPH_CHEAPEST_SUM, l );
+    }
+    | scalar_exp
+    {
+       dlist *l = L();
+       append_string(l, NULL);
+       append_symbol(l, $1);
+       $$ = _symbol_create_list( SQL_GRAPH_CHEAPEST_SUM, l );
+    }
+    ;
        
-       // messy case
-       | ident graph_CS1_complex {
-               dlist* l = L();
-               append_string(l, NULL); // no table reference
-               $$ = _symbol_create_list ( SQL_GRAPH_CHEAPEST_SUM, l );
-       }
-       
-//     // 
-//     | graph_CS1_nonident {  
-//             dlist* l = L();
-//             append_string(l, NULL); // no table reference
-//             append_symbol(l, $1);
-//             $$ = _symbol_create_list(SQL_GRAPH_CHEAPEST_SUM, l);
-//     }
-       ;
-
 graph_cheapest_sum:
-       CHEAPEST SUM '(' graph_CS1_start ')' { $$ = $4; }
+       CHEAPEST SUM '(' graph_cheapest_sum_arg ')' { $$ = $4; }
        ;
 
 /*
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to