Re: If you got to choose the syntax, what would you do?



Anton Ertl wrote:
Dennis Ruffer <druffer@xxxxxxxxxxxxx> writes:
First, I've never seen much difference between OTA and OF. Both are tokenizing systems and both have the ability to execute the token streams directly, without translating them into some internal form.

That is contrary to everything I have heard earlier about OF. The
things that I have heard are that OF uses a tokenized form of source
code, not a tokenized form of compiled code.

Typical differences would be whether there are tokens for IF and ELSE
or just branches. Hmm, looking at Section 5.3.3.4 of IEEE 1275, it
indeed looks more like compiled code than source code to me.

The conceptual distinction is that OTA (and Java) tokens are instructions for a virtual machine; OF tokens represent source. The practical distinction is how they are treated: OF tokens are generated by a utility called a 'tokenizer' and are subjected to further processing by a specialized interpreter that handles them much like Forth's text interpreter processes text. The tokens for : and ; will start and finish compiling a definition, for example. In typical usage a packet of OF tokens is expected to contain mostly compilable program source, so the result of interpretation by the host is that a program has been compiled in the native instruction set of the receiving machine. OTA tokens, in contrast, are expected to represent an executable program without need for additional processing in the receiving node beyond the table lookup/indexing to get the executable local code for each token.

I realize the line is a bit blurry, but it's mainly a distinction of expectation.

Cheers,
Elizabeth

--
==================================================
Elizabeth D. Rather (US & Canada) 800-55-FORTH
FORTH Inc. +1 310-491-3356
5155 W. Rosecrans Ave. #1018 Fax: +1 310-978-9454
Hawthorne, CA 90250
http://www.forth.com

"Forth-based products and Services for real-time
applications since 1973."
==================================================
.



Relevant Pages

  • Re: endlinechar in TeX
    ... Now I am feeling somewhat puzzled by when TeX will preprocess, ... When the tokens necessary to satisfy the syntax ... The only interaction between the preprocess and the execution ... There _is_ interaction between execution of code and tokenizing, ...
    (comp.text.tex)
  • Re: endlinechar in TeX
    ... When the tokens necessary to satisfy the syntax ... of a command have been passed, ... The only interaction between the preprocess and the execution ... There _is_ interaction between execution of code and tokenizing, ...
    (comp.text.tex)
  • Re: If you got to choose the syntax, what would you do?
    ... tokenizing systems and both have the ability to execute the token streams directly, without translating them into some internal form. ... The conceptual distinction is that OTA tokens are instructions for a virtual machine; ... will start and finish compiling a definition, ... OTA tokens, in contrast, are expected to represent an executable program without need for additional processing in the receiving node beyond the table lookup/indexing to get the executable local code for each token. ...
    (comp.lang.forth)
  • Re: If you got to choose the syntax, what would you do?
    ... tokenizing systems and both have the ability to execute the token ... Typical differences would be whether there are tokens for IF and ELSE ... indeed looks more like compiled code than source code to me. ... M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html ...
    (comp.lang.forth)
  • Re: If you got to choose the syntax, what would you do?
    ... pretty common these days, so I should put in a few thoughts. ... You can execute the stream serially, but there has to be some local storage to hold the largest loop sequence. ... Anyway, you end up with a few predefined tokens for kernel words, ... execute tokens from the outside world, or put a Forth compiler in there ...
    (comp.lang.forth)