/************************************************************************
 * grammer - include/manip.h
 * Copyright (C) 2002 Marcello Barnaba <vjt@openssl.it>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 1, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 *
 * misc grammar manipulation functions . . .
 */

#include "struct.h"
#include "memory.h"
#include "parse.h"

#define print_list_quiet(l)	__print_list(l, 0, false, " ")
#define print_list(l, n)	__print_list(l, n, true, ", ")

#define IS_OR_SYMBOL(x)		(x)->item->id == OR_SYMBOL

void __print_list(List *, char, bool, char *);

__inline char * print_part(Part *);
void print_prod(Prod *);

void add_part(List **, Part **);
Part *find_part(List *, Part *);
bool verify_grammar(Grammar *);
