Re: Applesoft tokenization phases?

awanderin <awanderin@gmail.com>
Mon, 16 Mar 2020 00:07:19 -0600

          From comp.compilers

Related articles
Applesoft tokenization phases? drikosev@gmail.com (Ev. Drikos) (2020-03-12)
Re: Applesoft tokenization phases? gneuner2@comcast.net (George Neuner) (2020-03-13)
Re: Applesoft tokenization phases? awanderin@gmail.com (awanderin) (2020-03-16)
Re: Applesoft tokenization phases? drikosev@gmail.com (Ev. Drikos) (2020-03-18)
Re: Applesoft tokenization phases? christopher.f.clark@compiler-resources.com (Christopher F Clark) (2020-03-20)
Re: Applesoft tokenization phases? martin@gkc.org.uk (Martin Ward) (2020-03-21)
| List of all articles for this month |
From: awanderin <awanderin@gmail.com>
Newsgroups: comp.compilers
Date: Mon, 16 Mar 2020 00:07:19 -0600
Organization: A noiseless patient Spider
References: 20-03-013
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="56247"; mail-complaints-to="abuse@iecc.com"
Keywords: Basic, history
Posted-Date: 16 Mar 2020 20:51:08 EDT

"Ev. Drikos" <drikosev@gmail.com> writes:
> This question relates to thread "Languages with Optional Spaces".
>
> In an Applesoft II manual I've found at "classiccmp.org" [1], page 7,
> we read that in a variable name any alphanumeric characters after the
> first two are ignored, unless they contain a reserved world. FEND ie
> would be illegal as it contains END.
>
> To implement such a rule one could first recognize keywords and then
> recognize any names. We see in p123 that stmt I is tokenized as II:
> I. stmt: 100 FOR A = LOFT OR CAT To 15
> II. tokens: 100 FOR A = LOF TO RC AT To 15
>
> Yet, I've found ie a program at "hoist-point.com" [2] that contains:
> 110 DIFF = ABS(A(I)-N)


If you type that into Applesoft BASIC, it parses it as:


      110 D IF F = ABS (A(I) - N)


The spaces are how Applesoft lists it (it puts spaces around each token;
variables are not parsed as tokens at entry time, they are only parsed
at run-time).




> Also, an online AppleSoft simulator at calormen.com [3] accepts ie both
> DIFF and FEND as valid variable names.


It is doing things differently than actual Applesoft.


> As it seems, this issue can affect a design choice for the tokenization
> phases of an Applesoft front-end. Is the manual just informative or the
> online simulator does not accept (precisely) the particular dialect?


The latter; the simulator accepts a different dialect.


--
Jerry awanderin at gmail dot com


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.