- flushing optimization\r
- new prettyprinter\r
- - limit output to n lines\r
- - limit sequences to n elements\r
- - put newlines where necessary\r
- - limit lines to 64 chars\r
- - conditional newlines after certain words\r
- - rename prettyprint* to pprint, prettyprint to pp\r
- reader syntax for arrays, byte arrays, displaced aliens\r
- print parsing words in bold\r
- unify unparse and prettyprint\r
"tuple" "kernel" create 18 "tuple?" "kernel" create { } define-builtin
+"byte-array" "kernel-internals" create 19 "byte-array?" "kernel-internals" create { } define-builtin
+
"displaced-alien" "alien" create 20 "displaced-alien?" "alien" create { } define-builtin
FORGET: builtin-predicate
3dup swap array-nth pick rot set-array-nth
] repeat 2drop ;
-DEFER: byte-array?
-BUILTIN: byte-array 19 byte-array? ;
-
M: byte-array length array-capacity ;
M: byte-array resize resize-array ;
: cond ( conditions -- )
#! Conditions is a sequence of quotation pairs.
- #! { { [ X ] [ Y ] } { [ Z ] [ T ] }
+ #! { { [ X ] [ Y ] } { [ Z ] [ T ] } }
#! => X [ Y ] [ Z [ T ] [ ] ifte ] ifte
#! The last condition should be a catch-all 't'.
[ first call ] find nip second call ;
] unless ;
: compiling ( word -- word parameter )
- check-architecture
- "Compiling " write dup unparse. terpri flush
- dup word-def ;
+ check-architecture "Compiling " write dup pp dup word-def ;
GENERIC: (compile) ( word -- )
"compile" get [ word compile ] when ; parsing
: cannot-compile ( word error -- )
- "Cannot compile " write swap unparse. terpri print-error ;
+ "Cannot compile " write swap pp print-error ;
: try-compile ( word -- )
[ compile ] [ [ cannot-compile ] when* ] catch ;
: decompile ( word -- )
dup compiled? [
- "Decompiling " write dup unparse. terpri flush
+ "Decompiling " write dup pp
[ word-primitive ] keep set-word-primitive
] [
drop
#! With the attribute namespace on the stack, get the attributes
#! and write them to standard output. If no attributes exist, write
#! nothing.
- "attrs" get [ bl attrs>string write ] when* ;
+ "attrs" get [ " " write attrs>string write ] when* ;
: store-prev-attribute ( n: tag value -- )
#! Assumes an attribute namespace is on the stack.
IN: inference
USING: generic hashtables inference io kernel kernel-internals
-math namespaces prettyprint sequences vectors words ;
+lists math namespaces prettyprint sequences styles vectors words ;
! A simple tool for turning dataflow IR into quotations, for
! debugging purposes.
TUPLE: comment node text ;
-M: comment prettyprint* ( ann -- )
+M: comment pprint* ( ann -- )
"( " over comment-text " )" append3
- swap comment-node object. ;
+ swap comment-node presented swons unit format ;
: comment, ( ? node text -- )
rot [ <comment> , ] [ 2drop ] ifte ;
: dataflow. ( quot ? -- )
#! Print dataflow IR for a quotation. Flag indicates if
#! annotations should be printed or not.
- >r dataflow optimize r> dataflow>quot prettyprint ;
+ >r dataflow optimize r> dataflow>quot pp ;
: file. ( dir name -- )
#! If "doc-root" set, create links relative to it.
- 2dup path+ file-icon. bl file-link. terpri ;
+ 2dup path+ file-icon. " " write file-link. terpri ;
: directory. ( dir -- )
#! If "doc-root" set, create links relative to it.
: close ( -- ) stdio get stream-close ;\r
\r
: crlf ( -- ) "\r\n" write ;\r
-: bl ( -- ) " " write ;\r
\r
: write-icon ( resource -- )\r
#! Write an icon. Eg, /library/icons/File.png\r
! Copyright (C) 2003, 2005 Slava Pestov.
! See http://factor.sf.net/license.txt for BSD license.
IN: prettyprint
-USING: alien errors generic hashtables io kernel lists math
-memory namespaces parser presentation sequences strings
-styles unparser vectors words ;
+USING: alien generic hashtables io kernel lists math namespaces
+parser sequences strings styles unparser vectors words ;
-SYMBOL: prettyprint-limit
-SYMBOL: one-line
-SYMBOL: tab-size
+! TODO:
+! - newline styles: forced, long output style, normal
+! - long output flag, off with .
+! - margin & indent calculation fix
+! - out of memory when printing global namespace
+! - formatting HTML code
+! - limit strings
+
+! State
+SYMBOL: column
+SYMBOL: indent
+SYMBOL: last-newline?
+SYMBOL: last-newline
SYMBOL: recursion-check
+SYMBOL: line-count
+SYMBOL: end-printing
+
+! Configuration
+SYMBOL: margin
+SYMBOL: nesting-limit
+SYMBOL: length-limit
+SYMBOL: line-limit
+
+global [
+ 64 margin set
+ recursion-check off
+ 0 column set
+ 0 indent set
+ last-newline? off
+ 0 last-newline set
+ 0 line-count set
+] bind
+
+TUPLE: pprinter blocks block ;
+
+GENERIC: pprint-section*
+
+TUPLE: section start end ;
+
+C: section ( length -- section )
+ >r column [ dup rot + dup ] change r>
+ [ set-section-end ] keep
+ [ set-section-start ] keep ;
+
+: section-fits? ( section -- ? )
+ section-end last-newline get - margin get <= ;
+
+: line-limit? ( -- ? )
+ line-limit get dup [ line-count get <= ] when ;
+
+: fresh-line ( section -- )
+ section-start last-newline set
+ line-count [ 1 + ] change
+ line-limit? [ " ..." write end-printing get call ] when
+ terpri indent get CHAR: \s fill write ;
+
+TUPLE: text string style ;
+
+C: text ( string style -- section )
+ pick length <section> over set-delegate
+ [ set-text-style ] keep
+ [ set-text-string ] keep ;
+
+M: text pprint-section*
+ dup text-string swap text-style format ;
+
+TUPLE: block sections ;
+
+C: block ( -- block )
+ 0 <section> over set-delegate
+ { } clone over set-block-sections ;
+
+: add-section ( section stream -- )
+ pprinter-block block-sections push ;
+
+: text ( string style -- )
+ <text> pprinter get add-section ;
+
+: bl ( -- ) " " f text ;
+
+: pprint-section ( section -- )
+ last-newline? get [
+ dup section-fits? [
+ " " write
+ ] [
+ dup fresh-line
+ ] ifte last-newline? off
+ ] when pprint-section* ;
+
+TUPLE: newline forced? ;
+
+C: newline ( forced -- section )
+ 1 <section> over set-delegate
+ [ set-newline-forced? ] keep ;
+
+M: newline pprint-section*
+ dup newline-forced?
+ [ fresh-line ] [ drop last-newline? on ] ifte ;
+
+: section-length ( section -- n )
+ dup section-end swap section-start - ;
+
+: block-indent ( block -- indent )
+ block-sections first
+ dup block? [ drop 0 ] [ section-length 1 + ] ifte ;
-GENERIC: prettyprint* ( indent obj -- indent )
+M: block pprint-section* ( block -- )
+ indent get dup >r
+ over block-indent + indent set
+ block-sections [ pprint-section ] each
+ r> indent set ;
-: object. ( str obj -- )
- presented swons unit format ;
+: <block ( -- )
+ pprinter get dup pprinter-block over pprinter-blocks push
+ <block> swap set-pprinter-block ;
-: unparse. ( obj -- )
- [ unparse ] keep object. ;
+: newline ( forced -- )
+ <newline> pprinter get add-section ;
-M: object prettyprint* ( indent obj -- indent )
- unparse. ;
+: end-block ( block -- )
+ column get swap set-section-end ;
-M: word prettyprint* ( indent word -- indent )
- dup parsing? [ \ POSTPONE: unparse. bl ] when unparse. ;
+: pop-block ( pprinter -- )
+ dup pprinter-blocks pop swap set-pprinter-block ;
-: indent ( indent -- )
- #! Print the given number of spaces.
- CHAR: \s fill write ;
+: block-empty? block-sections empty? ;
-: prettyprint-newline ( indent -- )
- "\n" write indent ;
+: block> ( -- )
+ pprinter get dup pprinter-block dup block-empty? [
+ drop pop-block
+ ] [
+ dup end-block swap dup pop-block add-section
+ ] ifte ;
+
+C: pprinter ( -- stream )
+ { } clone over set-pprinter-blocks
+ <block> over set-pprinter-block ;
+
+: do-pprint ( pprinter -- )
+ [
+ end-printing set
+ dup pprinter-block pprint-section
+ ] callcc0 drop ;
+
+GENERIC: pprint* ( obj -- )
+
+: vocab-style ( vocab -- style )
+ {{
+ [[ "syntax" [ [[ foreground [ 128 128 128 ] ]] ] ]]
+ [[ "kernel" [ [[ foreground [ 0 0 128 ] ]] ] ]]
+ [[ "sequences" [ [[ foreground [ 128 0 0 ] ]] ] ]]
+ [[ "math" [ [[ foreground [ 0 128 0 ] ]] ] ]]
+ [[ "math-internals" [ [[ foreground [ 192 0 0 ] ]] ] ]]
+ [[ "kernel-internals" [ [[ foreground [ 192 0 0 ] ]] ] ]]
+ [[ "io-internals" [ [[ foreground [ 192 0 0 ] ]] ] ]]
+ }} hash ;
-: ?prettyprint-newline ( indent -- )
- one-line get [ bl drop ] [ prettyprint-newline ] ifte ;
+: object-style ( obj -- style )
+ dup word? [ dup word-vocabulary vocab-style ] [ { } ] ifte
+ swap presented swons add ;
-: <prettyprint ( indent -- indent )
- tab-size get + dup ?prettyprint-newline ;
+: pprint-object ( obj -- )
+ dup unparse swap object-style text ;
-: prettyprint> ( indent -- indent )
- tab-size get - one-line get
- [ dup prettyprint-newline ] unless ;
+M: object pprint* ( obj -- )
+ pprint-object ;
-: prettyprint-limit? ( indent -- ? )
- prettyprint-limit get dup [ >= ] [ nip ] ifte ;
+M: word pprint* ( word -- )
+ dup parsing? [ \ POSTPONE: pprint-object bl ] when
+ pprint-object ;
-: check-recursion ( indent obj quot -- indent )
+: nesting-limit? ( -- ? )
+ nesting-limit get dup
+ [ pprinter get pprinter-blocks length < ] when ;
+
+: check-recursion ( obj quot -- indent )
#! We detect circular structure.
- pick prettyprint-limit? [
- 2drop "#" write
+ nesting-limit? [
+ 2drop "&" f text
] [
over recursion-check get memq? [
- 2drop "&" write
+ 2drop "#" f text
] [
over recursion-check [ cons ] change
call
] ifte
] ifte ; inline
-: prettyprint-elements ( indent list -- indent )
- [ prettyprint* bl ] each ;
-
-: prettyprint-sequence ( indent start list end -- indent )
- #! Prettyprint a list, with start/end delimiters; eg, [ ],
- #! or { }, or << >>. The body of the list is indented,
- #! unless the list is empty.
- over [
- >r >r unparse. <prettyprint
- r> prettyprint-elements
- prettyprint> r> unparse.
- ] [
- >r >r unparse. bl r> drop r> unparse.
- ] ifte ;
+: length-limit? ( seq -- seq ? )
+ length-limit get dup
+ [ swap 2dup length < [ head t ] [ nip f ] ifte ]
+ [ drop f ] ifte ;
-M: cons prettyprint* ( indent list -- indent )
+: pprint-elements ( seq -- )
+ length-limit? >r
+ [ pprint* f newline ] each
+ r> [ "... " f text ] when ;
+
+: pprint-sequence ( seq start end -- )
+ <block swap pprint-object f newline
+ swap pprint-elements pprint-object block> ;
+
+M: cons pprint* ( list -- )
[
- dup list? [
- \ [ swap \ ]
- ] [
- \ [[ swap uncons 2list \ ]]
- ] ifte prettyprint-sequence
+ dup list? [ \ [ \ ] ] [ uncons 2list \ [[ \ ]] ] ifte
+ pprint-sequence
] check-recursion ;
-M: vector prettyprint* ( indent vector -- indent )
- [
- \ { swap \ } prettyprint-sequence
- ] check-recursion ;
+M: vector pprint* ( vector -- )
+ [ \ { \ } pprint-sequence ] check-recursion ;
-M: hashtable prettyprint* ( indent hashtable -- indent )
- [
- \ {{ swap hash>alist \ }} prettyprint-sequence
- ] check-recursion ;
+M: hashtable pprint* ( hashtable -- )
+ [ hash>alist \ {{ \ }} pprint-sequence ] check-recursion ;
-M: tuple prettyprint* ( indent tuple -- indent )
- [
- \ << swap <mirror> \ >> prettyprint-sequence
- ] check-recursion ;
+M: tuple pprint* ( tuple -- )
+ [ <mirror> \ << \ >> pprint-sequence ] check-recursion ;
-M: alien prettyprint* ( alien -- )
- \ ALIEN: unparse. bl alien-address unparse write ;
+M: alien pprint* ( alien -- )
+ \ ALIEN: pprint-object bl alien-address pprint-object ;
-M: wrapper prettyprint* ( wrapper -- )
+M: wrapper pprint* ( wrapper -- )
dup wrapped word? [
- \ \ unparse. bl wrapped unparse.
+ \ \ pprint-object bl wrapped pprint-object
] [
- \ W[ unparse. bl wrapped prettyprint* \ ]W unparse.
+ wrapped 1vector \ W[ \ ]W pprint-sequence
] ifte ;
-: prettyprint ( obj -- )
+: with-pprint ( quot -- )
[
- recursion-check off
- 0 swap prettyprint* drop terpri
- ] with-scope ;
+ <pprinter> pprinter set call pprinter get do-pprint
+ ] with-scope ; inline
+
+: pprint ( object -- )
+ [ pprint* ] with-pprint ;
+
+: pprint>string ( object -- string )
+ [ pprint ] string-out ;
+
+: pp ( obj -- ) pprint terpri ;
: . ( obj -- )
- [
- one-line on
- 16 prettyprint-limit set
- prettyprint
- ] with-scope ;
+ [ 2 nesting-limit set 100 length-limit set pp ] with-scope ;
: [.] ( sequence -- )
#! Unparse each element on its own line.
- [ . ] each ;
+ [
+ 1 line-limit set 10 length-limit set
+ [ pp ] each
+ ] with-scope ;
+
+: stack. reverse-slice [.] ;
-: .s datastack reverse [.] flush ;
-: .r callstack reverse [.] flush ;
+: .s datastack stack. ;
+: .r callstack stack. ;
! For integers only
: .b >bin print ;
: .o >oct print ;
: .h >hex print ;
-
-global [ 4 tab-size set ] bind
! Copyright (C) 2003, 2005 Slava Pestov.
! See http://factor.sf.net/license.txt for BSD license.
IN: prettyprint
-USING: generic hashtables io kernel lists namespaces sequences
-streams strings styles unparser words ;
+USING: generic io kernel lists namespaces sequences styles words ;
-: prettyprint-IN: ( word -- )
- \ IN: unparse. bl word-vocabulary write terpri ;
+: declaration. ( word prop -- )
+ tuck word-name word-prop
+ [ bl pprint-object ] [ drop ] ifte ;
-: prettyprint-prop ( word prop -- )
- tuck word-name word-prop [
- bl unparse.
- ] [
- drop
- ] ifte ;
-
-: prettyprint-plist ( word -- )
+: declarations. ( word -- )
[
POSTPONE: parsing
POSTPONE: inline
POSTPONE: foldable
POSTPONE: flushable
- ] [ prettyprint-prop ] each-with ;
+ ] [ declaration. ] each-with ;
: comment. ( comment -- )
- [ [[ font-style italic ]] ] format ;
+ [ [[ font-style italic ]] ] text ;
-: infer-effect. ( effect -- )
- [
- "(" %
- 2unlist >r [ " " % unparse % ] each r>
- " --" %
- [ " " % unparse % ] each
- " )" %
- ] make-string comment. ;
-
-: stack-effect. ( word -- )
- dup "stack-effect" word-prop [
- [ CHAR: ( , % CHAR: ) , ] make-string
- comment.
- ] [
- "infer-effect" word-prop dup [
- infer-effect.
- ] [
- drop
- ] ifte
- ] ?ifte ;
-
-: documentation. ( indent word -- indent )
- "documentation" word-prop [
- "\n" split [
- "#!" swap append comment.
- dup prettyprint-newline
- ] each
- ] when* ;
-
-: definer. ( word -- ) dup definer unparse. bl unparse. bl ;
-
-GENERIC: (see) ( word -- )
+: stack-picture ( seq -- string )
+ [ [ word-name % " " % ] each ] make-string ;
-M: compound (see) ( word -- )
- tab-size get dup indent swap
- [ documentation. ] keep
- [ word-def prettyprint-elements \ ; unparse. ] keep
- prettyprint-plist terpri drop ;
+: effect>string ( effect -- string )
+ 2unseq stack-picture >r stack-picture "-- " r> append3 ;
-: prettyprint-M: ( -- indent )
- \ M: unparse. bl tab-size get ;
+: stack-effect ( word -- string )
+ dup "stack-effect" word-prop [ ] [
+ "infer-effect" word-prop
+ dup [ effect>string ] when
+ ] ?ifte ;
-: prettyprint-; \ ; unparse. terpri ;
+: stack-effect. ( string -- )
+ [ bl "( " swap ")" append3 comment. ] when* ;
-: method. ( word [[ class method ]] -- )
- uncons >r >r >r prettyprint-M: r> r> unparse. bl unparse. bl
- dup prettyprint-newline r> prettyprint-elements
- prettyprint-; drop ;
-
-M: generic (see) ( word -- )
- tab-size get dup indent [
- one-line on
- over "picker" word-prop prettyprint* bl
- over "combination" word-prop prettyprint* bl
- ] with-scope
- drop
- \ ; unparse.
- dup prettyprint-plist
- terpri
- dup methods [ method. ] each-with ;
+: in. ( word -- )
+ <block \ IN: pprint-object bl word-vocabulary f text block>
+ t newline ;
-M: word (see) drop ;
+: definer. ( word -- )
+ dup definer pprint-object bl
+ dup pprint-object
+ stack-effect stack-effect.
+ f newline ;
-GENERIC: class.
+GENERIC: (see) ( word -- )
-M: union class.
- \ UNION: unparse. bl
- dup unparse. bl
- 0 swap "members" word-prop prettyprint-elements drop
- prettyprint-; ;
+M: word (see) definer. t newline ;
-M: complement class.
- \ COMPLEMENT: unparse. bl
- dup unparse. bl
- "complement" word-prop unparse. terpri ;
+: documentation. ( word -- )
+ "documentation" word-prop [
+ "\n" split [ "#!" swap append comment. t newline ] each
+ ] when* ;
-M: predicate class.
- \ PREDICATE: unparse. bl
- dup "superclass" word-prop unparse. bl
- dup unparse. bl
- tab-size get dup prettyprint-newline swap
- "definition" word-prop prettyprint-elements drop
- prettyprint-; ;
+: see-body ( quot word -- )
+ dup definer. <block dup documentation. swap pprint-elements
+ \ ; pprint-object declarations. block> ;
-M: tuple-class class.
- \ TUPLE: unparse. bl
- dup unparse. bl
- "slot-names" word-prop [ write bl ] each
- prettyprint-; ;
+M: compound (see)
+ dup word-def swap see-body t newline ;
-M: word class. drop ;
+: method. ( word [[ class method ]] -- )
+ <block
+ \ M: pprint-object bl
+ unswons pprint-object bl
+ swap pprint-object t newline
+ pprint-elements \ ; pprint-object
+ block> t newline ;
+
+M: generic (see)
+ <block
+ dup dup { "picker" "combination" } [ word-prop ] map-with
+ swap see-body block> t newline
+ dup methods [ method. ] each-with ;
: see ( word -- )
- dup prettyprint-IN: dup definer.
- dup stack-effect. terpri dup (see) class. ;
-
-: methods. ( class -- )
- #! List all methods implemented for this class.
- dup class.
- dup implementors [
- dup prettyprint-IN:
- [ "methods" word-prop hash* ] keep swap method.
- ] each-with ;
+ [ dup in. (see) ] with-pprint ;
[ [ 2 2 + unparse print ] string-out ] test-interpreter
] unit-test
-[ { "4" } ] [
- [ [ 0 2 2 + prettyprint* drop ] string-out ] test-interpreter
-] unit-test
-
[ { "4\n" } ] [
[ [ 2 2 + . ] string-out ] test-interpreter
] unit-test
--- /dev/null
+IN: temporary
+USING: io kernel math sequences test xp ;
+
+[ "4" ] [ 4 pprint>string ] unit-test
+[ "1.0" ] [ 1.0 pprint>string ] unit-test
+[ "#{ 1/2 2/3 }#" ] [ #{ 1/2 2/3 }# pprint>string ] unit-test
+[ "1267650600228229401496703205376" ] [ 1 100 shift pprint>string ] unit-test
+
+[ "+" ] [ \ + pprint>string ] unit-test
+
+[ "\\ +" ] [ [ \ + ] first pprint>string ] unit-test
+
+[ "1" ] [
+ [ [ <block 1 pprint-object block> ] with-pprint ] string-out
+] unit-test
+
+[ "{ }" ] [ { } pprint>string ] unit-test
+
+[ "{ 1 2 3 }" ] [ { 1 2 3 } pprint>string ] unit-test
+
+[ "\"hello\\\\backslash\"" ]
+[ "hello\\backslash" pprint>string ]
+unit-test
+
+[ "\"\\u1234\"" ]
+[ "\u1234" pprint>string ]
+unit-test
+
+[ "\"\\e\"" ]
+[ "\e" pprint>string ]
+unit-test
+
+[ "f" ] [ f pprint>string ] unit-test
+[ "t" ] [ t pprint>string ] unit-test
+
+[ "SBUF\" hello world\"" ] [ SBUF" hello world" pprint>string ] unit-test
+
+: foo dup * ; inline
+
+[ "IN: temporary\n: foo dup * ; inline\n" ]
+[ [ \ foo see ] string-out ] unit-test
+++ /dev/null
-IN: temporary
-USE: lists
-USE: math
-USE: parser
-USE: test
-USE: unparser
-USE: kernel
-USE: kernel-internals
-USE: io-internals
-
-[ "\"hello\\\\backslash\"" ]
-[ "hello\\backslash" unparse ]
-unit-test
-
-[ "\"\\u1234\"" ]
-[ "\u1234" unparse ]
-unit-test
-
-[ "\"\\e\"" ]
-[ "\e" unparse ]
-unit-test
-
-[ "1.0" ] [ 1.0 unparse ] unit-test
-[ "f" ] [ f unparse ] unit-test
-[ "t" ] [ t unparse ] unit-test
-[ "car" ] [ \ car unparse ] unit-test
-[ "#{ 1/2 2/3 }#" ] [ #{ 1/2 2/3 }# unparse ] unit-test
-[ "1267650600228229401496703205376" ] [ 1 100 shift unparse ] unit-test
-
-[ ] [ { 1 2 3 } unparse drop ] unit-test
-
-[ "SBUF\" hello world\"" ] [ SBUF" hello world" unparse ] unit-test
: type-check-error. ( list -- )
"Type check error" print
uncons car dup "Object: " write .
- "Object type: " write class unparse. terpri
- "Expected type: " write type>class unparse. terpri ;
+ "Object type: " write class pp
+ "Expected type: " write type>class pp ;
: float-format-error. ( list -- )
"Invalid floating point literal format: " write . ;
: :get ( var -- value ) "error-namestack" get (get) ;
: debug-help ( -- )
- [ :s :r ] [ unparse. bl ] each
- "show stacks at time of error." print
- \ :get unparse.
- " ( var -- value ) inspects the error namestack." print ;
+ ":s :r show stacks at time of error." print
+ ":get ( var -- value ) inspects the error namestack." print ;
: flush-error-handler ( error -- )
#! Last resort.
dup vocab-banner
metaclass [
"This is a class whose behavior is specifed by the " write
- unparse. " metaclass." print
+ pprint " metaclass." print
] when* ;
M: object extra-banner ( obj -- ) drop ;
: inspect-banner ( obj -- )
- "You are looking at an instance of the " write dup class unparse.
+ "You are looking at an instance of the " write dup class pprint
" class:" print
- " " write dup unparse. terpri
- "It takes up " write dup size unparse write " bytes of memory." print
+ " " write dup pp
+ "It takes up " write dup size pprint " bytes of memory." print
extra-banner ;
: describe ( obj -- )
set-callstack call ;
: walk-banner ( -- )
- [ &s &r ] [ unparse. bl ] each
- "show stepper stacks." print
- \ &get unparse.
- " ( var -- value ) inspects the stepper namestack." print
- \ step unparse. " -- single step over" print
- \ into unparse. " -- single step into" print
- \ continue unparse. " -- continue execution" print
- \ bye unparse. " -- exit single-stepper" print
+ "&s &r show stepper stacks." print
+ "&get ( var -- value ) inspects the stepper namestack." print
+ "step -- single step over" print
+ "into -- single step into" print
+ "continue -- continue execution" print
+ "bye -- exit single-stepper" print
report ;
: walk-listener walk-banner "walk " listener-prompt set listener ;
"This stream does not support live gadgets"
swap format terpri ;
-[ drop t ] "Prettyprint" [ prettyprint ] define-command
+[ drop t ] "Prettyprint" [ pp ] define-command
[ drop t ] "Inspect" [ inspect ] define-command
[ drop t ] "References" [ references inspect ] define-command