2008-09-10 23:11:03 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								! Copyright (C) 2008 Slava Pestov.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								! See http://factorcode.org/license.txt for BSD license.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								USING: classes.tuple classes.tuple.parser kernel words
							 | 
						
					
						
							
								
									
										
										
										
											2008-12-15 20:44:56 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								make fry sequences parser accessors ;
							 | 
						
					
						
							
								
									
										
										
										
											2008-09-15 02:54:48 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								IN: compiler.cfg.instructions.syntax
							 | 
						
					
						
							
								
									
										
										
										
											2008-09-10 23:11:03 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2008-10-24 10:17:06 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								: insn-word ( -- word )
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    #! We want to put the insn tuple in compiler.cfg.instructions,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    #! but we cannot have circularity between that vocabulary and
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    #! this one.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    "insn" "compiler.cfg.instructions" lookup ;
							 | 
						
					
						
							
								
									
										
										
										
											2008-09-10 23:11:03 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2008-12-15 20:44:56 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								: insn-effect ( word -- effect )
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    boa-effect [ but-last ] change-in { } >>out ;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2008-09-10 23:11:03 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								: INSN:
							 | 
						
					
						
							
								
									
										
										
										
											2008-09-15 05:22:12 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    parse-tuple-definition "regs" suffix
							 | 
						
					
						
							
								
									
										
										
										
											2008-10-24 10:17:06 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    [ dup tuple eq? [ drop insn-word ] when ] dip
							 | 
						
					
						
							
								
									
										
										
										
											2008-09-10 23:11:03 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    [ define-tuple-class ]
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    [ 2drop save-location ]
							 | 
						
					
						
							
								
									
										
										
										
											2008-12-15 20:44:56 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    [ 2drop [ ] [ '[ f _ boa , ] ] [ insn-effect ] tri define-inline ]
							 | 
						
					
						
							
								
									
										
										
										
											2008-09-10 23:11:03 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    3tri ; parsing
							 |