├── COPYING ├── README.md ├── examples ├── herosjourney.gg ├── names.gg ├── places.gg ├── test.gg └── zizek.gg ├── ggc.1 ├── ggc.sh └── install.sh /COPYING: -------------------------------------------------------------------------------- 1 | GGC (c) 2015, John Ohno. 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | * Redistributions of source code must retain the above copyright 7 | notice, this list of conditions and the following disclaimer. 8 | * Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | * Neither the name of the nor the 12 | names of its contributors may be used to endorse or promote products 13 | derived from this software without specific prior written permission. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 16 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY 19 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ggc 2 | Generative Grammar Compiler 3 | 4 | Usage: 5 | 6 | ./ggc.sh output.py 7 | 8 | See [examples/test.gg](examples/test.gg), [examples/zizek.gg](examples/zizek.gg), and [examples/herosjourney.gg](examples/herosjourney.gg) for examples of grammars of varying complexity. 9 | 10 | Notes: 11 | 12 | * Anonymous rules are possible by enclosing options in braces ({}) 13 | * Named rules can be substituted using a single dollar sign before the named rule. If two dollar signs are used, then a cached expansion of that rule will be used instead (and everywhere that the double-dollarsign version is used will be the same). 14 | * Lines beginning with '#' are comments, unless they begin with '#include' -- in which case, the second (space-separated) token is a filename to include. This filename cannot include spaces, because the spaces cannot be escaped. 15 | * Duplicated spaces or separators will not be deduplicated; this is a FEATURE. 16 | * Arbitrary python code can be inserted into a rule, if you're clever about it. (See the definition for HeroPronoun in [herosjourney](examples/herosjourney.gg) as an example.) This is currently the only way to do conditionals. This code is not sanitized or sandboxed. Obviously, you should manually check any untrusted grammar. 17 | 18 | Bugs: 19 | 20 | * Recursive grammars are not possible, because the generated python code will generate all possible components immediately, whether or not they are used. 21 | * Mismatched braces are neither detected nor handled gracefully. (WONTFIX) 22 | 23 | -------------------------------------------------------------------------------- /examples/herosjourney.gg: -------------------------------------------------------------------------------- 1 | #include names.gg 2 | #include places.gg 3 | NARRATIVE:=$TITLE\n\n$SEPARATION\n$INITIATION\n$RETURN\n 4 | HERO:=$fullName 5 | HEROGENDER:=male,female 6 | SENEXGENDER:=male,female 7 | HOMETOWN:=$town 8 | OTHERWORLD:=$imaginaryPlace 9 | ENEMY:={Devil,Balrog,Emperor,King,Monster,Archon,Alien,Dragon,Half-Elf,Giant,Minotaur,Mannakin,Mandragora,Werewolf,Vampire,Lich,Succubus} {Az,Zar,Kor,Ak,On,Ark,Xek,Rilk}{ar,or,arc,ork,ord}{el,wurm,or,oz,kil,kan} 10 | SENEX:={Old ,Old Man ,Sir ,Dr. ,Professor ,Master ,Brother ,} $fullName { the {Grey,White,Red,Brown,Green,Violet,Gold,Silver,Traveller,Mad Arab,Mad,Ancient,Wise,Necromancer,Mage,Magician,Wizard,Monk,Paladin,Thief,Shaman,Rogue,Knight,Warrior,Priest,Alchemist,Elf,Dwarf,Orc,Man,Night Elf,Halfling,Wolf,Madman,Mad Dog,Eagle-Eyed,Fisher King,Hangman,Dead,Dread,Dragonborn,Yeti Tamer,Dog Whisperer},}{ of {$imaginaryPlace,$town},} 11 | WEAPON:={The,A} {Magic,Enchanted,Golden,Silver,Kryptonite,Adamantium,Elven,Eldrich,Rusty,Green,Violet,Black,Dark,Glowing,Bright,Ancient,Arcane,Cyclopean,Antedeluvian} {Sword,Arrow,Bow,Shield,Cauldron,Light,Staff,Wand,Cup,Pentacle,Hand,Cloak,Cape,Scythe,Dart,Pistol,Stone,Amulet,Locket,Key,Book,Tome,Volume,Grimoire,Spell,Beans,Orb,Crystal,Doll,Stick,Pocketwatch,Mantra,Incantation,Bone,Charm,Rebis,Geas}{, of Glory, of Wrath, of Shame, of Love, of Power, of Darkness} 12 | TITLE:=$$HERO{, and $$SENEX} in $$OTHERWORLD,From $$HOMETOWN to $$OTHERWORLD{, and Back Again},The {Secret,Mystery} of {$$OTHERWORLD,$$HOMETOWN,$$WEAPON},$$WEAPON in {$$HOMETOWN,$$OTHERWORLD},{$$HERO,$$SENEX} and $$WEAPON 13 | HeroPronoun:="+("he" if "$$HEROGENDER"=="male" else "she")+" 14 | HeroPosessive:="+("his" if "$$HEROGENDER"=="male" else "her")+" 15 | HeroAttribute1:={Young,Brave,{Fair,Red,Golden}-haired,Courageous} 16 | weather:=It was a {warm,cold,hot,dark,muggy,foggy,humid}{ and,\,} {crisp,clear,cloudy,rainy,windy,stormy,moon-lit,overcast} {day,night} 17 | location:={a,the} {cave,cavern,mansion,castle,tower,shack,riverbed,gutter,forest,valley,trees,wall,shipyard,junkyard} {at the edge of,under,behind,above,beneath,a few miles away from,beside} {town,$$HeroPosessive{{, {grandmother\'s,crazy uncle\'s}} house, school},the old mill,the forbidden zone,$$HOMETOWN} 18 | weaponAttribute:={dusty,rusty,worn,eldrich,cyclopean,ancient,antedeluvian,carved,hammered,riven,sharp,dull,glowing,pulsating,incredible,silent,vibrating,numinous} {pitch-black,green,red,violet,purple,orange,yellow,pink,leather,rawhide,grassy,wood,silver,gold,copper,brass,bronze,iron,steel,jewel-encrusted,gem-encrusted,gilded,gilt} {blade,handle,shaft,chain,harness,holster,grip,spikes,tether,tip,underside,shaft,handgrip,inlay,inlays,globes,patterns,carvings,runes,sigils,engravings,tassles,barrel,sack,satchel} 19 | aweAdjective:={beautiful,enchanting,terrifying,horrible,awful,amazing,incredible,bizarre,strange,ominous,numinous,horrifying} 20 | EnemyAttribute1:=$aweAdjective 21 | EnemyAttribute2:={slimy,scaly,squamous,rugose,clammy,oozing,hairy,wrinkly,dust-dry} 22 | EnemyAttribute:=$EnemyAttribute1 $EnemyAttribute2 23 | SenexHome:=$location 24 | SenexHomeDescription:=a $aweAdjective place\, {cut into the hillside,deep beneath the earth,hanging off a cliff,in the darkest depths of the forest,on the highest peak of the mountain,in the shadow of the mountain,nestled in the trunk of a great oak tree}\, made of {great blocks of granite,pure white marble,old driftwood,sod and straw,crumbling brick,ancient outcroppings,strange rock formations,the living bodies of plants,a heap of disintegrating animal hides,sticks and mud,uneven stone,concrete and rebar}\, with $aweAdjective {animals hanging from the cieling,organs in jars stacked on the shelves,potions sitting in the corner,chicken feet holding it off the ground,worm-eaten books piled against the walls,weapons above the mantle} and a {giant bonfire,great glowing orb,bubbling cauldron,summoning circle,rusty cage,operating table} {on,above,below,in the center of} {the drawing room,the library,the workshop,the yard} 25 | intro:=Once{\, long ago, upon a time,}\, in {the city of,the town of,the land of,the hamlet of,the village of} $$HOMETOWN\, there {lived,resided} $$HERO. $weather. $$HeroPronoun {first ,}{found,discovered,saw,came upon} $$WEAPON in $location.,$weather in {the city of,the town of,the land of,the hamlet of,the village of} $$HOMETOWN when $$HERO {first ,}{found,discovered,saw} $$WEAPON. It was in $location 26 | intro2:=$intro It was $aweAdjective\, with its $aweAdjective $weaponAttribute and its $aweAdjective $weaponAttribute. $$HeroPronoun didn\'t know {what it was,what to do,what to do with it,what this omen meant,what this message from the gods could mean}\, so $$HeroPronoun went to $$SenexHome to ask $$SENEX. $$SenexHome was $$SenexHomeDescription. \"$$HeroAttribute1 $$HERO\,\" $$SENEX said. \"This weapon\, $$WEAPON\, is a {omen,sign from the gods,warning prophecy} of {doom,misfortune,fortune,times to come,glory}. It means you must {go,journey,travel,quest} to $$OTHERWORLD and {slay,kill,defeat,tame} the $EnemyAttribute $$ENEMY.\" 27 | CallToAdventure:=$intro2 28 | RefusalOfTheCall:= 29 | SupernaturalAid:= 30 | CrossingTheThreshhold:= 31 | BellyOfTheWhale:= 32 | SEPARATION:=$CallToAdventure\n$RefusalOfTheCall\n$SupernaturalAid\n$CrossingTheThreshhold\n$BellyOfTheWhale\n 33 | TheRoadOfTrials:= 34 | TheMeetingWithTheGoddess:= 35 | WomanAsTemptress:= 36 | AtonementWithTheFather:= 37 | Apotheosis:= 38 | TheUltimateBoon:= 39 | INITIATION:=$TheRoadOfTrials\n$TheMeetingWithTheGoddess\n$WomanAsTemptress\n$AtonementWithTheFather\n$Apotheosis\n$TheUltimateBoon\n 40 | RefusalOfTheReturn:= 41 | TheMagicFlight:= 42 | RescueFromWithout:= 43 | TheCrossingOfTheReturnThreshhold:= 44 | MasterOfTwoWorlds:= 45 | FreedomToLive:= 46 | RETURN:=$RefusalOfTheReturn\n$TheMagicFlight\n$RescueFromWithout\n$TheCrossingOfTheReturnThreshhold\n$MasterOfTwoWorlds\n$FreedomToLive\n 47 | 48 | -------------------------------------------------------------------------------- /examples/names.gg: -------------------------------------------------------------------------------- 1 | fullName:={,$honorific }$firstName $lastName{,\, Jr, II, III,\, Esq.} 2 | honorific:=Mr.,Mrs.,Miss,Ms.,Master,Doctor,Professor,$milRank,$royalRank 3 | royalRank:={Lord,Lady},Emper{or,ess},{King,Queen},{Duke,Dutchess} 4 | milRank:={{,$ordinal }Lieutenant ,}{Commander,Captain,Commodore,Ensign,Private,Constable,Inspector,Detective,Admiral,General,Corporal,Colonel}{, $ordinal class} 5 | ordinal:=First,Second,Third 6 | firstName:=Jacob,Michael,Joshua,Matthew,Daniel,Christopher,Andrew,Ethan,Joseph,William,Anthony,David,Alexander,Nicholas,Ryan,Tyler,James,John,Jonathan,Noah,Brandon,Christian,Dylan,Samuel,Benjamin,Nathan,Zachary,Logan,Justin,Gabriel,Jose,Austin,Kevin,Elijah,Caleb,Robert,Thomas,Jordan,Cameron,Jack,Hunter,Jackson,Angel,Isaiah,Evan,Isaac,Luke,Mason,Jason,Jayden,Gavin,Aaron,Connor,Aiden,Aidan,Kyle,Juan,Charles,Luis,Adam,Lucas,Brian,Eric,Adrian,Nathaniel,Sean,Alex,Carlos,Ian,Bryan,Owen,Jesus,Landon,Julian,Chase,Cole,Diego,Jeremiah,Steven,Sebastian,Xavier,Timothy,Carter,Wyatt,Brayden,Blake,Hayden,Devin,Cody,Richard,Seth,Dominic,Jaden,Antonio,Miguel,Liam,Patrick,Carson,Jesse,Tristan,Alejandro,Henry,Victor,Trevor,Bryce,Jake,Riley,Colin,Jared,Jeremy,Mark,Caden,Garrett,Parker,Marcus,Vincent,Kaleb,Kaden,Brady,Colton,Kenneth,Joel,Oscar,Josiah,Jorge,Cooper,Ashton,Tanner,Eduardo,Paul,Edward,Ivan,Preston,Maxwell,Alan,Levi,Stephen,Grant,Nicolas,Omar,Dakota,Alexis,George,Collin,Eli,Spencer,Gage,Max,Cristian,Ricardo,Derek,Micah,Brody,Francisco,Nolan,Ayden,Dalton,Shane,Peter,Damian,Jeffrey,Brendan,Travis,Fernando,Peyton,Conner,Andres,Javier,Giovanni,Shawn,Braden,Jonah,Bradley,Cesar,Emmanuel,Manuel,Edgar,Mario,Erik,Edwin,Johnathan,Devon,Erick,Wesley,Oliver,Trenton,Hector,Malachi,Jalen,Raymond,Gregory,Abraham,Elias,Leonardo,Sergio,Donovan,Colby,Marco,Bryson,Martin,Emily,Madison,Emma,Olivia,Hannah,Abigail,Isabella,Samantha,Elizabeth,Ashley,Alexis,Sarah,Sophia,Alyssa,Grace,Ava,Taylor,Brianna,Lauren,Chloe,Natalie,Kayla,Jessica,Anna,Victoria,Mia,Hailey,Sydney,Jasmine,Julia,Morgan,Destiny,Rachel,Ella,Kaitlyn,Megan,Katherine,Savannah,Jennifer,Alexandra,Allison,Haley,Maria,Kaylee,Lily,Makayla,Brooke,Nicole,Mackenzie,Addison,Stephanie,Lillian,Andrea,Zoe,Faith,Kimberly,Madeline,Alexa,Katelyn,Gabriella,Gabrielle,Trinity,Amanda,Kylie,Mary,Paige,Riley,Leah,Jenna,Sara,Rebecca,Michelle,Sofia,Vanessa,Jordan,Angelina,Caroline,Avery,Audrey,Evelyn,Maya,Claire,Autumn,Jocelyn,Ariana,Nevaeh,Arianna,Jada,Bailey,Brooklyn,Aaliyah,Amber,Isabel,Mariah,Danielle,Melanie,Sierra,Erin,Molly,Amelia,Isabelle,Madelyn,Melissa,Jacqueline,Marissa,Shelby,Angela,Leslie,Katie,Jade,Catherine,Diana,Aubrey,Mya,Amy,Briana,Sophie,Gabriela,Breanna,Gianna,Kennedy,Gracie,Peyton,Adriana,Christina,Courtney,Daniela,Lydia,Kathryn,Valeria,Layla,Alexandria,Natalia,Angel,Laura,Charlotte,Margaret,Cheyenne,Mikayla,Miranda,Naomi,Kelsey,Payton,Ana,Alicia,Jillian,Daisy,Mckenzie,Ashlyn,Sabrina,Caitlin,Summer,Ruby,Rylee,Valerie,Skylar,Lindsey,Kelly,Genesis,Zoey,Eva,Sadie,Alexia,Cassidy,Kylee,Kendall,Jordyn,Kate,Jayla,Karen,Tiffany,Cassandra,Juliana,Reagan,Caitlyn,Giselle,Serenity,Alondra,Lucy,Bianca,Kiara,Crystal,Erica,Angelica,Hope,Chelsea,Alana,Liliana,Brittany,Camila,Makenzie,Lilly,Veronica,Abby,Jazmin,Adrianna,Delaney,Karina,Ellie,Jasmin 7 | lastName:=Chekhov,Dostoyevsky,Gaunt,Goethe,Gogol,Gorky,Hesse,Pushkin,Sacher-Masoch,Tolstoy,Turgenev,Waldau,Wylie,Ainsworth,Austen,Bennett,Brontë,Brontë,Burney,Carlyle,Carroll,Collins,Conrad,Dickens,Disraeli,Eliot,Gissing,Godwin,Hudson,James,Kipling,Maugham,Oliphant,Radcliffe,Scott,Shelley,Shelley,Stevenson,Thackeray,Trollope,Adams,Adams,Aiken,Alcott,Bellamy,Brackenridge,Brown,Chesnutt,Chopin,Cooper,Crane,Davis,Dreiser,Dunbar,Fern,Hawthorne,Hopkins,Howells,James,Jewett,Lippard,Longfellow,Melville,Norris,Page,Poe,Sinclair,Sleeper,Smith,Stowe,Sturgis,Tarkington,Twain,Wharton,Wister,Abbey,Achebe,Acker,Ackerman,Adams,Agee,Aiken,Albee,Alexie,Algren,Allen,Allende,Alvarez,Amis,Andrews,Angelou,Apollinaire,Aragon,Arendt,Artaud,Asch,Ashbery,Asimov,Atwood,Auden,Auel,Auster,Ballard,Banks,Baraka,Barnes,Barrie,Barth,Barthelme,Barthes,Bataille,Baum,Beckett,Beerbohm,Bellow,Benchley,Bergson,Bester,Blanchot,Bloom,Blume,Bolaño,Borges,Bowles,Bradbury,Brautigan,Brecht,Breton,Brodsky,Bukowski,Bulgakov,Burroughs,Burroughs,Byatt,Calvino,Campbell,Camus,Capote,Card,Carroll,Carver,Cather,Céline,Cheever,Cherryh,Chesterton,Chomsky,Clancy,Clarke,Clark,Cocteau,Coetzee,Cohen,Collins,Conrad,Conroy,Coover,Cornwell,Cortázar,Coupland,Coward,Crane,Creeley,Crichton,Cronin,Cummings,Cunningham,Cussler,Dahl,Danticat,Davis,Delany,deBeauvoir,deSaint-Exupéry,DeLillo,Dick,Dickey,Didion,Dillard,Doctorow,Doolittle,Dorris,DosPassos,Douglass,Doyle,Dreiser,Drury,DuBois,Dufresne,DuMaurier,Dürrenmatt,Dunwich,Durkheim,Durrell,Dylan,Ebert,Eco,Eddings,Eliot,EastonEllis,Ellison,Ellroy,Éluard,Ephron,Epstein,Erdrich,Faulkner,Ferlinghetti,Fielding,Finney,Fitzgerald,Fleming,Follett,MadoxFord,Ford,Forester,Forster,Forsyth,Foucault,Fowler,Fowles,Fox,Franzen,Frazier,Freud,Friedan,Friedman,Fromm,Frost,Frye,Fuentes,Fugard,Fuller,Furst,Gaddis,Gaines,Galsworthy,Gandhi,Gardner,Gass,Seuss,Genet,Gibbons,Gide,Gilbert,Ginsberg,Ginzburg,Glück,Godwin,Golding,Goldman,Gordimer,Gordon,Gorky,Grass,Graves,Green,Greenberg,Greene,Grisham,Hailey,Hall,Hammett,Heidegger,Heinlein,Heller,Hemingway,Henry,Herr,Hersey,Hesse,Highsmith,Hitchens,Hoffman,Hornby,Housman,Howard,Hubbard,Hughes,Hurston,Huxley,Ionesco,Irving,Isherwood,Ishiguro,Joyce,Jung,Jünger,Kafka,Keneally,Kennedy,Kerouac,Kerr,Kesey,Keynes,Kilmer,Kincaid,King,Kingsolver,Kingston,Kinsey,Koestler,Koltès,Koontz,Kosinski,Krakauer,Kundera,L'Amour,Larkin,Laurence,Lawrence,Leary,leCarré,L'Engle,LeGuin,Leiris,Lem,Lessing,Lethem,Letts,Liebling,VargasLlosa,Lodge,London,GarcíaLorca,Lorde,Lott,Lovecraft,Lowell,Lowry,Loy,Ludlum,MacLeish,Mailer,Malamud,Malraux,Mamet,Mann,GarcíaMárquez,Matheson,SomersetMaugham,McCarthy,McCullers,McCullough,McEwan,McInerney,McMurtry,Mead,Mencken,Merton,Michener,St.VincentMillay,Miller,Milne,Miłosz,Mitchell,Molnár,Moorcock,Moore,Morrison,Mosley,Mumford,Müller,Munro,Murakami,Murdoch,Nabokov,Naipaul,Nash,Naylor,Némirovsky,Neruda,Nesbit,Neville,Niedecker,Nin,Noon,Nordhoff,Norman,Norris,Oates,O'Brian,O'Casey,O'Connor,Odets,O'Hara,Olmstead,Olson,O'Nan,Ondaatje,O'Neill,Ōe,Orwell,Ozick,Palahniuk,Paley,Pamuk,Parker,Pasternak,Pekar,PerkinsGilman,Piercy,Pinter,Pirandello,Plath,Platonov,Porter,Potok,Potter,Pound,Powell,Powers,Pratchett,Gaiman,Proulx,Proust,Pullman,Puzo,Pynchon,Queneau,Rand,Rawlings,Rhys,Rilke,Robbe-Grillet,Robbins,Roethke,Roth,Rowling,Rushdie,Russell,Russo,deSaint-Exupéry,Sagan,Salinger,Salzman,Sandburg,Saramago,Saroyan,Sartre,Scott-Heron,Sebald,Sebold,Sendak,Seton,Sexton,Shaara,Shapiro,Silko,BashevisSinger,Smiley,Smith,Snow,Snyder,Sokolov,Solzhenitsyn,Sontag,Soyinka,Spillane,Stein,Steinbeck,Stephenson,Stevens,Stewart,Stine,Stirling,Stone,Stoppard,Straub,Sturgeon,Styron,Talese,Tarkington,Tartt,Taylor,Teasdale,Thurber,Tolkien,Toller,Toole,Toomer,Trilling,Trumbo,Tsvetaeva,Turtledove,Tzara,Updike,Uris,Valéry,Vallejo,Vidal,Vonnegut,Walker,Wallace,Walser,Wambaugh,Warren,Waters,Waugh,Wells,Welty,West,Wharton,White,Whitehead,Wiesel,Wilbur,IngallsWilder,Williams,Willis,Wilson,Winterson,Winton,Wister,Wittig,Wodehouse,Wolfe,Woodward,Woolf,Wouk,Woollcott,Wren,Wright 8 | -------------------------------------------------------------------------------- /examples/places.gg: -------------------------------------------------------------------------------- 1 | imaginaryPlace:=Abeir-Toril,Aebrynis,Aereth,Agartha,Alagaesia,Aldea,Aldrazar,Alfheim,All-World,Al Qadim,Alternia,Amber,Amtor,Andalasia,Angeous,Annwn,Arborea,Arbre,Arcanis,Archaeus,Arda,Asgard,Asphodel Meadows,Athas,Atlantika,Atlantis,Avalon,Averoigne,Avila Mulawin,Axis Mundi,Ayotha Amirtha Gangai,Azeroth,Aztlan,Baltia,Barsoom,Barzakh,Bas-Lag,Beir-Toril,Bellezza,Biarmaland,Blackmoor,Blest,Brahmapura,Brasil,Brittia,Calaspia,Camelot,Caprica,Charn,Cibola,City of the Caesars,Cloud,Cloud Cuckoo Land,Cockaigne,Corona,Creation,Crematoria,Cuckoo Land,Cybertron,Dalemark,Damar,Darkover,Davy Jones' Locker,Deltora,Demacia,Demonata,Dinotopia,Discworld,Dominaria,Drool,Duloc,Dying Earth,Earthsea,Earwa,Eberron,Eidolon,El Dorado,Ellesmera,Elrios,Elsword,Elysian Fields,Ember,Emelan,Encantadia,Equestria,Erde,Essos,Estarcion,Eternia,Etheria,Ethra,Everworld,Fairlyland,Falias,Faltha,Fantasia,Fantastica,Far Far Away,Far-The_earth,Finias,Fionavar,Freeport,Gallifrey,Garden of the Hesperides,Gezeitenwelt,Glorantha,Golarion,Gomorrah,Gondwane,Gorias,Green-sky,Guk,Halla,Hawaiki,Hel,Helion Prime,Hell,Hy-Brasil,Hyperborea,Hyrule,Iberia,Idris,Inkworld,Irkalla,Ithania,Jorune,Jotunheim,Jumanji,Jund,Kamigawa,Kelestia,Kelewan,Keltia,Khemti,Kingdom of Reynes,Kingdom of Saguenay,Kolob,Krynn,Kulthea,Kvenland,Kyopelinvuori,Kyralia,La Ciudad Blanca,La Ciudad Invisible,Landover,Layonara,Lemuria,Lodoss,Lore,Lyonesse,Mag Mell,Magnamund,Malazan,Maztica,Meropis,Mictlan,Midcyru,MiddleGate,Midkemia,Mid-World,Mirkwood,Mirrodin,Mistmandtle,Mithgar,Moonacre Valley,Mu,Murias,Muspelheim,Mystara,Naboo,Naranjan,Nardia,Nehwon,Neverland,Neveryon,New Europa,New Texas,Nibiru,Nifhel,Niflehim,Nirn,Norumbega,Nyambe-Tanda,Nysa,Nyumbani,Nyusigrube,Oerth,Og,Oompa-Loompa Land,Ooo,Osten Ard,Oz,Paititi,Pandaemonium,Pandora,Panem,Pegana,Pellucidar,Pern,Planet Claire,Prydain,Prysmos,Pylea,Pyrria,Quahog,Quin,Quivira,Randland,Ravnica,Reynes,Rivendell,Riverdale,Riverworld,Rondo,Saguenay,San RiCardo,Sartorias-deles,Scholomance,Scythae,Shambhala,Shandalar,Shangri-La,Shannara,Sierra de la Plata,Skyrim,Sodom,Spiderwick,Stormhold,Storybrooke,Suddene,Summerland,Svartalfaheimr,Syrnia,Takama-ga-hara,Tamriel,Tartarus,Tarth,Tatooine,Tekumel,Tellene,Terabithia,Terra de Santa Cruz,The Abarat,The Dream Archipelago,The Dreamlands,The Enchanted Forest,The Forgotten Realms,The Four Lands,The Land,The Land of Shadow,Themiscyra,The Shivering Isles,The Uncharted Territories,Third Earth,Thra,Thule,Thuvaraiyam Pathi,Tir,Tir na nOg,Titan,Toontown,Tortall,Tralfamadore,Underland,Uresia,Uriel,Valdemar,Valhalla,Valoran,Velgarth,Videssos,Viriconium,Westeros,Whandoodleland,Wheelie World,Whoville,Wilderlands,Winternesse,Wonderland,Xanadu,Xanth,Xcrawl Earth,Xibalba,Ynev,Yomi,Yrth,Ys,Zamonia,Zendikar,Zimiamvia,Zothique 2 | town:=Abingdon,Accrington,Acle,Acton,Adlington,Alcester,Aldeburgh,Aldershot,Alford,Alfreton,Alnwick,Alsager,Alston,Alton,Altrincham,Amble,Ambleside,Amersham,Amesbury,Ampthill,Andover,Appleby-in-Westmorland,Arlesey,Arundel,Ashbourne,Ashburton,Ashby-de-la-Zouch,Ashby Woulds,Ashford,Ashington,Ashton-under-Lyne,Askern,Aspatria,Atherstone,Attleborough,Axbridge,Axminster,Aylesbury,Aylsham,Bacup,Bakewell,Banbury,Barking,Barnard Castle,Barnes,Barnet,Barnoldswick,Barnsley,Barnstaple,Barrow-in-Furness,Barton-upon-Humber,Basingstoke,Batley,Battle,Bawtry,Beaconsfield,Beaminster,Bebington,Beccles,Beckenham,Bedale,Bedford,Bedworth,Belper,Bentham,Berkeley,Berkhamsted,Berwick-upon-Tweed,Beverley,Bewdley,Bexhill-on-Sea,Bexley,Bicester,Biddulph,Bideford,Biggleswade,Billericay,Billingham,Bilston,Bingham,Bingley,Birchwood,Birkenhead,Bishop Auckland,Bishop's Castle,Bishop's Stortford,Bishop's Waltham,Blackburn,Blackpool,Blackrod,Blackwater and Hawley,Blandford Forum,Bletchley and Fenny Stratford,Blyth,Bodmin,Bognor Regis,Bollington,Bolsover,Bolton,Bootle,Boroughbridge,Boston,Bottesford,Bourne,Bournemouth,Bovey Tracey,Brackley,Bradford-on-Avon,Brading,Bradley Stoke,Bradninch,Braintree,Brampton,Brandon,Braunstone Town,Brentford,Brentwood,Bridgnorth,Bridgwater,Bridlington,Bridport,Brierfield,Brierley,Brigg,Brighouse,Brightlingsea,Brixham,Broadstairs and St Peter's,Bromborough,Bromley,Bromsgrove,Bromyard and Winslow,Broseley,Broughton,Broughton-in-Furness,Bruton,Buckfastleigh,Buckingham,Bude-Stratton,Budleigh Salterton,Bulwell,Bungay,Buntingford,Burford,Burgess Hill,Burgh-le-Marsh,Burnham-on-Crouch,Burnham-on-Sea and Highbridge,Burnley,Burntwood,Burslem,Burton Latimer,Burton upon Trent,Bury,Bury St Edmunds,Bushey,Buxton,Caistor,Callington,Calne,Camborne,Camelford,Cannock,Canvey Island,Carnforth,Carlton Colville,Carshalton,Carterton,Castle Cary,Castleford,Chagford,Chapel-en-le-Frith,Chard,Charlbury,Chatham,Chatteris,Cheadle,Cheltenham,Chertsey,Chesham,Cheshunt,Chesterfield,Chester-le-Street,Chickerell,Chingford,Chippenham,Chipping Campden,Chipping Norton,Chipping Sodbury,Chorley,Chorleywood,Christchurch,Chudleigh,Chulmleigh,Church Stretton,Cinderford,Cirencester,Clare,Clay Cross,Cleator Moor,Cleethorpes,Cleobury Mortimer,Clevedon,Clitheroe,Clun,Cockermouth,Coggeshall,Colburn,Colchester,Coleford,Coleshill,Colne,Colyton,Congleton,Conisbrough,Corbridge,Corby,Corringham,Corsham,Cotgrave,Cowes,Coulsdon,Cramlington,Cranbrook,Craven Arms,Crawley,Crediton,Crewe,Crewkerne,Cricklade,Cromer,Crosby,Crowborough,Croydon,Crowland,Crowle,Cullompton,Dagenham,Dalton Town with Newton,Darley Dale,Darlington,Dartford,Dartmouth,Darwen,Daventry,Dawley,Dawlish,Deal,Dereham,Desborough,Devizes,Dewsbury,Didcot,Dinnington St John's,Diss,Doncaster,Dorchester,Dorking,Dover,Dovercourt,Downham Market,Driffield,Droitwich Spa,Dronfield,Dudley,Dukinfield,Dulverton,Dunstable,Dunwich,Dursley,Ealing,Earl Shilton,Earley,Easingwold,East Cowes,East Grinstead,East Ham,Eastbourne,Eastleigh,East Retford,Eastwood,Eccles,Eccleshall,Edenbridge,Edgware,Edmonton,Egremont,Elland,Ellesmere,Ellesmere Port,Elstree and Borehamwood,Emsworth,Enfield,Epping,Epworth,Erith,Eton,Evesham,Exmouth,Eye,Fairford,Fakenham,Falmouth,Fareham,Faringdon,Farnham,Faversham,Fazeley,Featherstone,Felixstowe,Ferndown,Ferryhill,Filey,Filton,Finchley,Fleet,Fleetwood,Flitwick,Folkestone,Fordbridge,Fordingbridge,Fordwich,Fowey,Framlingham,Frinton and Walton,Frodsham,Frome,Gainsborough,Garstang,Gateshead,Gillingham,Gillingham,Glastonbury,Glossop,Godalming,Godmanchester,Goole,Gorleston,Gosport,Grange-over-Sands,Grantham,Gravesend,Grays,Great Dunmow,Great Torrington,Great Yarmouth,Greater Willington,Grimsby,Guildford,Guisborough,Hadleigh,Hailsham,Halesowen,Halesworth,Halifax,Halstead,Haltwhistle,Redenhall with Harleston,Harlow,Harpenden,Harrogate,Harrow,Hartland,Hartlepool,Harwich,Harworth and Bircotes,Haslemere,Haslingden,Hastings,Hatfield,Hatherleigh,Havant,Haverhill,Haxby,Hayle,Haywards Heath,Heanor and Loscoe,Heathfield,Hebden Royd,Hedge End,Hednesford,Hedon,Helmsley,Helston,Hemel Hempstead,Hemsworth,Hendon,Henley-in-Arden,Henley-on-Thames,Hertford,Hessle,Hetton,Hexham,Heywood,Higham Ferrers,Highworth,High Wycombe,Hinckley,Hingham,Hitchin,Hoddesdon,Holbeach,Holsworthy,Holt,Honiton,Horley,Horncastle,Hornsea,Hornsey,Horsforth,Horsham,Horwich,Houghton Regis,Howden,Huddersfield,Hungerford,Hunstanton,Huntingdon,Hyde,Hythe,Ilford,Ilfracombe,Ilkeston,Ilkley,Ilminster,Immingham,Ingleby Barwick,Ipswich,Irthlingborough,Ivybridge,Jarrow,Keighley,Kempston,Kendal,Kenilworth,Kesgrave,Keswick,Kettering,Keynsham,Kidderminster,Kidsgrove,Kimberley,Kingsbridge,King's Lynn,Kingston-upon-Thames,Kington,Kirkby-in-Ashfield,Kirkby Lonsdale,Kirkby Stephen,Kirkbymoorside,Kirkham,Kirton-in-Lindsey,Knaresborough,Knutsford,Langport,Launceston,Leatherhead,Lechlade,Ledbury,Leek,Leigh,Leighton-Linslade,Leigh-on-Sea,Leiston,Leominster,Letchworth Garden City,Lewes,Leyburn,Leyton,Liskeard,Littlehampton,Loddon,Loftus,Long Sutton,Longridge,Longtown,Looe,Lostwithiel,Loughborough,Loughton,Louth,Lowestoft,Ludgershall,Ludlow,Luton,Lutterworth,Lydd,Lydney,Lyme Regis,Lynton and Lynmouth,Lytham St Annes,Mablethorpe and Sutton,Macclesfield,Madeley,Maghull,Maidenhead,Maidstone,Maldon,Malmesbury,Maltby,Malton,Malvern,Manningtree,Mansfield,Marazion,March,Margate,Market Bosworth,Market Deeping,Market Drayton,Market Harborough,Market Rasen,Market Weighton,Marlborough,Marlow,Maryport,Masham,Matlock,Medlar with Wesham,Melksham,Meltham,Melton Mowbray,Mere,Mexborough,Middleham,Middlesbrough,Middleton,Middlewich,Midhurst,Midsomer Norton,Mildenhall,Millom,Minchinhampton,Minehead,Minster,Mirfield,Mitcham,Mitcheldean,Morecambe,Moretonhampstead,Moreton-in-Marsh,Morley,Morpeth,Mossley,Much Wenlock,Nailsea,Nailsworth,Nantwich,Needham Market,Nelson,Neston,New Alresford,New Mills,New Milton,New Romney,Newark-on-Trent,Newbiggin-by-the-Sea,Newbury,Newcastle-under-Lyme,Newent,Newhaven,Newlyn,Newmarket,Newport,Newport,Newport Pagnell,Newquay,Newton Abbot,Newton-le-Willows,Normanton,North Hykeham,North Petherton,North Tawton,North Walsham,Northallerton,Northam,Northampton,Northfleet,Northleach with Eastington,Northwich,Norton-on-Derwent,Nuneaton,Oakengates,Oakham,Okehampton,Oldbury,Oldham,Ollerton and Boughton,Olney,Ongar,Orford,Ormskirk,Ossett,Oswestry,Otley,Ottery St Mary,Oundle,Paddock Wood,Padiham,Padstow,Paignton,Painswick,Partington,Patchway,Pateley Bridge,Peacehaven,Penistone,Penkridge,Penrith,Penryn,Penwortham,Penzance,Pershore,Peterlee,Petersfield,Petworth,Pickering,Pocklington,Polegate,Pontefract,Ponteland,Poole,Porthleven,Portishead and North Weston,Portland,Potton,Poynton-with-Worth,Preesall,Prescot,Princes Risborough,Prudhoe,Pudsey,Queenborough-in-Sheppey,Radstock,Ramsey,Ramsgate,Raunds,Rawtenstall,Rayleigh,Reading,Redcar,Redruth,Reepham,Reigate,Richmond,Richmond,Ringwood,Ripley,Ripon,Rochdale,Rochester,Rochford,Romford,Romsey,Ross-on-Wye,Rothbury,Rotherham,Rothwell,Rothwell,Rowley Regis,Royal Leamington Spa,Royal Tunbridge Wells,Royal Wootton Bassett,Royston,Rugby,Rugeley,Rushden,Ryde,Rye,Saffron Walden,St Austell,St Blaise,St Columb Major,St Helens,St Ives,St Ives,St Just-in-Penwith,St Mawes,St Neots,Salcombe,Sale,Saltash,Sandbach,Sandhurst,Sandiacre,Sandown,Sandwich,Sandy,Sawbridgeworth,Saxmundham,Scarborough,Scunthorpe,Seaford,Seaham,Seaton,Sedbergh,Selby,Selsey,Settle,Sevenoaks,Shaftesbury,Shanklin,Shefford,Shepshed,Shepton Mallet,Sherborne,Sheringham,Shifnal,Shildon,Shipston-on-Stour,Shirebrook,Shoreham-by-Sea,Shrewsbury,Sidmouth,Silloth,Silsden,Sittingbourne,Skegness,Skelmersdale,Skelton-in-Cleveland,Skipton,Sleaford,Slough,Smethwick,Snaith and Cowick,Snodland,Soham,Solihull,Somerton,South Cave,South Elmsall,South Kirkby and Moorthorpe,South Molton,South Petherton,South Shields,South Woodham Ferrers,Southam,Southall,Southborough,Southend-on-Sea,Southgate,Southminster,Southport,Southsea,Southwell,Southwick,Southwold,Spalding,Spennymoor,Spilsby,Stafford,Staines-upon-Thames,Stainforth,Stalbridge,Stalham,Stalybridge,Stamford,Stanley,Stanhope,Stapleford,Staveley,Stevenage,Steyning,St Mary Cray,Stockport,Stocksbridge,Stockton-on-Tees,Stone,Stonehouse,Stony Stratford,Stotfold,Stourbridge,Stourport-on-Severn,Stowmarket,Stow-on-the-Wold,Stratford-upon-Avon,Stretford,Strood,Stroud,Sturminster Newton,Sudbury,Surbiton,Sutton,Sutton Coldfield,Swaffham,Swanage,Swanley,Swanscombe and Greenhithe,Swindon,Syston,Tadcaster,Tadley,Tamworth,Taunton,Tavistock,Teignmouth,Telscombe,Tenbury Wells,Tenterden,Tetbury,Tewkesbury,Thame,Thatcham,Thaxted,Thetford,Thirsk,Thornaby-on-Tees,Thornbury,Thorne,Thorpe St Andrew,Thrapston,Tickhill,Tidworth,Tipton,Tisbury,Tiverton,Todmorden,Tonbridge,Topsham,Torpoint,Torquay,Totnes,Tottenham,Totton and Eling,Tow Law,Towcester,Tring,Trowbridge,Twickenham,Tynemouth,Uckfield,Ulverston,Uppingham,Upton-upon-Severn,Uttoxeter,Uxbridge,Ventnor,Verwood,Wadebridge,Wadhurst,Wainfleet All Saints,Wallasey,Wallsend,Wallingford,Walsall,Waltham Abbey,Waltham Cross,Walthamstow,Walton-on-Thames,Wantage,Ware,Wareham,Warminster,Warrington,Warwick,Watchet,Watford,Wath-upon-Dearne,Watlington,Watton,Wellingborough,Wellington,Wellington,Wells-next-the-Sea,Wem,Wembley,Wendover,West Bedlington,West Bromwich,West Ham,West Malling,West Mersea,West Tilbury,Westbury,Westerham,Westhoughton,Weston-super-Mare,Wetherby,Weybridge,Weymouth,Whaley Bridge,Whitby,Whitchurch,Whitchurch,Whitehaven,Whitehill,Whitnash,Whittlesey,Whitworth,Wickham,Wickwar,Widnes,Wigan,Wigton,Willenhall,Willesden,Wilton,Wimbledon,Wimborne Minster,Wincanton,Winchcombe,Winchelsea,Windermere,Windsor,Winsford,Winslow,Winterton,Wirksworth,Wisbech,Witham,Withernsea,Witney,Wiveliscombe,Wivenhoe,Woburn,Woburn Sands,Woking,Wokingham,Wolsingham,Wolverton and Greenleys,Wood Green,Woodbridge,Woodley,Woodstock,Wooler,Workington,Worksop,Worthing,Wotton-under-Edge,Wragby,Wymondham,Yarm,Yarmouth,Yate,Yateley,Yeovil,Basildon,Bracknell,Milton Keynes,Redditch,Telford,Washington,Welwyn Garden City,Bath,Birmingham,Bradford,Brighton & Hove,Bristol,Cambridge,Cantebury,Carlisle,Chelmsford,Chester,Chichester,Coventry,Derby,Durham,Ely,Exeter,Gloucester,Hereford,Kingston upon Hull,Lancaster,Leeds,Leicester,Lichfield,Lincoln,Liverpool,City of London,Manchester,Newcastle upon Tyne,Norwich,Nottingham,Oxford,Peterborough,Plymouth,Portsmouth,Preston,Ripon,Salford,Salisbury,Sheffield,Southampton,St Albans,Stoke-on-Trent,Sunderland,Truro,Wakefield,Wells,City of Westminster,Winchester,Worcester,York,New York, New York,Los Angeles, California,Chicago, Illinois,Houston, Texas,Philadelphia, Pennsylvania,Phoenix, Arizona,San Antonio, Texas,San Diego, California,Dallas, Texas,San Jose, California,Austin, Texas,Indianapolis, Indiana,Jacksonville, Florida,San Francisco, California,Columbus, Ohio,Charlotte, North Carolina,Fort Worth, Texas,Detroit, Michigan,El Paso, Texas,Memphis, Tennessee,Seattle, Washington,Denver, Colorado,Washington, District of Columbia,Boston, Massachusetts,Nashville-Davidson, Tennessee,Baltimore, Maryland,Oklahoma City, Oklahoma,Louisville/Jefferson County, Kentucky,Portland, Oregon,Las Vegas, Nevada,Milwaukee, Wisconsin,Albuquerque, New Mexico,Tucson, Arizona,Fresno, California,Sacramento, California,Long Beach, California,Kansas City, Missouri,Mesa, Arizona,Virginia Beach, Virginia,Atlanta, Georgia,Colorado Springs, Colorado,Omaha, Nebraska,Raleigh, North Carolina,Miami, Florida,Oakland, California,Minneapolis, Minnesota,Tulsa, Oklahoma,Cleveland, Ohio,Wichita, Kansas,Arlington, Texas,New Orleans, Louisiana,Bakersfield, California,Tampa, Florida,Honolulu, Hawaii,Aurora, Colorado,Anaheim, California,Santa Ana, California,St. Louis, Missouri,Riverside, California,Corpus Christi, Texas,Lexington-Fayette, Kentucky,Pittsburgh, Pennsylvania,Anchorage, Alaska,Stockton, California,Cincinnati, Ohio,St. Paul, Minnesota,Toledo, Ohio,Greensboro, North Carolina,Newark, New Jersey,Plano, Texas,Henderson, Nevada,Lincoln, Nebraska,Buffalo, New York,Jersey City, New Jersey,Chula Vista, California,Fort Wayne, Indiana,Orlando, Florida,St. Petersburg, Florida,Chandler, Arizona,Laredo, Texas,Norfolk, Virginia,Durham, North Carolina,Madison, Wisconsin,Lubbock, Texas,Irvine, California,Winston-Salem, North Carolina,Glendale, Arizona,Garland, Texas,Hialeah, Florida,Reno, Nevada,Chesapeake, Virginia,Gilbert, Arizona,Baton Rouge, Louisiana,Irving, Texas,Scottsdale, Arizona,North Las Vegas, Nevada,Fremont, California,Boise City, Idaho,Richmond, Virginia,San Bernardino, California,Birmingham, Alabama,Spokane, Washington,Rochester, New York,Des Moines, Iowa,Modesto, California,Fayetteville, North Carolina,Tacoma, Washington,Oxnard, California,Fontana, California,Columbus, Georgia,Montgomery, Alabama,Moreno Valley, California,Shreveport, Louisiana,Aurora, Illinois,Yonkers, New York,Akron, Ohio,Huntington Beach, California,Little Rock, Arkansas,Augusta-Richmond County, Georgia,Amarillo, Texas,Glendale, California,Mobile, Alabama,Grand Rapids, Michigan,Salt Lake City, Utah,Tallahassee, Florida,Huntsville, Alabama,Grand Prairie, Texas,Knoxville, Tennessee,Worcester, Massachusetts,Newport News, Virginia,Brownsville, Texas,Overland Park, Kansas,Santa Clarita, California,Providence, Rhode Island,Garden Grove, California,Chattanooga, Tennessee,Oceanside, California,Jackson, Mississippi,Fort Lauderdale, Florida,Santa Rosa, California,Rancho Cucamonga, California,Port St. Lucie, Florida,Tempe, Arizona,Ontario, California,Vancouver, Washington,Cape Coral, Florida,Sioux Falls, South Dakota,Springfield, Missouri,Peoria, Arizona,Pembroke Pines, Florida,Elk Grove, California,Salem, Oregon,Lancaster, California,Corona, California,Eugene, Oregon,Palmdale, California,Salinas, California,Springfield, Massachusetts,Pasadena, Texas,Fort Collins, Colorado,Hayward, California,Pomona, California,Cary, North Carolina,Rockford, Illinois,Alexandria, Virginia,Escondido, California,McKinney, Texas,Kansas City, Kansas,Joliet, Illinois,Sunnyvale, California,Sunnydale, California,Arkham, Massachusetts,Dunwich, Massachusetts,Mad Dog, Texas,Bad Ass, Texas,Torrance, California,Bridgeport, Connecticut,Lakewood, Colorado,Hollywood, Florida,Paterson, New Jersey,Naperville, Illinois,Syracuse, New York,Mesquite, Texas,Dayton, Ohio,Savannah, Georgia,Clarksville, Tennessee,Orange, California,Pasadena, California,Fullerton, California,Killeen, Texas,Frisco, Texas,Hampton, Virginia,McAllen, Texas,Warren, Michigan,Bellevue, Washington,West Valley City, Utah,Columbia, South Carolina,Olathe, Kansas,Sterling Heights, Michigan,New Haven, Connecticut,Miramar, Florida,Waco, Texas,Thousand Oaks, California,Cedar Rapids, Iowa,Charleston, South Carolina,Visalia, California,Topeka, Kansas,Elizabeth, New Jersey,Gainesville, Florida,Thornton, Colorado,Roseville, California,Carrollton, Texas,Coral Springs, Florida,Stamford, Connecticut,Simi Valley, California,Concord, California,Hartford, Connecticut,Kent, Washington,Lafayette, Louisiana,Midland, Texas,Surprise, Arizona,Denton, Texas,Victorville, California,Evansville, Indiana,Santa Clara, California,Abilene, Texas,Athens-Clarke County, Georgia,Vallejo, California,Allentown, Pennsylvania,Norman, Oklahoma,Beaumont, Texas,Independence, Missouri,Murfreesboro, Tennessee,Ann Arbor, Michigan,Springfield, Illinois,Berkeley, California,Peoria, Illinois,Provo, Utah,El Monte, California,Columbia, Missouri,Lansing, Michigan,Fargo, North Dakota,Downey, California,Costa Mesa, California,Wilmington, North Carolina,Arvada, Colorado,Inglewood, California,Miami Gardens, Florida,Carlsbad, California,Westminster, Colorado,Rochester, Minnesota,Odessa, Texas,Manchester, New Hampshire,Elgin, Illinois,West Jordan, Utah,Round Rock, Texas,Clearwater, Florida,Waterbury, Connecticut,Gresham, Oregon,Fairfield, California,Billings, Montana,Lowell, Massachusetts,San Buenaventura (Ventura), California,Pueblo, Colorado,High Point, North Carolina,West Covina, California,Richmond, California,Murrieta, California,Cambridge, Massachusetts,Antioch, California,Temecula, California,Norwalk, California,Centennial, Colorado,Everett, Washington,Palm Bay, Florida,Wichita Falls, Texas,Green Bay, Wisconsin,Daly City, California,Burbank, California,Richardson, Texas,Pompano Beach, Florida,North Charleston, South Carolina,Broken Arrow, Oklahoma,Boulder, Colorado,Side Winder, Colorado,West Palm Beach, Florida,Santa Maria, California,El Cajon, California,Davenport, Iowa,Rialto, California,Las Cruces, New Mexico,San Mateo, California,Lewisville, Texas,South Bend, Indiana,Lakeland, Florida,Erie, Pennsylvania,Tyler, Texas,Pearland, Texas,College Station, Texas,Kenosha, Wisconsin,Sandy Springs, Georgia,Clovis, California,Flint, Michigan,Roanoke, Virginia,Albany, New York,Jurupa Valley, California,Compton, California,San Angelo, Texas,Hillsboro, Oregon,Lawton, Oklahoma,Renton, Washington,Vista, California,Davie, Florida,Greeley, Colorado,Mission Viejo, California,Portsmouth, Virginia,Dearborn, Michigan,South Gate, California,Tuscaloosa, Alabama,Livonia, Michigan,New Bedford, Massachusetts,Vacaville, California,Brockton, Massachusetts,Roswell, Georgia,Beaverton, Oregon,Quincy, Massachusetts,Sparks, Nevada,Yakima, Washington,Lee's Summit, Missouri,Federal Way, Washington,Carson, California,Santa Monica, California,Hesperia, California,Allen, Texas,Rio Rancho, New Mexico,Yuma, Arizona,Westminster, California,Orem, Utah,Lynn, Massachusetts,Redding, California,Spokane Valley, Washington,Miami Beach, Florida,League City, Texas,Lawrence, Kansas,Santa Barbara, California,Plantation, Florida,Sandy, Utah,Sunrise, Florida,Macon, Georgia,Longmont, Colorado,Boca Raton, Florida,San Marcos, California,Greenville, North Carolina,Waukegan, Illinois,Fall River, Massachusetts,Chico, California,Newton, Massachusetts,San Leandro, California,Reading, Pennsylvania,Norwalk, Connecticut,Fort Smith, Arkansas,Newport Beach, California,Asheville, North Carolina,Nashua, New Hampshire,Edmond, Oklahoma,Whittier, California,Nampa, Idaho,Bloomington, Minnesota,Deltona, Florida,Hawthorne, California,Duluth, Minnesota,Carmel, Indiana,Suffolk, Virginia,Clifton, New Jersey,Citrus Heights, California,Livermore, California,Tracy, California,Alhambra, California,Kirkland, Washington,Trenton, New Jersey,Ogden, Utah,Hoover, Alabama,Cicero, Illinois,Fishers, Indiana,Sugar Land, Texas,Danbury, Connecticut,Meridian, Idaho,Indio, California,Concord, North Carolina,Menifee, California,Champaign, Illinois,Buena Park, California,Troy, Michigan,O'Fallon, Missouri,Johns Creek, Georgia,Bellingham, Washington,Westland, Michigan,Bloomington, Indiana,Sioux City, Iowa,Warwick, Rhode Island,Hemet, California,Longview, Texas,Farmington Hills, Michigan,Bend, Oregon,Lakewood, California,Merced, California,Mission, Texas,Chino, California,Redwood City, California,Edinburg, Texas,Cranston, Rhode Island,Parma, Ohio,New Rochelle, New York,Lake Forest, California,Napa, California,Hammond, Indiana,Fayetteville, Arkansas,Bloomington, Illinois,Avondale, Arizona,Somerville, Massachusetts,Palm Coast, Florida,Bryan, Texas,Gary, Indiana,Largo, Florida,Brooklyn Park, Minnesota,Tustin, California,Racine, Wisconsin,Deerfield Beach, Florida,Lynchburg, Virginia,Mountain View, California,Medford, Oregon,Lawrence, Massachusetts,Bellflower, California,Melbourne, Florida,St. Joseph, Missouri,Camden, New Jersey,St. George, Utah,Kennewick, Washington,Baldwin Park, California,Chino Hills, California,Alameda, California,Albany, Georgia,Arlington Heights, Illinois,Scranton, Pennsylvania,Evanston, Illinois,Kalamazoo, Michigan,Baytown, Texas,Upland, California,Springdale, Arkansas,Bethlehem, Pennsylvania,Schaumburg, Illinois,Mount Pleasant, South Carolina,Auburn, Washington,Decatur, Illinois,San Ramon, California,Pleasanton, California,Wyoming, Michigan,Lake Charles, Louisiana,Plymouth, Minnesota,Bolingbrook, Illinois,Pharr, Texas,Appleton, Wisconsin,Gastonia, North Carolina,Folsom, California,Southfield, Michigan,Rochester Hills, Michigan,New Britain, Connecticut,Goodyear, Arizona,Canton, Ohio,Warner Robins, Georgia,Union City, California,Perris, California,Manteca, California,Iowa City, Iowa,Jonesboro, Arkansas,Wilmington, Delaware,Lynwood, California,Loveland, Colorado,Pawtucket, Rhode Island,Boynton Beach, Florida,Waukesha, Wisconsin,Gulfport, Mississippi,Apple Valley, California,Passaic, New Jersey,Rapid City, South Dakota,Layton, Utah,Lafayette, Indiana,Turlock, California,Muncie, Indiana,Temple, Texas,Missouri City, Texas,Redlands, California,Santa Fe, New Mexico,Lauderhill, Florida,Milpitas, California,Palatine, Illinois,Missoula, Montana,Rock Hill, South Carolina,Jacksonville, North Carolina,Franklin, Tennessee,Flagstaff, Arizona,Flower Mound, Texas,Weston, Florida,Waterloo, Iowa,Union City, New Jersey,Mount Vernon, New York,Fort Myers, Florida,Dothan, Alabama,Rancho Cordova, California,Redondo Beach, California,Jackson, Tennessee,Pasco, Washington,St. Charles, Missouri,Eau Claire, Wisconsin,North Richland Hills, Texas,Bismarck, North Dakota,Yorba Linda, California,Kenner, Louisiana,Walnut Creek, California,Frederick, Maryland,Oshkosh, Wisconsin,Pittsburg, California,Palo Alto, California,Bossier City, Louisiana,Portland, Maine,St. Cloud, Minnesota,Davis, California,South San Francisco, California,Camarillo, California,North Little Rock, Arkansas,Schenectady, New York,Gaithersburg, Maryland,Harlingen, Texas,Woodbury, Minnesota,Eagan, Minnesota,Yuba City, California,Maple Grove, Minnesota,Youngstown, Ohio,Skokie, Illinois,Kissimmee, Florida,Johnson City, Tennessee,Victoria, Texas,San Clemente, California,Bayonne, New Jersey,Laguna Niguel, California,East Orange, New Jersey,Shawnee, Kansas,Homestead, Florida,Rockville, Maryland,Delray Beach, Florida,Janesville, Wisconsin,Conway, Arkansas,Pico Rivera, California,Lorain, Ohio,Montebello, California,Lodi, California,New Braunfels, Texas,Marysville, Washington,Tamarac, Florida,Madera, California,Conroe, Texas,Santa Cruz, California,Eden Prairie, Minnesota,Cheyenne, Wyoming,Daytona Beach, Florida,Alpharetta, Georgia,Hamilton, Ohio,Waltham, Massachusetts,Coon Rapids, Minnesota,Haverhill, Massachusetts,Council Bluffs, Iowa,Taylor, Michigan,Utica, New York,Ames, Iowa,La Habra, California,Encinitas, California,Bowling Green, Kentucky,Burnsville, Minnesota,Greenville, South Carolina,West Des Moines, Iowa,Cedar Park, Texas,Tulare, California,Monterey Park, California,Vineland, New Jersey,Terre Haute, Indiana,North Miami, Florida,Mansfield, Texas,West Allis, Wisconsin,Bristol, Connecticut,Taylorsville, Utah,Malden, Massachusetts,Meriden, Connecticut,Blaine, Minnesota,Wellington, Florida,Cupertino, California,Springfield, Oregon,Rogers, Arkansas,St. Clair Shores, Michigan,Gardena, California,Pontiac, Michigan,National City, California,Grand Junction, Colorado,Rocklin, California,Chapel Hill, North Carolina,Casper, Wyoming,Broomfield, Colorado,Petaluma, California,South Jordan, Utah,Springfield, Ohio,Great Falls, Montana,Lancaster, Pennsylvania,North Port, Florida,Lakewood, Washington,Marietta, Georgia,San Rafael, California,Royal Oak, Michigan,Des Plaines, Illinois,Huntington Park, California,La Mesa, California,Orland Park, Illinois,Auburn, Alabama,Lakeville, Minnesota,Owensboro, Kentucky,Moore, Oklahoma,Jupiter, Florida,Idaho Falls, Idaho,Dubuque, Iowa,Bartlett, Tennessee,Rowlett, Texas,Novi, Michigan,White Plains, New York,Arcadia, California,Redmond, Washington,Lake Elsinore, California,Ocala, Florida,Tinley Park, Illinois,Port Orange, Florida,Medford, Massachusetts,Oak Lawn, Illinois,Rocky Mount, North Carolina,Kokomo, Indiana,Coconut Creek, Florida,Bowie, Maryland,Berwyn, Illinois,Midwest City, Oklahoma,Fountain Valley, California,Buckeye, Arizona,Dearborn Heights, Michigan,Woodland, California,Noblesville, Indiana,Valdosta, Georgia,Diamond Bar, California,Manhattan, Kansas,Santee, California,Taunton, Massachusetts,Sanford, Florida,Kettering, Ohio,New Brunswick, New Jersey,Decatur, Alabama,Chicopee, Massachusetts,Anderson, Indiana,Margate, Florida,Weymouth Town, Massachusetts,Hempstead, New York,Corvallis, Oregon,Eastvale, California,Porterville, California,West Haven, Connecticut,Brentwood, California,Paramount, California,Grand Forks, North Dakota,Georgetown, Texas,St. Peters, Missouri,Shoreline, Washington,Mount Prospect, Illinois,Hanford, California,Normal, Illinois,Rosemead, California,Lehi, Utah,Pocatello, Idaho,Highland, California,Novato, California,Port Arthur, Texas,Carson City, Nevada,Twin Peaks, Oregon,San Marcos, Texas,Hendersonville, Tennessee,Elyria, Ohio,Revere, Massachusetts,Pflugerville, Texas,Greenwood, Indiana,Bellevue, Nebraska,Wheaton, Illinois,Smyrna, Georgia,Sarasota, Florida,Blue Springs, Missouri,Colton, California,Euless, Texas,Castle Rock, Colorado,Cathedral City, California,Kingsport, Tennessee,Lake Havasu City, Arizona,Pensacola, Florida,Hoboken, New Jersey,Yucaipa, California,Watsonville, California,Richland, Washington,Delano, California,Hoffman Estates, Illinois,Florissant, Missouri,Placentia, California,West New York, New Jersey,Dublin, California,Oak Park, Illinois,Peabody, Massachusetts,Perth Amboy, New Jersey,Battle Creek, Michigan,Bradenton, Florida,Gilroy, California,Milford, Connecticut,Albany, Oregon,Ankeny, Iowa,La Crosse, Wisconsin,Burlington, North Carolina,DeSoto, Texas,Harrisonburg, Virginia,Minnetonka, Minnesota,Elkhart, Indiana,Lakewood, Ohio,Glendora, California,Southaven, Mississippi,Charleston, West Virginia,Joplin, Missouri,Enid, Oklahoma,Palm Beach Gardens, Florida,Brookhaven, Georgia,Plainfield, New Jersey,Grand Island, Nebraska,Palm Desert, California,Huntersville, North Carolina,Tigard, Oregon,Lenexa, Kansas,Saginaw, Michigan,Kentwood, Michigan,Doral, Florida,Apple Valley, Minnesota,Grapevine, Texas,Aliso Viejo, California,Sammamish, Washington,Casa Grande, Arizona,Pinellas Park, Florida,Troy, New York,West Sacramento, California,Burien, Washington,Commerce City, Colorado,Monroe, Louisiana,Cerritos, California,Downers Grove, Illinois,Coral Gables, Florida,Wilson, North Carolina,Niagara Falls, New York,Poway, California,Edina, Minnesota,Cuyahoga Falls, Ohio,Rancho Santa Margarita, California,Harrisburg, Pennsylvania,Huntington, West Virginia,La Mirada, California,Cypress, California,Caldwell, Idaho,Logan, Utah,Galveston, Texas,Sheboygan, Wisconsin,Middletown, Ohio,Murray, Utah,Roswell, New Mexico,Parker, Colorado,Bedford, Texas,East Lansing, Michigan,Methuen, Massachusetts,Covina, California,Alexandria, Louisiana,Olympia, Washington,Euclid, Ohio,Mishawaka, Indiana,Salina, Kansas,Azusa, California,Newark, Ohio,Chesterfield, Missouri,Leesburg, Virginia,Dunwoody, Georgia,Hattiesburg, Mississippi,Roseville, Michigan,Bonita Springs, Florida,Portage, Michigan,St. Louis Park, Minnesota,Collierville, Tennessee,Middletown, Connecticut,Stillwater, Oklahoma,East Providence, Rhode Island,Lawrence, Indiana,Wauwatosa, Wisconsin,Mentor, Ohio,Ceres, California,Cedar Hill, Texas,Mansfield, Ohio,Binghamton, New York,Coeur d'Alene, Idaho,San Luis Obispo, California,Minot, North Dakota,Palm Springs, California,Pine Bluff, Arkansas,Texas City, Texas,Summerville, South Carolina,Twin Falls, Idaho,Jeffersonville, Indiana,San Jacinto, California,Madison, Alabama,Altoona, Pennsylvania,Columbus, Indiana,Beavercreek, Ohio,Apopka, Florida,Elmhurst, Illinois,Maricopa, Arizona,Farmington, New Mexico,Glenview, Illinois,Cleveland Heights, Ohio,Draper, Utah,Lincoln, California,Sierra Vista, Arizona,Lacey, Washington,Biloxi, Mississippi,Strongsville, Ohio,Barnstable Town, Massachusetts,Wylie, Texas,Sayreville, New Jersey,Kannapolis, North Carolina,Charlottesville, Virginia,Littleton, Colorado,Titusville, Florida,Hackensack, New Jersey,Newark, California,Pittsfield, Massachusetts,York, Pennsylvania,Lombard, Illinois,Attleboro, Massachusetts,DeKalb, Illinois,Blacksburg, Virginia,Dublin, Ohio,Haltom City, Texas,Lompoc, California,El Centro, California,Danville, California,Jefferson City, Missouri,Cutler Bay, Florida,Oakland Park, Florida,North Miami Beach, Florida,Freeport, New York,Moline, Illinois,Coachella, California,Fort Pierce, Florida,Smyrna, Tennessee,Bountiful, Utah,Fond du Lac, Wisconsin,Everett, Massachusetts,Danville, Virginia,Keller, Texas,Belleville, Illinois,Bell Gardens, California,Cleveland, Tennessee,North Lauderdale, Florida,Fairfield, Ohio,Salem, Massachusetts,Rancho Palos Verdes, California,San Bruno, California,Concord, New Hampshire,Burlington, Vermont,Apex, North Carolina,Midland, Michigan,Altamonte Springs, Florida,Hutchinson, Kansas,Buffalo Grove, Illinois,Urbandale, Iowa,State College, Pennsylvania,Urbana, Illinois,Plainfield, Illinois,Manassas, Virginia,Bartlett, Illinois,Kearny, New Jersey,Oro Valley, Arizona,Findlay, Ohio,Rohnert Park, California,Westfield, Massachusetts,Linden, New Jersey,Sumter, South Carolina,Wilkes-Barre, Pennsylvania,Woonsocket, Rhode Island,Leominster, Massachusetts,Shelton, Connecticut,Brea, California,Covington, Kentucky,Rockwall, Texas,Meridian, Mississippi,Riverton, Utah,St. Cloud, Florida,Quincy, Illinois,Morgan Hill, California,Warren, Ohio,Edmonds, Washington,Burleson, Texas,Beverly, Massachusetts,Mankato, Minnesota,Hagerstown, Maryland,Prescott, Arizona,Campbell, California,Cedar Falls, Iowa,Beaumont, California,La Puente, California,Crystal Lake, Illinois,Fitchburg, Massachusetts,Carol Stream, Illinois,Hickory, North Carolina,Streamwood, Illinois,Norwich, Connecticut,Coppell, Texas,San Gabriel, California,Holyoke, Massachusetts,Bentonville, Arkansas,Florence, Alabama,Peachtree Corners, Georgia,Brentwood, Tennessee,Bozeman, Montana,New Berlin, Wisconsin,Goose Creek, South Carolina,Huntsville, Texas,Prescott Valley, Arizona,Maplewood, Minnesota,Romeoville, Illinois,Duncanville, Texas,Atlantic City, New Jersey,Clovis, New Mexico,The Colony, Texas,Culver City, California,Marlborough, Massachusetts,Hilton Head Island, South Carolina,Moorhead, Minnesota,Calexico, California,Bullhead City, Arizona,Germantown, Tennessee,La Quinta, California,Lancaster, Ohio,Wausau, Wisconsin,Sherman, Texas,Ocoee, Florida,Shakopee, Minnesota,Woburn, Massachusetts,Bremerton, Washington,Rock Island, Illinois,Muskogee, Oklahoma,Cape Girardeau, Missouri,Annapolis, Maryland,Greenacres, Florida,Ormond Beach, Florida,Hallandale Beach, Florida,Stanton, California,Puyallup, Washington,Pacifica, California,Hanover Park, Illinois,Hurst, Texas,Lima, Ohio,Marana, Arizona,Carpentersville, Illinois,Oakley, California,Huber Heights, Ohio,Lancaster, Texas,Montclair, California,Wheeling, Illinois,Brookfield, Wisconsin,Park Ridge, Illinois,Florence, South Carolina,Roy, Utah,Winter Garden, Florida,Chelsea, Massachusetts,Valley Stream, New York,Spartanburg, South Carolina,Lake Oswego, Oregon,Friendswood, Texas,Westerville, Ohio,Northglenn, Colorado,Phenix City, Alabama,Grove City, Ohio,Texarkana, Texas,Addison, Illinois,Dover, Delaware,Lincoln Park, Michigan,Calumet City, Illinois,Muskegon, Michigan,Aventura, Florida,Martinez, California,Greenfield, Wisconsin,Apache Junction, Arizona,Monrovia, California,Weslaco, Texas,Keizer, Oregon,Spanish Fork, Utah,Beloit, Wisconsin,Panama City, Florida,Gotham City,Metropolis,Smallville,Hill Valley, California,Grass Valley, California,Emerald City,Zion,Mos Eisley,Stepford, Connecticut,Questa Verde, California,Haddonfield, Illinois,Cabot Cove, Maine,Mayberry, North Carolina,Bedrock,South Park, Colorado,Springfield,Castle Rock, Maine,Gittagazze,Ci'gazze,Hogsmeade,Middlemarch,Colby, North Carolina,Derry, Maine,Jerusalem's Lot, Maine,Kakariko Villiage,Los Santos,Ganton,Willofield,Jefferson,Idlewood,East Los Santos,Glen Park,Rodeo,Mulholland,Santa Maria Beach,Verona Beach,Vinewood,Pallet Town,Lavender Town,Viridan City,Vice City, Florida,City 17,Clock Town,Columbia,Hollow Bastion,Las Venturas,Oakvale,Dunwall,Raccoon City,Rapture,San Fierro,Traverse Town,Silent Hill,Shepherd's Glen,Twilight Town,Isenstadt,Traction City,Anchorage-in-Vineland,Ankh-Morpork,Aramanth,Arkham,Avonlea,Barchester,Bayport,Bibliopolis,Bree,Castle Rock,Chester's Mill,Clanton, Mississippi,Cleopolis,Eastwick,Esgaroth,Gao Villiage,Gormenghast,Glimmerdagg,Godric's Hollow,Hierusalem,Iium,Isola,Kanthapura,Lankhmar,Lake Wobegon,Lake Wobegon, Minnesota,Lud,Macondo,Marghdeen,Mariposa,Minas Tirith,New Carthage,New Crobuzon,Newford,Opar,Oreskoga,Puddleby-on-the-Marsh,R'lyeh,Santa Teresa, California,Yian 3 | -------------------------------------------------------------------------------- /examples/test.gg: -------------------------------------------------------------------------------- 1 | line:=$greeting\, $name! 2 | greeting:=hi,hello,howdy,ohai,oh hi,good morning,good day,guten morgen,good afternoon,bonjour,aloha 3 | name:=Matthew,Mark,Luke,John,James,Judas Iscariot,Lucille Ball 4 | 5 | -------------------------------------------------------------------------------- /examples/zizek.gg: -------------------------------------------------------------------------------- 1 | zizek:=$thesispfx $thesissub $thesismod $thesiscore $pfx $subject $digression $joke $conclusion 2 | thesispfx:={{Clear,Obvious,Evident}ly ,}{,I am{, not}{, being} {exaggerating,clear,facetious,a {good,bad,terrible,excellent,exemplary} {{Lacan,Freud,Jung,Rand}ian,{Stalin,Trotsky,Lenin,Marx,commun,capital,consumer}ist}{, {analyst,theorist,theoretician,philosopher}} {when,if} I {say,claim,suggest,imply}{, that}}} 3 | thesissub:={{The,Our} {{ideological,economic,{Lacan,Freud,Jung,Rand}ian,{Stalin,Trotsky,Lenin,Marx,commun,capital,consumer}ist,psychological,philosophical,political,cultural,normal,true,real,ideal} ,}{Real,desire,goal,baseline,cat,dog,economy,culture,hegemony,formalism,ideology,politics,violence} is,We {must,should}{, not}{{, {strive,try,attempt} to} {be,avoid being},}} 4 | thesismod:={, not }{{, {always ,}already},politically,ideologically,objectively,subjectively} {,{Lacan,Freud,Jung,Rand}ian,{Stalin,Trotsky,Lenin,Marx,commun,capital,consumer}ist,{politic,psychologic,economic,cultur,ideologic}ally,violently,peacefully,normally,highly,precisely} 5 | thesiscore:={{precisely,exactly} this: ,}{,normal,normalized,critical,peaceful,violent,authoritarian,corrupt,out of the bag,hegemonic,complete,undesirable,impure,counterrevolutionary,ideal,pefected,political,Real,irrelevant}{, in the {{ideologic,economic,psychologic,philosophic}{,al},{Lacan,Freud,Jung,Rand,Smith,Swift,Foucald}ian,{Stalin,Trotsky,Marx,commun,capital,consumer}ist}{,\, {{ideologic,economic,psychologic,philosophic,theoretic}{,al},{cultur,critic}al,{Lacan,Freud,Jung,Rand,Smith,Swift,Foucald}ian,{Stalin,Trotsky,Marx,commun,capital,consumer}ist}} {{sense,meaning}{, of the {term,phrase,theory}},mode,way}}. 6 | pfx:={{{Take,Consider} ,}For {instance,example,a moment},The {best,ultimate,most {extreme,memorable}} {example,instance} of this is{, {precisely,clearly,obviously,{precisely,exactly} this:}},{{Take,Consider} ,}For {instance,example,a moment}\, the {best,ultimate,most {extreme,memorable}} {example,instance}{ of this,}\,} 7 | subSubject1:={Stalin,Hitler,Lacan,Marx,Freud,Engels,people who {play video games,eat {fast food,kale,spinach,expensive european chocolate,to excess,at burger king,aerosol cheese spray,novelty desserts},drink {coca cola,to excess,daily},drive {,very ,extremely }{fast,large,shiny,clean,brightly colored} {cars,vehicles},},sex,Kung Fu Panda,The Matrix,Fight Club,Taxi Driver,The Sound of Music,Hollywood films,the {Stasi,SS,KGB,CIA,NSA,proletariat,NFL,GNAA,liberals,libertarians,catholics,lutherans,old soviet joke,{Lacanian,Marxist,Libertarian,Fascist,Republican,Catholic,Lutheran,{Russian,Eastern} Orthodox,Reichian} {idea,concept,method,theory} of {praxis,economy,economics,humor,tit for tat retaliation,mise en scene,{architectural ,total ,cultural ,}{hegemony,pacifism,conservativism,minimalism}}}} 8 | subSubject2:={dog has his day,nail that sticks up must be hammered,rolling stone gathers moss,good boy eats fudge,time you hit one another comes in its place,{person,citizen,consumer,racial or demographic group} who {plays video games,eats {fast food,kale,spinach,expensive european chocolate,to excess,at burger king,aerosol cheese spray,novelty desserts},drinks {coca cola,to excess,daily,and drives},drives {,very ,extremely }{fast,large,shiny,clean,brightly colored} {cars,vehicles},} is {{held,considered} {as,to be},}{, {precisely,clearly,obviously,precisely this:} a {suspect,obsolete,{culturally ,ideologically ,commercially ,consumptively ,}{fit,advanced,civilized,ideal,backward,superlative,pure}{, {consumer,citizen,student,academic,socialist}},{socialist,capitalist,ideological} {vangaurd,superman,leper,pariah,failure,experiment}}}} 9 | subSubject3:={I,the {dog,cat,hidden truth,shit,surprise,return of the repressed,unheimlich,center of the kinder surprise egg,ideological filter}{,\, {and so on{, and so on},so to speak,to {coin a phrase,be crude{, for a moment}}\,} is {{precisely,exactly} this: ,}{{precisely,exactly,always ,}already,never,almost,typically,obviously,clearly,} {out of the bag,hidden,up the creek,visible,implicit in {{our,the,their} {language,ideology,psyche,propaganda,culture},the {text,propaganda,culture,film}}}}} 10 | subject:=$subSubject1,$subSubject1\, wherein every $subSubject2,$subSubject1\, wherein $subSubject3 11 | digression:={,{\, and so on{,\, and so on},\, so to speak,\, to {coin a phrase,be crude{ for a moment,}}}}. 12 | joke:={A man goes to buy coffee and asks for no milk but the barista says she doesnt have any milk so he asks for no sugar instead.,The surprise of the kinder surprise egg is not in the center but on the very surface.,I am already eating from the trash can and it is named Ideology.,} 13 | conclusion:={Just ,}{Imagine,Disgusting,Incredible,Terrible}. 14 | -------------------------------------------------------------------------------- /ggc.1: -------------------------------------------------------------------------------- 1 | .TH ggc 1 2015-10-01 2 | .SH SYNOPSIS 3 | .B ggc 4 | [input1.gg ... inputn.gg] > output.py 5 | .SH DESCRIPTION 6 | .B ggc 7 | is a generative grammar compiler. It converts grammars written in a simple domain-specific language to python code for generating strings that could be described by those grammars. 8 | .SH LANGUAGE 9 | The GG language consists of a series of named rules. A named rule is a name associated with zero or more possible expansions. 10 | 11 | A named rule is defined using the ':=' operator. For instance: 12 | 13 | .RS 14 | namedRule:=foo,bar,baz 15 | .RE 16 | 17 | can be expanded as 'foo', 'bar', or 'baz'. 18 | 19 | Comments in GG begin with an octothorpe ('#'). 20 | 21 | Files can be included using '#include': 22 | 23 | .RS 24 | #include library.gg 25 | .RE 26 | 27 | 28 | Expansions can contain anonymous rules -- sets of expansions enclosed in braces ({}) -- as well as other named rules (which are prefixed with the dollar sign ('$')) and cached/static expansions of named rules (prefixed by two dollar signs). 29 | 30 | Rule names can contain letters, numbers, and underscores. Because of python's naming rules, rule names must not begin with a number. 31 | 32 | .SH EXTENSION 33 | Python files can be imported using '#import': 34 | 35 | .RS 36 | #import library.py 37 | .RE 38 | 39 | Such a python file will be added into the output prior to all generated rules. 40 | 41 | A named rule may be defined using a function using that name, taking no arguments and returning a string. For instance: 42 | 43 | .RS 44 | def digit(): return random.choice(["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]) 45 | .RE 46 | 47 | is equivalent to the GG code: 48 | 49 | .RS 50 | digit:=0,1,2,3,4,5,6,7,8,9 51 | .RE 52 | 53 | A static/cached expansion may be defined by defining a string with the name "cached_" followed by the rule name. 54 | 55 | 56 | .SH COPYING 57 | 58 | GGC (c) 2015-2016, John Ohno. 59 | All rights reserved. 60 | 61 | Redistribution and use in source and binary forms, with or without 62 | modification, are permitted provided that the following conditions are met: 63 | * Redistributions of source code must retain the above copyright 64 | notice, this list of conditions and the following disclaimer. 65 | * Redistributions in binary form must reproduce the above copyright 66 | notice, this list of conditions and the following disclaimer in the 67 | documentation and/or other materials provided with the distribution. 68 | * Neither the name of the nor the 69 | names of its contributors may be used to endorse or promote products 70 | derived from this software without specific prior written permission. 71 | 72 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 73 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 74 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 75 | DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY 76 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 77 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 78 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 79 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 80 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 81 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 82 | 83 | .SH SEE ALSO 84 | http://github.com/enkiv2/ggc 85 | 86 | -------------------------------------------------------------------------------- /ggc.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | # input format: 4 | # line <- ":=" (|)("," (|))* 5 | # name <- "$" 6 | 7 | rm -f .includefiles .combinedincludes .importfiles 8 | touch .importfiles 9 | 10 | function pre() { 11 | touch .combinedincludes 12 | if [[ -e .includefiles ]] ; then 13 | cat .includefiles | grep . >> .combinedincludes 14 | rm .includefiles 15 | fi 16 | awk ' /^#include/ { print $2 > ".includefiles" } 17 | /^#import/ { print $2 > ".importfiles" } 18 | { print }' 19 | if [[ -e .includefiles ]] ; then 20 | cat .includefiles | egrep -v "^($(cat .combinedincludes | tr '\n' '|'))\$" | grep . | 21 | ( while read -r x ; do 22 | echo "# Source filename: $x" ; 23 | cat "$x" ; 24 | done ) | pre 25 | fi 26 | } 27 | 28 | if [[ $# -gt 0 ]] ; then 29 | (for i in "$@" ; do 30 | echo "# Source filename: $i" 31 | cat "$i" 32 | done )| $0 33 | exit 34 | fi 35 | 36 | pre | 37 | sed ' 38 | s/:=/,:=,/; 39 | s/\\,/%%COMMA%%/g; 40 | s/\\{/%%LBRACK%%/g; 41 | s/\\}/%%RBRACK%%/g' | awk ' 42 | BEGIN { FS="," } 43 | { 44 | if(index($1, "#")==1) { 45 | ret = ret "\n" $0 "\n" 46 | } else if($2==":=") { 47 | # cachedItemsDummy pre-allocates blank variable names for cached items, 48 | # to trick python. 49 | # Otherwise, references to the cached variables are assumed to be undefined 50 | # at run-time when really they are only undefined at definition time 51 | cachedItemsDummy=cachedItemsDummy "\ncached_" $1 "=\"\"" 52 | 53 | # cachedItems, on the other hand, is the actual cached representation, 54 | # which is currently created for every named rule, regardless of whether or 55 | # not it is used. In the future we could use an extra pass to eliminate 56 | # unused cached values, in order to speed up execution 57 | cachedItems=cachedItems "\ncached_" $1 "=" $1 "()" 58 | 59 | if(!first) { 60 | first=$1 61 | } 62 | 63 | ret=ret "\ndef " $1 "():" 64 | ret=ret "\n\treturn random.choice([" 65 | for (i=3; i<=NF; i++) { 66 | ret = ret sep "\"" $i "\"" 67 | sep="," 68 | } 69 | ret=ret "])" 70 | } 71 | } 72 | END { 73 | print cachedItemsDummy 74 | print ret 75 | print cachedItems 76 | print "print(" first "())" 77 | }' | ( 78 | 79 | echo "#!/usr/bin/env python" 80 | 81 | # necessary for python2 compat if we have unicode input 82 | echo "# coding=UTF-8" 83 | 84 | echo "" 85 | echo "# This code was generated by GGC (http://github.com/enkiv2/ggc), the Generative Grammar Compiler" 86 | echo "" 87 | 88 | echo "from random import Random" 89 | echo "random=Random()\n" 90 | 91 | cat .importfiles | xargs cat ; 92 | sed ' 93 | s/\$\$\([a-zA-Z0-9_][a-zA-Z0-9_]*\)/"+cached_\1+\"/g; 94 | s/\$\([a-zA-Z0-9_][a-zA-Z0-9_]*\)/"+\1()+\"/g; 95 | s/{/\"+random.choice(["/g;s/}/"])+"/g; 96 | s/\[,/[/;s/%%COMMA%%/,/g; 97 | s/%%LBRACK%%/{/g; 98 | s/%%RBRACK%%/}/g' ) 99 | 100 | -------------------------------------------------------------------------------- /install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | chmod a+x ggc.sh 4 | sudo cp ggc.sh /usr/bin/ggc 5 | sudo cp ggc.1 /usr/man/man1/ 6 | 7 | --------------------------------------------------------------------------------