factor/basis/xml/state/state.factor

36 lines
948 B
Factor
Raw Normal View History

2009-01-21 00:54:33 -05:00
! Copyright (C) 2005, 2009 Daniel Ehrenberg
! See http://factorcode.org/license.txt for BSD license.
2009-01-29 22:41:08 -05:00
USING: accessors kernel namespaces io math ;
2009-01-21 00:54:33 -05:00
IN: xml.state
2009-01-29 22:41:08 -05:00
TUPLE: spot
2009-01-29 23:17:55 -05:00
char line column next check version-1.0? stream ;
2009-01-21 00:54:33 -05:00
C: <spot> spot
: get-char ( -- char ) spot get char>> ;
: set-char ( char -- ) spot get swap >>char drop ;
: get-line ( -- line ) spot get line>> ;
: set-line ( line -- ) spot get swap >>line drop ;
: get-column ( -- column ) spot get column>> ;
: set-column ( column -- ) spot get swap >>column drop ;
: get-next ( -- char ) spot get next>> ;
: set-next ( char -- ) spot get swap >>next drop ;
: get-check ( -- ? ) spot get check>> ;
: check ( -- ) spot get t >>check drop ;
2009-01-29 17:57:13 -05:00
: version-1.0? ( -- ? ) spot get version-1.0?>> ;
: set-version ( string -- )
spot get swap "1.0" = >>version-1.0? drop ;
2009-01-22 18:19:02 -05:00
SYMBOL: xml-stack
SYMBOL: depth
SYMBOL: interpolating?
SYMBOL: in-dtd?
SYMBOL: pe-table
SYMBOL: extra-entities