Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Forth Mac > Re: Conversion ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 4 of 4 Topic 116 of 161
Post > Topic >>

Re: Conversion style for OS X include files...

by ward@[EMAIL PROTECTED] (ward mcfarland) Jul 15, 2006 at 09:26 AM

Charles Turner <vze26m98@[EMAIL PROTECTED]
> wrote:

> I'll take a look at this today. I assume that STRUCTS and MACHOFUNCS
> would have to be declared/defined in a separate file? If so, do they
> end up in a similar 'Actel vocabulary' area or do they end up in
> CODE/DATA space?

No need for a separate file.  Only constants defined with the C-style
format are added to MacEnums. 

All our vocabs are Actels.  And all "normal" vocabs we use all have the
same actions for vocab-related functions, like adding/removing an entry,
searching, looking up a token, etc, and the action that INTERPRET should
take when it finds a token in a given vocab.


There are two ways to add words to the MacEnums vocabulary.
One would be to explicitly do it:
ALSO MacEnums DEFINITIONS
but this should NEVER be done, because MacEnums is not a "normal" vocab
and you should not add words to it with normal Forth defining words.  In
fact, think of MacEnums as a special name-value association list that
behaves a lot like a standard Forth wordlist, but not entirely so.
INTERPRET with a normal Forth wordlist/vocab would compile or execute an
execution token.  INTERPRET with MacEnums takes the word's token and
does what LITERAL would do with it (compiles the token as a constant or
puts the token on the stack)


ParseOneEnum is the primitive that decodes the line of C and adds the
named constant to MacEnums.  It is the ONLY word that modifes the
contents of MacEnums.

MacEnums  *can* be added to the search order so its words are found and
compiled/executed by INTERPRET as described above.
 




 4 Posts in Topic:
Conversion style for OS X include files...
"Charles Turner"  2006-07-14 19:01:08 
Re: Conversion style for OS X include files...
ward@[EMAIL PROTECTED] (  2006-07-15 06:39:07 
Re: Conversion style for OS X include files...
"Charles Turner"  2006-07-15 05:41:36 
Re: Conversion style for OS X include files...
ward@[EMAIL PROTECTED] (  2006-07-15 09:26:31 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Nov 22 13:59:31 CST 2008.