Subversion Repositories PlanixRsrch.SVN

Compare Revisions

Ignore whitespace Rev 256 → Rev 257

/branches/mgen-loop-detection/mgen_print_rhs_list.c
25,8 → 25,29
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
 
#include <string.h>
 
#include "mgen.h"
 
void print_sym(struct mgen_sym * sym)
{
if (sym->type == MGEN_NT_SYM){
(void)printf("<%s>",sym->name);
return;
}
 
if (sym->name==NULL){
(void)printf("\\eof");
return;
}
if (strcmp(sym->name,"\n")==0){
(void)printf("\\n");
return;
}
 
(void)printf("%s",sym->name);
}
 
void
print_rhs_list(struct rhs_elem *e)
{
39,10 → 60,9
delim_or="|";
delim_spc="";
while (sym!=NULL){
if (sym->type == MGEN_NT_SYM)
(void)printf("%s<%s>",delim_spc,sym->name);
else
(void)printf("%s%s",delim_spc,sym->name);
printf("%s",delim_spc);
print_sym(sym);
 
sym = sym->next;
delim_spc=" ";
}