Re: Advice needed: book on interpreter construction

fburton@nyx10.cs.du.edu (Francis Burton)
27 Jan 1996 01:06:00 -0500

          From comp.compilers

Related articles
Advice needed: book on interpreter construction ibmstuff@sccsi.com (1995-12-30)
Re: Advice needed: book on interpreter construction brianmcg@interaccess.com (1995-12-31)
Re: Advice needed: book on interpreter construction ph@anweald.exnet.co.uk (Patrick Herring) (1996-01-12)
Re: Advice needed: book on interpreter construction martelli@cadlab.it (1996-01-12)
Re: Advice needed: book on interpreter construction bernecky@eecg.toronto.edu (1996-01-14)
Re: Advice needed: book on interpreter construction lhf@csg.uwaterloo.ca (1996-01-15)
Re: Advice needed: book on interpreter construction fburton@nyx10.cs.du.edu (1996-01-27)
Re: Advice needed: book on interpreter construction sy73343@vantage164.vantage.fmr.com (1996-01-31)
| List of all articles for this month |
From: fburton@nyx10.cs.du.edu (Francis Burton)
Newsgroups: comp.compilers
Followup-To: comp.os.msdos.programmer
Date: 27 Jan 1996 01:06:00 -0500
Organization: University of Denver, Math/CS Dept.
References: 95-12-157 96-01-016 96-01-028
Keywords: interpreter, books

lhf@csg.uwaterloo.ca (Luiz Henrique de Figueiredo) writes:
>
>try Lua


Lua is a splendid piece of software, imho -- very clean language
design, powerful through its reflexivity, nice API. The documentation
is a pleasure to read. Would that all software were as neat as Lua!


It also appears to be quite portable. I don't know if it was ever
intended to be used in the MS-DOS environment, but I got it running
more or less "out of the box". Borland C 3.1 compiled all the files
fine. There was a warning for some files: "Undefined structure 'hash'"
which I corrected by including hash.h in the pertinent files. The test
program executed all but one of the sample scripts correctly. Frankly,
I was amazed and delighted.


However, the script long.lua failed spectacularly crashing the DOS
session I was running under Windoze. This script creates an array of
5000 descending integers by adding them one at a time, selection sorts
them into ascending order and prints the 512th element. Using Bounds
Checker to screen memory accesses I discovered that the fault occurred
when a vector node occupying more than 64k bytes memory was created
and initialised (in hashnodecreate). Of course, this was the old
segmented memory problem: pointers in the large memory model wrap
round at 64k. Recompiling using the huge memory model didn't work --
I think pointers have to be declared as 'huge' too.


I'd love to be able to use Lua in my DOS programs, so if anyone can
think of a simple solution to this I would be extremely grateful.


Francis


[maybe followups should be set out of comp.compilers, to
comp.os.msdos.programmer?]
--


Post a followup to this message

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