1 ! Copyright (C) 2008 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: classes.tuple classes.tuple.parser kernel words
4 make fry sequences parser accessors ;
5 IN: compiler.cfg.instructions.syntax
7 : insn-word ( -- word )
8 #! We want to put the insn tuple in compiler.cfg.instructions,
9 #! but we cannot have circularity between that vocabulary and
11 "insn" "compiler.cfg.instructions" lookup ;
13 : insn-effect ( word -- effect )
14 boa-effect [ but-last ] change-in { } >>out ;
17 parse-tuple-definition "regs" suffix
18 [ dup tuple eq? [ drop insn-word ] when ] dip
19 [ define-tuple-class ]
20 [ 2drop save-location ]
21 [ 2drop [ ] [ '[ f _ boa , ] ] [ insn-effect ] tri define-inline ]