* FML interpreter. Europagate, 1995
*
* $Log: fmllist.c,v $
- * Revision 1.1 1995/02/09 14:33:37 adam
+ * Revision 1.2 1995/02/10 15:50:55 adam
+ * MARC interface implemented. Minor bugs fixed. fmltest can
+ * be used to format single MARC records. New function '\list'
+ * implemented.
+ *
+ * Revision 1.1 1995/02/09 14:33:37 adam
* Split source fml.c and define relevant build-in functions in separate
* files. New operators mult, div, not, llen implemented.
*
return fn;
}
+static struct fml_node *fml_exec_list (Fml fml, struct fml_node **lp,
+ struct token *tp)
+{
+ struct fml_node *fn = NULL;
+
+ fml_cmd_lex (lp, tp);
+ if (tp->kind == 'g')
+ fn = fml_node_copy (fml, tp->sub);
+ else
+ {
+ fn = fml_node_alloc (fml);
+ fn->is_atom = 1;
+ fn->p[0] = fml_atom_alloc (fml, tp->tokenbuf);
+ }
+ fml_cmd_lex (lp, tp);
+ return fn;
+}
+
void fml_list_init (Fml fml)
{
struct fml_sym_info *sym_info;
sym_info = fml_sym_add (fml->sym_tab, "llen");
sym_info->kind = FML_CPREFIX;
sym_info->prefix = fml_exec_len;
+
+ sym_info = fml_sym_add (fml->sym_tab, "list");
+ sym_info->kind = FML_CPREFIX;
+ sym_info->prefix = fml_exec_list;
}