From 2074ceedc82ce93e1aff1870744525ca6221e934 Mon Sep 17 00:00:00 2001 From: Bill Joy Date: Mon, 12 Feb 1979 05:23:23 -0800 Subject: [PATCH] BSD 3 development Work on file usr/lib/w2006 Work on file usr/dict/words Work on file usr/doc/bc Work on file usr/doc/REFS Work on file usr/doc/README Work on file usr/doc/awk Work on file usr/doc/cman Work on file usr/doc/m4 Work on file usr/doc/implement Work on file usr/doc/lint Work on file usr/doc/iosys Work on file usr/doc/security Work on file usr/doc/password Work on file usr/doc/make Work on file usr/doc/lex Work on file usr/doc/tbl Work on file usr/doc/sed Work on file usr/games/ching Synthesized-from: 3bsd --- usr/dict/words | 24473 ++++++++++++++++++++++++++++++++++++++++++++ usr/doc/README | 9 + usr/doc/REFS | 405 + usr/doc/awk | 1401 +++ usr/doc/bc | 1059 ++ usr/doc/cman | 2 + usr/doc/implement | 1231 +++ usr/doc/iosys | 1044 ++ usr/doc/lex | 2310 +++++ usr/doc/lint | 1063 ++ usr/doc/m4 | 929 ++ usr/doc/make | 791 ++ usr/doc/password | 558 + usr/doc/security | 351 + usr/doc/sed | 1259 +++ usr/doc/tbl | 1889 ++++ usr/games/ching | 8 + usr/lib/w2006 | 24473 ++++++++++++++++++++++++++++++++++++++++++++ 18 files changed, 63255 insertions(+) create mode 100644 usr/dict/words create mode 100644 usr/doc/README create mode 100644 usr/doc/REFS create mode 100644 usr/doc/awk create mode 100644 usr/doc/bc create mode 100644 usr/doc/cman create mode 100644 usr/doc/implement create mode 100644 usr/doc/iosys create mode 100644 usr/doc/lex create mode 100644 usr/doc/lint create mode 100644 usr/doc/m4 create mode 100644 usr/doc/make create mode 100644 usr/doc/password create mode 100644 usr/doc/security create mode 100644 usr/doc/sed create mode 100644 usr/doc/tbl create mode 100755 usr/games/ching create mode 100644 usr/lib/w2006 diff --git a/usr/dict/words b/usr/dict/words new file mode 100644 index 0000000000..77bd7e7818 --- /dev/null +++ b/usr/dict/words @@ -0,0 +1,24473 @@ +10th +1st +2nd +3rd +4th +5th +6th +7th +8th +9th +a +A&P +a's +Aaron +ABA +Ababa +aback +abalone +abandon +abase +abash +abate +abbas +abbe +abbey +abbot +Abbott +abbreviate +abc +abdicate +abdomen +abdominal +abduct +Abe +abed +Abel +Abelian +Abelson +Aberdeen +Abernathy +aberrant +aberrate +abet +abetted +abetting +abeyance +abeyant +abhorred +abhorrent +abide +Abidjan +Abigail +abject +ablate +ablaze +able +ablution +Abner +abnormal +Abo +aboard +abode +abolish +abolition +abominable +abominate +aboriginal +aborigine +aborning +abort +abound +about +above +aboveboard +aboveground +abovementioned +abrade +Abraham +Abram +Abramson +abrasion +abrasive +abreact +abreast +abridge +abridgment +abroad +abrogate +abrupt +abscess +abscissa +abscissae +absence +absent +absentee +absenteeism +absentia +absentminded +absinthe +absolute +absolution +absolve +absorb +absorbent +absorption +absorptive +abstain +abstention +abstinent +abstract +abstractor +abstruse +absurd +abuilding +abundant +abusable +abuse +abusive +abut +abutted +abutting +abysmal +abyss +Abyssinia +AC +academia +academic +academician +academy +Acadia +acanthus +Acapulco +accede +accelerate +accelerometer +accent +accentual +accentuate +accept +acceptant +acceptor +access +accessible +accession +accessory +accident +accidental +accipiter +acclaim +acclamation +acclimate +acclimatize +accolade +accommodate +accompaniment +accompanist +accompany +accomplice +accomplish +accord +accordant +accordion +accost +account +accountant +accouter +Accra +accredit +accreditate +accretion +accrual +accrue +acculturate +accumulate +accuracy +accurate +accusation +accusative +accuse +accustom +ace +acetate +acetic +acetone +acetylene +ache +achieve +Achilles +aching +achromatic +acid +acidic +acidulous +Ackerman +Ackley +acknowledge +acknowledgeable +ACM +acme +acolyte +acorn +acoustic +acquaint +acquaintance +acquiesce +acquiescent +acquire +acquisition +acquisitive +acquit +acquittal +acquitting +acre +acreage +acrid +acrobacy +acrobat +acrobatic +acronym +acropolis +across +acrylate +acrylic +act +Actaeon +actinic +actinide +actinium +actinolite +actinometer +activate +activation +activism +Acton +actor +actress +Acts +actual +actuarial +actuate +acuity +acumen +acute +acyclic +ad +Ada +adage +adagio +Adair +Adam +adamant +Adams +Adamson +adapt +adaptation +adaptive +add +added +addend +addenda +addendum +addict +Addis +Addison +addition +additional +additive +addle +address +addressee +Addressograph +adduce +Adelaide +Adele +Adelia +Aden +adenoma +adept +adequacy +adequate +adhere +adherent +adhesion +adhesive +adiabatic +adieu +adipic +Adirondack +adjacent +adject +adjectival +adjoin +adjoint +adjourn +adjudge +adjudicate +adjunct +adjust +adjutant +Adkins +Adler +administer +administrable +administrate +administratrix +admiral +admiralty +admiration +admire +admissible +admission +admit +admittance +admitted +admitting +admix +admixture +admonish +admonition +ado +adobe +adolescent +Adolph +Adolphus +Adonis +adopt +adoption +adoptive +adore +adorn +adrenal +adrenaline +Adrian +Adriatic +Adrienne +adrift +adroit +adsorb +adsorbate +adsorption +adsorptive +adulate +adult +adulterate +adulterous +adultery +adulthood +advance +advantage +advantageous +advent +adventitious +adventure +adventurous +adverb +adverbial +adversary +adverse +advert +advertise +advice +advisable +advise +advisee +advisor +advisory +advocacy +advocate +Aegean +aegis +Aeneas +Aeneid +aeolian +Aeolus +aerate +aerial +Aerobacter +aerobic +aerodynamic +aerogene +aeronautic +aerosol +aerospace +Aeschylus +aesthete +aesthetic +afar +affable +affair +affect +affectate +affectionate +afferent +affiance +affidavit +affiliate +affine +affinity +affirm +affirmation +affirmative +affix +afflict +affluence +affluent +afford +afforest +afforestation +affront +Afghan +Afghanistan +aficionado +afield +afire +aflame +afloat +afoot +aforementioned +aforesaid +aforethought +afraid +afresh +Africa +afro +aft +aftereffect +afterglow +afterimage +afterlife +aftermath +afternoon +afterthought +afterward +again +against +Agamemnon +agate +Agatha +agave +age +Agee +agenda +agent +agglomerate +agglutinate +agglutinin +aggravate +aggregate +aggression +aggressive +aggressor +aggrieve +aghast +agile +aging +agitate +agleam +Agnes +Agnew +agnomen +agnostic +ago +agone +agony +agouti +agrarian +agree +agreeable +agreed +agreeing +Agricola +agricultural +agriculture +agrimony +ague +Agway +ah +ahead +ahem +Ahmadabad +ahoy +aid +Aida +aide +Aides +Aiken +ail +ailanthus +aile +aileron +aim +ain't +Ainu +air +airborne +aircraft +airdrop +airedale +Aires +airfare +airfield +airflow +airframe +airlift +airline +airlock +airmail +airman +airmass +airmen +airpark +airplane +airport +airspeed +airstrip +airtight +airway +airy +aisle +Aitken +ajar +Ajax +Akers +akin +Akron +ala +Alabama +Alabamian +alabaster +alacrity +alai +Alameda +Alamo +alan +alarm +Alaska +alb +alba +albacore +Albania +Albanian +Albany +albatross +albeit +Alberich +Albert +Alberta +Alberto +Albrecht +Albright +album +albumin +Albuquerque +Alcestis +alchemy +Alcmena +Alcoa +alcohol +alcoholic +alcoholism +Alcott +alcove +Aldebaran +aldehyde +Alden +alder +alderman +aldermen +Aldrich +aldrin +ale +Alec +Aleck +aleph +alert +alewife +Alex +Alexander +Alexandra +Alexandre +Alexandria +Alexei +Alexis +alfalfa +alfonso +Alfred +Alfredo +alfresco +alga +algae +algaecide +algal +algebra +algebraic +Algenib +Alger +Algeria +Algerian +Algiers +alginate +Algol +Algonquin +algorithm +algorithmic +Alhambra +alia +alias +alibi +Alice +Alicia +alien +alienate +alight +align +alike +alimony +aliphatic +aliquot +Alison +Alistair +alive +alizarin +alkali +alkaline +alkaloid +all +Allah +allay +allegate +allege +Allegheny +allegiant +allegoric +allegory +Allegra +allegro +allele +allemand +Allen +Allentown +allergic +allergy +alleviate +alley +alleyway +alliance +allied +alligator +Allis +Allison +alliterate +allocable +allocate +allot +allotropic +allotted +allotting +allow +allowance +alloy +allspice +Allstate +allude +allure +allusion +allusive +alluvial +alluvium +ally +allyl +Allyn +alma +Almaden +almagest +almanac +almighty +almond +almost +aloe +aloft +aloha +alone +along +alongside +aloof +aloud +alp +alpenstock +Alpert +alpha +alphabet +alphabetic +alphanumeric +Alpheratz +Alphonse +alpine +Alps +already +Alsatian +also +Alsop +Altair +altar +alter +alterate +altercate +alterman +altern +alternate +althea +although +altimeter +altitude +alto +altogether +Alton +altruism +altruist +alum +alumina +aluminate +alumna +alumnae +alumni +alumnus +alundum +Alva +Alvarez +alveolar +alveoli +alveolus +Alvin +alway +alyssum +am +AMA +Amadeus +amalgam +amalgamate +amanita +amanuensis +amaranth +Amarillo +amass +amateur +amateurish +amatory +amaze +Amazon +ambassador +amber +ambiance +ambidextrous +ambient +ambiguity +ambiguous +ambition +ambitious +ambivalent +amble +ambling +ambrose +ambrosia +ambrosial +ambulant +ambulatory +ambuscade +ambush +Amelia +ameliorate +amen +amend +amende +Amerada +America +American +Americana +Americanism +americium +Ames +amethyst +amethystine +Amherst +ami +amicable +amid +amide +amidst +amigo +amino +aminobenzoic +amiss +amity +Amman +Ammerman +ammeter +ammo +ammonia +ammoniac +ammonium +ammunition +Amoco +amoeba +amoebae +amok +among +amongst +amoral +amorphous +amort +Amos +amount +amperage +ampere +ampersand +Ampex +amphetamine +amphibian +amphibious +amphibole +amphibology +ample +amplifier +amplify +amplitude +amply +amputate +amra +Amsterdam +Amtrak +amulet +amuse +amy +amygdaloid +an +ana +Anabaptist +Anabel +anachronism +anachronistic +anaconda +anaerobic +anaglyph +anagram +Anaheim +analeptic +analgesic +analogous +analogue +analogy +analyses +analysis +analyst +analytic +anamorphic +anaplasmosis +anarch +anarchic +anarchy +anastigmat +anastigmatic +anastomosis +anastomotic +anathema +Anatole +anatomic +anatomy +ancestor +ancestral +ancestry +anchor +anchorage +anchorite +anchoritism +anchovy +ancient +ancillary +and +Andean +Andersen +Anderson +Andes +andesine +andesite +Andorra +Andover +Andre +Andrea +Andrei +Andrew +Andrews +Andromache +Andromeda +Andy +anecdotal +anecdote +anemone +anent +anew +angel +Angela +Angeles +angelfish +angelic +Angelica +Angelina +Angeline +Angelo +anger +Angie +angiosperm +angle +Angles +Anglican +Anglicanism +angling +Anglo +Anglophobia +Angola +Angora +angry +angst +angstrom +anguish +angular +Angus +anharmonic +Anheuser +anhydride +anhydrite +anhydrous +ani +aniline +animadversion +animadvert +animal +animate +animism +animosity +anion +anionic +anise +aniseikonic +anisotropic +anisotropy +Anita +Ankara +ankle +Ann +Anna +annal +Annale +Annalen +Annapolis +Anne +anneal +annex +Annie +annihilate +anniversary +annotate +announce +annoy +annoyance +annual +annuity +annul +annular +annuli +annulled +annulling +annulus +annum +annunciate +anode +anodic +anomalous +anomaly +anomie +anonymity +anonymous +anorexia +anorthic +anorthite +anorthosite +another +Anselm +Anselmo +ANSI +answer +ant +antacid +Antaeus +antagonism +antagonist +antagonistic +Antarctica +Antares +ante +anteater +antebellum +antecedent +antedate +antelope +antenna +antennae +anterior +anthem +anther +anthology +Anthony +anthracite +anthracnose +anthropogenic +anthropology +anthropomorphic +anti +antic +anticipate +anticipatory +Antietam +antigen +Antigone +antigorite +antimony +Antioch +antipasto +antipathy +antiperspirant +antiphonal +antipodes +antiquarian +antiquary +antiquated +antique +antiquity +antisemitic +antisemitism +antithetic +antler +Antoine +Antoinette +Anton +Antonio +Antony +anus +anvil +anxiety +anxious +any +anybody +anybody'd +anyhow +anyone +anyplace +anything +anyway +anywhere +aorta +apache +apart +apartheid +apathetic +apathy +apatite +ape +aperiodic +aperture +apex +aphasia +aphasic +aphelion +aphid +aphorism +Aphrodite +apices +apiece +aplomb +apocalypse +apocalyptic +Apocrypha +apocryphal +apogee +Apollo +Apollonian +apologetic +apologia +apology +apostate +apostle +apostolic +apostrophe +apothecary +apothegm +apotheosis +Appalachia +appall +appanage +apparatus +apparel +apparent +apparition +appeal +appear +appearance +appeasable +appease +appellant +appellate +append +appendage +appendices +appendix +appertain +appetite +Appian +applaud +applause +apple +Appleby +applejack +Appleton +appliance +applicable +applicant +applicate +applied +applique +apply +appoint +appointe +appointee +apport +apposite +apposition +appraisal +appraise +appreciable +appreciate +apprehend +apprehension +apprehensive +apprentice +apprise +approach +approbation +appropriable +appropriate +approval +approve +approximable +approximant +approximate +apricot +April +apron +apropos +apse +apt +aptitude +aqua +aquarium +Aquarius +aquatic +aqueduct +aqueous +Aquila +Aquinas +Arab +arabesque +Arabia +Arabic +Araby +Arachne +arachnid +arbiter +arbitrage +arbitrary +arbitrate +arboreal +arboretum +arbutus +arc +arcade +Arcadia +arcana +arcane +arccos +arccosine +arch +archae +archaic +archaism +archangel +archbishop +archdiocese +archenemy +Archer +archery +archetype +archetypical +archfool +Archibald +Archimedes +arching +archipelago +architect +architectonic +architectural +architecture +archival +archive +arcing +arcsin +arcsine +arctan +arctangent +arctic +Arcturus +Arden +ardency +ardent +arduous +are +area +areaway +areawide +aren't +arena +arenaceous +Arequipa +Ares +Argentina +argillaceous +Argive +argo +argon +Argonaut +Argonne +argot +argue +argument +argumentation +argumentative +Argus +arhat +Ariadne +Arianism +arid +Aries +arise +arisen +aristocracy +aristocrat +aristocratic +Aristotelean +Aristotelian +Aristotle +arithmetic +Arizona +ark +Arkansan +Arkansas +Arlen +Arlene +Arlington +arm +armada +armadillo +Armageddon +armament +Armata +armature +armchair +Armco +Armenian +armful +armhole +armillaria +armistice +armload +armoire +Armonk +Armour +armpit +Armstrong +army +Arnold +aroma +aromatic +arose +around +arousal +arouse +ARPA +arpeggio +arrack +Arragon +arraign +arrange +arrangeable +array +arrear +arrest +Arrhenius +arrival +arrive +arrogant +arrogate +arrow +arrowhead +arrowroot +arroyo +arsenal +arsenate +arsenic +arsenide +arsine +arson +art +Artemis +artemisia +arterial +arteriole +arteriolosclerosis +arteriosclerosis +artery +artful +arthritis +Arthur +artichoke +article +articulate +articulatory +Artie +artifact +artifice +artificial +artillery +artisan +artistry +Arturo +artwork +arty +Aruba +arum +aryl +as +asbestos +ascend +ascendant +ascension +ascent +ascertain +ascetic +asceticism +ascomycetes +ascribe +ascription +aseptic +ash +ashame +ashen +Asher +Asheville +Ashland +Ashley +ashman +ashmen +Ashmolean +ashore +ashtray +ashy +Asia +Asiatic +aside +Asilomar +asinine +ask +askance +askew +asleep +asocial +asparagus +aspect +aspen +asperity +aspersion +asphalt +aspheric +asphyxiate +aspidistra +aspirant +aspirate +aspire +aspirin +asplenium +ass +assai +assail +assailant +Assam +assassin +assassinate +assault +assay +assemblage +assemble +assent +assert +assess +assessor +asset +assiduity +assiduous +assign +assignation +assignee +assimilable +assimilate +assist +assistant +associable +associate +associative +assonant +assort +assuage +assume +assumption +assurance +assure +Assyria +Assyriology +Astarte +astatine +aster +asteria +asterisk +asteroid +asteroidal +asthma +astigmat +astigmatic +astigmatism +ASTM +astonish +Astor +Astoria +astound +astraddle +astral +astray +astride +astringent +astronaut +astronautic +astronomer +astronomic +astronomy +astrophysical +astrophysics +astute +Asuncion +asunder +asylum +asymmetric +asymmetry +asymptote +asymptotic +asynchronous +asynchrony +at +AT&T +Atalanta +atavism +atavistic +Atchison +ate +Athabascan +atheist +Athena +Athenian +Athens +athlete +athletic +athwart +Atkins +Atkinson +Atlanta +atlantes +atlantic +Atlantica +Atlantis +atlas +atmosphere +atmospheric +atom +atomic +atonal +atone +atop +Atreus +atrocious +atrocity +atrophic +atrophy +Atropos +attach +attache +attack +attain +attainder +attempt +attend +attendant +attendee +attention +attentive +attenuate +attest +attestation +attic +Attica +attire +attitude +attorney +attract +attribute +attribution +attributive +attrition +attune +Atwater +Atwood +atypic +Auberge +Aubrey +auburn +auction +auctioneer +audacious +audacity +audible +audience +audio +audiotape +audiovisual +audit +audition +auditor +auditorium +auditory +Audrey +Audubon +Auerbach +Aug +Augean +auger +augite +augment +augmentation +augur +august +Augusta +Augustan +Augustine +Augustus +auk +aunt +auntie +aura +aural +Aurelius +aureomycin +auric +Auriga +aurora +Auschwitz +auspices +auspicious +austere +Austin +Australia +Australis +australite +Austria +authentic +authenticate +author +authoritarian +authoritative +autism +autistic +auto +autobiography +autoclave +autocollimate +autocorrelate +autocracy +autocrat +autocratic +autograph +automat +automata +automate +automatic +automaton +automobile +automotive +autonomic +autonomous +autonomy +autopsy +autosuggestible +autotransformer +autumn +autumnal +auxiliary +avail +avalanche +avarice +avaricious +Ave +avenge +Aventine +avenue +aver +average +averred +averring +averse +aversion +avert +avertive +Avery +Avesta +aviary +aviate +aviatrix +avid +avionic +Avis +Aviv +avocado +avocate +avocet +Avogadro +avoid +avoidance +Avon +avow +await +awake +awaken +award +aware +awash +away +awe +awesome +awful +awhile +awkward +awl +awn +awoke +awry +ax +axe +axes +axial +axiology +axiom +axiomatic +axis +axisymmetric +axle +axon +aye +Ayers +Aylesbury +azalea +Azerbaijan +azimuth +azimuthal +Aztec +Aztecan +azure +b +b's +babbitt +babble +Babcock +babe +Babel +baboon +baby +babyhood +Babylon +Babylonian +babysat +babysit +babysitting +baccarat +Bacchus +Bach +bachelor +bacilli +bacillus +back +backboard +backbone +backdrop +backfill +background +backhand +backlash +backlog +backorder +backpack +backplane +backplate +backside +backspace +backstage +backstitch +backstop +backtrack +backup +backward +backwater +backwood +backyard +bacon +bacteria +bacterial +bacterium +bad +bade +Baden +badge +badinage +badland +badminton +Baffin +baffle +bag +bagatelle +baggage +bagging +baggy +Baghdad +Bagley +bagpipe +bah +Bahama +Bahrein +bail +Bailey +bailiff +Baird +bait +bake +Bakelite +Bakersfield +bakery +Bakhtiari +baklava +Baku +balance +Balboa +balcony +bald +baldpate +Baldwin +baldy +bale +baleen +baleful +Balfour +Bali +Balinese +balk +Balkan +balky +ball +ballad +Ballard +ballast +balled +ballerina +ballet +balletomane +ballfield +balloon +ballot +ballroom +ballyhoo +balm +balmy +balsa +balsam +Baltic +Baltimore +Baltimorean +balustrade +Balzac +bam +Bamako +Bamberger +Bambi +bamboo +ban +banal +banana +Banbury +band +bandage +bandgap +bandit +bandpass +bandstand +bandstop +bandwagon +bandwidth +bandy +bane +baneberry +baneful +bang +bangkok +Bangladesh +bangle +Bangor +Bangui +banish +banister +banjo +bank +bankrupt +bankruptcy +Banks +banning +banquet +banshee +bantam +banter +Bantu +Bantus +baptism +baptismal +Baptist +Baptiste +baptistery +bar +barb +Barbados +Barbara +barbarian +barbaric +barbarism +barbarous +barbecue +barbell +barber +barberry +barbital +barbiturate +Barbour +barbudo +Barcelona +Barclay +bard +bare +barefaced +barefoot +barfly +bargain +barge +baritone +barium +bark +barkeep +barley +Barlow +barn +Barnabas +barnacle +Barnard +Barnes +Barnet +Barnett +Barney +Barnhard +barnstorm +barnyard +barometer +barometric +baron +baroness +baronet +baronial +barony +baroque +Barr +barrack +barracuda +barrage +barre +barrel +barren +Barrett +barrette +barricade +barrier +barring +Barrington +barrow +Barry +Barrymore +Barstow +bartend +bartender +barter +Barth +Bartholomew +Bartlett +Bartok +Barton +barycentric +basal +base +baseball +baseband +baseboard +Basel +baseline +baseman +basemen +baseplate +bash +bashaw +bashful +basic +basidiomycetes +basil +basilar +basilisk +basin +basis +bask +basket +basketball +basophilic +bass +Bassett +bassi +bassinet +basso +basswood +bastard +baste +bastion +bat +Batavia +batch +Batchelder +bate +bateau +Bateman +bater +Bates +bath +bathe +bathos +bathrobe +bathroom +bathtub +Bathurst +batik +baton +Bator +batt +battalion +Battelle +batten +battery +battle +battlefield +battlefront +battleground +batwing +bauble +baud +Baudelaire +Bauer +Bauhaus +Bausch +bauxite +Bavaria +bawd +bawdy +bawl +Baxter +bay +bayberry +Bayda +bayed +Bayesian +Baylor +bayonet +Bayonne +bayou +Bayport +Bayreuth +bazaar +be +beach +beachhead +beacon +bead +beadle +beady +beak +beam +bean +bear +bearberry +beard +Beardsley +bearish +beast +beat +beaten +beater +beatific +beatify +beatitude +beatnik +Beatrice +beau +Beaujolais +Beaumont +Beauregard +beauteous +beautiful +beautify +beauty +beaux +beaver +bebop +becalm +became +because +Bechtel +beck +Becker +becket +Beckman +beckon +Becky +become +bed +bedazzle +bedbug +bedding +bedfast +Bedford +bedim +bedimmed +bedimming +bedlam +bedpost +bedraggle +bedridden +bedrock +bedroom +bedside +bedspread +bedspring +bedstraw +bedtime +bee +Beebe +beebread +beech +Beecham +beechwood +beef +beefsteak +beefy +beehive +been +beep +beer +beet +Beethoven +beetle +befall +befallen +befell +befit +befitting +befog +befogging +before +beforehand +befoul +befuddle +beg +began +beget +begetting +beggar +beggary +begging +begin +beginner +beginning +begonia +begotten +begrudge +beguile +begun +behalf +behave +behavioral +behead +beheld +behind +behold +beige +being +Beirut +bel +Bela +belate +belch +Belfast +belfry +Belgian +Belgium +Belgrade +belie +belief +believe +belittle +bell +Bella +belladonna +Bellamy +Bellatrix +bellboy +belle +bellflower +bellhop +bellicose +belligerent +Bellingham +Bellini +bellman +bellmen +bellow +bellum +bellwether +belly +bellyache +bellyfull +Belmont +Beloit +belong +belove +below +Belshazzar +belt +Beltsville +belvedere +belvidere +belying +BEMA +bemadden +beman +bemoan +bemuse +Ben +bench +benchmark +bend +Bender +Bendix +beneath +Benedict +Benedictine +benediction +benefactor +benefice +beneficent +beneficial +beneficiary +benefit +Benelux +benevolent +Bengal +Bengali +benight +benign +Benjamin +Bennett +Bennington +Benny +Benson +bent +Bentham +benthic +Bentley +Benton +Benz +Benzedrine +benzene +Beowulf +beplaster +bequeath +bequest +berate +Berea +bereave +bereft +Berenices +beret +berg +bergamot +Bergen +Bergland +Berglund +Bergman +Bergson +Bergstrom +beribbon +beriberi +Berkeley +berkelium +Berkowitz +Berkshire +Berlin +Berlioz +Berlitz +Berman +Bermuda +Bern +Bernadine +Bernard +Bernardino +Bernardo +berne +Bernet +Bernhard +Bernice +Bernie +Berniece +Bernini +Bernoulli +Bernstein +Berra +berry +berserk +Bert +berth +Bertha +Bertie +Bertram +Bertrand +Berwick +beryl +beryllium +beseech +beset +besetting +beside +besiege +besmirch +besotted +bespeak +bespectacled +bespoke +Bess +Bessel +Bessemer +Bessie +best +bestial +bestir +bestirring +bestow +bestowal +bestseller +bestselling +bestubble +bet +beta +betatron +betel +Betelgeuse +beth +bethel +Bethesda +Bethlehem +bethought +betide +betoken +betony +betray +betrayal +betrayer +betroth +betrothal +Betsey +Betsy +Bette +betting +bettor +Betty +between +betwixt +bevel +beverage +Beverly +bevy +bewail +beware +bewhisker +bewilder +bewitch +bey +beyond +bezel +bhoy +Bhutan +bianco +bias +biaxial +bib +bibb +Bible +biblical +bibliography +bibliophile +bicameral +bicarbonate +bicep +biceps +bichromate +bicker +biconcave +biconnected +bicycle +bid +biddable +bidding +biddy +bide +bidiagonal +bidirectional +bien +biennial +biennium +bifocal +bifurcate +big +Bigelow +Biggs +bigot +bigotry +biharmonic +bijouterie +bikini +bilateral +bilayer +bile +bilge +bilharziasis +bilinear +bilingual +bilk +bill +billboard +billet +billiard +Billie +Billiken +Billings +billion +billionth +billow +billy +Biltmore +bimetallic +bimetallism +Bimini +bimodal +bimolecular +bimonthly +bin +binary +binaural +bind +bindery +bindle +bindweed +bing +binge +Bingham +Binghamton +bingle +Bini +binocular +binomial +binuclear +biochemic +biochemist +biochemistry +biograph +biography +biology +biomass +biomedical +biometric +Biometrika +biometry +biophysic +biophysical +biophysicist +biopsy +bioscience +biosphere +biostatistic +biosynthesize +biota +biotic +biotite +bipartisan +bipartite +biplane +bipolar +biracial +birch +bird +birdbath +birdie +birdlike +birdseed +birdwatch +birefringent +Birgit +Birmingham +birth +birthday +birthplace +birthright +biscuit +bisect +bishop +bishopric +Bismarck +Bismark +bismuth +bison +bisque +Bissau +bistable +bistate +bit +bitch +bite +bitt +bitten +bittern +bitternut +bitterroot +bittersweet +bitumen +bituminous +bitwise +bivalve +bivariate +bivouac +biz +bizarre +Bizet +blab +blabbing +black +blackball +blackberry +blackbird +blackboard +blackbody +Blackburn +blacken +Blackfeet +blackjack +blackmail +Blackman +blackout +blacksmith +Blackstone +Blackwell +bladder +bladdernut +bladderwort +blade +Blaine +Blair +Blake +blame +blameworthy +blanc +blanch +Blanchard +Blanche +bland +blank +blanket +blare +blaspheme +blasphemous +blasphemy +blast +blat +blatant +blather +blatting +Blatz +blaze +blazon +bleach +bleak +bleary +bleat +bled +bleed +Bleeker +blemish +blend +Blenheim +bless +blest +blew +blight +blimp +blind +blindfold +blink +Blinn +blip +bliss +blissful +blister +blithe +blitz +blizzard +bloat +blob +bloc +Bloch +block +blockade +blockage +blockhouse +blocky +bloke +Blomberg +Blomquist +blond +blonde +blood +bloodbath +bloodhound +bloodroot +bloodshed +bloodshot +bloodstain +bloodstone +bloodstream +bloody +bloom +Bloomfield +Bloomington +bloop +blossom +blot +blotch +blotting +blouse +blow +blowfish +blown +blowup +blubber +bludgeon +blue +blueback +blueberry +bluebill +bluebird +bluebonnet +bluebook +bluebush +bluefish +bluegill +bluegrass +bluejacket +blueprint +bluestocking +bluet +bluff +bluish +Blum +Blumenthal +blunder +blunt +blur +blurring +blurry +blurt +blush +bluster +blustery +blutwurst +Blythe +BMW +boa +boar +board +boardinghouse +boast +boastful +boat +boathouse +boatload +boatman +boatmen +boatswain +boatyard +bob +Bobbie +bobbin +bobbing +bobble +bobby +bobcat +bobolink +Boca +bock +bode +bodhisattva +bodice +bodied +Bodleian +body +bodybuilder +bodybuilding +bodyguard +Boeing +Boeotian +bog +bogey +bogeymen +bogging +boggle +boggy +Bogota +bogus +bogy +Bohemia +Bohr +boil +Bois +Boise +boisterous +bold +boldface +bole +boletus +bolivar +Bolivia +bolo +Bologna +bolometer +Bolshevik +Bolshevism +Bolshevist +Bolshoi +bolster +bolt +Bolton +Boltzmann +bomb +bombard +bombast +bombastic +Bombay +bombproof +bon +bona +bonanza +Bonaparte +Bonaventure +bond +bondage +bondsman +bondsmen +bone +bonfire +bong +bongo +Boniface +bonito +Bonn +bonnet +Bonneville +Bonnie +bonus +bony +bonze +boo +booby +boogie +book +bookbind +bookcase +bookend +bookie +bookish +bookkeep +booklet +bookplate +bookseller +bookshelf +bookshelves +bookstore +booky +boolean +boom +boomerang +boon +Boone +boor +boorish +boost +boot +Bootes +booth +bootleg +bootlegger +bootlegging +bootstrap +bootstrapping +booty +booze +bop +bopping +borate +borax +Bordeaux +bordello +Borden +border +borderland +borderline +bore +Borealis +Boreas +boredom +Borg +boric +Boris +born +borne +Borneo +boron +borosilicate +borough +Borroughs +borrow +Bosch +Bose +bosom +boson +boss +Boston +Bostonian +Boswell +botanic +botanist +botany +botch +botfly +both +bothersome +Botswana +bottle +bottleneck +bottom +bottommost +botulin +botulism +Boucher +bouffant +bough +bought +boulder +boulevard +bounce +bouncy +bound +boundary +bounty +bouquet +bourbon +bourgeois +bourgeoisie +bourn +boustrophedon +bout +boutique +bovine +bow +Bowditch +Bowdoin +bowel +Bowen +bowfin +bowie +bowl +bowline +bowman +bowmen +bowstring +box +boxcar +boxwood +boxy +boy +boyar +Boyce +boycott +Boyd +boyhood +boyish +Boyle +Boylston +BP +brace +bracelet +bracken +bracket +brackish +bract +brad +Bradbury +Bradford +Bradley +Bradshaw +Brady +brae +brag +Bragg +bragging +Brahmaputra +Brahms +Brahmsian +braid +Braille +brain +Brainard +brainstorm +brainwash +brainy +brake +brakeman +bramble +bran +branch +brand +Brandeis +Brandenburg +brandish +Brandon +Brandt +brandy +brandywine +Braniff +brant +brash +Brasilia +brass +brassiere +brassy +bratwurst +Braun +bravado +brave +bravery +bravo +bravura +brawl +bray +brazen +brazier +Brazil +Brazilian +Brazzaville +breach +bread +breadboard +breadfruit +breadroot +breadth +break +breakage +breakaway +breakdown +breakfast +breakoff +breakpoint +breakthrough +breakup +breakwater +bream +breast +breastplate +breastwork +breath +breathe +breathtaking +breathy +breccia +bred +breech +breeches +breed +breeze +breezy +Bremen +bremsstrahlung +Brenda +Brendan +Brennan +Brenner +Brent +Brest +brethren +Breton +Brett +breve +brevet +brevity +brew +brewery +Brewster +Brian +briar +bribe +bribery +Brice +brick +brickbat +bricklayer +bricklaying +bridal +bride +bridegroom +bridesmaid +bridge +bridgeable +bridgehead +Bridgeport +Bridget +Bridgetown +Bridgewater +bridgework +bridle +brief +briefcase +brig +brigade +brigadier +brigantine +Briggs +Brigham +bright +brighten +Brighton +brilliant +Brillouin +brim +brimful +brimming +brimstone +Brindisi +brindle +brine +bring +brink +brinkmanship +briny +Brisbane +brisk +bristle +Bristol +Britain +Britannic +Britannica +britches +British +Briton +Brittany +Britten +brittle +broach +broad +broadcast +broaden +broadloom +broadside +Broadway +brocade +broccoli +brochure +Brock +brockle +Broglie +broil +broke +broken +brokerage +Bromfield +bromide +bromine +Bromley +bronchi +bronchial +bronchiolar +bronchiole +bronchitis +bronchus +bronco +Bronx +bronze +bronzy +brood +broody +brook +Brooke +Brookhaven +Brookline +Brooklyn +brookside +broom +broomcorn +broth +brothel +brother +brotherhood +brought +brouhaha +brow +browbeaten +brown +Browne +Brownell +Brownian +brownie +brownish +browse +Bruce +brucellosis +Bruckner +Bruegel +bruise +bruit +Brumidi +brunch +brunette +Brunhilde +Bruno +Brunswick +brunt +brush +brushfire +brushlike +brushwork +brushy +brusque +Brussels +brutal +brute +Bryan +Bryant +Bryce +Bryn +bryophyta +bryophyte +bryozoa +BSTJ +BTL +bub +bubble +Buchanan +Bucharest +Buchenwald +Buchwald +buck +buckaroo +buckboard +bucket +bucketfull +buckeye +buckhorn +buckle +Buckley +Bucknell +buckshot +buckskin +buckthorn +buckwheat +bucolic +bud +Budapest +Budd +Buddha +Buddhism +Buddhist +budding +buddy +budge +budget +budgetary +Budweiser +Buena +Buenos +buff +buffalo +buffet +bufflehead +buffoon +bug +bugaboo +bugeyed +bugging +buggy +bugle +Buick +build +buildup +built +builtin +Bujumbura +bulb +bulblet +Bulgaria +bulge +bulk +bulkhead +bulky +bull +bulldog +bulldoze +bullet +bulletin +bullfinch +bullfrog +bullhead +bullhide +bullish +bullock +bullseye +bullwhack +bully +bullyboy +bulrush +bulwark +bum +bumble +bumblebee +bumming +bump +bumptious +bun +bunch +Bundestag +bundle +bundy +bungalow +bungle +bunk +bunkmate +bunny +Bunsen +bunt +Bunyan +buoy +buoyant +burbank +Burch +burden +burdensome +burdock +bureau +bureaucracy +bureaucrat +bureaucratic +buret +burette +burg +burgeon +burgess +burgher +burglar +burglarproof +burglary +Burgundian +Burgundy +burial +buried +Burke +burl +burlap +burlesque +burley +Burlington +burly +Burma +Burmese +burn +Burnett +Burnham +burnish +Burnside +burnt +burp +Burr +burro +Burroughs +burrow +bursitis +burst +bursty +Burt +Burton +Burtt +Burundi +bury +bus +busboy +Busch +bush +bushel +bushmaster +Bushnell +bushwhack +bushy +business +businessman +businessmen +buss +bust +bustard +bustle +busy +but +butadiene +butane +butch +butchery +butene +buteo +butler +butt +butte +butterball +buttercup +butterfat +Butterfield +butterfly +buttermilk +butternut +buttery +buttock +button +buttonhole +buttonweed +buttress +Buttrick +butyl +butyrate +buxom +Buxtehude +Buxton +buy +buyer +buzz +Buzzard +buzzer +buzzing +buzzword +buzzy +by +bye +Byers +bygone +bylaw +byline +bypass +bypath +byproduct +Byrd +Byrne +byroad +Byron +Byronic +bystander +byte +byway +byword +Byzantine +Byzantium +c +c's +cab +cabal +cabana +cabaret +cabbage +cabdriver +cabin +cabinet +cabinetmake +cabinetry +cable +Cabot +cacao +cachalot +cache +cackle +CACM +cacophonist +cacophony +cacti +cactus +cadaver +cadaverous +caddis +caddy +cadent +cadenza +cadet +Cadillac +cadmium +cadre +Cady +Caesar +cafe +cafeteria +cage +cagey +Cahill +cahoot +caiman +Cain +Caine +cairn +Cairo +cajole +cake +Cal +Calais +calamitous +calamity +calamus +calcareous +calcify +calcite +calcium +calculable +calculate +calculi +calculus +Calcutta +Calder +caldera +Caldwell +Caleb +calendar +calendrical +calf +calfskin +Calgary +Calhoun +caliber +calibrate +calibre +calico +California +californium +caliper +caliph +caliphate +calisthenic +Calkins +call +calla +Callaghan +Callahan +caller +calligraph +calligraphy +calliope +Callisto +callous +callus +calm +caloric +calorie +calorimeter +calorimetric +calorimetry +Calumet +calumniate +calumny +Calvary +calve +Calvert +Calvin +Calvinist +calypso +cam +camaraderie +camber +Cambodia +cambric +Cambridge +Camden +came +camel +camelback +camellia +camelopard +Camelot +cameo +camera +cameraman +cameramen +Cameron +Cameroun +camilla +Camille +Camino +camouflage +camp +campaign +campanile +Campbell +campfire +campground +campion +campsite +campus +can +can't +Canaan +Canada +Canadian +canal +canary +Canaveral +Canberra +cancel +cancellate +cancer +cancerous +candela +candelabra +candid +candidacy +candidate +Candide +candle +candlelight +candlestick +candlewick +candy +cane +Canfield +canine +Canis +canister +canker +cankerworm +canna +cannabis +cannel +cannery +cannibal +canning +cannister +cannon +cannonball +cannot +canny +canoe +Canoga +canon +canonic +canopy +cant +cantaloupe +canteen +Canterbury +canterelle +canticle +cantilever +cantle +canto +canton +Cantonese +cantor +canvas +canvasback +canvass +canyon +cap +capacious +capacitance +capacitate +capacitive +capacitor +capacity +cape +capella +caper +Capetown +capillary +Capistrano +capita +capital +capitol +Capitoline +capitulate +capo +capping +caprice +capricious +Capricorn +capstan +capstone +capsule +captain +captaincy +caption +captious +captivate +captive +captor +capture +Caputo +capybara +car +carabao +Caracas +caramel +caravan +caraway +carbide +carbine +carbohydrate +Carboloy +carbon +carbonaceous +carbonate +Carbondale +Carbone +carbonic +carbonyl +carborundum +carboxy +carboy +carbuncle +carcass +carcinogen +carcinogenic +carcinoma +card +cardamom +cardboard +cardiac +cardinal +cardiology +cardiovascular +care +careen +career +carefree +careful +caress +caret +caretaker +careworn +Carey +Cargill +cargo +cargoes +Carib +Caribbean +caribou +caricature +Carl +Carla +Carleton +Carlin +Carlisle +Carlo +carload +Carlson +Carlton +Carlyle +Carmela +Carmen +Carmichael +carmine +carnage +carnal +carnation +carne +Carnegie +carney +carnival +carob +carol +Carolina +Caroline +Carolingian +Carolinian +Carolyn +carouse +carp +Carpathia +carpenter +carpentry +carpet +carport +Carr +carrageen +Carrara +carrel +carriage +Carrie +carrion +Carroll +carrot +Carruthers +carry +carryover +Carson +cart +carte +cartel +Cartesian +Carthage +cartilage +cartographer +cartographic +cartography +carton +cartoon +cartridge +cartwheel +Caruso +carve +carven +Casanova +casbah +cascade +cascara +case +casebook +casein +casework +Casey +cash +cashew +cashier +cashmere +casino +cask +casket +Cassandra +casserole +cassette +Cassiopeia +Cassius +cassock +cast +castanet +caste +casteth +castigate +Castillo +castle +castor +Castro +casual +casualty +cat +cataclysmic +Catalina +catalogue +catalpa +catalysis +catalyst +catalytic +catapult +cataract +catastrophe +catastrophic +catatonia +catatonic +catawba +catbird +catch +catchup +catchword +catchy +catechism +categoric +category +catenate +cater +caterpillar +catfish +catharsis +cathedral +Catherine +Catherwood +catheter +cathode +cathodic +catholic +Catholicism +Cathy +cation +cationic +catkin +catlike +catnip +Catskill +catsup +cattail +cattle +cattleman +cattlemen +Caucasian +Caucasus +Cauchy +caucus +caught +cauliflower +caulk +causal +causate +cause +caustic +caution +cautionary +cautious +cavalcade +cavalier +cavalry +cave +caveat +caveman +cavemen +Cavendish +cavern +cavernous +caviar +cavil +cavilling +Caviness +cavort +caw +cayenne +Cayley +Cayuga +CBS +CDC +cease +Cecil +Cecilia +Cecropia +cedar +cede +cedilla +Cedric +ceil +celandine +Celanese +Celebes +celebrant +celebrate +celebrity +celerity +celery +celesta +celestial +Celia +cell +cellar +cellophane +cellular +cellulose +Celsius +Celtic +cement +cemetery +Cenozoic +censor +censorial +censure +census +cent +centaur +centenary +centennial +centerline +centerpiece +centigrade +centipede +central +centrex +centric +centrifugal +centrifugate +centrifuge +centrist +centroid +centum +century +Cepheus +ceramic +ceramium +Cerberus +cereal +cerebellum +cerebral +cerebrate +ceremonial +ceremonious +ceremony +Ceres +cereus +cerise +cerium +CERN +certain +certainty +certificate +certified +certify +certiorari +certitude +cerulean +Cervantes +Cesare +cesium +cessation +cession +Cessna +cetera +Cetus +Ceylon +Cezanne +Chablis +Chad +Chadwick +chafe +chaff +chagrin +chain +chair +chairlady +chairman +chairmen +chairperson +chairwoman +chairwomen +chaise +chalcedony +chalcocite +chalice +chalk +chalkline +chalky +challenge +Chalmers +chamber +chamberlain +chambermaid +Chambers +chameleon +chamfer +chamois +chamomile +champ +champagne +Champaign +champion +Champlain +chance +chancel +chancellor +chancery +chancy +chandelier +chandler +Chang +change +changeable +changeover +channel +chanson +chant +chantey +Chantilly +chantry +Chao +chaos +chaotic +chap +chaparral +chapel +chaperon +chaperone +chaplain +Chaplin +Chapman +chapping +chapter +char +character +characteristic +charcoal +chard +charge +chargeable +chariot +charisma +charismatic +charitable +charity +Charles +Charleston +Charley +Charlie +Charlotte +Charlottesville +charm +Charon +charring +chart +Charta +Chartres +chartreuse +chartroom +Charybdis +chase +chasm +chassis +chaste +chastise +chastity +chat +chateau +chateaux +Chatham +Chattanooga +chattel +chatting +chatty +Chaucer +chauffeur +Chauncey +Chautauqua +chaw +cheap +cheat +cheater +check +checkbook +checkerberry +checkerboard +checklist +checkout +checkpoint +checksum +checksummed +checksumming +checkup +cheek +cheekbone +cheeky +cheer +cheerful +cheerleader +cheery +cheese +cheesecloth +cheesy +cheetah +chef +chelate +chemic +chemise +chemisorb +chemisorption +chemist +chemistry +Chen +Cheney +chenille +cherish +Cherokee +cherry +chert +cherub +cherubim +Chesapeake +Cheshire +chess +chest +Chester +Chesterton +chestnut +chevalier +Chevrolet +chevron +chevy +chew +Cheyenne +chi +Chiang +chianti +chic +Chicago +Chicagoan +chicanery +Chicano +chick +chickadee +chicken +chickweed +chicory +chide +chief +chiefdom +chieftain +chiffon +chigger +chignon +chilblain +child +childbirth +childhood +childish +childlike +children +Chile +chili +chill +chilly +chime +chimera +chimeric +Chimique +chimney +chimpanzee +chin +china +Chinaman +Chinamen +Chinatown +chinch +chinchilla +chine +Chinese +chink +chinning +Chinook +chinquapin +chip +chipboard +chipmunk +Chippendale +chipping +chiropractor +chirp +chisel +Chisholm +chit +chiton +chivalrous +chivalry +chive +chlorate +chlordane +chloride +chlorine +chloroform +chlorophyll +chloroplatinate +chock +chocolate +Choctaw +choice +choir +choirmaster +choke +chokeberry +cholera +cholesterol +cholinesterase +chomp +choose +choosy +chop +Chopin +chopping +choppy +choral +chorale +chord +chordal +chordata +chordate +chore +choreograph +choreography +chorine +chortle +chorus +chose +chosen +Chou +chow +chowder +Chris +Christ +christen +Christendom +Christensen +Christenson +Christian +Christiana +Christianson +Christie +Christina +Christine +Christlike +Christmas +Christoffel +Christopher +Christy +chromate +chromatic +chromatogram +chromatograph +chromatography +chrome +chromic +chromium +chromosphere +chronic +chronicle +chronograph +chronography +chronology +chrysanthemum +Chrysler +chrysolite +chub +chubby +chuck +chuckle +chuckwalla +chuff +chug +chugging +chum +chumming +chummy +chump +Chungking +chunk +chunky +church +churchgoer +churchgoing +Churchill +Churchillian +churchman +churchmen +churchwoman +churchwomen +churchyard +churn +chute +chutney +CIA +cicada +Cicero +Ciceronian +cider +cigar +cigarette +cilia +ciliate +cimcumvention +cinch +Cincinnati +cinder +Cinderella +cinema +cinematic +Cinerama +cinnabar +cinnamon +cinquefoil +cipher +circa +Circe +circle +circlet +circuit +circuitous +circuitry +circulant +circular +circulate +circulatory +circumcircle +circumcise +circumcision +circumference +circumferential +circumflex +circumlocution +circumpolar +circumscribe +circumscription +circumspect +circumsphere +circumstance +circumstantial +circumvent +circumvention +circus +cirmcumferential +cistern +citadel +citation +cite +citizen +citizenry +citrate +citric +Citroen +citron +citrus +city +cityscape +citywide +civet +civic +civil +civilian +clad +cladding +cladophora +claim +claimant +Claire +clairvoyant +clam +clamber +clamming +clammy +clamp +clamshell +clan +clandestine +clang +clank +clannish +clap +clapboard +Clapeyron +clapping +Clara +Clare +Claremont +Clarence +Clarendon +claret +clarify +clarinet +clarity +Clark +Clarke +clash +clasp +class +classic +classification +classificatory +classify +classmate +classroom +classy +clatter +clattery +Claude +Claudia +Claudio +Claus +clause +Clausen +Clausius +claustrophobia +claustrophobic +claw +clay +Clayton +clean +cleanse +cleanup +clear +clearance +clearheaded +Clearwater +cleat +cleavage +cleave +cleft +clement +Clemson +clench +clergy +clergyman +clergymen +cleric +clerk +Cleveland +clever +cliche +click +client +clientele +cliff +cliffhang +Clifford +Clifton +climactic +climate +climatic +climatology +climax +climb +clime +clinch +cling +clinging +clinic +clinician +clink +Clint +Clinton +Clio +clip +clipboard +clipping +clique +Clive +cloak +cloakroom +clobber +clock +clockwatcher +clockwise +clockwork +clod +cloddish +clog +clogging +cloister +clomp +clone +clonic +close +closet +closeup +closure +clot +cloth +clothbound +clothe +clothesbrush +clotheshorse +clothesline +clothesman +clothesmen +clothier +Clotho +clotting +cloture +cloud +cloudburst +cloudy +clout +clove +clown +cloy +club +clubbing +clubhouse +clubroom +cluck +clue +clump +clumsy +clung +cluster +clutch +clutter +Clyde +Clytemnestra +coach +coachman +coachmen +coachwork +coadjutor +coagulable +coagulate +coal +coalesce +coalescent +coalition +coarse +coarsen +coast +coastal +coastline +coat +Coates +coattail +coauthor +coax +coaxial +cobalt +Cobb +cobble +cobblestone +Cobol +cobra +cobweb +coca +cocaine +coccidiosis +cochineal +cochlea +Cochran +Cochrane +cock +cockatoo +cockcrow +cockeye +cockle +cocklebur +cockleshell +cockpit +cockroach +cocksure +cocktail +cocky +coco +cocoa +coconut +cocoon +cod +coda +Coddington +coddle +code +codebreak +codeposit +codetermine +codeword +codfish +codicil +codify +codpiece +Cody +coed +coeditor +coeducation +coefficient +coequal +coerce +coercible +coercion +coercive +coexist +coexistent +coextensive +cofactor +coffee +coffeecup +coffeepot +coffer +Coffey +coffin +Coffman +cog +cogent +cogitate +cognac +cognate +cognition +cognitive +cognizable +cognizant +Cohen +cohere +coherent +cohesion +cohesive +Cohn +cohort +cohosh +coiffure +coil +coin +coinage +coincide +coincident +coincidental +coke +col +cola +colander +colatitude +Colby +cold +Cole +Coleman +Coleridge +Colette +coleus +Colgate +colicky +coliform +coliseum +collaborate +collage +collagen +collapse +collapsible +collar +collarbone +collard +collate +collateral +colleague +collect +collectible +collector +college +collegian +collegiate +collet +collide +collie +Collier +collimate +collinear +Collins +collision +collocation +colloidal +colloquia +colloquial +colloquium +colloquy +collude +collusion +Cologne +Colombia +Colombo +colon +colonel +colonial +colonist +colonnade +colony +Colorado +colorate +coloratura +colorimeter +colorimetry +colossal +Colosseum +colossi +colossus +colt +coltish +coltsfoot +Columbia +columbine +Columbus +column +columnar +colza +coma +Comanche +comatose +comb +combat +combatant +combatted +combinate +combinator +combinatorial +combinatoric +combine +combustible +combustion +come +comeback +comedian +comedy +comet +cometary +cometh +comfort +comic +Cominform +comma +command +commandant +commandeer +commando +commemorate +commend +commendation +commendatory +commensurable +commensurate +comment +commentary +commentator +commerce +commercial +commingle +commiserate +commissariat +commissary +commission +commit +committable +committal +committed +committee +committeeman +committeemen +committeewoman +committeewomen +committing +commodious +commodity +commodore +common +commonality +commonplace +commonweal +commonwealth +commotion +communal +commune +communicable +communicant +communicate +communion +communique +commutate +commute +compact +Compagnie +companion +companionway +company +comparative +comparator +compare +comparison +compartment +compass +compassion +compassionate +compatible +compatriot +compel +compellable +compelled +compelling +compendia +compendium +compensable +compensate +compensatory +compete +competent +competition +competitive +competitor +compilation +compile +complacent +complain +complainant +complaint +complaisant +complement +complementarity +complementary +complementation +complete +completion +complex +complexion +compliant +complicate +complicity +compliment +complimentary +compline +comply +component +componentry +comport +compose +composite +composition +compositor +compost +composure +compote +compound +comprehend +comprehensible +comprehension +comprehensive +compress +compressible +compression +compressive +compressor +comprise +compromise +Compton +comptroller +compulsion +compulsive +compulsory +computation +compute +comrade +con +Conakry +Conant +concatenate +concave +conceal +concede +conceit +conceive +concentrate +concentric +concept +conception +conceptual +concern +concert +concerti +concertina +concertmaster +concerto +concession +concessionaire +conch +concierge +conciliate +conciliatory +concise +concision +conclave +conclude +conclusion +conclusive +concoct +concomitant +concord +concordant +concourse +concrete +concretion +concubine +concur +concurred +concurrent +concurring +concussion +condemn +condemnate +condemnatory +condensate +condense +condensible +condescend +condescension +condiment +condition +condolence +condone +conduce +conducive +conduct +conductance +conductive +conductor +conduit +cone +coneflower +Conestoga +coney +confabulate +confect +confectionery +confederacy +confederate +confer +conferee +conference +conferrable +conferred +conferring +confess +confession +confessor +confidant +confidante +confide +confident +confidential +configuration +configure +confine +confirm +confirmation +confirmatory +confiscable +confiscate +confiscatory +conflagrate +conflict +confluent +confocal +conform +conformal +conformance +conformation +confound +confrere +confront +confrontation +Confucian +Confucianism +Confucius +confuse +confusion +confute +congeal +congener +congenial +congenital +congest +congestion +congestive +conglomerate +Congo +Congolese +congratulate +congratulatory +congregate +congress +congressional +congressman +congressmen +congresswoman +congresswomen +congruent +conic +conifer +coniferous +conjectural +conjecture +conjoin +conjoint +conjugal +conjugate +conjunct +conjuncture +conjure +Conklin +Conley +conn +Connally +connect +Connecticut +connector +Conner +Connie +connivance +connive +connoisseur +Connors +connotation +connotative +connote +connubial +conquer +conqueror +conquest +conquistador +Conrad +Conrail +consanguine +consanguineous +conscience +conscientious +conscionable +conscious +conscript +conscription +consecrate +consecutive +consensus +consent +consequent +consequential +conservation +conservatism +conservative +conservator +conservatory +conserve +consider +considerate +consign +consignee +consignor +consist +consistent +consolation +console +consolidate +consonant +consonantal +consort +consortium +conspicuous +conspiracy +conspirator +conspiratorial +conspire +Constance +constant +Constantine +Constantinople +constellate +consternate +constituent +constitute +constitution +constrain +constraint +constrict +constrictor +construct +constructible +constructor +construe +consul +consular +consulate +consult +consultant +consultation +consultative +consume +consummate +consumption +consumptive +contact +contagion +contagious +contain +contaminant +contaminate +contemplate +contemporaneous +contemporary +contempt +contemptible +contemptuous +contend +content +contention +contentious +contest +contestant +context +contextual +contiguity +contiguous +continent +continental +contingent +continua +continual +continuant +continuation +continue +continued +continuity +continuo +continuous +continuum +contort +contour +contraband +contrabass +contraception +contraceptive +contract +contractor +contractual +contradict +contradictory +contradistinct +contradistinguish +contralateral +contralto +contraption +contrariety +contrary +contrast +contravariant +contravene +contravention +contretemps +contribute +contribution +contributor +contributory +contrite +contrition +contrivance +contrive +control +controllable +controlled +controller +controlling +controversial +controversy +controvertible +contumacy +contusion +conundrum +Convair +convalesce +convalescent +convect +convene +convenient +convent +convention +converge +convergent +conversant +conversation +converse +conversion +convert +convertible +convex +convey +conveyance +conveyor +convict +convince +convivial +convocate +convoke +convolute +convolution +convolve +convoy +convulse +convulsion +convulsive +Conway +cony +coo +cook +cookbook +Cooke +cookery +cookie +cooky +cool +coolant +Cooley +coolheaded +Coolidge +coon +coop +cooperate +coordinate +Coors +coot +cop +cope +Copeland +Copenhagen +Copernican +Copernicus +copious +coplanar +copolymer +copperas +Copperfield +copperhead +coppery +copra +coprinus +copter +copy +copybook +copyright +copywriter +coquette +coquina +coral +coralberry +coralline +corbel +Corbett +Corcoran +cord +cordage +cordial +cordite +cordon +corduroy +core +Corey +coriander +Corinth +Corinthian +Coriolanus +cork +corkscrew +cormorant +corn +cornbread +cornea +Cornelia +Cornelius +Cornell +cornerstone +cornet +cornfield +cornflower +cornish +cornmeal +cornstarch +cornucopia +Cornwall +corny +corollary +corona +Coronado +coronary +coronate +coroner +coronet +coroutine +Corp +corpora +corporal +corporate +corporeal +corps +corpse +corpsman +corpsmen +corpulent +corpus +corpuscular +corral +corralled +correct +corrector +correlate +correspond +correspondent +corridor +corrigenda +corrigendum +corrigible +corroborate +corroboree +corrode +corrodible +corrosion +corrosive +corrugate +corrupt +corruptible +corruption +corsage +cortege +cortex +cortical +Cortland +corundum +coruscate +corvette +Corvus +cos +cosec +coset +Cosgrove +cosh +cosine +cosmetic +cosmic +cosmology +cosmopolitan +cosmos +cosponsor +Cossack +cost +Costello +costume +cosy +cot +cotangent +cotillion +cotman +cotoneaster +cotta +cottage +cotton +cottonmouth +cottonseed +cottonwood +cottony +Cottrell +cotty +couch +cougar +cough +could +couldn't +coulomb +Coulter +council +councilman +councilmen +councilwoman +councilwomen +counsel +counselor +count +countenance +counteract +counterargument +counterattack +counterbalance +counterclockwise +counterexample +counterfeit +counterflow +counterintuitive +counterman +countermen +counterpart +counterpoint +counterpoise +counterproductive +counterproposal +countersink +countersunk +countervail +countrify +country +countryman +countrymen +countryside +countrywide +county +countywide +coup +coupe +couple +coupon +courage +courageous +courier +course +court +courteous +courtesan +courtesy +courthouse +courtier +Courtney +courtroom +courtyard +cousin +couturier +covalent +covariant +covariate +covary +cove +coven +covenant +Coventry +cover +coverage +coverall +coverlet +covert +covet +covetous +cow +Cowan +coward +cowardice +cowbell +cowbird +cowboy +cowhand +cowherd +cowhide +cowl +cowlick +cowman +cowmen +coworker +cowpea +cowpoke +cowpony +cowpox +cowpunch +cowry +cowslip +cox +coxcomb +coy +coyote +coypu +cozen +cozier +cozy +CPA +crab +crabapple +crabbing +crack +crackle +crackpot +cradle +craft +craftsman +craftsmen +craftspeople +craftsperson +crafty +crag +craggy +Craig +cram +Cramer +cramming +cramp +cranberry +Crandall +crane +cranelike +Cranford +crania +cranium +crank +crankcase +crankshaft +cranky +cranny +Cranston +crap +crappie +crash +crass +crate +crater +cravat +crave +craven +craw +Crawford +crawl +crawlspace +crayfish +crayon +craze +crazy +creak +creaky +cream +creamery +creamy +crease +create +creating +creature +creche +credent +credential +credenza +credible +credit +creditor +credo +credulity +credulous +creed +creedal +creek +creekside +creep +creepy +cremate +crematory +Creole +Creon +creosote +crepe +crept +crescendo +crescent +cress +crest +crestfallen +Crestview +Cretaceous +Cretan +Crete +cretin +cretinous +crevice +crew +crewcut +crewel +crewman +crewmen +crib +cribbing +cricket +cried +crime +Crimea +criminal +crimp +crimson +cringe +crinkle +cripple +crises +crisis +crisp +Crispin +criss +crisscross +criteria +criterion +critic +critique +critter +croak +crochet +crock +crockery +Crockett +crocodile +crocodilian +crocus +croft +Croix +Cromwell +Cromwellian +crone +crony +crook +croon +crop +cropping +Crosby +cross +crossarm +crossbar +crossbill +crosscut +crosshatch +crossover +crosspoint +crossroad +crosstalk +crosswalk +crossway +crosswise +crosswort +crotch +crotchety +crouch +croupier +crow +crowbait +crowberry +crowd +crowfoot +Crowley +crown +croydon +CRT +crucial +crucible +crucifix +crucifixion +crucify +crud +cruddy +crude +cruel +cruelty +Cruickshank +cruise +crumb +crumble +crummy +crump +crumple +crunch +crupper +crusade +crush +Crusoe +crust +crutch +crux +cry +cryogenic +cryostat +crypt +cryptanalysis +cryptanalyst +cryptanalytic +cryptic +cryptogram +cryptographer +cryptography +crystal +crystalline +crystallite +crystallographer +crystallography +cub +Cuba +cubbyhole +cube +cubic +cuckoo +cucumber +cud +cuddle +cuddly +cudgel +cue +cuff +cufflink +cuisine +Culbertson +culinary +cull +culminate +culpa +culpable +culprit +cult +cultivable +cultivate +cultural +culture +Culver +culvert +Cumberland +cumbersome +cumin +Cummings +Cummins +cumulate +cumulus +Cunard +cunning +Cunningham +CUNY +cup +cupboard +cupful +Cupid +cupidity +cupping +cupric +cuprous +cur +curate +curb +curbside +curd +curdle +cure +curfew +curia +curie +curio +curiosity +curious +curium +curl +curlew +curlicue +Curran +currant +current +curricula +curricular +curriculum +curry +curse +cursive +cursor +cursory +curt +curtail +curtain +Curtis +curtsey +curvaceous +curvature +curve +curvilinear +Cushing +cushion +Cushman +cusp +Custer +custodial +custodian +custody +custom +customary +customhouse +cut +cutaneous +cutback +cute +cutlass +cutler +cutlet +cutoff +cutout +cutover +cutthroat +cutting +cuttlebone +cuttlefish +cutworm +Cyanamid +cyanate +cyanic +cyanide +cybernetics +cycad +Cyclades +cycle +cyclic +cyclist +cyclone +cyclopean +Cyclops +cyclorama +cyclotron +Cygnus +cylinder +cylindric +cynic +Cynthia +cypress +Cyprian +Cypriot +Cyprus +Cyril +Cyrus +cyst +cytochemistry +cytolysis +cytoplasm +czar +czarina +Czechoslovakia +Czerniak +d +d'art +d'etat +d'oeuvre +d's +dab +dabbing +dabble +Dacca +dachshund +dactyl +dactylic +dad +Dadaism +Dadaist +daddy +Dade +Daedalus +daffodil +daffy +dagger +Dahl +dahlia +Dahomey +Dailey +Daimler +dainty +dairy +Dairylea +dairyman +dairymen +dais +daisy +Dakar +Dakota +dale +Daley +Dallas +dally +Dalton +Daly +Dalzell +dam +damage +Damascus +damask +dame +damming +damn +damnation +Damon +damp +dampen +damsel +Dan +Dana +Danbury +dance +dandelion +dandy +Dane +dang +danger +dangerous +dangle +Daniel +Danielson +Danish +dank +Danny +Dante +Danube +Danubian +Danzig +Daphne +dapper +dapple +Dar +dare +Darius +dark +darken +darkle +Darlene +darling +darn +Darrell +dart +Dartmouth +Darwin +Darwinian +dash +dashboard +dastard +data +database +date +dateline +dater +Datsun +datum +daub +Daugherty +daughter +daunt +dauphin +dauphine +Dave +davenport +David +Davidson +Davies +Davis +Davison +davit +Davy +dawn +Dawson +day +daybed +daybreak +daydream +daylight +daytime +Dayton +Daytona +daze +dazzle +DC +De +deacon +deaconess +deactivate +dead +deaden +deadhead +deadline +deadlock +deadwood +deaf +deafen +deal +deallocate +dealt +dean +Deane +Deanna +dear +Dearborn +dearie +dearth +death +deathbed +deathward +debacle +debar +debarring +debase +debate +debater +debauch +debauchery +Debbie +Debby +debenture +debilitate +debility +debit +debonair +Deborah +Debra +debrief +debris +debt +debtor +debug +debugged +debugger +debugging +debunk +Debussy +debut +debutante +Dec +decade +decadent +decal +decant +decathlon +Decatur +decay +Decca +decease +decedent +deceit +deceitful +deceive +decelerate +December +decennial +decent +deception +deceptive +decertify +decibel +decide +deciduous +decile +decimal +decipher +decision +decisional +decisive +deck +Decker +declaim +declamation +declamatory +declaration +declarative +declarator +declaratory +declare +declassify +declination +decline +declivity +decode +decolletage +decollimate +decompile +decomposable +decompose +decomposition +decompress +decompression +decontrol +decontrolled +decontrolling +deconvolution +deconvolve +decor +decorate +decorous +decorticate +decorum +decouple +decrease +decree +decreeing +decrement +decry +decrypt +decryption +dedicate +deduce +deducible +deduct +deductible +Dee +deed +deem +deep +deepen +deer +Deere +deerskin +deerstalker +deface +default +defeat +defecate +defect +defend +defendant +defensible +defensive +defer +deferent +deferrable +deferred +deferring +defiant +deficient +deficit +define +definite +definition +definitive +deflate +deflater +deflect +deflector +defocus +deforest +deforestation +deform +deformation +defraud +defray +defrost +deft +defunct +defy +degas +degassing +degeneracy +degenerate +degradation +degrade +degrease +degree +degum +degumming +dehumidify +dehydrate +deify +deign +deity +deja +deject +Del +Delaney +Delano +Delaware +delay +delectable +delectate +delegable +delegate +delete +deleterious +deletion +Delhi +Delia +deliberate +delicacy +delicate +delicatessen +delicious +delicti +delight +delightful +Delilah +delimit +delimitation +delineament +delineate +delinquent +deliquesce +deliquescent +delirious +delirium +deliver +deliverance +delivery +dell +Della +Delmarva +delouse +Delphi +Delphic +delphine +delphinium +Delphinus +delta +deltoid +delude +deluge +delusion +delusive +deluxe +delve +demagnify +demagogue +demand +demarcate +demark +demean +demented +demerit +demigod +demijohn +demiscible +demise +demit +demitted +demitting +democracy +democrat +democratic +demodulate +demography +demolish +demolition +demon +demoniac +demonic +demonstrable +demonstrate +demote +demountable +Dempsey +demultiplex +demur +demure +demurred +demurrer +demurring +demythologize +den +denature +Deneb +Denebola +deniable +denial +denigrate +denizen +Denmark +Dennis +Denny +denominate +denotation +denotative +denote +denouement +denounce +dense +densitometer +densitometric +densitometry +dent +dental +dentistry +Denton +denture +denudation +denude +denumerable +denunciate +Denver +deny +deodorant +deoxyribonucleic +depart +department +departure +depend +dependent +depict +deplete +depletion +deplore +deploy +deport +deportation +deportee +depose +deposit +depositary +deposition +depositor +depository +depot +deprave +deprecate +deprecatory +depreciable +depreciate +depress +depressant +depressed +depressible +depressing +depression +depressive +depressor +deprivation +deprive +depth +deputation +depute +deputy +derail +derange +derate +derby +Derbyshire +dereference +deregulate +Derek +derelict +deride +derision +derisive +derivate +derive +derogate +derogatory +derrick +derriere +dervish +Des +descant +Descartes +descend +descendant +descendent +descent +describe +description +descriptive +descriptor +desecrate +desecrater +desegregate +desert +deserve +desiderata +desideratum +design +designate +desire +desirous +desist +desk +Desmond +desolate +desolater +desorption +despair +desperado +desperate +despicable +despise +despite +despoil +despond +despondent +despot +despotic +dessert +dessicate +destabilize +destinate +destine +destiny +destitute +destroy +destruct +destructor +desuetude +desultory +desynchronize +detach +detail +detain +detect +detector +detent +detente +detention +deter +detergent +deteriorate +determinant +determinate +determine +deterred +deterrent +deterring +detest +detestation +detonable +detonate +detour +detract +detractor +detriment +Detroit +deuce +deus +deuterate +deuterium +devastate +develop +deviant +deviate +device +devil +devilish +devious +devise +devisee +devoid +devolve +Devon +Devonshire +devote +devotee +devotion +devour +devout +dew +dewar +dewdrop +Dewey +Dewitt +dewy +dexter +dexterity +dextrous +dey +Dhabi +dharma +diabase +diabetes +diabetic +diabolic +diachronic +diacritical +diadem +diagnosable +diagnose +diagnoses +diagnosis +diagnostic +diagnostician +diagonal +diagram +diagrammatic +dial +dialect +dialectic +dialogue +dialysis +diamagnetic +diamegnetism +diameter +diametric +diamond +Diana +Diane +Dianne +diaper +diaphanous +diaphragm +diary +diathermy +diathesis +diatom +diatomaceous +diatomic +diatonic +dibble +dice +dichloride +dichondra +dichotomy +dick +dickcissel +dickens +Dickerson +dickey +Dickinson +Dickson +dicotyledon +dicta +dictate +dictatorial +diction +dictionary +dictum +did +didactic +diddle +didn't +Dido +die +Diebold +died +Diego +diehard +dieldrin +dielectric +diem +diesel +diet +dietary +dietetic +diethylstilbestrol +dietician +Dietrich +diety +Dietz +differ +different +differentiable +differential +differentiate +difficult +difficulty +diffident +diffract +diffractometer +diffuse +diffusible +diffusion +diffusive +difluoride +dig +digest +digestible +digestion +digestive +digging +digit +digital +digitalis +dignify +dignitary +dignity +digram +digress +digression +dihedral +dilapidate +dilatation +dilate +dilation +dilatory +dilemma +dilettante +diligent +dill +Dillon +dilogarithm +diluent +dilute +dilution +dim +dime +dimension +dimethyl +diminish +diminution +diminutive +dimming +dimple +din +Dinah +dine +ding +dinghy +dingo +dingy +dinnertime +dinnerware +dinosaur +dint +diocesan +diocese +diode +Dionysian +Dionysus +Diophantine +diopter +diorama +diorite +dioxide +dip +diphthong +diploma +diplomacy +diplomat +diplomatic +dipole +dipping +Dirac +dire +direct +director +directorate +directory +directrices +directrix +dirge +Dirichlet +dirt +dirty +Dis +disambiguate +disastrous +disburse +disc +discern +discernible +disciple +disciplinary +discipline +discoid +discomfit +discordant +discovery +discreet +discrepant +discrete +discretion +discretionary +discriminable +discriminant +discriminate +discriminatory +discus +discuss +discussant +discussion +disdain +disdainful +disembowel +disgruntle +disgustful +dish +dishevel +dishwasher +dishwater +disjunct +disk +dismal +dismissal +Disney +Disneyland +disparage +disparate +dispel +dispelled +dispelling +dispensary +dispensate +dispense +dispersal +disperse +dispersible +dispersion +dispersive +disposable +disposal +disputant +dispute +disquietude +disquisition +disrupt +disruption +disruptive +dissemble +disseminate +dissension +dissertation +dissident +dissipate +dissociable +dissociate +dissonant +dissuade +distaff +distal +distant +distillate +distillery +distinct +distinguish +distort +distortion +distraught +distribution +distributive +distributor +district +disturb +disturbance +disulfide +disyllable +ditch +dither +ditto +ditty +diurnal +diva +divalent +divan +dive +diverge +divergent +diverse +diversify +diversion +diversionary +divert +divest +divestiture +divide +dividend +divination +divine +divisible +division +divisional +divisive +divisor +divorce +divorcee +divulge +Dixie +dixieland +Dixon +dizzy +Djakarta +DNA +Dnieper +do +Dobbin +Dobbs +doberman +dobson +docile +dock +docket +dockside +dockyard +doctor +doctoral +doctorate +doctrinaire +doctrinal +doctrine +document +documentary +documentation +DOD +Dodd +dodecahedra +dodecahedral +dodecahedron +dodge +Dodson +doe +doesn't +doff +dog +dogbane +dogberry +Doge +dogfish +dogging +doggone +doghouse +dogleg +dogma +dogmatic +dogmatism +dogtooth +dogtrot +dogwood +Doherty +Dolan +dolce +doldrum +dole +doleful +doll +dollar +dolly +dolomite +dolomitic +Dolores +dolphin +dolt +doltish +domain +dome +Domenico +Domesday +domestic +domicile +dominant +dominate +domineer +Domingo +Dominic +Dominican +Dominick +dominion +Dominique +domino +don +don't +Donahue +Donald +Donaldson +donate +done +Doneck +donkey +Donna +Donnelly +Donner +donning +donnybrook +donor +Donovan +doodle +Dooley +Doolittle +doom +doomsday +door +doorbell +doorkeep +doorkeeper +doorknob +doorman +doormen +doorstep +doorway +dopant +dope +Doppler +Dora +Dorado +Dorcas +Dorchester +Doreen +Doria +Doric +Doris +dormant +dormitory +Dorothea +Dorothy +Dorset +dosage +dose +dosimeter +dossier +Dostoevsky +dot +dote +dotting +double +Doubleday +doubleheader +doublet +doubleton +doubloon +doubt +doubtful +douce +Doug +dough +Dougherty +doughnut +Douglas +Douglass +dour +douse +dove +dovekie +dovetail +Dow +dowager +dowel +dowitcher +Dowling +down +downbeat +downcast +downdraft +Downey +downfall +downgrade +downhill +Downing +downplay +downpour +downright +Downs +downside +downslope +downspout +downstairs +downstream +downtown +downtrend +downtrodden +downturn +downward +downwind +dowry +Doyle +doze +dozen +Dr +drab +Draco +draft +draftee +draftsman +draftsmen +draftsperson +drafty +drag +dragging +dragnet +dragon +dragonfly +dragonhead +dragoon +drain +drainage +drake +dram +drama +dramatic +dramatist +dramaturgy +drank +drape +drapery +drastic +draw +drawback +drawbridge +drawl +drawn +dread +dreadful +dreadnought +dream +dreamboat +dreamlike +dreamt +dreamy +dreary +dredge +dreg +drench +dress +dressmake +dressy +drew +Drexel +Dreyfuss +drib +dribble +dried +drier +drift +drill +drink +drip +dripping +drippy +Driscoll +drive +driven +driveway +drizzle +drizzly +droll +dromedary +drone +drool +droop +droopy +drop +drophead +droplet +dropout +dropping +drosophila +dross +drought +drove +drown +drowse +drowsy +drub +drubbing +drudge +drudgery +drug +drugging +drugstore +druid +drum +drumhead +drumlin +drumming +Drummond +drunk +drunkard +drunken +Drury +dry +dryad +Dryden +du +dual +dualism +Duane +dub +Dubhe +dubious +dubitable +Dublin +ducat +duchess +duck +duckling +duct +ductile +ductwork +dud +Dudley +due +duel +duet +duff +duffel +Duffy +dug +Dugan +dugout +duke +dulcet +dull +dully +dulse +Duluth +duly +Duma +dumb +dumbbell +dummy +dump +Dumpty +dumpy +dun +Dunbar +Duncan +dunce +dune +Dunedin +dung +dungeon +Dunham +dunk +Dunkirk +Dunlap +Dunlop +Dunn +duopolist +duopoly +dupe +duplex +duplicable +duplicate +duplicity +DuPont +durable +Durango +duration +Durer +duress +Durham +during +Durkee +Durkin +Durrell +Durward +Dusenberg +Dusenbury +dusk +dusky +Dusseldorf +dust +dustbin +dusty +Dutch +dutchess +Dutchman +Dutchmen +dutiable +dutiful +Dutton +duty +dwarf +dwarves +dwell +dwelt +Dwight +dwindle +Dwyer +dyad +dyadic +dye +dyer +dying +Dyke +Dylan +dynamic +dynamism +dynamite +dynamo +dynast +dynastic +dynasty +dyne +dysentery +dyspeptic +dysplasia +dysprosium +dystrophy +e +e'er +e's +each +Eagan +eager +eagle +ear +eardrum +earl +earmark +earn +earnest +earphone +earring +earsplitting +earth +earthen +earthenware +earthmen +earthmover +earthmoving +earthquake +earthworm +earthy +earwig +ease +easel +east +eastbound +eastern +easternmost +Eastland +Eastman +eastward +Eastwood +easy +easygoing +eat +eaten +eater +Eaton +eave +eavesdrop +eavesdropping +ebb +Eben +ebony +ebullient +eccentric +Eccles +ecclesiastic +echelon +echinoderm +echo +echoes +eclat +eclectic +eclipse +ecliptic +eclogue +Ecole +ecology +econometric +Econometrica +economic +economist +economy +ecosystem +ecstasy +ecstatic +Ecuador +ecumenic +ecumenist +Ed +Eddie +eddy +edelweiss +edematous +Eden +Edgar +edge +Edgerton +edgewise +edging +edgy +edible +edict +edifice +edify +Edinburgh +Edison +edit +Edith +edition +editor +editorial +Edmonds +Edmondson +Edmonton +Edmund +Edna +EDT +educable +educate +Edward +Edwardian +Edwards +Edwin +Edwina +eel +eelgrass +EEOC +eerie +eerily +efface +effaceable +effect +effectual +effectuate +effeminate +efferent +effete +efficacious +efficacy +efficient +Effie +effloresce +efflorescent +effluent +effluvia +effluvium +effort +effusive +eft +egalitarian +Egan +egg +egghead +eggplant +eggshell +ego +egocentric +egotism +egotist +egregious +egress +egret +Egypt +Egyptian +eh +Ehrlich +eider +eidetic +eigenfunction +eigenstate +eigenvalue +eigenvector +eight +eighteen +eighteenth +eightfold +eighth +eightieth +eighty +Eileen +Einstein +Einsteinian +einsteinium +Eire +Eisenhower +Eisner +either +ejaculate +eject +ejector +eke +Ekstrom +Ektachrome +el +elaborate +Elaine +elan +elapse +elastic +elastomer +elate +Elba +elbow +elder +eldest +Eldon +Eleanor +Eleazar +elect +elector +electoral +electorate +Electra +electress +electret +electric +electrician +electrify +electro +electrocardiogram +electrocardiograph +electrode +electroencephalogram +electroencephalograph +electroencephalography +electrolysis +electrolyte +electrolytic +electron +electronic +electrophoresis +electrophorus +elegant +elegiac +elegy +element +elementary +Elena +elephant +elephantine +elevate +eleven +eleventh +elfin +Elgin +Eli +elicit +elide +eligible +Elijah +eliminate +Elinor +Eliot +Elisabeth +Elisha +elision +elite +Elizabeth +Elizabethan +elk +Elkhart +ell +Ella +Ellen +Elliott +ellipse +ellipsis +ellipsoid +ellipsoidal +ellipsometer +ellipsometry +elliptic +Ellis +Ellison +Ellsworth +Ellwood +elm +Elmer +Elmhurst +Elmira +Elmsford +Eloise +elongate +elope +eloquent +else +Elsevier +elsewhere +Elsie +Elsinore +Elton +eluate +elucidate +elude +elusive +elute +elution +elves +Ely +Elysee +elysian +em +emaciate +emanate +emancipate +Emanuel +emasculate +embalm +embank +embarcadero +embargo +embargoes +embark +embarrass +embassy +embattle +embed +embedded +embedder +embedding +embellish +ember +embezzle +emblematic +embodiment +embody +embolden +emboss +embouchure +embower +embrace +embraceable +embrittle +embroider +embroidery +embroil +embryo +embryonic +emcee +emendable +emerald +emerge +emergent +emeritus +Emerson +Emery +emigrant +emigrate +Emil +Emile +Emilio +Emily +eminent +emirate +emissary +emission +emissivity +emit +emittance +emitted +emitter +emitting +emma +Emmanuel +Emmett +emolument +Emory +emotion +emotional +empathy +emperor +emphases +emphasis +emphatic +emphysema +emphysematous +empire +empiric +emplace +employ +employed +employee +employer +employing +emporium +empower +empress +empty +emulate +emulsify +emulsion +en +enact +enamel +encamp +encapsulate +encase +encephalitis +enchain +enchant +enchantress +encipher +encircle +enclave +enclose +enclosure +encode +encomia +encomium +encompass +encore +encounter +encourage +encroach +encrust +encrypt +encryption +encumber +encumbrance +encyclical +encyclopedic +end +endanger +endear +endgame +Endicott +endogamous +endogamy +endogenous +endorse +endosperm +endothelial +endothermic +endow +endpoint +endurance +endure +enemy +energetic +energy +enervate +enfant +enfeeble +Enfield +enforce +enforceable +enforcible +enfranchise +Eng +engage +Engel +engender +engine +engineer +England +Englander +Engle +Englewood +English +Englishman +Englishmen +engrave +engross +engulf +enhance +Enid +enigma +enigmatic +enjoin +enjoinder +enjoy +enlarge +enlargeable +enlighten +enlist +enliven +enmesh +enmity +Enoch +enormity +enormous +Enos +enough +enquire +enquiry +enrage +enrapture +enrich +Enrico +enroll +enrollee +ensconce +ensemble +enshroud +ensign +enslave +ensnare +enstatite +ensue +ensure +entail +entangle +entendre +enter +enterprise +entertain +enthalpy +enthrall +enthrone +enthusiasm +enthusiast +enthusiastic +entice +entire +entirety +entitle +entity +entomb +entomology +entourage +entrain +entrance +entranceway +entrant +entrap +entrapping +entreat +entreaty +entree +entrench +entrepreneur +entrepreneurial +entropy +entrust +entry +entwine +enumerable +enumerate +enunciable +enunciate +envelop +envelope +envenom +enviable +envious +environ +envisage +envision +envoy +envy +enzymatic +enzyme +enzymology +Eocene +eohippus +eosine +EPA +epaulet +ephemeral +ephemerides +ephemeris +Ephesian +Ephesus +Ephraim +epic +epicure +Epicurean +epicycle +epicyclic +epidemic +epidemiology +epidermic +epidermis +epigenetic +epigram +epigrammatic +epigraph +epileptic +epilogue +Epiphany +epiphyseal +epiphysis +episcopal +Episcopalian +episcopate +episode +epistemology +epistle +epistolatory +epitaph +epitaxial +epitaxy +epithelial +epithelium +epithet +epitome +epoch +epoxy +epsilon +Epsom +Epstein +equable +equal +equanimity +equate +equatorial +equestrian +equidistant +equilateral +equilibrate +equilibria +equilibrium +equine +equinoctial +equinox +equip +equipoise +equipotent +equipped +equipping +equitable +equitation +equity +equivalent +equivocal +era +eradicable +eradicate +erasable +erase +Erasmus +Erastus +erasure +Erato +Eratosthenes +erbium +ERDA +ere +erect +erg +ergodic +Eric +Erich +Erickson +Ericsson +Erie +Erlenmeyer +Ernest +Ernestine +Ernie +Ernst +erode +erodible +Eros +erosible +erosion +erosive +erotic +erotica +err +errancy +errand +errant +errantry +errata +erratic +erratum +Errol +erroneous +error +ersatz +Erskine +erudite +erudition +erupt +eruption +Ervin +Erwin +escadrille +escalate +escapade +escape +escapee +escheat +eschew +escort +escritoire +escrow +escutcheon +Eskimo +Esmark +esophagi +esoteric +especial +espionage +esplanade +Esposito +espousal +espouse +esprit +esquire +essay +Essen +essence +essential +Essex +EST +establish +estate +esteem +Estella +ester +Estes +Esther +estimable +estimate +estop +estoppal +estrange +estuarine +estuary +et +eta +etc +etch +eternal +eternity +Ethan +ethane +ethanol +Ethel +ether +ethereal +ethic +Ethiopia +ethnic +ethnography +ethnology +ethology +ethos +ethyl +ethylene +etiology +etiquette +Etruscan +etude +etymology +eucalyptus +Eucharist +Euclid +Euclidean +eucre +Eugene +Eugenia +eugenic +Euler +Eulerian +eulogy +Eumenides +Eunice +euphemism +euphemist +euphorbia +euphoria +euphoric +Euphrates +Eurasia +eureka +Euridyce +Euripides +Europa +Europe +European +europium +Eurydice +eutectic +Euterpe +euthanasia +Eva +evacuate +evade +evaluable +evaluate +evanescent +evangel +evangelic +Evans +Evanston +Evansville +evaporate +evasion +evasive +eve +Evelyn +even +evenhanded +evensong +event +eventful +eventide +eventual +eventuate +Eveready +Everett +Everglades +evergreen +Everhart +everlasting +every +everybody +everyday +everyman +everyone +everything +everywhere +evict +evident +evidential +evil +evildoer +evince +evocable +evocate +evoke +evolution +evolutionary +evolve +evzone +ewe +Ewing +exacerbate +exact +exaggerate +exalt +exaltation +exam +examination +examine +example +exasperate +exasperater +excavate +exceed +excel +excelled +excellent +excelling +excelsior +except +exception +exceptional +excerpt +excess +excessive +exchange +exchangeable +exchequer +excisable +excise +excision +excitation +excitatory +excite +exciton +exclaim +exclamation +exclamatory +exclude +exclusion +exclusionary +exclusive +excommunicate +excoriate +excrescent +excresence +excrete +excretion +excretory +excruciate +exculpatory +excursion +excursus +excusable +excuse +execrable +execrate +execute +execution +executive +executor +executrix +exegesis +exegete +exemplar +exemplary +exemplify +exempt +exemption +exercisable +exercise +exert +Exeter +exhale +exhaust +exhaustible +exhaustion +exhaustive +exhibit +exhibition +exhibitor +exhilarate +exhort +exhortation +exhumation +exhume +exigent +exile +exist +existent +existential +exit +exodus +exogamous +exogamy +exogenous +exonerate +exorbitant +exorcise +exorcism +exorcist +exoskeleton +exothermic +exotic +exotica +expand +expanse +expansible +expansion +expansive +expatiate +expect +expectant +expectation +expectorant +expectorate +expedient +expedite +expedition +expeditious +expel +expellable +expelled +expelling +expend +expenditure +expense +expensive +experience +experiential +experiment +experimentation +expert +expertise +expiable +expiate +expiration +expire +explain +explanation +explanatory +expletive +explicable +explicate +explicit +explode +exploit +exploitation +exploration +exploratory +explore +explosion +explosive +exponent +exponential +exponentiate +export +exportation +expose +exposit +exposition +expositor +expository +exposure +expound +express +expressible +expression +expressive +expressway +expropriate +expulsion +expunge +expurgate +exquisite +extant +extemporaneous +extempore +extend +extendible +extensible +extension +extensive +extensor +extent +extenuate +exterior +exterminate +external +extinct +extinguish +extirpate +extol +extolled +extoller +extolling +extort +extra +extracellular +extract +extractor +extraditable +extralegal +extramarital +extraneous +extraordinary +extrapolate +extraterrestrial +extravagant +extravaganza +extrema +extremal +extreme +extremum +extricable +extricate +extrinsic +extroversion +extrovert +extrude +extrusion +extrusive +exuberant +exudation +exude +exult +exultant +exultation +Exxon +eye +eyeball +eyebright +eyebrow +eyed +eyeful +eyeglass +eyelash +eyelet +eyelid +eyepiece +eyesight +eyewitness +Ezekiel +Ezra +f +f's +FAA +Faber +Fabian +fable +fabric +fabricate +fabulous +facade +face +faceplate +facet +facetious +facial +facile +facilitate +facsimile +fact +factious +facto +factor +factorial +factory +factual +faculty +fad +fade +fadeout +faery +Fafnir +fag +Fahey +Fahrenheit +fail +failsoft +failure +fain +faint +fair +Fairchild +Fairfax +Fairfield +fairgoer +Fairport +fairway +fairy +faith +faithful +fake +falcon +falconry +fall +fallacious +fallacy +fallen +fallible +falloff +fallout +fallow +Falmouth +false +falsehood +falsify +Falstaff +falter +fame +familial +familiar +familiarly +familism +family +famine +famous +fan +fanatic +fanciful +fancy +fanfare +fanfold +fang +fangled +fanning +Fanny +fanout +fantasia +fantasist +fantastic +fantasy +fantod +far +farad +Faraday +Farber +farce +farcical +fare +farewell +farfetched +Fargo +farina +Farkas +Farley +farm +farmhouse +Farmington +farmland +Farnsworth +faro +Farrell +farsighted +farther +farthest +fascicle +fasciculate +fascinate +fascism +fascist +fashion +fast +fasten +fastidious +fat +fatal +fate +fateful +father +fathom +fatigue +Fatima +fatten +fatty +fatuous +faucet +Faulkner +fault +faulty +faun +fauna +Faust +Faustian +Faustus +fawn +fay +Fayette +Fayetteville +faze +FBI +FCC +FDA +Fe +fealty +fear +fearful +fearsome +feasible +feast +feat +feather +featherbed +featherbedding +featherbrain +feathertop +featherweight +feathery +feature +Feb +febrile +February +fecund +fed +Fedders +federal +federate +Fedora +fee +feeble +feed +feedback +feel +Feeney +feet +feign +feint +Feldman +feldspar +Felice +Felicia +felicitous +felicity +feline +Felix +fell +fellow +felon +felonious +felony +felsite +felt +female +feminine +feminism +feminist +femur +fence +fencepost +fend +fennel +Fenton +fenugreek +Ferber +Ferdinand +Ferguson +Fermat +ferment +fermentation +Fermi +fermion +fermium +fern +Fernando +fernery +ferocious +ferocity +Ferrer +ferret +ferric +ferris +ferrite +ferroelectric +ferromagnet +ferromagnetic +ferromagnetism +ferrous +ferruginous +ferrule +ferry +fertile +fervent +fescue +fest +festival +festive +fetal +fetch +fete +fetid +fetish +fetter +fettle +fetus +feud +feudal +feudatory +fever +feverish +few +fiance +fiancee +fiasco +fiat +fib +fibbing +fiberboard +Fiberglas +Fibonacci +fibrin +fibrosis +fibrous +fiche +fickle +fiction +fictitious +fictive +fiddle +fiddlestick +fide +fidelity +fidget +fiducial +fief +fiefdom +field +Fields +fieldstone +fieldwork +fiend +fiendish +fierce +fiery +fiesta +fife +FIFO +fifteen +fifteenth +fifth +fiftieth +fifty +fig +figaro +fight +figural +figurate +figure +figurine +filament +filamentary +filbert +filch +file +filet +filial +filibuster +filigree +Filipino +fill +filled +filler +fillet +fillip +filly +film +filmdom +filmmake +filmstrip +filmy +filter +filth +filthy +filtrate +fin +final +finale +finance +financial +financier +finch +find +fine +finesse +finessed +finessing +finger +fingernail +fingerprint +fingertip +finial +finicky +finish +finite +fink +Finland +Finley +Finn +Finnegan +Finnish +finny +fir +fire +firearm +fireboat +firebreak +firebug +firecracker +firefly +firehouse +firelight +fireman +firemen +fireplace +firepower +fireproof +fireside +Firestone +firewall +firewood +firework +firm +first +firsthand +fiscal +Fischbein +Fischer +fish +fisherman +fishermen +fishery +fishmonger +fishpond +fishy +Fisk +Fiske +fissile +fission +fissure +fist +fisticuff +fit +Fitch +Fitchburg +fitful +fitting +Fitzgerald +Fitzpatrick +Fitzroy +five +fivefold +fix +fixate +fixture +Fizeau +fizzle +fjord +flabbergast +flack +flag +flagellate +flageolet +flagging +Flagler +flagpole +flagrant +Flagstaff +flagstone +flail +flair +flak +flake +flaky +flam +flamboyant +flame +flamingo +flammable +Flanagan +Flanders +flange +flank +flannel +flap +flapping +flare +flash +flashback +flashlight +flashy +flask +flat +flatbed +flathead +flatiron +flatland +flatten +flattery +flatulent +flatus +flatworm +flaunt +flautist +flaw +flax +flaxen +flaxseed +flea +fleabane +fleawort +fleck +fled +fledge +fledgling +flee +fleece +fleeing +fleet +Fleming +flemish +flesh +fleshy +fletch +Fletcher +flew +flex +flexible +flexural +flexure +flick +flier +flight +flimsy +flinch +fling +flint +flintlock +flinty +flip +flipflop +flippant +flipping +flirt +flirtation +flirtatious +flit +flitting +Flo +float +floc +flocculate +flock +floe +flog +flogging +flood +floodgate +floodlight +floodlit +floor +floorboard +flop +flopping +floppy +flora +floral +Florence +Florentine +florican +florid +Florida +Floridian +florin +florist +flotation +flotilla +flounce +flounder +flour +flourish +floury +flout +flow +flowchart +flowerpot +flowery +flown +Floyd +flu +flub +flubbing +fluctuate +flue +fluency +fluent +fluff +fluffy +fluid +fluke +flung +fluoresce +fluorescein +fluorescent +fluoridate +fluoride +fluorine +fluorite +fluorocarbon +fluorspar +flurry +flush +fluster +flute +flutter +flux +fly +flycatcher +flyer +Flynn +flyway +FM +FMC +foal +foam +foamflower +foamy +fob +fobbing +focal +foci +focus +focussed +fodder +foe +fog +fogging +foggy +fogy +foible +foil +foist +fold +foldout +Foley +foliage +foliate +folio +folk +folklore +folksong +folksy +follicle +follicular +follow +followeth +folly +Fomalhaut +fond +fondle +fondly +font +Fontaine +Fontainebleau +food +foodstuff +fool +foolhardy +foolish +foolproof +foot +footage +football +footbridge +Foote +footfall +foothill +footman +footmen +footnote +footpad +footpath +footprint +footstep +footstool +footwear +footwork +fop +foppish +for +forage +foray +forbade +forbear +forbearance +Forbes +forbid +forbidden +forbidding +forbore +forborne +force +forceful +forcible +ford +Fordham +fore +foreign +forensic +forest +forestry +forever +forfeit +forfeiture +forfend +forgave +forge +forgery +forget +forgetful +forgettable +forgetting +forgive +forgiven +forgot +forgotten +fork +forklift +forlorn +form +formal +formaldehyde +formant +format +formate +formatting +formic +Formica +formidable +Formosa +formula +formulae +formulaic +formulate +Forrest +forsake +forsaken +forsook +forswear +Forsythe +fort +forte +Fortescue +forth +forthcome +forthright +forthwith +fortieth +fortify +fortin +fortiori +fortitude +fortnight +Fortran +fortress +fortunate +fortune +forty +forum +forward +Foss +fossil +fossiliferous +foster +fosterite +fought +foul +foulmouth +found +foundation +foundling +foundry +fount +fountain +fountainhead +four +fourfold +Fourier +foursome +foursquare +fourteen +fourteenth +fourth +fovea +fowl +fox +foxglove +Foxhall +foxhole +foxhound +foxtail +foxy +foyer +FPC +fraction +fractionate +fractious +fracture +fragile +fragment +fragmentary +fragmentation +fragrant +frail +frailty +frambesia +frame +framework +franc +franca +France +Frances +franchise +Francis +Franciscan +Francisco +francium +franco +frangipani +frank +Frankfort +Frankfurt +frankfurter +franklin +frantic +Franz +Fraser +fraternal +fraternity +Frau +fraud +fraudulent +fraught +fray +frayed +Frazier +frazzle +freak +freakish +freckle +Fred +Freddie +Freddy +Frederic +Frederick +Fredericks +Fredericksburg +Fredericton +Fredholm +Fredrickson +free +freeboot +freed +Freedman +freedmen +freedom +freehand +freehold +freeing +freeman +freemen +Freeport +freer +freest +freestone +freethink +Freetown +freeway +freewheel +freeze +freight +French +Frenchman +Frenchmen +frenetic +frenzy +freon +frequent +fresco +frescoes +fresh +freshen +freshman +freshmen +freshwater +Fresnel +Fresno +fret +fretting +Freud +Freudian +Frey +Freya +friable +friar +fricative +Frick +friction +frictional +Friday +fried +Friedman +friend +frieze +frigate +Frigga +fright +frighten +frightful +frigid +Frigidaire +frill +frilly +fringe +frisky +fritillary +fritter +Fritz +frivolity +frivolous +frizzle +fro +frock +frog +frolic +from +front +frontage +frontal +frontier +frontiersman +frontiersmen +frost +frostbite +frostbitten +frosty +froth +frothy +frown +frowzy +froze +frozen +Fruehauf +frugal +fruit +fruitful +fruition +frustrate +frustrater +frustum +fry +Frye +FTC +Fuchs +Fuchsia +fudge +fuel +fugal +fugitive +fugue +Fuji +Fujitsu +fulcrum +fulfill +full +fullback +Fullerton +fully +fulminate +fulsome +Fulton +fum +fumble +fume +fumigant +fumigate +fun +function +functionary +functor +fund +fundamental +funeral +funereal +fungal +fungi +fungible +fungicide +fungoid +fungus +funk +funnel +funny +fur +furbish +furious +furl +furlong +furlough +Furman +furnace +furnish +furniture +furrier +furring +furrow +furry +further +furthermore +furthermost +furthest +furtive +fury +furze +fuse +fuselage +fusible +fusiform +fusillade +fusion +fuss +fussy +fusty +futile +future +fuzz +fuzzy +g +g's +gab +gabardine +gabbing +gabble +gabbro +Gaberones +gable +Gabon +Gabriel +Gabrielle +gad +gadding +gadfly +gadget +gadgetry +gadolinium +gadwall +Gaelic +gaff +gaffe +gag +gage +gagging +gaggle +gagwriter +gaiety +Gail +gaillardia +gain +Gaines +Gainesville +gainful +gait +Gaithersburg +gal +gala +galactic +Galapagos +Galatea +Galatia +galaxy +Galbreath +gale +Galen +galena +galenite +Galilee +gall +Gallagher +gallant +gallantry +gallberry +gallery +galley +gallinule +gallium +gallivant +gallon +gallonage +gallop +Galloway +gallows +gallstone +Gallup +gallus +Galois +Galt +galvanic +galvanism +galvanometer +Galveston +Galway +gam +Gambia +gambit +gamble +gambol +game +gamecock +gamin +gamma +gamut +gander +gang +Ganges +gangland +gangling +ganglion +gangplank +gangster +gangway +gannet +Gannett +gantlet +gantry +Ganymede +GAO +gap +gape +gar +garage +garb +garbage +garble +Garcia +garden +gardenia +Gardner +Garfield +gargantuan +gargle +Garibaldi +garish +garland +garlic +garner +garnet +Garrett +garrison +Garrisonian +garrulous +Garry +garter +Garth +Garvey +Gary +gas +Gascony +gaseous +gash +gasify +gasket +gaslight +gasoline +gasp +Gaspee +gassing +gassy +Gaston +gastrointestinal +gastronome +gastronomy +gate +Gates +gateway +gather +Gatlinburg +gator +gauche +gaucherie +gaudy +gauge +gaugeable +Gauguin +Gaul +gauleiter +Gaulle +gaunt +gauntlet +gaur +gauss +Gaussian +gauze +gave +gavel +Gavin +gavotte +gawk +gawky +gay +Gaylord +gaze +gazelle +gazette +GE +gear +gecko +gee +geese +Gegenschein +Geiger +Geigy +geisha +gel +gelable +gelatin +gelatine +gelatinous +geld +gem +Gemini +gemlike +Gemma +gender +gene +genealogy +genera +general +generate +generic +generosity +generous +Genesco +genesis +genetic +Geneva +Genevieve +genial +genie +genii +genius +Genoa +genotype +genre +gent +genteel +gentian +gentile +gentility +gentle +gentleman +gentlemen +gentry +genuine +genus +geocentric +geochemical +geochemistry +geochronology +geodesic +geodesy +geodetic +geoduck +Geoffrey +geographer +geography +geology +geometer +geometric +geometrician +geometry +geophysical +geophysics +geopolitic +George +Georgetown +Georgia +Gerald +Geraldine +geranium +Gerard +Gerber +gerbil +Gerhard +Gerhardt +geriatric +germ +German +germane +Germanic +germanium +Germantown +Germany +germicidal +germicide +germinal +germinate +Gerry +Gershwin +Gertrude +gerund +gerundial +gerundive +gestalt +Gestapo +gesticulate +gesture +get +getaway +getting +Getty +Gettysburg +geyser +Ghana +ghastly +Ghent +gherkin +ghetto +ghost +ghostlike +ghostly +ghoul +ghoulish +Giacomo +giant +giantess +gibberish +gibbet +gibbon +Gibbons +gibbous +Gibbs +gibby +gibe +giblet +Gibraltar +Gibson +giddap +giddy +Gideon +Gifford +gift +gig +gigacycle +gigahertz +gigantic +gigavolt +gigawatt +gigging +giggle +Gil +gila +gilbert +Gilbertson +Gilchrist +gild +Gilead +Giles +gill +Gillespie +Gillette +Gilligan +Gilmore +gilt +gimbal +Gimbel +gimpy +gin +Gina +ginger +gingham +gingko +ginkgo +ginmill +Ginn +ginning +Gino +Ginsberg +Ginsburg +ginseng +Giovanni +giraffe +gird +girdle +girl +girlie +girlish +girth +gist +Giuliano +Giuseppe +give +giveaway +given +giveth +glacial +glaciate +glacier +glacis +glad +gladden +gladdy +glade +gladiator +gladiolus +Gladstone +Gladys +glamor +glamorous +glamour +glance +gland +glandular +glare +Glasgow +glass +glassine +glassware +glasswort +glassy +Glaswegian +glaucoma +glaucous +glaze +gleam +glean +Gleason +glee +gleeful +glen +Glenda +Glendale +Glenn +glib +Glidden +glide +glimmer +glimpse +glint +glissade +glisten +glitch +glitter +gloat +glob +global +globe +globular +globule +globulin +glom +glomerular +gloom +gloomy +Gloria +Gloriana +glorify +glorious +glory +gloss +glossary +glossed +glossolalia +glossy +glottal +glottis +Gloucester +glove +glow +glue +glued +gluey +gluing +glum +glut +glutamic +glutinous +glutting +glutton +glyceride +glycerin +glycerinate +glycerine +glycerol +glycol +glyph +GM +GMT +gnarl +gnash +gnat +gnaw +gneiss +gnome +gnomon +gnomonic +gnostic +GNP +gnu +go +Goa +goad +goal +goat +gob +gobble +gobbledygook +goblet +god +Goddard +goddess +godfather +Godfrey +godhead +godkin +godlike +godmother +godparent +godsend +godson +Godwin +godwit +goer +goes +Goethe +Goff +gog +goggle +Gogh +gogo +gold +Goldberg +golden +goldeneye +goldenrod +goldenseal +goldfinch +goldfish +Goldman +goldsmith +Goldstein +Goldstine +Goldwater +Goleta +golf +Goliath +golly +gondola +gone +gong +Gonzales +Gonzalez +goober +good +Goode +Goodman +Goodrich +goodwill +Goodwin +goody +Goodyear +goof +goofy +goose +gooseberry +GOP +gopher +Gordian +Gordon +gore +Goren +gorge +gorgeous +gorgon +Gorham +gorilla +Gorky +gorse +Gorton +gory +gosh +goshawk +gosling +gospel +gossamer +gossip +got +Gotham +Gothic +gotten +Gottfried +gouge +Gould +gourd +gourmet +gout +govern +governance +governess +governor +gown +GPO +grab +grabbing +grace +graceful +gracious +grackle +grad +gradate +grade +gradient +gradual +graduate +Grady +Graff +graft +graham +grail +grain +grammar +grammarian +grammatic +granary +grand +grandchild +grandchildren +granddaughter +grandeur +grandfather +grandiloquent +grandiose +grandma +grandmother +grandnephew +grandniece +grandpa +grandparent +grandson +grandstand +granite +granitic +granny +granola +grant +grantee +grantor +granular +granulate +granule +Granville +grape +grapefruit +grapevine +graph +grapheme +graphic +graphite +grapple +grasp +grass +grassland +grassy +grata +grate +grateful +grater +gratify +gratis +gratitude +gratuitous +gratuity +grave +gravel +graven +Graves +gravestone +graveyard +gravid +gravitate +gravy +gray +graybeard +Grayson +graywacke +graze +grease +greasy +great +greatcoat +greater +grebe +Grecian +Greece +greed +greedy +Greek +green +Greenbelt +Greenberg +Greenblatt +Greenbriar +Greene +greenery +Greenfield +greengrocer +greenhouse +greenish +Greenland +Greensboro +greensward +greenware +Greenwich +greenwood +Greer +greet +Greg +gregarious +Gregg +Gregory +grenade +Grendel +Grenoble +Gresham +Greta +Gretchen +grew +grey +greyhound +greylag +grid +griddle +gridiron +grief +grievance +grieve +grievous +griffin +Griffith +grill +grille +grilled +grillwork +grim +grimace +Grimaldi +grime +Grimes +Grimm +grin +grind +grindstone +grinning +grip +gripe +grippe +gripping +grisly +grist +gristmill +Griswold +grit +gritty +grizzle +grizzly +groan +groat +grocer +grocery +groggy +groin +grommet +groom +groove +grope +grosbeak +gross +Grosset +Grossman +Grosvenor +grotesque +Groton +ground +groundsel +groundskeep +groundwork +group +grout +grove +grovel +Grover +grow +growl +grown +grownup +growth +grub +grubbing +grubby +grudge +gruesome +gruff +grumble +Grumman +grunt +gryphon +GSA +Guam +guanidine +guano +guarantee +guaranteeing +guaranty +guard +guardhouse +Guardia +guardian +Guatemala +gubernatorial +Guenther +guerdon +guernsey +guerrilla +guess +guesswork +guest +guffaw +Guggenheim +Guiana +guidance +guide +guidebook +guideline +guidepost +guiding +guignol +guild +guildhall +guile +Guilford +guillemot +guilt +guilty +guinea +guise +guitar +gules +gulf +gull +Gullah +gullet +gullible +gully +gulp +gum +gumbo +gumming +gummy +gumption +gumshoe +gun +Gunderson +gunfight +gunfire +gunflint +gunk +gunky +gunman +gunmen +gunnery +gunning +gunny +gunplay +gunpowder +gunshot +gunsling +Gunther +gurgle +Gurkha +guru +Gus +gush +gusset +gust +Gustafson +Gustav +Gustave +Gustavus +gusto +gusty +gut +Gutenberg +Guthrie +gutsy +gutting +guttural +guy +Guyana +guzzle +Gwen +Gwyn +gym +gymnasium +gymnast +gymnastic +gymnosperm +gyp +gypping +gypsite +gypsum +gypsy +gyrate +gyrfalcon +gyro +gyrocompass +gyroscope +h +h's +ha +Haag +Haas +habeas +haberdashery +Haberman +Habib +habit +habitant +habitat +habitation +habitual +habituate +hacienda +hack +hackberry +Hackett +hackle +hackmatack +hackney +hackneyed +hacksaw +had +Hadamard +Haddad +haddock +Hades +Hadley +hadn't +Hadrian +hadron +hafnium +Hagen +Hager +haggard +haggle +Hagstrom +Hague +Hahn +Haifa +haiku +hail +hailstone +hailstorm +Haines +hair +haircut +hairdo +hairpin +hairy +Haiti +Haitian +Hal +halcyon +hale +Haley +half +halfback +halfhearted +halfway +halibut +halide +Halifax +halite +hall +hallelujah +Halley +hallmark +hallow +Halloween +hallucinate +hallway +halma +halo +halocarbon +halogen +Halsey +Halstead +halt +halvah +halve +Halverson +ham +Hamal +Hamburg +hamburger +Hamilton +Hamiltonian +hamlet +Hamlin +hammerhead +hamming +hammock +Hammond +hamper +Hampshire +Hampton +hamster +Han +Hancock +hand +handbag +handbook +handclasp +handcuff +Handel +handful +handgun +handhold +handicap +handicapped +handicapper +handicapping +handicraft +handicraftsman +handicraftsmen +handiwork +handkerchief +handle +handleable +handlebar +handline +handmade +handmaiden +handout +handset +handshake +handsome +handspike +handstand +handwrite +handwritten +handy +handyman +handymen +Haney +Hanford +hang +hangable +hangar +hangman +hangmen +hangout +hangover +hank +Hankel +Hanley +Hanlon +Hanna +Hannah +Hannibal +Hanoi +Hanover +Hanoverian +Hans +Hansel +Hansen +hansom +Hanson +Hanukkah +hap +haphazard +happen +happenstance +happy +harangue +harass +Harbin +harbinger +Harcourt +hard +hardbake +hardboard +hardboiled +harden +hardhat +Hardin +Harding +hardscrabble +hardtack +hardtop +hardware +hardwood +hardworking +hardy +hare +harelip +harem +hark +Harlan +Harlem +Harley +harm +harmful +Harmon +harmonic +harmonious +harmony +harness +Harold +harp +harpsichord +Harpy +Harriet +Harriman +Harrington +Harris +Harrisburg +Harrison +harrow +harry +harsh +harshen +hart +Hartford +Hartley +Hartman +Harvard +harvest +harvestman +Harvey +hash +hashish +hasn't +hasp +hassle +hast +haste +hasten +Hastings +hasty +hat +hatch +hatchet +hatchway +hate +hateful +hater +Hatfield +hath +Hathaway +hatred +Hatteras +Hattie +Haugen +haughty +haul +haulage +haunch +haunt +Havana +have +haven +haven't +Havilland +havoc +haw +Hawaii +Hawaiian +hawk +Hawkins +Hawley +hawthorn +Hawthorne +hay +Hayden +Haydn +Hayes +hayfield +Haynes +Hays +haystack +hayward +hazard +hazardous +haze +hazel +hazelnut +hazy +he +he'd +he'll +head +headache +headboard +headdress +headland +headlight +headline +headmaster +headphone +headquarter +headroom +headset +headsman +headsmen +headstand +headstone +headwall +headwater +headway +heady +heal +Healey +health +healthful +healthy +Healy +heap +hear +heard +hearken +hearsay +hearse +Hearst +heart +heartbeat +heartbreak +hearten +heartfelt +hearth +hearty +heat +heater +heath +heathen +heathenish +Heathkit +heave +heaven +heavenward +heavy +heavyweight +Hebe +hebephrenic +Hebraic +Hebrew +Hecate +hecatomb +heck +heckle +Heckman +hectic +hector +Hecuba +hedge +hedgehog +hedonism +hedonist +heed +heel +heft +hefty +Hegelian +hegemony +Heidelberg +heigh +height +heighten +Heine +Heinz +heir +heiress +Heisenberg +held +Helen +Helena +Helene +helical +helicopter +heliocentric +heliotrope +helium +helix +hell +hellbender +hellebore +Hellenic +hellfire +hellgrammite +hellish +hello +helm +helmet +Helmholtz +helmsman +helmsmen +Helmut +help +helpful +helpmate +Helsinki +Helvetica +hem +hematite +Hemingway +hemisphere +hemispheric +hemlock +hemming +hemoglobin +hemolytic +hemorrhage +hemorrhoid +hemosiderin +hemp +Hempstead +hen +henbane +hence +henceforth +henchman +henchmen +Henderson +Hendrick +Hendricks +Hendrickson +henequen +Henley +Henning +henpeck +Henri +Henrietta +henry +hepatica +hepatitis +Hepburn +heptane +her +Hera +Heraclitus +herald +herb +Herbert +Herculean +Hercules +herd +herdsman +here +hereabout +hereafter +hereby +hereditary +heredity +Hereford +herein +hereinabove +hereinafter +hereinbelow +hereof +heresy +heretic +hereto +heretofore +hereunder +hereunto +herewith +heritable +heritage +Herkimer +Herman +hermeneutic +Hermes +hermetic +Hermite +hermitian +Hermosa +hero +Herodotus +heroes +heroic +heroin +heroine +heroism +heron +herpes +herpetology +Herr +herring +herringbone +Herschel +herself +Hershel +Hershey +hertz +Hertzog +hesitant +hesitate +hesitater +Hesperus +Hess +Hessian +Hester +heterodyne +heterogamous +heterogeneity +heterogeneous +heterosexual +heterostructure +heterozygous +Hetman +Hettie +Hetty +Heublein +heuristic +Heusen +Heuser +hew +Hewett +Hewitt +Hewlett +hewn +hex +hexachloride +hexadecimal +hexafluoride +hexagon +hexagonal +hexameter +hexane +hey +heyday +hi +Hiatt +Hiawatha +hibachi +Hibbard +hibernate +Hibernia +hick +Hickey +Hickman +hickory +Hicks +hid +hidalgo +hidden +hide +hideaway +hideous +hideout +hierarchal +hierarchic +hierarchy +hieratic +hieroglyphic +Hieronymus +hifalutin +Higgins +high +highball +highboy +highest +highfalutin +highhanded +highland +highlight +highroad +hightail +highway +highwayman +highwaymen +hijack +hike +hilarious +hilarity +Hilbert +Hildebrand +hill +hillbilly +Hillcrest +Hillel +hillman +hillmen +hillside +hilltop +hilly +hilt +Hilton +hilum +him +Himalaya +himself +hind +hindmost +hindrance +hindsight +Hindu +Hinduism +Hines +hinge +Hinman +hint +hinterland +hip +hipping +hippo +hippodrome +hippopotamus +hippy +hipster +Hiram +hire +hireling +Hiroshi +Hiroshima +Hirsch +his +hiss +histochemic +histochemistry +histogram +histology +historian +historic +historiography +history +histrionic +hit +Hitachi +hitch +Hitchcock +hither +hitherto +Hitler +hitting +hive +ho +hoagie +Hoagland +hoagy +hoar +hoard +hoarfrost +hoarse +hob +Hobart +Hobbes +hobble +Hobbs +hobby +hobbyhorse +hobo +Hoboken +hoc +hock +hockey +hodge +hodgepodge +Hodges +Hodgkin +hoe +Hoff +Hoffman +hog +hogan +hogging +hoi +Hokan +Holbrook +Holcomb +hold +holden +holdover +holdup +hole +holeable +holiday +Holland +Hollandaise +holler +Hollerith +Hollingsworth +Hollister +hollow +Holloway +hollowware +holly +hollyhock +Hollywood +Holm +Holman +Holmdel +Holmes +holmium +holocaust +Holocene +hologram +holography +Holst +Holstein +holster +holt +Holyoke +holystone +homage +home +homebound +homebuilder +homebuilding +homecoming +homeland +homemade +homemake +homeomorph +homeomorphic +homeopath +homeowner +Homeric +homesick +homestead +homeward +homework +homicidal +homicide +homily +homo +homogenate +homogeneity +homogeneous +homologous +homologue +homology +homomorphic +homomorphism +homonym +homosexual +homotopy +homozygous +Honda +hondo +Honduras +hone +honest +honesty +honey +honeybee +honeycomb +honeydew +honeymoon +honeysuckle +Honeywell +hong +honk +Honolulu +honorarium +honorary +honoree +Honshu +hooch +hood +hoodlum +hoof +hoofmark +hook +hookup +hookworm +hooligan +hoop +hoopla +hoosegow +Hoosier +hoot +Hoover +hooves +hop +hope +hopeful +Hopkins +Hopkinsian +hopping +hopple +hopscotch +Horace +Horatio +horde +horehound +horizon +horizontal +hormone +horn +hornbeam +hornblende +Hornblower +hornet +hornmouth +horntail +hornwort +horny +horology +horoscope +Horowitz +horrendous +horrible +horrid +horrify +horror +horse +horseback +horsedom +horseflesh +horsefly +horsehair +horselike +horseman +horsemen +horseplay +horsepower +horseshoe +horsetail +horsewoman +horsewomen +horticulture +Horton +Horus +hose +hosiery +hospice +hospitable +hospital +host +hostage +hostelry +hostess +hostile +hostler +hot +hotbed +hotbox +hotel +hotelman +hothead +hothouse +hotrod +Houdaille +Houdini +hough +Houghton +hound +hour +hourglass +house +houseboat +housebreak +housebroken +housefly +household +housekeep +housewife +housewives +housework +Houston +hove +hovel +hover +how +Howard +howdy +Howe +Howell +however +howl +howsoever +howsomever +hoy +hoyden +hoydenish +Hoyt +Hrothgar +hub +Hubbard +Hubbell +hubbub +hubby +Huber +Hubert +huck +huckleberry +huckster +huddle +Hudson +hue +hued +huff +Huffman +hug +huge +hugging +Huggins +Hugh +Hughes +Hugo +huh +hulk +hull +hum +human +humane +humanitarian +humble +Humboldt +humerus +humid +humidify +humidistat +humiliate +humility +Hummel +humming +hummingbird +hummock +humorous +hump +humpback +Humphrey +humpty +humus +Hun +hunch +hundred +hundredfold +hundredth +hung +Hungarian +Hungary +hungry +hunk +hunt +Hunter +Huntington +Huntley +Huntsville +Hurd +hurdle +hurl +hurley +Huron +hurrah +hurray +hurricane +hurry +Hurst +hurt +hurtle +hurty +Hurwitz +husband +husbandman +husbandmen +husbandry +hush +husky +hustle +Huston +hut +hutch +Hutchins +Hutchinson +Hutchison +Huxley +Huxtable +huzzah +hyacinth +Hyades +hyaline +Hyannis +hybrid +Hyde +hydra +hydrangea +hydrant +hydrate +hydraulic +hydride +hydro +hydrocarbon +hydrochemistry +hydrochloric +hydrochloride +hydrodynamic +hydroelectric +hydrofluoric +hydrogen +hydrogenate +hydrology +hydrolysis +hydrometer +hydrophilic +hydrophobia +hydrophobic +hydrosphere +hydrostatic +hydrothermal +hydrous +hydroxide +hydroxy +hydroxyl +hydroxylate +hyena +hygiene +hygrometer +hygroscopic +hying +hymen +hymn +hymnal +hyperbola +hyperbolic +hyperboloid +hyperboloidal +hypertensive +hyphen +hyphenate +hypnosis +hypnotic +hypoactive +hypocrisy +hypocrite +hypocritic +hypocycloid +hypodermic +hypophyseal +hypotenuse +hypothalamic +hypothalamus +hypotheses +hypothesis +hypothetic +hypothyroid +hysterectomy +hysteresis +hysteria +hysteric +hysteron +i +I'd +I'll +I'm +i's +I've +iambic +Iberia +ibex +ibid +ibis +IBM +Ibn +Icarus +ICC +ice +iceberg +icebox +iceland +Icelandic +ichneumon +icicle +icing +icon +iconoclasm +iconoclast +icosahedra +icosahedral +icosahedron +icy +Ida +Idaho +idea +ideal +ideate +idempotent +identical +identify +identity +ideology +idiocy +idiom +idiomatic +idiosyncrasy +idiosyncratic +idiot +idiotic +idle +idol +idolatry +idyll +idyllic +IEEE +if +iffy +Ifni +igloo +igneous +ignite +ignition +ignoble +ignominious +ignoramus +ignorant +ignore +ii +iii +Ike +ileum +iliac +Iliad +ill +illegal +illegible +illegitimacy +illegitimate +illicit +illimitable +Illinois +illiteracy +illiterate +illogic +illume +illuminate +illumine +illusion +illusionary +illusive +illusory +illustrate +illustrious +Ilona +Ilyushin +image +imagery +imaginary +imaginate +imagine +imbalance +imbecile +imbibe +Imbrium +imbroglio +imbrue +imbue +imitable +imitate +immaculate +immanent +immaterial +immature +immeasurable +immediacy +immediate +immemorial +immense +immerse +immersion +immigrant +immigrate +imminent +immobile +immobility +immoderate +immodest +immodesty +immoral +immortal +immovable +immune +immunization +immunoelectrophoresis +immutable +imp +impact +impair +impale +impalpable +impart +impartation +impartial +impassable +impasse +impassion +impassive +impatient +impeach +impeccable +impedance +impede +impediment +impel +impelled +impeller +impelling +impend +impenetrable +imperate +imperceivable +imperceptible +imperfect +imperial +imperil +imperious +imperishable +impermeable +impermissible +impersonal +impersonate +impertinent +imperturbable +impervious +impetuous +impetus +impiety +impinge +impious +impish +implacable +implant +implantation +implausible +implement +implementation +implementer +implementor +implicant +implicate +implicit +implore +impolite +impolitic +imponderable +import +important +importation +importunate +importune +impose +imposition +impossible +impost +imposture +impotent +impound +impoverish +impracticable +impractical +imprecate +imprecise +impregnable +impregnate +impresario +impress +impressible +impression +impressive +imprimatur +imprint +imprison +improbable +impromptu +improper +impropriety +improve +improvident +improvisate +improvise +imprudent +impudent +impugn +impulse +impulsive +impunity +impure +imputation +impute +in +inability +inaccessible +inaccuracy +inaccurate +inaction +inactivate +inactive +inadequacy +inadequate +inadmissible +inadvertent +inadvisable +inalienable +inalterable +inane +inanimate +inappeasable +inapplicable +inappreciable +inapproachable +inappropriate +inapt +inaptitude +inarticulate +inasmuch +inattention +inattentive +inaudible +inaugural +inaugurate +inauspicious +inboard +inborn +inbred +inbreed +Inc +Inca +incalculable +incandescent +incant +incantation +incapable +incapacitate +incapacity +incarcerate +incarnate +incautious +incendiary +incense +incentive +inception +inceptor +incessant +incest +incestuous +inch +incident +incidental +incinerate +incipient +incise +incisive +incite +inclement +inclination +incline +inclose +include +inclusion +inclusive +incoherent +incombustible +income +incommensurable +incommensurate +incommunicable +incommutable +incomparable +incompatible +incompetent +incomplete +incompletion +incomprehensible +incomprehension +incompressible +incomputable +inconceivable +inconclusive +incondensable +incongruity +incongruous +inconsequential +inconsiderable +inconsiderate +inconsistent +inconsolable +inconspicuous +inconstant +incontestable +incontrollable +incontrovertible +inconvenient +inconvertible +incorporable +incorporate +incorrect +incorrigible +incorruptible +increasable +increase +incredible +incredulity +incredulous +increment +incriminate +incubate +incubi +incubus +inculcate +inculpable +incumbent +incur +incurred +incurrer +incurring +incursion +indebted +indecent +indecipherable +indecision +indecisive +indecomposable +indeed +indefatigable +indefensible +indefinable +indefinite +indelible +indelicate +indemnity +indent +indentation +indenture +independent +indescribable +indestructible +indeterminable +indeterminacy +indeterminate +index +India +Indian +Indiana +Indianapolis +indicant +indicate +indices +indict +Indies +indifferent +indigene +indigenous +indigent +indigestible +indigestion +indignant +indignation +indignity +indigo +Indira +indirect +indiscernible +indiscoverable +indiscreet +indiscretion +indiscriminate +indispensable +indispose +indisposition +indisputable +indissoluble +indistinct +indistinguishable +indium +individual +individualism +individuate +indivisible +Indochina +indoctrinate +indolent +indomitable +Indonesia +Indonesian +indoor +indorse +indubitable +induce +inducible +induct +inductance +inductee +inductor +indulge +indulgent +industrial +industrialism +industrious +industry +indwell +indy +ineducable +ineffable +ineffective +ineffectual +inefficacy +inefficient +inelastic +inelegant +ineligible +ineluctable +inept +inequality +inequitable +inequity +inequivalent +ineradicable +inert +inertance +inertia +inertial +inescapable +inestimable +inevitable +inexact +inexcusable +inexhaustible +inexorable +inexpedient +inexpensive +inexperience +inexpert +inexpiable +inexplainable +inexplicable +inexplicit +inexpressible +inextinguishable +inextricable +infallible +infamous +infamy +infancy +infant +infantile +infantry +infantryman +infantrymen +infarct +infatuate +infeasible +infect +infectious +infelicitous +infelicity +infer +inference +inferential +inferior +infernal +inferno +inferred +inferring +infertile +infest +infestation +infidel +infield +infighting +infiltrate +infima +infimum +infinite +infinitesimal +infinitive +infinitude +infinitum +infinity +infirm +infirmary +infix +inflame +inflammable +inflammation +inflammatory +inflate +inflater +inflect +inflexible +inflict +inflow +influence +influent +influential +influenza +influx +inform +informal +informant +Informatica +information +informative +infra +infract +infrared +infrastructure +infrequent +infringe +infuriate +infuse +infusible +infusion +ingather +ingenious +ingenuity +ingenuous +Ingersoll +ingest +ingestible +ingestion +inglorious +ingot +Ingram +ingrate +ingratiate +ingratitude +ingredient +ingrown +inhabit +inhabitant +inhabitation +inhalation +inhale +inharmonious +inhere +inherent +inherit +inheritance +inheritor +inhibit +inhibition +inhibitor +inhibitory +inholding +inhomogeneity +inhomogeneous +inhospitable +inhuman +inhumane +inimical +inimitable +iniquitous +iniquity +initial +initiate +inject +injudicious +Injun +injunct +injure +injurious +injury +injustice +ink +inkling +inlaid +inland +inlay +inlet +Inman +inmate +inn +innards +innate +inner +innermost +inning +innocent +innovate +innuendo +innumerable +inoculate +inoperable +inoperative +inopportune +inordinate +inorganic +input +inquest +inquire +inquiry +inquisition +inquisitive +inquisitor +inroad +insane +insatiable +inscribe +inscription +inscrutable +insect +insecticide +insecure +inseminate +insensible +insensitive +inseparable +insert +inset +inshore +inside +insidious +insight +insightful +insignia +insignificant +insincere +insinuate +insipid +insist +insistent +insofar +insolent +insoluble +insolvable +insolvent +insomnia +insomniac +insouciant +inspect +inspector +inspiration +inspire +instable +install +installation +instalment +instance +instant +instantaneous +instead +instep +instigate +instill +instillation +instinct +instinctual +institute +institution +instruct +instructor +instrument +instrumentation +insubordinate +insubstantial +insufferable +insufficient +insular +insulate +insulin +insult +insuperable +insupportable +insuppressible +insurance +insure +insurgent +insurmountable +insurrect +intact +intake +intangible +integer +integrable +integral +integrand +integrate +integrity +integument +intellect +intellectual +intelligent +intelligentsia +intelligible +intemperance +intemperate +intend +intendant +intense +intensify +intensive +intent +intention +inter +intercalate +intercept +interception +interceptor +intercom +interdict +interest +interfere +interference +interferometer +interferometric +interferometry +interim +interior +interject +interlude +intermediary +intermit +intermittent +intern +internal +internescine +Interpol +interpolate +interpolatory +interpret +interpretation +interpretive +interregnum +interrogate +interrogatory +interrupt +interruptible +interruption +intersect +intersperse +interstice +interstitial +interval +intervene +intervenor +intervention +interviewee +intestate +intestine +intimacy +intimal +intimate +intimater +intimidate +into +intolerable +intolerant +intonate +intone +intoxicant +intoxicate +intracity +intractable +intradepartment +intramural +intramuscular +intranasal +intransigent +intransitive +intraoffice +intrastate +intravenous +intrepid +intricacy +intricate +intrigue +intrinsic +introduce +introduction +introductory +introit +introject +introspect +introversion +introvert +intrude +intrusion +intrusive +intuitable +intuition +intuitive +inundate +inure +invade +invalid +invalidate +invaluable +invariable +invariant +invasion +invasive +invective +inveigh +inveigle +invent +invention +inventive +inventor +inventory +Inverness +inverse +inversion +invert +invertebrate +invertible +invest +investigate +investigatory +investor +inveterate +inviable +invidious +invigorate +invincible +inviolable +inviolate +invisible +invitation +invite +invitee +invocate +invoice +invoke +involuntary +involute +involution +involutorial +involve +invulnerable +inward +Io +iodate +iodide +iodinate +iodine +ion +ionic +ionosphere +ionospheric +iota +Iowa +ipecac +ipsilateral +ipso +IQ +IR +Ira +Iran +Iraq +irate +ire +Ireland +Irene +iridium +iris +Irish +Irishman +Irishmen +irk +irksome +Irma +iron +ironic +ironside +ironstone +ironwood +irony +Iroquois +irradiate +irrational +Irrawaddy +irreclaimable +irreconcilable +irrecoverable +irredeemable +irredentism +irredentist +irreducible +irrefutable +irregular +irrelevancy +irrelevant +irremediable +irremovable +irreparable +irreplaceable +irrepressible +irreproachable +irreproducible +irresistible +irresolute +irresolution +irresolvable +irrespective +irresponsible +irretrievable +irreverent +irreversible +irrevocable +irrigate +irritable +irritant +irritate +irruption +IRS +Irvin +Irvine +Irving +Irwin +is +Isaac +Isaacson +Isabel +Isabella +Isaiah +isentropic +Isfahan +Ising +isinglass +Isis +Islam +Islamabad +Islamic +island +isle +isn't +isochronal +isochronous +isocline +isolate +Isolde +isomer +isomorph +isomorphic +isopleth +isotherm +isothermal +isotope +isotopic +isotropic +isotropy +Israel +Israeli +Israelite +issuance +issuant +issue +Istanbul +it +IT&T +it'd +it'll +Italian +italic +Italy +itch +item +iterate +Ithaca +itinerant +itinerary +Ito +itself +ITT +iv +Ivan +Ivanhoe +Iverson +ivory +ivy +ix +Izvestia +j +j's +jab +jabbing +Jablonsky +jack +jackanapes +jackass +jackboot +jackdaw +jacket +Jackie +jackknife +Jackman +jackpot +Jackson +Jacksonian +Jacksonville +Jacky +JACM +Jacob +Jacobean +Jacobi +Jacobian +Jacobite +Jacobs +Jacobsen +Jacobson +Jacobus +Jacqueline +Jacques +jade +Jaeger +jag +jagging +jaguar +jail +Jakarta +jake +jalopy +jam +Jamaica +jamboree +James +Jamestown +jamming +Jan +Jane +Janeiro +Janet +jangle +Janice +janissary +janitor +janitorial +Janos +Jansenist +January +Janus +Japan +Japanese +jar +jargon +jarring +Jarvin +Jason +jasper +jaundice +jaunty +Java +javelin +jaw +jawbone +jay +jazz +jazzy +jealous +jealousy +jean +Jeannie +Jed +jeep +Jeff +Jefferson +Jeffersonian +Jeffrey +Jehovah +jejune +jejunum +jelly +jellyfish +Jenkins +Jennie +Jennifer +Jennings +jenny +Jensen +jeopard +jeopardy +Jeremiah +Jeremy +Jeres +Jericho +jerk +jerky +Jeroboam +Jerome +jerry +jersey +Jerusalem +jess +Jesse +Jessica +Jessie +jest +Jesuit +Jesus +jet +jetliner +jetting +jettison +Jew +jewel +Jewell +jewelry +Jewett +Jewish +jibe +jiffy +jig +jigging +jiggle +jigsaw +Jill +jilt +Jim +Jimenez +Jimmie +jimmy +jingle +jinx +jitter +jitterbug +jittery +jive +Jo +Joan +Joanna +Joanne +Joaquin +job +jobbing +jobholder +jock +jockey +jockstrap +jocose +jocular +jocund +Joe +Joel +joey +jog +jogging +joggle +Johann +Johannes +Johannesburg +Johansen +Johanson +John +Johnny +Johns +Johnsen +Johnson +Johnston +Johnstown +join +joint +joke +Joliet +Jolla +jolly +jolt +Jon +Jonas +Jonathan +Jones +jonquil +Jordan +Jorge +Jorgensen +Jorgenson +Jose +Josef +Joseph +Josephine +Josephson +Josephus +Joshua +Josiah +joss +jostle +jot +jotting +joule +jounce +journal +journalese +journey +journeyman +journeymen +joust +Jovanovich +Jove +jovial +Jovian +jowl +jowly +joy +Joyce +joyful +joyous +joyride +joystick +Jr +Juan +Juanita +jubilant +jubilate +Judaism +Judas +Judd +Jude +judge +judicable +judicatory +judicature +judicial +judiciary +judicious +Judith +judo +Judson +Judy +jug +jugate +jugging +juggle +juice +juicy +juju +jujube +juke +Jukes +julep +Jules +Julia +Julie +Juliet +Julio +Julius +July +jumble +jumbo +jump +jumpy +junco +junction +junctor +juncture +June +Juneau +jungle +junior +juniper +junk +junkerdom +junketeer +junky +Juno +junta +Jupiter +Jura +jure +juridic +jurisdiction +jurisprudent +jurisprudential +juror +jury +just +justice +justiciable +justify +Justine +Justinian +jut +jute +Jutish +jutting +juvenile +juxtapose +juxtaposition +k +k's +Kabuki +Kabul +Kaddish +Kafka +Kafkaesque +Kahn +kaiser +Kajar +Kalamazoo +kale +kaleidescope +kaleidoscope +kalmia +Kalmuk +Kamchatka +kamikaze +Kampala +Kane +kangaroo +Kankakee +Kansas +Kant +kaolin +kaolinite +Kaplan +kapok +kappa +Karachi +Karamazov +karate +Karen +Karl +Karol +Karp +karyatid +Kaskaskia +Kate +Katharine +Katherine +Kathleen +Kathy +Katie +Katmandu +Katowice +Katz +Kauffman +Kaufman +kava +Kay +kayo +kazoo +Keaton +Keats +keddah +keel +keelson +keen +Keenan +keep +keeshond +keg +Keith +Keller +Kelley +Kellogg +kelly +kelp +Kelsey +Kelvin +Kemp +ken +Kendall +Kennan +Kennecott +Kennedy +kennel +Kenneth +Kenney +kenning +keno +Kensington +Kent +Kenton +Kentucky +Kenya +Kenyon +Kepler +kept +kerchief +Kermit +kern +kernel +kerosene +Kerr +kerry +kerygma +Kessler +kestrel +ketch +ketchup +ketone +ketosis +Kettering +kettle +Kevin +key +keyboard +keyed +Keyes +keyhole +Keynes +Keynesian +keynote +keypunch +keys +keystone +keyword +khaki +khan +Khartoum +Khmer +Khrushchev +kibbutzim +kibitz +kick +kickback +kickoff +kid +Kidde +kiddie +kidding +kidnap +kidnapping +kidney +Kieffer +Kiev +Kiewit +Kigali +Kikuyu +Kilgore +kill +killdeer +killjoy +kilobit +kilobuck +kilobyte +kilogauss +kilohertz +kilohm +kilojoule +kiloton +kilovolt +kilowatt +kiloword +Kim +Kimball +Kimberly +kimono +kin +kind +kindergarten +kindle +kindred +kinematic +kinesic +kinesthesis +kinetic +king +kingbird +kingdom +kingfisher +kinglet +kingpin +Kingsbury +Kingsley +Kingston +kink +kinky +Kinney +Kinshasha +kiosk +Kiowa +Kipling +Kirby +Kirchner +Kirchoff +kirk +Kirkland +Kirkpatrick +Kirov +kiss +kissing +kit +Kitakyushu +kitchen +kitchenette +kite +kitten +kittenish +kittle +kitty +kiva +kivu +Kiwanis +Klan +Klaus +klaxon +kleenex +Klein +Kline +Klux +klystron +knack +Knapp +knapsack +Knauer +knead +knee +kneecap +kneel +knelt +knew +knick +Knickerbocker +knife +knifelike +knight +Knightsbridge +knit +knitting +knives +knob +knobby +knock +knockdown +knockout +knoll +knot +Knott +knotting +knotty +know +knoweth +knowhow +knowledge +knowledgeable +Knowles +Knowlton +known +Knox +Knoxville +knuckle +knuckleball +Knudsen +Knudson +knurl +Knutsen +Knutson +koala +Koch +Kochab +Kodachrome +kodak +Kodiak +Koenig +Koenigsberg +kohlrabi +koinonia +kola +kolkhoz +kombu +Kong +Koppers +Koran +Korea +kosher +Kowalewski +Kowalski +kraft +Krakatoa +Krakow +Kramer +Krause +kraut +Kremlin +Kresge +Krieger +Krishna +Kristin +Kronecker +Krueger +Kruger +Kruse +krypton +Ku +kudo +kudzu +Kuhn +kulak +kumquat +Kurd +Kurt +Kuwait +kwashiorkor +Kyle +Kyoto +l +l'oeil +l's +la +lab +Laban +label +labile +laboratory +laborious +labour +Labrador +labradorite +labyrinth +lac +lace +lacerate +Lacerta +lacewing +Lachesis +lack +lackadaisic +lackey +lacquer +lacrosse +lactate +lacuna +lacunae +lacustrine +lacy +lad +laden +ladle +lady +ladyfern +ladylike +Lafayette +lag +lager +lagging +lagoon +Lagos +Lagrange +Lagrangian +Laguerre +Lahore +laid +Laidlaw +lain +lair +laissez +laity +lake +Lakehurst +lakeside +lam +Lamar +lamb +lambda +lambert +lame +lamellar +lament +lamentation +laminate +lamming +lamp +lampblack +lamplight +lampoon +lamprey +Lana +Lancashire +Lancaster +lance +land +landau +landfill +landhold +Landis +landlord +landmark +landowner +landscape +landslide +lane +Lang +Lange +Langley +Langmuir +language +languid +languish +Lanka +lanky +Lansing +lantern +lanthanide +lanthanum +Lao +Laocoon +Laos +Laotian +lap +lapel +lapelled +lapidary +Laplace +lappet +lapping +lapse +Laramie +larceny +larch +lard +Laredo +Lares +large +largemouth +largesse +lariat +lark +Larkin +larkspur +Larry +Lars +Larsen +Larson +larva +larvae +larval +laryngeal +larynges +larynx +lascar +lascivious +lase +lash +lass +lasso +last +latch +late +latent +later +latera +lateral +Lateran +laterite +latest +latex +lath +lathe +Lathrop +Latin +Latinate +latitude +latitudinal +latitudinary +Latrobe +latter +lattice +latus +laud +laudanum +laudatory +Lauderdale +Laue +laugh +laughingstock +Laughlin +laughter +launch +launder +laundry +laura +laureate +laurel +Lauren +Laurence +Laurent +Laurentian +Laurie +Lausanne +lava +lavabo +lavatory +lavender +lavish +Lavoisier +law +lawbreaker +lawbreaking +lawful +lawgiver +lawgiving +lawmake +lawman +lawmen +lawn +Lawrence +lawrencium +Lawson +lawsuit +lawyer +lax +laxative +lay +layette +layman +laymen +layoff +layout +Layton +layup +Lazarus +laze +lazy +lazybones +lea +leach +leachate +lead +leaden +leadeth +leadsman +leadsmen +leaf +leaflet +leafy +league +leak +leakage +leaky +lean +Leander +leap +leapfrog +leapt +Lear +learn +lease +leasehold +leash +least +leather +leatherback +leatherneck +leatherwork +leathery +leave +leaven +Leavenworth +Lebanese +Lebanon +lebensraum +Lebesgue +lecher +lechery +lectionary +lecture +led +ledge +lee +leech +Leeds +leek +leer +leery +leeward +leeway +left +leftmost +leftover +leftward +lefty +leg +legacy +legal +legate +legatee +legato +legend +legendary +Legendre +legerdemain +legging +leggy +leghorn +legible +legion +legislate +legislature +legitimacy +legitimate +legume +leguminous +Lehigh +Lehman +Leigh +Leighton +Leila +leisure +leitmotif +leitmotiv +Leland +lemma +lemming +lemon +lemonade +Lemuel +Len +Lena +lend +length +lengthen +lengthwise +lengthy +lenient +Lenin +Leningrad +Leninism +Leninist +Lennox +Lenny +lens +lent +Lenten +lenticular +lentil +Leo +Leon +Leona +Leonard +Leonardo +Leone +Leonid +leonine +leopard +Leopold +leper +lepidolite +leprosy +Leroy +Lesbian +lesion +Leslie +Lesotho +less +lessee +lessen +lesson +lessor +lest +Lester +let +lethal +lethargy +Lethe +Letitia +letterhead +letterman +lettermen +letting +lettuce +leukemia +levee +level +lever +leverage +Levi +Levin +Levine +Levis +levitate +Leviticus +Levitt +levity +levy +lew +lewd +lewis +lexical +lexicography +lexicon +Lexington +Leyden +liable +liaison +liar +libation +libel +libelous +liberal +liberate +Liberia +libertarian +libertine +liberty +libidinous +libido +librarian +library +librate +librettist +libretto +Libreville +Libya +lice +licensable +licensee +licensor +licentious +lichen +lick +licorice +lid +lidding +lie +Liechtenstein +lied +lien +lieu +lieutenant +life +lifeblood +lifeboat +lifeguard +lifelike +lifelong +lifespan +lifestyle +lifetime +LIFO +lift +ligament +ligand +ligature +Ligget +Liggett +light +lighten +lightface +lighthearted +lighthouse +lightning +lightproof +lightweight +lignite +lignum +like +liken +likewise +Lila +lilac +Lilian +Lillian +Lilliputian +Lilly +lilt +lily +Lima +limb +limbic +limbo +lime +limelight +Limerick +limestone +limit +limitate +limousine +limp +limpet +limpid +limpkin +Lin +Lincoln +Lind +Linda +Lindberg +Lindbergh +linden +Lindholm +Lindquist +Lindsay +Lindsey +Lindstrom +line +lineage +lineal +linear +linebacker +lineman +linemen +linen +lineup +linger +lingerie +lingo +lingua +lingual +linguist +liniment +link +linkage +linoleum +Linotype +linseed +lint +Linus +lion +Lionel +lioness +lip +lipid +Lippincott +Lipschitz +Lipscomb +lipstick +Lipton +liquefaction +liquefy +liqueur +liquid +liquidate +liquor +Lisa +Lisbon +Lise +lisle +lisp +Lissajous +list +listen +lit +litany +literacy +literal +literary +literate +literature +lithe +lithic +lithium +lithograph +lithography +lithology +lithosphere +lithospheric +litigant +litigate +litigious +litmus +litterbug +little +littleneck +Littleton +Litton +littoral +liturgic +liturgy +live +Livermore +Liverpool +liverwort +livery +livestock +liveth +livid +Livingston +livre +Liz +lizard +Lizzie +Lloyd +lo +load +loaf +loam +loamy +loan +loath +loathe +loathsome +loaves +lob +lobar +lobby +lobe +loblolly +lobo +lobscouse +lobster +lobular +lobule +local +locale +locate +loci +lock +Locke +Lockhart +Lockheed +Lockian +locknut +lockout +locksmith +lockup +Lockwood +locomote +locomotion +locomotive +locomotor +locomotory +locoweed +locus +locust +locutor +lodestone +lodge +lodgepole +Lodowick +Loeb +loess +loft +lofty +log +Logan +logarithm +logarithmic +loge +loggerhead +logging +logic +logistic +logjam +loin +loincloth +Loire +Lois +loiter +Loki +Lola +loll +lollipop +lolly +Lomb +Lombard +Lombardy +Lome +London +lone +lonesome +long +longevity +Longfellow +longhand +longhorn +longish +longitude +longitudinal +longleg +longstanding +longtime +longue +look +lookout +lookup +loom +Loomis +loon +loop +loophole +loose +looseleaf +loosen +loosestrife +loot +lop +lope +Lopez +lopping +lopseed +lopsided +loquacious +loquacity +lord +lore +Lorelei +Loren +Lorinda +Lorraine +Los +losable +lose +loss +lossy +lost +lot +lotion +Lotte +lottery +Lottie +lotus +Lou +loud +loudspeaker +loudspeaking +Louis +Louisa +Louise +Louisiana +Louisville +lounge +Lounsbury +Lourdes +louse +lousewort +lousy +louver +Louvre +love +lovebird +Lovelace +Loveland +lovelorn +low +lowboy +lowdown +Lowe +Lowell +lower +lowland +Lowry +loy +loyal +loyalty +lozenge +LSI +LTV +Lubbock +Lubell +lubricant +lubricate +lubricious +lubricity +Lucas +Lucerne +Lucia +Lucian +lucid +Lucifer +Lucille +Lucius +luck +lucky +lucrative +lucre +Lucretia +Lucretius +lucy +ludicrous +Ludlow +Ludwig +Lufthansa +Luftwaffe +lug +luge +luger +luggage +lugging +Luis +luke +lukemia +lukewarm +lull +lullaby +lulu +lumbar +lumber +lumberman +lumbermen +lumen +luminance +luminary +luminescent +luminosity +luminous +lummox +lump +lumpish +Lumpur +lumpy +lunacy +lunar +lunary +lunate +lunatic +lunch +luncheon +lunchroom +lunchtime +Lund +Lundberg +Lundquist +lung +lunge +lupine +Lura +lurch +lure +lurid +lurk +Lusaka +luscious +lush +lust +lustful +lustrous +lusty +lutanist +lute +lutetium +Luther +Lutheran +Lutz +lux +luxe +Luxembourg +luxuriant +luxuriate +luxurious +luxury +Luzon +lycopodium +Lydia +lye +lying +Lykes +Lyle +Lyman +lymph +lymphocyte +lymphoma +lynch +Lynchburg +Lynn +lynx +Lyon +Lyons +Lyra +lyric +lyricism +lysergic +m +m's +ma +Mabel +Mac +macabre +macaque +MacArthur +Macassar +Macbeth +MacDonald +mace +Macedon +Macedonia +MacGregor +Mach +Machiavelli +machination +machine +machinelike +machinery +machismo +macho +macintosh +mack +MacKenzie +mackerel +Mackey +Mackinac +Mackinaw +mackintosh +MacMillan +Macon +macro +macromolecule +macrophage +macroscopic +mad +Madagascar +madam +Madame +madcap +madden +madding +Maddox +made +Madeira +Madeleine +Madeline +madhouse +Madison +madman +madmen +Madonna +Madras +Madrid +madrigal +Madsen +madstone +Mae +Maelstrom +maestro +magazine +Magdalene +magenta +Maggie +maggot +maggoty +magi +magic +magician +magisterial +magistrate +magna +magnanimity +magnanimous +magnate +magnesia +magnesite +magnesium +magnet +magnetic +magnetite +magneto +magnetron +magnificent +magnify +magnitude +magnolia +magnum +Magnuson +Magog +magpie +Magruder +Mahayana +Mahayanist +mahogany +Mahoney +maid +maiden +maidenhair +maidservant +Maier +mail +mailbox +mailman +mailmen +maim +main +Maine +mainland +mainline +mainstream +maintain +maintenance +maitre +majestic +majesty +major +make +makeshift +makeup +Malabar +maladapt +maladaptive +maladjust +maladroit +malady +Malagasy +malaise +malaprop +malaria +malarial +Malawi +Malay +Malaysia +Malcolm +malconduct +malcontent +Malden +maldistribute +Maldive +male +maledict +malevolent +malfeasant +malformation +malformed +malfunction +Mali +malice +malicious +malign +malignant +mall +mallard +malleable +mallet +Mallory +mallow +malnourished +malnutrition +malocclusion +Malone +Maloney +malposed +malpractice +Malraux +malt +Malta +Maltese +Malton +maltreat +mambo +mamma +mammal +mammalian +mammoth +man +mana +manage +manageable +managerial +Managua +Manama +manatee +Manchester +mandamus +mandarin +mandate +mandatory +mandrake +mandrel +mandrill +mane +maneuver +Manfred +manganese +mange +mangel +mangle +Manhattan +manhole +manhood +mania +maniac +maniacal +manic +manifest +manifestation +manifold +manikin +Manila +manipulable +manipulate +Manitoba +mankind +Manley +Mann +manna +mannequin +mannerism +manning +manometer +manometric +manor +manpower +Mans +manse +manservant +Mansfield +mansion +manslaughter +mantel +mantic +mantis +mantissa +mantle +mantlepiece +mantrap +manual +Manuel +manufacture +manumission +manumit +manumitted +manure +manuscript +Manville +many +manzanita +Mao +Maori +map +maple +mapping +mar +marathon +maraud +marble +Marc +Marceau +Marcel +Marcello +march +Marcia +Marco +Marcus +Marcy +Mardi +mare +Margaret +margarine +Margery +margin +marginal +marginalia +Margo +Marguerite +maria +Marie +Marietta +marigold +marijuana +Marilyn +marimba +Marin +marina +marinade +marinate +marine +Marino +Mario +Marion +marionette +marital +maritime +Marjorie +Marjory +mark +market +marketeer +marketplace +marketwise +Markham +Markov +Markovian +Marks +marksman +marksmen +Marlboro +Marlborough +Marlene +marlin +Marlowe +marmalade +marmot +maroon +marque +marquee +marquess +Marquette +marquis +marriage +marriageable +married +Marrietta +marring +Marriott +marrow +marrowbone +marry +Mars +Marseilles +marsh +Marsha +marshal +Marshall +marshland +marshmallow +mart +marten +Martha +martial +Martian +martin +Martinez +martingale +martini +Martinique +Martinson +Marty +martyr +martyrdom +marvel +marvelous +Marvin +Marx +Mary +Maryland +mascara +masculine +maser +Maseru +mash +mask +mason +Masonic +Masonite +masonry +masque +masquerade +mass +Massachusetts +massacre +massage +masseur +Massey +massif +massive +mast +masterful +mastermind +masterpiece +mastery +mastic +mastiff +mastodon +mat +match +matchbook +matchmake +mate +Mateo +mater +material +materiel +maternal +maternity +math +mathematic +mathematician +Mathematik +Mathews +Mathewson +Mathias +Mathieu +Matilda +matinal +matinee +matins +Matisse +matriarch +matriarchal +matrices +matriculate +matrimonial +matrimony +matrix +matroid +matron +Matson +matte +Matthew +Matthews +matting +mattock +mattress +Mattson +maturate +mature +maudlin +maul +Maureen +Maurice +Maurine +Mauritania +Mauritius +mausoleum +mauve +maverick +Mavis +maw +mawkish +Mawr +Max +maxim +maxima +maximal +Maximilian +maximum +Maxine +maxwell +Maxwellian +may +Maya +mayapple +maybe +Mayer +Mayfair +Mayflower +mayhem +Maynard +Mayo +mayonnaise +mayor +mayoral +mayst +Mazda +maze +mazurka +MBA +Mbabane +McAdams +McAllister +McBride +McCabe +McCall +McCann +McCarthy +McCarty +McCauley +McClain +McClellan +McClure +McCluskey +McConnel +McConnell +McCormick +McCoy +McCracken +McCullough +McDaniel +McDermott +McDonald +McDonnell +McDougall +McDowell +McElroy +McFadden +McFarland +McGee +McGill +McGinnis +McGovern +McGowan +McGrath +McGraw +McGregor +McGuire +McHugh +McIntosh +McIntyre +McKay +McKee +McKenna +McKenzie +McKeon +McKesson +McKinley +McKinney +McKnight +McLaughlin +McLean +McLeod +McMahon +McMillan +McMullen +McNally +McNaughton +McNeil +McPherson +me +mead +meadow +meadowland +meadowsweet +meager +meal +mealtime +mealy +mean +meander +meaningful +meant +meantime +meanwhile +measle +measure +meat +meaty +Mecca +mechanic +mechanism +mechanist +mecum +medal +medallion +meddle +Medea +media +medial +median +mediate +medic +medicate +Medici +medicinal +medicine +medico +mediocre +mediocrity +meditate +Mediterranean +medium +medley +Medusa +meek +meet +meetinghouse +Meg +megabit +megabyte +megahertz +megalomania +megalomaniac +megaton +megavolt +megawatt +megaword +megohm +Meier +Meistersinger +Mekong +Mel +melamine +melancholy +Melanesia +melange +Melanie +melanin +melanoma +Melbourne +Melcher +meld +melee +Melinda +meliorate +Melissa +Mellon +mellow +melodic +melodious +melodrama +melodramatic +melody +melon +Melpomene +melt +Melville +Melvin +member +membrane +memento +memo +memoir +memorabilia +memorable +memoranda +memorandum +memorial +memory +Memphis +men +menace +menagerie +menarche +mend +mendacious +mendacity +mendelevium +Mendelssohn +Menelaus +menfolk +menhaden +menial +Menlo +Mennonite +menstruate +mensurable +mensuration +mental +mention +mentor +menu +Menzies +Mephistopheles +mercantile +Mercator +Mercedes +mercenary +mercer +merchandise +merchant +merciful +mercilessly +Merck +mercurial +mercuric +mercury +mercy +mere +Meredith +meretricious +merganser +merge +meridian +meridional +meringue +merit +meritorious +Merle +merlin +mermaid +Merriam +Merrill +Merrimack +merriment +Merritt +merry +merrymake +Mervin +mesa +mescal +mescaline +mesenteric +mesh +mesmeric +meson +Mesozoic +mesquite +mess +message +messenger +Messiah +messieurs +Messrs +messy +met +metabole +metabolic +metabolism +metabolite +metal +metallic +metalliferous +metallography +metalloid +metallurgic +metallurgy +metalwork +metamorphic +metamorphism +metamorphose +metamorphosis +metaphor +metaphoric +Metcalf +mete +meteor +meteoric +meteorite +meteoritic +meteorology +meter +methacrylate +methane +method +methodic +Methodism +Methodist +methodology +Methuen +Methuselah +methyl +methylene +meticulous +metier +metric +metro +metronome +metropolis +metropolitan +mettle +mettlesome +Metzler +mew +Mexican +Mexico +Meyer +Meyers +mezzo +mi +Miami +miasma +miasmal +mica +mice +Michael +Michaelangelo +Michelangelo +Michelin +Michelson +michigan +Mickelson +Mickey +Micky +micro +microbial +microcosm +micrography +microjoule +micron +Micronesia +microscopy +mid +Midas +midband +midday +middle +Middlebury +middleman +middlemen +Middlesex +Middleton +Middletown +middleweight +midge +midget +midland +midmorn +midnight +midpoint +midrange +midscale +midsection +midshipman +midshipmen +midspan +midst +midstream +midway +midweek +Midwest +Midwestern +midwife +midwives +mien +miff +mig +might +mightn't +mighty +mignon +migrant +migrate +migratory +Miguel +mike +mila +Milan +milch +mild +mildew +Mildred +mile +mileage +Miles +milestone +milieu +militant +militarism +militarist +military +militate +militia +militiamen +milk +milkweed +milky +mill +Millard +millenarian +millenia +millennia +millennium +miller +millet +milliammeter +milliampere +Millie +millihenry +millijoule +Millikan +millinery +million +millionaire +millionth +millipede +millisecond +millivolt +millivoltmeter +milliwatt +Mills +millstone +milord +milt +Milton +Miltonic +Milwaukee +mimeograph +mimesis +mimetic +Mimi +mimic +mimicked +mimicking +minaret +mince +mincemeat +mind +Mindanao +mindful +mine +minefield +mineral +mineralogy +Minerva +minesweeper +mingle +mini +miniature +minicomputer +minim +minima +minimal +minimax +minimum +minion +ministerial +ministry +mink +Minneapolis +Minnesota +Minnie +minnow +Minoan +minor +Minos +minot +Minsky +minstrel +minstrelsy +mint +minuend +minuet +minus +minuscule +minute +minuteman +minutemen +minutiae +Miocene +Mira +miracle +miraculous +mirage +Miranda +mire +Mirfak +Miriam +mirror +mirth +misanthrope +misanthropic +miscegenation +miscellaneous +miscellany +mischievous +miscreant +miser +misery +misnomer +misogynist +misogyny +mispronunciation +miss +misshapen +missile +mission +missionary +Mississippi +Mississippian +missive +Missoula +Missouri +Missy +mist +mistletoe +mistress +misty +MIT +Mitchell +mite +miterwort +mitigate +mitral +mitre +mitt +mitten +mix +mixture +mixup +Mizar +mnemonic +moan +moat +mob +mobbing +mobcap +Mobil +mobile +mobility +mobster +moccasin +mock +mockernut +mockery +mockingbird +mockup +modal +mode +model +modem +moderate +modern +modest +Modesto +modesty +modicum +modify +modish +modular +modulate +module +moduli +modulo +modulus +Moe +Moen +Mogadiscio +Mohammedan +Mohawk +Mohr +moiety +Moines +moire +Moiseyev +moist +moisten +moisture +molal +molar +molasses +mold +moldboard +mole +molecular +molecule +molehill +molest +Moliere +Moline +Moll +Mollie +mollify +mollusk +Molly +mollycoddle +Moloch +molt +molten +Moluccas +molybdate +molybdenite +molybdenum +moment +momenta +momentary +momentous +momentum +mommy +Mona +Monaco +monad +monadic +monarch +monarchic +monarchy +monastery +monastic +monaural +Monday +monel +monetarism +monetary +money +moneymake +moneywort +Mongolia +mongoose +Monica +monies +monitor +monitory +monk +monkey +monkeyflower +monkish +Monmouth +Monoceros +monochromatic +monochromator +monocotyledon +monocular +monogamous +monogamy +monolith +monologist +monologue +monomer +monomeric +monomial +Monongahela +monopoly +monotonous +monoxide +Monroe +Monrovia +Monsanto +monsieur +monsoon +monster +monstrosity +monstrous +Mont +montage +Montague +Montana +Montclair +monte +Montenegrin +Monterey +Monteverdi +Montevideo +Montgomery +month +Monticello +Montmartre +Montpelier +Montrachet +Montreal +Monty +monument +moo +mood +moody +moon +Mooney +moonlight +moonlike +moonlit +moor +Moore +Moorish +moose +moot +mop +mopping +moraine +moral +morale +Moran +morass +moratorium +Moravia +morbid +more +morel +Moreland +moreover +Moresby +Morgan +morgen +morgue +Moriarty +moribund +Morley +Mormon +morn +Moroccan +Morocco +moron +morose +morpheme +morphemic +morphine +morphology +morphophonemic +Morrill +morris +Morrison +Morrissey +Morristown +morrow +Morse +morsel +mort +mortal +mortar +mortem +mortgage +mortgagee +mortgagor +mortician +mortify +mortise +Morton +mosaic +Moscow +Moser +Moses +Moslem +mosque +mosquito +moss +mossy +most +mot +motel +motet +moth +mother +motherhood +motherland +motif +motion +motivate +motive +motley +motor +motorcycle +Motorola +mottle +motto +mould +Moulton +mound +mount +mountain +mountaineer +mountainous +mountainside +mourn +mournful +mouse +moustache +mousy +mouth +mouthful +mouthpiece +Mouton +move +movie +mow +Moyer +Mozart +MPH +Mr +Mrs +Ms +mu +much +mucilage +muck +mucosa +mucus +mud +Mudd +mudding +muddle +muddlehead +muddy +mudguard +mudsling +Mueller +muezzin +muff +muffin +muffle +mug +mugging +muggy +mugho +Muir +Mukden +mulatto +mulberry +mulch +mulct +mule +mulish +mull +mullah +mullein +Mullen +mulligan +mulligatawny +mullion +multi +multinomial +multiple +multiplex +multiplexor +multipliable +multiplicand +multiplication +multiplicative +multiplicity +multiply +multitude +multitudinous +mum +mumble +Mumford +mummy +munch +Muncie +mundane +mung +Munich +municipal +munificent +munition +Munson +muon +Muong +mural +murder +murderous +muriatic +Muriel +murk +murky +murmur +Murphy +Murray +murre +Muscat +muscle +Muscovite +Muscovy +muscular +musculature +muse +museum +mush +mushroom +mushy +music +musicale +musician +musicology +musk +Muskegon +muskellunge +musket +muskmelon +muskox +muskoxen +muskrat +muslim +muslin +mussel +must +mustache +mustachio +mustang +mustard +mustn't +musty +mutandis +mutant +mutate +mutatis +mute +mutilate +mutineer +mutiny +mutt +mutter +mutton +mutual +mutuel +Muzak +Muzo +muzzle +my +Mycenae +Mycenaean +mycobacteria +mycology +myel +myeline +myeloid +Myers +mylar +mynah +Mynheer +myocardial +myocardium +myofibril +myopia +myopic +myosin +Myra +myriad +Myron +myrrh +myrtle +myself +mysterious +mystery +mystic +mystify +mystique +myth +mythic +mythology +n +n's +NAACP +nab +nabbing +Nabisco +Nadine +nadir +nag +Nagasaki +nagging +Nagoya +Nagy +naiad +nail +Nair +Nairobi +naive +naivete +naked +name +nameable +nameplate +namesake +Nan +Nancy +Nanette +Nanking +nanosecond +Nantucket +Naomi +nap +napkin +Naples +Napoleon +Napoleonic +napping +Narbonne +narcissist +narcissus +narcosis +narcotic +Narragansett +narrate +narrow +nary +NASA +nasal +nascent +Nash +Nashua +Nashville +Nassau +nasturtium +nasty +Nat +natal +Natalie +Natchez +Nathan +Nathaniel +nation +nationhood +nationwide +native +NATO +natty +natural +nature +naturopath +naughty +nausea +nauseate +nauseum +nautical +nautilus +Navajo +naval +nave +navel +navigable +navigate +navy +nay +Nazarene +Nazareth +Nazi +Nazism +NBC +NBS +NC +NCAA +NCR +ND +Ndjamena +ne +Neal +Neanderthal +Neapolitan +near +nearby +nearest +nearsighted +neat +neater +neath +Nebraska +nebula +nebulae +nebular +nebulous +necessary +necessitate +necessity +neck +necklace +neckline +necktie +necromancer +necromancy +necromantic +necropsy +necrosis +necrotic +nectar +nectareous +nectary +Ned +nee +need +needful +needham +needle +needlepoint +needn't +needy +Neff +negate +neglect +negligee +negligent +negligible +negotiable +negotiate +Negro +Negroes +Negroid +Nehru +Neil +neither +Nell +Nellie +Nelsen +Nelson +nemesis +neoclassic +neodymium +neolithic +neologism +neon +neonatal +neonate +neophyte +neoprene +Nepal +nepenthe +nephew +Neptune +neptunium +nereid +Nero +nerve +nervous +Ness +nest +nestle +Nestor +net +nether +Netherlands +netherworld +netting +nettle +nettlesome +network +Neumann +neural +neuralgia +neurasthenic +neuritis +neuroanatomic +neuroanatomy +neuroanotomy +neurology +neuromuscular +neuron +neuronal +neuropathology +neurophysiology +neuropsychiatric +neuroses +neurosis +neurotic +neuter +neutral +neutrino +neutron +Neva +Nevada +neve +nevertheless +Nevins +new +Newark +Newbold +newborn +Newcastle +newcomer +newel +Newell +newfound +Newfoundland +newlywed +Newman +Newport +newsboy +newscast +newsletter +newsman +newsmen +newspaper +newspaperman +newspapermen +newsreel +newsstand +Newsweek +newt +newton +Newtonian +next +Nguyen +NH +Niagara +Niamey +nib +nibble +Nibelung +nibs +Nicaragua +nice +nicety +niche +Nicholas +Nicholls +Nichols +Nicholson +nichrome +nick +nickel +nickname +Nicodemus +Nicosia +nicotine +niece +Nielsen +Nielson +Nietzsche +Niger +Nigeria +niggardly +nigger +niggle +nigh +night +nightcap +nightclub +nightdress +nightfall +nightgown +nighthawk +nightingale +nightmare +nightmarish +nightshirt +nighttime +NIH +nihilism +nihilist +Nikko +Nikolai +nil +Nile +nilpotent +nimble +nimbus +NIMH +Nina +nine +ninebark +ninefold +nineteen +nineteenth +ninetieth +ninety +Nineveh +ninth +Niobe +niobium +nip +nipping +nipple +Nippon +nirvana +nit +nitpick +nitrate +nitric +nitride +nitrite +nitrogen +nitrogenous +nitroglycerine +nitrous +nitty +Nixon +NJ +NM +no +NOAA +Noah +nob +Nobel +nobelium +noble +nobleman +noblemen +noblesse +nobody +nobody'd +nocturnal +nocturne +nod +nodal +nodding +node +nodular +nodule +Noel +noise +noisemake +noisy +Nolan +Noll +nolo +nomenclature +nominal +nominate +nominee +non +nonce +nonchalant +nondescript +none +nonetheless +nonogenarian +nonsensic +noodle +nook +noon +noontime +noose +nor +Nordhoff +Nordstrom +Noreen +Norfolk +norm +Norma +normal +normalcy +Norman +Normandy +normative +Norris +north +Northampton +northbound +northeast +northeastern +northerly +northern +northernmost +northland +Northrop +Northrup +Northumberland +northward +northwest +northwestern +Norton +Norwalk +Norway +Norwegian +Norwich +nose +nosebag +nosebleed +nostalgia +nostalgic +Nostradamus +Nostrand +nostril +not +notarize +notary +notate +notch +note +notebook +noteworthy +nothing +notice +noticeable +notify +notion +notoriety +notorious +Nottingham +notwithstanding +Nouakchott +noun +nourish +nouveau +Nov +nova +Novak +novel +novelty +November +novice +novitiate +novo +Novosibirsk +now +nowaday +nowhere +nowise +noxious +nozzle +NRC +NSF +NTIS +nu +nuance +Nubia +nubile +nucleant +nuclear +nucleate +nuclei +nucleic +nucleoli +nucleolus +nucleotide +nucleus +nuclide +nude +nudge +nugatory +nugget +nuisance +null +nullify +numb +numerable +numeral +numerate +numeric +Numerische +numerology +numerous +numinous +numismatic +numismatist +nun +nuptial +nurse +nursery +nurture +nut +nutate +nutcrack +nuthatch +nutmeg +nutria +nutrient +nutrition +nutritious +nutritive +nutshell +nutting +nuzzle +NY +NYC +nylon +nymph +nymphomania +nymphomaniac +Nyquist +NYU +o +O'Brien +o'clock +O'Connell +O'Connor +O'Dell +O'Donnell +O'Dwyer +o'er +O'Hare +O'Leary +o's +O'Shea +O'Sullivan +oaf +oak +oaken +Oakland +Oakley +oakwood +oar +oases +oasis +oat +oath +oatmeal +obduracy +obdurate +obedient +obeisant +obelisk +Oberlin +obese +obey +obfuscate +obfuscatory +obituary +object +objectify +objectivity +objector +objet +obligate +obligatory +oblige +oblique +obliterate +oblivion +oblivious +oblong +obnoxious +oboe +oboist +obscene +obscure +obsequious +obsequy +observant +observation +observatory +observe +obsess +obsession +obsessive +obsidian +obsolescent +obsolete +obstacle +obstinacy +obstinate +obstruct +obtain +obtrude +obtrusive +obverse +obviate +obvious +ocarina +occasion +occident +occidental +occipital +occlude +occlusion +occlusive +occult +occultate +occupant +occupation +occupy +occur +occurred +occurrent +occurring +ocean +Oceania +oceanic +oceanography +oceanside +ocelot +Oct +octagon +octagonal +octahedra +octahedral +octahedron +octal +octane +octave +Octavia +octennial +octet +octile +octillion +October +octogenarian +octopus +octoroon +ocular +odd +ode +Odessa +Odin +odious +odium +odometer +odorous +Odysseus +Odyssey +Oedipal +Oedipus +oersted +of +off +offal +offbeat +Offenbach +offend +offensive +offer +offertory +offhand +office +officeholder +officemate +official +officialdom +officiate +officio +officious +offing +offload +offsaddle +offset +offsetting +offshoot +offshore +offspring +offstage +oft +often +oftentimes +Ogden +ogle +ogre +ogress +oh +Ohio +ohm +ohmic +ohmmeter +oil +oilcloth +oilman +oilmen +oilseed +oily +oint +OK +Okay +Okinawa +Oklahoma +Olaf +old +olden +Oldenburg +Oldsmobile +oldster +oldy +oleander +olefin +oleomargarine +Olga +oligarchic +oligarchy +oligoclase +oligopoly +Olin +olive +Oliver +Olivetti +Olivia +olivine +Olsen +Olson +Olympia +Olympic +Omaha +Oman +omega +omelet +omen +omicron +ominous +omission +omit +omitted +omitting +omnibus +omnipotent +omnipresent +omniscient +on +once +oncology +oncoming +one +Oneida +onerous +oneself +onetime +oneupmanship +ongoing +onion +onlooker +onlooking +only +Onondaga +onrush +onrushing +onset +onslaught +Ontario +onto +ontogeny +ontology +onus +onward +onyx +oodles +ooze +opacity +opal +opalescent +opaque +OPEC +Opel +open +opera +operable +operand +operant +operate +operatic +operetta +Ophiucus +opiate +opinion +opinionate +opium +opossum +Oppenheimer +opponent +opportune +opposable +oppose +opposite +opposition +oppress +oppression +oppressive +oppressor +opprobrium +opt +opthalmic +opthalmologic +opthalmology +optic +optima +optimal +optimism +optimist +optimistic +optimum +option +optoacoustic +optoisolate +optometric +optometrist +optometry +opulent +opus +or +oracle +oral +orange +orangeroot +orangutan +orate +oratoric +oratorio +oratory +orb +orbit +orbital +orchard +orchestra +orchestral +orchestrate +orchid +orchis +ordain +ordeal +order +orderly +ordinal +ordinance +ordinary +ordinate +ordnance +ore +oregano +Oregon +Oresteia +Orestes +organ +organdy +organic +organismic +organometallic +orgasm +orgiastic +orgy +orient +oriental +orifice +origin +original +originate +Orin +Orinoco +oriole +Orion +Orkney +Orlando +Orleans +ornament +ornamentation +ornate +ornately +ornery +orographic +orography +Orono +orphan +orphanage +Orpheus +Orphic +Orr +Ortega +orthant +orthicon +orthoclase +orthodontic +orthodontist +orthodox +orthodoxy +orthogonal +orthography +orthonormal +orthopedic +orthophosphate +orthorhombic +Orville +Orwell +Orwellian +Osaka +Osborn +Osborne +Oscar +oscillate +oscillatory +oscilloscope +Osgood +Oshkosh +osier +Osiris +Oslo +osmium +osmosis +osmotic +osprey +osseous +ossify +ostensible +ostentatious +osteology +osteopath +osteopathic +osteopathy +osteoporosis +ostracism +ostracod +Ostrander +ostrich +Oswald +Othello +other +otherwise +otherworld +otherworldly +Otis +Ott +Ottawa +otter +Otto +Ottoman +Ouagadougou +ouch +ought +oughtn't +ounce +our +ourselves +oust +out +outermost +outlandish +outlawry +outrageous +ouzel +ouzo +ova +oval +ovary +ovate +oven +ovenbird +over +overhang +overt +overture +Ovid +oviform +ow +owe +Owens +owing +owl +owly +own +ox +oxalate +oxalic +oxcart +oxen +oxeye +Oxford +oxidant +oxidate +oxide +Oxnard +oxygen +oxygenate +oyster +Ozark +ozone +p +p's +pa +Pablo +Pabst +pace +pacemake +pacesetting +pacific +pacifism +pacifist +pacify +pack +package +Packard +packet +pact +pad +padding +paddle +paddock +paddy +padlock +padre +paean +pagan +page +pageant +pageantry +paginate +pagoda +paid +pail +pain +Paine +painful +painstaking +paint +paintbrush +pair +pairwise +Pakistan +Pakistani +pal +palace +palate +Palatine +palazzi +palazzo +pale +Paleolithic +Paleozoic +Palermo +Palestine +palette +palfrey +palindrome +palindromic +palisade +pall +palladia +Palladian +palladium +pallet +palliate +pallid +palm +palmate +palmetto +Palmolive +Palmyra +Palo +Palomar +palpable +palsy +Pam +Pamela +pampa +pamper +pamphlet +pan +panacea +panama +pancake +Pancho +panda +Pandanus +pandemic +pandemonium +pander +Pandora +pane +panel +pang +panic +panicked +panicky +panicle +panjandrum +panning +panoply +panorama +panoramic +pansy +pant +pantheism +pantheist +pantheon +panther +pantomime +pantomimic +pantry +panty +Paoli +pap +papa +papal +papaw +paper +paperback +paperweight +paperwork +papery +papillary +papoose +Pappas +pappy +paprika +Papua +papyri +papyrus +par +parabola +parabolic +paraboloid +paraboloidal +parachute +parade +paradigm +paradigmatic +paradise +paradox +paradoxic +paraffin +paragon +paragonite +paragraph +Paraguay +parakeet +paralinguistic +parallax +parallel +parallelepiped +paralysis +paramagnet +paramagnetic +parameter +parametric +paramilitary +paramount +Paramus +paranoia +paranoiac +paranoid +paranormal +parapet +paraphernalia +paraphrase +parapsychology +parasite +parasitic +parasol +parasympathetic +paratroop +paraxial +parboil +parcel +parch +pardon +pare +paregoric +parent +parentage +parental +parentheses +parenthesis +parenthetic +parenthood +Pareto +pariah +parimutuel +Paris +parish +parishioner +Parisian +park +Parke +Parkinson +parkish +parkland +parklike +Parks +parkway +parlance +parlay +parley +parliament +parliamentarian +parliamentary +parochial +parody +parole +parolee +parquet +Parr +Parrish +parrot +parrotlike +parry +parse +Parsifal +parsimonious +parsimony +parsley +parsnip +parson +parsonage +Parsons +part +partake +Parthenon +partial +participant +participate +participle +particle +particular +particulate +partisan +partition +partner +partook +partridge +party +parvenu +Pasadena +Pascal +paschal +pasha +Paso +pass +passage +passageway +Passaic +passband +passe +passenger +passer +passerby +passion +passionate +passivate +passive +Passover +passport +password +past +paste +pasteboard +pastel +pasteup +Pasteur +pastiche +pastime +pastor +pastoral +pastry +pasture +pasty +pat +Patagonia +patch +patchwork +patchy +pate +patent +patentee +pater +paternal +paternoster +Paterson +path +pathetic +pathogen +pathogenesis +pathogenic +pathology +pathos +pathway +patient +patina +patio +patriarch +patriarchal +patriarchy +Patrice +Patricia +patrician +Patrick +patrimonial +patrimony +patriot +patriotic +patristic +patrol +patrolled +patrolling +patrolman +patrolmen +patron +patronage +patroness +Patsy +pattern +Patterson +Patti +patting +Patton +patty +paucity +Paul +Paula +Paulette +Pauli +Pauline +Paulo +Paulsen +Paulson +Paulus +paunch +paunchy +pauper +pause +pavanne +pave +pavilion +Pavlov +paw +pawn +pawnshop +Pawtucket +pax +pay +paycheck +payday +paymaster +Payne +payoff +payroll +Paz +PBS +pea +Peabody +peace +peaceable +peaceful +peacemake +peacetime +peach +Peachtree +peacock +peafowl +peak +peaky +peal +Peale +peanut +pear +Pearce +pearl +pearlstone +Pearson +peasant +peasanthood +Pease +peat +pebble +pecan +peccary +peck +Pecos +pectoral +pectoralis +peculate +peculiar +pecuniary +pedagogic +pedagogue +pedagogy +pedal +pedant +pedantic +pedantry +peddle +pedestal +pedestrian +pediatric +pediatrician +pedigree +pediment +Pedro +pee +peed +peek +peel +peep +peephole +peepy +peer +peg +Pegasus +pegboard +pegging +Peggy +pejorative +Peking +Pelham +pelican +pellagra +pellet +pelt +peltry +pelvic +pelvis +Pembroke +pemmican +pen +penal +penalty +penance +penates +pence +penchant +pencil +pend +pendant +pendulum +Penelope +penetrable +penetrate +penguin +Penh +penicillin +peninsula +penitent +penitential +penitentiary +penman +penmen +Penn +penna +pennant +penning +Pennsylvania +penny +pennyroyal +Penrose +Pensacola +pension +pensive +pent +pentagon +pentagonal +pentane +Pentecost +pentecostal +penthouse +penultimate +penumbra +penurious +penury +peony +people +Peoria +pep +peppergrass +peppermint +pepperoni +peppery +pepping +peppy +Pepsi +PepsiCo +peptide +per +perceive +percent +percentage +percentile +percept +perceptible +perception +perceptive +perceptual +perch +perchance +perchlorate +Percival +percolate +percussion +percussive +Percy +perdition +peremptory +perennial +Perez +perfect +perfectible +perfidious +perfidy +perforate +perforce +perform +performance +perfume +perfumery +perfunctory +perfusion +Pergamon +perhaps +Periclean +Pericles +peridotite +perihelion +peril +Perilla +perilous +perimeter +period +periodic +peripatetic +peripheral +periphery +periphrastic +periscope +perish +peritectic +periwinkle +perjure +perjury +perk +Perkins +perky +Perle +permalloy +permanent +permeable +permeate +Permian +permissible +permission +permissive +permit +permitted +permitting +permutation +permute +pernicious +peroxide +perpendicular +perpetrate +perpetual +perpetuate +perpetuity +perplex +perquisite +Perry +persecute +persecution +persecutory +Perseus +perseverance +persevere +Pershing +Persia +Persian +persiflage +persimmon +persist +persistent +person +persona +personage +personal +personify +personnel +perspective +perspicacious +perspicous +perspicuity +perspicuous +perspiration +perspire +persuade +persuasion +persuasive +pert +pertain +Perth +pertinacious +pertinent +perturb +perturbate +Peru +perusal +peruse +Peruvian +pervade +pervasion +pervasive +perverse +perversion +pervert +pessimal +pessimism +pessimist +pessimum +pest +peste +pesticide +pestilent +pestilential +pestle +pet +petal +Pete +Peter +Peters +Petersburg +Petersen +Peterson +petit +petite +petition +petrel +petri +petrify +petrochemical +petroglyph +petrol +petroleum +petrology +petticoat +petting +petty +petulant +petunia +Peugeot +pew +pewee +pewter +pfennig +Pfizer +phagocyte +phalanger +phalanx +phalarope +phantasy +phantom +pharmaceutic +pharmacist +pharmacology +pharmacopoeia +pharmacy +phase +PhD +pheasant +Phelps +phenol +phenolic +phenomena +phenomenal +phenomenology +phenomenon +phenotype +phenyl +phi +Phil +Philadelphia +philanthrope +philanthropic +philanthropy +philharmonic +Philip +Philippine +Philistine +Phillips +philodendron +philology +philosoph +philosophic +philosophy +Phipps +phloem +phlox +phobic +phoebe +Phoenicia +phoenix +phon +phone +phoneme +phonemic +phonetic +phonic +phonograph +phonology +phonon +phony +phosgene +phosphate +phosphide +phosphine +phosphor +phosphoresce +phosphorescent +phosphoric +phosphorus +photo +photogenic +photography +photolysis +photolytic +photometric +photometry +photon +phrase +phrasemake +phraseology +phthalate +phycomycetes +phyla +Phyllis +phylogeny +physic +physician +Physik +physiochemical +physiognomy +physiology +physiotherapist +physiotherapy +physique +phytoplankton +pi +pianissimo +pianist +piano +piazza +pica +Picasso +picayune +Piccadilly +piccolo +pick +pickaxe +pickerel +Pickering +picket +Pickett +Pickford +pickle +Pickman +pickoff +pickup +picky +picnic +picnicked +picnicker +picnicking +picofarad +picojoule +picosecond +pictorial +picture +picturesque +piddle +pidgin +pie +piece +piecemeal +piecewise +Piedmont +pier +pierce +Pierre +Pierson +pietism +piety +piezoelectric +pig +pigeon +pigeonberry +pigeonfoot +pigeonhole +pigging +piggish +piggy +pigment +pigmentation +pigpen +pigroot +pigskin +pigtail +pike +Pilate +pile +pilewort +pilfer +pilferage +pilgrim +pilgrimage +pill +pillage +pillar +pillory +pillow +Pillsbury +pilot +pimp +pimple +pin +pinafore +pinball +pinch +pincushion +pine +pineapple +Pinehurst +ping +pinhead +pinhole +pinion +pink +pinkie +pinkish +pinnacle +pinnate +pinning +pinochle +pinpoint +pinscher +Pinsky +pint +pintail +pinto +pinwheel +pinxter +pion +pioneer +pious +pip +pipe +pipeline +Piper +pipette +pipsissewa +piquant +pique +piracy +Piraeus +pirate +pirogue +pirouette +Piscataway +Pisces +piss +pistachio +pistol +pistole +piston +pit +pitch +pitchblende +pitchfork +pitchstone +piteous +pitfall +pith +pithy +pitiable +pitiful +pitilessly +pitman +Pitney +Pitt +pitting +Pittsburgh +Pittsfield +Pittston +pituitary +pity +Pius +pivot +pivotal +pixel +pixy +pizza +pizzicato +placate +placater +place +placeable +placebo +placeholder +placenta +placental +placid +plagiarism +plagiarist +plagioclase +plague +plagued +plaguey +plaid +plain +Plainfield +plaintiff +plaintive +plan +planar +Planck +plane +planeload +planet +planetaria +planetarium +planetary +planetesimal +planetoid +plank +plankton +planning +planoconcave +planoconvex +plant +plantain +plantation +plaque +plasm +plasma +plasmon +plaster +plastic +plastisol +plastron +plat +plate +plateau +platelet +platen +platform +platinize +platinum +platitude +platitudinous +Plato +platonic +Platonism +Platonist +platoon +Platte +platting +plausible +play +playa +playback +playboy +playful +playground +playhouse +playmate +playoff +playroom +playtime +playwright +playwriting +plaza +plea +plead +pleasant +please +pleasure +pleat +plebeian +plebian +pledge +Pleiades +Pleistocene +plenary +plenipotentiary +plenitude +plentiful +plenty +plenum +plethora +pleura +pleural +Plexiglas +pliable +pliancy +pliant +pliers +plight +Pliny +Pliocene +plod +plodding +plop +plopping +plot +plotting +plover +plow +plowman +plowshare +pluck +plucky +plug +pluggable +plugging +plum +plumage +plumb +plumbago +plumbate +plume +plummet +plump +plunder +plunge +plunk +plural +plus +plush +plushy +Plutarch +Pluto +plutonium +ply +Plymouth +plyscore +plywood +PM +pneumatic +pneumonia +Po +poach +pocket +pocketbook +pocketful +Pocono +pod +podge +podia +podium +Poe +poem +poesy +poet +poetic +poetry +pogo +pogrom +poi +poignant +Poincare +poinsettia +point +poise +poison +poisonous +Poisson +poke +pokerface +pol +Poland +polar +polarimeter +polarimetry +Polaris +polariscope +polariton +polarogram +polarograph +polarography +Polaroid +polaron +pole +polecat +polemic +police +policeman +policemen +policy +polio +polis +polish +Politburo +polite +politic +politician +politicking +politico +polity +Polk +polka +poll +Pollard +pollcadot +pollen +pollock +polloi +pollutant +pollute +pollution +Pollux +polo +polonaise +polonium +polopony +polygon +polygonal +polygynous +polyhedra +polyhedral +polyhedron +Polyhymnia +polymer +polymerase +polymeric +polymorph +polymorphic +polynomial +Polyphemus +polyphony +polypropylene +polytechnic +polytope +polytypy +pomade +pomegranate +Pomona +pomp +pompadour +pompano +Pompeii +pompey +pompon +pomposity +pompous +Ponce +Ponchartrain +poncho +pond +ponder +ponderous +pong +pont +Pontiac +pontiff +pontific +pontificate +pony +pooch +poodle +pooh +pool +Poole +poop +poor +pop +pope +popish +poplar +poplin +popping +poppy +populace +popular +populate +populous +porcelain +porch +porcine +porcupine +pore +pork +pornographer +pornography +porosity +porous +porphyry +porpoise +porridge +port +portage +portal +Porte +portend +portent +portentous +porterhouse +portfolio +Portia +portico +portland +portmanteau +Porto +portrait +portraiture +portray +portrayal +Portsmouth +Portugal +Portuguese +portulaca +pose +Poseidon +poseur +posey +posh +posit +position +positive +positron +posse +posseman +possemen +possess +possession +possessive +possessor +possible +possum +post +postage +postal +postcard +postcondition +postdoctoral +posterior +posteriori +posterity +postfix +postgraduate +posthumous +postlude +postman +postmark +postmaster +postmen +postmortem +postmultiply +postoperative +postorder +postpone +postprocess +postprocessor +postscript +postulate +posture +postwar +posy +pot +potable +potash +potassium +potato +potatoes +potbelly +potboil +potent +potentate +potential +potentiometer +pothole +potion +potlatch +Potomac +potpourri +pottery +potting +Potts +pouch +Poughkeepsie +poultice +poultry +pounce +pound +pour +pout +poverty +pow +powder +powderpuff +powdery +Powell +power +powerful +Powers +Poynting +ppm +practicable +practical +practice +practise +practitioner +Prado +pragmatic +pragmatism +pragmatist +Prague +prairie +praise +praiseworthy +pram +prance +prank +praseodymium +Pratt +Pravda +pray +prayer +prayerful +preach +preachy +preamble +Precambrian +precarious +precaution +precautionary +precede +precedent +precept +precess +precession +precinct +precious +precipice +precipitable +precipitate +precipitous +precise +precision +preclude +precocious +precocity +precursor +predatory +predecessor +predicament +predicate +predict +predictor +predilect +predispose +predisposition +predominant +predominate +preeminent +preempt +preemption +preemptive +preemptor +preen +prefab +prefabricate +preface +prefatory +prefect +prefecture +prefer +preference +preferential +preferred +preferring +prefix +pregnant +prehistoric +prejudice +prejudicial +preliminary +prelude +premature +premeditate +premier +premiere +premise +premium +premonition +premonitory +Prentice +preoccupy +prep +preparation +preparative +preparatory +prepare +preponderant +preponderate +preposition +preposterous +prepping +prerequisite +prerogative +presage +Presbyterian +Prescott +prescribe +prescript +prescription +prescriptive +presence +present +presentation +presentational +preservation +preserve +preside +president +presidential +press +pressure +prestidigitate +prestige +prestigious +presto +Preston +presume +presumed +presuming +presumption +presumptive +presumptuous +presuppose +presupposition +pretend +pretense +pretension +pretentious +pretext +Pretoria +pretty +prevail +prevalent +prevent +prevention +preventive +preview +previous +prexy +prey +Priam +price +prick +prickle +pride +priest +Priestley +prig +priggish +prim +prima +primacy +primal +primary +primate +prime +primeval +primitive +primitivism +primp +primrose +prince +princess +Princeton +principal +Principia +principle +print +printmake +printout +prior +priori +priory +Priscilla +prism +prismatic +prison +prissy +pristine +Pritchard +privacy +private +privet +privilege +privy +prize +prizewinning +pro +probabilist +probate +probe +probity +problem +problematic +procaine +procedural +procedure +proceed +process +procession +processor +proclaim +proclamation +proclivity +procrastinate +procreate +procrustean +Procrustes +Procter +proctor +procure +Procyon +prod +prodding +prodigal +prodigious +prodigy +produce +producible +product +productivity +Prof +profane +profess +profession +professional +professor +professorial +proffer +proficient +profile +profit +profligate +profound +profundity +profuse +profusion +progenitor +progeny +prognosis +prognosticate +programmable +programmed +programmer +programming +progress +progression +progressive +prohibit +prohibition +prohibitive +prohibitory +project +projectile +projector +Prokofieff +prolate +proletariat +proliferate +prolific +prolix +prologue +prolong +prolongate +prolusion +promenade +Promethean +Prometheus +promethium +prominent +promiscuous +promise +promote +promotion +prompt +promptitude +promulgate +prone +prong +pronoun +pronounce +pronounceable +pronto +pronunciation +proof +proofread +prop +propaganda +propagandist +propagate +propane +propel +propellant +propelled +propeller +propelling +propensity +proper +property +prophecy +prophesy +prophet +prophetic +propionate +propitiate +propitious +proponent +proportion +proportionate +propos +proposal +propose +proposition +propping +proprietary +proprietor +propriety +proprioception +proprioceptive +propulsion +propyl +propylene +prorate +prorogue +prosaic +proscenium +proscribe +proscription +prose +prosecute +prosecution +prosecutor +Proserpine +prosodic +prosody +prosopopoeia +prospect +prospector +prospectus +prosper +prosperous +prostate +prosthetic +prostitute +prostitution +prostrate +protactinium +protagonist +protean +protease +protect +protector +protectorate +protege +protein +proteolysis +proteolytic +protest +protestant +protestation +prothonotary +protocol +proton +protoplasm +protoplasmic +prototype +prototypic +Protozoa +protozoan +protract +protrude +protrusion +protrusive +protuberant +proud +Proust +prove +proven +provenance +proverb +proverbial +provide +provident +providential +province +provincial +provision +provisional +proviso +provocateur +provocation +provocative +provoke +provost +prow +prowess +prowl +proximal +proximate +proximity +proxy +prudent +prudential +prune +prurient +Prussia +pry +psalm +psalter +pseudo +psi +psych +psyche +psychiatric +psychiatrist +psychiatry +psychic +psycho +psychoacoustic +psychoanalysis +psychoanalyst +psychoanalytic +psychobiology +psychology +psychometric +psychometry +psychopath +psychopathic +psychophysic +psychophysical +psychophysics +psychophysiology +psychopomp +psychoses +psychosis +psychosomatic +psychotherapeutic +psychotherapist +psychotherapy +psychotic +psyllium +PTA +ptarmigan +Ptolemaic +Ptolemy +pub +puberty +pubescent +public +publication +publish +Puccini +puck +puckish +pudding +puddingstone +puddle +puddly +pueblo +puerile +Puerto +puff +puffball +puffed +puffery +puffin +puffy +pug +Pugh +puissant +puke +Pulaski +Pulitzer +pull +pulley +Pullman +pullover +pulmonary +pulp +pulpit +pulsar +pulsate +pulse +pulverable +puma +pumice +pummel +pump +pumpkin +pumpkinseed +pun +punch +punctual +punctuate +puncture +pundit +punditry +pungent +Punic +punish +punitive +punk +punky +punning +punster +punt +puny +pup +pupal +pupate +pupil +puppet +puppeteer +puppy +puppyish +Purcell +purchasable +purchase +Purdue +pure +purgation +purgative +purgatory +purge +purify +Purina +Puritan +puritanic +purl +purloin +purple +purport +purpose +purposeful +purposive +purr +purse +purslane +pursuant +pursue +pursuer +pursuit +purvey +purveyor +purview +pus +Pusan +Pusey +push +pushbutton +pussy +pussycat +put +putative +Putnam +putt +putty +puzzle +PVC +Pygmalion +pygmy +Pyhrric +pyknotic +Pyle +Pyongyang +pyracanth +pyramid +pyramidal +pyre +Pyrex +pyridine +pyrite +pyroelectric +pyrolyse +pyrolysis +pyrometer +pyrometry +pyrophosphate +pyrotechnic +pyroxene +pyroxenite +Pythagoras +Pythagorean +python +q +q's +Qatar +QED +qua +quack +quackery +quad +quadrangle +quadrangular +quadrant +quadratic +quadrature +quadrennial +quadric +quadriceps +quadrilateral +quadrille +quadrillion +quadripartite +quadrivium +quadruple +quadrupole +quaff +quagmire +quahog +quail +quaint +quake +Quakeress +qualified +qualify +qualitative +quality +qualm +quandary +quanta +Quantico +quantify +quantile +quantitative +quantity +quantum +quarantine +quark +quarrel +quarrelsome +quarry +quarryman +quarrymen +quart +quarterback +quartermaster +quartet +quartic +quartile +quartz +quartzite +quasar +quash +quasi +quasiparticle +quaternary +quatrain +quaver +quay +queasy +Quebec +queen +queer +quell +quench +querulous +query +quest +question +questionnaire +quetzal +queue +Quezon +quibble +quick +quicken +quickie +quicklime +quicksand +quicksilver +quickstep +quiescent +quiet +quietus +quill +quillwort +quilt +quince +quinine +Quinn +quint +quintet +quintic +quintillion +quintus +quip +quipping +Quirinal +quirk +quirky +quirt +quit +quite +Quito +quitting +quiver +Quixote +quixotic +quiz +quizzical +quo +quod +quonset +quorum +quota +quotation +quote +quotient +r +R&D +r's +rabat +rabbet +rabbi +rabbit +rabble +rabid +rabies +Rabin +raccoon +race +racetrack +raceway +Rachel +Rachmaninoff +racial +rack +racket +racketeer +rackety +racy +radar +Radcliffe +radial +radian +radiant +radiate +radical +radices +radii +radio +radioactive +radioastronomy +radiocarbon +radiochemical +radiochemistry +radiography +radiology +radiometer +radiometric +radiometry +radiophysics +radiosonde +radiosterilize +radiotherapy +radish +radium +radius +radix +radon +Rae +Rafael +Rafferty +raffia +raffish +raft +rag +rage +ragging +ragout +ragweed +raid +rail +railbird +railhead +raillery +railroad +railway +rain +rainbow +raincoat +raindrop +rainfall +rainstorm +rainy +raise +raisin +raj +rajah +rake +rakish +Raleigh +rally +Ralph +Ralston +ram +Ramada +Raman +ramble +ramify +ramming +Ramo +ramp +rampage +rampant +rampart +ramrod +Ramsey +ran +ranch +rancho +rancid +rancorous +Rand +Randall +Randolph +random +randy +rang +range +rangeland +Rangoon +rangy +Ranier +rank +Rankin +rankle +ransack +ransom +rant +Raoul +rap +rapacious +rape +Raphael +rapid +rapier +rapping +rapport +rapprochement +rapt +rapture +rare +rarefy +Raritan +rarity +rasa +rascal +rash +Rasmussen +rasp +raspberry +raster +Rastus +rat +rata +rate +rater +rather +ratify +ratio +ratiocinate +rationale +rattail +rattle +rattlesnake +raucous +ravage +rave +ravel +raven +ravenous +ravine +ravish +raw +rawboned +rawhide +Rawlinson +ray +Rayleigh +Raymond +Raytheon +raze +razor +razorback +RCA +re +reach +reactant +reactionary +read +readout +ready +Reagan +reagent +real +realisable +realm +realtor +realty +ream +reap +rear +reason +reave +reb +Rebecca +rebel +rebelled +rebelling +rebellion +rebellious +rebuke +rebut +rebuttal +rebutted +rebutting +recalcitrant +recant +recappable +recede +receipt +receive +recent +receptacle +reception +receptive +receptor +recess +recession +recessive +recherche +Recife +recipe +recipient +reciprocal +reciprocate +reciprocity +recital +recitative +reck +reckon +reclamation +recline +recluse +recompense +reconcile +recondite +reconnaissance +record +recoup +recourse +recovery +recriminate +recruit +rectangle +rectangular +rectifier +rectify +rectilinear +rectitude +rector +rectory +recumbent +recuperate +recur +recurred +recurrent +recurring +recursion +recursive +recusant +recuse +red +redact +redactor +redbird +redbud +redcoat +redden +reddish +redeem +redemption +redemptive +redhead +Redmond +redneck +redound +redpoll +redshank +redstart +Redstone +redtop +reduce +reducible +reduct +redundant +redwood +reed +reedbuck +reedy +reef +reek +reel +Reese +reeve +Reeves +refectory +refer +referee +refereeing +referenda +referendum +referent +referential +referral +referred +referring +refinery +reflect +reflectance +reflector +reflexive +reforestation +reformatory +refract +refractometer +refractory +refrain +refrigerate +refuge +refugee +refusal +refutation +refute +regal +regale +regalia +regard +regatta +regent +regime +regimen +regiment +regimentation +Regina +Reginald +region +regional +Regis +registrable +registrant +registrar +registration +registry +regress +regression +regret +regretful +regrettable +regretted +regretting +regular +regulate +regulatory +Regulus +rehabilitate +rehearsal +rehearse +Reich +Reid +reign +Reilly +reimbursable +reimburse +rein +reindeer +reinforce +Reinhold +reinstate +reject +rejoice +rejoinder +relate +relax +relaxation +relay +releasable +relevant +reliable +reliant +relic +relict +relief +relieve +religion +religiosity +religious +relinquish +reliquary +relish +reluctant +remainder +reman +remand +remark +Rembrandt +remediable +remedial +remedy +remember +remembrance +Remington +reminisce +reminiscent +remiss +remission +remit +remittance +remitted +remitting +remnant +remonstrate +remorse +remorseful +remote +removal +remunerate +Remus +Rena +renaissance +renal +Renault +rend +render +rendezvous +rendition +renegotiable +renewal +Renoir +renounce +renovate +renown +Rensselaer +rent +rental +renunciate +rep +repairman +repairmen +reparation +repartee +repeal +repeat +repeater +repel +repelled +repellent +repelling +repent +repentant +repertoire +repertory +repetition +repetitious +repetitive +replaceable +replenish +replete +replica +replicate +report +reportorial +repository +reprehensible +representative +repression +repressive +reprieve +reprimand +reprisal +reprise +reproach +reptile +reptilian +republic +republican +repudiate +repugnant +repulsion +repulsive +reputation +repute +request +require +requisite +requisition +requited +reredos +rescind +rescue +resemblant +resemble +resent +resentful +reserpine +reservation +reserve +reservoir +reside +resident +residential +residual +residuary +residue +residuum +resign +resignation +resilient +resin +resinlike +resiny +resist +resistant +resistible +resistive +resistor +resolute +resolution +resolve +resonant +resonate +resorcinol +resort +resourceful +respect +respectful +respiration +respirator +respiratory +respire +respite +resplendent +respond +respondent +response +responsible +responsive +rest +restaurant +restaurateur +restful +restitution +restive +restoration +restorative +restrain +restraint +restrict +restroom +result +resultant +resume +resuming +resumption +resurgent +resurrect +resuscitate +ret +retail +retain +retaliate +retaliatory +retard +retardant +retardation +retch +retention +retentive +reticent +reticulate +reticulum +retina +retinal +retinue +retire +retiree +retort +retract +retribution +retrieval +retrieve +retroactive +retrofit +retrofitting +retrograde +retrogress +retrogressive +retrorocket +retrospect +retrovision +return +Reub +Reuben +Reuters +reveal +revel +revelation +revelatory +revelry +revenge +revenue +rever +reverberate +revere +reverend +reverent +reverie +reversal +reverse +reversible +reversion +revert +revertive +revery +revet +revile +revisable +revisal +revise +revision +revisionary +revival +revive +revocable +revoke +revolt +revolution +revolutionary +revolve +revulsion +revved +revving +reward +Rex +Reykjavik +Reynolds +rhapsodic +rhapsody +Rhea +Rhenish +rhenium +rheology +rheostat +rhesus +rhetoric +rhetorician +rheum +rheumatic +rheumatism +Rhine +rhinestone +rhino +rhinoceros +rho +Rhoda +Rhode +Rhodes +Rhodesia +rhodium +rhododendron +rhodolite +rhodonite +rhombi +rhombic +rhombus +rhubarb +rhyme +rhythm +rhythmic +rib +ribald +ribbing +ribbon +riboflavin +ribonucleic +Rica +rice +rich +Richard +Richards +Richardson +Richfield +Richmond +Richter +rick +rickets +Rickettsia +rickety +rickshaw +Rico +ricochet +rid +riddance +ridden +ridding +riddle +ride +ridge +ridgepole +Ridgway +ridicule +ridiculous +Riemann +riffle +rifle +rifleman +riflemen +rift +rig +Rigel +rigging +Riggs +right +righteous +rightful +rightmost +rightward +rigid +rigorous +Riley +rill +rilly +rim +rime +rimming +rimy +Rinehart +ring +ringlet +ringside +rink +rinse +Rio +Riordan +riot +riotous +rip +riparian +ripe +ripen +Ripley +ripoff +ripping +ripple +rise +risen +risible +risk +risky +Ritchie +rite +Ritter +ritual +Ritz +rival +rivalry +riven +river +riverbank +riverfront +riverine +riverside +rivet +Riviera +rivulet +Riyadh +roach +road +roadbed +roadblock +roadhouse +roadside +roadster +roadway +roam +roar +roast +rob +robbery +robbin +robbing +Robbins +robe +Robert +Roberta +Roberto +Roberts +Robertson +robin +Robinson +robot +robotics +robust +Rochester +rock +rockabye +rockaway +rockbound +Rockefeller +rocket +Rockford +Rockies +Rockland +rocklike +Rockwell +rocky +rococo +rod +rode +rodent +rodeo +Rodgers +Rodney +Rodriguez +roe +roebuck +Roentgen +Roger +Rogers +rogue +roil +roister +Roland +role +roll +rollback +rollick +Rollins +Roman +romance +Romano +romantic +Rome +Romeo +romp +Romulus +Ron +Ronald +rondo +Ronnie +rood +roof +rooftop +rooftree +rook +rookie +rooky +room +roomful +roommate +roomy +Roosevelt +Rooseveltian +roost +root +rope +Rosa +Rosalie +rosary +rose +rosebud +rosebush +Roseland +rosemary +Rosen +Rosenberg +Rosenblum +Rosenthal +Rosenzweig +rosette +Ross +roster +rostrum +rosy +rot +Rotarian +rotary +rotate +ROTC +rotenone +Roth +rotogravure +rotor +rototill +rotten +rotting +rotund +rotunda +rouge +rough +roughcast +roughen +roughish +roughneck +roughshod +roulette +round +roundabout +roundhead +roundhouse +roundoff +roundtable +roundup +roundworm +rouse +Rousseau +roustabout +rout +route +routine +rove +row +rowboat +rowdy +Rowe +Rowena +Rowland +Rowley +Roy +royal +royalty +Royce +RPM +RSVP +Ruanda +rub +rubbery +rubbing +rubbish +rubble +rubdown +Rube +Ruben +rubicund +rubidium +rubric +ruby +ruckus +rudder +ruddy +rude +rudiment +rudimentary +Rudolf +Rudolph +Rudy +Rudyard +rue +rueful +ruffian +ruffle +rufous +Rufus +rug +ruin +ruinous +rule +rum +Rumania +rumble +rumen +Rumford +ruminant +rummage +rummy +rump +rumple +rumpus +run +runabout +runaway +rundown +rune +rung +Runge +runic +runneth +running +Runnymede +runoff +runt +runty +runway +Runyon +rupee +rupture +rural +ruse +rush +Rushmore +rusk +Russ +Russell +russet +Russia +Russo +russula +rust +rustic +rustle +rustproof +rusty +rut +rutabaga +Rutgers +Ruth +ruthenium +Rutherford +ruthless +rutile +Rutland +Rutledge +rutting +rutty +Rwanda +Ryan +Rydberg +Ryder +rye +s +s's +sa +sabbath +sabbatical +Sabina +Sabine +sable +sabotage +sabra +sac +sachem +sack +sacral +sacrament +Sacramento +sacred +sacrifice +sacrificial +sacrilege +sacrilegious +sacrosanct +sad +sadden +saddle +saddlebag +Sadie +sadism +sadist +Sadler +safari +safe +safeguard +safekeeping +safety +saffron +sag +saga +sagacious +sagacity +sage +sagebrush +sagging +Saginaw +sagittal +Sagittarius +sago +saguaro +Sahara +said +Saigon +sail +sailboat +sailfish +sailor +saint +sainthood +sake +Sal +Salaam +salacious +salad +salamander +salami +salaried +salary +sale +Salem +Salerno +salesgirl +Salesian +saleslady +salesman +salesmen +salesperson +salient +Salina +saline +Salisbury +Salish +saliva +salivary +salivate +Salk +Salle +sallow +sally +salmon +salmonberry +salon +saloon +saloonkeep +salsify +salt +saltbush +saltwater +salty +salubrious +salutary +salutation +salute +Salvador +salvage +salvageable +salvation +Salvatore +salve +salvo +Sam +samarium +samba +same +Sammy +Samoa +samovar +sample +Sampson +Samson +Samuel +Samuelson +San +Sana +sanatoria +sanatorium +Sanborn +Sanchez +Sancho +sanctify +sanctimonious +sanction +sanctity +sanctuary +sand +sandal +sandalwood +sandbag +sandblast +Sandburg +sanderling +Sanders +Sanderson +sandhill +Sandia +sandman +sandpaper +sandpile +sandpiper +Sandra +sandstone +Sandusky +sandwich +sandy +sane +Sanford +sang +sangaree +sanguinary +sanguine +sanguineous +Sanhedrin +sanicle +sanitarium +sanitary +sanitate +sank +sans +Santa +Santayana +Santiago +Santo +Sao +sap +sapiens +sapient +sapling +saponify +sapphire +sapping +sappy +sapsucker +Sara +Saracen +Sarah +Saran +Sarasota +Saratoga +sarcasm +sarcastic +sarcoma +sardine +sardonic +Sargent +sari +sarsaparilla +sarsparilla +sash +sashay +Saskatchewan +sassafras +sat +satan +satanic +satellite +satiable +satiate +satiety +satin +satire +satiric +satisfaction +satisfactory +satisfy +saturable +saturate +saturater +Saturday +Saturn +Saturnalia +saturnine +satyr +sauce +saucepan +saucy +Saud +Saudi +sauerkraut +Saul +Sault +Saunders +sausage +saute +sauterne +savage +savagery +Savannah +savant +save +Saviour +Savonarola +savoy +Savoyard +savvy +saw +sawbelly +sawdust +sawfish +sawfly +sawmill +sawtimber +sawtooth +sawyer +sax +saxifrage +Saxon +Saxony +saxophone +say +SC +scab +scabbard +scabious +scabrous +scaffold +Scala +scalar +scald +scale +scallop +scalp +scamp +scan +scandal +scandalous +Scandinavia +scandium +scanning +scant +scanty +scapegoat +scapula +scapular +scar +Scarborough +scarce +scare +scarecrow +scarf +scarface +scarify +scarlet +Scarsdale +scarves +scary +scat +scathe +scatterbrain +scattergun +scatting +scaup +scavenge +scenario +scene +scenery +scenic +scent +sceptic +Schaefer +Schafer +Schantz +schedule +schelling +schema +schemata +schematic +scheme +Schenectady +scherzo +Schiller +schism +schist +schizoid +schizomycetes +schizophrenia +schizophrenic +Schlesinger +schlieren +Schlitz +Schloss +Schmidt +Schmitt +Schnabel +schnapps +Schneider +Schoenberg +Schofield +scholar +scholastic +school +schoolbook +schoolboy +schoolgirl +schoolgirlish +schoolhouse +schoolmarm +schoolmaster +schoolmate +schoolroom +schoolteacher +schoolwork +schooner +Schottky +Schroeder +Schroedinger +Schubert +Schultz +Schulz +Schumacher +Schumann +Schuster +Schuyler +Schuylkill +Schwab +Schwartz +Schweitzer +sciatica +science +scientific +scientist +scimitar +scintillate +scion +scissor +sclerosis +sclerotic +SCM +scoff +scold +scoop +scoot +scope +scopic +scops +scorch +score +scoreboard +scorecard +scoria +scorn +scornful +Scorpio +scorpion +Scot +scotch +Scotia +Scotland +Scotsman +Scotsmen +Scott +Scottish +Scottsdale +Scotty +scoundrel +scour +scourge +scout +scowl +scrabble +scraggly +scram +scramble +scramming +Scranton +scrap +scrapbook +scrape +scrapping +scratch +scratchy +scrawl +scrawny +scream +screech +screechy +screed +screen +screenplay +screw +screwball +screwbean +screwdriver +screwworm +scribble +scribe +Scribners +scrim +scrimmage +Scripps +script +scription +scriptural +scripture +scriven +scroll +scrooge +scrounge +scrub +scrubbing +scrumptious +scruple +scrupulosity +scrupulous +scrutable +scrutiny +scuba +scud +scudding +scuff +scuffle +scull +sculpin +sculpt +sculptor +sculptural +sculpture +scum +scurrilous +scurry +scurvy +scuttle +scutum +Scylla +scythe +Scythia +SD +sea +seaboard +seacoast +seafare +seafood +Seagram +seagull +seahorse +seal +sealant +seam +seaman +seamen +seamy +Sean +seance +seaport +seaquake +sear +search +searchlight +Sears +seashore +seaside +season +seasonal +seat +seater +Seattle +seaward +seaweed +Sebastian +sec +secant +secede +secession +seclude +seclusion +second +secondary +secondhand +secrecy +secret +secretarial +secretariat +secretary +secrete +secretion +secretive +sect +sectarian +section +sector +secular +secure +sedan +sedate +sedentary +seder +sedge +sediment +sedimentary +sedimentation +sedition +seditious +seduce +seduction +seductive +sedulous +see +seeable +seed +seedbed +seedling +seedy +seeing +seek +seem +seen +seep +seepage +seersucker +seethe +segment +segmentation +Segovia +segregant +segregate +Segundo +Seidel +seismic +seismograph +seismography +seismology +seize +seizure +seldom +select +selectman +selectmen +selector +Selectric +Selena +selenate +selenite +selenium +self +selfish +Selfridge +Selkirk +sell +seller +sellout +Selma +seltzer +selves +Selwyn +semantic +semaphore +semblance +semester +semi +seminal +seminar +seminarian +seminary +Seminole +Semiramis +Semite +Semitic +semper +sen +senate +senatorial +send +Seneca +Senegal +senile +senior +senor +Senora +senorita +sensate +sense +sensible +sensitive +sensor +sensory +sensual +sensuous +sent +sentence +sentential +sentient +sentiment +sentinel +sentry +Seoul +sepal +separable +separate +sepia +Sepoy +sept +septa +septate +September +septennial +septic +septillion +septuagenarian +septum +sepuchral +sepulchral +sequel +sequent +sequential +sequester +sequestration +sequin +sequitur +Sequoia +sera +seraglio +serape +seraphim +serenade +serendipitous +serene +serge +sergeant +Sergei +serial +seriatim +series +serif +serious +sermon +serology +Serpens +serpent +serpentine +serum +servant +serve +service +serviceable +serviceberry +serviceman +servicemen +serviette +servile +servitor +servo +servomechanism +sesame +session +set +setback +Seth +Seton +setscrew +setting +settle +setup +seven +sevenfold +seventeen +seventeenth +seventh +seventieth +seventy +sever +several +severalfold +severalty +severe +Severn +Seville +sew +sewage +Seward +sewerage +sewn +sex +Sextans +sextet +sextillion +sexton +sextuple +sextuplet +sexual +sexy +Seymour +sforzando +shabby +shack +shackle +shad +shadbush +shade +shadflower +shadow +shadowy +shady +Shafer +Shaffer +shaft +shag +shagbark +shagging +shaggy +shah +shake +shakeable +shakedown +shaken +Shakespeare +Shakespearean +Shakespearian +shako +shaky +shale +shall +shallot +shallow +shalom +sham +shamble +shame +shameface +shameful +shampoo +shamrock +shan't +Shanghai +shank +Shannon +Shantung +shanty +shape +Shapiro +shard +share +sharecrop +shareholder +Shari +shark +Sharon +sharp +Sharpe +sharpen +sharpshoot +Shasta +shatter +shatterproof +Shattuck +shave +shaven +shaw +shawl +Shawnee +shay +she +she'd +she'll +Shea +sheaf +shear +Shearer +sheath +sheathe +sheave +shed +shedding +Shedir +Sheehan +sheen +sheep +sheepskin +sheer +sheet +Sheffield +sheik +Sheila +Shelby +Sheldon +shelf +shell +Shelley +shelter +Shelton +shelve +Shenandoah +shenanigan +Shepard +shepherd +Sheppard +Sheraton +sherbet +Sheridan +sheriff +Sherlock +Sherman +Sherrill +sherry +Sherwin +Sherwood +shibboleth +shied +shield +Shields +shift +shifty +shill +Shiloh +shim +shimming +shimmy +shin +shinbone +shine +shingle +Shinto +shiny +ship +shipboard +shipbuild +shipbuilding +shiplap +Shipley +shipman +shipmate +shipmen +shipping +shipshape +shipwreck +shipyard +shire +shirk +Shirley +shirt +shirtmake +shish +shitepoke +shiv +shiver +shivery +shoal +shock +Shockley +shod +shoddy +shoe +shoehorn +shoelace +shoemake +shoestring +shoji +shone +shoo +shoofly +shook +shoot +shop +shopkeep +shopping +shopworn +shore +shoreline +short +shortage +shortcoming +shortcut +shorten +shortfall +shorthand +shortish +shortsighted +shortstop +shot +shotbush +shotgun +should +shoulder +shouldn't +shout +shove +shovel +show +showboat +showcase +showdown +showman +showmen +shown +showpiece +showplace +showroom +showy +shrank +shrapnel +shred +shredding +Shreveport +shrew +shrewd +shrewish +shriek +shrift +shrike +shrill +shrilly +shrimp +shrine +shrink +shrinkage +shrive +shrivel +shroud +shrove +shrub +shrubbery +shrug +shrugging +shrunk +shrunken +Shu +shuck +shudder +shuddery +shuffle +shuffleboard +Shulman +shun +shunning +shunt +shut +shutdown +shutoff +shutout +shutting +shuttle +shuttlecock +shy +Shylock +sial +SIAM +Siamese +Sian +sib +Siberia +sibilant +Sibley +sibling +sibyl +sic +Sicilian +Sicily +sick +sicken +sickish +sickle +sicklewort +sickroom +side +sidearm +sideband +sideboard +sidecar +sidelight +sideline +sidelong +sideman +sidemen +sidereal +siderite +sidesaddle +sideshow +sidestep +sidestepping +sidetrack +sidewalk +sidewall +sideway +sidewinder +sidewise +sidle +Sidney +siege +Siegel +Siegfried +Sieglinda +Siegmund +Siemens +sienna +sierra +siesta +sieve +sift +sigh +sight +sightsee +sightseeing +sightseer +sigma +Sigmund +sign +signal +signature +signboard +signet +significant +signify +Signor +Signora +signpost +Sikorsky +silage +silane +Silas +silent +silhouette +silica +silicate +siliceous +silicic +silicide +silicon +silicone +silk +silken +silkworm +silky +sill +silly +silo +silt +siltation +siltstone +silty +silver +Silverman +silversmith +silverware +silvery +sima +similar +simile +similitude +simmer +Simmons +Simon +Simons +Simonson +simper +simple +simplectic +simpleminded +simpleton +simplex +simplicity +simplify +simplistic +simply +Simpson +Sims +simulate +simulcast +simultaneity +simultaneous +sin +Sinai +since +sincere +Sinclair +sine +sinew +sinewy +sinful +sing +singable +Singapore +singe +single +singlehanded +singlet +singleton +singsong +singular +sinh +sinister +sinistral +sink +sinkhole +sinning +sinter +sinuous +sinus +sinusoid +sinusoidal +Sioux +sip +sipping +sir +sire +siren +Sirius +sis +sisal +siskin +sister +Sistine +Sisyphean +Sisyphus +sit +site +sitting +situ +situate +situs +siva +six +sixfold +sixgun +sixteen +sixteenth +sixth +sixtieth +sixty +size +sizzle +skat +skate +skater +skeet +skeletal +skeleton +skeptic +sketch +sketchbook +sketchpad +sketchy +skew +ski +skid +skidding +skiddy +skied +skiff +skill +skillet +skillful +skim +skimming +skimp +skimpy +skin +skindive +skinning +skinny +skip +skipjack +skipping +Skippy +skirmish +skirt +skit +skittle +skulk +skull +skullcap +skullduggery +skunk +sky +Skye +skyhook +skyjack +skylark +skylight +skyline +skyrocket +skyscrape +skyward +skywave +skyway +slab +slack +slacken +sladang +slag +slain +slake +slam +slamming +slander +slanderous +slang +slant +slap +slapping +slapstick +slash +slat +slate +slater +slatting +slaughter +slaughterhouse +Slav +slave +slavery +Slavic +slavish +slay +sled +sledding +sledge +sledgehammer +sleek +sleep +sleepwalk +sleepy +sleet +sleety +sleeve +sleigh +sleight +slender +slept +sleuth +slew +slice +slick +slid +slide +slight +slim +slime +slimy +sling +slingshot +slip +slippage +slippery +slipping +slit +slither +slitting +sliver +slivery +Sloan +Sloane +slob +Slocum +sloe +slog +slogan +sloganeer +slogging +sloop +slop +slope +slopping +sloppy +slosh +slot +sloth +slothful +slouch +slough +sloven +slow +slowdown +sludge +slug +slugging +sluggish +sluice +slum +slumber +slumming +slump +slung +slur +slurp +slurring +slurry +sly +smack +small +smaller +Smalley +smallish +smallpox +smalltime +smart +smash +smattering +smear +smell +smelt +smile +smirk +smith +smithereens +Smithfield +Smithson +Smithsonian +smithy +smitten +smog +smoke +smokehouse +smokescreen +smokestack +smoky +smolder +smooch +smooth +smoothbore +smother +Smucker +smudge +smudgy +smug +smuggle +smut +smutty +Smyrna +Smythe +snack +snafu +snag +snagging +snail +snake +snakebird +snakelike +snakeroot +snap +snapback +snapdragon +snapping +snappish +snappy +snapshot +snare +snark +snarl +snatch +snazzy +sneak +sneaky +sneer +sneeze +snell +snick +Snider +sniff +sniffle +sniffly +snifter +snigger +snip +snipe +snippet +snippy +snivel +snob +snobbery +snobbish +snook +snoop +snoopy +snore +snorkel +snort +snotty +snout +snow +snowball +snowfall +snowflake +snowstorm +snowy +snub +snubbing +snuff +snuffer +snuffle +snuffly +snug +snuggle +snuggly +snyaptic +Snyder +so +soak +soap +soapstone +soapsud +soapy +soar +sob +sobbing +sober +sobriety +sobriquet +soccer +sociable +social +societal +Societe +society +socioeconomic +sociology +sociometric +sociometry +sock +socket +sockeye +Socrates +Socratic +sod +soda +sodden +sodding +sodium +sofa +soffit +Sofia +soft +softball +soften +software +softwood +soggy +soignee +soil +soiree +sojourn +Sol +solace +solar +sold +solder +soldier +soldiery +sole +solecism +solemn +solemnity +solenoid +solicit +solicitation +solicitor +solicitous +solicitude +solid +solidarity +solidify +soliloquy +solipsism +solitary +solitude +solo +Solomon +Solon +solstice +soluble +solute +solution +solvate +solve +solvent +soma +somal +Somali +somatic +somber +sombre +some +somebody +somebody'll +someday +somehow +someone +someone'll +someplace +Somers +somersault +Somerset +Somerville +something +sometime +somewhat +somewhere +sommelier +Sommerfeld +somnolent +son +sonar +sonata +song +songbag +songbook +songful +sonic +sonnet +sonny +Sonoma +Sonora +sonority +sonorous +Sony +soon +soot +sooth +soothe +soothsay +soothsayer +sop +sophia +Sophie +sophism +sophisticate +sophistry +Sophoclean +Sophocles +sophomore +sophomoric +sopping +soprano +sora +sorb +sorcery +sordid +sore +Sorensen +Sorenson +sorghum +sorority +sorption +sorrel +sorrow +sorrowful +sorry +sort +sortie +sou +souffle +sought +soul +soulful +sound +soundproof +soup +sour +sourberry +source +sourdough +sourwood +Sousa +soutane +south +Southampton +southbound +southeast +southeastern +southern +southernmost +Southey +southland +southpaw +southward +southwest +southwestern +souvenir +sovereign +sovereignty +soviet +sovkhoz +sow +sowbelly +sown +soy +soya +soybean +spa +space +spacecraft +spacesuit +spacious +spade +spaghetti +Spain +spalding +span +spandrel +spangle +Spaniard +spaniel +Spanish +spanning +spar +spare +sparge +spark +sparkle +Sparkman +sparky +sparling +sparring +sparrow +sparse +Sparta +Spartan +spasm +spastic +spat +spate +spatial +spatlum +spatterdock +spatula +Spaulding +spavin +spawn +spay +spayed +speak +speakeasy +spear +spearhead +spearmint +spec +special +specie +species +specific +specify +specimen +specious +speck +speckle +spectacle +spectacular +spectator +Spector +spectra +spectral +spectrogram +spectrograph +spectrography +spectrometer +spectrometric +spectrometry +spectrophotometer +spectrophotometric +spectrophotometry +spectroscope +spectroscopic +spectroscopy +spectrum +specular +speculate +sped +speech +speed +speedboat +speedometer +speedup +speedwell +speedy +spell +spellbound +Spencer +Spencerian +spend +spent +sperm +spermatophyte +Sperry +spew +sphagnum +sphalerite +sphere +spheric +spheroid +spheroidal +spherule +sphinx +Spica +spice +spicebush +spicy +spider +spiderwort +spidery +Spiegel +spigot +spike +spikenard +spiky +spill +spilt +spin +spinach +spinal +spindle +spine +spinnaker +spinneret +spinning +spinodal +spinoff +spinster +spiny +spiral +spire +spirit +spiritual +Spiro +spit +spite +spiteful +spitfire +spitting +spittle +spitz +splash +splashy +splat +splay +splayed +spleen +spleenwort +splendid +splenetic +splice +spline +splint +splintery +split +splitting +splotch +splotchy +splurge +splutter +spoil +spoilage +Spokane +spoke +spoken +spokesman +spokesmen +sponge +spongy +sponsor +spontaneity +spontaneous +spoof +spook +spooky +spool +spoon +spoonful +sporadic +spore +sport +sportsman +sportsmen +sportswear +sportswriter +sportswriting +sporty +spot +spotlight +spotting +spotty +spouse +spout +Sprague +sprain +sprang +sprawl +spray +spread +spree +sprig +sprightly +spring +springboard +springe +Springfield +springtail +springtime +springy +sprinkle +sprint +sprite +sprocket +Sproul +sprout +spruce +sprue +sprung +spud +spume +spumoni +spun +spunk +spur +spurge +spurious +spurn +spurring +spurt +sputnik +sputter +spy +spyglass +squabble +squad +squadron +squalid +squall +squamous +squander +square +squash +squashberry +squashy +squat +squatting +squaw +squawbush +squawk +squawroot +squeak +squeaky +squeal +squeamish +squeegee +squeeze +squelch +Squibb +squid +squill +squint +squire +squirehood +squirm +squirmy +squirrel +squirt +squishy +Sri +SST +St +St. +stab +stabbing +stabile +stable +stableman +stablemen +staccato +stack +Stacy +stadia +stadium +staff +Stafford +stag +stage +stagecoach +stagnant +stagnate +stagy +Stahl +staid +stain +stair +staircase +stairway +stairwell +stake +stalactite +stale +stalemate +Staley +Stalin +stalk +stall +stallion +stalwart +stamen +Stamford +stamina +staminate +stammer +stamp +stampede +Stan +stance +stanch +stanchion +stand +standard +standby +standeth +Standish +standoff +standpoint +standstill +Stanford +Stanhope +stank +Stanley +stannic +stannous +Stanton +stanza +staph +staphylococcus +staple +Stapleton +star +starboard +starch +starchy +stardom +stare +starfish +stargaze +stark +Starkey +starlet +starlight +starling +Starr +starring +start +startle +startup +starvation +starve +stash +stasis +state +Staten +stater +stateroom +statesman +statesmanlike +statesmen +statewide +static +stationarity +stationary +stationery +stationmaster +statistician +Statler +stator +statuary +statue +statuette +stature +status +statute +statutory +Stauffer +staunch +Staunton +stave +stay +stayed +stead +steadfast +steady +steak +steal +stealth +stealthy +steam +steamboat +steamy +Stearns +steed +steel +Steele +steelmake +steely +Steen +steep +steepen +steeple +steeplebush +steer +steeve +Stefan +stein +Steinberg +Steiner +stella +stellar +stem +stemming +stench +stencil +stenographer +stenography +stenotype +step +stepchild +Stephanie +stephanotis +Stephen +Stephens +Stephenson +stepmother +steppe +stepping +steprelation +stepson +stepwise +steradian +stereo +stereography +stereoscopy +sterile +sterling +stern +sternal +Sterno +sternum +steroid +stethoscope +Stetson +Steuben +Steve +stevedore +Steven +Stevens +Stevenson +stew +steward +stewardess +Stewart +stick +stickle +stickleback +stickpin +sticktight +sticky +stiff +stiffen +stifle +stigma +stigmata +stile +stiletto +still +stillbirth +stillwater +stilt +stimulant +stimulate +stimulatory +stimuli +stimulus +sting +stingy +stink +stinkpot +stinky +stint +stipend +stipple +stipulate +stir +Stirling +stirring +stirrup +stitch +stochastic +stock +stockade +stockbroker +stockholder +Stockholm +stockpile +stockroom +Stockton +stocky +stodgy +stoic +stoichiometric +stoichiometry +stoke +Stokes +stole +stolen +stolid +stomach +stomp +stone +stonecrop +Stonehenge +stonewall +stoneware +stonewort +stony +stood +stooge +stool +stoop +stop +stopband +stopcock +stopgap +stopover +stoppage +stopping +stopwatch +storage +store +storehouse +storekeep +storeroom +Storey +stork +storm +stormbound +stormy +story +storyboard +storyteller +stout +stove +stow +stowage +strabismic +strabismus +straddle +strafe +straggle +straight +straightaway +straighten +straightforward +straightway +strain +strait +strand +strange +strangle +strangulate +strap +strapping +strata +stratagem +strategic +strategist +strategy +Stratford +stratify +stratosphere +stratospheric +Stratton +stratum +Strauss +straw +strawberry +strawflower +stray +streak +stream +streamline +streamside +street +streetcar +strength +strengthen +strenuous +streptococcus +stress +stressful +stretch +strewn +striate +stricken +Strickland +strict +stricture +stride +strife +strike +strikebreak +string +stringent +stringy +strip +stripe +stripping +striptease +strive +striven +strobe +stroboscopic +strode +stroke +stroll +Strom +Stromberg +strong +stronghold +strongroom +strontium +strop +strophe +stropping +strove +struck +structural +structure +struggle +strum +strumming +strung +strut +strutting +strychnine +Stuart +stub +stubbing +stubble +stubborn +stubby +stucco +stuck +stud +studding +Studebaker +student +studio +studious +study +stuff +stuffy +stultify +stumble +stump +stumpage +stumpy +stun +stung +stunk +stunning +stunt +stupefy +stupendous +stupid +stupor +Sturbridge +sturdy +sturgeon +Sturm +stutter +Stuttgart +Stuyvesant +Stygian +style +styli +stylish +stylites +stylus +stymie +styrene +Styrofoam +Styx +suave +sub +subbing +subject +subjectivity +sublimate +subliminal +submersible +submit +submittal +submitted +submitting +subpoena +subrogation +subservient +subsidiary +subsidy +subsist +subsistent +substantial +substantiate +substantive +substituent +substitute +substitution +substitutionary +substrate +subsume +subsumed +subsuming +subterfuge +subterranean +subtle +subtlety +subtly +subtrahend +suburb +suburbia +subversive +subvert +succeed +success +successful +succession +successive +successor +succinct +succubus +succumb +such +suck +suckling +suction +sud +Sudan +Sudanese +sudden +suds +sue +suey +Suez +suffer +suffice +sufficient +suffix +suffocate +Suffolk +suffrage +suffragette +suffuse +sugar +suggest +suggestible +suggestion +suggestive +suicidal +suicide +suit +suitcase +suite +suitor +sulfa +sulfate +sulfide +sulfite +sulfonamide +sulfur +sulfuric +sulfurous +sulk +sulky +sullen +Sullivan +sully +sulphur +sultan +sultry +sum +sumac +Sumatra +Sumerian +summand +summarily +summary +summate +Summers +summertime +summing +summit +summitry +summon +Sumner +sumptuous +Sumter +sun +sunbeam +sunbonnet +sunburn +sunburnt +Sunday +sunder +sundew +sundial +sundown +sundry +sunfish +sunflower +sung +sunk +sunken +sunlight +sunlit +sunning +sunny +Sunnyvale +sunrise +sunset +sunshade +sunshine +sunshiny +sunspot +suntan +suntanned +suntanning +SUNY +sup +super +superannuate +superb +superbly +supercilious +superficial +superfluity +superfluous +superintendent +superior +superlative +superlunary +supernatant +superposable +supersede +superstition +superstitious +supervene +supervisory +supine +supping +supplant +supple +supplementary +supplicate +supply +support +supposable +suppose +supposition +suppress +suppressible +suppression +suppressor +supra +supranational +supremacy +supreme +surcease +surcharge +sure +surety +surf +surface +surfactant +surfeit +surge +surgeon +surgery +surgical +surmise +surmount +surname +surpass +surplus +surprise +surreal +surrender +surreptitious +surrey +surrogate +surround +surtax +surtout +surveillant +survey +surveyor +survival +survive +survivor +Sus +Susan +Susanne +susceptible +sushi +Susie +suspect +suspend +suspense +suspension +suspensor +suspicion +suspicious +Sussex +sustain +sustenance +Sutherland +Sutton +suture +Suzanne +suzerain +suzerainty +Suzuki +svelte +swab +swabbing +swabby +swag +Swahili +swain +swallow +swallowtail +swam +swami +swamp +swampy +swan +swank +swanky +swanlike +Swanson +swap +swapping +swarm +swart +Swarthmore +Swarthout +swarthy +swastika +swat +swatch +swath +swathe +swatting +sway +Swaziland +swear +sweat +sweatband +sweater +sweatshirt +sweaty +Swede +Sweden +Swedish +Sweeney +sweep +sweepstake +sweet +sweetheart +sweetish +swell +swelt +swelter +Swenson +swept +swerve +swift +swig +swigging +swim +swimming +swimsuit +swindle +swine +swing +swingable +swingy +swipe +swirl +swirly +swish +swishy +swiss +switch +switchblade +switchboard +switchgear +switchman +Switzer +Switzerland +swivel +swizzle +swollen +swoop +sword +swordfish +swordplay +swordtail +swore +sworn +swum +swung +sybarite +Sybil +sycamore +sycophant +sycophantic +Sydney +syenite +Sykes +syllabic +syllabify +syllable +syllogism +syllogistic +sylvan +Sylvania +Sylvester +Sylvia +symbiosis +symbiotic +symbol +symbolic +symmetric +symmetry +sympathetic +sympathy +symphonic +symphony +symposia +symposium +symptom +symptomatic +synagogue +synapse +synapses +synaptic +synchronism +synchronous +synchrony +synchrotron +syncopate +syndic +syndicate +syndrome +synergism +synergistic +synergy +synod +synonym +synonymous +synonymy +synopses +synopsis +synoptic +syntactic +syntax +synthesis +synthetic +Syracuse +Syria +syringa +syringe +syrinx +syrup +syrupy +system +systematic +systemic +systemization +systemwide +t +t's +tab +tabbing +tabernacle +table +tableau +tableaux +tablecloth +tableland +tablespoon +tablespoonful +tablet +tabloid +taboo +tabu +tabula +tabular +tabulate +tachinid +tachometer +tacit +Tacitus +tack +tackle +tacky +Tacoma +tact +tactful +tactic +tactile +tactual +tad +tadpole +taffeta +taffy +taft +tag +tagging +Tahiti +Tahoe +tail +tailgate +tailor +taint +Taipei +Taiwan +take +taken +takeoff +takeover +talc +talcum +tale +talent +talisman +talismanic +talk +talkative +talkie +talky +tall +Tallahassee +tallow +tally +tallyho +Talmud +talon +talus +tam +tamale +tamarack +tamarind +tambourine +tame +Tammany +tamp +Tampa +tampon +tan +tanager +Tanaka +Tananarive +tandem +tang +tangent +tangential +tangerine +tangible +tangle +tango +tangy +tanh +tank +tannin +tanning +tansy +tantalum +Tantalus +tantamount +tantrum +Tanya +Tanzania +tao +Taoist +Taos +tap +tapa +tape +taper +tapestry +tapeworm +tapir +tapis +tappa +tappet +tapping +tar +tara +tarantara +tarantula +Tarbell +tardy +target +tariff +tarnish +tarpaper +tarpaulin +tarpon +tarring +tarry +Tarrytown +tart +tartar +Tartary +Tarzan +task +taskmaster +Tasmania +Tass +tassel +taste +tasteful +tasting +tasty +tat +tate +tater +tatting +tattle +tattler +tattletale +tattoo +tatty +tau +taught +taunt +Taurus +taut +tautology +tavern +taverna +tawdry +tawny +tax +taxation +taxi +taxicab +taxied +taxonomy +taxpayer +taxpaying +Taylor +tea +teacart +teach +teacup +teahouse +teakettle +teakwood +teal +team +teammate +teamster +teamwork +teapot +tear +teardrop +tearful +tease +teasel +teaspoon +teaspoonful +teat +tech +technetium +technic +technician +technique +technology +tectonic +tecum +ted +tedding +Teddy +tedious +tedium +tee +teeing +teem +teen +teenage +teensy +teet +teeth +teethe +teetotal +Teflon +Tegucigalpa +Teheran +Tehran +tektite +Tektronix +telecommunicate +teleconference +Teledyne +Telefunken +telegram +telegraph +telegraphy +telekinesis +telemeter +telemetric +telemetry +teleology +teleost +telepathic +telepathy +telephone +telephonic +telephony +telephotography +teleprinter +teleprocessing +teleprompter +telescope +telescopic +teletype +teletypesetting +teletypewrite +televise +television +Telex +tell +teller +tellurium +temerity +temper +tempera +temperance +temperate +temperature +tempest +tempestuous +template +temple +Templeton +tempo +temporal +temporary +tempt +temptation +temptress +ten +tenable +tenacious +tenacity +tenant +tend +tendency +tenderfoot +tenderloin +tendon +tenebrous +tenement +tenet +tenfold +Tenneco +Tennessee +Tenney +tennis +Tennyson +tenon +tenor +tense +tensile +tension +tensional +tensor +tenspot +tent +tentacle +tentative +tenth +tenuous +tenure +tepee +tepid +teratogenic +teratology +terbium +tercel +Teresa +term +terminable +terminal +terminate +termini +terminology +terminus +termite +tern +ternary +Terpsichore +terpsichorean +Terra +terrace +terrain +terramycin +terrapin +Terre +terrestrial +terrible +terrier +terrific +terrify +territorial +territory +terror +terry +terse +tertiary +Tess +tessellate +test +testament +testamentary +testate +testes +testicle +testicular +testify +testimonial +testimony +testy +tetanus +tete +tether +tetrachloride +tetrafluouride +tetragonal +tetrahedra +tetrahedral +tetrahedron +tetravalent +Teutonic +Texaco +Texan +Texas +text +textbook +textile +Textron +textual +textural +texture +Thai +Thailand +Thalia +thallium +thallophyte +than +thank +thankful +thanksgiving +that +that'd +that'll +thatch +thaw +Thayer +the +Thea +theatric +Thebes +thee +theft +their +Thelma +them +thematic +theme +themselves +then +thence +thenceforth +theocracy +Theodore +Theodosian +theologian +theology +theorem +theoretic +theoretician +theorist +theory +therapeutic +therapist +therapy +there +there'd +there'll +thereabouts +thereafter +thereat +thereby +therefor +therefore +therefrom +therein +thereof +thereon +Theresa +thereto +theretofore +thereunder +thereupon +therewith +thermal +thermionic +thermistor +thermo +thermocouple +thermodynamic +thermoelastic +thermoelectric +Thermofax +thermometer +thermometric +thermometry +thermomigrate +thermonuclear +thermopile +thermoplastic +thermopower +thermosetting +thermostable +thermostat +thermostatic +thesaurus +these +theses +Theseus +thesis +thespian +theta +Thetis +they +they'd +they'll +they're +they've +thiamin +thick +thicken +thicket +thickish +thief +thieves +thieving +thigh +thimble +Thimbu +thin +thine +thing +think +thinning +thinnish +thiocyanate +thiouracil +third +thirst +thirsty +thirteen +thirteenth +thirtieth +thirty +this +this'll +thistle +thistledown +thither +Thomas +Thomistic +Thompson +Thomson +thong +Thor +Thoreau +thoriate +thorium +thorn +Thornton +thorny +thorough +thoroughbred +thoroughfare +thoroughgoing +Thorpe +Thorstein +those +thou +though +thought +thoughtful +thousand +thousandth +thrash +thread +threadbare +threat +threaten +three +threefold +threesome +thresh +threshold +threw +thrice +thrift +thrifty +thrill +thrips +thrive +throat +throaty +throb +throbbing +throes +thrombosis +throne +throng +throttle +through +throughout +throughput +throw +throwback +thrown +thrum +thrumming +thrush +thrust +Thruway +Thuban +thud +thudding +thug +thuggee +Thule +thulium +thumb +thumbnail +thump +thunder +thunderclap +thunderflower +thunderous +thunderstorm +Thurman +Thursday +thus +thwack +thwart +thy +thyratron +thyroglobulin +thyroid +thyroidal +thyronine +thyrotoxic +thyroxine +ti +Tiber +tibet +Tibetan +tibia +tic +tick +ticket +tickle +ticklish +tid +tidal +tidbit +tide +tideland +tidewater +tidings +tidy +tie +tied +Tientsin +tier +Tiffany +tift +tiger +tight +tighten +tigress +Tigris +til +tilde +tile +till +tilt +tilth +Tim +timber +timberland +timbre +time +timeout +timepiece +timeshare +timetable +timeworn +Timex +timid +Timon +timothy +tin +tincture +tinder +tine +tinfoil +tinge +tingle +tinker +tinkle +tinning +tinsel +tint +tintype +tiny +Tioga +tip +tipoff +Tipperary +tipping +tipple +tippy +tipsy +tiptoe +tirade +Tirana +tire +tiresome +tissue +tit +Titan +titanate +titanic +titanium +tithe +titian +titillate +title +titmouse +titrate +titular +Titus +TNT +to +toad +toady +toast +tobacco +Tobago +toccata +today +today'll +Todd +toddle +toe +toenail +toffee +tofu +tog +together +togging +toggle +Togo +togs +toil +toilet +toilsome +tokamak +token +Tokyo +told +Toledo +tolerable +tolerant +tolerate +toll +tollgate +tollhouse +Tolstoy +toluene +Tom +tomato +tomatoes +tomb +tomblike +tombstone +tome +Tomlinson +Tommie +tommy +tomography +tomorrow +Tompkins +ton +tonal +tone +tong +tongue +Toni +tonic +tonight +tonk +tonnage +tonsil +tonsillitis +tony +too +toodle +took +tool +toolkit +toolmake +toolsmith +toot +tooth +toothbrush +toothpaste +tootle +top +topaz +topcoat +Topeka +topgallant +topic +topmost +topnotch +topocentric +topography +topology +topping +topple +topsoil +Topsy +tor +torah +torch +tore +tori +torn +tornado +toroid +toroidal +Toronto +torpedo +torpid +torpor +torque +torr +Torrance +torrent +torrid +torsion +torso +tort +tortoise +tortoiseshell +tortuous +torture +torus +tory +Toshiba +toss +tot +total +totalitarian +tote +totem +totemic +touch +touchdown +touchstone +touchy +tough +tour +tournament +tousle +tout +tow +toward +towboat +towel +tower +towhead +towhee +town +townhouse +Townsend +townsman +townsmen +toxic +toxicology +toxin +toy +Toyota +trace +traceable +tracery +trachea +track +trackage +tract +tractor +Tracy +trade +trademark +tradeoff +tradesman +tradesmen +tradition +traffic +trafficked +trafficking +trag +tragedian +tragedy +tragic +tragicomic +trail +trailside +train +trainee +trainman +trainmen +traipse +trait +traitor +traitorous +trajectory +tram +trammel +tramp +trample +tramway +trance +tranquil +tranquillity +transact +transalpine +transatlantic +transceiver +transcend +transcendent +transcendental +transconductance +transcontinental +transcribe +transcript +transcription +transducer +transduction +transect +transept +transfer +transferee +transference +transferor +transferral +transferred +transferring +transfix +transform +transformation +transfusable +transfuse +transfusion +transgress +transgression +transgressor +transient +transistor +transit +Transite +transition +transitive +transitory +translate +transliterate +translucent +transmissible +transmission +transmit +transmittable +transmittal +transmittance +transmitted +transmitter +transmitting +transmutation +transmute +transoceanic +transom +transpacific +transparent +transpiration +transpire +transplant +transplantation +transport +transportation +transposable +transpose +transposition +transship +transshipping +transversal +transverse +transvestite +trap +trapezium +trapezoid +trapezoidal +trapping +trash +trashy +Trastevere +trauma +traumatic +travail +travel +travelogue +traversable +traversal +traverse +travertine +travesty +Travis +trawl +tray +treacherous +treachery +tread +treadle +treadmill +treason +treasonous +treasure +treasury +treat +treatise +treaty +treble +tree +treelike +treetop +trefoil +trek +trekking +trellis +tremble +tremendous +tremor +tremulous +trench +trenchant +trencherman +trenchermen +trend +trendy +Trenton +trepidation +trespass +tress +trestle +Trevelyan +triable +triad +trial +triangle +triangular +triangulate +Triangulum +Trianon +triatomic +tribal +tribe +tribesman +tribesmen +tribulate +tribunal +tribune +tributary +tribute +Trichinella +trichloroacetic +trichloroethane +trichrome +trick +trickery +trickle +trickster +tricky +trident +tridiagonal +tried +triennial +trifle +trifluouride +trig +trigonal +trigonometric +trigonometry +trigram +trill +trillion +trilobite +trilogy +trim +trimer +trimester +trimming +Trinidad +trinitarian +trinity +trinket +trio +triode +trioxide +trip +tripartite +tripe +triphenylphosphine +triple +triplet +Triplett +triplex +triplicate +tripod +tripoli +tripping +triptych +trisodium +Tristan +tristate +trisyllable +trite +tritium +triton +triumph +triumphal +triumphant +triune +trivalent +trivia +trivial +trivium +trod +trodden +troglodyte +troika +Trojan +troll +trolley +trollop +trombone +trompe +troop +trophic +trophy +tropic +tropopause +troposphere +tropospheric +trot +trotting +trouble +troubleshoot +troublesome +trough +trounce +troupe +trouser +trout +Troutman +troy +truancy +truant +truce +truck +truculent +trudge +Trudy +true +truism +truly +Truman +Trumbull +trump +trumpery +trumpet +truncate +trundle +trunk +truss +trust +trustee +trustful +trustworthy +truth +truthful +TRW +try +trypsin +tsar +tsarina +tsunami +TTL +TTY +tub +tuba +tube +tuberculin +tuberculosis +tubular +tubule +tuck +Tucson +Tudor +Tuesday +tuff +tuft +tug +tugging +tuition +Tulane +tularemia +tulip +tulle +Tulsa +tum +tumble +tumbrel +tumult +tumultuous +tun +tuna +tundra +tune +tuneful +tung +tungstate +tungsten +tunic +Tunis +Tunisia +tunnel +tupelo +turban +turbinate +turbine +turbofan +turbojet +turbulent +turf +Turin +Turing +turk +turkey +Turkish +turmoil +turn +turnabout +turnaround +turnery +turnip +turnkey +turnoff +turnout +turnover +turnpike +turnstone +turntable +turpentine +turpitude +turquoise +turret +turtle +turtleback +turtleneck +turvy +Tuscaloosa +Tuscan +Tuscany +Tuscarora +tusk +Tuskegee +tussle +tutelage +tutor +tutorial +Tuttle +tutu +tuxedo +TV +TVA +TWA +twaddle +twain +tweak +tweed +tweedy +tweeze +twelfth +twelve +twentieth +twenty +twice +twiddle +twig +twigging +twilight +twill +twin +twine +twinge +twinkle +twinning +twirl +twirly +twist +twisty +twit +twitch +twitchy +twitting +two +twofold +Twombly +twosome +TWX +Tyburn +tycoon +tying +Tyler +type +typeface +typescript +typeset +typesetter +typesetting +typewrite +typewritten +typhoid +Typhon +typhoon +typhus +typic +typify +typo +typographer +typography +typology +tyrannic +tyrannicide +tyranny +tyrant +tyrosine +Tyson +u +u's +ubiquitous +ubiquity +UCLA +Uganda +ugh +ugly +UK +Ukrainian +Ulan +ulcer +ulcerate +Ullman +Ulster +ulterior +ultimate +ultimatum +ultra +ultracentrifuge +ultraconservative +ultrafast +ultramarine +ultramodern +ultrashort +ultrasonic +ultrasound +ultrastructure +ultraviolet +Ulysses +umber +umbilical +umbilici +umbilicus +umbra +umbrage +umbrella +umpire +UN +unanimity +unanimous +unary +unbeknownst +unbidden +unchristian +uncle +uncouth +unction +under +underclassman +underclassmen +underling +undulate +UNESCO +uniaxial +unicorn +unidimensional +unidirectional +uniform +unify +unilateral +unimodal +uninominal +union +uniplex +unipolar +uniprocessor +unique +Uniroyal +unison +unit +unitarian +unitary +unite +unity +Univac +univalent +univariate +universal +universe +Unix +unkempt +unruly +until +unwieldy +up +upbeat +upbraid +upbring +upcome +update +updraft +upend +upgrade +upheaval +upheld +uphill +uphold +upholster +upholstery +upkeep +upland +uplift +upon +upper +upperclassman +upperclassmen +uppercut +uppermost +upraise +upright +uprise +upriver +uproar +uproarious +uproot +upset +upsetting +upshot +upside +upsilon +upslope +upstair +upstand +upstate +upstater +upstream +upsurge +upswing +uptake +Upton +uptown +uptrend +upturn +upward +upwind +urania +uranium +Uranus +uranyl +urban +Urbana +urbane +urbanite +urchin +urea +uremia +urethane +urethra +urge +urgency +urgent +urging +urinal +urinary +urine +Uris +urn +Ursa +Ursula +Ursuline +Uruguay +us +USA +usable +USAF +usage +USC +USC&GS +USDA +use +useful +USGS +usher +USIA +USN +USPS +USSR +usual +usurer +usurious +usurp +usurpation +usury +Utah +utensil +uterine +Utica +utile +utilitarian +utility +utmost +utopia +utopian +utter +utterance +uttermost +v +v's +vacant +vacate +vacationland +vaccinate +vaccine +vacillate +vacua +vacuo +vacuolate +vacuole +vacuous +vacuum +vade +Vaduz +vagabond +vagary +vagina +vaginal +vagrant +vague +Vail +vain +vainglorious +vale +valedictorian +valedictory +valent +valentine +Valerie +Valery +valet +valeur +Valhalla +valiant +valid +validate +Valkyrie +Valletta +valley +Valois +valuate +value +valve +vamp +vampire +van +vanadium +Vance +Vancouver +vandal +Vandenberg +Vanderbilt +Vanderpoel +vanguard +vanilla +vanish +vanity +vanquish +vantage +variable +variac +Varian +variant +variate +variegate +variety +various +varistor +Varitype +varnish +vary +vascular +vase +vassal +vast +vat +Vatican +vaudeville +Vaudois +Vaughan +Vaughn +vault +veal +vector +vectorial +Veda +vee +veer +veery +Vega +vegetable +vegetarian +vegetate +vehement +vehicle +vehicular +veil +vein +Velasquez +veldt +Vella +vellum +velocity +velours +velvet +velvety +venal +vend +vendetta +vendible +vendor +veneer +venerable +venerate +venereal +Venetian +Veneto +Venezuela +vengeance +vengeful +venial +Venice +venison +venom +venomous +vent +ventilate +ventricle +venture +venturesome +venturi +Venus +Venusian +Vera +veracious +veracity +veranda +verandah +verb +verbal +verbatim +verbena +verbiage +verbose +verbosity +verdant +Verde +Verdi +verdict +verge +veridic +verify +verisimilitude +veritable +verity +Verlag +vermeil +vermiculite +vermilion +vermin +Vermont +vermouth +Verna +vernacular +vernal +Verne +vernier +Vernon +Verona +Veronica +versa +Versailles +versatile +verse +version +versus +vertebra +vertebrae +vertebral +vertebrate +vertex +vertical +vertices +vertigo +verve +very +vesicular +vesper +vessel +vest +vestal +vestibule +vestige +vestigial +vestry +vet +vetch +veteran +veterinarian +veterinary +veto +vetting +vex +vexation +vexatious +vi +via +viaduct +vial +vibrant +vibrate +vibrato +viburnum +vicar +vicarious +vice +vicelike +viceroy +Vichy +vicinal +vicinity +vicious +vicissitude +Vicksburg +Vicky +victim +victor +Victoria +Victorian +victorious +victory +victrola +victual +Vida +video +videotape +vie +Vienna +Viennese +Vientiane +Viet +Vietnam +Vietnamese +view +viewpoint +vigil +vigilant +vigilante +vigilantism +vignette +vigorous +vii +viii +Viking +vile +vilify +villa +village +villain +villainous +villein +Vincent +vindicate +vindictive +vine +vinegar +vineyard +Vinson +vintage +vintner +vinyl +viola +violate +violent +violet +violin +Virgil +virgin +virginal +Virginia +Virginian +Virgo +virgule +virile +virtual +virtue +virtuosi +virtuosity +virtuoso +virtuous +virulent +virus +vis +visa +visage +viscera +visceral +viscoelastic +viscometer +viscosity +viscount +viscous +vise +viselike +Vishnu +visible +Visigoth +vision +visionary +visit +visitation +visitor +visor +vista +visual +vita +vitae +vital +vitamin +vitiate +Vito +vitreous +vitrify +vitriol +vitriolic +vitro +viva +vivace +vivacious +vivacity +Vivaldi +Vivian +vivid +vivify +vivo +vixen +viz +Vladimir +Vladivostok +vocable +vocabularian +vocabulary +vocal +vocalic +vocate +vociferous +Vogel +vogue +voice +voiceband +void +volatile +volcanic +volcanism +volcano +volition +Volkswagen +volley +volleyball +Volstead +volt +Volta +voltage +voltaic +Voltaire +Volterra +voltmeter +voluble +volume +volumetric +voluminous +voluntary +volunteer +voluptuous +Volvo +vomit +von +voodoo +voracious +voracity +vortex +vortices +vorticity +Voss +votary +vote +votive +vouch +vouchsafe +Vought +vow +vowel +voyage +Vreeland +Vulcan +vulgar +vulnerable +vulpine +vulture +vulturelike +vying +w +w's +Waals +Wabash +WAC +wack +wacke +wacky +Waco +wad +waddle +wade +wadi +Wadsworth +wafer +waffle +wag +wage +wagging +waggle +Wagner +wagoneer +wah +Wahl +wail +wainscot +Wainwright +waist +waistcoat +waistline +wait +Waite +waitress +waive +wake +Wakefield +wakeful +waken +wakerobin +wakeup +Walcott +Walden +Waldo +Waldorf +Waldron +wale +Walgreen +walk +walkie +walkout +walkover +walkway +wall +wallaby +Wallace +wallboard +Waller +wallet +Wallis +wallop +wallow +wallpaper +Walls +wally +walnut +Walpole +walrus +Walsh +Walt +Walter +Walters +Waltham +Walton +waltz +wan +wand +wander +wane +Wang +wangle +want +wanton +wapato +wapiti +Wappinger +war +warble +ward +warden +wardrobe +wardroom +ware +warehouse +warehouseman +warfare +warhead +Waring +warlike +warm +warmhearted +warmish +warmonger +warmth +warmup +warn +warp +warrant +warranty +warren +warring +warrior +Warsaw +wart +wartime +warty +Warwick +wary +was +wash +washbasin +washboard +washbowl +Washburn +Washington +washout +washy +wasn't +wasp +waspish +Wasserman +wast +wastage +waste +wastebasket +wasteful +wasteland +wastewater +wastrel +watch +watchband +watchdog +watchful +watchmake +watchman +watchmen +watchword +water +Waterbury +watercourse +waterfall +waterfront +Watergate +Waterhouse +waterline +Waterloo +Waterman +watermelon +waterproof +Waters +watershed +waterside +Watertown +waterway +watery +Watkins +Watson +watt +wattage +wattle +Watts +wave +waveform +wavefront +waveguide +wavelength +wavenumber +wavy +wax +waxen +waxwork +waxy +way +waybill +waylaid +waylay +Wayne +wayside +wayward +we +we'd +we'll +we're +we've +weak +weaken +weal +wealth +wealthy +wean +weapon +weaponry +wear +wearied +wearisome +weary +weasel +weather +weatherbeaten +weatherproof +weatherstrip +weatherstripping +weave +web +Webb +webbing +weber +Webster +WECo +wed +wedding +wedge +wedlock +Wednesday +wee +weed +weedy +week +weekday +weekend +Weeks +weep +Wehr +Wei +Weierstrass +weigh +weight +weighty +Weinberg +Weinstein +weir +weird +Weiss +Welch +welcome +weld +Weldon +welfare +well +wellbeing +Weller +Welles +Wellesley +wellington +Wells +welsh +welt +Wendell +Wendy +went +wept +were +weren't +Werner +wert +Werther +Wesley +Wesleyan +west +westbound +Westchester +westerly +western +westernmost +Westfield +Westinghouse +Westminster +Weston +westward +wet +wetland +wetting +Weyerhauser +whack +whale +Whalen +wham +whamming +wharf +Wharton +wharves +what +what'd +what're +whatever +Whatley +whatnot +whatsoever +wheat +Wheatstone +whee +wheedle +wheel +wheelbase +wheelchair +wheelhouse +wheeze +wheezy +Whelan +whelk +Wheller +whelm +whelp +when +whence +whenever +where +where'd +where're +whereabout +whereas +whereby +wherefore +wherein +whereof +whereon +wheresoever +whereupon +wherever +wherewith +whet +whether +whetting +which +whichever +whiff +whig +while +whim +whimper +whimsey +whimsic +whine +whinny +whip +whiplash +Whippany +whippet +whipping +Whipple +whipsaw +whir +whirl +whirligig +whirlpool +whirlwind +whirring +whisk +whisper +whistle +whistleable +whit +Whitaker +Whitcomb +white +whiteface +Whitehall +whitehead +Whitehorse +whiten +whitetail +whitewash +whither +Whitlock +Whitman +Whitney +Whittaker +Whittier +whiz +whizzing +who +who'd +who'll +whoa +whoever +whole +wholehearted +wholesale +wholesome +wholly +whom +whomsoever +whoop +whoosh +whop +whopping +whore +whose +whosoever +whup +why +Wichita +wick +wicket +wide +widen +widespread +widgeon +widget +widow +widowhood +width +widthwise +wield +wiener +Wier +wife +wig +wigging +Wiggins +wiggle +wiggly +wigmake +Wilbur +Wilcox +wild +wildcat +wildcatter +wilderness +wildfire +wildlife +wile +Wiley +Wilfred +wilful +Wilhelm +Wilhelmina +Wilkes +Wilkins +Wilkinson +will +Willa +Willard +willful +William +Williams +Williamsburg +Williamson +Willie +Willis +Willoughby +willow +willowy +Wills +Wilma +Wilmington +Wilshire +Wilson +Wilsonian +wilt +wily +win +wince +winch +Winchester +wind +windbag +windbreak +windfall +windmill +window +windowpane +windowsill +windshield +Windsor +windstorm +windup +windward +windy +wine +winemake +winemaster +winery +wineskin +Winfield +wing +wingback +wingman +wingmen +wingspan +wingtip +Winifred +wink +winkle +Winnetka +Winnie +winning +Winnipeg +Winnipesaukee +winnow +wino +Winslow +winsome +Winston +winter +Winters +wintertime +Winthrop +wintry +winy +wipe +wire +wireman +wiremen +wiry +Wisconsin +wisdom +wise +wiseacre +wisecrack +wisenheimer +wish +wishbone +wishful +wishy +wisp +wispy +wistful +wit +witch +witchcraft +with +withal +withdraw +withdrawal +withdrawn +withdrew +withe +wither +withheld +withhold +within +without +withstand +withstood +withy +witness +Witt +witting +witty +wive +wizard +wobble +woe +woebegone +woeful +wok +woke +Wolcott +wold +wolf +Wolfe +Wolff +Wolfgang +wolfish +wolve +woman +womanhood +womb +women +won +won't +wonder +wonderful +wonderland +wondrous +Wong +wont +woo +wood +Woodard +Woodbury +woodcarver +woodcock +woodcut +wooden +woodgrain +woodhen +woodland +Woodlawn +woodlot +woodpeck +woodrow +woodruff +Woods +woodshed +woodside +woodward +woodwind +woodwork +woody +woodyard +wool +woolen +woolgather +Woolworth +Wooster +wop +Worcester +word +Wordsworth +wordy +wore +work +workbench +workday +workhorse +workload +workman +workmanlike +workmen +workout +workpiece +worksheet +workshop +workspace +worktable +world +worldwide +worm +wormy +worn +worrisome +worry +worse +worsen +worship +worshipful +worst +worth +Worthington +worthwhile +worthy +Wotan +would +wouldn't +wound +wove +woven +wow +wrack +wraith +wrangle +wrap +wrapping +wrapup +wrath +wrathful +wreak +wreath +wreathe +wreck +wreckage +wrench +wrest +wrestle +wretch +wriggle +wright +Wrigley +wring +wrinkle +wrist +wristband +wristwatch +writ +write +writeup +writhe +written +wrong +wrongdoer +wrongdoing +wrongful +Wronskian +wrote +wrought +wry +Wu +Wuhan +Wyandotte +Wyatt +Wyeth +Wylie +Wyman +Wyner +wynn +Wyoming +x +x's +Xavier +xenon +xenophobia +xerography +Xerox +Xerxes +xi +xylem +xylene +xylophone +y +y's +yacht +yachtsman +yachtsmen +yah +yak +Yakima +Yale +Yalta +yam +Yamaha +yang +yank +Yankee +Yankton +Yaounde +yap +yapping +Yaqui +yard +yardage +yardstick +Yarmouth +yarmulke +yarn +yarrow +Yates +yaw +yawl +yawn +ye +yea +Yeager +yeah +year +yearbook +yearn +yeast +yeasty +Yeats +yell +yellow +yellowish +Yellowknife +yelp +Yemen +yen +yeoman +yeomanry +yeshiva +yesterday +yesteryear +yet +Yiddish +yield +yin +yip +yipping +YMCA +yodel +Yoder +yoga +yogi +yoke +yokel +Yokohama +Yokuts +yolk +yon +yond +Yonkers +yore +York +Yorktown +Yosemite +Yost +you +you'd +you'll +you're +you've +young +youngish +youngster +Youngstown +your +yourself +yourselves +youth +youthful +yow +Ypsilanti +ytterbium +yttrium +Yucatan +yucca +Yugoslav +Yugoslavia +yuh +Yuki +Yukon +yule +Yves +Yvette +YWCA +z +z's +Zachary +zag +zagging +Zaire +Zambia +Zan +Zanzibar +zap +zapping +zeal +Zealand +zealot +zealous +zebra +Zeiss +Zellerbach +Zen +zenith +zero +zeroes +zeroth +zest +zesty +zeta +Zeus +Ziegler +zig +zigging +zigzag +zigzagging +zilch +Zimmerman +zinc +zing +Zion +Zionism +zip +zipping +zircon +zirconium +zloty +zodiac +zodiacal +Zoe +Zomba +zombie +zone +zoo +zoology +zoom +Zoroaster +Zoroastrian +zounds +Zurich diff --git a/usr/doc/README b/usr/doc/README new file mode 100644 index 0000000000..98a97e4194 --- /dev/null +++ b/usr/doc/README @@ -0,0 +1,9 @@ +This directory contains source for most of the +documents contained in Volume 2 of The UNIX +Programmer's Manual, 7th Edition. +Most use -ms to format; many also use +refer, tbl and eqn. Precise incantations +are engraved in ./run. + +The citations for those papers that use +refer are taken from /usr/dict/papers/Rv7man. diff --git a/usr/doc/REFS b/usr/doc/REFS new file mode 100644 index 0000000000..e5da45212e --- /dev/null +++ b/usr/doc/REFS @@ -0,0 +1,405 @@ +%A L. P. Deutsch +%A B. W. Lampson +%T An online editor +%J Comm. Assoc. Comp. Mach. +%V 10 +%N 12 +%D December 1967 +%P 793-799, 803 +%K qed + +.[ +%r 17 +%K cstr +%R Comp. Sci. Tech. Rep. No. 17 +%I Bell Laboratories +%C Murray Hill, New Jersey +%A B. W. Kernighan +%A L. L. Cherry +%T A System for Typesetting Mathematics +%d May 1974, revised April 1977 +%J Comm. Assoc. Comp. Mach. +%K acm cacm +%V 18 +%P 151-157 +%D March 1975 +.] + +%T U\s-2NIX\s0 Time-Sharing System: Document Preparation +%K unix bstj +%A B. W. Kernighan +%A M. E. Lesk +%A J. F. Ossanna +%J Bell Sys. Tech. J. +%V 57 +%N 6 +%P 2115-2135 +%D 1978 + +%A T. A. Dolotta +%A J. R. Mashey +%T An Introduction to the Programmer's Workbench +%J Proc. 2nd Int. Conf. on Software Engineering +%D October 13-15, 1976 +%P 164-168 + +%T U\s-2NIX\s0 Time-Sharing System: The Programmer's Workbench +%A T. A. Dolotta +%A R. C. Haight +%A J. R. Mashey +%J Bell Sys. Tech. J. +%V 57 +%N 6 +%P 2177-2200 +%D 1978 +%K unix bstj + +%T U\s-2NIX\s0 Time-Sharing System: U\s-2NIX\s0 on a Microprocessor +%K unix bstj +%A H. Lycklama +%J Bell Sys. Tech. J. +%V 57 +%N 6 +%P 2087-2101 +%D 1978 + +%T The C Programming Language +%A B. W. Kernighan +%A D. M. Ritchie +%I Prentice-Hall +%C Englewood Cliffs, New Jersey +%D 1978 + +%T Computer Recreations +%A Aleph-null +%J Software Practice and Experience +%V 1 +%N 2 +%D April-June 1971 +%P 201-204 + +%T U\s-2NIX\s0 Time-Sharing System: The U\s-2NIX\s0 Shell +%A S. R. Bourne +%K unix bstj +%J Bell Sys. Tech. J. +%V 57 +%N 6 +%P 1971-1990 +%D 1978 + +%A L. P. Deutsch +%A B. W. Lampson +%T \*sSDS\*n 930 time-sharing system preliminary reference manual +%R Doc. 30.10.10, Project \*sGENIE\*n +%C Univ. Cal. at Berkeley +%D April 1965 + +%A R. J. Feiertag +%A E. I. Organick +%T The Multics input-output system +%J Proc. Third Symposium on Operating Systems Principles +%D October 18-20, 1971 +%P 35-41 + +%A D. G. Bobrow +%A J. D. Burchfiel +%A D. L. Murphy +%A R. S. Tomlinson +%T \*sTENEX\*n, a Paged Time Sharing System for the \*sPDP\*n-10 +%J Comm. Assoc. Comp. Mach. +%V 15 +%N 3 +%D March 1972 +%K tenex +%P 135-143 + +%A R. E. Griswold +%A D. R. Hanson +%T An Overview of SL5 +%J SIGPLAN Notices +%V 12 +%N 4 +%D April 1977 +%P 40-50 + +%A E. W. Dijkstra +%T Cooperating Sequential Processes +%B Programming Languages +%E F. Genuys +%I Academic Press +%C New York +%D 1968 +%P 43-112 + +%A J. A. Hawley +%A W. B. Meyer +%T M\s-2UNIX\s0, A Multiprocessing Version of U\s-2NIX\s0 +%K munix unix +%R M.S. Thesis +%I Naval Postgraduate School +%C Monterey, Cal. +%D 1975 + +%T The U\s-2NIX\s0 Time-Sharing System +%K unix bstj +%A D. M. Ritchie +%A K. Thompson +%J Bell Sys. Tech. J. +%V 57 +%N 6 +%P 1905-1929 +%D 1978 + +%A E. I. Organick +%T The M\s-2ULTICS\s0 System +%K multics +%I M.I.T. Press +%C Cambridge, Mass. +%D 1972 + +%T UNIX for Beginners +%A B. W. Kernighan +%D 1978 + +%T U\s-2NIX\s0 Programmer's Man\&ual +%A K. Thompson +%A D. M. Ritchie +%K unix +%I Bell Laboratories +%O Seventh Edition. +%D 1978 + +%A K. Thompson +%T The U\s-2NIX\s0 Command Language +%B Structured Programming\(emInfotech State of the Art Report +%I Infotech International Ltd. +%C Nicholson House, Maidenhead, Berkshire, England +%D March 1975 +%P 375-384 +%K unix +%X pwb +Brief description of shell syntax and semantics, without much +detail on implementation. +Much on pipes and convenience of hooking programs together. +Includes SERMONETTE: +"Many familiar computing `concepts' are missing from UNIX. +Files have no records. There are no access methods. +There are no file types. These concepts fill a much-needed gap. +I sincerely hope that when future systems are designed by +manufacturers the value of some of these ingrained notions is re-examined. +Like the politician and his `common man', manufacturers have +their `average user'. + +%A J. R. Mashey +%T PWB/UNIX Shell Tutorial +%D September 30, 1977 + +%A D. F. Hartley (Ed.) +%T The Cambridge Multiple Access System \- Users Reference Manual +%I University Mathematical Laboratory +%C Cambridge, England +%D 1968 + +%A P. A. Crisman (Ed.) +%T The Compatible Time-Sharing System +%I M.I.T. Press +%K whole ctss book +%C Cambridge, Mass. +%D 1965 + +%T LR Parsing +%A A. V. Aho +%A S. C. Johnson +%J Comp. Surveys +%V 6 +%N 2 +%P 99-124 +%D June 1974 + +%T Deterministic Parsing of Ambiguous Grammars +%A A. V. Aho +%A S. C. Johnson +%A J. D. Ullman +%J Comm. Assoc. Comp. Mach. +%K acm cacm +%V 18 +%N 8 +%P 441-452 +%D August 1975 + +%A A. V. Aho +%A J. D. Ullman +%T Principles of Compiler Design +%I Addison-Wesley +%C Reading, Mass. +%D 1977 + +.[ +%r 65 +%R Comp. Sci. Tech. Rep. No. 65 +%K CSTR +%A S. C. Johnson +%T Lint, a C Program Checker +%D December 1977 +%O updated version TM 78-1273-3 +%D 1978 +.] + +%T A Portable Compiler: Theory and Practice +%A S. C. Johnson +%J Proc. 5th ACM Symp. on Principles of Programming Languages +%P 97-104 +%D January 1978 + +.[ +%r 39 +%K CSTR +%R Comp. Sci. Tech. Rep. No. 39 +%I Bell Laboratories +%C Murray Hill, New Jersey +%A M. E. Lesk +%T Lex \(em A Lexical Analyzer Generator +%D October 1975 +.] + +.[ +%r 32 +%K CSTR +%R Comp. Sci. Tech. Rep. No. 32 +%I Bell Laboratories +%C Murray Hill, New Jersey +%A S. C. Johnson +%T Yacc \(em Yet Another Compiler-Compiler +%D July 1975 +.] + +%T U\s-2NIX\s0 Time-Sharing System: Portability of C Programs and the U\s-2NIX\s0 System +%K unix bstj +%A S. C. Johnson +%A D. M. Ritchie +%J Bell Sys. Tech. J. +%V 57 +%N 6 +%P 2021-2048 +%D 1978 + +%T Typing Documents on UNIX and GCOS: The -ms Macros for Troff +%A M. E. Lesk +%D 1977 + +%A K. Thompson +%A D. M. Ritchie +%T U\s-2NIX\s0 Programmer's Manual +%K unix +%I Bell Laboratories +%O Sixth Edition +%D May 1975 + +%T The Network U\s-2NIX\s0 System +%K unix +%A G. L. Chesson +%J Operating Systems Review +%V 9 +%N 5 +%P 60-66 +%D 1975 +%O Also in \f2Proc. 5th Symp. on Operating Systems Principles.\f1 + +%T Spider \(em An Experimental Data Communications System +%Z ctr127 +%A A. G. Fraser +%J Proc. IEEE Conf. on Communications +%P 21F +%O IEEE Cat. No. 74CH0859-9-CSCB. +%D June 1974 + +%T A Virtual Channel Network +%A A. G. Fraser +%J Datamation +%P 51-56 +%D February 1975 + +.[ +%r 41 +%K CSTR +%R Comp. Sci. Tech. Rep. No. 41 +%I Bell Laboratories +%C Murray Hill, New Jersey +%A J. W. Hunt +%A M. D. McIlroy +%T An Algorithm for Differential File Comparison +%D June 1976 +.] + +%A F. P. Brooks, Jr. +%T The Mythical Man-Month +%I Addison-Wesley +%C Reading, Mass. +%D 1975 +%X pwb +Readable, classic reference on software engineering and +problems of large projects, from someone with experience in them. +Required reading for any software engineer, even if conclusions may not +always be agreed with. +%br +"The second is the most dangerous system a man every designs." p.55. +%br +"Hence plan to throw one away; you will, anyhow." p.116. +%br +"Cosgrove has perceptively pointed out that the programmer delivers +satisfaction of a user need rather than any tangible product. +And both the actual need and the user's perception of that need +will change as programs are built, tested, and used." p.117. +%br +"The total cost of maintaining a widely used program is typically 40 percent +or more of the cost of developing it." p.121. +%br +"As shown above, amalgamating prose and program reduces the total +number of characters to be stored." p.175. + +%T A Portable Compiler for the Language C +%A A. Snyder +%I Master's Thesis, M.I.T. +%C Cambridge, Mass. +%D 1974 + +%T The C Language Calling Sequence +%A M. E. Lesk +%A S. C. Johnson +%A D. M. Ritchie +%D 1977 + +%T Optimal Code Generation for Expression Trees +%A A. V. Aho +%A S. C. Johnson +%D 1975 +%J J. Assoc. Comp. Mach. +%K acm jacm +%V 23 +%N 3 +%P 488-501 +%O Also in \f2Proc. ACM Symp. on Theory of Computing,\f1 pp. 207-217, 1975. + +%A R. Sethi +%A J. D. Ullman +%T The Generation of Optimal Code for Arithmetic Expressions +%J J. Assoc. Comp. Mach. +%K acm jacm +%V 17 +%N 4 +%D October 1970 +%P 715-728 +%O Reprinted as pp. 229-247 in \fICompiler Techniques\fR, ed. B. W. Pollack, Auerbach, Princeton NJ (1972). +%X pwb +Optimal approach for straight-line, fixed +number of regs. + +%T Code Generation for Machines with Multiregister +Operations +%A A. V. Aho +%A S. C. Johnson +%A J. D. Ullman +%J Proc. 4th ACM Symp. on Principles of Programming Languages +%P 21-28 +%D January 1977 + diff --git a/usr/doc/awk b/usr/doc/awk new file mode 100644 index 0000000000..758da7dc76 --- /dev/null +++ b/usr/doc/awk @@ -0,0 +1,1401 @@ +.fp 3 G +....TM "78-1271-12, 78-1273-6" 39199 39199-11 +.ND "September 1, 1978" +....TR 68 +.RP +. \" macros here +.tr _\(em +.if t .tr ~\(ap +.tr |\(or +.tr *\(** +.de UC +\&\\$3\s-1\\$1\\s0\&\\$2 +.. +.de IT +.if n .ul +\&\\$3\f2\\$1\fP\|\\$2 +.. +.de UL +.if n .ul +\&\\$3\f3\\$1\fP\&\\$2 +.. +.de P1 +.DS I 3n +.nf +.if n .ta 5 10 15 20 25 30 35 40 45 50 55 60 +.if t .ta .3i .6i .9i 1.2i +.if t .tr -\-'\(fm*\(** +.if t .tr _\(ul +.ft 3 +.lg 0 +.ss 18 +. \"use first argument as indent if present +.. +.de P2 +.ps \\n(PS +.vs \\n(VSp +.ft R +.ss 12 +.if n .ls 2 +.tr --''``^^!! +.if t .tr _\(em +.fi +.lg +.DE +.. +.hw semi-colon +.hy 14 +. \"2=not last lines; 4= no -xx; 8=no xx- +. \"special chars in programs +.de WS +.sp \\$1 +.. +. \" end of macros +.TL +Awk \(em A Pattern Scanning and Processing Language +.br +(Second Edition) +.AU "MH 2C-522" 4862 +Alfred V. Aho +.AU "MH 2C-518" 6021 +Brian W. Kernighan +.AU "MH 2C-514" 7214 +Peter J. Weinberger +.AI +.MH +.AB +.IT Awk +is a programming language whose +basic operation +is to search a set of files +for patterns, and to perform specified actions upon lines or fields of lines which +contain instances of those patterns. +.IT Awk +makes certain data selection and transformation operations easy to express; +for example, the +.IT awk +program +.sp +.ce +.ft 3 +length > 72 +.ft +.sp +prints all input lines whose length exceeds 72 characters; +the program +.ce +.sp +.ft 3 +NF % 2 == 0 +.ft R +.sp +prints all lines with an even number of fields; +and the program +.ce +.sp +.ft 3 +{ $1 = log($1); print } +.ft R +.sp +replaces the first field of each line by its logarithm. +.PP +.IT Awk +patterns may include arbitrary boolean combinations of regular expressions +and of relational operators on strings, numbers, fields, variables, and array elements. +Actions may include the same pattern-matching constructions as in patterns, +as well as +arithmetic and string expressions and assignments, +.UL if-else , +.UL while , +.UL for +statements, +and multiple output streams. +.PP +This report contains a user's guide, a discussion of the design and implementation of +.IT awk , +and some timing statistics. +....It supersedes TM-77-1271-5, dated September 8, 1977. +.AE +.CS 6 1 7 0 1 4 +.if n .ls 2 +.nr PS 9 +.nr VS 11 +.NH +Introduction +.if t .2C +.PP +.IT Awk +is a programming language designed to make +many common +information retrieval and text manipulation tasks +easy to state and to perform. +.PP +The basic operation of +.IT awk +is to scan a set of input lines in order, +searching for lines which match any of a set of patterns +which the user has specified. +For each pattern, an action can be specified; +this action will be performed on each line that matches the pattern. +.PP +Readers familiar with the +.UX +program +.IT grep\| +.[ +unix program manual +.] +will recognize +the approach, although in +.IT awk +the patterns may be more +general than in +.IT grep , +and the actions allowed are more involved than merely +printing the matching line. +For example, the +.IT awk +program +.P1 +{print $3, $2} +.P2 +prints the third and second columns of a table +in that order. +The program +.P1 +$2 ~ /A\||B\||C/ +.P2 +prints all input lines with an A, B, or C in the second field. +The program +.P1 +$1 != prev { print; prev = $1 } +.P2 +prints all lines in which the first field is different +from the previous first field. +.NH 2 +Usage +.PP +The command +.P1 +awk program [files] +.P2 +executes the +.IT awk +commands in +the string +.UL program +on the set of named files, +or on the standard input if there are no files. +The statements can also be placed in a file +.UL pfile , +and executed by the command +.P1 +awk -f pfile [files] +.P2 +.NH 2 +Program Structure +.PP +An +.IT awk +program is a sequence of statements of the form: +.P1 +.ft I + pattern { action } + pattern { action } + ... +.ft 3 +.P2 +Each line of input +is matched against +each of the patterns in turn. +For each pattern that matches, the associated action +is executed. +When all the patterns have been tested, the next line +is fetched and the matching starts over. +.PP +Either the pattern or the action may be left out, +but not both. +If there is no action for a pattern, +the matching line is simply +copied to the output. +(Thus a line which matches several patterns can be printed several times.) +If there is no pattern for an action, +then the action is performed for every input line. +A line which matches no pattern is ignored. +.PP +Since patterns and actions are both optional, +actions must be enclosed in braces +to distinguish them from patterns. +.NH 2 +Records and Fields +.PP +.IT Awk +input is divided into +``records'' terminated by a record separator. +The default record separator is a newline, +so by default +.IT awk +processes its input a line at a time. +The number of the current record is available in a variable +named +.UL NR . +.PP +Each input record +is considered to be divided into ``fields.'' +Fields are normally separated by +white space \(em blanks or tabs \(em +but the input field separator may be changed, as described below. +Fields are referred to as +.UL "$1, $2," +and so forth, +where +.UL $1 +is the first field, +and +.UL $0 +is the whole input record itself. +Fields may be assigned to. +The number of fields in the current record +is available in a variable named +.UL NF . +.PP +The variables +.UL FS +and +.UL RS +refer to the input field and record separators; +they may be changed at any time to any single character. +The optional command-line argument +\f3\-F\fIc\fR +may also be used to set +.UL FS +to the character +.IT c . +.PP +If the record separator is empty, +an empty input line is taken as the record separator, +and blanks, tabs and newlines are treated as field separators. +.PP +The variable +.UL FILENAME +contains the name of the current input file. +.NH 2 +Printing +.PP +An action may have no pattern, +in which case the action is executed for +all +lines. +The simplest action is to print some or all of a record; +this is accomplished by the +.IT awk +command +.UL print . +The +.IT awk +program +.P1 +{ print } +.P2 +prints each record, thus copying the input to the output intact. +More useful is to print a field or fields from each record. +For instance, +.P1 +print $2, $1 +.P2 +prints the first two fields in reverse order. +Items separated by a comma in the print statement will be separated by the current output field separator +when output. +Items not separated by commas will be concatenated, +so +.P1 +print $1 $2 +.P2 +runs the first and second fields together. +.PP +The predefined variables +.UL NF +and +.UL NR +can be used; +for example +.P1 +{ print NR, NF, $0 } +.P2 +prints each record preceded by the record number and the number of fields. +.PP +Output may be diverted to multiple files; +the program +.P1 +{ print $1 >"foo1"; print $2 >"foo2" } +.P2 +writes the first field, +.UL $1 , +on the file +.UL foo1 , +and the second field on file +.UL foo2 . +The +.UL >> +notation can also be used: +.P1 +print $1 >>"foo" +.P2 +appends the output to the file +.UL foo . +(In each case, +the output files are +created if necessary.) +The file name can be a variable or a field as well as a constant; +for example, +.P1 +print $1 >$2 +.P2 +uses the contents of field 2 as a file name. +.PP +Naturally there is a limit on the number of output files; +currently it is 10. +.PP +Similarly, output can be piped into another process +(on +.UC UNIX +only); for instance, +.P1 +print | "mail bwk" +.P2 +mails the output to +.UL bwk . +.PP +The variables +.UL OFS +and +.UL ORS +may be used to change the current +output field separator and output +record separator. +The output record separator is +appended to the output of the +.UL print +statement. +.PP +.IT Awk +also provides the +.UL printf +statement for output formatting: +.P1 +printf format expr, expr, ... +.P2 +formats the expressions in the list +according to the specification +in +.UL format +and prints them. +For example, +.P1 +printf "%8.2f %10ld\en", $1, $2 +.P2 +prints +.UL $1 +as a floating point number 8 digits wide, +with two after the decimal point, +and +.UL $2 +as a 10-digit long decimal number, +followed by a newline. +No output separators are produced automatically; +you must add them yourself, +as in this example. +The version of +.UL printf +is identical to that used with C. +.[ +C programm language prentice hall 1978 +.] +.NH 1 +Patterns +.PP +A pattern in front of an action acts as a selector +that determines whether the action is to be executed. +A variety of expressions may be used as patterns: +regular expressions, +arithmetic relational expressions, +string-valued expressions, +and arbitrary boolean +combinations of these. +.NH 2 +BEGIN and END +.PP +The special pattern +.UL BEGIN +matches the beginning of the input, +before the first record is read. +The pattern +.UL END +matches the end of the input, +after the last record has been processed. +.UL BEGIN +and +.UL END +thus provide a way to gain control before and after processing, +for initialization and wrapup. +.PP +As an example, the field separator +can be set to a colon by +.P1 +BEGIN { FS = ":" } +.ft I +\&... rest of program ... +.ft 3 +.P2 +Or the input lines may be counted by +.P1 +END { print NR } +.P2 +If +.UL BEGIN +is present, it must be the first pattern; +.UL END +must be the last if used. +.NH 2 +Regular Expressions +.PP +The simplest regular expression is a literal string of characters +enclosed in slashes, +like +.P1 +/smith/ +.P2 +This +is actually a complete +.IT awk +program which +will print all lines which contain any occurrence +of the name ``smith''. +If a line contains ``smith'' +as part of a larger word, +it will also be printed, as in +.P1 +blacksmithing +.P2 +.PP +.IT Awk +regular expressions include the regular expression +forms found in +the +.UC UNIX +text editor +.IT ed\| +.[ +unix program manual +.] +and +.IT grep +(without back-referencing). +In addition, +.IT awk +allows +parentheses for grouping, | for alternatives, +.UL + +for ``one or more'', and +.UL ? +for ``zero or one'', +all as in +.IT lex . +Character classes +may be abbreviated: +.UL [a\-zA\-Z0\-9] +is the set of all letters and digits. +As an example, +the +.IT awk +program +.P1 +/[Aa]ho\||[Ww]einberger\||[Kk]ernighan/ +.P2 +will print all lines which contain any of the names +``Aho,'' ``Weinberger'' or ``Kernighan,'' +whether capitalized or not. +.PP +Regular expressions +(with the extensions listed above) +must be enclosed in slashes, +just as in +.IT ed +and +.IT sed . +Within a regular expression, +blanks and the regular expression +metacharacters are significant. +To turn of the magic meaning +of one of the regular expression characters, +precede it with a backslash. +An example is the pattern +.P1 +/\|\e/\^.\^*\e// +.P2 +which matches any string of characters +enclosed in slashes. +.PP +One can also specify that any field or variable +matches +a regular expression (or does not match it) with the operators +.UL ~ +and +.UL !~ . +The program +.P1 +$1 ~ /[jJ]ohn/ +.P2 +prints all lines where the first field matches ``john'' or ``John.'' +Notice that this will also match ``Johnson'', ``St. Johnsbury'', and so on. +To restrict it to exactly +.UL [jJ]ohn , +use +.P1 +$1 ~ /^[jJ]ohn$/ +.P2 +The caret ^ refers to the beginning +of a line or field; +the dollar sign +.UL $ +refers to the end. +.NH 2 +Relational Expressions +.PP +An +.IT awk +pattern can be a relational expression +involving the usual relational operators +.UL < , +.UL <= , +.UL == , +.UL != , +.UL >= , +and +.UL > . +An example is +.P1 +$2 > $1 + 100 +.P2 +which selects lines where the second field +is at least 100 greater than the first field. +Similarly, +.P1 +NF % 2 == 0 +.P2 +prints lines with an even number of fields. +.PP +In relational tests, if neither operand is numeric, +a string comparison is made; +otherwise it is numeric. +Thus, +.P1 +$1 >= "s" +.P2 +selects lines that begin with an +.UL s , +.UL t , +.UL u , +etc. +In the absence of any other information, +fields are treated as strings, so +the program +.P1 +$1 > $2 +.P2 +will perform a string comparison. +.NH 2 +Combinations of Patterns +.PP +A pattern can be any boolean combination of patterns, +using the operators +.UL \||\|| +(or), +.UL && +(and), and +.UL ! +(not). +For example, +.P1 +$1 >= "s" && $1 < "t" && $1 != "smith" +.P2 +selects lines where the first field begins with ``s'', but is not ``smith''. +.UL && +and +.UL \||\|| +guarantee that their operands +will be evaluated +from left to right; +evaluation stops as soon as the truth or falsehood +is determined. +.NH 2 +Pattern Ranges +.PP +The ``pattern'' that selects an action may also +consist of two patterns separated by a comma, as in +.P1 +pat1, pat2 { ... } +.P2 +In this case, the action is performed for each line between +an occurrence of +.UL pat1 +and the next occurrence of +.UL pat2 +(inclusive). +For example, +.P1 +/start/, /stop/ +.P2 +prints all lines between +.UL start +and +.UL stop , +while +.P1 +NR == 100, NR == 200 { ... } +.P2 +does the action for lines 100 through 200 +of the input. +.NH 1 +Actions +.PP +An +.IT awk +action is a sequence of action statements +terminated by newlines or semicolons. +These action statements can be used to do a variety of +bookkeeping and string manipulating tasks. +.NH 2 +Built-in Functions +.PP +.IT Awk +provides a ``length'' function +to compute the length of a string of characters. +This program prints each record, +preceded by its length: +.P1 +{print length, $0} +.P2 +.UL length +by itself is a ``pseudo-variable'' which +yields the length of the current record; +.UL length(argument) +is a function which yields the length of its argument, +as in +the equivalent +.P1 +{print length($0), $0} +.P2 +The argument may be any expression. +.PP +.IT Awk +also +provides the arithmetic functions +.UL sqrt , +.UL log , +.UL exp , +and +.UL int , +for +square root, +base +.IT e +logarithm, +exponential, +and integer part of their respective arguments. +.PP +The name of one of these built-in functions, +without argument or parentheses, +stands for the value of the function on the +whole record. +The program +.P1 +length < 10 || length > 20 +.P2 +prints lines whose length +is less than 10 or greater +than 20. +.PP +The function +.UL substr(s,\ m,\ n) +produces the substring of +.UL s +that begins at position +.UL m +(origin 1) +and is at most +.UL n +characters long. +If +.UL n +is omitted, the substring goes to the end of +.UL s . +The function +.UL index(s1,\ s2) +returns the position where the string +.UL s2 +occurs in +.UL s1 , +or zero if it does not. +.PP +The function +.UL sprintf(f,\ e1,\ e2,\ ...) +produces the value of the expressions +.UL e1 , +.UL e2 , +etc., +in the +.UL printf +format specified by +.UL f . +Thus, for example, +.P1 +x = sprintf("%8.2f %10ld", $1, $2) +.P2 +sets +.UL x +to the string produced by formatting +the values of +.UL $1 +and +.UL $2 . +.NH 2 +Variables, Expressions, and Assignments +.PP +.IT Awk +variables take on numeric (floating point) +or string values according to context. +For example, in +.P1 +x = 1 +.P2 +.UL x +is clearly a number, while in +.P1 +x = "smith" +.P2 +it is clearly a string. +Strings are converted to numbers and +vice versa whenever context demands it. +For instance, +.P1 +x = "3" + "4" +.P2 +assigns 7 to +.UL x . +Strings which cannot be interpreted +as numbers in a numerical context +will generally have numeric value zero, +but it is unwise to count on this behavior. +.PP +By default, variables (other than built-ins) are initialized to the null string, +which has numerical value zero; +this eliminates the need for most +.UL BEGIN +sections. +For example, the sums of the first two fields can be computed by +.P1 + { s1 += $1; s2 += $2 } +END { print s1, s2 } +.P2 +.PP +Arithmetic is done internally in floating point. +The arithmetic operators are +.UL + , +.UL \- , +.UL \(** , +.UL / , +and +.UL % +(mod). +The C increment +.UL ++ +and +decrement +.UL \-\- +operators are also available, +and so are the assignment operators +.UL += , +.UL \-= , +.UL *= , +.UL /= , +and +.UL %= . +These operators may all be used in expressions. +.NH 2 +Field Variables +.PP +Fields in +.IT awk +share essentially all of the properties of variables _ +they may be used in arithmetic or string operations, +and may be assigned to. +Thus one can +replace the first field with a sequence number like this: +.P1 +{ $1 = NR; print } +.P2 +or +accumulate two fields into a third, like this: +.P1 +{ $1 = $2 + $3; print $0 } +.P2 +or assign a string to a field: +.P1 +{ if ($3 > 1000) + $3 = "too big" + print +} +.P2 +which replaces the third field by ``too big'' when it is, +and in any case prints the record. +.PP +Field references may be numerical expressions, +as in +.P1 +{ print $i, $(i+1), $(i+n) } +.P2 +Whether a field is deemed numeric or string depends on context; +in ambiguous cases like +.P1 +if ($1 == $2) ... +.P2 +fields are treated as strings. +.PP +Each input line is split into fields automatically as necessary. +It is also possible to split any variable or string +into fields: +.P1 +n = split(s, array, sep) +.P2 +splits the +the string +.UL s +into +.UL array[1] , +\&..., +.UL array[n] . +The number of elements found is returned. +If the +.UL sep +argument is provided, it is used as the field separator; +otherwise +.UL FS +is used as the separator. +.NH 2 +String Concatenation +.PP +Strings may be concatenated. +For example +.P1 +length($1 $2 $3) +.P2 +returns the length of the first three fields. +Or in a +.UL print +statement, +.P1 +print $1 " is " $2 +.P2 +prints +the two fields separated by `` is ''. +Variables and numeric expressions may also appear in concatenations. +.NH 2 +Arrays +.PP +Array elements are not declared; +they spring into existence by being mentioned. +Subscripts may have +.ul +any +non-null +value, including non-numeric strings. +As an example of a conventional numeric subscript, +the statement +.P1 +x[NR] = $0 +.P2 +assigns the current input record to +the +.UL NR -th +element of the array +.UL x . +In fact, it is possible in principle (though perhaps slow) +to process the entire input in a random order with the +.IT awk +program +.P1 + { x[NR] = $0 } +END { \fI... program ...\fP } +.P2 +The first action merely records each input line in +the array +.UL x . +.PP +Array elements may be named by non-numeric values, +which gives +.IT awk +a capability rather like the associative memory of +Snobol tables. +Suppose the input contains fields with values like +.UL apple , +.UL orange , +etc. +Then the program +.P1 +/apple/ { x["apple"]++ } +/orange/ { x["orange"]++ } +END { print x["apple"], x["orange"] } +.P2 +increments counts for the named array elements, +and prints them at the end of the input. +.NH 2 +Flow-of-Control Statements +.PP +.IT Awk +provides the basic flow-of-control statements +.UL if-else , +.UL while , +.UL for , +and statement grouping with braces, as in C. +We showed the +.UL if +statement in section 3.3 without describing it. +The condition in parentheses is evaluated; +if it is true, the statement following the +.UL if +is done. +The +.UL else +part is optional. +.PP +The +.UL while +statement is exactly like that of C. +For example, to print all input fields one per line, +.P1 +i = 1 +while (i <= NF) { + print $i + ++i +} +.P2 +.PP +The +.UL for +statement is also exactly that of C: +.P1 +for (i = 1; i <= NF; i++) + print $i +.P2 +does the same job as the +.UL while +statement above. +.PP +There is an alternate form of the +.UL for +statement which is suited for accessing the +elements of an associative array: +.P1 +for (i in array) + \fIstatement\f3 +.P2 +does +.ul +statement +with +.UL i +set in turn to each element of +.UL array . +The elements are accessed in an apparently random order. +Chaos will ensue if +.UL i +is altered, or if any new elements are +accessed during the loop. +.PP +The expression in the condition part of an +.UL if , +.UL while +or +.UL for +can include relational operators like +.UL < , +.UL <= , +.UL > , +.UL >= , +.UL == +(``is equal to''), +and +.UL != +(``not equal to''); +regular expression matches with the match operators +.UL ~ +and +.UL !~ ; +the logical operators +.UL \||\|| , +.UL && , +and +.UL ! ; +and of course parentheses for grouping. +.PP +The +.UL break +statement causes an immediate exit +from an enclosing +.UL while +or +.UL for ; +the +.UL continue +statement +causes the next iteration to begin. +.PP +The statement +.UL next +causes +.IT awk +to skip immediately to +the next record and begin scanning the patterns from the top. +The statement +.UL exit +causes the program to behave as if the end of the input +had occurred. +.PP +Comments may be placed in +.IT awk +programs: +they begin with the character +.UL # +and end with the end of the line, +as in +.P1 +print x, y # this is a comment +.P2 +.NH +Design +.PP +The +.UX +system +already provides several programs that +operate by passing input through a +selection mechanism. +.IT Grep , +the first and simplest, merely prints all lines which +match a single specified pattern. +.IT Egrep +provides more general patterns, i.e., regular expressions +in full generality; +.IT fgrep +searches for a set of keywords with a particularly fast algorithm. +.IT Sed\| +.[ +unix programm manual +.] +provides most of the editing facilities of +the editor +.IT ed , +applied to a stream of input. +None of these programs provides +numeric capabilities, +logical relations, +or variables. +.PP +.IT Lex\| +.[ +lesk lexical analyzer cstr +.] +provides general regular expression recognition capabilities, +and, by serving as a C program generator, +is essentially open-ended in its capabilities. +The use of +.IT lex , +however, requires a knowledge of C programming, +and a +.IT lex +program must be compiled and loaded before use, +which discourages its use for one-shot applications. +.PP +.IT Awk +is an attempt +to fill in another part of the matrix of possibilities. +It +provides general regular expression capabilities +and an implicit input/output loop. +But it also provides convenient numeric processing, +variables, +more general selection, +and control flow in the actions. +It +does not require compilation or a knowledge of C. +Finally, +.IT awk +provides +a convenient way to access fields within lines; +it is unique in this respect. +.PP +.IT Awk +also tries to integrate strings and numbers +completely, +by treating all quantities as both string and numeric, +deciding which representation is appropriate +as late as possible. +In most cases the user can simply ignore the differences. +.PP +Most of the effort in developing +.I awk +went into deciding what +.I awk +should or should not do +(for instance, it doesn't do string substitution) +and what the syntax should be +(no explicit operator for concatenation) +rather +than on writing or debugging the code. +We have tried +to make the syntax powerful +but easy to use and well adapted +to scanning files. +For example, +the absence of declarations and implicit initializations, +while probably a bad idea for a general-purpose programming language, +is desirable in a language +that is meant to be used for tiny programs +that may even be composed on the command line. +.PP +In practice, +.IT awk +usage seems to fall into two broad categories. +One is what might be called ``report generation'' \(em +processing an input to extract counts, +sums, sub-totals, etc. +This also includes the writing of trivial +data validation programs, +such as verifying that a field contains only numeric information +or that certain delimiters are properly balanced. +The combination of textual and numeric processing is invaluable here. +.PP +A second area of use is as a data transformer, +converting data from the form produced by one program +into that expected by another. +The simplest examples merely select fields, perhaps with rearrangements. +.NH +Implementation +.PP +The actual implementation of +.IT awk +uses the language development tools available +on the +.UC UNIX +operating system. +The grammar is specified with +.IT yacc ; +.[ +yacc johnson cstr +.] +the lexical analysis is done by +.IT lex ; +the regular expression recognizers are +deterministic finite automata +constructed directly from the expressions. +An +.IT awk +program is translated into a +parse tree which is then directly executed +by a simple interpreter. +.PP +.IT Awk +was designed for ease of use rather than processing speed; +the delayed evaluation of variable types +and the necessity to break input +into fields makes high speed difficult to achieve in any case. +Nonetheless, +the program has not proven to be unworkably slow. +.PP +Table I below shows the execution (user + system) time +on a PDP-11/70 of +the +.UC UNIX +programs +.IT wc , +.IT grep , +.IT egrep , +.IT fgrep , +.IT sed , +.IT lex , +and +.IT awk +on the following simple tasks: +.IP "\ \ 1." +count the number of lines. +.IP "\ \ 2." +print all lines containing ``doug''. +.IP "\ \ 3." +print all lines containing ``doug'', ``ken'' or ``dmr''. +.IP "\ \ 4." +print the third field of each line. +.IP "\ \ 5." +print the third and second fields of each line, in that order. +.IP "\ \ 6." +append all lines containing ``doug'', ``ken'', and ``dmr'' +to files ``jdoug'', ``jken'', and ``jdmr'', respectively. +.IP "\ \ 7." +print each line prefixed by ``line-number\ :\ ''. +.IP "\ \ 8." +sum the fourth column of a table. +.LP +The program +.IT wc +merely counts words, lines and characters in its input; +we have already mentioned the others. +In all cases the input was a file containing +10,000 lines +as created by the +command +.IT "ls \-l" ; +each line has the form +.P1 +-rw-rw-rw- 1 ava 123 Oct 15 17:05 xxx +.P2 +The total length of this input is +452,960 characters. +Times for +.IT lex +do not include compile or load. +.PP +As might be expected, +.IT awk +is not as fast as the specialized tools +.IT wc , +.IT sed , +or the programs in the +.IT grep +family, +but +is faster than the more general tool +.IT lex . +In all cases, the tasks were +about as easy to express as +.IT awk +programs +as programs in these other languages; +tasks involving fields were +considerably easier to express as +.IT awk +programs. +Some of the test programs are shown in +.IT awk , +.IT sed +and +.IT lex . +.[ +$LIST$ +.] +.1C +.TS +center; +c c c c c c c c c +c c c c c c c c c +c|n|n|n|n|n|n|n|n|. + Task +Program 1 2 3 4 5 6 7 8 +_ +\fIwc\fR 8.6 +\fIgrep\fR 11.7 13.1 +\fIegrep\fR 6.2 11.5 11.6 +\fIfgrep\fR 7.7 13.8 16.1 +\fIsed\fR 10.2 11.6 15.8 29.0 30.5 16.1 +\fIlex\fR 65.1 150.1 144.2 67.7 70.3 104.0 81.7 92.8 +\fIawk\fR 15.0 25.6 29.9 33.3 38.9 46.4 71.4 31.1 +_ +.TE +.sp +.ce +\fBTable I.\fR Execution Times of Programs. (Times are in sec.) +.sp 2 +.2C +.PP +The programs for some of these jobs are shown below. +The +.IT lex +programs are generally too long to show. +.LP +AWK: +.LP +.P1 +1. END {print NR} +.P2 +.P1 +2. /doug/ +.P2 +.P1 +3. /ken|doug|dmr/ +.P2 +.P1 +4. {print $3} +.P2 +.P1 +5. {print $3, $2} +.P2 +.P1 +6. /ken/ {print >"jken"} + /doug/ {print >"jdoug"} + /dmr/ {print >"jdmr"} +.P2 +.P1 +7. {print NR ": " $0} +.P2 +.P1 +8. {sum = sum + $4} + END {print sum} +.P2 +.LP +SED: +.LP +.P1 +1. $= +.P2 +.P1 +2. /doug/p +.P2 +.P1 +3. /doug/p + /doug/d + /ken/p + /ken/d + /dmr/p + /dmr/d +.P2 +.P1 +4. /[^ ]* [ ]*[^ ]* [ ]*\e([^ ]*\e) .*/s//\e1/p +.P2 +.P1 +5. /[^ ]* [ ]*\e([^ ]*\e) [ ]*\e([^ ]*\e) .*/s//\e2 \e1/p +.P2 +.P1 +6. /ken/w jken + /doug/w jdoug + /dmr/w jdmr +.P2 +.LP +LEX: +.LP +.P1 +1. %{ + int i; + %} + %% + \en i++; + . ; + %% + yywrap() { + printf("%d\en", i); + } +.P2 +.P1 +2. %% + ^.*doug.*$ printf("%s\en", yytext); + . ; + \en ; +.P2 diff --git a/usr/doc/bc b/usr/doc/bc new file mode 100644 index 0000000000..58d839c945 --- /dev/null +++ b/usr/doc/bc @@ -0,0 +1,1059 @@ +.RP +.TL +BC \- An Arbitrary Precision Desk-Calculator Language +.AU +Lorinda Cherry +.AU +Robert Morris +.AI +.MH +.AB +BC is a language and a compiler for doing arbitrary precision arithmetic +on the PDP-11 under the +.UX +time-sharing +system. The output of the compiler is interpreted and executed by +a collection of routines which can input, output, and do +arithmetic on indefinitely large integers and on scaled fixed-point +numbers. +.PP +These routines are themselves based on a dynamic storage allocator. +Overflow does not occur until all available core storage +is exhausted. +.PP +The language has a complete control structure as well as immediate-mode +operation. Functions can be defined and saved for later execution. +.PP +Two five hundred-digit numbers can be multiplied to give a +thousand digit result in about ten seconds. +.PP +A small collection of library functions is also available, +including sin, cos, arctan, log, exponential, and Bessel functions of +integer order. +.PP +Some of the uses of this compiler are +.IP \- +to do computation with large integers, +.IP \- +to do computation accurate to many decimal places, +.IP \- +conversion of numbers from one base to another base. +.AE +.PP +.SH +Introduction +.PP +BC is a language and a compiler for doing arbitrary precision +arithmetic on the +.UX +time-sharing system [1]. +The compiler was written to make conveniently available a +collection of routines (called DC [5]) which are capable of doing +arithmetic on integers of arbitrary size. The compiler +is by no means intended to provide a complete programming +language. +It is a minimal language facility. +.PP +There is a scaling provision that permits the +use of decimal point notation. +Provision is made for input and output in bases other than +decimal. Numbers can be converted from decimal to octal by +simply setting the output base to equal 8. +.PP +The actual limit on the number of digits that can +be handled depends on the amount of storage available on the machine. +Manipulation of numbers with many hundreds of digits +is possible even on the smallest versions of +.UX . +.PP +The syntax of BC has been deliberately selected to agree +substantially with the C language [2]. Those who +are familiar with C will find few surprises in this language. +.SH +Simple Computations with Integers +.PP +The simplest kind of statement is an arithmetic expression +on a line by itself. +For instance, if you type in the line: +.DS +142857 + 285714 +.DE +the program responds immediately with the line +.DS +428571 +.DE +The operators \-, *, /, %, and ^ can also be used; they +indicate subtraction, multiplication, division, remaindering, and +exponentiation, respectively. Division of integers produces an +integer result truncated toward zero. +Division by zero produces an error +comment. +.PP +Any term in an expression may be prefixed by a minus sign to +indicate that it is to be negated (the `unary' minus sign). +The expression +.DS +7+\-3 +.DE +is interpreted to mean that \-3 is to be added to 7. +.PP +More complex expressions with several operators and with +parentheses are interpreted just as in +Fortran, with ^ having the greatest binding +power, then * and % and /, and finally + and \-. +Contents of parentheses are evaluated before material +outside the parentheses. +Exponentiations are +performed from right to left and the other operators +from left to right. +The two expressions +.DS +a^b^c and a^(b^c) +.DE +are equivalent, as are the two expressions +.DS +a*b*c and (a*b)*c +.DE +BC shares with Fortran and C the undesirable convention that +.DS +a/b*c is equivalent to (a/b)*c +.DE +.PP +Internal storage registers to hold numbers have single lower-case +letter names. The value of an expression can be assigned to +a register in the usual way. The statement +.DS +x = x + 3 +.DE +has the effect of increasing by three the value of the contents of the +register named x. +When, as in this case, the outermost operator is an =, the +assignment is performed but the result is not printed. +Only 26 of these named storage registers are available. +.PP +There is a built-in square root function whose +result is truncated to an integer (but see scaling below). +The lines +.DS +x = sqrt(191) +x +.DE +produce the printed result +.DS +13 +.DE +.SH +Bases +.PP +There are special internal quantities, called `ibase' and `obase'. +The contents of `ibase', initially set to 10, +determines the base used for interpreting numbers read in. +For example, the lines +.DS +ibase = 8 +11 +.DE +will produce the output line +.DS +9 +.DE +and you are all set up to do octal to decimal conversions. +Beware, however of trying to change the input base back +to decimal by typing +.DS +ibase = 10 +.DE +Because the number 10 is interpreted as octal, this statement will +have no effect. +For those who deal in hexadecimal notation, +the characters A\-F are permitted in numbers +(no matter what base is in effect) +and are +interpreted as digits having values 10\-15 respectively. +The statement +.DS +ibase = A +.DE +will change you back to decimal input base no matter what the +current input base is. +Negative and large positive input bases are +permitted but useless. +No mechanism has been provided for the input of arbitrary +numbers in bases less than 1 and greater than 16. +.PP +The contents of `obase', initially set to 10, are used as the base for output +numbers. The lines +.DS +obase = 16 +1000 +.DE +will produce the output line +.DS +3E8 +.DE +which is to be interpreted as a 3-digit hexadecimal number. +Very large output bases are permitted, and they are sometimes useful. +For example, large numbers can be output in groups of five digits +by setting `obase' to 100000. +Strange (i.e. 1, 0, or negative) output bases are +handled appropriately. +.PP +Very large numbers are split across lines with 70 characters per line. +Lines which are continued end with \\. +Decimal output conversion is practically instantaneous, but output +of very large numbers (i.e., more than 100 digits) with other bases +is rather slow. +Non-decimal output conversion of +a one hundred digit number takes about +three seconds. +.PP +It is best to remember that `ibase' and `obase' have no effect +whatever on the course of internal computation or +on the evaluation of expressions, but only affect input and +output conversion, respectively. +.SH +Scaling +.PP +A third special internal quantity called `scale' is +used to determine the scale of calculated +quantities. +Numbers may have +up to 99 decimal digits after the decimal point. +This fractional part is retained in further computations. +We refer to the number of digits after the decimal point of +a number as its scale. +.PP +When two scaled numbers are combined by +means of one of the arithmetic operations, the result +has a scale determined by the following rules. For +addition and subtraction, the scale of the result is the larger +of the scales of the two operands. In this case, +there is never any truncation of the result. +For multiplications, the scale of the result is never +less than the maximum of the two scales of the operands, +never more than the sum of the scales of the operands +and, subject to those two restrictions, +the scale of the result is set equal to the contents of the internal +quantity `scale'. +The scale of a quotient is the contents of the internal +quantity `scale'. The scale of a remainder is +the sum of the scales of the quotient and the divisor. +The result of an exponentiation is scaled as if +the implied multiplications were performed. +An exponent must be an integer. +The scale of a square root is set to the maximum of the scale +of the argument and the contents of `scale'. +.PP +All of the internal operations are actually carried out in terms +of integers, with digits being discarded when necessary. +In every case where digits are discarded, truncation and +not rounding is performed. +.PP +The contents of +`scale' must be no greater than +99 and no less than 0. It is initially set to 0. +In case you need more than 99 fraction digits, you may arrange +your own scaling. +.PP +The internal quantities `scale', `ibase', and `obase' can be +used in expressions just like other variables. +The line +.DS +scale = scale + 1 +.DE +increases the value of `scale' by one, and the line +.DS +scale +.DE +causes the current value of `scale' to be printed. +.PP +The value of `scale' retains its meaning as a +number of decimal digits to be retained in internal +computation even when `ibase' or `obase' are not equal to 10. +The internal computations (which are still conducted in decimal, +regardless of the bases) are performed to the specified number +of decimal digits, never hexadecimal or octal or any +other kind of digits. +.SH +Functions +.PP +The name of a function is a single lower-case letter. +Function names are permitted to collide with simple +variable names. +Twenty-six different defined functions are permitted +in addition to the twenty-six variable names. +The line +.DS + define a(x){ +.DE +begins the definition of a function with one argument. +This line must be followed by one or more statements, +which make up the body of the function, ending +with a right brace }. +Return of control from a function occurs when a return +statement is executed or when the end of the function is reached. +The return statement can take either +of the two forms +.DS +return +return(x) +.DE +In the first case, the value of the function is 0, and in +the second, the value of the expression in parentheses. +.PP +Variables used in the function can be declared as automatic +by a statement of the form +.DS +auto x,y,z +.DE +There can be only one `auto' statement in a function and it must +be the first statement in the definition. +These automatic variables are allocated space and initialized +to zero on entry to the function and thrown away on return. The +values of any variables with the same names outside the function +are not disturbed. +Functions may be called recursively and the automatic variables +at each level of call are protected. +The parameters named in a function definition are treated in +the same way as the automatic variables of that function +with the single exception that they are given a value +on entry to the function. +An example of a function definition is +.DS + define a(x,y){ + auto z + z = x*y + return(z) + } +.DE +The value of this function, when called, will be the +product of its +two arguments. +.PP +A function is called by the appearance of its name +followed by a string of arguments enclosed in +parentheses and separated by commas. +The result +is unpredictable if the wrong number of arguments is used. +.PP +Functions with no arguments are defined and called using +parentheses with nothing between them: b(). +.PP +If the function +.ft I +a +.ft +above has been defined, then the line +.DS +a(7,3.14) +.DE +would cause the result 21.98 to be printed and the line +.DS +x = a(a(3,4),5) +.DE +would cause the value of x to become 60. +.SH +Subscripted Variables +.PP +A single lower-case letter variable name +followed by an expression in brackets is called a subscripted +variable (an array element). +The variable name is called the array name and the expression +in brackets is called the subscript. +Only one-dimensional arrays are +permitted. The names of arrays are permitted to +collide with the names of simple variables and function names. +Any fractional +part of a subscript is discarded before use. +Subscripts must be greater than or equal to zero and +less than or equal to 2047. +.PP +Subscripted variables may be freely used in expressions, in +function calls, and in return statements. +.PP +An array name may be used as an argument to a function, +or may be declared as automatic in +a function definition by the use of empty brackets: +.DS +f(a[\|]) +define f(a[\|]) +auto a[\|] +.DE +When an array name is so used, the whole contents of the array +are copied for the use of the function, and thrown away on exit +from the function. +Array names which refer to whole arrays cannot be used +in any other contexts. +.SH +Control Statements +.PP +The `if', the `while', and the `for' statements +may be used to alter the flow within programs or to cause iteration. +The range of each of them is a statement or +a compound statement consisting of a collection of +statements enclosed in braces. +They are written in the following way +.DS +if(relation) statement +while(relation) statement +for(expression1; relation; expression2) statement +.DE +or +.DS +if(relation) {statements} +while(relation) {statements} +for(expression1; relation; expression2) {statements} +.DE +.PP +A relation in one of the control statements is an expression of the form +.DS +x>y +.DE +where two expressions are related by one of the six relational +operators <, >, <=, >=, ==, or !=. +The relation == +stands for `equal to' and != stands for `not equal to'. +The meaning of the remaining relational operators is +clear. +.PP +BEWARE of using = instead of == in a relational. Unfortunately, +both of them are legal, so you will not get a diagnostic +message, but = really will not do a comparison. +.PP +The `if' statement causes execution of its range +if and only if the relation is true. +Then control passes to the next statement in sequence. +.PP +The `while' statement causes execution of its range +repeatedly as long as the relation +is true. The relation is tested before each execution +of its range and if the relation +is false, control passes to the next statement beyond the range +of the while. +.PP +The `for' statement begins +by executing `expression1'. Then the relation is tested +and, if true, the statements in the range of the `for' are executed. +Then `expression2' is executed. The relation is tested, and so on. +The typical use of the `for' statement is for a controlled iteration, +as in the statement +.DS +for(i=1; i<=10; i=i+1) i +.DE +which will print the integers from 1 to 10. +Here are some examples of the use of the control statements. +.DS +define f(n){ +auto i, x +x=1 +for(i=1; i<=n; i=i+1) x=x*i +return(x) +} +.DE +The line +.DS + f(a) +.DE +will print +.ft I +a +.ft +factorial if +.ft I +a +.ft +is a positive integer. +Here is the definition of a function which will +compute values of the binomial coefficient +(m and n are assumed to be positive integers). +.DS +define b(n,m){ +auto x, j +x=1 +for(j=1; j<=m; j=j+1) x=x*(n\-j+1)/j +return(x) +} +.DE +The following function computes values of the exponential function +by summing the appropriate series +without regard for possible truncation errors: +.DS +scale = 20 +define e(x){ + auto a, b, c, d, n + a = 1 + b = 1 + c = 1 + d = 0 + n = 1 + while(1==1){ + a = a*x + b = b*n + c = c + a/b + n = n + 1 + if(c==d) return(c) + d = c + } +} +.DE +.SH +Some Details +.PP +There are some language features that every user should know +about even if he will not use them. +.PP +Normally statements are typed one to a line. It is also permissible +to type several statements on a line separated by semicolons. +.PP +If an assignment statement is parenthesized, it then has +a value and it can be used anywhere that an expression can. +For example, the line +.DS +(x=y+17) +.DE +not only makes the indicated assignment, but also prints the +resulting value. +.PP +Here is an example of a use of the value of an +assignment statement even when it is not parenthesized. +.DS +x = a[i=i+1] +.DE +causes a value to be assigned to x and also increments i +before it is used as a subscript. +.PP +The following constructs work in BC in exactly the same manner +as they do in the C language. Consult the appendix or the +C manuals [2] for their exact workings. +.DS +.ta 2i +x=y=z is the same as x=(y=z) +x =+ y x = x+y +x =\- y x = x\-y +x =* y x = x*y +x =/ y x = x/y +x =% y x = x%y +x =^ y x = x^y +x++ (x=x+1)\-1 +x\-\- (x=x\-1)+1 +++x x = x+1 +\-\-x x = x\-1 +.DE +Even if you don't intend to use the constructs, +if you type one inadvertently, something correct but unexpected +may happen. +.PP +WARNING! In some of these constructions, spaces are +significant. +There is a real difference between +x=\-y and x= \-y. +The first replaces x by x\-y and the second by \-y. +.SH +Three Important Things +.PP +1. To exit a BC program, type `quit'. +.PP +2. There is a comment convention identical to that of C and +of PL/I. Comments begin with `/*' and end with `*/'. +.PP +3. There is a library of math functions which may be obtained by +typing at command level +.DS +bc \-l +.DE +This command will load a set of library functions +which, at the time of writing, consists of sine (named `s'), +cosine (`c'), arctangent (`a'), natural logarithm (`l'), +exponential (`e') and Bessel functions of integer order (`j(n,x)'). Doubtless more functions will be added +in time. +The library sets the scale to 20. You can reset it to something +else if you like. +The design of these mathematical library routines +is discussed elsewhere [3]. +.PP +If you type +.DS +bc file ... +.DE +BC will read and execute the named file or files before accepting +commands from the keyboard. In this way, you may load your +favorite programs and function definitions. +.SH +Acknowledgement +.PP +The compiler is written in YACC [4]; its original +version was written by S. C. Johnson. +.SH +References +.IP [1] +K. Thompson and D. M. Ritchie, +.ft I +UNIX Programmer's Manual, +.ft +Bell Laboratories, +1978. +.IP [2] +B. W. Kernighan and +D. M. Ritchie, +.ft I +The C Programming Language, +.ft +Prentice-Hall, 1978. +.IP [3] +R. Morris, +.ft I +A Library of Reference Standard Mathematical Subroutines, +.ft +Bell Laboratories internal memorandum, 1975. +.IP [4] +S. C. Johnson, +.ft I +YACC \(em Yet Another Compiler-Compiler. +.ft +Bell Laboratories Computing Science Technical Report #32, 1978. +.IP [5] +R. Morris and L. L. Cherry, +.ft I +DC \- An Interactive Desk Calculator. +.ft +.LP +.bp +.ft B +.DS C +Appendix +.DE +.ft +.NH +Notation +.PP +In the following pages syntactic categories are in \fIitalics\fP; +literals are in \fBbold\fP; material in brackets [\|] is optional. +.NH +Tokens +.PP +Tokens consist of keywords, identifiers, constants, operators, +and separators. +Token separators may be blanks, tabs or comments. +Newline characters or semicolons separate statements. +.NH 2 +Comments +.PP +Comments are introduced by the characters /* and terminated by +*/. +.NH 2 +Identifiers +.PP +There are three kinds of identifiers \- ordinary identifiers, array identifiers +and function identifiers. +All three types consist of single lower-case letters. +Array identifiers are followed by square brackets, possibly +enclosing an expression describing a subscript. +Arrays are singly dimensioned and may contain up to 2048 +elements. +Indexing begins at zero so an array may be indexed from 0 to 2047. +Subscripts are truncated to integers. +Function identifiers are followed by parentheses, possibly enclosing arguments. +The three types of identifiers do not conflict; +a program can have a variable named \fBx\fP, +an array named \fBx\fP and a function named \fBx\fP, all of which are separate and +distinct. +.NH 2 +Keywords +.PP +The following are reserved keywords: +.ft B +.ta .5i 1.0i +.nf + ibase if + obase break + scale define + sqrt auto + length return + while quit + for +.fi +.ft +.NH 2 +Constants +.PP +Constants consist of arbitrarily long numbers +with an optional decimal point. +The hexadecimal digits \fBA\fP\-\fBF\fP are also recognized as digits with +values 10\-15, respectively. +.NH 1 +Expressions +.PP +The value of an expression is printed unless the main +operator is an assignment. +Precedence is the same as the order +of presentation here, with highest appearing first. +Left or right associativity, where applicable, is +discussed with each operator. +.bp +.NH 2 +Primitive expressions +.NH 3 +Named expressions +.PP +Named expressions are +places where values are stored. +Simply stated, +named expressions are legal on the left +side of an assignment. +The value of a named expression is the value stored in the place named. +.NH 4 +\fIidentifiers\fR +.PP +Simple identifiers are named expressions. +They have an initial value of zero. +.NH 4 +\fIarray-name\fP\|[\|\fIexpression\fP\|] +.PP +Array elements are named expressions. +They have an initial value of zero. +.NH 4 +\fBscale\fR, \fBibase\fR and \fBobase\fR +.PP +The internal registers +\fBscale\fP, \fBibase\fP and \fBobase\fP are all named expressions. +\fBscale\fP is the number of digits after the decimal point to be +retained in arithmetic operations. +\fBscale\fR has an initial value of zero. +\fBibase\fP and \fBobase\fP are the input and output number +radix respectively. +Both \fBibase\fR and \fBobase\fR have initial values of 10. +.NH 3 +Function calls +.NH 4 +\fIfunction-name\fB\|(\fR[\fIexpression\fR\|[\fB,\|\fIexpression\|\fR.\|.\|.\|]\|]\fB) +.PP +A function call consists of a function name followed by parentheses +containing a comma-separated list of +expressions, which are the function arguments. +A whole array passed as an argument is specified by the +array name followed by empty square brackets. +All function arguments are passed by +value. +As a result, changes made to the formal parameters have +no effect on the actual arguments. +If the function terminates by executing a return +statement, the value of the function is +the value of the expression in the parentheses of the return +statement or is zero if no expression is provided +or if there is no return statement. +.NH 4 +sqrt\|(\|\fIexpression\fP\|) +.PP +The result is the square root of the expression. +The result is truncated in the least significant decimal place. +The scale of the result is +the scale of the expression or the +value of +.ft B +scale, +.ft +whichever is larger. +.NH 4 +length\|(\|\fIexpression\fP\|) +.PP +The result is the total number of significant decimal digits in the expression. +The scale of the result is zero. +.NH 4 +scale\|(\|\fIexpression\fP\|) +.PP +The result is the scale of the expression. +The scale of the result is zero. +.NH 3 +Constants +.PP +Constants are primitive expressions. +.NH 3 +Parentheses +.PP +An expression surrounded by parentheses is +a primitive expression. +The parentheses are used to alter the +normal precedence. +.NH 2 +Unary operators +.PP +The unary operators +bind right to left. +.NH 3 +\-\|\fIexpression\fP +.PP +The result is the negative of the expression. +.NH 3 +++\|\fInamed-expression\fP +.PP +The named expression is +incremented by one. +The result is the value of the named expression after +incrementing. +.NH 3 +\-\-\|\fInamed-expression\fP +.PP +The named expression is +decremented by one. +The result is the value of the named expression after +decrementing. +.NH 3 +\fInamed-expression\fP\|++ +.PP +The named expression is +incremented by one. +The result is the value of the named expression before +incrementing. +.NH 3 +\fInamed-expression\fP\|\-\- +.PP +The named expression is +decremented by one. +The result is the value of the named expression before +decrementing. +.NH 2 +Exponentiation operator +.PP +The exponentiation operator binds right to left. +.NH 3 +\fIexpression\fP ^ \fIexpression\fP +.PP +The result is the first +expression raised to the power of the +second expression. +The second expression must be an integer. +If \fIa\fP +is the scale of the left expression +and \fIb\fP is the absolute value +of the right expression, +then the scale of the result is: +.PP +min\|(\|\fIa\(mub\fP,\|max\|(\|\fBscale\fP,\|\fIa\fP\|)\|) +.NH 2 +Multiplicative operators +.PP +The operators *, /, % bind left to right. +.NH 3 +\fIexpression\fP * \fIexpression\fP +.PP +The result is the product +of the two expressions. +If \fIa\fP and \fIb\fP are the +scales of the two expressions, +then the scale of the result is: +.PP +min\|(\|\fIa+b\fP,\|max\|(\|\fBscale\fP,\|\fIa\fP,\|\fIb\fP\|)\|) +.NH 3 +\fIexpression\fP / \fIexpression\fP +.PP +The result is the quotient of the two expressions. +The scale of the result is the value of \fBscale\fR. +.NH 3 +\fIexpression\fP % \fIexpression\fP +.PP +The % operator produces the remainder of the division +of the two expressions. +More precisely, +\fIa\fP%\fIb\fP is \fIa\fP\-\fIa\fP/\fIb\fP*\fIb\fP. +.PP +The scale of the result is the sum of the scale of +the divisor and the value of +.ft B +scale +.ft +.NH 2 +Additive operators +.PP +The additive operators bind left to right. +.NH 3 +\fIexpression\fP + \fIexpression\fP +.PP +The result is the sum of the two expressions. +The scale of the result is +the maximun of the scales of the expressions. +.NH 3 +\fIexpression\fP \- \fIexpression\fP +.PP +The result is the difference of the two expressions. +The scale of the result is the +maximum of the scales of the expressions. +.NH 2 +assignment operators +.PP +The assignment operators bind right to left. +.NH 3 +\fInamed-expression\fP = \fIexpression\fP +.PP +This expression results in assigning the value of the expression +on the right +to the named expression on the left. +.NH 3 +\fInamed-expression\fP =+ \fIexpression\fP +.NH 3 +\fInamed-expression\fP =\- \fIexpression\fP +.NH 3 +\fInamed-expression\fP =* \fIexpression\fP +.NH 3 +\fInamed-expression\fP =/ \fIexpression\fP +.NH 3 +\fInamed-expression\fP =% \fIexpression\fP +.NH 3 +\fInamed-expression\fP =^ \fIexpression\fP +.PP +The result of the above expressions is equivalent +to ``named expression = named expression OP expression'', +where OP is the operator after the = sign. +.NH 1 +Relations +.PP +Unlike all other operators, the relational operators +are only valid as the object of an \fBif\fP, \fBwhile\fP, +or inside a \fBfor\fP statement. +.NH 2 +\fIexpression\fP < \fIexpression\fP +.NH 2 +\fIexpression\fP > \fIexpression\fP +.NH 2 +\fIexpression\fP <= \fIexpression\fP +.NH 2 +\fIexpression\fP >= \fIexpression\fP +.NH 2 +\fIexpression\fP == \fIexpression\fP +.NH 2 +\fIexpression\fP != \fIexpression\fP +.NH 1 +Storage classes +.PP +There are only two storage classes in BC, global and automatic +(local). +Only identifiers that are to be local to a function need be +declared with the \fBauto\fP command. +The arguments to a function +are local to the function. +All other identifiers are assumed to be global +and available to all functions. +All identifiers, global and local, have initial values +of zero. +Identifiers declared as \fBauto\fP are allocated on entry to the function +and released on returning from the function. +They therefore do not retain values between function calls. +\fBauto\fP arrays are specified by the array name followed by empty square brackets. +.PP +Automatic variables in BC do not work in exactly the same way +as in either C or PL/I. On entry to a function, the old values of +the names that appear as parameters and as automatic +variables are pushed onto a stack. +Until return is made from the function, reference to these +names refers only to the new values. +.NH 1 +Statements +.PP +Statements must be separated by semicolon or newline. +Except where altered by control statements, execution +is sequential. +.NH 2 +Expression statements +.PP +When a statement is an expression, unless +the main operator is an assignment, the value +of the expression is printed, followed by a newline character. +.NH 2 +Compound statements +.PP +Statements may be grouped together and used when one statement is expected +by surrounding them with { }. +.NH 2 +Quoted string statements +.PP +"any string" +.sp .5 +This statement prints the string inside the quotes. +.NH 2 +If statements +.sp .5 +\fBif\|(\|\fIrelation\fB\|)\|\fIstatement\fR +.PP +The substatement is executed if the relation is true. +.NH 2 +While statements +.sp .5 +\fBwhile\|(\|\fIrelation\fB\|)\|\fIstatement\fR +.PP +The statement is executed while the relation +is true. +The test occurs before each execution of the statement. +.NH 2 +For statements +.sp .5 +\fBfor\|(\|\fIexpression\fB; \fIrelation\fB; \fIexpression\fB\|)\|\fIstatement\fR +.PP +The for statement is the same as +.nf +.ft I + first-expression + \fBwhile\|(\fPrelation\|\fB) {\fP + statement + last-expression + } +.ft R +.fi +.PP +All three expressions must be present. +.NH 2 +Break statements +.sp .5 +\fBbreak\fP +.PP +\fBbreak\fP causes termination of a \fBfor\fP or \fBwhile\fP statement. +.NH 2 +Auto statements +.sp .5 +\fBauto \fIidentifier\fR\|[\|\fB,\fIidentifier\fR\|] +.PP +The auto statement causes the values of the identifiers to be pushed down. +The identifiers can be ordinary identifiers or array identifiers. +Array identifiers are specified by following the array name by empty square +brackets. +The auto statement must be the first statement +in a function definition. +.NH 2 +Define statements +.sp .5 +.nf +\fBdefine(\|\fR[\fIparameter\|\fR[\fB\|,\|\fIparameter\|.\|.\|.\|\fR]\|]\|\fB)\|{\fI + statements\|\fB}\fR +.fi +.PP +The define statement defines a function. +The parameters may +be ordinary identifiers or array names. +Array names must be followed by empty square brackets. +.NH 2 +Return statements +.sp .5 +\fBreturn\fP +.sp .5 +\fBreturn(\fI\|expression\|\fB)\fR +.PP +The return statement causes termination of a function, +popping of its auto variables, and +specifies the result of the function. +The first form is equivalent to \fBreturn(0)\fR. +The result of the function is the result of the expression +in parentheses. +.NH 2 +Quit +.PP +The quit statement stops execution of a BC program and returns +control to UNIX when it is first encountered. +Because it is not treated as an executable statement, +it cannot be used +in a function definition or in an +.ft B +if, for, +.ft +or +.ft B +while +.ft +statement. diff --git a/usr/doc/cman b/usr/doc/cman new file mode 100644 index 0000000000..7c8fbf5ef9 --- /dev/null +++ b/usr/doc/cman @@ -0,0 +1,2 @@ +Sorry, but for copyright reasons, the source +for the C Reference Manual is not distributed. diff --git a/usr/doc/implement b/usr/doc/implement new file mode 100644 index 0000000000..e7f128e26a --- /dev/null +++ b/usr/doc/implement @@ -0,0 +1,1231 @@ +.de P1 +.DS +.. +.de P2 +.DE +.. +.de UL +.lg 0 +.if n .ul +\%\&\\$3\f3\\$1\fR\&\\$2 +.lg +.. +.de UC +\&\\$3\s-1\\$1\\s0\&\\$2 +.. +.de IT +.lg 0 +.if n .ul +\%\&\\$3\f2\\$1\fR\&\\$2 +.lg +.. +.de SP +.sp \\$1 +.. +.hw device +.TL +UNIX Implementation +.AU "MH 2C-523" 2394 +K. Thompson +.AI +.MH +.AB +This paper describes in high-level terms the +implementation of the resident +.UX +kernel. +This discussion is broken into three parts. +The first part describes +how the +.UX +system views processes, users, and programs. +The second part describes the I/O system. +The last part describes the +.UX +file system. +.AE +.NH +INTRODUCTION +.PP +The +.UX +kernel consists of about 10,000 +lines of C code and about 1,000 lines of assembly code. +The assembly code can be further broken down into +200 lines included for +the sake of efficiency +(they could have been written in C) +and 800 lines to perform hardware +functions not possible in C. +.PP +This code represents 5 to 10 percent of what has +been lumped into the broad expression +``the +.UX +operating system.'' +The kernel is the only +.UX +code that +cannot be substituted by a user to his +own liking. +For this reason, +the kernel should make as few real +decisions as possible. +This does not mean to allow the user +a million options to do the same thing. +Rather, it means to allow only one way to +do one thing, +but have that way be the least-common divisor +of all the options that might have been provided. +.PP +What is or is not implemented in the kernel +represents both a great responsibility and a great power. +It is a soap-box platform on +``the way things should be done.'' +Even so, if +``the way'' is too radical, +no one will follow it. +Every important decision was weighed +carefully. +Throughout, +simplicity has been substituted for efficiency. +Complex algorithms are used only if +their complexity can be localized. +.NH +PROCESS CONTROL +.PP +In the +.UX +system, +a user executes programs in an +environment called a user process. +When a system function is required, +the user process calls the system +as a subroutine. +At some point in this call, +there is a distinct switch of environments. +After this, +the process is said to be a system process. +In the normal definition of processes, +the user and system processes are different +phases of the same process +(they never execute simultaneously). +For protection, +each system process has its own stack. +.PP +The user process may execute +from a read-only text segment, +which is shared by all processes +executing the same code. +There is no +.IT functional +benefit +from shared-text segments. +An +.IT efficiency +benefit comes from the fact +that there is no need to swap read-only +segments out because the original +copy on secondary memory is still current. +This is a great benefit to interactive +programs that tend to be swapped while +waiting for terminal input. +Furthermore, +if two processes are +executing +simultaneously +from the same copy of a read-only segment, +only one copy needs to reside in +primary memory. +This is a secondary effect, +because +simultaneous execution of a program +is not common. +It is ironic that this effect, +which reduces the use of primary memory, +only comes into play when there is +an overabundance of primary memory, +that is, +when there is enough memory +to keep waiting processes loaded. +.PP +All current read-only text segments in the +system are maintained from the +.IT "text table" . +A text table entry holds the location of the +text segment on secondary memory. +If the segment is loaded, +that table also holds the primary memory location +and the count of the number of processes +sharing this entry. +When this count is reduced to zero, +the entry is freed along with any +primary and secondary memory holding the segment. +When a process first executes a shared-text segment, +a text table entry is allocated and the +segment is loaded onto secondary memory. +If a second process executes a text segment +that is already allocated, +the entry reference count is simply incremented. +.PP +A user process has some strictly private +read-write data +contained in its +data segment. +As far as possible, +the system does not use the user's +data segment to hold system data. +In particular, +there are no I/O buffers in the +user address space. +.PP +The user data segment has two growing boundaries. +One, increased automatically by the system +as a result of memory faults, +is used for a stack. +The second boundary is only grown (or shrunk) by +explicit requests. +The contents of newly allocated primary memory +is initialized to zero. +.PP +Also associated and swapped with +a process is a small fixed-size +system data segment. +This segment contains all +the data about the process +that the system needs only when the +process is active. +Examples of the kind of data contained +in the system data segment are: +saved central processor registers, +open file descriptors, +accounting information, +scratch data area, +and the stack for the system phase +of the process. +The system data segment is not +addressable from the user process +and is therefore protected. +.PP +Last, +there is a process table with +one entry per process. +This entry contains all the data +needed by the system when the process +is +.IT not +active. +Examples are +the process's name, +the location of the other segments, +and scheduling information. +The process table entry is allocated +when the process is created, and freed +when the process terminates. +This process entry is always directly +addressable by the kernel. +.PP +Figure 1 shows the relationships +between the various process control +data. +In a sense, +the process table is the +definition of all processes, +because +all the data associated with a process +may be accessed +starting from the process table entry. +.KS +.sp 2.44i +.sp 2v +.ce +Fig. 1\(emProcess control data structure. +.KE +.NH 2 +Process creation and program execution +.PP +Processes are created by the system primitive +.UL fork . +The newly created process (child) is a copy of the original process (parent). +There is no detectable sharing of primary memory between the two processes. +(Of course, +if the parent process was executing from a read-only +text segment, +the child will share the text segment.) +Copies of all writable data segments +are made for the child process. +Files that were open before the +.UL fork +are +truly shared after the +.UL fork . +The processes are informed as to their part in the +relationship to +allow them to select their own +(usually non-identical) +destiny. +The parent may +.UL wait +for the termination of +any of its children. +.PP +A process may +.UL exec +a file. +This consists of exchanging the current text and data +segments of the process for new text and data +segments specified in the file. +The old segments are lost. +Doing an +.UL exec +does +.IT not +change processes; +the process that did the +.UL exec +persists, +but +after the +.UL exec +it is executing a different program. +Files that were open +before the +.UL exec +remain open after the +.UL exec . +.PP +If a program, +say the first pass of a compiler, +wishes to overlay itself with another program, +say the second pass, +then it simply +.UL exec s +the second program. +This is analogous +to a ``goto.'' +If a program wishes to regain control +after +.UL exec ing +a second program, +it should +.UL fork +a child process, +have the child +.UL exec +the second program, and +have the parent +.UL wait +for the child. +This is analogous to a ``call.'' +Breaking up the call into a binding followed by +a transfer is similar to the subroutine linkage in +SL-5. +.[ +griswold hanson sl5 overview +.] +.NH 2 +Swapping +.PP +The major data associated with a process +(the user data segment, +the system data segment, and +the text segment) +are swapped to and from secondary +memory, as needed. +The user data segment and the system data segment +are kept in contiguous primary memory to reduce +swapping latency. +(When low-latency devices, such as bubbles, +.UC CCD s, +or scatter/gather devices, +are used, +this decision will have to be reconsidered.) +Allocation of both primary +and secondary memory is performed +by the same simple first-fit algorithm. +When a process grows, +a new piece of primary memory is allocated. +The contents of the old memory is copied to the new memory. +The old memory is freed +and the tables are updated. +If there is not enough primary memory, +secondary memory is allocated instead. +The process is swapped out onto the +secondary memory, +ready to be swapped in with +its new size. +.PP +One separate process in the kernel, +the swapping process, +simply swaps the other +processes in and out of primary memory. +It examines the +process table looking for a process +that is swapped out and is +ready to run. +It allocates primary memory for that +process and +reads its segments into +primary memory, where that process competes for the +central processor with other loaded processes. +If no primary memory is available, +the swapping process makes memory available +by examining the process table for processes +that can be swapped out. +It selects a process to swap out, +writes it to secondary memory, +frees the primary memory, +and then goes back to look for a process +to swap in. +.PP +Thus there are two specific algorithms +to the swapping process. +Which of the possibly many processes that +are swapped out is to be swapped in? +This is decided by secondary storage residence +time. +The one with the longest time out is swapped in first. +There is a slight penalty for larger processes. +Which of the possibly many processes that +are loaded is to be swapped out? +Processes that are waiting for slow events +(i.e., not currently running or waiting for +disk I/O) +are picked first, +by age in primary memory, +again with size penalties. +The other processes are examined +by the same age algorithm, +but are not taken out unless they are +at least of some age. +This adds +hysteresis to the swapping and +prevents total thrashing. +.PP +These swapping algorithms are the +most suspect in the system. +With limited primary memory, +these algorithms cause total swapping. +This is not bad in itself, because +the swapping does not impact the +execution of the resident processes. +However, if the swapping device must +also be used for file storage, +the swapping traffic severely +impacts the file system traffic. +It is exactly these small systems +that tend to double usage of limited disk +resources. +.NH 2 +Synchronization and scheduling +.PP +Process synchronization is accomplished by having processes +wait for events. +Events are represented by arbitrary integers. +By convention, +events are chosen to be addresses of +tables associated with those events. +For example, a process that is waiting for +any of its children to terminate will wait +for an event that is the address of +its own process table entry. +When a process terminates, +it signals the event represented by +its parent's process table entry. +Signaling an event on which no process +is waiting has no effect. +Similarly, +signaling an event on which many processes +are waiting will wake all of them up. +This differs considerably from +Dijkstra's P and V +synchronization operations, +.[ +dijkstra sequential processes 1968 +.] +in that +no memory is associated with events. +Thus there need be no allocation of events +prior to their use. +Events exist simply by being used. +.PP +On the negative side, +because there is no memory associated with events, +no notion of ``how much'' +can be signaled via the event mechanism. +For example, +processes that want memory might +wait on an event associated with +memory allocation. +When any amount of memory becomes available, +the event would be signaled. +All the competing processes would then wake +up to fight over the new memory. +(In reality, +the swapping process is the only process +that waits for primary memory to become available.) +.PP +If an event occurs +between the time a process decides +to wait for that event and the +time that process enters the wait state, +then +the process will wait on an event that has +already happened (and may never happen again). +This race condition happens because there is no memory associated with +the event to indicate that the event has occurred; +the only action of an event is to change a set of processes +from wait state to run state. +This problem is relieved largely +by the fact that process switching can +only occur in the kernel by explicit calls +to the event-wait mechanism. +If the event in question is signaled by another +process, +then there is no problem. +But if the event is signaled by a hardware +interrupt, +then special care must be taken. +These synchronization races pose the biggest +problem when +.UX +is adapted to multiple-processor configurations. +.[ +hawley meyer multiprocessing unix +.] +.PP +The event-wait code in the kernel +is like a co-routine linkage. +At any time, +all but one of the processes has called event-wait. +The remaining process is the one currently executing. +When it calls event-wait, +a process whose event has been signaled +is selected and that process +returns from its call to event-wait. +.PP +Which of the runable processes is to run next? +Associated with each process is a priority. +The priority of a system process is assigned by the code +issuing the wait on an event. +This is roughly equivalent to the response +that one would expect on such an event. +Disk events have high priority, +teletype events are low, +and time-of-day events are very low. +(From observation, +the difference in system process priorities +has little or no performance impact.) +All user-process priorities are lower than the +lowest system priority. +User-process priorities are assigned +by an algorithm based on the +recent ratio of the amount of compute time to real time consumed +by the process. +A process that has used a lot of +compute time in the last real-time +unit is assigned a low user priority. +Because interactive processes are characterized +by low ratios of compute to real time, +interactive response is maintained without any +special arrangements. +.PP +The scheduling algorithm simply picks +the process with the highest priority, +thus +picking all system processes first and +user processes second. +The compute-to-real-time ratio is updated +every second. +Thus, +all other things being equal, +looping user processes will be +scheduled round-robin with a +1-second quantum. +A high-priority process waking up will +preempt a running, low-priority process. +The scheduling algorithm has a very desirable +negative feedback character. +If a process uses its high priority +to hog the computer, +its priority will drop. +At the same time, if a low-priority +process is ignored for a long time, +its priority will rise. +.NH +I/O SYSTEM +.PP +The I/O system +is broken into two completely separate systems: +the block I/O system and the character I/O system. +In retrospect, +the names should have been ``structured I/O'' +and ``unstructured I/O,'' respectively; +while the term ``block I/O'' has some meaning, +``character I/O'' is a complete misnomer. +.PP +Devices are characterized by a major device number, +a minor device number, and +a class (block or character). +For each class, +there is an array of entry points into the device drivers. +The major device number is used to index the array +when calling the code for a particular device driver. +The minor device number is passed to the +device driver as an argument. +The minor number has no significance other +than that attributed to it by the driver. +Usually, +the driver uses the minor number to access +one of several identical physical devices. +.PP +The use of the array of entry points +(configuration table) +as the only connection between the +system code and the device drivers is +very important. +Early versions of the system had a much +less formal connection with the drivers, +so that it was extremely hard to handcraft +differently configured systems. +Now it is possible to create new +device drivers in an average of a few hours. +The configuration table in most cases +is created automatically by a program +that reads the system's parts list. +.NH 2 +Block I/O system +.PP +The model block I/O device consists +of randomly addressed, secondary +memory blocks of 512 bytes each. +The blocks are uniformly addressed +0, 1, .\|.\|. up to the size of the device. +The block device driver has the job of +emulating this model on a +physical device. +.PP +The block I/O devices are accessed +through a layer of buffering software. +The system maintains a list of buffers +(typically between 10 and 70) +each assigned a device name and +a device address. +This buffer pool constitutes a data cache +for the block devices. +On a read request, +the cache is searched for the desired block. +If the block is found, +the data are made available to the +requester without any physical I/O. +If the block is not in the cache, +the least recently used block in the cache is renamed, +the correct device driver is called to +fill up the renamed buffer, and then the +data are made available. +Write requests are handled in an analogous manner. +The correct buffer is found +and relabeled if necessary. +The write is performed simply by marking +the buffer as ``dirty.'' +The physical I/O is then deferred until +the buffer is renamed. +.PP +The benefits in reduction of physical I/O +of this scheme are substantial, +especially considering the file system implementation. +There are, +however, +some drawbacks. +The asynchronous nature of the +algorithm makes error reporting +and meaningful user error handling +almost impossible. +The cavalier approach to I/O error +handling in the +.UX +system is partly due to the asynchronous +nature of the block I/O system. +A second problem is in the delayed writes. +If the system stops unexpectedly, +it is almost certain that there is a +lot of logically complete, +but physically incomplete, +I/O in the buffers. +There is a system primitive to +flush all outstanding I/O activity +from the buffers. +Periodic use of this primitive helps, +but does not solve, the problem. +Finally, +the associativity in the buffers +can alter the physical I/O sequence +from that of the logical I/O sequence. +This means that there are times +when data structures on disk are inconsistent, +even though the software is careful +to perform I/O in the correct order. +On non-random devices, +notably magnetic tape, +the inversions of writes can be disastrous. +The problem with magnetic tapes is ``cured'' by +allowing only one outstanding write request +per drive. +.NH 2 +Character I/O system +.PP +The character I/O system consists of all +devices that do not fall into the block I/O model. +This includes the ``classical'' character devices +such as communications lines, paper tape, and +line printers. +It also includes magnetic tape and disks when +they are not used in a stereotyped way, +for example, 80-byte physical records on tape +and track-at-a-time disk copies. +In short, +the character I/O interface +means ``everything other than block.'' +I/O requests from the user are sent to the +device driver essentially unaltered. +The implementation of these requests is, of course, +up to the device driver. +There are guidelines and conventions +to help the implementation of +certain types of device drivers. +.NH 3 +Disk drivers +.PP +Disk drivers are implemented +with a queue of transaction records. +Each record holds a read/write flag, +a primary memory address, +a secondary memory address, and +a transfer byte count. +Swapping is accomplished by passing +such a record to the swapping device driver. +The block I/O interface is implemented by +passing such records with requests to +fill and empty system buffers. +The character I/O interface to the disk +drivers create a transaction record that +points directly into the user area. +The routine that creates this record also insures +that the user is not swapped during this +I/O transaction. +Thus by implementing the general disk driver, +it is possible to use the disk +as a block device, +a character device, and a swap device. +The only really disk-specific code in normal +disk drivers is the pre-sort of transactions to +minimize latency for a particular device, and +the actual issuing of the I/O request. +.NH 3 +Character lists +.PP +Real character-oriented devices may +be implemented using the common +code to handle character lists. +A character list is a queue of characters. +One routine puts a character on a queue. +Another gets a character from a queue. +It is also possible to ask how many +characters are currently on a queue. +Storage for all queues in the system comes +from a single common pool. +Putting a character on a queue will allocate +space from the common pool and link the +character onto the data structure defining the queue. +Getting a character from a queue returns +the corresponding space to the pool. +.PP +A typical character-output device +(paper tape punch, for example) +is implemented by passing characters +from the user onto a character queue until +some maximum number of characters is on the queue. +The I/O is prodded to start as +soon as there is anything on the queue +and, once started, +it is sustained by hardware completion interrupts. +Each time there is a completion interrupt, +the driver gets the next character from the queue +and sends it to the hardware. +The number of characters on the queue is checked and, +as the count falls through some intermediate level, +an event (the queue address) is signaled. +The process that is passing characters from +the user to the queue can be waiting on the event, and +refill the queue to its maximum +when the event occurs. +.PP +A typical character input device +(for example, a paper tape reader) +is handled in a very similar manner. +.PP +Another class of character devices is the terminals. +A terminal is represented by three +character queues. +There are two input queues (raw and canonical) +and an output queue. +Characters going to the output of a terminal +are handled by common code exactly as described +above. +The main difference is that there is also code +to interpret the output stream as +.UC ASCII +characters and to perform some translations, +e.g., escapes for deficient terminals. +Another common aspect of terminals is code +to insert real-time delay after certain control characters. +.PP +Input on terminals is a little different. +Characters are collected from the terminal and +placed on a raw input queue. +Some device-dependent code conversion and +escape interpretation is handled here. +When a line is complete in the raw queue, +an event is signaled. +The code catching this signal then copies a +line from the raw queue to a canonical queue +performing the character erase and line kill editing. +User read requests on terminals can be +directed at either the raw or canonical queues. +.NH 3 +Other character devices +.PP +Finally, +there are devices that fit no general category. +These devices are set up as character I/O drivers. +An example is a driver that reads and writes +unmapped primary memory as an I/O device. +Some devices are too +fast to be treated a character at time, +but do not fit the disk I/O mold. +Examples are fast communications lines and +fast line printers. +These devices either have their own buffers +or ``borrow'' block I/O buffers for a while and +then give them back. +.NH +THE FILE SYSTEM +.PP +In the +.UX +system, +a file is a (one-dimensional) array of bytes. +No other structure of files is implied by the +system. +Files are attached anywhere +(and possibly multiply) +onto a hierarchy of directories. +Directories are simply files that +users cannot write. +For a further discussion +of the external view of files and directories, +see Ref.\0 +.[ +ritchie thompson unix bstj 1978 +%Q This issue +.]. +.PP +The +.UX +file system is a disk data structure +accessed completely through +the block I/O system. +As stated before, +the canonical view of a ``disk'' is +a randomly addressable array of +512-byte blocks. +A file system breaks the disk into +four self-identifying regions. +The first block (address 0) +is unused by the file system. +It is left aside for booting procedures. +The second block (address 1) +contains the so-called ``super-block.'' +This block, +among other things, +contains the size of the disk and +the boundaries of the other regions. +Next comes the i-list, +a list of file definitions. +Each file definition is +a 64-byte structure, called an i-node. +The offset of a particular i-node +within the i-list is called its i-number. +The combination of device name +(major and minor numbers) and i-number +serves to uniquely name a particular file. +After the i-list, +and to the end of the disk, +come free storage blocks that +are available for the contents of files. +.PP +The free space on a disk is maintained +by a linked list of available disk blocks. +Every block in this chain contains a disk address +of the next block in the chain. +The remaining space contains the address of up to +50 disk blocks that are also free. +Thus with one I/O operation, +the system obtains 50 free blocks and a +pointer where to find more. +The disk allocation algorithms are +very straightforward. +Since all allocation is in fixed-size +blocks and there is strict accounting of +space, +there is no need to compact or garbage collect. +However, +as disk space becomes dispersed, +latency gradually increases. +Some installations choose to occasionally compact +disk space to reduce latency. +.PP +An i-node contains 13 disk addresses. +The first 10 of these addresses point directly at +the first 10 blocks of a file. +If a file is larger than 10 blocks (5,120 bytes), +then the eleventh address points at a block +that contains the addresses of the next 128 blocks of the file. +If the file is still larger than this +(70,656 bytes), +then the twelfth block points at up to 128 blocks, +each pointing to 128 blocks of the file. +Files yet larger +(8,459,264 bytes) +use the thirteenth address for a ``triple indirect'' address. +The algorithm ends here with the maximum file size +of 1,082,201,087 bytes. +.PP +A logical directory hierarchy is added +to this flat physical structure simply +by adding a new type of file, the directory. +A directory is accessed exactly as an ordinary file. +It contains 16-byte entries consisting of +a 14-byte name and an i-number. +The root of the hierarchy is at a known i-number +(\fIviz.,\fR 2). +The file system structure allows an arbitrary, directed graph +of directories with regular files linked in +at arbitrary places in this graph. +In fact, +very early +.UX +systems used such a structure. +Administration of such a structure became so +chaotic that later systems were restricted +to a directory tree. +Even now, +with regular files linked multiply +into arbitrary places in the tree, +accounting for space has become a problem. +It may become necessary to restrict the entire +structure to a tree, +and allow a new form of linking that +is subservient to the tree structure. +.PP +The file system allows +easy creation, +easy removal, +easy random accessing, +and very easy space allocation. +With most physical addresses confined +to a small contiguous section of disk, +it is also easy to dump, restore, and +check the consistency of the file system. +Large files suffer from indirect addressing, +but the cache prevents most of the implied physical I/O +without adding much execution. +The space overhead properties of this scheme are quite good. +For example, +on one particular file system, +there are 25,000 files containing 130M bytes of data-file content. +The overhead (i-node, indirect blocks, and last block breakage) +is about 11.5M bytes. +The directory structure to support these files +has about 1,500 directories containing 0.6M bytes of directory content +and about 0.5M bytes of overhead in accessing the directories. +Added up any way, +this comes out to less than a 10 percent overhead for actual +stored data. +Most systems have this much overhead in +padded trailing blanks alone. +.NH 2 +File system implementation +.PP +Because the i-node defines a file, +the implementation of the file system centers +around access to the i-node. +The system maintains a table of all active +i-nodes. +As a new file is accessed, +the system locates the corresponding i-node, +allocates an i-node table entry, and reads +the i-node into primary memory. +As in the buffer cache, +the table entry is considered to be the current +version of the i-node. +Modifications to the i-node are made to +the table entry. +When the last access to the i-node goes +away, +the table entry is copied back to the +secondary store i-list and the table entry is freed. +.PP +All I/O operations on files are carried out +with the aid of the corresponding i-node table entry. +The accessing of a file is a straightforward +implementation of the algorithms mentioned previously. +The user is not aware of i-nodes and i-numbers. +References to the file system are made in terms of +path names of the directory tree. +Converting a path name into an i-node table entry +is also straightforward. +Starting at some known i-node +(the root or the current directory of some process), +the next component of the path name is +searched by reading the directory. +This gives an i-number and an implied device +(that of the directory). +Thus the next i-node table entry can be accessed. +If that was the last component of the path name, +then this i-node is the result. +If not, +this i-node is the directory needed to look up +the next component of the path name, and the +algorithm is repeated. +.PP +The user process accesses the file system with +certain primitives. +The most common of these are +.UL open , +.UL create , +.UL read , +.UL write , +.UL seek , +and +.UL close . +The data structures maintained are shown in Fig. 2. +.KS +.sp 22P +.ce +Fig. 2\(emFile system data structure. +.KE +In the system data segment associated with a user, +there is room for some (usually between 10 and 50) open files. +This open file table consists of pointers that can be used to access +corresponding i-node table entries. +Associated with each of these open files is +a current I/O pointer. +This is a byte offset of +the next read/write operation on the file. +The system treats each read/write request +as random with an implied seek to the +I/O pointer. +The user usually thinks of the file as +sequential with the I/O pointer +automatically counting the number of bytes +that have been read/written from the file. +The user may, +of course, +perform random I/O by setting the I/O pointer +before reads/writes. +.PP +With file sharing, +it is necessary to allow related +processes to share a common I/O pointer +and yet have separate I/O pointers +for independent processes +that access the same file. +With these two conditions, +the I/O pointer cannot reside +in the i-node table nor can +it reside in the list of +open files for the process. +A new table +(the open file table) +was invented for the sole purpose +of holding the I/O pointer. +Processes that share the same open +file +(the result of +.UL fork s) +share a common open file table entry. +A separate open of the same file will +only share the i-node table entry, +but will have distinct open file table entries. +.PP +The main file system primitives are implemented as follows. +.UL \&open +converts a file system path name into an i-node +table entry. +A pointer to the i-node table entry is placed in a +newly created open file table entry. +A pointer to the file table entry is placed in the +system data segment for the process. +.UL \&create +first creates a new i-node entry, +writes the i-number into a directory, and +then builds the same structure as for an +.UL open . +.UL \&read +and +.UL write +just access the i-node entry as described above. +.UL \&seek +simply manipulates the I/O pointer. +No physical seeking is done. +.UL \&close +just frees the structures built by +.UL open +and +.UL create . +Reference counts are kept on the open file table entries and +the i-node table entries to free these structures after +the last reference goes away. +.UL \&unlink +simply decrements the count of the +number of directories pointing at the given i-node. +When the last reference to an i-node table entry +goes away, +if the i-node has no directories pointing to it, +then the file is removed and the i-node is freed. +This delayed removal of files prevents +problems arising from removing active files. +A file may be removed while still open. +The resulting unnamed file vanishes +when the file is closed. +This is a method of obtaining temporary files. +.PP +There is a type of unnamed +.UC FIFO +file called a +.UL pipe. +Implementation of +.UL pipe s +consists of implied +.UL seek s +before each +.UL read +or +.UL write +in order to implement +first-in-first-out. +There are also checks and synchronization +to prevent the +writer from grossly outproducing the +reader and to prevent the reader from +overtaking the writer. +.NH 2 +Mounted file systems +.PP +The file system of a +.UX +system +starts with some designated block device +formatted as described above to contain +a hierarchy. +The root of this structure is the root of +the +.UX +file system. +A second formatted block device may be +mounted +at any leaf of +the current hierarchy. +This logically extends the current hierarchy. +The implementation of +mounting +is trivial. +A mount table is maintained containing +pairs of designated leaf i-nodes and +block devices. +When converting a path name into an i-node, +a check is made to see if the new i-node is a +designated leaf. +If it is, +the i-node of the root +of the block device replaces it. +.PP +Allocation of space for a file is taken +from the free pool on the device on which the +file lives. +Thus a file system consisting of many +mounted devices does not have a common pool of +free secondary storage space. +This separation of space on different +devices is necessary to allow easy +unmounting +of a device. +.NH 2 +Other system functions +.PP +There are some other things that the system +does for the user\-a +little accounting, +a little tracing/debugging, +and a little access protection. +Most of these things are not very +well developed +because our use of the system in computing science research +does not need them. +There are some features that are missed in some +applications, for example, better inter-process communication. +.PP +The +.UX +kernel is an I/O multiplexer more than +a complete operating system. +This is as it should be. +Because of this outlook, +many features are +found in most +other operating systems that are missing from the +.UX +kernel. +For example, +the +.UX +kernel does not support +file access methods, +file disposition, +file formats, +file maximum size, +spooling, +command language, +logical records, +physical records, +assignment of logical file names, +logical file names, +more than one character set, +an operator's console, +an operator, +log-in, +or log-out. +Many of these things are symptoms rather than features. +Many of these things are implemented +in user software +using the kernel as a tool. +A good example of this is the command language. +.[ +bourne shell 1978 bstj +%Q This issue +.] +Each user may have his own command language. +Maintenance of such code is as easy as +maintaining user code. +The idea of implementing ``system'' code with general +user primitives +comes directly from +.UC MULTICS . +.[ +organick multics 1972 +.] +.LP +.[ +$LIST$ +.] diff --git a/usr/doc/iosys b/usr/doc/iosys new file mode 100644 index 0000000000..512d30b8f6 --- /dev/null +++ b/usr/doc/iosys @@ -0,0 +1,1044 @@ +.TL +The UNIX I/O System +.AU +Dennis M. Ritchie +.AI +.MH +.PP +This paper gives an overview of the workings of the UNIX\(dg +.FS +\(dgUNIX is a Trademark of Bell Laboratories. +.FE +I/O system. +It was written with an eye toward providing +guidance to writers of device driver routines, +and is oriented more toward describing the environment +and nature of device drivers than the implementation +of that part of the file system which deals with +ordinary files. +.PP +It is assumed that the reader has a good knowledge +of the overall structure of the file system as discussed +in the paper ``The UNIX Time-sharing System.'' +A more detailed discussion +appears in +``UNIX Implementation;'' +the current document restates parts of that one, +but is still more detailed. +It is most useful in +conjunction with a copy of the system code, +since it is basically an exegesis of that code. +.SH +Device Classes +.PP +There are two classes of device: +.I block +and +.I character. +The block interface is suitable for devices +like disks, tapes, and DECtape +which work, or can work, with addressible 512-byte blocks. +Ordinary magnetic tape just barely fits in this category, +since by use of forward +and +backward spacing any block can be read, even though +blocks can be written only at the end of the tape. +Block devices can at least potentially contain a mounted +file system. +The interface to block devices is very highly structured; +the drivers for these devices share a great many routines +as well as a pool of buffers. +.PP +Character-type devices have a much +more straightforward interface, although +more work must be done by the driver itself. +.PP +Devices of both types are named by a +.I major +and a +.I minor +device number. +These numbers are generally stored as an integer +with the minor device number +in the low-order 8 bits and the major device number +in the next-higher 8 bits; +macros +.I major +and +.I minor +are available to access these numbers. +The major device number selects which driver will deal with +the device; the minor device number is not used +by the rest of the system but is passed to the +driver at appropriate times. +Typically the minor number +selects a subdevice attached to +a given controller, or one of +several similar hardware interfaces. +.PP +The major device numbers for block and character devices +are used as indices in separate tables; +they both start at 0 and therefore overlap. +.SH +Overview of I/O +.PP +The purpose of +the +.I open +and +.I creat +system calls is to set up entries in three separate +system tables. +The first of these is the +.I u_ofile +table, +which is stored in the system's per-process +data area +.I u. +This table is indexed by +the file descriptor returned by the +.I open +or +.I creat, +and is accessed during +a +.I read, +.I write, +or other operation on the open file. +An entry contains only +a pointer to the corresponding +entry of the +.I file +table, +which is a per-system data base. +There is one entry in the +.I file +table for each +instance of +.I open +or +.I creat. +This table is per-system because the same instance +of an open file must be shared among the several processes +which can result from +.I forks +after the file is opened. +A +.I file +table entry contains +flags which indicate whether the file +was open for reading or writing or is a pipe, and +a count which is used to decide when all processes +using the entry have terminated or closed the file +(so the entry can be abandoned). +There is also a 32-bit file offset +which is used to indicate where in the file the next read +or write will take place. +Finally, there is a pointer to the +entry for the file in the +.I inode +table, +which contains a copy of the file's i-node. +.PP +Certain open files can be designated ``multiplexed'' +files, and several other flags apply to such +channels. +In such a case, instead of an offset, +there is a pointer to an associated multiplex channel table. +Multiplex channels will not be discussed here. +.PP +An entry in the +.I file +table corresponds precisely to an instance of +.I open +or +.I creat; +if the same file is opened several times, +it will have several +entries in this table. +However, +there is at most one entry +in the +.I inode +table for a given file. +Also, a file may enter the +.I inode +table not only because it is open, +but also because it is the current directory +of some process or because it +is a special file containing a currently-mounted +file system. +.PP +An entry in the +.I inode +table differs somewhat from the +corresponding i-node as stored on the disk; +the modified and accessed times are not stored, +and the entry is augmented +by a flag word containing information about the entry, +a count used to determine when it may be +allowed to disappear, +and the device and i-number +whence the entry came. +Also, the several block numbers that give addressing +information for the file are expanded from +the 3-byte, compressed format used on the disk to full +.I long +quantities. +.PP +During the processing of an +.I open +or +.I creat +call for a special file, +the system always calls the device's +.I open +routine to allow for any special processing +required (rewinding a tape, turning on +the data-terminal-ready lead of a modem, etc.). +However, +the +.I close +routine is called only when the last +process closes a file, +that is, when the i-node table entry +is being deallocated. +Thus it is not feasible +for a device to maintain, or depend on, +a count of its users, although it is quite +possible to +implement an exclusive-use device which cannot +be reopened until it has been closed. +.PP +When a +.I read +or +.I write +takes place, +the user's arguments +and the +.I file +table entry are used to set up the +variables +.I u.u_base, +.I u.u_count, +and +.I u.u_offset +which respectively contain the (user) address +of the I/O target area, the byte-count for the transfer, +and the current location in the file. +If the file referred to is +a character-type special file, the appropriate read +or write routine is called; it is responsible +for transferring data and updating the +count and current location appropriately +as discussed below. +Otherwise, the current location is used to calculate +a logical block number in the file. +If the file is an ordinary file the logical block +number must be mapped (possibly using indirect blocks) +to a physical block number; a block-type +special file need not be mapped. +This mapping is performed by the +.I bmap +routine. +In any event, the resulting physical block number +is used, as discussed below, to +read or write the appropriate device. +.SH +Character Device Drivers +.PP +The +.I cdevsw +table specifies the interface routines present for +character devices. +Each device provides five routines: +open, close, read, write, and special-function +(to implement the +.I ioctl +system call). +Any of these may be missing. +If a call on the routine +should be ignored, +(e.g. +.I open +on non-exclusive devices that require no setup) +the +.I cdevsw +entry can be given as +.I nulldev; +if it should be considered an error, +(e.g. +.I write +on read-only devices) +.I nodev +is used. +For terminals, +the +.I cdevsw +structure also contains a pointer to the +.I tty +structure associated with the terminal. +.PP +The +.I open +routine is called each time the file +is opened with the full device number as argument. +The second argument is a flag which is +non-zero only if the device is to be written upon. +.PP +The +.I close +routine is called only when the file +is closed for the last time, +that is when the very last process in +which the file is open closes it. +This means it is not possible for the driver to +maintain its own count of its users. +The first argument is the device number; +the second is a flag which is non-zero +if the file was open for writing in the process which +performs the final +.I close. +.PP +When +.I write +is called, it is supplied the device +as argument. +The per-user variable +.I u.u_count +has been set to +the number of characters indicated by the user; +for character devices, this number may be 0 +initially. +.I u.u_base +is the address supplied by the user from which to start +taking characters. +The system may call the +routine internally, so the +flag +.I u.u_segflg +is supplied that indicates, +if +.I on, +that +.I u.u_base +refers to the system address space instead of +the user's. +.PP +The +.I write +routine +should copy up to +.I u.u_count +characters from the user's buffer to the device, +decrementing +.I u.u_count +for each character passed. +For most drivers, which work one character at a time, +the routine +.I "cpass( )" +is used to pick up characters +from the user's buffer. +Successive calls on it return +the characters to be written until +.I u.u_count +goes to 0 or an error occurs, +when it returns \(mi1. +.I Cpass +takes care of interrogating +.I u.u_segflg +and updating +.I u.u_count. +.PP +Write routines which want to transfer +a probably large number of characters into an internal +buffer may also use the routine +.I "iomove(buffer, offset, count, flag)" +which is faster when many characters must be moved. +.I Iomove +transfers up to +.I count +characters into the +.I buffer +starting +.I offset +bytes from the start of the buffer; +.I flag +should be +.I B_WRITE +(which is 0) in the write case. +Caution: +the caller is responsible for making sure +the count is not too large and is non-zero. +As an efficiency note, +.I iomove +is much slower if any of +.I "buffer+offset, count" +or +.I u.u_base +is odd. +.PP +The device's +.I read +routine is called under conditions similar to +.I write, +except that +.I u.u_count +is guaranteed to be non-zero. +To return characters to the user, the routine +.I "passc(c)" +is available; it takes care of housekeeping +like +.I cpass +and returns \(mi1 as the last character +specified by +.I u.u_count +is returned to the user; +before that time, 0 is returned. +.I Iomove +is also usable as with +.I write; +the flag should be +.I B_READ +but the same cautions apply. +.PP +The ``special-functions'' routine +is invoked by the +.I stty +and +.I gtty +system calls as follows: +.I "(*p) (dev, v)" +where +.I p +is a pointer to the device's routine, +.I dev +is the device number, +and +.I v +is a vector. +In the +.I gtty +case, +the device is supposed to place up to 3 words of status information +into the vector; this will be returned to the caller. +In the +.I stty +case, +.I v +is 0; +the device should take up to 3 words of +control information from +the array +.I "u.u_arg[0...2]." +.PP +Finally, each device should have appropriate interrupt-time +routines. +When an interrupt occurs, it is turned into a C-compatible call +on the devices's interrupt routine. +The interrupt-catching mechanism makes +the low-order four bits of the ``new PS'' word in the +trap vector for the interrupt available +to the interrupt handler. +This is conventionally used by drivers +which deal with multiple similar devices +to encode the minor device number. +After the interrupt has been processed, +a return from the interrupt handler will +return from the interrupt itself. +.PP +A number of subroutines are available which are useful +to character device drivers. +Most of these handlers, for example, need a place +to buffer characters in the internal interface +between their ``top half'' (read/write) +and ``bottom half'' (interrupt) routines. +For relatively low data-rate devices, the best mechanism +is the character queue maintained by the +routines +.I getc +and +.I putc. +A queue header has the structure +.DS +struct { + int c_cc; /* character count */ + char *c_cf; /* first character */ + char *c_cl; /* last character */ +} queue; +.DE +A character is placed on the end of a queue by +.I "putc(c, &queue)" +where +.I c +is the character and +.I queue +is the queue header. +The routine returns \(mi1 if there is no space +to put the character, 0 otherwise. +The first character on the queue may be retrieved +by +.I "getc(&queue)" +which returns either the (non-negative) character +or \(mi1 if the queue is empty. +.PP +Notice that the space for characters in queues is +shared among all devices in the system +and in the standard system there are only some 600 +character slots available. +Thus device handlers, +especially write routines, must take +care to avoid gobbling up excessive numbers of characters. +.PP +The other major help available +to device handlers is the sleep-wakeup mechanism. +The call +.I "sleep(event, priority)" +causes the process to wait (allowing other processes to run) +until the +.I event +occurs; +at that time, the process is marked ready-to-run +and the call will return when there is no +process with higher +.I priority. +.PP +The call +.I "wakeup(event)" +indicates that the +.I event +has happened, that is, causes processes sleeping +on the event to be awakened. +The +.I event +is an arbitrary quantity agreed upon +by the sleeper and the waker-up. +By convention, it is the address of some data area used +by the driver, which guarantees that events +are unique. +.PP +Processes sleeping on an event should not assume +that the event has really happened; +they should check that the conditions which +caused them to sleep no longer hold. +.PP +Priorities can range from 0 to 127; +a higher numerical value indicates a less-favored +scheduling situation. +A distinction is made between processes sleeping +at priority less than the parameter +.I PZERO +and those at numerically larger priorities. +The former cannot +be interrupted by signals, although it +is conceivable that it may be swapped out. +Thus it is a bad idea to sleep with +priority less than PZERO on an event which might never occur. +On the other hand, calls to +.I sleep +with larger priority +may never return if the process is terminated by +some signal in the meantime. +Incidentally, it is a gross error to call +.I sleep +in a routine called at interrupt time, since the process +which is running is almost certainly not the +process which should go to sleep. +Likewise, none of the variables in the user area +``\fIu\fB.\fR'' +should be touched, let alone changed, by an interrupt routine. +.PP +If a device driver +wishes to wait for some event for which it is inconvenient +or impossible to supply a +.I wakeup, +(for example, a device going on-line, which does not +generally cause an interrupt), +the call +.I "sleep(&lbolt, priority) +may be given. +.I Lbolt +is an external cell whose address is awakened once every 4 seconds +by the clock interrupt routine. +.PP +The routines +.I "spl4( ), spl5( ), spl6( ), spl7( )" +are available to +set the processor priority level as indicated to avoid +inconvenient interrupts from the device. +.PP +If a device needs to know about real-time intervals, +then +.I "timeout(func, arg, interval) +will be useful. +This routine arranges that after +.I interval +sixtieths of a second, the +.I func +will be called with +.I arg +as argument, in the style +.I "(*func)(arg). +Timeouts are used, for example, +to provide real-time delays after function characters +like new-line and tab in typewriter output, +and to terminate an attempt to +read the 201 Dataphone +.I dp +if there is no response within a specified number +of seconds. +Notice that the number of sixtieths of a second is limited to 32767, +since it must appear to be positive, +and that only a bounded number of timeouts +can be going on at once. +Also, the specified +.I func +is called at clock-interrupt time, so it should +conform to the requirements of interrupt routines +in general. +.SH +The Block-device Interface +.PP +Handling of block devices is mediated by a collection +of routines that manage a set of buffers containing +the images of blocks of data on the various devices. +The most important purpose of these routines is to assure +that several processes that access the same block of the same +device in multiprogrammed fashion maintain a consistent +view of the data in the block. +A secondary but still important purpose is to increase +the efficiency of the system by +keeping in-core copies of blocks that are being +accessed frequently. +The main data base for this mechanism is the +table of buffers +.I buf. +Each buffer header contains a pair of pointers +.I "(b_forw, b_back)" +which maintain a doubly-linked list +of the buffers associated with a particular +block device, and a +pair of pointers +.I "(av_forw, av_back)" +which generally maintain a doubly-linked list of blocks +which are ``free,'' that is, +eligible to be reallocated for another transaction. +Buffers that have I/O in progress +or are busy for other purposes do not appear in this list. +The buffer header +also contains the device and block number to which the +buffer refers, and a pointer to the actual storage associated with +the buffer. +There is a word count +which is the negative of the number of words +to be transferred to or from the buffer; +there is also an error byte and a residual word +count used to communicate information +from an I/O routine to its caller. +Finally, there is a flag word +with bits indicating the status of the buffer. +These flags will be discussed below. +.PP +Seven routines constitute +the most important part of the interface with the +rest of the system. +Given a device and block number, +both +.I bread +and +.I getblk +return a pointer to a buffer header for the block; +the difference is that +.I bread +is guaranteed to return a buffer actually containing the +current data for the block, +while +.I getblk +returns a buffer which contains the data in the +block only if it is already in core (whether it is +or not is indicated by the +.I B_DONE +bit; see below). +In either case the buffer, and the corresponding +device block, is made ``busy,'' +so that other processes referring to it +are obliged to wait until it becomes free. +.I Getblk +is used, for example, +when a block is about to be totally rewritten, +so that its previous contents are +not useful; +still, no other process can be allowed to refer to the block +until the new data is placed into it. +.PP +The +.I breada +routine is used to implement read-ahead. +it is logically similar to +.I bread, +but takes as an additional argument the number of +a block (on the same device) to be read asynchronously +after the specifically requested block is available. +.PP +Given a pointer to a buffer, +the +.I brelse +routine +makes the buffer again available to other processes. +It is called, for example, after +data has been extracted following a +.I bread. +There are three subtly-different write routines, +all of which take a buffer pointer as argument, +and all of which logically release the buffer for +use by others and place it on the free list. +.I Bwrite +puts the +buffer on the appropriate device queue, +waits for the write to be done, +and sets the user's error flag if required. +.I Bawrite +places the buffer on the device's queue, but does not wait +for completion, so that errors cannot be reflected directly to +the user. +.I Bdwrite +does not start any I/O operation at all, +but merely marks +the buffer so that if it happens +to be grabbed from the free list to contain +data from some other block, the data in it will +first be written +out. +.PP +.I Bwrite +is used when one wants to be sure that +I/O takes place correctly, and that +errors are reflected to the proper user; +it is used, for example, when updating i-nodes. +.I Bawrite +is useful when more overlap is desired +(because no wait is required for I/O to finish) +but when it is reasonably certain that the +write is really required. +.I Bdwrite +is used when there is doubt that the write is +needed at the moment. +For example, +.I bdwrite +is called when the last byte of a +.I write +system call falls short of the end of a +block, on the assumption that +another +.I write +will be given soon which will re-use the same block. +On the other hand, +as the end of a block is passed, +.I bawrite +is called, since probably the block will +not be accessed again soon and one might as +well start the writing process as soon as possible. +.PP +In any event, notice that the routines +.I "getblk" +and +.I bread +dedicate the given block exclusively to the +use of the caller, and make others wait, +while one of +.I "brelse, bwrite, bawrite," +or +.I bdwrite +must eventually be called to free the block for use by others. +.PP +As mentioned, each buffer header contains a flag +word which indicates the status of the buffer. +Since they provide +one important channel for information between the drivers and the +block I/O system, it is important to understand these flags. +The following names are manifest constants which +select the associated flag bits. +.IP B_READ 10 +This bit is set when the buffer is handed to the device strategy routine +(see below) to indicate a read operation. +The symbol +.I B_WRITE +is defined as 0 and does not define a flag; it is provided +as a mnemonic convenience to callers of routines like +.I swap +which have a separate argument +which indicates read or write. +.IP B_DONE 10 +This bit is set +to 0 when a block is handed to the the device strategy +routine and is turned on when the operation completes, +whether normally as the result of an error. +It is also used as part of the return argument of +.I getblk +to indicate if 1 that the returned +buffer actually contains the data in the requested block. +.IP B_ERROR 10 +This bit may be set to 1 when +.I B_DONE +is set to indicate that an I/O or other error occurred. +If it is set the +.I b_error +byte of the buffer header may contain an error code +if it is non-zero. +If +.I b_error +is 0 the nature of the error is not specified. +Actually no driver at present sets +.I b_error; +the latter is provided for a future improvement +whereby a more detailed error-reporting +scheme may be implemented. +.IP B_BUSY 10 +This bit indicates that the buffer header is not on +the free list, i.e. is +dedicated to someone's exclusive use. +The buffer still remains attached to the list of +blocks associated with its device, however. +When +.I getblk +(or +.I bread, +which calls it) searches the buffer list +for a given device and finds the requested +block with this bit on, it sleeps until the bit +clears. +.IP B_PHYS 10 +This bit is set for raw I/O transactions that +need to allocate the Unibus map on an 11/70. +.IP B_MAP 10 +This bit is set on buffers that have the Unibus map allocated, +so that the +.I iodone +routine knows to deallocate the map. +.IP B_WANTED 10 +This flag is used in conjunction with the +.I B_BUSY +bit. +Before sleeping as described +just above, +.I getblk +sets this flag. +Conversely, when the block is freed and the busy bit +goes down (in +.I brelse) +a +.I wakeup +is given for the block header whenever +.I B_WANTED +is on. +This strategem avoids the overhead +of having to call +.I wakeup +every time a buffer is freed on the chance that someone +might want it. +.IP B_AGE +This bit may be set on buffers just before releasing them; if it +is on, +the buffer is placed at the head of the free list, rather than at the +tail. +It is a performance heuristic +used when the caller judges that the same block will not soon be used again. +.IP B_ASYNC 10 +This bit is set by +.I bawrite +to indicate to the appropriate device driver +that the buffer should be released when the +write has been finished, usually at interrupt time. +The difference between +.I bwrite +and +.I bawrite +is that the former starts I/O, waits until it is done, and +frees the buffer. +The latter merely sets this bit and starts I/O. +The bit indicates that +.I relse +should be called for the buffer on completion. +.IP B_DELWRI 10 +This bit is set by +.I bdwrite +before releasing the buffer. +When +.I getblk, +while searching for a free block, +discovers the bit is 1 in a buffer it would otherwise grab, +it causes the block to be written out before reusing it. +.SH +Block Device Drivers +.PP +The +.I bdevsw +table contains the names of the interface routines +and that of a table for each block device. +.PP +Just as for character devices, block device drivers may supply +an +.I open +and a +.I close +routine +called respectively on each open and on the final close +of the device. +Instead of separate read and write routines, +each block device driver has a +.I strategy +routine which is called with a pointer to a buffer +header as argument. +As discussed, the buffer header contains +a read/write flag, the core address, +the block number, a (negative) word count, +and the major and minor device number. +The role of the strategy routine +is to carry out the operation as requested by the +information in the buffer header. +When the transaction is complete the +.I B_DONE +(and possibly the +.I B_ERROR) +bits should be set. +Then if the +.I B_ASYNC +bit is set, +.I brelse +should be called; +otherwise, +.I wakeup. +In cases where the device +is capable, under error-free operation, +of transferring fewer words than requested, +the device's word-count register should be placed +in the residual count slot of +the buffer header; +otherwise, the residual count should be set to 0. +This particular mechanism is really for the benefit +of the magtape driver; +when reading this device +records shorter than requested are quite normal, +and the user should be told the actual length of the record. +.PP +Although the most usual argument +to the strategy routines +is a genuine buffer header allocated as discussed above, +all that is actually required +is that the argument be a pointer to a place containing the +appropriate information. +For example the +.I swap +routine, which manages movement +of core images to and from the swapping device, +uses the strategy routine +for this device. +Care has to be taken that +no extraneous bits get turned on in the +flag word. +.PP +The device's table specified by +.I bdevsw +has a +byte to contain an active flag and an error count, +a pair of links which constitute the +head of the chain of buffers for the device +.I "(b_forw, b_back)," +and a first and last pointer for a device queue. +Of these things, all are used solely by the device driver +itself +except for the buffer-chain pointers. +Typically the flag encodes the state of the +device, and is used at a minimum to +indicate that the device is currently engaged in +transferring information and no new command should be issued. +The error count is useful for counting retries +when errors occur. +The device queue is used to remember stacked requests; +in the simplest case it may be maintained as a first-in +first-out list. +Since buffers which have been handed over to +the strategy routines are never +on the list of free buffers, +the pointers in the buffer which maintain the free list +.I "(av_forw, av_back)" +are also used to contain the pointers +which maintain the device queues. +.PP +A couple of routines +are provided which are useful to block device drivers. +.I "iodone(bp)" +arranges that the buffer to which +.I bp +points be released or awakened, +as appropriate, +when the +strategy module has finished with the buffer, +either normally or after an error. +(In the latter case the +.I B_ERROR +bit has presumably been set.) +.PP +The routine +.I "geterror(bp)" +can be used to examine the error bit in a buffer header +and arrange that any error indication found therein is +reflected to the user. +It may be called only in the non-interrupt +part of a driver when I/O has completed +.I (B_DONE +has been set). +.SH +Raw Block-device I/O +.PP +A scheme has been set up whereby block device drivers may +provide the ability to transfer information +directly between the user's core image and the device +without the use of buffers and in blocks as large as +the caller requests. +The method involves setting up a character-type special file +corresponding to the raw device +and providing +.I read +and +.I write +routines which set up what is usually a private, +non-shared buffer header with the appropriate information +and call the device's strategy routine. +If desired, separate +.I open +and +.I close +routines may be provided but this is usually unnecessary. +A special-function routine might come in handy, especially for +magtape. +.PP +A great deal of work has to be done to generate the +``appropriate information'' +to put in the argument buffer for +the strategy module; +the worst part is to map relocated user addresses to physical addresses. +Most of this work is done by +.I "physio(strat, bp, dev, rw) +whose arguments are the name of the +strategy routine +.I strat, +the buffer pointer +.I bp, +the device number +.I dev, +and a read-write flag +.I rw +whose value is either +.I B_READ +or +.I B_WRITE. +.I Physio +makes sure that the user's base address and count are +even (because most devices work in words) +and that the core area affected is contiguous +in physical space; +it delays until the buffer is not busy, and makes it +busy while the operation is in progress; +and it sets up user error return information. diff --git a/usr/doc/lex b/usr/doc/lex new file mode 100644 index 0000000000..02ebb2c155 --- /dev/null +++ b/usr/doc/lex @@ -0,0 +1,2310 @@ +.hc ~ +.bd I 2 +.de TS +.br +.nf +.SP 1v +.ul 0 +.. +.de TE +.SP 1v +.fi +.. +.de PT +.if \\n%>1 'tl ''\s7LEX\s0\s9\(mi%\s0'' +.if \\n%>1 'sp +.. +.ND July 21, 1975 +.RP +.TM 75-1274-15 39199 39199-11 +.TL +Lex \- A Lexical Analyzer ~Generator~ +.AU ``MH 2C-569'' 6377 +M. E. Lesk and E. Schmidt +.AI +.MH +.AB +.sp +.bd I 2 +.nr PS 8 +.nr VS 9 +.ps 8 +.vs 9p +Lex helps write programs whose control flow +is directed by instances of regular +expressions in the input stream. +It is well suited for editor-script type transformations and +for segmenting input in preparation for +a parsing routine. +.PP +Lex source is a table of regular expressions and corresponding program fragments. +The table is translated to a program +which reads an input stream, copying it to an output stream +and partitioning the input +into strings which match the given expressions. +As each such string is recognized the corresponding +program fragment is executed. +The recognition of the expressions +is performed by a deterministic finite automaton +generated by Lex. +The program fragments written by the user are executed in the order in which the +corresponding regular expressions occur in the input stream. +.if n .if \n(tm .ig +.PP +The lexical analysis +programs written with Lex accept ambiguous specifications +and choose the longest +match possible at each input point. +If necessary, substantial look~ahead +is performed on the input, but the +input stream will be backed up to the +end of the current partition, so that the user +has general freedom to manipulate it. +.PP +Lex can generate analyzers in either C or Ratfor, a language +which can be translated automatically to portable Fortran. +It is available on the PDP-11 UNIX, Honeywell GCOS, +and IBM OS systems. +This manual, however, will only discuss generating analyzers +in C on the UNIX system, which is the only supported +form of Lex under UNIX Version 7. +Lex is designed to simplify +interfacing with Yacc, for those +with access to this compiler-compiler system. +.. +.nr PS 9 +.nr VS 11 +.AE +.SH +.ce 1 +Table of Contents +.LP +.ce 100 +.TS +r 1l 2r . +1. Introduction. 1 +2. Lex Source. 3 +3. Lex Regular Expressions. 3 +4. Lex Actions. 5 +5. Ambiguous Source Rules. 7 +6. Lex Source Definitions. 8 +7. Usage. 8 +8. Lex and Yacc. 9 +9. Examples. 10 +10. Left Context Sensitivity. 11 +11. Character Set. 12 +12. Summary of Source Format. 12 +13. Caveats and Bugs. 13 +14. Acknowledgments. 13 +15. References. 13 +.TE +.ce 0 +.2C +.NH +Introduction. +.PP +Lex is a program generator designed for +lexical processing of character input streams. +It accepts a high-level, problem oriented specification +for character string matching, +and +produces a program in a general purpose language which recognizes +regular expressions. +The regular expressions are specified by the user in the +source specifications given to Lex. +The Lex written code recognizes these expressions +in an input stream and partitions the input stream into +strings matching the expressions. At the bound~aries +between strings +program sections +provided by the user are executed. +The Lex source file associates the regular expressions and the +program fragments. +As each expression appears in the input to the program written by Lex, +the corresponding fragment is executed. +.PP +.de MH +Bell Laboratories, Murray Hill, NJ 07974. +.. +The user supplies the additional code +beyond expression matching +needed to complete his tasks, possibly +including code written by other generators. +The program that recognizes the expressions is generated in the +general purpose programming language employed for the +user's program fragments. +Thus, a high level expression +language is provided to write the string expressions to be +matched while the user's freedom to write actions +is unimpaired. +This avoids forcing the user who wishes to use a string manipulation +language for input analysis to write processing programs in the same +and often inappropriate string handling language. +.PP +Lex is not a complete language, but rather a generator representing +a new language feature which can be added to +different programming languages, called ``host languages.'' +Just as general purpose languages +can produce code to run on different computer hardware, +Lex can write code in different host languages. +The host language is used for the output code generated by Lex +and also for the program fragments added by the user. +Compatible run-time libraries for the different host languages +are also provided. +This makes Lex adaptable to different environments and +different users. +Each application +may be directed to the combination of hardware and host language appropriate +to the task, the user's background, and the properties of local +implementations. +At present, the only supported host language is C, +although Fortran (in the form of Ratfor [2] has been available +in the past. +Lex itself exists on UNIX, GCOS, and OS/370; but the +code generated by Lex may be taken anywhere the appropriate +compilers exist. +.PP +Lex turns the user's expressions and actions +(called +.ul +source +in this memo) into the host general-purpose language; +the generated program is named +.ul +yylex. +The +.ul +yylex +program +will recognize expressions +in a stream +(called +.ul +input +in this memo) +and perform the specified actions for each expression as it is detected. +See Figure 1. +.GS +.TS +center; +l _ r +l|c|r +l _ r +l _ r +l|c|r +l _ r +c s s +c s s. + +Source \(-> Lex \(-> yylex + +.sp 2 + +Input \(-> yylex \(-> Output + +.sp +An overview of Lex +.sp +Figure 1 +.TE +.GE +.PP +For a trivial example, consider a program to delete +from the input +all blanks or tabs at the ends of lines. +.TS +center; +l l. +%% +[ \et]+$ ; +.TE +is all that is required. +The program +contains a %% delimiter to mark the beginning of the rules, and +one rule. +This rule contains a regular expression +which matches one or more +instances of the characters blank or tab +(written \et for visibility, in accordance with the C language convention) +just prior to the end of a line. +The brackets indicate the character +class made of blank and tab; the + indicates ``one or more ...''; +and the $ indicates ``end of line,'' as in QED. +No action is specified, +so the program generated by Lex (yylex) will ignore these characters. +Everything else will be copied. +To change any remaining +string of blanks or tabs to a single blank, +add another rule: +.TS +center; +l l. +%% +[ \et]+$ ; +[ \et]+ printf(" "); +.TE +The finite automaton generated for this +source will scan for both rules at once, +observing at +the termination of the string of blanks or tabs +whether or not there is a newline character, and executing +the desired rule action. +The first rule matches all strings of blanks or tabs +at the end of lines, and the second +rule all remaining strings of blanks or tabs. +.PP +Lex can be used alone for simple transformations, or +for analysis and statistics gathering on a lexical level. +Lex can also be used with a parser generator +to perform the lexical analysis phase; it is particularly +easy to interface Lex and Yacc [3]. +Lex programs recognize only regular expressions; +Yacc writes parsers that accept a large class of context free grammars, +but require a lower level analyzer to recognize input tokens. +Thus, a combination of Lex and Yacc is often appropriate. +When used as a preprocessor for a later parser generator, +Lex is used to partition the input stream, +and the parser generator assigns structure to +the resulting pieces. +The flow of control +in such a case (which might be the first half of a compiler, +for example) is shown in Figure 2. +Additional programs, +written by other generators +or by hand, can +be added easily to programs written by Lex. +.BS 2 +.TS +center; +l c c c l +l c c c l +l c c c l +l _ c _ l +l|c|c|c|l +l _ c _ l +l c c c l +l _ c _ l +l|c|c|c|l +l _ c _ l +l c s s l +l c s s l. + lexical grammar + rules rules + \(da \(da + + Lex Yacc + + \(da \(da + +Input \(-> yylex \(-> yyparse \(-> Parsed input + +.sp + Lex with Yacc +.sp + Figure 2 +.TE +.BE +Yacc users +will realize that the name +.ul +yylex +is what Yacc expects its lexical analyzer to be named, +so that the use of this name by Lex simplifies +interfacing. +.PP +Lex generates a deterministic finite automaton from the regular expressions +in the source [4]. +The automaton is interpreted, rather than compiled, in order +to save space. +The result is still a fast analyzer. +In particular, the time taken by a Lex program +to recognize and partition an input stream is +proportional to the length of the input. +The number of Lex rules or +the complexity of the rules is +not important in determining speed, +unless rules which include +forward context require a significant amount of re~scanning. +What does increase with the number and complexity of rules +is the size of the finite +automaton, and therefore the size of the program +generated by Lex. +.PP +In the program written by Lex, the user's fragments +(representing the +.ul +actions +to be performed as each regular expression +is found) +are gathered +as cases of a switch. +The automaton interpreter directs the control flow. +Opportunity is provided for the user to insert either +declarations or additional statements in the routine containing +the actions, or to +add subroutines outside this action routine. +.PP +Lex is not limited to source which can +be interpreted on the basis of one character +look~ahead. +For example, +if there are two rules, one looking for +.I ab +and another for +.I abcdefg , +and the input stream is +.I abcdefh , +Lex will recognize +.I ab +and leave +the input pointer just before +.I "cd. . ." +Such backup is more costly +than the processing of simpler languages. +.2C +.NH +Lex Source. +.PP +The general format of Lex source is: +.TS +center; +l. +{definitions} +%% +{rules} +%% +{user subroutines} +.TE +where the definitions and the user subroutines +are often omitted. +The second +.I %% +is optional, but the first is required +to mark the beginning of the rules. +The absolute minimum Lex program is thus +.TS +center; +l. +%% +.TE +(no definitions, no rules) which translates into a program +which copies the input to the output unchanged. +.PP +In the outline of Lex programs shown above, the +.I +rules +.R +represent the user's control +decisions; they are a table, in which the left column +contains +.I +regular expressions +.R +(see section 3) +and the right column contains +.I +actions, +.R +program fragments to be executed when the expressions +are recognized. +Thus an individual rule might appear +.TS +center; +l l. +integer printf("found keyword INT"); +.TE +to look for the string +.I integer +in the input stream and +print the message ``found keyword INT'' whenever it appears. +In this example the host procedural language is C and +the C library function +.I +printf +.R +is used to print the string. +The end +of the expression is indicated by the first blank or tab character. +If the action is merely a single C expression, +it can just be given on the right side of the line; if it is +compound, or takes more than a line, it should be enclosed in +braces. +As a slightly more useful example, suppose it is desired to +change a number of words from British to American spelling. +Lex rules such as +.TS +center; +l l. +colour printf("color"); +mechanise printf("mechanize"); +petrol printf("gas"); +.TE +would be a start. These rules are not quite enough, +since +the word +.I petroleum +would become +.I gaseum ; +a way of dealing +with this will be described later. +.2C +.NH +Lex Regular Expressions. +.PP +The definitions of regular expressions are very similar to those +in QED [5]. +A regular +expression specifies a set of strings to be matched. +It contains text characters (which match the corresponding +characters in the strings being compared) +and operator characters (which specify +repetitions, choices, and other features). +The letters of the alphabet and the digits are +always text characters; thus the regular expression +.TS +center; +l l. +integer +.TE +matches the string +.ul +integer +wherever it appears +and the expression +.TS +center; +l. +a57D +.TE +looks for the string +.ul +a57D. +.PP +.I +Operators. +.R +The operator characters are +.TS +center; +l. +" \e [ ] ^ \- ? . \(** + | ( ) $ / { } % < > +.TE +and if they are to be used as text characters, an escape +should be used. +The quotation mark operator (") +indicates that whatever is contained between a pair of quotes +is to be taken as text characters. +Thus +.TS +center; +l. +xyz"++" +.TE +matches the string +.I xyz++ +when it appears. Note that a part of a string may be quoted. +It is harmless but unnecessary to quote an ordinary +text character; the expression +.TS +center; +l. +"xyz++" +.TE +is the same as the one above. +Thus by quoting every non-alphanumeric character +being used as a text character, the user can avoid remembering +the list above of current +operator characters, and is safe should further extensions to Lex +lengthen the list. +.PP +An operator character may also be turned into a text character +by preceding it with \e as in +.TS +center; +l. +xyz\e+\e+ +.TE +which +is another, less readable, equivalent of the above expressions. +Another use of the quoting mechanism is to get a blank into +an expression; normally, as explained above, blanks or tabs end +a rule. +Any blank character not contained within [\|] (see below) must +be quoted. +Several normal C escapes with \e +are recognized: \en is newline, \et is tab, and \eb is backspace. +To enter \e itself, use \e\e. +Since newline is illegal in an expression, \en must be used; +it is not +required to escape tab and backspace. +Every character but blank, tab, newline and the list above is always +a text character. +.PP +.I +Character classes. +.R +Classes of characters can be specified using the operator pair [\|]. +The construction +.I [abc] +matches a +single character, which may be +.I a , +.I b , +or +.I c . +Within square brackets, +most operator meanings are ignored. +Only three characters are special: +these are \e \(mi and ^. The \(mi character +indicates ranges. For example, +.TS +center; +l. +[a\(miz0\(mi9<>_] +.TE +indicates the character class containing all the lower case letters, +the digits, +the angle brackets, and underline. +Ranges may be given in either order. +Using \(mi between any pair of characters which are +not both upper case letters, both lower case letters, or both digits +is implementation dependent and will get a warning message. +(E.g., [0\-z] in ASCII is many more characters +than it is in EBCDIC). +If it is desired to include the +character \(mi in a character class, it should be first or +last; thus +.TS +center; +l. +[\(mi+0\(mi9] +.TE +matches all the digits and the two signs. +.PP +In character classes, +the ^ operator must appear as the first character +after the left bracket; it indicates that the resulting string +is to be complemented with respect to the computer character set. +Thus +.TS +center; +l. +[^abc] +.TE +matches all characters except a, b, or c, including +all special or control characters; or +.TS +center; +l. +[^a\-zA\-Z] +.TE +is any character which is not a letter. +The \e character provides the usual escapes within +character class brackets. +.PP +.I +Arbitrary character. +.R +To match almost any character, the operator character +.TS +center; +l. +\&. +.TE +is the class of all characters except newline. +Escaping into octal is possible although non-portable: +.TS +center; +l. +[\e40\-\e176] +.TE +matches all printable characters in the ASCII character set, from octal +40 (blank) to octal 176 (tilde). +.PP +.I +Optional expressions. +.R +The operator +.I ? +indicates +an optional element of an expression. +Thus +.TS +center; +l. +ab?c +.TE +matches either +.I ac +or +.I abc . +.PP +.I +Repeated expressions. +.R +Repetitions of classes are indicated by the operators +.I \(** +and +.I + . +.TS +center; +l. +\f2a\(**\f1 +.TE +is any number of consecutive +.I a +characters, including zero; while +.TS +center; +l. +a+ +.TE +is one or more instances of +.I a. +For example, +.TS +center; +l. +[a\-z]+ +.TE +is all strings of lower case letters. +And +.TS +center; +l. +[A\(miZa\(miz][A\(miZa\(miz0\(mi9]\(** +.TE +indicates all alphanumeric strings with a leading +alphabetic character. +This is a typical expression for recognizing identifiers in +computer languages. +.PP +.I +Alternation and Grouping. +.R +The operator | +indicates alternation: +.TS +center; +l. +(ab\||\|cd) +.TE +matches either +.ul +ab +or +.ul +cd. +Note that parentheses are used for grouping, although +they are +not necessary on the outside level; +.TS +center; +l. +ab\||\|cd +.TE +would have sufficed. +Parentheses +can be used for more complex expressions: +.TS +center; +l. +(ab\||\|cd+)?(ef)\(** +.TE +matches such strings as +.I abefef , +.I efefef , +.I cdef , +or +.I cddd\| ; +but not +.I abc , +.I abcd , +or +.I abcdef . +.PP +.I +Context sensitivity. +.R +Lex will recognize a small amount of surrounding +context. The two simplest operators for this are +.I ^ +and +.I $ . +If the first character of an expression is +.I ^ , +the expression will only be matched at the beginning +of a line (after a newline character, or at the beginning of +the input stream). +This can never conflict with the other meaning of +.I ^ , +complementation +of character classes, since that only applies within +the [\|] operators. +If the very last character is +.I $ , +the expression will only be matched at the end of a line (when +immediately followed by newline). +The latter operator is a special case of the +.I / +operator character, +which indicates trailing context. +The expression +.TS +center; +l. +ab/cd +.TE +matches the string +.I ab , +but only if followed by +.ul +cd. +Thus +.TS +center; +l. +ab$ +.TE +is the same as +.TS +center; +l. +ab/\en +.TE +Left context is handled in Lex by +.I +start conditions +.R +as explained in section 10. If a rule is only to be executed +when the Lex automaton interpreter is in start condition +.I +x, +.R +the rule should be prefixed by +.TS +center; +l. + +.TE +using the angle bracket operator characters. +If we considered ``being at the beginning of a line'' to be +start condition +.I ONE , +then the ^ operator +would be equivalent to +.TS +center; +l. + +.TE +Start conditions are explained more fully later. +.PP +.I +Repetitions and Definitions. +.R +The operators {} specify +either repetitions (if they enclose numbers) +or +definition expansion (if they enclose a name). For example +.TS +center; +l. +{digit} +.TE +looks for a predefined string named +.I digit +and inserts it +at that point in the expression. +The definitions are given in the first part of the Lex +input, before the rules. +In contrast, +.TS +center; +l. +a{1,5} +.TE +looks for 1 to 5 occurrences of +.I a . +.PP +Finally, initial +.I % +is special, being the separator +for Lex source segments. +.2C +.NH +Lex Actions. +.PP +When an expression written as above is matched, Lex +executes the corresponding action. This section describes +some features of Lex which aid in writing actions. Note +that there is a default action, which +consists of copying the input to the output. This +is performed on all strings not otherwise matched. Thus +the Lex user who wishes to absorb the entire input, without +producing any output, must provide rules to match everything. +When Lex is being used with Yacc, this is the normal +situation. +One may consider that actions are what is done instead of +copying the input to the output; thus, in general, +a rule which merely copies can be omitted. +Also, a character combination +which is omitted from the rules +and which appears as input +is likely to be printed on the output, thus calling +attention to the gap in the rules. +.PP +One of the simplest things that can be done is to ignore +the input. Specifying a C null statement, \fI;\fR as an action +causes this result. A frequent rule is +.TS +center; +l l. +[ \et\en] ; +.TE +which causes the three spacing characters (blank, tab, and newline) +to be ignored. +.PP +Another easy way to avoid writing actions is the action character +|, which indicates that the action for this rule is the action +for the next rule. +The previous example could also have been written +.TS +center; +l l. +" " | +"\et" | +"\en" ; +.TE +with the same result, although in different style. +The quotes around \en and \et are not required. +.PP +In more complex actions, the user +will +often want to know the actual text that matched some expression +like +.I [a\(miz]+ . +Lex leaves this text in an external character +array named +.I +yytext. +.R +Thus, to print the name found, +a rule like +.TS +center; +l l. +[a\-z]+ printf("%s", yytext); +.TE +will print +the string in +.I +yytext. +.R +The C function +.I +printf +.R +accepts a format argument and data to be printed; +in this case, the format is ``print string'' (% indicating +data conversion, and +.I s +indicating string type), +and the data are the characters +in +.I +yytext. +.R +So this just places +the matched string +on the output. +This action +is so common that +it may be written as ECHO: +.TS +center; +l l. +[a\-z]+ ECHO; +.TE +is the same as the above. +Since the default action is just to +print the characters found, one might ask why +give a rule, like this one, which merely specifies +the default action? +Such rules are often required +to avoid matching some other rule +which is not desired. For example, if there is a rule +which matches +.I read +it will normally match the instances of +.I read +contained in +.I bread +or +.I readjust ; +to avoid +this, +a rule +of the form +.I [a\(miz]+ +is needed. +This is explained further below. +.PP +Sometimes it is more convenient to know the end of what +has been found; hence Lex also provides a count +.I +yyleng +.R +of the number of characters matched. +To count both the number +of words and the number of characters in words in the input, the user might write +.TS +center; +l l. +[a\-zA\-Z]+ {words++; chars += yyleng;} +.TE +which accumulates in +.ul +chars +the number +of characters in the words recognized. +The last character in the string matched can +be accessed by +.TS +center; +l. +yytext[yyleng\-1] +.TE +.PP +Occasionally, a Lex +action may decide that a rule has not recognized the correct +span of characters. +Two routines are provided to aid with this situation. +First, +.I +yymore() +.R +can be called to indicate that the next input expression recognized is to be +tacked on to the end of this input. Normally, +the next input string would overwrite the current +entry in +.I +yytext. +.R +Second, +.I +yyless (n) +.R +may be called to indicate that not all the characters matched +by the currently successful expression are wanted right now. +The argument +.I +n +.R +indicates the number of characters +in +.I +yytext +.R +to be retained. +Further characters previously matched +are +returned to the input. This provides the same sort of +look~ahead offered by the / operator, +but in a different form. +.PP +.I +Example: +.R +Consider a language which defines +a string as a set of characters between quotation (") marks, and provides that +to include a " in a string it must be preceded by a \e. The +regular expression which matches that is somewhat confusing, +so that it might be preferable to write +.TS +center; +l l. +\e"[^"]\(** { + if (yytext[yyleng\-1] == \(fm\e\e\(fm) + yymore(); + else + ... normal user processing + } +.TE +which will, when faced with a string such as +.I +"abc\e"def\|" +.R +first match +the five characters +\fI"abc\e\|\fR; +then +the call to +.I yymore() +will +cause the next part of the string, +\fI"def\|\fR, +to be tacked on the end. +Note that the final quote terminating the string should be picked +up in the code labeled ``normal processing''. +.PP +The function +.I +yyless() +.R +might be used to reprocess +text in various circumstances. Consider the C problem of distinguishing +the ambiguity of ``=\(mia''. +Suppose it is desired to treat this as ``=\(mi a'' +but print a message. A rule might be +.TS +center; +l l. +=\(mi[a\-zA\-Z] { + printf("Operator (=\(mi) ambiguous\en"); + yyless(yyleng\-1); + ... action for =\(mi ... + } +.TE +which prints a message, returns the letter after the +operator to the input stream, and treats the operator as ``=\(mi''. +Alternatively it might be desired to treat this as ``= \(mia''. +To do this, just return the minus +sign as well as the letter to the input: +.TS +center; +l l. +=\(mi[a\-zA\-Z] { + printf("Operator (=\(mi) ambiguous\en"); + yyless(yyleng\-2); + ... action for = ... + } +.TE +will perform the other interpretation. +Note that the expressions for the two cases might more easily +be written +.TS +center; +l l. +=\(mi/[A\-Za\-z] +.TE +in the first case and +.TS +center; +l. +=/\-[A\-Za\-z] +.TE +in the second; +no backup would be required in the rule action. +It is not necessary to recognize the whole identifier +to observe the ambiguity. +The +possibility of ``=\(mi3'', however, makes +.TS +center; +l. +=\(mi/[^ \et\en] +.TE +a still better rule. +.PP +In addition to these routines, Lex also permits +access to the I/O routines +it uses. +They are: +.IP 1) +.I +input() +.R +which returns the next input character; +.IP 2) +.I +output(c) +.R +which writes the character +.I +c +.R +on the output; and +.IP 3) +.I +unput(c) +.R +pushes the character +.I +c +.R +back onto the input stream to be read later by +.I +input(). +.R +.LP +By default these routines are provided as macro definitions, +but the user can override them and supply private versions. +These routines +define the relationship between external files and +internal characters, and must all be retained +or modified consistently. +They may be redefined, to +cause input or output to be transmitted to or from strange +places, including other programs or internal memory; +but the character set used must be consistent in all routines; +a value of zero returned by +.I +input +.R +must mean end of file; and +the relationship between +.I +unput +.R +and +.I +input +.R +must be retained +or the Lex look~ahead will not work. +Lex does not look ahead at all if it does not have to, +but every rule ending in +.ft I ++ \(** ? +.ft R +or +.ft I +$ +.ft R +or containing +.ft I +/ +.ft R +implies look~ahead. +Look~ahead is also necessary to match an expression that is a prefix +of another expression. +See below for a discussion of the character set used by Lex. +The standard Lex library imposes +a 100 character limit on backup. +.PP +Another Lex library routine that the user will sometimes want +to redefine is +.I +yywrap() +.R +which is called whenever Lex reaches an end-of-file. +If +.I +yywrap +.R +returns a 1, Lex continues with the normal wrapup on end of input. +Sometimes, however, it is convenient to arrange for more +input to arrive +from a new source. +In this case, the user should provide +a +.I +yywrap +.R +which +arranges for new input and +returns 0. This instructs Lex to continue processing. +The default +.I +yywrap +.R +always returns 1. +.PP +This routine is also a convenient place +to print tables, summaries, etc. at the end +of a program. Note that it is not +possible to write a normal rule which recognizes +end-of-file; the only access to this condition is +through +.I +yywrap. +.R +In fact, unless a private version of +.I +input() +.R +is supplied +a file containing nulls +cannot be handled, +since a value of 0 returned by +.I +input +.R +is taken to be end-of-file. +.PP +.2C +.NH +Ambiguous Source Rules. +.PP +Lex can handle ambiguous specifications. +When more than one expression can match the +current input, Lex chooses as follows: +.IP 1) +The longest match is preferred. +.IP 2) +Among rules which matched the same number of characters, +the rule given first is preferred. +.LP +Thus, suppose the rules +.TS +center; +l l. +integer keyword action ...; +[a\-z]+ identifier action ...; +.TE +to be given in that order. If the input is +.I integers , +it is taken as an identifier, because +.I [a\-z]+ +matches 8 characters while +.I integer +matches only 7. +If the input is +.I integer , +both rules match 7 characters, and +the keyword rule is selected because it was given first. +Anything shorter (e.g. \fIint\fR\|) will +not match the expression +.I integer +and so the identifier interpretation is used. +.PP +The principle of preferring the longest +match makes rules containing +expressions like +.I \&.\(** +dangerous. +For example, +.TS +center; +l. +\&\(fm.\(**\(fm +.TE +might seem a good way of recognizing +a string in single quotes. +But it is an invitation for the program to read far +ahead, looking for a distant +single quote. +Presented with the input +.TS +center; +l l. +\&\(fmfirst\(fm quoted string here, \(fmsecond\(fm here +.TE +the above expression will match +.TS +center; +l l. +\&\(fmfirst\(fm quoted string here, \(fmsecond\(fm +.TE +which is probably not what was wanted. +A better rule is of the form +.TS +center; +l. +\&\(fm[^\(fm\en]\(**\(fm +.TE +which, on the above input, will stop +after +.I \(fmfirst\(fm . +The consequences +of errors like this are mitigated by the fact +that the +.I \&. +operator will not match newline. +Thus expressions like +.I \&.\(** +stop on the +current line. +Don't try to defeat this with expressions like +.I [.\en]+ +or +equivalents; +the Lex generated program will try to read +the entire input file, causing +internal buffer overflows. +.PP +Note that Lex is normally partitioning +the input stream, not searching for all possible matches +of each expression. +This means that each character is accounted for +once and only once. +For example, suppose it is desired to +count occurrences of both \fIshe\fR and \fIhe\fR in an input text. +Some Lex rules to do this might be +.TS +center; +l l. +she s++; +he h++; +\en | +\&. ; +.TE +where the last two rules ignore everything besides \fIhe\fR and \fIshe\fR. +Remember that . does not include newline. +Since \fIshe\fR includes \fIhe\fR, Lex will normally +.I +not +.R +recognize +the instances of \fIhe\fR included in \fIshe\fR, +since once it has passed a \fIshe\fR those characters are gone. +.PP +Sometimes the user would like to override this choice. The action +REJECT +means ``go do the next alternative.'' +It causes whatever rule was second choice after the current +rule to be executed. +The position of the input pointer is adjusted accordingly. +Suppose the user really wants to count the included instances of \fIhe\fR: +.TS +center; +l l. +she {s++; REJECT;} +he {h++; REJECT;} +\en | +\&. ; +.TE +these rules are one way of changing the previous example +to do just that. +After counting each expression, it is rejected; whenever appropriate, +the other expression will then be counted. In this example, of course, +the user could note that \fIshe\fR includes \fIhe\fR but not +vice versa, and omit the REJECT action on \fIhe\fR; +in other cases, however, it +would not be possible a priori to tell +which input characters +were in both classes. +.PP +Consider the two rules +.TS +center; +l l. +a[bc]+ { ... ; REJECT;} +a[cd]+ { ... ; REJECT;} +.TE +If the input is +.I ab , +only the first rule matches, +and on +.I ad +only the second matches. +The input string +.I accb +matches the first rule for four characters +and then the second rule for three characters. +In contrast, the input +.I accd +agrees with +the second rule for four characters and then the first +rule for three. +.PP +In general, REJECT is useful whenever +the purpose of Lex is not to partition the input +stream but to detect all examples of some items +in the input, and the instances of these items +may overlap or include each other. +Suppose a digram table of the input is desired; +normally the digrams overlap, that is the word +.I the +is considered to contain +both +.I th +and +.I he . +Assuming a two-dimensional array named +.ul +digram +to be incremented, the appropriate +source is +.TS +center; +l l. +%% +[a\-z][a\-z] {digram[yytext[0]][yytext[1]]++; REJECT;} +. ; +\en ; +.TE +where the REJECT is necessary to pick up +a letter pair beginning at every character, rather than at every +other character. +.2C +.NH +Lex Source Definitions. +.PP +Remember the format of the Lex +source: +.TS +center; +l. +{definitions} +%% +{rules} +%% +{user routines} +.TE +So far only the rules have been described. The user needs +additional options, +though, to define variables for use in his program and for use +by Lex. +These can go either in the definitions section +or in the rules section. +.PP +Remember that Lex is turning the rules into a program. +Any source not intercepted by Lex is copied +into the generated program. There are three classes +of such things. +.IP 1) +Any line which is not part of a Lex rule or action +which begins with a blank or tab is copied into +the Lex generated program. +Such source input prior to the first %% delimiter will be external +to any function in the code; if it appears immediately after the first +%%, +it appears in an appropriate place for declarations +in the function written by Lex which contains the actions. +This material must look like program fragments, +and should precede the first Lex rule. +.IP +As a side effect of the above, lines which begin with a blank +or tab, and which contain a comment, +are passed through to the generated program. +This can be used to include comments in either the Lex source or +the generated code. The comments should follow the host +language convention. +.IP 2) +Anything included between lines containing +only +.I %{ +and +.I %} +is +copied out as above. The delimiters are discarded. +This format permits entering text like preprocessor statements that +must begin in column 1, +or copying lines that do not look like programs. +.IP 3) +Anything after the third %% delimiter, regardless of formats, etc., +is copied out after the Lex output. +.PP +Definitions intended for Lex are given +before the first %% delimiter. Any line in this section +not contained between %{ and %}, and begining +in column 1, is assumed to define Lex substitution strings. +The format of such lines is +.TS +center; +l l. +name translation +.TE +and it +causes the string given as a translation to +be associated with the name. +The name and translation +must be separated by at least one blank or tab, and the name must begin with a letter. +The translation can then be called out +by the {name} syntax in a rule. +Using {D} for the digits and {E} for an exponent field, +for example, might abbreviate rules to recognize numbers: +.TS +center; +l l. +D [0\-9] +E [DEde][\-+]?{D}+ +%% +{D}+ printf("integer"); +{D}+"."{D}\(**({E})? | +{D}\(**"."{D}+({E})? | +{D}+{E} printf("real"); +.TE +Note the first two rules for real numbers; +both require a decimal point and contain +an optional exponent field, +but the first requires at least one digit before the +decimal point and the second requires at least one +digit after the decimal point. +To correctly handle the problem +posed by a Fortran expression such as +.I 35.EQ.I , +which does not contain a real number, a context-sensitive +rule such as +.TS +center; +l l. +[0\-9]+/"."EQ printf("integer"); +.TE +could be used in addition to the normal rule for integers. +.PP +The definitions +section may also contain other commands, including the +selection of a host language, a character set table, +a list of start conditions, or adjustments to the default +size of arrays within Lex itself for larger source programs. +These possibilities +are discussed below under ``Summary of Source Format,'' +section 12. +.2C +.NH +Usage. +.PP +There are two steps in +compiling a Lex source program. +First, the Lex source must be turned into a generated program +in the host general purpose language. +Then this program must be compiled and loaded, usually with +a library of Lex subroutines. +The generated program +is on a file named +.I lex.yy.c . +The I/O library is defined in terms of the C standard +library [6]. +.PP +The C programs generated by Lex are slightly different +on OS/370, because the +OS compiler is less powerful than the UNIX or GCOS compilers, +and does less at compile time. +C programs generated on GCOS and UNIX are the same. +.PP +.I +UNIX. +.R +The library is accessed by the loader flag +.I \-ll . +So an appropriate +set of commands is +.KS +.in 5 +lex source +cc lex.yy.c \-ll +.in 0 +.KE +The resulting program is placed on the usual file +.I +a.out +.R +for later execution. +To use Lex with Yacc see below. +Although the default Lex I/O routines use the C standard library, +the Lex automata themselves do not do so; +if private versions of +.I +input, +output +.R +and +.I unput +are given, the library can be avoided. +.PP +.2C +.NH +Lex and Yacc. +.PP +If you want to use Lex with Yacc, note that what Lex writes is a program +named +.I +yylex(), +.R +the name required by Yacc for its analyzer. +Normally, the default main program on the Lex library +calls this routine, but if Yacc is loaded, and its main +program is used, Yacc will call +.I +yylex(). +.R +In this case each Lex rule should end with +.TS +center; +l. +return(token); +.TE +where the appropriate token value is returned. +An easy way to get access +to Yacc's names for tokens is to +compile the Lex output file as part of +the Yacc output file by placing the line +.TS +center; +l. +# include "lex.yy.c" +.TE +in the last section of Yacc input. +Supposing the grammar to be +named ``good'' and the lexical rules to be named ``better'' +the UNIX command sequence can just be: +.TS +center; +l. +yacc good +lex better +cc y.tab.c \-ly \-ll +.TE +The Yacc library (\-ly) should be loaded before the Lex library, +to obtain a main program which invokes the Yacc parser. +The generations of Lex and Yacc programs can be done in +either order. +.2C +.NH +Examples. +.PP +As a trivial problem, consider copying an input file while +adding 3 to every positive number divisible by 7. +Here is a suitable Lex source program +.TS +center; +l l. +%% + int k; +[0\-9]+ { + k = atoi(yytext); + if (k%7 == 0) + printf("%d", k+3); + else + printf("%d",k); + } +.TE +to do just that. +The rule [0\-9]+ recognizes strings of digits; +.I +atoi +.R +converts the digits to binary +and stores the result in +.ul +k. +The operator % (remainder) is used to check whether +.ul +k +is divisible by 7; if it is, +it is incremented by 3 as it is written out. +It may be objected that this program will alter such +input items as +.I 49.63 +or +.I X7 . +Furthermore, it increments the absolute value +of all negative numbers divisible by 7. +To avoid this, just add a few more rules after the active one, +as here: +.TS +center; +l l. +%% + int k; +\-?[0\-9]+ { + k = atoi(yytext); + printf("%d", k%7 == 0 ? k+3 : k); + } +\-?[0\-9.]+ ECHO; +[A-Za-z][A-Za-z0-9]+ ECHO; +.TE +Numerical strings containing +a ``.'' or preceded by a letter will be picked up by +one of the last two rules, and not changed. +The +.I if\-else +has been replaced by +a C conditional expression to save space; +the form +.ul +a?b:c +means ``if +.I a +then +.I b +else +.I c ''. +.PP +For an example of statistics gathering, here +is a program which histograms the lengths +of words, where a word is defined as a string of letters. +.TS +center; +l l. + int lengs[100]; +%% +[a\-z]+ lengs[yyleng]++; +\&. | +\en ; +%% +.T& +l s. +yywrap() +{ +int i; +printf("Length No. words\en"); +for(i=0; i<100; i++) + if (lengs[i] > 0) + printf("%5d%10d\en",i,lengs[i]); +return(1); +} +.TE +This program +accumulates the histogram, while producing no output. At the end +of the input it prints the table. +The final statement +.I +return(1); +.R +indicates that Lex is to perform wrapup. If +.I +yywrap +.R +returns zero (false) +it implies that further input is available +and the program is +to continue reading and processing. +To provide a +.I +yywrap +.R +that never +returns true causes an infinite loop. +.PP +As a larger example, +here are some parts of a program written by N. L. Schryer +to convert double precision Fortran to single precision Fortran. +Because Fortran does not distinguish upper and lower case letters, +this routine begins by defining a set of classes including +both cases of each letter: +.TS +center; +l l. +a [aA] +b [bB] +c [cC] +\&... +z [zZ] +.TE +An additional class recognizes white space: +.TS +center; +l l. +W [ \et]\(** +.TE +The first rule changes +``double precision'' to ``real'', or ``DOUBLE PRECISION'' to ``REAL''. +.TS +center; +l. +{d}{o}{u}{b}{l}{e}{W}{p}{r}{e}{c}{i}{s}{i}{o}{n} { + printf(yytext[0]==\(fmd\(fm? "real" : "REAL"); + } +.TE +Care is taken throughout this program to preserve the case +(upper or lower) +of the original program. +The conditional operator is used to +select the proper form of the keyword. +The next rule copies continuation card indications to +avoid confusing them with constants: +.TS +center; +l l. +^" "[^ 0] ECHO; +.TE +In the regular expression, the quotes surround the +blanks. +It is interpreted as +``beginning of line, then five blanks, then +anything but blank or zero.'' +Note the two different meanings of +.I ^ . +There follow some rules to change double precision +constants to ordinary floating constants. +.TS +center; +l. +[0\-9]+{W}{d}{W}[+\-]?{W}[0\-9]+ | +[0\-9]+{W}"."{W}{d}{W}[+\-]?{W}[0\-9]+ | +"."{W}[0\-9]+{W}{d}{W}[+\-]?{W}[0\-9]+ { + /\(** convert constants \(**/ + for(p=yytext; \(**p != 0; p++) + { + if (\(**p == \(fmd\(fm || \(**p == \(fmD\(fm) + \(**p=+ \(fme\(fm\- \(fmd\(fm; + ECHO; + } +.TE +After the floating point constant is recognized, it is +scanned by the +.ul +for +loop +to find the letter +.I d +or +.I D . +The program than adds +.c +.I \(fme\(fm\-\(fmd\(fm , +which converts +it to the next letter of the alphabet. +The modified constant, now single-precision, +is written out again. +There follow a series of names which must be respelled to remove +their initial \fId\fR. +By using the +array +.I +yytext +.R +the same action suffices for all the names (only a sample of +a rather long list is given here). +.TS +center; +l l. +{d}{s}{i}{n} | +{d}{c}{o}{s} | +{d}{s}{q}{r}{t} | +{d}{a}{t}{a}{n} | +\&... +{d}{f}{l}{o}{a}{t} printf("%s",yytext+1); +.TE +Another list of names must have initial \fId\fR changed to initial \fIa\fR: +.TS +center; +l l. +{d}{l}{o}{g} | +{d}{l}{o}{g}10 | +{d}{m}{i}{n}1 | +{d}{m}{a}{x}1 { + yytext[0] =+ \(fma\(fm \- \(fmd\(fm; + ECHO; + } +.TE +And one routine +must have initial \fId\fR changed to initial \fIr\fR: +.TS +center; +l l. +{d}1{m}{a}{c}{h} {yytext[0] =+ \(fmr\(fm \- \(fmd\(fm; + ECHO; + } +.TE +To avoid such names as \fIdsinx\fR being detected as instances +of \fIdsin\fR, some final rules pick up longer words as identifiers +and copy some surviving characters: +.TS +center; +l l. +[A\-Za\-z][A\-Za\-z0\-9]\(** | +[0\-9]+ | +\en | +\&. ECHO; +.TE +Note that this program is not complete; it +does not deal with the spacing problems in Fortran or +with the use of keywords as identifiers. +.br +.2C +.NH +Left Context Sensitivity. +.PP +Sometimes +it is desirable to have several sets of lexical rules +to be applied at different times in the input. +For example, a compiler preprocessor might distinguish +preprocessor statements and analyze them differently +from ordinary statements. +This requires +sensitivity +to prior context, and there are several ways of handling +such problems. +The \fI^\fR operator, for example, is a prior context operator, +recognizing immediately preceding left context just as \fI$\fR recognizes +immediately following right context. +Adjacent left context could be extended, to produce a facility similar to +that for adjacent right context, but it is unlikely +to be as useful, since often the relevant left context +appeared some time earlier, such as at the beginning of a line. +.PP +This section describes three means of dealing +with different environments: a simple use of flags, +when only a few rules change from one environment to another, +the use of +.I +start conditions +.R +on rules, +and the possibility of making multiple lexical analyzers all run +together. +In each case, there are rules which recognize the need to change the +environment in which the +following input text is analyzed, and set some parameter +to reflect the change. This may be a flag explicitly tested by +the user's action code; such a flag is the simplest way of dealing +with the problem, since Lex is not involved at all. +It may be more convenient, +however, +to have Lex remember the flags as initial conditions on the rules. +Any rule may be associated with a start condition. It will only +be recognized when Lex is in +that start condition. +The current start condition may be changed at any time. +Finally, if the sets of rules for the different environments +are very dissimilar, +clarity may be best achieved by writing several distinct lexical +analyzers, and switching from one to another as desired. +.PP +Consider the following problem: copy the input to the output, +changing the word \fImagic\fR to \fIfirst\fR on every line which began +with the letter \fIa\fR, changing \fImagic\fR to \fIsecond\fR on every line +which began with the letter \fIb\fR, and changing +\fImagic\fR to \fIthird\fR on every line which began +with the letter \fIc\fR. All other words and all other lines +are left unchanged. +.PP +These rules are so simple that the easiest way +to do this job is with a flag: +.TS +center; +l l. + int flag; +%% +^a {flag = \(fma\(fm; ECHO;} +^b {flag = \(fmb\(fm; ECHO;} +^c {flag = \(fmc\(fm; ECHO;} +\en {flag = 0 ; ECHO;} +magic { + switch (flag) + { + case \(fma\(fm: printf("first"); break; + case \(fmb\(fm: printf("second"); break; + case \(fmc\(fm: printf("third"); break; + default: ECHO; break; + } + } +.TE +should be adequate. +.PP +To handle the same problem with start conditions, each +start condition must be introduced to Lex in the definitions section +with a line reading +.TS +center; +l l. +%Start name1 name2 ... +.TE +where the conditions may be named in any order. +The word \fIStart\fR may be abbreviated to \fIs\fR or \fIS\fR. +The conditions may be referenced at the +head of a rule with the <> brackets: +.TS +center; +l. +expression +.TE +is a rule which is only recognized when Lex is in the +start condition \fIname1\fR. +To enter a start condition, +execute the action statement +.TS +center; +l. +BEGIN name1; +.TE +which changes the start condition to \fIname1\fR. +To resume the normal state, +.TS +center; +l. +BEGIN 0; +.TE +resets the initial condition +of the Lex automaton interpreter. +A rule may be active in several +start conditions: +.TS +center; +l. + +.TE +is a legal prefix. Any rule not beginning with the +<> prefix operator is always active. +.PP +The same example as before can be written: +.TS +center; +l l. +%START AA BB CC +%% +^a {ECHO; BEGIN AA;} +^b {ECHO; BEGIN BB;} +^c {ECHO; BEGIN CC;} +\en {ECHO; BEGIN 0;} +magic printf("first"); +magic printf("second"); +magic printf("third"); +.TE +where the logic is exactly the same as in the previous +method of handling the problem, but Lex does the work +rather than the user's code. +.2C +.NH +Character Set. +.PP +The programs generated by Lex handle +character I/O only through the routines +.I +input, +output, +.R +and +.I +unput. +.R +Thus the character representation +provided in these routines +is accepted by Lex and employed to return +values in +.I +yytext. +.R +For internal use +a character is represented as a small integer +which, if the standard library is used, +has a value equal to the integer value of the bit +pattern representing the character on the host computer. +Normally, the letter +.I a +is represented as the same form as the character constant +.I \(fma\(fm . +If this interpretation is changed, by providing I/O +routines which translate the characters, +Lex must be told about +it, by giving a translation table. +This table must be in the definitions section, +and must be bracketed by lines containing only +``%T''. +The table contains lines of the form +.TS +center; +l. +{integer} {character string} +.TE +which indicate the value associated with each character. +Thus the next example +.GS 2 +.TS +center; +l l. +%T + 1 Aa + 2 Bb +\&... +26 Zz +27 \en +28 + +29 \- +30 0 +31 1 +\&... +39 9 +%T +.TE +.sp +.ce 1 +Sample character table. +.GE +maps the lower and upper case letters together into the integers 1 through 26, +newline into 27, + and \- into 28 and 29, and the +digits into 30 through 39. +Note the escape for newline. +If a table is supplied, every character that is to appear either +in the rules or in any valid input must be included +in the table. +No character +may be assigned the number 0, and no character may be +assigned a bigger number than the size of the hardware character set. +.2C +.NH +Summary of Source Format. +.PP +The general form of a Lex source file is: +.TS +center; +l. +{definitions} +%% +{rules} +%% +{user subroutines} +.TE +The definitions section contains +a combination of +.IP 1) +Definitions, in the form ``name space translation''. +.IP 2) +Included code, in the form ``space code''. +.IP 3) +Included code, in the form +.TS +center; +l. +%{ +code +%} +.TE +.ns +.IP 4) +Start conditions, given in the form +.TS +center; +l. +%S name1 name2 ... +.TE +.ns +.IP 5) +Character set tables, in the form +.TS +center; +l. +%T +number space character-string +\&... +%T +.TE +.ns +.IP 6) +Changes to internal array sizes, in the form +.TS +center; +l. +%\fIx\fR\0\0\fInnn\fR +.TE +where \fInnn\fR is a decimal integer representing an array size +and \fIx\fR selects the parameter as follows: +.TS +center; +c c +c l. +Letter Parameter +p positions +n states +e tree nodes +a transitions +k packed character classes +o output array size +.TE +.LP +Lines in the rules section have the form ``expression action'' +where the action may be continued on succeeding +lines by using braces to delimit it. +.PP +Regular expressions in Lex use the following +operators: +.br +.TS +center; +l l. +x the character "x" +"x" an "x", even if x is an operator. +\ex an "x", even if x is an operator. +[xy] the character x or y. +[x\-z] the characters x, y or z. +[^x] any character but x. +\&. any character but newline. +^x an x at the beginning of a line. +x an x when Lex is in start condition y. +x$ an x at the end of a line. +x? an optional x. +x\(** 0,1,2, ... instances of x. +x+ 1,2,3, ... instances of x. +x|y an x or a y. +(x) an x. +x/y an x but only if followed by y. +{xx} the translation of xx from the definitions section. +x{m,n} \fIm\fR through \fIn\fR occurrences of x +.TE +.NH +Caveats and Bugs. +.PP +There are pathological expressions which +produce exponential growth of the tables when +converted to deterministic machines; +fortunately, they are rare. +.PP +REJECT does not rescan the input; instead it remembers the results of the previous +scan. This means that if a rule with trailing context is found, and +REJECT executed, the user +must not have used +.ul +unput +to change the characters forthcoming +from the input stream. +This is the only restriction on the user's ability to manipulate +the not-yet-processed input. +.PP +.2C +.NH +Acknowledgments. +.PP +As should +be obvious from the above, the outside of Lex +is patterned +on Yacc and the inside on Aho's string matching routines. +Therefore, both S. C. Johnson and A. V. Aho +are really originators +of much of Lex, +as well as debuggers of it. +Many thanks are due to both. +.PP +The code of the current version of Lex was designed, written, +and debugged by Eric Schmidt. +.SG MH-1274-MEL-unix +.sp 1 +.2C +.NH +References. +.SP 1v +.IP 1. +B. W. Kernighan and D. M. Ritchie, +.I +The C Programming Language, +.R +Prentice-Hall, N. J. (1978). +.IP 2. +B. W. Kernighan, +.I +Ratfor: A Preprocessor for a Rational Fortran, +.R +Software \- Practice and Experience, +\fB5\fR, pp. 395-496 (1975). +.IP 3. +S. C. Johnson, +.I +Yacc: Yet Another Compiler Compiler, +.R +Computing Science Technical Report No. 32, +1975, +.MH +.if \n(tm (also TM 75-1273-6) +.IP 4. +A. V. Aho and M. J. Corasick, +.I +Efficient String Matching: An Aid to Bibliographic Search, +.R +Comm. ACM +.B +18, +.R +333-340 (1975). +.IP 5. +B. W. Kernighan, D. M. Ritchie and K. L. Thompson, +.I +QED Text Editor, +.R +Computing Science Technical Report No. 5, +1972, +.MH +.IP 6. +D. M. Ritchie, +private communication. +See also +M. E. Lesk, +.I +The Portable C Library, +.R +Computing Science Technical Report No. 31, +.MH +.if \n(tm (also TM 75-1274-11) diff --git a/usr/doc/lint b/usr/doc/lint new file mode 100644 index 0000000000..d1f5819ad7 --- /dev/null +++ b/usr/doc/lint @@ -0,0 +1,1063 @@ +.RP +.ND "July 26, 1978" +.OK +Program Portability +Strong Type Checking +.TL +Lint, a C Program Checker +.AU "MH 2C-559" 3968 +S. C. Johnson +.AI +.MH +.AB +.PP +.I Lint +is a command which examines C source programs, +detecting +a number of bugs and obscurities. +It enforces the type rules of C more strictly than +the C compilers. +It may also be used to enforce a number of portability +restrictions involved in moving +programs between different machines and/or operating systems. +Another option detects a number of wasteful, or error prone, constructions +which nevertheless are, strictly speaking, legal. +.PP +.I Lint +accepts multiple input files and library specifications, and checks them for consistency. +.PP +The separation of function between +.I lint +and the C compilers has both historical and practical +rationale. +The compilers turn C programs into executable files rapidly +and efficiently. +This is possible in part because the +compilers do not do sophisticated +type checking, especially between +separately compiled programs. +.I Lint +takes a more global, leisurely view of the program, +looking much more carefully at the compatibilities. +.PP +This document discusses the use of +.I lint , +gives an overview of the implementation, and gives some hints on the +writing of machine independent C code. +.AE +.CS 10 2 12 0 0 5 +.SH +Introduction and Usage +.PP +Suppose there are two C +.[ +Kernighan Ritchie Programming Prentice 1978 +.] +source files, +.I file1. c +and +.I file2.c , +which are ordinarily compiled and loaded together. +Then the command +.DS +lint file1.c file2.c +.DE +produces messages describing inconsistencies and inefficiencies +in the programs. +The program enforces the typing rules of C +more strictly than the C compilers +(for both historical and practical reasons) +enforce them. +The command +.DS +lint \-p file1.c file2.c +.DE +will produce, in addition to the above messages, additional messages +which relate to the portability of the programs to other operating +systems and machines. +Replacing the +.B \-p +by +.B \-h +will produce messages about various error-prone or wasteful constructions +which, strictly speaking, are not bugs. +Saying +.B \-hp +gets the whole works. +.PP +The next several sections describe the major messages; +the document closes with sections +discussing the implementation and giving suggestions +for writing portable C. +An appendix gives a summary of the +.I lint +options. +.SH +A Word About Philosophy +.PP +Many of the facts which +.I lint +needs may be impossible to +discover. +For example, whether a given function in a program ever gets called +may depend on the input data. +Deciding whether +.I exit +is ever called is equivalent to solving the famous ``halting problem,'' known to be +recursively undecidable. +.PP +Thus, most of the +.I lint +algorithms are a compromise. +If a function is never mentioned, it can never be called. +If a function is mentioned, +.I lint +assumes it can be called; this is not necessarily so, but in practice is quite reasonable. +.PP +.I Lint +tries to give information with a high degree of relevance. +Messages of the form ``\fIxxx\fR might be a bug'' +are easy to generate, but are acceptable only in proportion +to the fraction of real bugs they uncover. +If this fraction of real bugs is too small, the messages lose their credibility +and serve merely to clutter up the output, +obscuring the more important messages. +.PP +Keeping these issues in mind, we now consider in more detail +the classes of messages which +.I lint +produces. +.SH +Unused Variables and Functions +.PP +As sets of programs evolve and develop, +previously used variables and arguments to +functions may become unused; +it is not uncommon for external variables, or even entire +functions, to become unnecessary, and yet +not be removed from the source. +These ``errors of commission'' rarely cause working programs to fail, but they are a source +of inefficiency, and make programs harder to understand +and change. +Moreover, information about such unused variables and functions can occasionally +serve to discover bugs; if a function does a necessary job, and +is never called, something is wrong! +.PP +.I Lint +complains about variables and functions which are defined but not otherwise +mentioned. +An exception is variables which are declared through explicit +.B extern +statements but are never referenced; thus the statement +.DS +extern float sin(\|); +.DE +will evoke no comment if +.I sin +is never used. +Note that this agrees with the semantics of the C compiler. +In some cases, these unused external declarations might be of some interest; they +can be discovered by adding the +.B \-x +flag to the +.I lint +invocation. +.PP +Certain styles of programming +require many functions to be written with similar interfaces; +frequently, some of the arguments may be unused +in many of the calls. +The +.B \-v +option is available to suppress the printing of +complaints about unused arguments. +When +.B \-v +is in effect, no messages are produced about unused +arguments except for those +arguments which are unused and also declared as +register arguments; this can be considered +an active (and preventable) waste of the register +resources of the machine. +.PP +There is one case where information about unused, or +undefined, variables is more distracting +than helpful. +This is when +.I lint +is applied to some, but not all, files out of a collection +which are to be loaded together. +In this case, many of the functions and variables defined +may not be used, and, conversely, +many functions and variables defined elsewhere may be used. +The +.B \-u +flag may be used to suppress the spurious messages which might otherwise appear. +.SH +Set/Used Information +.PP +.I Lint +attempts to detect cases where a variable is used before it is set. +This is very difficult to do well; +many algorithms take a good deal of time and space, +and still produce messages about perfectly valid programs. +.I Lint +detects local variables (automatic and register storage classes) +whose first use appears physically earlier in the input file than the first assignment to the variable. +It assumes that taking the address of a variable constitutes a ``use,'' since the actual use +may occur at any later time, in a data dependent fashion. +.PP +The restriction to the physical appearance of variables in the file makes the +algorithm very simple and quick to implement, +since the true flow of control need not be discovered. +It does mean that +.I lint +can complain about some programs which are legal, +but these programs would probably be considered bad on stylistic grounds (e.g. might +contain at least two \fBgoto\fR's). +Because static and external variables are initialized to 0, +no meaningful information can be discovered about their uses. +The algorithm deals correctly, however, with initialized automatic variables, and variables +which are used in the expression which first sets them. +.PP +The set/used information also permits recognition of those local variables which are set +and never used; these form a frequent source of inefficiencies, and may also be symptomatic of bugs. +.SH +Flow of Control +.PP +.I Lint +attempts to detect unreachable portions of the programs which it processes. +It will complain about unlabeled statements immediately following +\fBgoto\fR, \fBbreak\fR, \fBcontinue\fR, or \fBreturn\fR statements. +An attempt is made to detect loops which can never be left at the bottom, detecting the +special cases +\fBwhile\fR( 1 ) and \fBfor\fR(;;) as infinite loops. +.I Lint +also complains about loops which cannot be entered at the top; +some valid programs may have such loops, but at best they are bad style, +at worst bugs. +.PP +.I Lint +has an important area of blindness in the flow of control algorithm: +it has no way of detecting functions which are called and never return. +Thus, a call to +.I exit +may cause unreachable code which +.I lint +does not detect; the most serious effects of this are in the +determination of returned function values (see the next section). +.PP +One form of unreachable statement is not usually complained about by +.I lint; +a +.B break +statement that cannot be reached causes no message. +Programs generated by +.I yacc , +.[ +Johnson Yacc 1975 +.] +and especially +.I lex , +.[ +Lesk Lex +.] +may have literally hundreds of unreachable +.B break +statements. +The +.B \-O +flag in the C compiler will often eliminate the resulting object code inefficiency. +Thus, these unreached statements are of little importance, +there is typically nothing the user can do about them, and the +resulting messages would clutter up the +.I lint +output. +If these messages are desired, +.I lint +can be invoked with the +.B \-b +option. +.SH +Function Values +.PP +Sometimes functions return values which are never used; +sometimes programs incorrectly use function ``values'' +which have never been returned. +.I Lint +addresses this problem in a number of ways. +.PP +Locally, within a function definition, +the appearance of both +.DS +return( \fIexpr\fR ); +.DE +and +.DS +return ; +.DE +statements is cause for alarm; +.I lint +will give the message +.DS +function \fIname\fR contains return(e) and return +.DE +The most serious difficulty with this is detecting when a function return is implied +by flow of control reaching the end of the function. +This can be seen with a simple example: +.DS +.ta .5i 1i 1.5i +\fRf ( a ) { + if ( a ) return ( 3 ); + g (\|); + } +.DE +Notice that, if \fIa\fR tests false, \fIf\fR will call \fIg\fR and then return +with no defined return value; this will trigger a complaint from +.I lint . +If \fIg\fR, like \fIexit\fR, never returns, +the message will still be produced when in fact nothing is wrong. +.PP +In practice, some potentially serious bugs have been discovered by this feature; +it also accounts for a substantial fraction of the ``noise'' messages produced +by +.I lint . +.PP +On a global scale, +.I lint +detects cases where a function returns a value, but this value is sometimes, +or always, unused. +When the value is always unused, it may constitute an inefficiency in the function definition. +When the value is sometimes unused, it may represent bad style (e.g., not testing for +error conditions). +.PP +The dual problem, using a function value when the function does not return one, +is also detected. +This is a serious problem. +Amazingly, this bug has been observed on a couple of occasions +in ``working'' programs; the desired function value just happened to have been computed +in the function return register! +.SH +Type Checking +.PP +.I Lint +enforces the type checking rules of C more strictly than the compilers do. +The additional checking is in four major areas: +across certain binary operators and implied assignments, +at the structure selection operators, +between the definition and uses of functions, +and in the use of enumerations. +.PP +There are a number of operators which have an implied balancing between types of the operands. +The assignment, conditional ( ?\|: ), and relational operators +have this property; the argument +of a \fBreturn\fR statement, +and expressions used in initialization also suffer similar conversions. +In these operations, +\fBchar\fR, \fBshort\fR, \fBint\fR, \fBlong\fR, \fBunsigned\fR, \fBfloat\fR, and \fBdouble\fR types may be freely intermixed. +The types of pointers must agree exactly, +except that arrays of \fIx\fR's can, of course, be intermixed with pointers to \fIx\fR's. +.PP +The type checking rules also require that, in structure references, the +left operand of the \(em> be a pointer to structure, the left operand of the \fB.\fR +be a structure, and the right operand of these operators be a member +of the structure implied by the left operand. +Similar checking is done for references to unions. +.PP +Strict rules apply to function argument and return value +matching. +The types \fBfloat\fR and \fBdouble\fR may be freely matched, +as may the types \fBchar\fR, \fBshort\fR, \fBint\fR, and \fBunsigned\fR. +Also, pointers can be matched with the associated arrays. +Aside from this, all actual arguments must agree in type with their declared counterparts. +.PP +With enumerations, checks are made that enumeration variables or members are not mixed +with other types, or other enumerations, +and that the only operations applied are =, initialization, ==, !=, and function arguments and return values. +.SH +Type Casts +.PP +The type cast feature in C was introduced largely as an aid +to producing more portable programs. +Consider the assignment +.DS +p = 1 ; +.DE +where +.I p +is a character pointer. +.I Lint +will quite rightly complain. +Now, consider the assignment +.DS +p = (char \(**)1 ; +.DE +in which a cast has been used to +convert the integer to a character pointer. +The programmer obviously had a strong motivation +for doing this, and has clearly signaled his intentions. +It seems harsh for +.I lint +to continue to complain about this. +On the other hand, if this code is moved to another +machine, such code should be looked at carefully. +The +.B \-c +flag controls the printing of comments about casts. +When +.B \-c +is in effect, casts are treated as though they were assignments +subject to complaint; otherwise, all legal casts are passed without comment, +no matter how strange the type mixing seems to be. +.SH +Nonportable Character Use +.PP +On the PDP-11, characters are signed quantities, with a range +from \-128 to 127. +On most of the other C implementations, characters take on only positive +values. +Thus, +.I lint +will flag certain comparisons and assignments as being +illegal or nonportable. +For example, the fragment +.DS +char c; + ... +if( (c = getchar(\|)) < 0 ) .... +.DE +works on the PDP-11, but +will fail on machines where characters always take +on positive values. +The real solution is to declare +.I c +an integer, since +.I getchar +is actually returning +integer values. +In any case, +.I lint +will say +``nonportable character comparison''. +.PP +A similar issue arises with bitfields; when assignments +of constant values are made to bitfields, the field may +be too small to hold the value. +This is especially true because +on some machines bitfields are considered as signed +quantities. +While it may seem unintuitive to consider +that a two bit field declared of type +.B int +cannot hold the value 3, the problem disappears +if the bitfield is declared to have type +.B unsigned . +.SH +Assignments of longs to ints +.PP +Bugs may arise from the assignment of +.B long +to +an +.B int , +which loses accuracy. +This may happen in programs +which have been incompletely converted to use +.B typedefs . +When a +.B typedef +variable +is changed from \fBint\fR to \fBlong\fR, +the program can stop working because +some intermediate results may be assigned +to \fBints\fR, losing accuracy. +Since there are a number of legitimate reasons for +assigning \fBlongs\fR to \fBints\fR, the detection +of these assignments is enabled +by the +.B \-a +flag. +.SH +Strange Constructions +.PP +Several perfectly legal, but somewhat strange, constructions +are flagged by +.I lint; +the messages hopefully encourage better code quality, clearer style, and +may even point out bugs. +The +.B \-h +flag is used to enable these checks. +For example, in the statement +.DS +\(**p++ ; +.DE +the \(** does nothing; this provokes the message ``null effect'' from +.I lint . +The program fragment +.DS +unsigned x ; +if( x < 0 ) ... +.DE +is clearly somewhat strange; the +test will never succeed. +Similarly, the test +.DS +if( x > 0 ) ... +.DE +is equivalent to +.DS +if( x != 0 ) +.DE +which may not be the intended action. +.I Lint +will say ``degenerate unsigned comparison'' in these cases. +If one says +.DS +if( 1 != 0 ) .... +.DE +.I lint +will report +``constant in conditional context'', since the comparison +of 1 with 0 gives a constant result. +.PP +Another construction +detected by +.I lint +involves +operator precedence. +Bugs which arise from misunderstandings about the precedence +of operators can be accentuated by spacing and formatting, +making such bugs extremely hard to find. +For example, the statements +.DS +if( x&077 == 0 ) ... +.DE +or +.DS +x<\h'-.3m'<2 + 40 +.DE +probably do not do what was intended. +The best solution is to parenthesize such expressions, +and +.I lint +encourages this by an appropriate message. +.PP +Finally, when the +.B \-h +flag is in force +.I lint +complains about variables which are redeclared in inner blocks +in a way that conflicts with their use in outer blocks. +This is legal, but is considered by many (including the author) to +be bad style, usually unnecessary, and frequently a bug. +.SH +Ancient History +.PP +There are several forms of older syntax which are being officially +discouraged. +These fall into two classes, assignment operators and initialization. +.PP +The older forms of assignment operators (e.g., =+, =\-, . . . ) +could cause ambiguous expressions, such as +.DS +a =\-1 ; +.DE +which could be taken as either +.DS +a =\- 1 ; +.DE +or +.DS +a = \-1 ; +.DE +The situation is especially perplexing if this +kind of ambiguity arises as the result of a macro substitution. +The newer, and preferred operators (+=, \-=, etc. ) +have no such ambiguities. +To spur the abandonment of the older forms, +.I lint +complains about these old fashioned operators. +.PP +A similar issue arises with initialization. +The older language allowed +.DS +int x \fR1 ; +.DE +to initialize +.I x +to 1. +This also caused syntactic difficulties: for example, +.DS +int x ( \-1 ) ; +.DE +looks somewhat like the beginning of a function declaration: +.DS +int x ( y ) { . . . +.DE +and the compiler must read a fair ways past +.I x +in order to sure what the declaration really is.. +Again, the problem is even more perplexing when the +initializer involves a macro. +The current syntax places an equals sign between the +variable and the initializer: +.DS +int x = \-1 ; +.DE +This is free of any possible syntactic ambiguity. +.SH +Pointer Alignment +.PP +Certain pointer assignments may be reasonable on some machines, +and illegal on others, due entirely to +alignment restrictions. +For example, on the PDP-11, it is reasonable +to assign integer pointers to double pointers, since +double precision values may begin on any integer boundary. +On the Honeywell 6000, double precision values must begin +on even word boundaries; +thus, not all such assignments make sense. +.I Lint +tries to detect cases where pointers are assigned to other +pointers, and such alignment problems might arise. +The message ``possible pointer alignment problem'' +results from this situation whenever either the +.B \-p +or +.B \-h +flags are in effect. +.SH +Multiple Uses and Side Effects +.PP +In complicated expressions, the best order in which to evaluate +subexpressions may be highly machine dependent. +For example, on machines (like the PDP-11) in which the stack +runs backwards, function arguments will probably be best evaluated +from right-to-left; on machines with a stack running forward, +left-to-right seems most attractive. +Function calls embedded as arguments of other functions +may or may not be treated similarly to ordinary arguments. +Similar issues arise with other operators which have side effects, +such as the assignment operators and the increment and decrement operators. +.PP +In order that the efficiency of C on a particular machine not be +unduly compromised, the C language leaves the order +of evaluation of complicated expressions up to the +local compiler, and, in fact, the various C compilers have considerable +differences in the order in which they will evaluate complicated +expressions. +In particular, if any variable is changed by a side effect, and +also used elsewhere in the same expression, the result is explicitly undefined. +.PP +.I Lint +checks for the important special case where +a simple scalar variable is affected. +For example, the statement +.DS +\fIa\fR[\fIi\|\fR] = \fIb\fR[\fIi\fR++] ; +.DE +will draw the complaint: +.DS +warning: \fIi\fR evaluation order undefined +.DE +.SH +Implementation +.PP +.I Lint +consists of two programs and a driver. +The first program is a version of the +Portable C Compiler +.[ +Johnson Ritchie BSTJ Portability Programs System +.] +.[ +Johnson portable compiler 1978 +.] +which is the basis of the +IBM 370, Honeywell 6000, and Interdata 8/32 C compilers. +This compiler does lexical and syntax analysis on the input text, +constructs and maintains symbol tables, and builds trees for expressions. +Instead of writing an intermediate file which is passed to +a code generator, as the other compilers +do, +.I lint +produces an intermediate file which consists of lines of ascii text. +Each line contains an external variable name, +an encoding of the context in which it was seen (use, definition, declaration, etc.), +a type specifier, and a source file name and line number. +The information about variables local to a function or file +is collected +by accessing the symbol table, and examining the expression trees. +.PP +Comments about local problems are produced as detected. +The information about external names is collected +onto an intermediate file. +After all the source files and library descriptions have +been collected, the intermediate file is sorted +to bring all information collected about a given external +name together. +The second, rather small, program then reads the lines +from the intermediate file and compares all of the +definitions, declarations, and uses for consistency. +.PP +The driver controls this +process, and is also responsible for making the options available +to both passes of +.I lint . +.SH +Portability +.PP +C on the Honeywell and IBM systems is used, in part, to write system code for the host operating system. +This means that the implementation of C tends to follow local conventions rather than +adhere strictly to +.UX +system conventions. +Despite these differences, many C programs have been successfully moved to GCOS and the various IBM +installations with little effort. +This section describes some of the differences between the implementations, and +discusses the +.I lint +features which encourage portability. +.PP +Uninitialized external variables are treated differently in different +implementations of C. +Suppose two files both contain a declaration without initialization, such as +.DS +int a ; +.DE +outside of any function. +The +.UX +loader will resolve these declarations, and cause only a single word of storage +to be set aside for \fIa\fR. +Under the GCOS and IBM implementations, this is not feasible (for various stupid reasons!) +so each such declaration causes a word of storage to be set aside and called \fIa\fR. +When loading or library editing takes place, this causes fatal conflicts which prevent +the proper operation of the program. +If +.I lint +is invoked with the \fB\-p\fR flag, +it will detect such multiple definitions. +.PP +A related difficulty comes from the amount of information retained about external names during the +loading process. +On the +.UX +system, externally known names have seven significant characters, with the upper/lower +case distinction kept. +On the IBM systems, there are eight significant characters, but the case distinction +is lost. +On GCOS, there are only six characters, of a single case. +This leads to situations where programs run on the +.UX +system, but encounter loader +problems on the IBM or GCOS systems. +.I Lint +.B \-p +causes all external symbols to be mapped to one case and truncated to six characters, +providing a worst-case analysis. +.PP +A number of differences arise in the area of character handling: characters in the +.UX +system are eight bit ascii, while they are eight bit ebcdic on the IBM, and +nine bit ascii on GCOS. +Moreover, character strings go from high to low bit positions (``left to right'') +on GCOS and IBM, and low to high (``right to left'') on the PDP-11. +This means that code attempting to construct strings +out of character constants, or attempting to use characters as indices +into arrays, must be looked at with great suspicion. +.I Lint +is of little help here, except to flag multi-character character constants. +.PP +Of course, the word sizes are different! +This causes less trouble than might be expected, at least when +moving from the +.UX +system (16 bit words) to the IBM (32 bits) or GCOS (36 bits). +The main problems are likely to arise in shifting or masking. +C now supports a bit-field facility, which can be used to write much of +this code in a reasonably portable way. +Frequently, portability of such code can be enhanced by +slight rearrangements in coding style. +Many of the incompatibilities seem to have the flavor of writing +.DS +x &= 0177700 ; +.DE +to clear the low order six bits of \fIx\fR. +This suffices on the PDP-11, but fails badly on GCOS and IBM. +If the bit field feature cannot be used, the same effect can be obtained by +writing +.DS +x &= \(ap 077 ; +.DE +which will work on all these machines. +.PP +The right shift operator is arithmetic shift on the PDP-11, and logical shift on most +other machines. +To obtain a logical shift on all machines, the left operand can be +typed \fBunsigned\fR. +Characters are considered signed integers on the PDP-11, and unsigned on the other machines. +This persistence of the sign bit may be reasonably considered a bug in the PDP-11 hardware +which has infiltrated itself into the C language. +If there were a good way to discover the programs which would be affected, C could be changed; +in any case, +.I lint +is no help here. +.PP +The above discussion may have made the problem of portability seem +bigger than it in fact is. +The issues involved here are rarely subtle or mysterious, at least to the +implementor of the program, although they can involve some work to straighten out. +The most serious bar to the portability of +.UX +system utilities has been the inability to mimic +essential +.UX +system functions on the other systems. +The inability to seek to a random character position in a text file, or to establish a pipe +between processes, has involved far more rewriting +and debugging than any of the differences in C compilers. +On the other hand, +.I lint +has been very helpful +in moving the +.UX +operating system and associated +utility programs to other machines. +.SH +Shutting Lint Up +.PP +There are occasions when +the programmer is smarter than +.I lint . +There may be valid reasons for ``illegal'' type casts, +functions with a variable number of arguments, etc. +Moreover, as specified above, the flow of control information +produced by +.I lint +often has blind spots, causing occasional spurious +messages about perfectly reasonable programs. +Thus, some way of communicating with +.I lint , +typically to shut it up, is desirable. +.PP +The form which this mechanism should take is not at all clear. +New keywords would require current and old compilers to +recognize these keywords, if only to ignore them. +This has both philosophical and practical problems. +New preprocessor syntax suffers from similar problems. +.PP +What was finally done was to cause a number of words +to be recognized by +.I lint +when they were embedded in comments. +This required minimal preprocessor changes; +the preprocessor just had to agree to pass comments +through to its output, instead of deleting them +as had been previously done. +Thus, +.I lint +directives are invisible to the compilers, and +the effect on systems with the older preprocessors +is merely that the +.I lint +directives don't work. +.PP +The first directive is concerned with flow of control information; +if a particular place in the program cannot be reached, +but this is not apparent to +.I lint , +this can be asserted by the directive +.DS +/* NOTREACHED */ +.DE +at the appropriate spot in the program. +Similarly, if it is desired to turn off +strict type checking for +the next expression, the directive +.DS +/* NOSTRICT */ +.DE +can be used; the situation reverts to the +previous default after the next expression. +The +.B \-v +flag can be turned on for one function by the directive +.DS +/* ARGSUSED */ +.DE +Complaints about variable number of arguments in calls to a function +can be turned off by the directive +.DS +/* VARARGS */ +.DE +preceding the function definition. +In some cases, it is desirable to check the +first several arguments, and leave the later arguments unchecked. +This can be done by following the VARARGS keyword immediately +with a digit giving the number of arguments which should be checked; thus, +.DS +/* VARARGS2 */ +.DE +will cause the first two arguments to be checked, the others unchecked. +Finally, the directive +.DS +/* LINTLIBRARY */ +.DE +at the head of a file identifies this file as +a library declaration file; this topic is worth a +section by itself. +.SH +Library Declaration Files +.PP +.I Lint +accepts certain library directives, such as +.DS +\-ly +.DE +and tests the source files for compatibility with these libraries. +This is done by accessing library description files whose +names are constructed from the library directives. +These files all begin with the directive +.DS +/* LINTLIBRARY */ +.DE +which is followed by a series of dummy function +definitions. +The critical parts of these definitions +are the declaration of the function return type, +whether the dummy function returns a value, and +the number and types of arguments to the function. +The VARARGS and ARGSUSED directives can +be used to specify features of the library functions. +.PP +.I Lint +library files are processed almost exactly like ordinary +source files. +The only difference is that functions which are defined on a library file, +but are not used on a source file, draw no complaints. +.I Lint +does not simulate a full library search algorithm, +and complains if the source files contain a redefinition of +a library routine (this is a feature!). +.PP +By default, +.I lint +checks the programs it is given against a standard library +file, which contains descriptions of the programs which +are normally loaded when +a C program +is run. +When the +.B -p +flag is in effect, another file is checked containing +descriptions of the standard I/O library routines +which are expected to be portable across various machines. +The +.B -n +flag can be used to suppress all library checking. +.SH +Bugs, etc. +.PP +.I Lint +was a difficult program to write, partially +because it is closely connected with matters of programming style, +and partially because users usually don't notice bugs which cause +.I lint +to miss errors which it should have caught. +(By contrast, if +.I lint +incorrectly complains about something that is correct, the +programmer reports that immediately!) +.PP +A number of areas remain to be further developed. +The checking of structures and arrays is rather inadequate; +size +incompatibilities go unchecked, +and no attempt is made to match up structure and union +declarations across files. +Some stricter checking of the use of the +.B typedef +is clearly desirable, but what checking is appropriate, and how +to carry it out, is still to be determined. +.PP +.I Lint +shares the preprocessor with the C compiler. +At some point it may be appropriate for a +special version of the preprocessor to be constructed +which checks for things such as unused macro definitions, +macro arguments which have side effects which are +not expanded at all, or are expanded more than once, etc. +.PP +The central problem with +.I lint +is the packaging of the information which it collects. +There are many options which +serve only to turn off, or slightly modify, +certain features. +There are pressures to add even more of these options. +.PP +In conclusion, it appears that the general notion of having two +programs is a good one. +The compiler concentrates on quickly and accurately turning the +program text into bits which can be run; +.I lint +concentrates on issues +of portability, style, and efficiency. +.I Lint +can afford to be wrong, since incorrectness and over-conservatism +are merely annoying, not fatal. +The compiler can be fast since it knows that +.I lint +will cover its flanks. +Finally, the programmer can +concentrate at one stage +of the programming process solely on the algorithms, +data structures, and correctness of the +program, and then later retrofit, +with the aid of +.I lint , +the desirable properties of universality and portability. +.SG MH-1273-SCJ-unix +.bp +.[ +$LIST$ +.] +.bp +.SH +Appendix: Current Lint Options +.PP +The command currently has the form +.DS +lint\fR [\fB\-\fRoptions ] files... library-descriptors... +.DE +The options are +.IP \fBh\fR +Perform heuristic checks +.IP \fBp\fR +Perform portability checks +.IP \fBv\fR +Don't report unused arguments +.IP \fBu\fR +Don't report unused or undefined externals +.IP \fBb\fR +Report unreachable +.B break +statements. +.IP \fBx\fR +Report unused external declarations +.IP \fBa\fR +Report assignments of +.B long +to +.B int +or shorter. +.IP \fBc\fR +Complain about questionable casts +.IP \fBn\fR +No library checking is done +.IP \fBs\fR +Same as +.B h +(for historical reasons) diff --git a/usr/doc/m4 b/usr/doc/m4 new file mode 100644 index 0000000000..673dccadf8 --- /dev/null +++ b/usr/doc/m4 @@ -0,0 +1,929 @@ +.if n .ls 2 +.tr _\(em +.tr *\(** +.de UC +\&\\$3\s-1\\$1\\s0\&\\$2 +.. +.de IT +.if n .ul +\&\\$3\f2\\$1\fP\&\\$2 +.. +.de UL +.if n .ul +\&\\$3\f3\\$1\fP\&\\$2 +.. +.de P1 +.DS I 3n +.if n .ls 2 +.nf +.if n .ta 5 10 15 20 25 30 35 40 45 50 55 60 +.if t .ta .4i .8i 1.2i 1.6i 2i 2.4i 2.8i 3.2i 3.6i 4i 4.4i 4.8i 5.2i 5.6i +.if t .tr -\(mi|\(bv'\(fm^\(no*\(** +.tr `\(ga'\(aa +.if t .tr _\(ul +.ft 3 +.lg 0 +.. +.de P2 +.ps \\n(PS +.vs \\n(VSp +.ft R +.if n .ls 2 +.tr --||''^^!! +.if t .tr _\(em +.fi +.lg +.DE +.if t .tr _\(em +.. +.hw semi-colon +.hw estab-lished +.hy 14 +. \"2=not last lines; 4= no -xx; 8=no xx- +. \"special chars in programs +. \" start of text +.RP +.....TR 59 +.....TM 77-1273-6 39199 39199-11 +.ND "July 1, 1977" +.TL +The M4 Macro Processor +.AU "MH 2C-518" 6021 +Brian W. Kernighan +.AU "MH 2C-517" 3770 +Dennis M. Ritchie +.AI +.MH +.AB +.PP +M4 is a macro processor available on +.UX +and +.UC GCOS . +Its primary use has been as a +front end for Ratfor for those +cases where parameterless macros +are not adequately powerful. +It has also been used for languages as disparate as C and Cobol. +M4 is particularly suited for functional languages like Fortran, PL/I and C +since macros are specified in a functional notation. +.PP +M4 provides features seldom found even in much larger +macro processors, +including +.IP " \(bu" +arguments +.IP " \(bu" +condition testing +.IP " \(bu" +arithmetic capabilities +.IP " \(bu" +string and substring functions +.IP " \(bu" +file manipulation +.LP +.PP +This paper is a user's manual for M4. +.AE +.CS 6 0 6 0 0 1 +.if t .2C +.SH +Introduction +.PP +A macro processor is a useful way to enhance a programming language, +to make it more palatable +or more readable, +or to tailor it to a particular application. +The +.UL #define +statement in C +and the analogous +.UL define +in Ratfor +are examples of the basic facility provided by +any macro processor _ +replacement of text by other text. +.PP +The M4 macro processor is an extension of a macro processor called M3 +which was written by D. M. Ritchie +for the AP-3 minicomputer; +M3 was in turn based on a macro processor implemented for [1]. +Readers unfamiliar with the basic ideas of macro processing +may wish to read some of the discussion there. +.PP +M4 is a suitable front end for Ratfor and C, +and has also been used successfully with Cobol. +Besides the straightforward replacement of one string of text by another, +it provides +macros with arguments, +conditional macro expansion, +arithmetic, +file manipulation, +and some specialized string processing functions. +.PP +The basic operation of M4 +is to copy its input to its output. +As the input is read, however, each alphanumeric ``token'' +(that is, string of letters and digits) is checked. +If it is the name of a macro, +then the name of the macro is replaced by its defining text, +and the resulting string is pushed back onto the +input to be rescanned. +Macros may be called with arguments, in which case the arguments are collected +and substituted into the right places in the defining text +before it is rescanned. +.PP +M4 provides a collection of about twenty built-in +macros +which perform various useful operations; +in addition, the user can define new macros. +Built-ins and user-defined macros work exactly the same way, except that +some of the built-in macros have side effects +on the state of the process. +.SH +Usage +.PP +On +.UC UNIX , +use +.P1 +m4 [files] +.P2 +Each argument file is processed in order; +if there are no arguments, or if an argument +is `\-', +the standard input is read at that point. +The processed text is written on the standard output, +which may be captured for subsequent processing with +.P1 +m4 [files] >outputfile +.P2 +On +.UC GCOS , +usage is identical, but the program is called +.UL \&./m4 . +.SH +Defining Macros +.PP +The primary built-in function of M4 +is +.UL define , +which is used to define new macros. +The input +.P1 +define(name, stuff) +.P2 +causes the string +.UL name +to be defined as +.UL stuff . +All subsequent occurrences of +.UL name +will be replaced by +.UL stuff . +.UL name +must be alphanumeric and must begin with a letter +(the underscore \(ul counts as a letter). +.UL stuff +is any text that contains balanced parentheses; +it may stretch over multiple lines. +.PP +Thus, as a typical example, +.P1 +define(N, 100) + ... +if (i > N) +.P2 +defines +.UL N +to be 100, and uses this ``symbolic constant'' in a later +.UL if +statement. +.PP +The left parenthesis must immediately follow the word +.UL define , +to signal that +.UL define +has arguments. +If a macro or built-in name is not followed immediately by `(', +it is assumed to have no arguments. +This is the situation for +.UL N +above; +it is actually a macro with no arguments, +and thus when it is used there need be no (...) following it. +.PP +You should also notice that a macro name is only recognized as such +if it appears surrounded by non-alphanumerics. +For example, in +.P1 +define(N, 100) + ... +if (NNN > 100) +.P2 +the variable +.UL NNN +is absolutely unrelated to the defined macro +.UL N , +even though it contains a lot of +.UL N 's. +.PP +Things may be defined in terms of other things. +For example, +.P1 +define(N, 100) +define(M, N) +.P2 +defines both M and N to be 100. +.PP +What happens if +.UL N +is redefined? +Or, to say it another way, is +.UL M +defined as +.UL N +or as 100? +In M4, +the latter is true _ +.UL M +is 100, so even if +.UL N +subsequently changes, +.UL M +does not. +.PP +This behavior arises because +M4 expands macro names into their defining text as soon as it possibly can. +Here, that means that when the string +.UL N +is seen as the arguments of +.UL define +are being collected, it is immediately replaced by 100; +it's just as if you had said +.P1 +define(M, 100) +.P2 +in the first place. +.PP +If this isn't what you really want, there are two ways out of it. +The first, which is specific to this situation, +is to interchange the order of the definitions: +.P1 +define(M, N) +define(N, 100) +.P2 +Now +.UL M +is defined to be the string +.UL N , +so when you ask for +.UL M +later, you'll always get the value of +.UL N +at that time +(because the +.UL M +will be replaced by +.UL N +which will be replaced by 100). +.SH +Quoting +.PP +The more general solution is to delay the expansion of +the arguments of +.UL define +by +.ul +quoting +them. +Any text surrounded by the single quotes \(ga and \(aa +is not expanded immediately, but has the quotes stripped off. +If you say +.P1 +define(N, 100) +define(M, `N') +.P2 +the quotes around the +.UL N +are stripped off as the argument is being collected, +but they have served their purpose, and +.UL M +is defined as +the string +.UL N , +not 100. +The general rule is that M4 always strips off +one level of single quotes whenever it evaluates +something. +This is true even outside of +macros. +If you want the word +.UL define +to appear in the output, +you have to quote it in the input, +as in +.P1 + `define' = 1; +.P2 +.PP +As another instance of the same thing, which is a bit more surprising, +consider redefining +.UL N : +.P1 +define(N, 100) + ... +define(N, 200) +.P2 +Perhaps regrettably, the +.UL N +in the second definition is +evaluated as soon as it's seen; +that is, it is +replaced by +100, so it's as if you had written +.P1 +define(100, 200) +.P2 +This statement is ignored by M4, since you can only define things that look +like names, but it obviously doesn't have the effect you wanted. +To really redefine +.UL N , +you must delay the evaluation by quoting: +.P1 +define(N, 100) + ... +define(`N', 200) +.P2 +In M4, +it is often wise to quote the first argument of a macro. +.PP +If \` and \' are not convenient for some reason, +the quote characters can be changed with the built-in +.UL changequote : +.P1 +changequote([, ]) +.P2 +makes the new quote characters the left and right brackets. +You can restore the original characters with just +.P1 +changequote +.P2 +.PP +There are two additional built-ins related to +.UL define . +.UL undefine +removes the definition of some macro or built-in: +.P1 +undefine(`N') +.P2 +removes the definition of +.UL N . +(Why are the quotes absolutely necessary?) +Built-ins can be removed with +.UL undefine , +as in +.P1 +undefine(`define') +.P2 +but once you remove one, you can never get it back. +.PP +The built-in +.UL ifdef +provides a way to determine if a macro is currently defined. +In particular, M4 has pre-defined the names +.UL unix +and +.UL gcos +on the corresponding systems, so you can +tell which one you're using: +.P1 +ifdef(`unix', `define(wordsize,16)' ) +ifdef(`gcos', `define(wordsize,36)' ) +.P2 +makes a definition appropriate for the particular machine. +Don't forget the quotes! +.PP +.UL ifdef +actually permits three arguments; +if the name is undefined, the value of +.UL ifdef +is then the third argument, as in +.P1 +ifdef(`unix', on UNIX, not on UNIX) +.P2 +.SH +Arguments +.PP +So far we have discussed the simplest form of macro processing _ +replacing one string by another (fixed) string. +User-defined macros may also have arguments, so different invocations +can have different results. +Within the replacement text for a macro +(the second argument of its +.UL define ) +any occurrence of +.UL $n +will be replaced by the +.UL n th +argument when the macro +is actually used. +Thus, the macro +.UL bump , +defined as +.P1 +define(bump, $1 = $1 + 1) +.P2 +generates code to increment its argument by 1: +.P1 +bump(x) +.P2 +is +.P1 +x = x + 1 +.P2 +.PP +A macro can have as many arguments as you want, +but only the first nine are accessible, +through +.UL $1 +to +.UL $9 . +(The macro name itself is +.UL $0 , +although that is less commonly used.) +Arguments that are not supplied are replaced by null strings, +so +we can define a macro +.UL cat +which simply concatenates its arguments, like this: +.P1 +define(cat, $1$2$3$4$5$6$7$8$9) +.P2 +Thus +.P1 +cat(x, y, z) +.P2 +is equivalent to +.P1 +xyz +.P2 +.UL $4 +through +.UL $9 +are null, since no corresponding arguments were provided. +.PP +.PP +Leading unquoted blanks, tabs, or newlines that occur during argument collection +are discarded. +All other white space is retained. +Thus +.P1 +define(a, b c) +.P2 +defines +.UL a +to be +.UL b\ \ \ c . +.PP +Arguments are separated by commas, but parentheses are counted properly, +so a comma ``protected'' by parentheses does not terminate an argument. +That is, in +.P1 +define(a, (b,c)) +.P2 +there are only two arguments; +the second is literally +.UL (b,c) . +And of course a bare comma or parenthesis can be inserted by quoting it. +.SH +Arithmetic Built-ins +.PP +M4 provides two built-in functions for doing arithmetic +on integers (only). +The simplest is +.UL incr , +which increments its numeric argument by 1. +Thus to handle the common programming situation +where you want a variable to be defined as ``one more than N'', +write +.P1 +define(N, 100) +define(N1, `incr(N)') +.P2 +Then +.UL N1 +is defined as one more than the current value of +.UL N . +.PP +The more general mechanism for arithmetic is a built-in +called +.UL eval , +which is capable of arbitrary arithmetic on integers. +It provides the operators +(in decreasing order of precedence) +.DS +unary + and \(mi +** or ^ (exponentiation) +* / % (modulus) ++ \(mi +== != < <= > >= +! (not) +& or && (logical and) +\(or or \(or\(or (logical or) +.DE +Parentheses may be used to group operations where needed. +All the operands of +an expression given to +.UL eval +must ultimately be numeric. +The numeric value of a true relation +(like 1>0) +is 1, and false is 0. +The precision in +.UL eval +is +32 bits on +.UC UNIX +and 36 bits on +.UC GCOS . +.PP +As a simple example, suppose we want +.UL M +to be +.UL 2**N+1 . +Then +.P1 +define(N, 3) +define(M, `eval(2**N+1)') +.P2 +As a matter of principle, it is advisable +to quote the defining text for a macro +unless it is very simple indeed +(say just a number); +it usually gives the result you want, +and is a good habit to get into. +.SH +File Manipulation +.PP +You can include a new file in the input at any time by +the built-in function +.UL include : +.P1 +include(filename) +.P2 +inserts the contents of +.UL filename +in place of the +.UL include +command. +The contents of the file is often a set of definitions. +The value +of +.UL include +(that is, its replacement text) +is the contents of the file; +this can be captured in definitions, etc. +.PP +It is a fatal error if the file named in +.UL include +cannot be accessed. +To get some control over this situation, the alternate form +.UL sinclude +can be used; +.UL sinclude +(``silent include'') +says nothing and continues if it can't access the file. +.PP +It is also possible to divert the output of M4 to temporary files during processing, +and output the collected material upon command. +M4 maintains nine of these diversions, numbered 1 through 9. +If you say +.P1 +divert(n) +.P2 +all subsequent output is put onto the end of a temporary file +referred to as +.UL n . +Diverting to this file is stopped by another +.UL divert +command; +in particular, +.UL divert +or +.UL divert(0) +resumes the normal output process. +.PP +Diverted text is normally output all at once +at the end of processing, +with the diversions output in numeric order. +It is possible, however, to bring back diversions +at any time, +that is, to append them to the current diversion. +.P1 +undivert +.P2 +brings back all diversions in numeric order, and +.UL undivert +with arguments brings back the selected diversions +in the order given. +The act of undiverting discards the diverted stuff, +as does diverting into a diversion +whose number is not between 0 and 9 inclusive. +.PP +The value of +.UL undivert +is +.ul +not +the diverted stuff. +Furthermore, the diverted material is +.ul +not +rescanned for macros. +.PP +The built-in +.UL divnum +returns the number of the currently active diversion. +This is zero during normal processing. +.SH +System Command +.PP +You can run any program in the local operating system +with the +.UL syscmd +built-in. +For example, +.P1 +syscmd(date) +.P2 +on +.UC UNIX +runs the +.UL date +command. +Normally +.UL syscmd +would be used to create a file +for a subsequent +.UL include . +.PP +To facilitate making unique file names, the built-in +.UL maketemp +is provided, with specifications identical to the system function +.ul +mktemp: +a string of XXXXX in the argument is replaced +by the process id of the current process. +.SH +Conditionals +.PP +There is a built-in called +.UL ifelse +which enables you to perform arbitrary conditional testing. +In the simplest form, +.P1 +ifelse(a, b, c, d) +.P2 +compares the two strings +.UL a +and +.UL b . +If these are identical, +.UL ifelse +returns +the string +.UL c ; +otherwise it returns +.UL d . +Thus we might define a macro called +.UL compare +which compares two strings and returns ``yes'' or ``no'' +if they are the same or different. +.P1 +define(compare, `ifelse($1, $2, yes, no)') +.P2 +Note the quotes, +which prevent too-early evaluation of +.UL ifelse . +.PP +If the fourth argument is missing, it is treated as empty. +.PP +.UL ifelse +can actually have any number of arguments, +and thus provides a limited form of multi-way decision capability. +In the input +.P1 +ifelse(a, b, c, d, e, f, g) +.P2 +if the string +.UL a +matches the string +.UL b , +the result is +.UL c . +Otherwise, if +.UL d +is the same as +.UL e , +the result is +.UL f . +Otherwise the result is +.UL g . +If the final argument +is omitted, the result is null, +so +.P1 +ifelse(a, b, c) +.P2 +is +.UL c +if +.UL a +matches +.UL b , +and null otherwise. +.SH +String Manipulation +.PP +The built-in +.UL len +returns the length of the string that makes up its argument. +Thus +.P1 +len(abcdef) +.P2 +is 6, and +.UL len((a,b)) +is 5. +.PP +The built-in +.UL substr +can be used to produce substrings of strings. +.UL substr(s,\ i,\ n) +returns the substring of +.UL s +that starts at the +.UL i th +position +(origin zero), +and is +.UL n +characters long. +If +.UL n +is omitted, the rest of the string is returned, +so +.P1 +substr(`now is the time', 1) +.P2 +is +.P1 +ow is the time +.P2 +If +.UL i +or +.UL n +are out of range, various sensible things happen. +.PP +.UL index(s1,\ s2) +returns the index (position) in +.UL s1 +where the string +.UL s2 +occurs, or \-1 +if it doesn't occur. +As with +.UL substr , +the origin for strings is 0. +.PP +The built-in +.UL translit +performs character transliteration. +.P1 +translit(s, f, t) +.P2 +modifies +.UL s +by replacing any character found in +.UL f +by the corresponding character of +.UL t . +That is, +.P1 +translit(s, aeiou, 12345) +.P2 +replaces the vowels by the corresponding digits. +If +.UL t +is shorter than +.UL f , +characters which don't have an entry in +.UL t +are deleted; as a limiting case, +if +.UL t +is not present at all, +characters from +.UL f +are deleted from +.UL s . +So +.P1 +translit(s, aeiou) +.P2 +deletes vowels from +.UL s . +.PP +There is also a built-in called +.UL dnl +which deletes all characters that follow it up to +and including the next newline; +it is useful mainly for throwing away +empty lines that otherwise tend to clutter up M4 output. +For example, if you say +.P1 +define(N, 100) +define(M, 200) +define(L, 300) +.P2 +the newline at the end of each line is not part of the definition, +so it is copied into the output, where it may not be wanted. +If you add +.UL dnl +to each of these lines, the newlines will disappear. +.PP +Another way to achieve this, due to J. E. Weythman, +is +.P1 +divert(-1) + define(...) + ... +divert +.P2 +.SH +Printing +.PP +The built-in +.UL errprint +writes its arguments out on the standard error file. +Thus you can say +.P1 +errprint(`fatal error') +.P2 +.PP +.UL dumpdef +is a debugging aid which +dumps the current definitions of defined terms. +If there are no arguments, you get everything; +otherwise you get the ones you name as arguments. +Don't forget to quote the names! +.SH +Summary of Built-ins +.PP +Each entry is preceded by the +page number where it is described. +.DS +.tr '\'`\` +.ta .25i +3 changequote(L, R) +1 define(name, replacement) +4 divert(number) +4 divnum +5 dnl +5 dumpdef(`name', `name', ...) +5 errprint(s, s, ...) +4 eval(numeric expression) +3 ifdef(`name', this if true, this if false) +5 ifelse(a, b, c, d) +4 include(file) +3 incr(number) +5 index(s1, s2) +5 len(string) +4 maketemp(...XXXXX...) +4 sinclude(file) +5 substr(string, position, number) +4 syscmd(s) +5 translit(str, from, to) +3 undefine(`name') +4 undivert(number,number,...) +.DE +.SH +Acknowledgements +.PP +We are indebted to Rick Becker, John Chambers, +Doug McIlroy, +and especially Jim Weythman, +whose pioneering use of M4 has led to several valuable improvements. +We are also deeply grateful to Weythman for several substantial contributions +to the code. +.SG +.SH +References +.LP +.IP [1] +B. W. Kernighan and P. J. Plauger, +.ul +Software Tools, +Addison-Wesley, Inc., 1976. diff --git a/usr/doc/make b/usr/doc/make new file mode 100644 index 0000000000..3c8775851b --- /dev/null +++ b/usr/doc/make @@ -0,0 +1,791 @@ +.....TR 57 +.ND August 15, 1978 +.RP +.de IT +.if n .ul +\&\\$3\f2\\$1\fR\^\&\\$2 +.. +.TL +Make \(em A Program for Maintaining Computer Programs +.AU +S. I. Feldman +.AI +.MH +.AB +.PP +In a programming project, it is easy to lose track of which files need +to be reprocessed or recompiled after a change is made in some part of the source. +.I Make +provides a simple mechanism for maintaining up-to-date versions of programs that result +from many operations on a number of files. +It is possible to tell +.I Make +the sequence of commands that create certain files, +and the list of files that require other files to be current before the operations can be done. +Whenever a change is made in any part of the program, +the +.I Make +command will create the proper files simply, correctly, +and with a minimum amount of effort. +.PP +The basic operation of +.I Make +is to find the name of a needed target in the description, ensure that all of the files on which it depends exist and +are up to date, and then create the target if it has not been modified since its generators were. +The description file really defines the graph of dependencies; +.I Make +does a depth-first search of this graph +to determine what work is really necessary. +.PP +.I Make +also provides a simple macro substitution facility +and the ability to encapsulate commands in a single file +for convenient administration. +.AE +.SH +Introduction +.PP +It is common practice to divide large programs into smaller, more manageable pieces. +The pieces may require quite different treatments: +some may need to be run through a macro processor, some may need to be processed by +a sophisticated program generator (e.g., Yacc[1] or Lex[2]). +The outputs of these generators may then have to be compiled with special options and with +certain definitions and declarations. +The code resulting from these transformations may then need to be loaded together with +certain libraries under the control of special options. +Related maintenance activities involve running complicated test scripts +and installing validated modules. +Unfortunately, it is very easy for a programmer to forget which files depend on which others, +which files have been modified recently, and the exact sequence of operations +needed to make or exercise a new version of the program. +After a long editing session, one may easily lose track of which files have been changed +and which object modules are still valid, +since a change to a declaration can obsolete a dozen other files. +Forgetting to compile a routine that has been changed or that uses changed declarations will result in +a program that will not work, and a bug that can be very hard to track down. +On the other hand, recompiling everything in sight just to be safe is very wasteful. +.PP +The program described in this report mechanizes many of the activities of program development +and maintenance. +If the information on inter-file dependences and command sequences is stored in a file, the simple command +.DS +make +.DE +is frequently sufficient to update the interesting files, +regardless of the number that have been edited since the last ``make''. +In most cases, the description file is easy to write and changes infrequently. +It is usually easier to type the +.IT make +command than to issue even one of the needed operations, so the typical cycle of program development operations becomes +.DS +think \(em edit \(em \fImake\fR \(em test . . . +.DE +.PP +.IT Make +is most useful for medium-sized programming projects; +it does not solve the problems of maintaining multiple source versions +or of describing huge programs. +.IT Make +was designed for use on Unix, but a version runs on GCOS. +.SH +Basic Features +.PP +The basic operation of +.IT make +is to update a target file by ensuring +that all of the files on which it depends exist and are up to date, +then creating the target if it has not been modified since its dependents were. +.IT Make +does a depth-first search of the graph of dependences. +The operation of the command depends on the ability to find the date and time +that a file was last modified. +.PP +To illustrate, let us consider a simple example: +A program named +.IT prog +is made by compiling and loading three C-language files +.IT x.c , +.IT y.c , +and +.IT z.c +with the +.IT lS +library. +By convention, the output of the C compilations will be found in files named +.IT x.o , +.IT y.o , +and +.IT z.o . +Assume that the files +.IT x.c +and +.IT y.c +share some declarations in a file named +.IT defs , +but that +.IT z.c +does not. +That is, +.IT x.c +and +.IT y.c +have the line +.DS +#include "defs" +.DE +The following text describes the relationships and operations: +.DS +prog : x.o y.o z.o + cc x.o y.o z.o \-lS \-o prog +.sp .5 +x.o y.o : defs +.DE +If this information were stored in a file named +.IT makefile , +the command +.DS +make +.DE +would perform the operations needed to recreate +.IT prog +after any changes had been made to any of the four source files +.IT x.c , +.IT y.c , +.IT z.c , +or +.IT defs . +.PP +.IT Make +operates using three sources of information: +a user-supplied description file (as above), +file names and ``last-modified'' times from the file system, +and built-in rules to bridge some of the gaps. +In our example, the first line says that +.IT prog +depends on three ``\fI.o\fR'' files. +Once these object files are current, the second line describes how to load them to create +.IT prog . +The third line says that +.IT x.o +and +.IT y.o +depend on the file +.IT defs . +From the file system, +.IT make +discovers that there are three ``\fI.c\fR'' files corresponding to the needed ``\fI.o\fR'' files, +and uses built-in information on how to generate an object from a source file +(\fIi.e.,\fR issue a ``cc\ \-c'' command). +.PP +The following long-winded description file is equivalent to the one above, but +takes no advantage of +.IT make 's +innate knowledge: +.DS +prog : x.o y.o z.o + cc x.o y.o z.o \-lS \-o prog +.sp .3 +x.o : x.c defs + cc \-c x.c +y.o : y.c defs + cc \-c y.c +z.o : z.c + cc \-c z.c +.DE +.PP +If none of the source or object files had changed since the last time +.IT prog +was made, all of the files would be current, and +the command +.DS +make +.DE +would just announce this fact and stop. +If, however, the +.IT defs +file had been edited, +.IT x.c +and +.IT y.c +(but not +.IT z.c ) +would be recompiled, and then +.IT prog +would be created from the new ``\fI.o\fR'' files. +If only the file +.IT y.c +had changed, only it would be recompiled, but it would still be necessary to reload +.IT prog . +.PP +If no target name is given on the +.IT make +command line, the first target mentioned in the description is created; +otherwise the specified targets are made. +The command +.DS +make x.o +.DE +would recompile +.IT x.o +if +.IT x.c +or +.IT defs +had changed. +.PP +If the file exists after the commands are executed, +its time of last modification is used in further decisions; +otherwise the current time is used. +It is often quite useful to include rules with mnemonic names and commands that do not +actually produce a file with that name. +These entries can take advantage of +.IT make 's +ability to generate files and substitute macros. +Thus, an entry +``save'' +might be included to copy a certain set of files, or an entry +``cleanup'' +might be used to throw away unneeded intermediate files. +In other cases one may maintain a zero-length file purely to keep track +of the time at which certain actions were performed. +This technique is useful for maintaining remote archives and listings. +.PP +.IT Make +has a simple macro mechanism for substituting in dependency lines and command strings. +Macros are defined by command arguments or description file lines with embedded equal signs. +A macro is invoked by preceding the name by a dollar sign; +macro names longer than one character must be parenthesized. +The name of the macro is either the single character after the dollar sign or a name inside parentheses. +The following are valid macro invocations: +.DS +$(CFLAGS) +$2 +$(xy) +$Z +$(Z) +.DE +The last two invocations are identical. +$$ is a dollar sign. +All of these macros are assigned values during input, as shown below. +Four special macros change values during the execution of the command: +$\(**, $@, $?, and $<. +They will be discussed later. +The following fragment shows the use: +.DS +OBJECTS = x.o y.o z.o +LIBES = \-lS +prog: $(OBJECTS) + cc $(OBJECTS) $(LIBES) \-o prog + . . . +.DE +The command +.DS +make +.DE +loads the three object files with the +.IT lS +library. The command +.DS +make "LIBES= \-ll \-lS" +.DE +loads them with both the Lex (``\-ll'') and the Standard (``\-lS'') libraries, +since macro definitions on the command line override definitions in the description. +(It is necessary to quote arguments with embedded blanks in +.UX +commands.) +.PP +The following sections detail the form of description files and the command line, +and discuss options and built-in rules in more detail. +.SH +Description Files and Substitutions +.PP +A description file contains three types of information: +macro definitions, +dependency information, +and executable commands. +There is also a comment convention: +all characters after a sharp (#) are ignored, as is the sharp itself. +Blank lines and lines beginning with a sharp are totally ignored. +If a non-comment line is too long, it can be continued using a backslash. +If the last character of a line is a backslash, the backslash, newline, +and following blanks and tabs are replaced by a single blank. +.PP +A macro definition is a line containing an equal sign not preceded by a colon or a tab. +The name (string of letters and digits) to the left of the equal sign +(trailing blanks and tabs are stripped) is assigned the string of characters following the equal sign +(leading blanks and tabs are stripped.) +The following are valid macro definitions: +.DS +2 = xyz +abc = \-ll \-ly \-lS +LIBES = +.DE +The last definition assigns LIBES the null string. +A macro that is never explicitly defined has the null string as value. +Macro definitions may also appear on the +.IT make +command line (see below). +.PP +Other lines give information about target files. +The general form of an entry is: +.DS +target1 [target2 . . .] :[:] [dependent1 . . .] [; commands] [# . . .] +[\fI(tab)\fR commands] [# . . .] + . . . +.DE +Items inside brackets may be omitted. +Targets and dependents are strings of letters, digits, periods, and slashes. +(Shell metacharacters ``\(**'' and ``?'' are expanded.) +A command is any string of characters not including a sharp (except in quotes) +or newline. +Commands may appear either after a semicolon on a dependency line +or on lines beginning with a tab immediately following a dependency line. +.PP +A dependency line may have either a single or a double colon. +A target name may appear on more than one dependency line, but all of those lines must be of the +same (single or double colon) type. +.IP 1. +For the usual single-colon case, +at most one of these dependency lines may have a command sequence associated with it. +If the target is out of date with any of the dependents on any of the lines, +and a command sequence is specified (even a null one following a semicolon or tab), +it is executed; otherwise a default creation rule may be invoked. +.IP 2. +In the double-colon case, a command sequence may be associated with each dependency line; +if the target is out of date with any of the files on a particular line, the associated +commands are executed. +A built-in rule may also be executed. +This detailed form is of particular value in updating archive-type files. +.PP +If a target must be created, the sequence of commands is executed. +Normally, each command line is printed and then +passed to a separate invocation of the Shell after substituting for macros. +(The printing is suppressed in silent mode or if the command line begins with an @ sign). +.IT Make +normally stops if any command signals an error by returning a non-zero error code. +(Errors are ignored if the ``\-i'' flags has been specified on the +.IT make +command line, +if the fake target name ``.IGNORE'' appears in the description file, +or if the command string in the description file begins with a hyphen. +Some +.UX +commands return meaningless status). +Because each command line is passed to a separate invocation of the Shell, +care must be taken with certain commands (e.g., \fIcd\fR and Shell control commands) that have meaning only +within a single Shell process; +the results are forgotten before the next line is executed. +.PP +Before issuing any command, certain macros are set. +$@ is set to the name of the file to be ``made''. +$? is set to the string of names that were found to be younger than the target. +If the command was generated by an implicit rule (see below), +$< is the name of the related file that caused the action, and +$\(** is the prefix shared by the current and the dependent file names. +.PP +If a file must be made but there are no explicit commands or relevant +built-in rules, +the commands associated with the name ``.DEFAULT'' are used. +If there is no such name, +.IT make +prints a message and stops. +.SH +Command Usage +.PP +The +.IT make +command takes four kinds of arguments: +macro definitions, flags, description file names, and target file names. +.DS +make [ flags ] [ macro definitions ] [ targets ] +.DE +The following summary of the operation of the command explains how these arguments are interpreted. +.PP +First, all macro definition arguments (arguments with embedded equal signs) are analyzed +and the assignments made. +Command-line macros override corresponding definitions found in the description files. +.PP +Next, the flag arguments are examined. +The permissible flags are +.IP \-i +Ignore error codes returned by invoked commands. +This mode is entered if the fake target name ``.IGNORE'' appears in the description file. +.IP \-s +Silent mode. Do not print command lines before executing. +This mode is also entered if the fake target name ``.SILENT'' appears in the description file. +.IP \-r +Do not use the built-in rules. +.IP \-n +No execute mode. Print commands, but do not execute them. +Even lines beginning with an ``@'' sign are printed. +.IP \-t +Touch the target files (causing them to be up to date) rather than issue the usual commands. +.IP \-q +Question. +The +.IT make +command returns a zero or non-zero status code depending on whether the target file +is or is not up to date. +.IP \-p +Print out the complete set of macro definitions and target descriptions +.IP \-d +Debug mode. Print out detailed information on files and times examined. +.IP \-f +Description file name. The next argument is assumed to be the name of a description file. +A file name of ``\-'' denotes the standard input. +If there are no ``\-f\|'' arguments, the file named +.IT makefile +or +.IT Makefile +in the current directory is read. +The contents of the description files override the built-in rules if they are present). +.PP +Finally, the remaining arguments are assumed to be the names of targets to be made; +they are done in left to right order. +If there are no such arguments, the first name in the description files that does not +begin with a period is ``made''. +.SH +Implicit Rules +.PP +The +.ul +make +program uses a table of interesting suffixes and a set +of transformation rules to supply default dependency +information and implied commands. +(The Appendix describes these tables and means of overriding +them.) +The default suffix list is: +.KS +.sp +.nf +.ta 0.5i 1.5i + \fI.o\fR Object file + \fI.c\fR C source file + \fI.e\fR Efl source file + \fI.r\fR Ratfor source file + \fI.f\fR Fortran source file + \fI.s\fR Assembler source file + \fI.y\fR Yacc-C source grammar + \fI.yr\fR Yacc-Ratfor source grammar + \fI.ye\fR Yacc-Efl source grammar + \fI.l\fR Lex source grammar +.fi +.sp +.KE +The following diagram summarizes the default transformation paths. +If there are two paths connecting a pair of suffixes, the longer +one is used only if the intermediate file exists or is +named in the description. +.KS +.sp +.ft I +.ta 2i + .o +.sp 2 +.ta 0.75i 1.25i 1.6i 2.1i + .c .r .e .f .s .y .yr .ye .l .d +.sp 2 +.ta 0.6i 1.25i 1.6i + .y .l .yr .ye +.ft R +.sp +.KE +.PP +If the file +.ul +x.o +were needed and there were an +.ul +x.c +in the description or directory, it would be compiled. +If there were also an +.IT x.l , +that grammar would be run through Lex before compiling the result. +However, if there were no +.ul +x.c +but there were an +.IT x.l , +.IT make +would discard the intermediate C-language file and use the +direct link in the graph above. +.PP +It is possible to change the names of some of the compilers used in the +default, or the flag arguments with which they are invoked by knowing +the macro names used. +The compiler names are the macros AS, CC, RC, EC, YACC, YACCR, YACCE, and LEX. +The command +.DS +make CC=newcc +.DE +will cause the ``newcc'' command to be used instead of the +usual C compiler. +The macros CFLAGS, RFLAGS, EFLAGS, YFLAGS, and LFLAGS may be set to +cause these commands to be issued with optional flags. +Thus, +.DS +make "CFLAGS=\|\(miO" +.DE +causes the optimizing C compiler to be used. +.SH +Example +.PP +As an example of the use of +.ul +make, +we will present the description file used to maintain +the +.ul +make +command itself. +The code for +.ul +make +is spread over a number of C source files and a Yacc grammar. +The description file contains: +.DS +# Description file for the Make command +.sp .3 +P = und \-3 | opr \-r2 # send to GCOS to be printed +FILES = Makefile version.c defs main.c doname.c misc.c files.c dosys.c\ + gram.y lex.c gcos.c +OBJECTS = version.o main.o doname.o misc.o files.o dosys.o gram.o +LIBES= \-lS +LINT = lint \-p +CFLAGS = \-O +.sp .3 +make: $(OBJECTS) + cc $(CFLAGS) $(OBJECTS) $(LIBES) \-o make + size make +.sp .3 +$(OBJECTS): defs +gram.o: lex.c +.sp .3 +cleanup: + -rm *.o gram.c + -du +.sp .3 +install: + @size make /usr/bin/make + cp make /usr/bin/make ; rm make +.sp .3 +print: $(FILES) # print recently changed files + pr $? | $P + touch print +.sp .3 +test: + make \-dp | grep \-v TIME >1zap + /usr/bin/make \-dp | grep \-v TIME >2zap + diff 1zap 2zap + rm 1zap 2zap +.sp .3 +lint : dosys.c doname.c files.c main.c misc.c version.c gram.c + $(LINT) dosys.c doname.c files.c main.c misc.c version.c gram.c + rm gram.c +.sp .3 +arch: + ar uv /sys/source/s2/make.a $(FILES) +.DE +.IT Make +usually prints out each command before issuing it. +The following output results from typing the simple command +.DS +make +.DE +in a directory containing only the source and description file: +.DS + cc \-c version.c + cc \-c main.c + cc \-c doname.c + cc \-c misc.c + cc \-c files.c + cc \-c dosys.c + yacc gram.y + mv y.tab.c gram.c + cc \-c gram.c + cc version.o main.o doname.o misc.o files.o dosys.o gram.o \-lS \-o make + 13188+3348+3044 = 19580b = 046174b +.DE +Although none of the source files or grammars were mentioned +by name in the description file, +.IT make +found them using its suffix rules and issued the needed commands. +The string of digits results from the ``size make'' +command; the printing of the command line itself was +suppressed by an @ sign. +The @ sign on the +.IT size +command in the description file suppressed the printing of the command, +so only the sizes are written. +.PP +The last few entries in the description file are useful maintenance sequences. +The ``print'' entry prints only the files that have been changed since the last +``make print'' command. +A zero-length file +.IT print +is maintained to keep track of the time of the printing; +the $? macro in the command line then picks up only the names of the files +changed since +.IT print +was touched. +The printed output can be sent to a different printer or to a file by changing the definition of the +.IT P +macro: +.DS +make print "P = opr \-sp" + \fIor\fR +make print "P= cat >zap" +.DE +.SH +Suggestions and Warnings +.PP +The most common difficulties arise from +.IT make 's +specific meaning of dependency. +If file +.IT x.c +has a ``#include "defs"'' +line, then the object file +.IT x.o +depends on +.IT defs ; +the source file +.IT x.c +does not. +(If +.IT defs +is changed, it is not necessary to do anything +to the file +.IT x.c , +while it is necessary to recreate +.IT x.o .) +.PP +To discover what +.IT make +would do, the ``\-n'' option is very useful. +The command +.DS +make \-n +.DE +orders +.IT make +to print out the commands it would issue without actually taking the time to execute them. +If a change to a file is absolutely certain to be benign +(e.g., adding a new definition to an include file), +the ``\-t'' (touch) option +can save a lot of time: +instead of issuing a large number of superfluous recompilations, +.IT make +updates the modification times on the affected file. +Thus, the command +.DS +make \-ts +.DE +(``touch silently'') causes the relevant files to appear up to date. +Obvious care is necessary, since this mode of operation subverts +the intention of +.IT make +and destroys all memory of the previous relationships. +.PP +The debugging flag (``\-d'') causes +.IT make +to print out a very detailed description of what it is doing, including the +file times. The output is verbose, and recommended only as a last resort. +.SH +Acknowledgments +.PP +I would like to thank S. C. Johnson for suggesting this approach +to program maintenance control. +I would like to thank S. C. Johnson and H. Gajewska for being +the prime guinea pigs during development of +.IT make . +.SH +References +.IP 1. +S. C. Johnson, +``Yacc \(em Yet Another Compiler-Compiler'', +Bell Laboratories +Computing Science Technical Report #32, +July 1978. +.IP 2. +M. E. Lesk, +``Lex \(em A Lexical Analyzer Generator'', +Computing Science Technical Report #39, +October 1975. +.bp +.SH +Appendix. Suffixes and Transformation Rules +.PP +The +.ul +make +program itself does not know what file name suffixes are interesting +or how to transform a file with one suffix into a file with another +suffix. +This information is stored in an internal table that has the form of a description file. +If the ``\-r'' flag is used, this table is not used. +.PP +The list of suffixes is actually the dependency list for the name +``.SUFFIXES''; +.ul +make +looks for a file with any of the suffixes on the list. +If such a file exists, and if there is a transformation +rule for that combination, +.ul +make +acts as described earlier. +The transformation rule names are the concatenation of the +two suffixes. +The name of the rule to transform a ``\fI.r\fR'' file to a ``\fI.o\fR'' file +is thus ``\fI.r.o\fR''. +If the rule is present and no explicit command sequence +has been given in the user's description files, the command +sequence for the rule ``.r.o'' is used. +If a command is generated by using one of these suffixing rules, +the macro $\(** is given the value of the stem +(everything but the suffix) of the name of the file to be made, +and the macro $< is the name of the dependent that caused the action. +.PP +The order of the suffix list is significant, since it is scanned from +left to right, and the first name that is formed that has both a file +and a rule associated with it is used. +If new names are to be appended, the user can just add an entry for +``.SUFFIXES'' in his own description file; the dependents will be added to the usual list. +A ``.SUFFIXES'' line without any dependents deletes the current list. +(It is necessary to clear the current list if the order of names is to be changed). +.PP +The following is an excerpt from the default rules file: +.DS +.ta .5i 1i + .SUFFIXES : .o .c .e .r .f .y .yr .ye .l .s + YACC=yacc + YACCR=yacc \-r + YACCE=yacc \-e + YFLAGS= + LEX=lex + LFLAGS= + CC=cc + AS=as \- + CFLAGS= + RC=ec + RFLAGS= + EC=ec + EFLAGS= + FFLAGS= + .c.o : + $(CC) $(CFLAGS) \-c $< + .e.o .r.o .f.o : + $(EC) $(RFLAGS) $(EFLAGS) $(FFLAGS) \-c $< + .s.o : + $(AS) \-o $@ $< + .y.o : + $(YACC) $(YFLAGS) $< + $(CC) $(CFLAGS) \-c y.tab.c + rm y.tab.c + mv y.tab.o $@ + .y.c : + $(YACC) $(YFLAGS) $< + mv y.tab.c $@ +.DE diff --git a/usr/doc/password b/usr/doc/password new file mode 100644 index 0000000000..27124b8824 --- /dev/null +++ b/usr/doc/password @@ -0,0 +1,558 @@ +.\" tbl mm ^ eqn ^ troff -ms +.EQ +delim $$ +.EN +.RP +....TM 78-1271-5 39199 39199-11 +.ND April 3, 1978 +.TL +Password Security: +A Case History +.OK +Encryption +Computing +.AU "MH 2C-524" 3878 +Robert Morris +.AU "MH 2C-523" 2394 +Ken Thompson +.AI +.MH +.AB +This paper describes the history of the design of the +password security scheme on a remotely accessed time-sharing +system. +The present design was the result of countering +observed attempts to penetrate the system. +The result is a compromise between extreme security and +ease of use. +.AE +.CS 6 0 6 0 0 4 +.SH +INTRODUCTION +.PP +Password security on the +.UX +time-sharing system [1] is provided by a +collection of programs +whose elaborate and strange design is the outgrowth of +many years of experience with earlier versions. +To help develop a secure system, we have had a continuing +competition to devise new ways to +attack the security of the system (the bad guy) and, at the same time, to +devise new techniques to resist the new attacks (the good guy). +This competition has been in the same vein as the +competition of long standing between manufacturers of armor +plate and those of armor-piercing shells. +For this reason, the description that follows will +trace the history of the password system rather than simply +presenting the program in its current state. +In this way, the reasons for the design will be made clearer, +as the design cannot be understood without also +understanding the potential attacks. +.PP +An underlying goal has been to provide password security +at minimal inconvenience to the users of the system. +For example, those who want to run a completely open +system without passwords, or to have passwords only at the +option of the individual users, are able to do so, while +those who require all of their users to have passwords +gain a high degree of security +against penetration of the system by unauthorized +users. +.PP +The password system must be able not only to prevent +any access to the system by unauthorized users +(i.e. prevent them from logging in at all), +but it must also +prevent users who are already logged in from doing +things that they are not authorized to do. +The so called ``super-user'' password, for example, is especially +critical because the super-user has all sorts of +permissions and has essentially unlimited access to +all system resources. +.PP +Password security is of course only one component of +overall system security, but it is an essential component. +Experience has shown that attempts to penetrate +remote-access systems have been astonishingly +sophisticated. +.PP +Remote-access systems are peculiarly vulnerable to +penetration by outsiders as there are threats at the +remote terminal, along the communications link, as well +as at the computer itself. +Although the security of a password encryption algorithm +is an interesting intellectual and mathematical problem, +it is only one tiny facet of a very large problem. +In practice, physical security of the computer, communications +security of the communications link, and physical control +of the computer itself loom as far more important issues. +Perhaps most important of all is control over the actions +of ex-employees, since they are not under any direct control +and they may have intimate +knowledge about the system, its resources, and +methods of access. +Good system security involves realistic +evaluation of the risks not only of deliberate +attacks but also of casual unauthorized access +and accidental disclosure. +.SH +PROLOGUE +.PP +The UNIX system was first implemented with a password file that contained +the actual passwords of all the users, and for that reason +the password file had to +be heavily protected against being either read or written. +Although historically, this had been the technique used +for remote-access systems, +it was completely unsatisfactory for several reasons. +.PP +The technique is excessively vulnerable to lapses in +security. +Temporary loss of protection can occur when +the password file is being edited or otherwise modified. +There is no way to prevent the making of copies by +privileged users. +Experience with several earlier remote-access systems +showed that such lapses occur with frightening frequency. +Perhaps the most memorable such occasion occurred +in the early 60's when +a system administrator on the CTSS system at MIT +was editing the +password file and another system administrator was editing +the daily message that is printed on everyone's terminal +on login. +Due to a software design error, the temporary editor files +of the two users were interchanged and thus, for a time, the password +file was printed on every terminal when it was logged in. +.PP +Once such a lapse in security has been discovered, everyone's +password must be changed, usually simultaneously, at a considerable +administrative cost. +This is not a great matter, but +far more serious is the high probability of such lapses +going unnoticed by the system administrators. +.PP +Security against unauthorized disclosure of the passwords was, +in the last analysis, impossible with this system because, +for example, if the +contents of the file system are put on to magnetic tape for +backup, as they must be, then anyone who has physical +access to the tape +can read anything on it with no restriction. +.PP +Many programs must get information of various kinds +about the users of the system, and these programs in general +should have no special permission to read the password file. +The information which should have been in the password file actually was +distributed (or replicated) into a number of files, all of +which had to be updated whenever a user was added to or +dropped from the system. +.SH +THE FIRST SCHEME +.PP +The obvious solution is to arrange that the passwords not +appear in the system at all, and it is not difficult to decide +that this can be done by encrypting each user's password, +putting only the encrypted form in the password file, and +throwing away his original password (the one that +he typed in). +When the user later tries to log in to the system, the password +that he types is encrypted and compared with the encrypted +version in the password file. +If the two match, his login attempt is accepted. +Such a scheme was first described +in [3, p.91ff.]. +It also seemed advisable to devise +a system in which neither the password file nor the +password program itself needed to be +protected against being read by anyone. +.PP +All that was needed to implement these ideas +was to find a means of encryption that was very difficult +to invert, even when the encryption program +is available. +Most of the standard encryption methods used (in the past) +for encryption of messages are rather easy to invert. +A convenient and rather good encryption program happened +to exist on the system at the time; it simulated the +M-209 cipher machine [4] +used by the U.S. Army during World War II. +It turned out that the M-209 program was usable, but with +a given key, the ciphers produced by this program are +trivial to invert. +It is a much more difficult matter to find out the key +given the cleartext input and the enciphered output of the program. +Therefore, +the password was used not as the text to be encrypted but as the +key, and a constant was encrypted using this key. +The encrypted result was entered into the password file. +.SH +ATTACKS ON THE FIRST APPROACH +.PP +Suppose that the bad guy has available +the text of the password encryption program and +the complete password file. +Suppose also that he has substantial computing +capacity at his disposal. +.PP +One obvious approach to penetrating the password +mechanism is to attempt to find a general method of inverting +the encryption algorithm. +Very possibly this can be done, but few +successful results +have come to light, despite substantial efforts extending +over a period of more than five years. +The results have not proved to be very useful +in penetrating systems. +.PP +Another approach to penetration is simply to keep trying +potential +passwords until one succeeds; this is a general cryptanalytic +approach called +.I +key search. +.R +Human beings being what they are, there is a strong tendency +for people to choose relatively short and simple passwords that +they can remember. +Given free choice, most people will choose their passwords +from a restricted character set (e.g. all lower-case letters), +and will often choose words or names. +This human habit makes the key search job a great deal easier. +.PP +The critical factor involved in key search is the amount of +time needed to encrypt a potential password and to check the result +against an entry in the password file. +The running time to encrypt one trial password and check +the result turned out to be approximately 1.25 milliseconds on +a PDP-11/70 when the encryption algorithm was recoded for +maximum speed. +It is takes essentially no more time to test the encrypted +trial password against all the passwords in +an entire password file, or for that matter, against +any collection of encrypted passwords, perhaps collected +from many installations. +.PP +If we want to check all passwords of length +.I +n +.R +that consist entirely of lower-case letters, the number +of such passwords is $26 sup n$. +If we suppose that the password consists of +printable characters only, then the number of possible passwords +is somewhat less than $95 sup n$. +(The standard system ``character erase'' and ``line kill'' +characters are, for example, not prime +candidates.) +We can immediately estimate the running time of a program that +will test every password of a given length with all of its +characters chosen from some set of characters. +The following table gives estimates of the running time +required on a PDP-11/70 +to test all possible character strings of length $n$ +chosen from various sets of characters: namely, all lower-case +letters, all lower-case letters plus digits, +all alphanumeric characters, all 95 printable +ASCII characters, and finally all 128 ASCII characters. +.TS +cccccc +cccccc +nnnnnn. + 26 lower-case 36 lower-case letters 62 alphanumeric 95 printable all 128 ASCII +n letters and digits characters characters characters +.sp .5 +1 30 msec. 40 msec. 80 msec. 120 msec. 160 msec. +2 800 msec. 2 sec. 5 sec. 11 sec. 20 sec. +3 22 sec. 58 sec. 5 min. 17 min. 43 min. +4 10 min. 35 min. 5 hrs. 28 hrs. 93 hrs. +5 4 hrs. 21 hrs. 318 hrs. +6 107 hrs. +.TE +.LP +One has to conclude that it is no great matter for someone with +access to a PDP-11 to test all lower-case alphabetic strings up +to length five +and, given access to the machine for, say, several weekends, to test +all such strings up to six characters in length. +By using such a program against a collection of actual encrypted +passwords, a substantial fraction of all the passwords will be +found. +.PP +Another profitable approach for the bad guy is to use the word +list from a dictionary or to use a list of names. +For example, a large commercial dictionary contains typicallly about +250,000 words; these words can be checked in about five minutes. +Again, a noticeable fraction of any collection of passwords +will be found. +Improvements and extensions will be (and have been) found by +a determined bad guy. +Some ``good'' things to try are: +.IP - +The dictionary with the words spelled backwards. +.IP - +A list of first names (best obtained from some mailing list). +Last names, street names, and city names also work well. +.IP - +The above with initial upper-case letters. +.IP - +All valid license plate numbers in your state. +(This takes about five hours in New Jersey.) +.IP - +Room numbers, social security numbers, telephone numbers, and +the like. +.PP +The authors have conducted experiments to try to determine +typical users' habits in the choice of passwords when no +constraint is put on their choice. +The results were disappointing, except to the bad guy. +In a collection of 3,289 passwords +gathered from many users over a long period of time; +.IP +15 were a single ASCII character; +.IP +72 were strings of two ASCII characters; +.IP +464 were strings of three ASCII characters; +.IP +477 were string of four alphamerics; +.IP +706 were five letters, all upper-case or all lower-case; +.IP +605 were six letters, all lower-case. +.LP +An additional 492 passwords appeared in various available +dictionaries, name lists, and the like. +A total of 2,831, or 86% of this sample of passwords fell into one of +these classes. +.PP +There was, of course, considerable overlap between the +dictionary results and the character string searches. +The dictionary search alone, which required only five +minutes to run, produced about one third of the passwords. +.PP +Users could be urged (or forced) to use either longer passwords +or passwords chosen from a larger character set, or the system +could itself choose passwords for the users. +.SH +AN ANECDOTE +.PP +An entertaining and instructive example is +the attempt made at one installation to force users to use less predictable +passwords. +The users did not choose their own passwords; the system supplied +them. +The supplied passwords were eight characters long and +were taken from the character set consisting of +lower-case letters and digits. +They were generated by a pseudo-random number generator +with only $2 sup 15$ starting values. +The time required to search (again on a PDP-11/70) through +all character strings of length 8 from a 36-character +alphabet is 112 years. +.PP +Unfortunately, only $2 sup 15$ of them need be looked at, +because that is the number of possible outputs of the random +number generator. +The bad guy did, in fact, generate and test each of these strings +and found every one of the system-generated passwords using +a total of only about one minute of machine time. +.SH +IMPROVEMENTS TO THE FIRST APPROACH +.NH +Slower Encryption +.PP +Obviously, the first algorithm used was far too fast. +The announcement of the DES encryption algorithm [2] +by the National Bureau of Standards +was timely and fortunate. +The DES is, by design, hard to invert, but equally valuable +is the fact that it is extremely slow when implemented in +software. +The DES was implemented and used in the following way: +The first eight characters of the user's password are +used as a key for the DES; then the algorithm +is used to encrypt a constant. +Although this constant is zero at the moment, it is easily +accessible and can be made installation-dependent. +Then the DES algorithm is iterated 25 times and the +resulting 64 bits are repacked to become a string of +11 printable characters. +.NH +Less Predictable Passwords +.PP +The password entry program was modified so as to urge +the user to use more obscure passwords. +If the user enters an alphabetic password (all upper-case or +all lower-case) shorter than six characters, or a +password from a larger character set shorter than five +characters, then the program asks him to enter a +longer password. +This further reduces the efficacy of key search. +.PP +These improvements make it exceedingly difficult to find +any individual password. +The user is warned of the risks and if he cooperates, +he is very safe indeed. +On the other hand, he is not prevented from using +his spouse's name if he wants to. +.NH +Salted Passwords +.PP +The key search technique is still +likely to turn up a few passwords when it is used +on a large collection of passwords, and it seemed wise to make this +task as difficult as possible. +To this end, when a password is first entered, the password program +obtains a 12-bit random number (by reading the real-time clock) +and appends this to the password typed in by the user. +The concatenated string is encrypted and both the +12-bit random quantity (called the $salt$) and the 64-bit +result of the encryption are entered into the password +file. +.PP +When the user later logs in to the system, the 12-bit +quantity is extracted from the password file and appended +to the typed password. +The encrypted result is required, as before, to be the same as the +remaining 64 bits in the password file. +This modification does not increase the task of finding +any individual +password, +starting from scratch, +but now the work of testing a given character string +against a large collection of encrypted passwords has +been multiplied by 4096 ($2 sup 12$). +The reason for this is that there are 4096 encrypted +versions of each password and one of them has been picked more +or less at random by the system. +.PP +With this modification, +it is likely that the bad guy can spend days of computer +time trying to find a password on a system with hundreds +of passwords, and find none at all. +More important is the fact that it becomes impractical +to prepare an encrypted dictionary in advance. +Such an encrypted dictionary could be used to crack +new passwords in milliseconds when they appear. +.PP +There is a (not inadvertent) side effect of this +modification. +It becomes nearly impossible to find out whether a +person with passwords on two or more systems has used +the same password on all of them, +unless you already know that. +.NH +The Threat of the DES Chip +.PP +Chips to perform the DES encryption are already commercially +available and they are very fast. +The use of such a chip speeds up the process of password +hunting by three orders of magnitude. +To avert this possibility, one of the internal tables +of the DES algorithm +(in particular, the so-called E-table) +is changed in a way that depends on the 12-bit random +number. +The E-table is inseparably wired into the DES chip, +so that the commercial chip cannot be used. +Obviously, the bad guy could have his own chip designed and +built, but the cost would be unthinkable. +.NH +A Subtle Point +.PP +To login successfully on the UNIX system, it is necessary +after dialing in to type a valid user name, and then the +correct password for that user name. +It is poor design to write the login command in such a way that it +tells an interloper when he has typed in a invalid user name. +The response to an invalid name should be identical to +that for a valid name. +.PP +When the slow encryption algorithm was first implemented, +the encryption was done only if the user name was valid, +because otherwise there was no encrypted password to +compare with the supplied password. +The result was that the response was delayed +by about one-half second if the name was valid, but was +immediate if invalid. +The bad guy could find out +whether a particular user name was valid. +The routine was modified to do the encryption in either +case. +.SH +CONCLUSIONS +.PP +On the issue of password security, UNIX is probably +better than most systems. +The use of encrypted passwords appears reasonably +secure in the absence of serious attention of experts +in the field. +.PP +It is also worth some effort to conceal even the encrypted +passwords. +Some UNIX systems have instituted what is called an +``external security code'' that must be typed when +dialing into the system, but before logging in. +If this code is changed periodically, then someone +with an old password will likely be prevented from +using it. +.PP +Whenever any security procedure is instituted that attempts +to deny access to unauthorized persons, it is wise to +keep a record of both successful and unsuccessful attempts +to get at the secured resource. +Just as an out-of-hours visitor to a computer center normally +must not only identify himself, but a record is usually also kept of +his entry. +Just so, it is a wise precaution to make and keep a record +of all attempts to log into a remote-access time-sharing +system, and certainly all unsuccessful attempts. +.PP +Bad guys fall on a spectrum whose one end is someone with +ordinary access to a system and whose goal is to find +out a particular password (usually that of the super-user) +and, at the other end, someone who wishes to collect as +much password information as possible from as many systems +as possible. +Most of the work reported here serves to frustrate the latter type; +our experience indicates that the former type of bad guy never +was very successful. +.PP +We recognize that a time-sharing system must operate in a +hostile environment. +We did not attempt to hide the security aspects of the operating +system, thereby playing the customary make-believe game in +which weaknesses of the system are not discussed no matter +how apparent. +Rather we advertised the password algorithm and invited attack +in the belief that this approach would minimize future trouble. +The approach has been successful. +.SG MH-1271-RM/KT +.SH +References +.IP [1] +Ritchie, D.M. and Thompson, K. +The UNIX Time-Sharing System. +.I +Comm. ACM +.B +17 +.R +(July 1974), +pp. 365-375. +.IP [2] +.I +Proposed Federal Information Processing Data Encryption Standard. +.R +Federal Register (40FR12134), March 17, 1975 +.IP [3] +Wilkes, M. V. +.I +Time-Sharing Computer Systems. +.R +American Elsevier, +New York, (1968). +.IP [4] +U. S. Patent Number 2,089,603. diff --git a/usr/doc/security b/usr/doc/security new file mode 100644 index 0000000000..c1ae3968be --- /dev/null +++ b/usr/doc/security @@ -0,0 +1,351 @@ +.ND June 10, 1977 +.TL +On the Security of UNIX +.AU +Dennis M. Ritchie +.AI +.MH +.PP +Recently there has been much interest in the security +aspects of operating systems and software. +At issue is the ability +to prevent undesired +disclosure of information, destruction of information, +and harm to the functioning of the system. +This paper discusses the degree of security which can be provided +under the +.UX +system and offers a number of hints +on how to improve security. +.PP +The first fact to face is that +.UX +was not developed with +security, in any realistic sense, in mind; +this fact alone guarantees a vast number of holes. +(Actually the same statement can be made with respect +to most systems.) +The area of security in which +.UX +is theoretically weakest is +in protecting against crashing or at least crippling +the operation of the system. +The problem here is not mainly in uncritical +acceptance of bad parameters to system calls\(em +there may be bugs in this area, but none are known\(em +but rather in lack of checks for excessive +consumption of resources. +Most notably, there is no limit on the amount of disk +storage used, either in total space allocated or in +the number of files or directories. +Here is a particularly ghastly shell sequence guaranteed +to stop the system: +.DS +while : ; do + mkdir x + cd x +done +.DE +Either a panic will occur because all the i-nodes +on the device are used up, or all the disk blocks will +be consumed, thus preventing anyone from writing files +on the device. +.PP +In this version of the system, +users are prevented from creating more than +a set number of processes simultaneously, +so unless users are in collusion it is unlikely that any one +can stop the system altogether. +However, creation of 20 or so CPU or disk-bound jobs +leaves few resources available for others. +Also, if many large jobs are run simultaneously, +swap space may run out, causing a panic. +.PP +It should be evident that excessive consumption of disk +space, files, swap space, and processes can easily occur +accidentally in malfunctioning programs +as well as at command level. +In fact +.UX +is essentially defenseless against this kind of +abuse, +nor is there any easy fix. +The best that can be said is that it is generally +fairly +easy to detect what has happened when disaster +strikes, +to identify the user responsible, +and take appropriate action. +In practice, +we have found that difficulties +in this area are rather rare, +but we have not been faced with malicious users, +and enjoy a fairly generous supply of +resources which have served to cushion us against +accidental overconsumption. +.PP +The picture is considerably brighter +in the area of protection of information +from unauthorized perusal and destruction. +Here the degree of security seems (almost) +adequate theoretically, and the problems lie +more in the necessity for care in the actual use of +the system. +.PP +Each +.UX +file has associated with it +eleven bits of protection information +together with a user identification number and a user-group +identification number +(UID and GID). +Nine of the protection bits +are used to specify independently +permission to read, to write, and to execute the file +to the user himself, to members of the user's +group, and to all other users. +Each process generated +by or for a user has associated with +it an effective UID and a real UID, and an effective and real GID. +When an attempt is made +to access the file for reading, writing, or execution, +the user process's effective UID is compared +against the file's UID; if a match is obtained, +access is granted provided the read, write, or execute +bit respectively for the user himself is +present. +If the UID for the file and for the process fail to match, +but the GID's do match, the group bits are used; if the GID's +do not match, the bits for other users are tested. +The last two bits of each file's protection information, +called the set-UID and set-GID bits, +are used only when the +file is executed as a program. +If, in this case, the set-UID bit is on for the file, +the effective UID for the process is changed to the UID +associated with the file; the change persists +until the process terminates or until the UID +changed again by another execution of a set-UID file. +Similarly the effective group ID of a process is changed +to the GID associated with a file +when that file is executed and has the set-GID bit set. +The real UID and GID of a process do not change +when any file is executed, +but only as the result of a privileged system +call. +.PP +The basic notion of the set-UID and set-GID +bits is that one may write a program which is executable +by others and which maintains files accessible to others only +by that program. +The classical example is the game-playing program which +maintains records of the scores of its players. +The program itself has to read and write the score file, +but +no one but the game's sponsor can be allowed +unrestricted access to the file lest they manipulate +the game to their own advantage. +The solution is to +turn on the set-UID bit of the +game +program. +When, and only when, it is invoked +by players of the game, it may update the score file +but ordinary programs executed by others cannot +access the score. +.PP +There are a number of special cases involved +in determining access permissions. +Since executing a directory as a program is a meaningless +operation, the execute-permission +bit, for directories, is taken instead to mean +permission to search the directory for a given file +during the scanning of a path name; +thus if a directory has execute permission but no read +permission for a given user, he may access files +with known names in the directory, +but may not read (list) the entire contents of the +directory. +Write permission on a directory is interpreted to +mean that the user may create and delete +files in that directory; +it is impossible +for any user to write directly into any directory. +.PP +Another, and from the point of view of security, much +more serious special case is that there is a ``super user'' +who is able to read any file and write any non-directory. +The super-user is also able to change the protection +mode and the owner UID and GID of any file +and to invoke privileged system calls. +It must be recognized that the mere notion of +a super-user is a theoretical, and usually +practical, blemish on any protection scheme. +.PP +The first necessity for a secure system +is of course arranging that all files and directories +have the proper protection modes. +Traditionally, +.UX +software has been exceedingly +permissive in this regard; +essentially all commands create files +readable and writable by everyone. +In the current version, +this policy may be easily adjusted to suit the needs of +the installation or the individual user. +Associated with each process and its descendants +is a mask, which is in effect +.I and\fR\|-ed +with the mode of every file and directory created by +that process. +In this way, users can arrange that, by default, +all their files are no more accessible than they wish. +The standard mask, set by +.I login, +allows all permissions to the user himself and to his group, +but disallows writing by others. +.PP +To maintain both data privacy and +data integrity, +it is necessary, and largely sufficient, +to make one's files inaccessible to others. +The lack of sufficiency could follow +from the existence of set-UID programs +created by the user +and the possibility of total +breach of system security +in one of the ways discussed below +(or one of the ways not discussed below). +For greater protection, +an encryption scheme is available. +Since the editor is able to create encrypted +documents, and the +.I crypt +command can be used to pipe such documents into +the other text-processing programs, +the length of time during which cleartext versions +need be available is strictly limited. +The encryption scheme used is not one of the strongest +known, but it is judged adequate, in the sense that +cryptanalysis +is likely to require considerably more effort than more direct +methods of reading the encrypted files. +For example, a user who stores data that he regards as truly secret +should be aware that he is implicitly trusting the system +administrator not to install a version of the crypt command +that stores every typed password in a file. +.PP +Needless to say, the system administrators +must be at least as careful as their most +demanding user to place the correct +protection mode on the files under their +control. +In particular, +it is necessary that special files be protected +from writing, and probably reading, by ordinary +users when +they store sensitive files belonging to other +users. +It is easy to write programs that examine and change +files by accessing the device +on which the files live. +.PP +On the issue of password security, +.UX +is probably better than most systems. +Passwords are stored in an encrypted form +which, in the absence of serious attention +from specialists in the field, +appears reasonably secure, +provided its limitations are understood. +In the current version, it is based on a slightly +defective version of the Federal DES; +it is purposely defective so that +easily-available hardware is useless for attempts at exhaustive +key-search. +Since both the encryption algorithm and the encrypted passwords +are available, +exhaustive enumeration of potential passwords +is still feasible up to a point. +We have observed that users choose passwords that are easy to guess: +they are short, or from a limited alphabet, or +in a dictionary. +Passwords should be +at least six characters long and randomly chosen from an alphabet +which includes digits and special characters. +.PP +Of course there also exist +feasible non-cryptanalytic +ways of finding out passwords. +For example: write a program which types out ``login:\|'' +on the typewriter and copies whatever is typed +to a file of your own. +Then invoke the command and go away until the victim arrives. +.PP +The set-UID (set-GID) +notion must be used carefully if any security is to be maintained. +The first thing to keep in mind is that +a writable set-UID file can have another program copied onto it. +For example, if the super-user +.I (su) +command is writable, +anyone can copy the shell +onto it and get a password-free version +of +.I su. +A more subtle problem +can come from +set-UID programs which are not sufficiently +careful of what is fed into them. +To take an obsolete example, +the previous version of the +.I mail +command was set-UID and owned by the super-user. +This version sent mail to the recipient's own directory. +The notion was that one should be able to send +mail to anyone even if they want to protect +their directories from writing. +The trouble was that +.I mail +was rather dumb: +anyone could mail someone else's private file to himself. +Much more serious +is the following scenario: +make a file with a line like one in the password file +which allows one to log in as the super-user. +Then make a link named ``.mail'' to the password file +in some writable +directory on the same device as the password file (say /tmp). +Finally mail the bogus login line to /tmp/.mail; +You can then login as the super-user, +clean up the incriminating evidence, +and have your will. +.PP +The fact that users can mount their own disks and tapes +as file systems +can be another way of gaining super-user status. +Once a disk pack is mounted, the system believes +what is on it. +Thus one can take a blank disk pack, +put on it anything desired, +and mount it. +There are obvious and unfortunate consequences. +For example: +a mounted disk with garbage on it will crash the +system; +one of the files on the mounted disk can easily be +a password-free version of +.I su; +other files can be unprotected entries for special files. +The only easy fix for this problem is to +forbid the use of +.I mount +to unprivileged users. +A partial solution, not so restrictive, +would be to have the +.I mount +command examine the special file for bad data, +set-UID programs owned by others, and accessible +special files, +and balk at unprivileged invokers. diff --git a/usr/doc/sed b/usr/doc/sed new file mode 100644 index 0000000000..e0333b3b1a --- /dev/null +++ b/usr/doc/sed @@ -0,0 +1,1259 @@ +.hw de-limit +.hw de-limit-ing +.RP +....TM 78-1270-1 39199 39199-11 +.ND August 15, 1978 +.TL +SED \(em A Non-interactive Text Editor +.AU "MH 2C-555" 3302 +Lee E. McMahon +.AI +.MH +.OK +Context search +Editing +.AB +.ul +Sed +is a non-interactive context editor +that runs on the +.UX +operating system. +.ul +Sed +is +designed to be especially useful in +three cases: +.in +1i +.LP +.ti -.5i +1) +To edit files too large for comfortable +interactive editing; +.ti -.5i +2) +To edit any size file when the sequence +of editing commands is too complicated to be comfortably +typed in interactive mode. +.ti -.5i +3) +To perform multiple `global' editing functions +efficiently in one pass through the input. +.in -1i +.LP +This memorandum constitutes a manual for users of +.ul +sed. +.AE +.CS 10 0 10 0 0 1 +.SH +Introduction +.LP +.ul +Sed +is a non-interactive context editor designed to be especially useful in +three cases: +.in +1i +.LP +.ti -.5i +1) +To edit files too large for comfortable +interactive editing; +.ti -.5i +2) +To edit any size file when the sequence +of editing commands is too complicated to be comfortably +typed in interactive mode; +.ti -.5i +3) +To perform multiple `global' editing functions +efficiently in one pass through the input. +.in -1i +.LP +Since only a few lines of the input reside in core +at one time, and no temporary files are used, +the effective size of file that can be edited is limited only +by the requirement that the input and output fit simultaneously +into available secondary storage. +.LP +Complicated editing scripts can be created separately and given +to +.ul +sed +as a command file. +For complex edits, this saves considerable typing, and its +attendant errors. +.ul +Sed +running from a command file is much more efficient than any interactive +editor known to the author, even if that editor +can be driven by a pre-written script. +.LP +The principal loss of functions compared to an interactive editor +are lack of relative addressing (because of the line-at-a-time +operation), and lack of immediate verification that a command has +done what was intended. +.LP +.ul +Sed +is a lineal descendant of the UNIX editor, +.ul +ed. +Because of the differences between interactive and non-interactive +operation, considerable changes have been made between +.ul +ed +and +.ul +sed; +even confirmed users of +.ul +ed +will frequently be surprised (and probably chagrined), +if they rashly use +.ul +sed +without reading Sections 2 and 3 of this document. +The most striking family resemblance between the two +editors is in the class of patterns (`regular expressions') they +recognize; +the code for matching patterns is copied almost +verbatim from the code for +.ul +ed, +and the description of regular expressions in Section 2 +is copied almost verbatim from the UNIX Programmer's +Manual[1]. (Both code and description were written by Dennis +M. Ritchie.) +.LP +.SH +1. Overall Operation +.LP +.ul +Sed +by default copies the standard input to the standard output, +perhaps performing one or more editing commands on each +line before writing it to the output. +This behavior may be modified by flags on the command line; +see Section 1.1 below. +.LP +The general format of an editing command is: +.LP +.in +1i +[address1,address2][function][arguments] +.LP +.in -1i +One or both addresses may be omitted; the format of addresses is +given in Section 2. +Any number of blanks or tabs may separate the addresses +from the function. +The function must be present; the available commands are discussed +in Section 3. +The arguments may be required or optional, according to which function +is given; again, they are discussed in Section 3 under each individual +function. +.LP +Tab characters and spaces at the beginning of lines are ignored. +.LP +.SH +1.1. Command-line Flags +.LP +Three flags are recognized on the command line: +.in +1i +.ti -.5i +.B +-n: +.R +tells +.ul +sed +not to copy all lines, but only those specified by +.ul +p +functions or +.ul +p +flags after +.ul +s +functions (see Section 3.3); +.ti -.5i +.B +-e: +.R +tells +.ul +sed +to take the next argument as an editing command; +.ti -.5i +.B +-f: +.R +tells +.ul +sed +to take the next argument as a file name; +the file should contain editing commands, one to a line. +.in -1i +.SH +1.2. Order of Application of Editing Commands +.LP +Before any editing is done (in fact, before any input file is +even opened), all the editing commands are compiled into +a form which will be moderately efficient during +the execution phase (when the commands are actually applied to +lines of the input file). +The commands are compiled in the order in which they are +encountered; this is generally the order in which they will +be attempted at execution time. +The commands are applied one at a time; the input to each command +is the output of all preceding commands. +.LP +The default linear order of application of editing commands can +be changed by the flow-of-control commands, +.ul +t +and +.ul +b +(see Section 3). +Even when the order of application is changed +by these commands, it is still true that the input line to any +command is the output of any previously applied command. +.SH +1.3. Pattern-space +.LP +The range of pattern matches is called the pattern space. +Ordinarily, the pattern space is one line of the input text, +but more than one line can be read into the pattern space +by using the +.ul +N +command (Section 3.6.). +.LP +.SH +1.4. Examples +.LP +Examples are scattered throughout the text. +Except where otherwise noted, +the examples all assume the following input text: +.LP +.in +.5i +.nf +In Xanadu did Kubla Khan +A stately pleasure dome decree: +Where Alph, the sacred river, ran +Through caverns measureless to man +Down to a sunless sea. +.in -.5i +.fi +.LP +(In no case is the output of the +.ul +sed +commands to be considered an improvement +on Coleridge.) +.LP +.SH +Example: +.LP +The command +.in +.5i +.LP +2q +.in -.5i +.LP +will quit after copying the first two lines of the input. +The output will be: +.LP +.in +.5i +.nf +In Xanadu did Kubla Khan +A stately pleasure dome decree: +.in -.5i +.fi +.LP +.SH +2. ADDRESSES: Selecting lines for editing +.LP +Lines in the input file(s) to which editing commands are +to be applied can be selected by addresses. +Addresses may be either line numbers or context addresses. +.LP +The application of a group of commands can be controlled by +one address (or address-pair) by grouping +the commands with curly braces (`{ }')(Sec. 3.6.). +.SH +2.1. Line-number Addresses +.LP +A line number is a decimal integer. +As each line is read from the input, a line-number counter +is incremented; +a line-number address matches (selects) the input +line which causes the internal counter to equal the +address line-number. +The counter runs cumulatively through multiple input files; +it is not reset when a new input file is opened. +.LP +As a special case, the character +$ +matches the last line of the last input file. +.SH +2.2. Context Addresses +.LP +A context address is a pattern (`regular expression') enclosed in slashes (`/'). +The regular expressions recognized by +.ul +sed +are constructed as follows: +.in +1i +.LP +.ti -.5i +1) +An ordinary character (not one of those discussed below) +is a regular expression, and matches that character. +.LP +.ti -.5i +2) +A circumflex `^' at the beginning of a regular expression +matches the null character at the beginning of a line. +.ti -.5i +3) +A dollar-sign `$' at the end of a regular expression +matches the null character at the end of a line. +.ti -.5i +4) +The characters `\en' match an imbedded newline character, +but not the newline at the end of the pattern space. +.ti -.5i +5) +A period `.' matches any character except the terminal newline +of the pattern space. +.ti -.5i +6) +A regular expression followed by an asterisk `*' matches any +number (including 0) of adjacent occurrences of the regular +expression it follows. +.ti -.5i +7) +A string of characters in square brackets `[ ]' matches any character +in the string, and no others. +If, however, the first character of the string is circumflex `^', +the regular expression matches any character +.ul +except +the characters in the string and the terminal newline of the pattern space. +.ti -.5i +8) +A concatenation of regular expressions is a regular expression +which matches the concatenation of strings matched by the +components of the regular expression. +.ti -.5i +9) +A regular expression between the sequences `\e(' and `\e)' is +identical in effect to the unadorned regular expression, but has +side-effects which are described under the +.ul +s +command below and specification 10) immediately below. +.ti -.5i +10) +The expression +.ul +`\|\ed' +means the same string of characters matched +by an expression enclosed in `\e(' and `\e)' +earlier in the same pattern. +Here +.ul +d +is a single digit; +the string specified is that beginning with the +\fId\|\fRth +occurrence of `\e(' counting from the left. +For example, the expression +`^\e(.*\e)\e1' matches a line beginning with +two repeated occurrences of the same string. +.ti -.5i +11) +The null regular expression standing alone (e.g., `//') is +equivalent to the last regular expression compiled. +.in -1i +.LP +To use one of the special characters (^ $ . * [ ] \e /) as a literal +(to match an occurrence of itself in the input), precede the +special character by a backslash `\e'. +.LP +For a context address to `match' the input requires that +the whole pattern within the address match some +portion of the pattern space. +.SH +2.3. Number of Addresses +.LP +The commands in the next section can have 0, 1, or 2 addresses. +Under each command the maximum number of allowed addresses is +given. +For a command to have more addresses than the maximum allowed +is considered an error. +.LP +If a command has no addresses, it is applied to every line +in the input. +.LP +If a command has one address, it is applied to all +lines which match that address. +.LP +If a command has two addresses, it is applied to the first +line which matches the first address, and to all subsequent lines +until (and including) the first subsequent line which matches +the second address. +Then an attempt is made on subsequent lines to again match the first +address, and the process is repeated. +.LP +Two addresses are separated by a comma. +.SH +Examples: +.LP +.nf +.in +.5i +.ta 1i 2i +/an/ matches lines 1, 3, 4 in our sample text +/an.*an/ matches line 1 +/^an/ matches no lines +/./ matches all lines +/\e./ matches line 5 +/r*an/ matches lines 1,3, 4 (number = zero!) +/\e(an\e).*\e1/ matches line 1 +.fi +.in 0 +.LP +.SH +3. FUNCTIONS +.LP +All functions are named by a single character. +In the following summary, the maximum number of allowable addresses +is given enclosed in parentheses, then the single character +function name, possible arguments enclosed in angles (< >), +an expanded English translation of the single-character name, +and finally a description of what each function does. +The angles around the arguments are +.ul +not +part of the argument, and should not be typed +in actual editing commands. +.SH +3.1. Whole-line Oriented Functions +.LP +.in +1i +.ti -.5i +(2)d -- delete lines +.if t .sp .5 +The +.ul +d +function deletes from the file (does not write to the output) +all those lines matched by its address(es). +.if t .sp .5 +It also has the side effect that no further commands are attempted +on the corpse of a deleted line; +as soon as the +.ul +d +function is executed, a new line is read from the input, and +the list of editing commands is re-started from the beginning +on the new line. +.ti -.5i +.if t .sp .5 +(2)n -- next line +.if t .sp .5 +The +.ul +n +function reads the next line from the input, replacing +the current line. +The current line is written to the output if it should +be. +The list of editing commands is continued +following the +.ul +n +command. +.if t .sp .5 +.nf +.in -.5i +(1)a\e + -- append lines +.in +.5i +.fi +.if t .sp .5 +The +.ul +a +function causes the argument to be written to the +output after the line matched by its address. +The +.ul +a +command is inherently multi-line; +.ul +a +must appear at the end of a line, and may contain +any number of lines. +To preserve the one-command-to-a-line fiction, +the interior newlines must be hidden by a +backslash character (`\e') immediately preceding the +newline. +The argument is terminated by the first unhidden +newline (the first one not immediately preceded +by backslash). +.if t .sp .5 +Once an +.ul +a +function is successfully executed, will be +written to the output regardless of what later commands do to +the line which triggered it. +The triggering line may be +deleted entirely; will still be written to the output. +.if t .sp .5 +The is not scanned for address matches, and no editing +commands are attempted on it. +It does not cause any change in the line-number counter. +.if t .sp .5 +.nf +.in -.5i +(1)i\e + -- insert lines +.in +.5i +.fi +.if t .sp .5 +The +.ul +i +function behaves identically to the +.ul +a +function, except that is written to the output +.ul +before +the matched line. +All other comments about the +.ul +a +function apply to the +.ul +i +function as well. +.if t .sp .5 +.nf +.in -.5i +(2)c\e + -- change lines +.in +.5i +.fi +.if t .sp .5 +The +.ul +c +function deletes the lines selected by its address(es), +and replaces them with the lines in . +Like +.ul +a +and +.ul +i, +.ul +c +must be followed by a newline hidden by a backslash; +and interior new lines in must be hidden by +backslashes. +.if t .sp .5 +The +.ul +c +command may have two addresses, and therefore select a range +of lines. +If it does, all the lines in the range are deleted, but only +one copy of is written to the output, +.ul +not +one copy per line deleted. +As with +.ul +a +and +.ul +i, + is not scanned for address matches, and no +editing commands are attempted on it. +It does not change the line-number counter. +.if t .sp .5 +After a line has been deleted by a +.ul +c +function, no further commands are attempted on the corpse. +.if t .sp .5 +If text is appended after a line by +.ul +a +or +.ul +r +functions, and the line is subsequently changed, the text +inserted by the +.ul +c +function will be placed +.ul +before +the text of the +.ul +a +or +.ul +r +functions. +(The +.ul +r +function is described in Section 3.4.) +.if t .sp .5 +.in -1i +.ul +Note: +Within the text put in the output by these functions, +leading blanks and tabs will disappear, as always in +.ul +sed +commands. +To get leading blanks and tabs into the output, precede the first +desired blank or tab by a backslash; the backslash will not +appear in the output. +.SH +Example: +.LP +The list of editing commands: +.LP +.in +.5i +.nf +n +a\e +XXXX +d +.in -.5i +.fi +.LP +applied to our standard input, produces: +.LP +.in +.5i +.nf +In Xanadu did Kubhla Khan +XXXX +Where Alph, the sacred river, ran +XXXX +Down to a sunless sea. +.in -.5i +.fi +.LP +In this particular case, +the same effect would be produced by either +of the two following command lists: +.LP +.in +.5i +.nf +n n +i\e c\e +XXXX XXXX +d +.in -.5i +.fi +.LP +.in 0 +.SH +3.2. Substitute Function +.LP +One very important function changes parts of lines selected by +a context search within the line. +.if t .sp .5 +.in +1i +.ti -.5i +(2)s -- substitute +.if t .sp .5 +The +.ul +s +function replaces +.ul +part +of a line (selected by ) with . +It can best be read: +.if t .sp .5 +.ti +1i +Substitute for , +.if t .sp .5 +The argument contains a pattern, +exactly like the patterns in addresses (see 2.2 above). +The only difference between and a context address is +that the context address must be delimited by slash (`/') characters; + may be delimited by any character other than space or +newline. +.if t .sp .5 +By default, only the first string matched by is replaced, +but see the +.ul +g +flag below. +.if t .sp .5 +The + argument begins immediately after the +second delimiting character of , and must be followed +immediately by another instance of the delimiting character. +(Thus there are exactly +.ul +three +instances of the delimiting character.) +.if t .sp .5 +The is not a pattern, +and the characters which are special in patterns +do not have special meaning in . +Instead, other characters are special: +.if t .sp .5 +.in +1i +.ti -.5i +& is replaced by the string matched by +.if t .sp .5 +.ti -.5i +.ul +\ed +(where +.ul +d +is a single digit) is replaced by the \fId\fRth substring +matched by parts of enclosed in `\e(' and `\e)'. +If nested substrings occur in , the \fId\fRth +is determined by counting opening delimiters (`\e('). +.if t .sp .5 +As in patterns, special characters may be made +literal by preceding them with backslash (`\e'). +.if t .sp .5 +.in -1i +The argument may contain the following flags: +.if t .sp .5 +.in +1i +.ti -.5i +g -- substitute for all (non-overlapping) +instances of in the line. +After a successful substitution, the scan for the next +instance of begins just after the end of the +inserted characters; characters put into the line from + are not rescanned. +.if t .sp .5 +.ti -.5i +p -- print the line if a successful replacement was done. +The +.ul +p +flag causes the line to be written to the output if and only +if a substitution was actually made by the +.ul +s +function. +Notice that if several +.ul +s +functions, each followed by a +.ul +p +flag, successfully substitute in the same input line, +multiple copies of the line will be written to the +output: one for each successful substitution. +.if t .sp .5 +.ti -.5i +w -- write the line to a file if a successful +replacement was done. +The +.ul +w +flag causes lines which are actually substituted by the +.ul +s +function to be written to a file named by . +If exists before +.ul +sed +is run, it is overwritten; +if not, it is created. +.if t .sp .5 +A single space must separate +.ul +w +and . +.if t .sp .5 +The possibilities of multiple, somewhat different copies of +one input line being written are the same as for +.ul +p. +.if t .sp .5 +A maximum of 10 different file names may be mentioned after +.ul +w +flags and +.ul +w +functions (see below), combined. +.in 0 +.SH +Examples: +.LP +The following command, applied to our standard input, +.LP +.in +.5i +s/to/by/w changes +.in -.5i +.LP +produces, on the standard output: +.LP +.in +.5i +.nf +In Xanadu did Kubhla Khan +A stately pleasure dome decree: +Where Alph, the sacred river, ran +Through caverns measureless by man +Down by a sunless sea. +.fi +.in -.5i +.LP +and, on the file `changes': +.LP +.in +.5i +.nf +Through caverns measureless by man +Down by a sunless sea. +.fi +.in -.5i +.LP +If the nocopy option is in effect, the command: +.LP +.in +.5i +.nf +s/[.,;?:]/*P&*/gp +.fi +.in -.5i +.LP +produces: +.LP +.in +.5i +.nf +A stately pleasure dome decree*P:* +Where Alph*P,* the sacred river*P,* ran +Down to a sunless sea*P.* +.LP +.in -.5i +.fi +Finally, to illustrate the effect of the +.ul +g +flag, +the command: +.LP +.in +.5i +.nf +/X/s/an/AN/p +.in -.5i +.fi +.LP +produces (assuming nocopy mode): +.in +.5i +.LP +.nf +In XANadu did Kubhla Khan +.fi +.in -.5i +.LP +and the command: +.LP +.in +.5i +.nf +/X/s/an/AN/gp +.in -.5i +.fi +.LP +produces: +.LP +.in +.5i +.nf +In XANadu did Kubhla KhAN +.in -.5i +.fi +.LP +.in 0 +.SH +3.3. Input-output Functions +.LP +.in +1i +.ti -.5i +(2)p -- print +.if t .sp .5 +The print function writes the addressed lines to the standard output file. +They are written at the time the +.ul +p +function is encountered, regardless of what succeeding +editing commands may do to the lines. +.if t .sp .5 +.ti -.5i +(2)w -- write on +.if t .sp .5 +The write function writes the addressed lines to the file named +by . +If the file previously existed, it is overwritten; if not, it is created. +The lines are written exactly as they exist when the write function +is encountered for each line, regardless of what subsequent +editing commands may do to them. +.if t .sp .5 +Exactly one space must separate the +.ul +w +and . +.if t .sp .5 +A maximum of ten different files may be mentioned in write +functions and +.ul +w +flags after +.ul +s +functions, combined. +.if t .sp .5 +.ti -.5i +(1)r -- read the contents of a file +.if t .sp .5 +The read function reads the contents of , and appends +them after the line matched by the address. +The file is read and appended regardless of what subsequent +editing commands do to the line which matched its address. +If +.ul +r +and +.ul +a +functions are executed on the same line, +the text from the +.ul +a +functions and the +.ul +r +functions is written to the output in the order that +the functions are executed. +.if t .sp .5 +Exactly one space must separate the +.ul +r +and . +If a file mentioned by a +.ul +r +function cannot be opened, it is considered a null file, +not an error, and no diagnostic is given. +.if t .sp .5 +.in -1i +NOTE: +Since there is a limit to the number of files that can be opened +simultaneously, care should be taken that no more than ten +files be mentioned in +.ul +w +functions or flags; that number is reduced by one if any +.ul +r +functions are present. +(Only one read file is open at one time.) +.in 0 +.SH +Examples +.LP +Assume that the file `note1' +has the following contents: +.LP +.in +1i +Note: Kubla Khan (more properly Kublai Khan; 1216-1294) +was the grandson and most eminent successor of Genghiz +(Chingiz) Khan, and founder of the Mongol dynasty in China. +.LP +.in 0 +Then the following command: +.LP +.nf +.in +.5i +/Kubla/r note1 +.in -.5i +.fi +.LP +produces: +.LP +.nf +.in +.5i +In Xanadu did Kubla Khan +.in +.5i +.fi +Note: Kubla Khan (more properly Kublai Khan; 1216-1294) +was the grandson and most eminent successor of Genghiz +(Chingiz) Khan, and founder of the Mongol dynasty in China. +.in -.5i +.nf +A stately pleasure dome decree: +Where Alph, the sacred river, ran +Through caverns measureless to man +Down to a sunless sea. +.in -.5i +.fi +.LP +.in 0 +.SH +3.4. +Multiple Input-line Functions +.LP +Three functions, all spelled with capital letters, deal +specially with pattern spaces containing imbedded newlines; +they are intended principally to provide pattern matches across +lines in the input. +.if t .sp .5 +.in +1i +.ti -.5i +(2)N -- Next line +.if t .sp .5 +The next input line is appended to the current line in the +pattern space; the two input lines are separated by an imbedded +newline. +Pattern matches may extend across the imbedded newline(s). +.if t .sp .5 +.ti -.5i +(2)D -- Delete first part of the pattern space +.if t .sp .5 +Delete up to and including the first newline character +in the current pattern space. +If the pattern space becomes empty (the only newline +was the terminal newline), +read another line from the input. +In any case, begin the list of editing commands again +from its beginning. +.if t .sp .5 +.ti -.5i +(2)P -- Print first part of the pattern space +.if t .sp .5 +Print up to and including the first newline in the pattern space. +.if t .sp .5 +.in 0 +The +.ul +P +and +.ul +D +functions are equivalent to their lower-case counterparts +if there are no imbedded newlines in the pattern space. +.in 0 +.SH +3.5. Hold and Get Functions +.LP +Four functions save and retrieve part of the input for possible later +use. +.if t .sp .5 +.in 1i +.ti -.5i +(2)h -- hold pattern space +.if t .sp .5 +The +.ul +h +functions copies the contents of the pattern space +into a hold area (destroying the previous contents of the +hold area). +.if t .sp .5 +.ti -.5i +(2)H -- Hold pattern space +.if t .sp .5 +The +.ul +H +function appends the contents of the pattern space +to the contents of the hold area; the former and new contents +are separated by a newline. +.if t .sp .5 +.ti -.5i +(2)g -- get contents of hold area +.if t .sp .5 +The +.ul +g +function copies the contents of the hold area into +the pattern space (destroying the previous contents of the +pattern space). +.if t .sp .5 +.ti -.5i +(2)G -- Get contents of hold area +.if t .sp .5 +The +.ul +G +function appends the contents of the hold area to the +contents of the pattern space; the former and new contents are separated by +a newline. +.if t .sp .5 +.ti -.5i +(2)x -- exchange +.if t .sp .5 +The exchange command interchanges the contents +of the pattern space and the hold area. +.in 0 +.SH +Example +.LP +The commands +.nf +.if t .sp .5 + 1h + 1s/ did.*// + 1x + G + s/\en/ :/ +.if t .sp .5 +.fi +applied to our standard example, produce: +.nf +.if t .sp .5 + In Xanadu did Kubla Khan :In Xanadu + A stately pleasure dome decree: :In Xanadu + Where Alph, the sacred river, ran :In Xanadu + Through caverns measureless to man :In Xanadu + Down to a sunless sea. :In Xanadu +.if t .sp .5 +.fi +.SH +3.6. Flow-of-Control Functions +.LP +These functions do no editing on the input +lines, but control the application of functions +to the lines selected by the address part. +.if t .sp .5 +.in +1i +.ti -.5i +(2)! -- Don't +.if t .sp .5 +The +.ul +Don't +command causes the next command +(written on the same line), to be applied to all and only those input lines +.ul +not +selected by the adress part. +.if t .sp .5 +.ti -.5i +(2){ -- Grouping +.if t .sp .5 +The grouping command `{' causes the +next set of commands to be applied +(or not applied) as a block to the +input lines selected by the addresses +of the grouping command. +The first of the commands under control of the grouping +may appear on the same line as the +`{' or on the next line. +.LP +The group of commands is terminated by a +matching `}' standing on a line by itself. +.LP +Groups can be nested. +.ti -.5i +.if t .sp .5 +(0):