Path: csiph.com!xmission!news.snarked.org!border2.nntp.dca1.giganews.com!nntp.giganews.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: mertesthomas@gmail.com Newsgroups: comp.compilers Subject: Re: Languages with optional spaces Date: Sun, 19 Apr 2020 04:04:57 -0700 (PDT) Organization: Compilers Central Lines: 38 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <20-04-008@comp.compilers> References: <20-02-015@comp.compilers> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="70544"; mail-complaints-to="abuse@iecc.com" Keywords: Basic, syntax, history Posted-Date: 23 Apr 2020 12:32:02 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com In-Reply-To: <20-02-015@comp.compilers> Xref: csiph.com comp.compilers:2511 On 19/02/2020 17:35, Maury Markowitz wrote: > I'm trying to write a lex/yacc (flex/bison) interpreter for classic BASICs > like the original DEC/MS, HP/DG etc. I have it mostly working for a good chunk > of 101 BASIC Games (DEF FN is the last feature to add). > > Then I got to Super Star Trek. To save memory, SST removes most spaces, so > lines look like this: > > 100FORI=1TO10 You should take a look at Bas7 a Basic interpreter that I wrote years ago (see http://seed7.sourceforge.net/scrshots/bas7.htm). At this page I describe the different approaches I use to execute old Basic programs. Missing spaces is just one of the problems. I created Bas7 exactly for the purpose to execute Basic programs from the Book "Basic computer Games" from David H. Ahl. The Bas7 interpreter is written in Seed7. So you need to download Seed7 to use Bas7, but this should not be a big problem. There is an installer at https://sourceforge.net/projects/seed7/files/bin/seed7_05_20191117_win.exe/download The installer is for Windows. For Linux you can download the source from https://sourceforge.net/projects/seed7/files/latest/download The file seed7/src/readme.txt describes what to do under Linux. Basically you switch to the seed7/src directory and do a make depend; make Regards, Thomas Mertes -- Seed7 Homepage: http://seed7.sourceforge.net Seed7 - The extensible programming language: User defined statements and operators, abstract data types, templates without special syntax, OO with interfaces and multiple dispatch, statically typed, interpreted or compiled, portable, runs under linux/unix/windows.