version 1.131, 2006/02/05 21:22:05
|
version 1.132, 2006/02/06 09:59:06
|
Line 67 Defer source ( -- c-addr u ) \ core
|
Line 67 Defer source ( -- c-addr u ) \ core
|
ELSE |
ELSE |
(word) |
(word) |
THEN |
THEN |
over start-lexeme |
2dup input-lexeme! |
2dup + r> - 1+ r> min >in ! ; |
2dup + r> - 1+ r> min >in ! ; |
|
|
: word ( char "<chars>ccc<char>-- c-addr ) \ core |
: word ( char "<chars>ccc<char>-- c-addr ) \ core |
Line 85 Defer source ( -- c-addr u ) \ core
|
Line 85 Defer source ( -- c-addr u ) \ core
|
\G Parse @i{ccc}, delimited by @i{char}, in the parse |
\G Parse @i{ccc}, delimited by @i{char}, in the parse |
\G area. @i{c-addr u} specifies the parsed string within the |
\G area. @i{c-addr u} specifies the parsed string within the |
\G parse area. If the parse area was empty, @i{u} is 0. |
\G parse area. If the parse area was empty, @i{u} is 0. |
>r source >in @ over min /string ( addr u ) |
>r source >in @ over min /string ( c-addr1 u1 ) |
over start-lexeme |
|
over swap r> scan >r |
over swap r> scan >r |
over - dup r> IF 1+ THEN >in +! ; |
over - dup r> IF 1+ THEN >in +! |
|
2dup input-lexeme! ; |
|
|
\ name 13feb93py |
\ name 13feb93py |
|
|
Line 96 Defer source ( -- c-addr u ) \ core
|
Line 96 Defer source ( -- c-addr u ) \ core
|
|
|
: (name) ( -- c-addr count ) \ gforth |
: (name) ( -- c-addr count ) \ gforth |
source 2dup >r >r >in @ /string (parse-white) |
source 2dup >r >r >in @ /string (parse-white) |
over start-lexeme |
2dup input-lexeme! |
2dup + r> - 1+ r> min >in ! ; |
2dup + r> - 1+ r> min >in ! ; |
\ name count ; |
\ name count ; |
[THEN] |
[THEN] |
Line 679 Variable #fill-bytes
|
Line 679 Variable #fill-bytes
|
|
|
has? new-input 0= [IF] |
has? new-input 0= [IF] |
: input-start-line ( -- ) >in off ; |
: input-start-line ( -- ) >in off ; |
: start-lexeme ( addr -- ) drop ; |
: input-lexeme! ( c-addr n -- ) 2drop ; |
: refill ( -- flag ) \ core-ext,block-ext,file-ext |
: refill ( -- flag ) \ core-ext,block-ext,file-ext |
\G Attempt to fill the input buffer from the input source. When |
\G Attempt to fill the input buffer from the input source. When |
\G the input source is the user input device, attempt to receive |
\G the input source is the user input device, attempt to receive |
Line 817 Variable error-stack 0 error-stack !
|
Line 817 Variable error-stack 0 error-stack !
|
max-errors /error * cells allot |
max-errors /error * cells allot |
\ format of one cell: |
\ format of one cell: |
\ source ( addr u ) |
\ source ( addr u ) |
\ input-start-parse |
\ parse-start-offset |
\ >in |
\ parse-end-offset |
\ line-number |
\ line-number |
\ Loadfilename ( addr u ) |
\ Loadfilename ( addr u ) |
|
|
Line 851 max-errors /error * cells allot
|
Line 851 max-errors /error * cells allot
|
|
|
: input-error-data ( -- addr u start-parse >in line# [addr u] ) |
: input-error-data ( -- addr u start-parse >in line# [addr u] ) |
\ error data for the current input, to be used by >error or .error-frame |
\ error data for the current input, to be used by >error or .error-frame |
source input-start-parse @ error->in sourceline# |
source input-parse-start @ input-parse-end @ sourceline# |
[ has? file [IF] ] sourcefilename [ [THEN] ] ; |
[ has? file [IF] ] sourcefilename [ [THEN] ] ; |
|
|
: dec. ( n -- ) \ gforth |
: dec. ( n -- ) \ gforth |