Re: Has anyone hand-written a scanner/parser module?

"Charles E. Bortle, Jr." <charlesb.cca@mpowercom.net>
Mon, 24 Nov 2008 14:51:03 -0800

          From comp.compilers

Related articles
[16 earlier articles]
Re: Has anyone hand-written a scanner/parser module? charlesb.cca@mpowercom.net (Charles E. Bortle, Jr.) (2008-11-18)
Re: Has anyone hand-written a scanner/parser module? r3jjs@yahoo.com (Jeremy J Starcher) (2008-11-19)
Re: Has anyone hand-written a scanner/parser module? armelasselin@hotmail.com (Armel) (2008-11-19)
Re: Has anyone hand-written a scanner/parser module? bobduff@shell01.TheWorld.com (Robert A Duff) (2008-11-23)
Re: Has anyone hand-written a scanner/parser module? bobduff@shell01.TheWorld.com (Robert A Duff) (2008-11-23)
Re: Has anyone hand-written a scanner/parser module? charlesb.cca@mpowercom.net (Charles E. Bortle, Jr.) (2008-11-24)
Re: Has anyone hand-written a scanner/parser module? charlesb.cca@mpowercom.net (Charles E. Bortle, Jr.) (2008-11-24)
Re: Has anyone hand-written a scanner/parser module? jmvdveer@xs4all.nl (Marcel van der Veer) (2008-11-25)
Re: Has anyone hand-written a scanner/parser module? baikaishiuc@gmail.com (xianwei) (2008-11-27)
Pilot compilers Was: Re: Has anyone hand-written a scanner/parser modu cfc@shell01.TheWorld.com (Chris F Clark) (2008-11-28)
Re: Has anyone hand-written a scanner/parser module? d_j_v@mac.com (Dustin Voss) (2008-11-29)
| List of all articles for this month |

From: "Charles E. Bortle, Jr." <charlesb.cca@mpowercom.net>
Newsgroups: comp.compilers
Date: Mon, 24 Nov 2008 14:51:03 -0800
Organization: Compilers Central
References: 08-11-061
Keywords: parse, practice
Posted-Date: 24 Nov 2008 18:03:38 EST

Another example for the OP:


Back in the 80's I was a computer tech with MAI Basic Four, Inc.
(originally Basic Four Corp.) and in some spare time I wrote a PILOT
interpreter in Basic Four Business Basic.


The scanner, parser, and semantics were rather blurred together. (I
have old listings somewhere, but I don' really remember any of the
code details) The gist of the scanner used the string indexing
features of Busisness Basic. (Read a line, then scan along the string
with the indexes)


As John mentioned about the odd syntax of FORTRAN, PILOT syntax is
different. PILOT is supposedly a language that teachers who are not
programmers can use to write instructional and quiz type "programs".
The commands are one or two char long and end with a colon. My
scanner/parser would look for the colon and then backtrack to build
the command symbol.


At the time it was a fun exercise, but I soon got bored with it, as
PILOT is not a very useful language aside from presenting material to
students and testing their knowledge with limited logic.


Back in the 90's I wrote a completely different PILOT interpreter in
Visual Basic 3.0 for Windows, using the same find colon/backtrack
approach. I added my own PILOT extentions that would allow test
results to be logged for the instructor with the intent of producing
an automated testing system, but I never got it finished. (Our church
was just then setting up a computer lab for our school, and I had
thought to provide it to them).


Charles E. Bortle, Jr.


Post a followup to this message

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