A minor change in the LL.output format.
This commit is contained in:
		
							parent
							
								
									4b31842ecc
								
							
						
					
					
						commit
						5b09f4211d
					
				
					 1 changed files with 11 additions and 2 deletions
				
			
		|  | @ -301,6 +301,7 @@ prrule(p) register p_gram p; { | ||||||
| 	 */ | 	 */ | ||||||
| 	register FILE	*f; | 	register FILE	*f; | ||||||
| 	int		present = 0; | 	int		present = 0; | ||||||
|  | 	int		firstalt = 1; | ||||||
| 
 | 
 | ||||||
| 	f = fout; | 	f = fout; | ||||||
| 	for (;;) { | 	for (;;) { | ||||||
|  | @ -323,8 +324,15 @@ prrule(p) register p_gram p; { | ||||||
| 				prline("%persistent\n"); | 				prline("%persistent\n"); | ||||||
| 			} | 			} | ||||||
| 			if (r_getkind(q) != FIXED) { | 			if (r_getkind(q) != FIXED) { | ||||||
|  | 				if (!(q->t_flags & PERSISTENT)) { | ||||||
|  | 				    prline("> continue repetition on the\n"); | ||||||
|  | 				} | ||||||
| 				printset(q->t_first, c_first); | 				printset(q->t_first, c_first); | ||||||
|  | 				if (q->t_flags & PERSISTENT) { | ||||||
|  | 				    prline("> continue repetition on the\n"); | ||||||
|  | 				} | ||||||
| 				printset(q->t_contains, c_contains); | 				printset(q->t_contains, c_contains); | ||||||
|  | 				prline("> terminate repetition on the\n"); | ||||||
| 				printset(q->t_follow,c_follow); | 				printset(q->t_follow,c_follow); | ||||||
| 				if (q->t_flags & EMPTYFIRST) { | 				if (q->t_flags & EMPTYFIRST) { | ||||||
| 				    prline(">>> empty first\n"); | 				    prline(">>> empty first\n"); | ||||||
|  | @ -353,9 +361,10 @@ prrule(p) register p_gram p; { | ||||||
| 			register p_link l; | 			register p_link l; | ||||||
| 
 | 
 | ||||||
| 			l = &links[g_getcont(p)]; | 			l = &links[g_getcont(p)]; | ||||||
| 			if (g_gettype(p-1) == ALTERNATION) { | 			if (firstalt) { | ||||||
| 				prline("|\n"); | 				firstalt = 0; | ||||||
| 			} | 			} | ||||||
|  | 			else	prline("|\n"); | ||||||
| 			printset(l->l_symbs,"> alternative on "); | 			printset(l->l_symbs,"> alternative on "); | ||||||
| 			cfcheck(l->l_symbs, | 			cfcheck(l->l_symbs, | ||||||
| 				l->l_others, | 				l->l_others, | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue