![]() | ||
| Home | SwiftX Archive | SwiftForth Archive | |

Hi all
I have developed some code in SwiftForth that works like a second pass compiler for a database. In the first pass I store data and I have forward cross links only. In the second pass I add the backward links that could not be compiled in the first pass.
I use REFILL and SOURCE to get the next line in the file being interpreted and EVALUATE to interpret the line.
When I try the same trick in SWIFTX the input buffer returned by SOURCE does not contain the next line in the file
My question is whether REFILL or SOURCE are modified someway in SWIFTX (68k version).
(It may be that the address returned is being interpreted as part of the cross compiler space)
Is there a way to have the data from SOURCE be used correctly
Thanks in ADVANCE, Ken B
\ second pass compiler code is ATTENFIX which uses ENERGY>LINE
INTERPRETER
\ VARIABLE <ISO> \ REPLACED BY USE OF RETURN STACK
: ENERGY>LINE ( energy ISOTOPE ... add )
>NAME N>BODY
BEGIN DUP >ENERGY 2 PICK -
\ ~ENERGY MEMBERSHIP 0=
5 >fixed dup negate within \ gn3 specific !
WHILE ISOLINK
REPEAT
NIP
;
INTERPRETER
: ATTENFIX
0 >R \ <ISO>
CDATA
SOURCE-ID CR ." SOURCE-ID " .
BEGIN
REFILL .S ." REFILL"
WHILE
{ SOURCE .S TYPE this block was added to see if I ever get the next line and I never do
REFILL SOURCE .S TYPE
REFILL SOURCE .S TYPE
REFILL SOURCE .S TYPE
REFILL SOURCE .S TYPE
REFILL SOURCE .S TYPE
REFILL SOURCE .S TYPE }
SOURCE .S
cr 2dup type
?DUP IF
EVALUATE
DROP 10 /.
\ .s ." evaluated string"
R@ 0= IF OVER R> DROP >R THEN
SWAP >NAME R@ >NAME
= NOT ABORT" ISOTOPE LINE MISMATCH"
?DUP IF
R@ ENERGY>LINE
R@ 4 CELLS + !
THEN
R> ISOLINK >R
ELSE DROP
THEN
REPEAT IDATA
;
\ FILE FRAGMENT THAT CALLS ATTENFIX
\ ***************************************************************************
\
\ l2413attenfix6 -
\
\ Copyright(c) N2 LANL 2000
\
\ Author: KENNETH BUTTERFIELD
\ Created on: 5/19/2006 10:39:54 AM
\ Last change: KB 5/19/2006 10:39:54 AM
\ ***************************************************************************
\ scott's version 6
\ ISOTOPE 1" U
attenfix
Ac227 1196.4
Ac227 1270.6
Ac227 1109.2
Ac227 897.7
Ac227 1109.2
Ac227 1109.2
... many more similar lines
\ OUTPUT FROM SWIFTX WHEN TRYING TO BUILD THE DATABASE
INCLUDE BUILD
?PEAK isn't unique.
factor isn't unique.
STRIP isn't unique.
?UNIQUE isn't unique.
SOURCE-ID 136
-1 <-Top REFILL
1209296 15 <-Top ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
-1 1209296 15 <-Top ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
-1 -1 1209296 15 <-Top ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
-1 -1 -1 1209296 14 <-Top ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
-1 -1 -1 -1 1209296 15 <-Top ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
-1 -1 -1 -1 -1 1209296 15 <-Top ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
-1 -1 -1 -1 -1 -1 1209296 15 <-Top ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
-1 -1 -1 -1 -1 -1 1209296 15 <-Top
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
Address 130A7A is not valid for this section type Ac227 1109.2
At line 20 in C:\ForthInc\SwiftX\Src\68K\GN32\L2413ATTENFIX6.F
THE SOURCE-ID indicates that input is from file 136,
REFILL returns a true flag indicating file input
SOURCE returns a string, but the data in the string is not the
Dr. Kenneth B Butterfield
phone: 505 667 8944
PO Box 1663
ms J562
Los Alamos National Laboratory
Los Alamos New Mexico 87545
"I do not trust a computer that I am not carrying!"
----------------------------------------------------------------------
swiftx_at_forth.com The SwiftX programming discussion email list
To unsubscribe, send subject "unsubscribe" to swiftx-request_at_forth.com
For list command help, send subject "help" to swiftx-request_at_forth.com
Message archives are located at http://www.forth.com/archive/swiftx
----------------------------------------------------------------------
This list is a forum for SwiftX users. For product support and bug
reports, please send email to support_at_forth.com
----------------------------------------------------------------------
Received on Tue May 30 2006 - 10:46:11 PDT
This archive was generated by hypermail 2.2.0 : Tue Dec 02 2008 - 03:04:51 PST