| 
									
										
										
										
											2008-11-03 21:59:48 -05:00
										 |  |  | ! Calling the compiler at parse time and having it compile | 
					
						
							|  |  |  | ! generic words defined in the current compilation unit would | 
					
						
							|  |  |  | ! fail. This is a regression from the 'remake-generic' | 
					
						
							|  |  |  | ! optimization, which would batch generic word updates at the | 
					
						
							|  |  |  | ! end of a compilation unit. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-04-28 22:43:30 -04:00
										 |  |  | USING: kernel accessors peg.ebnf words ;
 | 
					
						
							| 
									
										
										
										
											2009-04-26 01:51:47 -04:00
										 |  |  | IN: compiler.tests.peg-regression | 
					
						
							| 
									
										
										
										
											2008-11-03 21:59:48 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | TUPLE: pipeline-expr background ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | GENERIC: blah ( a -- b )
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | M: pipeline-expr blah ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | : ast>pipeline-expr ( -- obj )
 | 
					
						
							|  |  |  |     pipeline-expr new blah ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | EBNF: expr | 
					
						
							|  |  |  | pipeline = "hello" => [[ ast>pipeline-expr ]] | 
					
						
							|  |  |  | ;EBNF | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | USE: tools.test | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-04-28 18:26:11 -04:00
										 |  |  | [ t ] [ \ expr optimized? ] unit-test | 
					
						
							|  |  |  | [ t ] [ \ ast>pipeline-expr optimized? ] unit-test |