+ int ret;
+
+ if (table_len == 0)
+ return 0;
+
+ /*
+ * Example of completion for a sequence node = [n1,n2] and an
+ * input = [a,b,c,d]:
+ *
+ * result = complete(n1, [a,b,c,d]) +
+ * complete(n2, [b,c,d]) if n1 matches [a] +
+ * complete(n2, [c,d]) if n1 matches [a,b] +
+ * complete(n2, [d]) if n1 matches [a,b,c] +
+ * complete(n2, []) if n1 matches [a,b,c,d]
+ */
+
+ /* first, try to complete with the first node of the table */
+ ret = ec_node_complete_child(table[0], completed, parsed, strvec);
+ if (ret < 0)
+ goto fail;