factor/basis/compiler/cfg/instructions/syntax/syntax.factor

16 lines
443 B
Factor
Raw Normal View History

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-09-15 05:22:12 -04:00
make fry sequences parser ;
2008-09-15 02:54:48 -04:00
IN: compiler.cfg.instructions.syntax
2008-09-10 23:11:03 -04:00
TUPLE: insn ;
: INSN:
2008-09-15 05:22:12 -04:00
parse-tuple-definition "regs" suffix
2008-09-10 23:11:03 -04:00
[ dup tuple eq? [ drop insn ] when ] dip
[ define-tuple-class ]
[ 2drop save-location ]
2008-09-15 05:22:12 -04:00
[ 2drop dup '[ f _ boa , ] define-inline ]
2008-09-10 23:11:03 -04:00
3tri ; parsing