decoration decoration
Stories

GROKLAW
When you want to know more...
decoration
For layout only
Home
Archives
Site Map
Search
About Groklaw
Awards
Legal Research
Timelines
ApplevSamsung
ApplevSamsung p.2
ArchiveExplorer
Autozone
Bilski
Cases
Cast: Lawyers
Comes v. MS
Contracts/Documents
Courts
DRM
Gordon v MS
GPL
Grokdoc
HTML How To
IPI v RH
IV v. Google
Legal Docs
Lodsys
MS Litigations
MSvB&N
News Picks
Novell v. MS
Novell-MS Deal
ODF/OOXML
OOXML Appeals
OraclevGoogle
Patents
ProjectMonterey
Psystar
Quote Database
Red Hat v SCO
Salus Book
SCEA v Hotz
SCO Appeals
SCO Bankruptcy
SCO Financials
SCO Overview
SCO v IBM
SCO v Novell
SCO:Soup2Nuts
SCOsource
Sean Daly
Software Patents
Switch to Linux
Transcripts
Unix Books

Gear

Groklaw Gear

Click here to send an email to the editor of this weblog.


You won't find me on Facebook


Donate

Donate Paypal


No Legal Advice

The information on Groklaw is not intended to constitute legal advice. While Mark is a lawyer and he has asked other lawyers and law students to contribute articles, all of these articles are offered to help educate, not to provide specific legal advice. They are not your lawyers.

Here's Groklaw's comments policy.


What's New

STORIES
No new stories

COMMENTS last 48 hrs
No new comments


Sponsors

Hosting:
hosted by ibiblio

On servers donated to ibiblio by AMD.

Webmaster
Actually, it was one pass | 503 comments | Create New Account
Comments belong to whoever posts them. Please notify us of inappropriate comments.
Actually, it was one pass
Authored by: bprice on Sunday, April 22 2012 @ 06:24 PM EDT
But only one token scan pass.

The subsequent pass(es) went over the internal representation of the program to fill in the missing pieces.
Your description fits two of the later compilers, Pascal and NEWP: they build an internal representation (tree) for a portion of the program text, massage it, emit the code, and then go back to the scanner for more. But the compilers I listed were true one-pass compilers: token-scanning and code emission were intermixed activities.

To be sure, there were special cases in which 'long' lookahead was required: the worst of these — parsing an ALGOL FOR-clause used 7-symbol lookahead in the case of FOR I := 0 STEP 1 UNTIL 10 DO (for various values of 0, 1, and 10), testing that STEPI returned BECOMESY, INTCON, STEPSY, INTCON, UNTILSY, INTCON and DOSY at each lookahead step. If the lookahead succeeded, it accepted the tokens and emitted the simple iteration code; otherwise, it reparsed the FOR clause (from the previously scanned tokens, saved in the ELBAT array, generating (in the normal way) appropriate code for the non-simple cases. (Gee, I'm surprised that I can recall that much of the code I wrote 45 years ago.)

The DECSystem10 compiler may have used the technique you describe, but DEC didn't provide the architectural support that made our one-pass techniques feasible. After all, the PDP-10 was a normal, flat-memory architecture, where the Burroughs large systems were a token-based, truely segmented architecture. We couldn't use a linker back-patch technique, because we didn't have a linker: we designed the architecture to avoid the need for one.

---
--Bill. NAL: question the answers, especially mine.

[ Reply to This | Parent | # ]

Groklaw © Copyright 2003-2013 Pamela Jones.
All trademarks and copyrights on this page are owned by their respective owners.
Comments are owned by the individual posters.

PJ's articles are licensed under a Creative Commons License. ( Details )