diff options
| author | Benjamin J. Culkin <bjculkin@mix.wvu.edu> | 2018-06-05 00:16:59 -0300 |
|---|---|---|
| committer | Benjamin J. Culkin <bjculkin@mix.wvu.edu> | 2018-06-05 00:16:59 -0300 |
| commit | bb5d2256ba052af13a3d50f150b78c5762840449 (patch) | |
| tree | 10fb079acabaa34752d5557ce7cf0b97c95beef7 | |
| parent | 8062cff63f864178a2a73650870362871bc25224 (diff) | |
Grammar update
Update grammar for new features/syntax
40 files changed, 718 insertions, 867 deletions
diff --git a/data/misc/700000items.gram b/data/misc/700000items.gram index ec099f5..b3a8855 100755 --- a/data/misc/700000items.gram +++ b/data/misc/700000items.gram @@ -1,7 +1,7 @@ -[isaac-item-name] [noun] +[isaac-item-name] {@adjs:=[adj]} [noun] pragma prefix-with [isaac-item-name] [post] -pragma prefix-with [isaac-item-name] <&1..2> [adj] +pragma prefix-with [isaac-item-name] <&1..2> [@adjs] pragma prefix-with [isaac-item-name] [pre] pragma suffix-with [isaac-item-name] [end] diff --git a/data/sample-grammars/24hr-rpg.gram b/data/sample-grammars/24hr-rpg.gram index aeb92ed..19d58ce 100755 --- a/data/sample-grammars/24hr-rpg.gram +++ b/data/sample-grammars/24hr-rpg.gram @@ -1,9 +1,11 @@ -[rpg-name] [rpg-part] and [rpg-part] - [rpg-part] / [rpg-part] - [rpg-part] the [rpg-part] - [rpg-part] : [rpg-part] the [rpg-part] - [rpg-part] : [rpg-part] [rpg-part] - [rpg-part] , [rpg-part] and [rpg-part] +[rpg-name] {@rpg-parts:=[rpg-part]} [act-rpg-name] + +[act-rpg-name] [@rpg-parts] and [@rpg-parts] + [@rpg-parts] / [@rpg-parts] + [@rpg-parts] the [@rpg-parts] + [@rpg-parts] : [@rpg-parts] the [@rpg-parts] + [@rpg-parts] : [@rpg-parts] [@rpg-parts] + [@rpg-parts] , [@rpg-parts] and [@rpg-parts] [rpg-name-phrase] [quote-rpg-name] was just released [quote-rpg-name] vs [quote-rpg-name] : which is better? diff --git a/data/sample-grammars/address.gram b/data/sample-grammars/address.gram index 44475c4..3e432d5 100755 --- a/data/sample-grammars/address.gram +++ b/data/sample-grammars/address.gram @@ -73,30 +73,23 @@ pragma suffix-with [street] [street-suffix] s. e. w. - [cardinal] + <^2> [cardinal] -[street-suffix] street - st. - road - rd. +[street-suffix] [%street|%st.] + [%road|%rd.] way - boulevard - blvd. - avenue - ave. + [%boulevard|%blvd.] + [%avenue|%ave.] place plaza court drive - highway - hwy. - parkway - pkwy. + [%highway|%hwy.] + [%parkway|%pkwy.] pike bypass -[street-generic] main - main +[street-generic] <^2> main high independence division @@ -128,6 +121,6 @@ pragma suffix-with [street] [street-suffix] [geographic-thing] [street-generic-standalone] Broadway - avenue of the Americas + Avenue of the Americas Kingshighway El Camino real diff --git a/data/sample-grammars/anime.gram b/data/sample-grammars/anime.gram index 85cc7db..887b687 100755 --- a/data/sample-grammars/anime.gram +++ b/data/sample-grammars/anime.gram @@ -1,22 +1,23 @@ -[anime-name] [short-anime-name] - [short-anime-name] +[anime-name] {@fname:=[first-name]} {@sname:=[second-name]} {@tname:=[third-name]} [act-anime-name] + +[act-anime-name] <^2> [short-anime-name] [long-anime-name] -[short-anime-name] [first-name] - [second-name] - [third-name] +[short-anime-name] [@fname] + [@sname] + [@tname] [long-anime-name] [short-anime-name] pragma initial-rule [anime-name] -pragma suffix-with [short-anime-name] [first-name] -pragma suffix-with [short-anime-name] [second-name] -pragma suffix-with [short-anime-name] [third-name] +pragma suffix-with [short-anime-name] [@fname] +pragma suffix-with [short-anime-name] [@sname] +pragma suffix-with [short-anime-name] [@tname] -pragma prefix-with [long-anime-name] [third-name] -pragma prefix-with [long-anime-name] [second-name] -pragma prefix-with [long-anime-name] [first-name] +pragma prefix-with [long-anime-name] [@tname] +pragma prefix-with [long-anime-name] [@sname] +pragma prefix-with [long-anime-name] [@fname] [first-name] Vampire Cat diff --git a/data/sample-grammars/art-objects.gram b/data/sample-grammars/art-objects.gram index c824958..6720bbc 100755 --- a/data/sample-grammars/art-objects.gram +++ b/data/sample-grammars/art-objects.gram @@ -1,24 +1,23 @@ -[art-treasure-group] [art-treasure] - a choice between [art-treasure] and [art-treasure] - a choice between [quote-treasure] , [quote-treasure] and [quote-treasure] - [art-treasure] as well as [art-treasure] - [quote-treasure] ; [quote-treasure] as well as [quote-treasure] - [art-treasure] atop [art-treasure] - [art-treasure] hidden under [art-treasure] - [art-treasure] lying next to [art-treasure] - [art-treasure] hiding in [art-treasure] +[act-art-treasure-group] {@atreasure:=[art-treasure]} [art-treasure-group] + +[art-treasure-group] <^4> [@atreasure] + <^2> a choice between [@atreasure] and [@atreasure] + <^2> [@atreasure] as well as [@atreasure] + <^2> [@atreasure] atop [@atreasure] + <^2> [@atreasure] hidden under [@atreasure] + <^2> [@atreasure] lying next to [@atreasure] + <^2> [@atreasure] hiding in [@atreasure] [quote-treasure] hidden among [quote-treasure] and [quote-treasure] + [quote-treasure] ; [quote-treasure] as well as [quote-treasure] + a choice between [quote-treasure] , [quote-treasure] and [quote-treasure] pragma initial-rule [art-treasure-group] -[quote-treasure] ( [art-treasure] ) +[quote-treasure] ( [@atreasure] ) pragma despace-rule [quote-treasure] -[art-treasure] [unowned-art-treasure] - [unowned-art-treasure] - [unowned-art-treasure] - [unowned-art-treasure] +[art-treasure] <^4> [unowned-art-treasure] [owned-art-treasure] pragma export-rule [art-treasure] @@ -34,8 +33,7 @@ pragma prefix-with [art-treasure] a(n) [art-objects] [art-object] pragma export-rule [art-objects] -pragma prefix-with [art-objects] [art-object-pref] -pragma prefix-with [art-objects] [size] +pragma prefix-with [art-objects] [art-object-pref] [size] [art-object-pref] counterfeit ancient @@ -53,6 +51,7 @@ pragma prefix-with [art-objects] [size] [epic-art] [mythic-art] +pragma enable-descent [art-object] 2 pragma export-rule [art-object] [size] tiny @@ -74,7 +73,7 @@ pragma export-rule [art-object] [statuette-mat] bone ivory -[common-goldring] gold ring +[common-goldring] <^2> gold ring gold ring with a [common-gem] gold ring with [common-gem] inlay gold ring with [common-gem] setting @@ -83,16 +82,13 @@ pragma export-rule [art-object] [necklace-mat] necklace gold bracelet studded with [rare-gem] gold necklace adorned with [common-gem] - silver [tiaracrown] decorated with [common-gem] + silver [tiara|crown] decorated with [common-gem] ivory comb with embedded [rare-gem] gold vestments [necklace-mat] gold silver -[tiaracrown] tiara - crown - [uncommon-goldring] gold ring with [legendary-gem] inlay gold ring with a [legendary-gem] gold ring with [legendary-gem] setting diff --git a/data/sample-grammars/awe-names.gram b/data/sample-grammars/awe-names.gram index ea27ce1..26d9e3e 100755 --- a/data/sample-grammars/awe-names.gram +++ b/data/sample-grammars/awe-names.gram @@ -1,9 +1,9 @@ -[awesome-name] [part] +[awesome-name] {@parts:=[part]} [@parts] -pragma prefix-with [awesome-name] [part] -pragma prefix-with [awesome-name] [part] -pragma suffix-with [awesome-name] [part] -pragma suffix-with [awesome-name] [part] +pragma prefix-with [awesome-name] [@parts] +pragma prefix-with [awesome-name] [@parts] +pragma suffix-with [awesome-name] [@parts] +pragma suffix-with [awesome-name] [@parts] pragma initial-rule [awesome-name] diff --git a/data/sample-grammars/buzzword.gram b/data/sample-grammars/buzzword.gram index d25331f..3aaf2ad 100755 --- a/data/sample-grammars/buzzword.gram +++ b/data/sample-grammars/buzzword.gram @@ -1,4 +1,4 @@ -[buzzword-phrase] [buzzwords] +[buzzword-phrase] <^2> [buzzwords] [buzzwords] to [buzzwords] [buzzwords] while [buzzwords] [buzzwords] in order to [buzzwords] @@ -6,9 +6,9 @@ pragma initial-rule [buzzword-phrase] -[buzzwords] [buzzword] - [buzzword] [buzzword] - [buzzword] and [buzzword] +[buzzwords] <^4> [buzzword] + <^2> [buzzword] [buzzword] + <^2> [buzzword] and [buzzword] [buzzword] , [buzzword] and [buzzword] pragma export-rule [buzzwords] diff --git a/data/sample-grammars/career.gram b/data/sample-grammars/career.gram index 92df2bb..3f527be 100755 --- a/data/sample-grammars/career.gram +++ b/data/sample-grammars/career.gram @@ -21,7 +21,7 @@ pragma suffix-with [career-tech-desc] <&1..2> [career-tech-descsuff] pragma export-rule [career-techname] [career-tech] <^6> [career-tech2] - [quote-career-tech] and [quote-career-tech] + <^3> [quote-career-tech] and [quote-career-tech] [quote-career-tech] , [quote-career-tech] and [quote-career-tech] pragma prefix-with [career-tech] [career-tech-desc-pref] @@ -34,7 +34,7 @@ pragma despace-rule [quote-career-tech] [career-tech2] <^10> [act-career-tech] [act-career-tech] (reports to the [career-tech] ) - <^2> [act-career-tech] (reports to [full-name-and-title] ) + [act-career-tech] (reports to [full-name-and-title] ) [act-career-tech] paper pusher computer [software-career-type] @@ -81,7 +81,7 @@ pragma export-rule [act-career-tech] publisher publishing -[career-prefsuf] [career-suffix] +[career-prefsuf] <^2> [career-suffix] [career-prefix] [career-suffix] [career-sufsuf] , [career-prefsuf] of [career-department] diff --git a/data/sample-grammars/city.gram b/data/sample-grammars/city.gram index b344d3b..f4a765c 100755 --- a/data/sample-grammars/city.gram +++ b/data/sample-grammars/city.gram @@ -31,17 +31,17 @@ pragma despace-rule [act-other-city] [first-name] [random-name] -[town-prefix] [cardinal] - new - new - old - little - fort - lower - upper - san - la - van +[town-prefix] <^2> [cardinal] + New + New + Old + Little + Fort + Lower + Upper + San + La + Van [town-suffix] burg ton diff --git a/data/sample-grammars/college.gram b/data/sample-grammars/college.gram index 33b45e3..65b7cb6 100755 --- a/data/sample-grammars/college.gram +++ b/data/sample-grammars/college.gram @@ -15,13 +15,11 @@ pragma initial-rule [college-announcement] [students] students -pragma prefix-with [students] [course-level] -pragma prefix-with [students] [course-adj] +pragma prefix-with [students] [course-level] [course-adj] [student] student -pragma prefix-with [student] [course-level] -pragma prefix-with [student] [course-adj] +pragma prefix-with [student] [course-level] [course-adj] [popularity] popularity popularity among [students] @@ -122,8 +120,7 @@ pragma suffix-with [course-level1] [class-year] [course-event] as [course-explored] in [course-group] [course-medium] [university-subject] as [course-explored] in [course-group] [course-medium] [course-impactof] - [course-static] - [course-static] + <^2> [course-static] [quote-buzzword] ( [course-buzzword2] ) @@ -133,24 +130,22 @@ pragma prefix-with [college-course] [course-prefix] [course-colonending] : [course-ending] -pragma suffix-with [college-course] [course-colonending] -pragma suffix-with [college-course] [course-suffix] +pragma suffix-with [college-course] [course-colonending] [course-suffix] pragma export-rule [college-course] -[course-adjnoun-group] [quote-adjnoun] - [quote-adjnoun] and [quote-adjnoun] +[course-adjnoun-group] <^4> [quote-adjnoun] + <^2> [quote-adjnoun] and [quote-adjnoun] [quote-adjnoun] , [quote-adjnoun] and [quote-adjnoun] -[course-disjoin-adjnoungroup] [quote-adjnoun] or [quote-adjnoun] +[course-disjoin-adjnoungroup] <^2> [quote-adjnoun] or [quote-adjnoun] [quote-adjnoun] , [quote-adjnoun] or [quote-adjnoun] [quote-adjnoun] ( [course-adjnoun] ) [course-adjnoun] [course-prefixednoun] -pragma prefix-with [course-adjnoun] [course-adj] -pragma prefix-with [course-adjnoun] [course-adj] +pragma prefix-with [course-adjnoun] [course-adj] [course-adj] [condition] condition experience @@ -244,7 +239,7 @@ pragma prefix-with [course-adjnoun] [course-adj] [experience] arts experience -[course-prefixednoun] [course-noun] +[course-prefixednoun] <^2> [course-noun] post- [course-noun] pre- [course-noun] @@ -386,10 +381,7 @@ pragma prefix-with [course-noun] [course-nounprefix] [study] study approach -[course-group] [quote-groups] - [quote-groups] - [quote-groups] - [quote-groups] +[course-group] <^4> [quote-groups] [quote-political] [quote-political] " [org-political] " @@ -495,8 +487,8 @@ pragma suffix-with [of-group] [course-adjnoun] [course-life-influence] [course-event] [course-adjnoun-group] -[course-lives] [quote-life] - [quote-life] and [quote-life] +[course-lives] <^4> [quote-life] + <^2> [quote-life] and [quote-life] [quote-life] , [quote-life] and [quote-life] [quote-life] ( [course-life] ) diff --git a/data/sample-grammars/company.gram b/data/sample-grammars/company.gram index 40ea83b..10befff 100755 --- a/data/sample-grammars/company.gram +++ b/data/sample-grammars/company.gram @@ -43,15 +43,12 @@ pragma despace-rule [company-root-city] pragma despace-rule [company-root-name] -[letter+group] [letters] - [letters] & [letters] +[letter+group] <^4> [letters] + <^2> [letters] & [letters] [letters] & [letters] & [letters] -[letters] [letter] - [letter] - [letter] - [letter] [letter] - [letter] [letter] +[letters] <^3> [letter] + <^2> [letter] [letter] [letter] [letter] [letter] pragma despace-rule [letters] diff --git a/data/sample-grammars/computer.gram b/data/sample-grammars/computer.gram index 2978fb7..3a86e73 100755 --- a/data/sample-grammars/computer.gram +++ b/data/sample-grammars/computer.gram @@ -29,8 +29,7 @@ apl k opencomal - [esoteric-language] - [esoteric-language] + <^2> [esoteric-language] [esoteric-language] magenta brainfuck diff --git a/data/sample-grammars/elementals.gram b/data/sample-grammars/elementals.gram index 30d256f..946d49c 100755 --- a/data/sample-grammars/elementals.gram +++ b/data/sample-grammars/elementals.gram @@ -1,12 +1,9 @@ -[elemental] elemental - elemental - elemental +[elemental] <^3> elemental [other-elementalcreatures] [rs-elementype] pragma prefix-with [elemental] [elemental-types] -pragma prefix-with [elemental] [elemental-age] -pragma prefix-with [elemental] [great-less] +pragma prefix-with [elemental] [elemental-age] [great-less] pragma suffix-with [elemental] [sgreat-less] pragma initial-rule [elemental] @@ -36,7 +33,7 @@ pragma initial-rule [elemental] elemental dragon elemental knight -[great-less] lesser +[act-great-less] lesser greater advanced @@ -57,22 +54,16 @@ pragma initial-rule [elemental] primal eldritch -[elemental-types] [nhelemental-types] - [nhelemental-types] - [nhelemental-types] - [nhelemental-types] - [nhelemental-types] - [nhelemental-types] +[elemental-types] <^6> [nhelemental-types] [hybrid-type] -[nhelemental-types] [quote-type] - [quote-type] - [quote-type] / [quote-type] +[nhelemental-types] <^4> [quote-type] + <^2> [quote-type] / [quote-type] [quote-type] / [quote-type] / [nhelemental-types] pragma export-rule [elemental-types] -[hybrid-type] hybrid [hybrid-open] and [hybrid-close] +[hybrid-type] <^2> hybrid [hybrid-open] and [hybrid-close] hybrid [hybrid-open] , [nhelemental-types] and [hybrid-close] [hybrid-open] ( [nhelemental-types] @@ -87,20 +78,13 @@ pragma despace-rule [hybrid-close] pragma despace-rule [quote-type] -[elemental-type] [bare-elemental-type] - [bare-elemental-type] - [bare-elemental-type] - [bare-elemental-type] - [elemental-adv] [bare-elemental-type] - [elemental-adv] [bare-elemental-type] +[elemental-type] <^4> [bare-elemental-type] + <^2> [elemental-adv] [bare-elemental-type] [elemental-adv] [elemental-adv] [bare-elemental-type] -[bare-elemental-type] [common-element] - [common-element] - [runescape-elemental] - [runescape-elemental] - [paraquasi-elemental] - [paraquasi-elemental] +[bare-elemental-type] <^2> [common-element] + <^2> [runescape-elemental] + <^2> [paraquasi-elemental] [other-elemental] pragma export-rule [elemental-type] @@ -205,12 +189,8 @@ pragma export-rule [elemental-adv] blood soul -[paraquasi-elemental] [para-elemental] - [para-elemental] - [quasi-elemental] - [quasi-elemental] - [quasi-elemental] - [quasi-elemental] +[paraquasi-elemental] <^2> [para-elemental] + <^4> [quasi-elemental] [paraquasi-elemental] [para-elemental] ice diff --git a/data/sample-grammars/fantasy-locations.gram b/data/sample-grammars/fantasy-locations.gram index 1190d68..7d06791 100755 --- a/data/sample-grammars/fantasy-locations.gram +++ b/data/sample-grammars/fantasy-locations.gram @@ -1,7 +1,7 @@ -[fantasy-location-name] [name2] +[fantasy-location-name] {@oname=[name1]} [name2] -pragma prefix-with [fantasy-location-name] [name1] -pragma prefix-with [fantasy-location-name] [name1] +pragma prefix-with [fantasy-location-name] [@oname] +pragma prefix-with [fantasy-location-name] [@oname] pragma initial-rule [fantasy-location-name] @@ -27,11 +27,11 @@ pragma initial-rule [fantasy-location-name] drowsy dry dusty - [black-color] + [ebon|ebony] emerald fleet fire - [gold-color] + [gold|golden] good grace grand @@ -46,7 +46,7 @@ pragma initial-rule [fantasy-location-name] holy honey hot - [ice-type] + [ice|icy] iron ivory lilac @@ -55,16 +55,16 @@ pragma initial-rule [fantasy-location-name] maple mighty night - [oak-type] + [oak|oaken] onyx peaceful pearl prancing quartz queens - [rain-type] + [rain|rainy] red - [rose-type] + [rose|rosy] royal ruby sable @@ -76,7 +76,7 @@ pragma initial-rule [fantasy-location-name] shale shining short - [silk-type] + [silk|silken] silver sleeping small @@ -207,24 +207,3 @@ pragma initial-rule [fantasy-location-name] way wolf wood - -[silk-type] silk - silken - -[rose-type] rose - rosy - -[rain-type] rain - rainy - -[oak-type] oak - oaken - -[ice-type] ice - icy - -[black-color] ebon - ebony - -[gold-color] gold - golden diff --git a/data/sample-grammars/gemstones.gram b/data/sample-grammars/gemstones.gram index 8f8a579..25fedf5 100644 --- a/data/sample-grammars/gemstones.gram +++ b/data/sample-grammars/gemstones.gram @@ -1,19 +1,18 @@ -[gemstones] [gemstone] - [gemstone] - [gemstone] +[gemstones] [act-gemstones] + +[act-gemstones] <^3> [gemstone] [gemstone-group] [gemstone-group] pair of [gemstone] - [gemstone-sizedesc] pile of [gemstone] - [gemstone-sizedesc] hoard of [gemstone] + pile of [gemstone] + hoard of [gemstone] + +pragma prefix-with [gemstone-group] [gemstone-sizedesc] pragma initial-rule [gemstones] pragma suffix-with [gemstones] jewels -[gemstone] [gemstone-1] - [gemstone-1] - [gemstone-1] - [gemstone-1] +[gemstone] <^4> [gemstone-1] [ds-gem] [gemstone-1] [common-gem] @@ -21,14 +20,12 @@ pragma suffix-with [gemstones] jewels [legendary-gem] [epic-gem] +pragma enable-descent [gemstone-1] 2 pragma export-rule [gemstone] -[gemstone-sizedesc] [size] - [gemstone-desc] - [size] [gemstone-desc] - [gemstone-desc] [size] +[gemstone-sizedesc] {empty} -pragma prefix-with [gemstone] [gemstone-sizedesc] +pragma prefix-with [gemstone-sizedesc] [size] [gemstone-desc] [size] tiny miniscule @@ -70,25 +67,17 @@ pragma export-rule [common-gem] [quote-commongem] and [quote-commongem] fused together [quote-legendarygem] of poor [extra-deficit] -[extra-deficit] [extra-qualities] - [extra-qualities] - [extra-qualities] - [extra-qualities] +[extra-deficit] <^4> [extra-qualities] [extra-qualities] but excellent [extra-qualities] -[extra-quality] [extra-qualities] - [extra-qualities] - [extra-qualities] - [extra-qualities] +[extra-quality] <^4> [extra-qualities] [extra-qualities] but poor [extra-qualities] -[extra-qualities] [extra-quality-part] - [extra-quality-part] - [extra-quality-part] +[extra-qualities] <^3> [extra-quality-part] [extra-quality-phrase] -[extra-quality-phrase] [extra-quality-part] and [extra-quality-part] - [extra-quality-part] and [extra-quality-part] +[extra-quality-phrase] <^2> [extra-quality-part] and [extra-quality-part] + <^2> [extra-quality-part] and [extra-quality-part] [extra-quality-part] , [extra-quality-part] and [extra-quality-part] [extra-quality-part] size @@ -119,10 +108,7 @@ pragma export-rule [rare-gem] pragma despace-rule [quote-raregem] pragma export-rule [legendary-gem] -[epic-gem] [epic-gem-1] - [epic-gem-1] - [epic-gem-1] - [epic-gem-1] +[epic-gem] <^4> [epic-gem-1] [ds-gem] [epic-gem-1] diamond diff --git a/data/sample-grammars/genre-fiction.gram b/data/sample-grammars/genre-fiction.gram index 92437d7..997b2af 100755 --- a/data/sample-grammars/genre-fiction.gram +++ b/data/sample-grammars/genre-fiction.gram @@ -1,9 +1,6 @@ [genre-fict] in a [setting] a young [person] stumbles across a(n) [place] [genre-fict2] -# Uncomment me when we're done testing, because this rule takes a while to -# generate pragma initial-rule [genre-fict] -pragma export-rule [genre-fict] [genre-fict2] which spurs him into conflict with [antagonist] [genre-fict3] @@ -91,9 +88,9 @@ pragma export-rule [genre-fict] humanity’s selfish nature his own insecurity vis-a-vis girls -[female] [female] - [female] [fem-suffix] - [fem-prefix] [female] +[female] <^4> [female] + <^2> [female] [fem-suffix] + <^2> [fem-prefix] [female] [fem-prefix] [female] [fem-suffix] [fem-prefix] sarcastic diff --git a/data/sample-grammars/horror.gram b/data/sample-grammars/horror.gram index 07d84de..8740a95 100755 --- a/data/sample-grammars/horror.gram +++ b/data/sample-grammars/horror.gram @@ -2,32 +2,32 @@ pragma initial-rule [horror-movie] -[first] attack of the - invasion of the - day of the - beware! The - terror of the - death by - curse of the - earth vs. the - return of the +[first] Attack of the + Invasion of the + Day of the + Beware! The + Terror of the + Death by + Curse of the + Earth vs. the + Return of the -[second] disco - massive - worrying - flying - flesh eating - windy - mutant - hairy - overly keen +[second] Disco + Massive + Worrying + Flying + Flesh eating + Windy + Mutant + Hairy + Overly keen -[third] vampires - swamp beasts - boy bands - muffins - werewolves - zombies - sock puppets - death bots - snuggle badgers +[Third] Vampires + Swamp Beasts + Boy Bands + Muffins + Werewolves + Zombies + Sock Puppets + Death Bots + Snuggle Badgers diff --git a/data/sample-grammars/linux.gram b/data/sample-grammars/linux.gram index ad18d65..7c6ca85 100755 --- a/data/sample-grammars/linux.gram +++ b/data/sample-grammars/linux.gram @@ -4,11 +4,8 @@ pragma initial-rule [linux-domain] [actual+linux-domain] [linux-domainname] . [big-tld] -[linux-domainname] [linux-domain1] [linux-domain2] - [linux-domain1] [linux-domain2] - [linux-domain1] [linux-domain2] - [linux-domain1] [linux-domain1] - [linux-domain1] [linux-domain1] +[linux-domainname] <^3> [linux-domain1] [linux-domain2] + <^2> [linux-domain1] [linux-domain1] [linux-domain1] [linux-domain1] [linux-domain2] [linux-domain1] [linux-domain1] - [linux-domain2] [linux-domain1] - [linux-domain2] @@ -583,8 +580,7 @@ pragma export-rule [geek-scifi-book] [monitor] monitor -pragma prefix-with [monitor] [monitor-resolution] -pragma prefix-with [monitor] [monitor-type] +pragma prefix-with [monitor] [monitor-resolution] [monitor-type] [monitor-resolution] 4k 1080p @@ -604,7 +600,7 @@ pragma prefix-with [monitor] [monitor-type] [peripheral-interface] scsi ide parallel - [usb] + <^3> [usb] firewire 400 firewire 800 serial @@ -663,11 +659,7 @@ pragma export-rule [peripheral] pragma export-rule [freshmeat-url] -[freshmeat+url] http://freshmeat.net/news/ [digit] / [digit] / [freshmeat-group1] / [freshmeat-group2] .html - -[freshmeat-group1] [digit] [digit] [digit] [digit] - -[freshmeat-group2] [digit] [digit] [digit] [digit] [digit] [digit] [digit] [digit] [digit] +[freshmeat+url] http://freshmeat.net/news/ [0..9] / [0..9] / <&4> [0..9] / <&9> [0..9] .html [freshmeat-desc] [app-type] [app-suffix] [app-type] [app-suffix] for [freshmeat-for] @@ -709,61 +701,58 @@ pragma export-rule [freshmeat-desc] [freshmeat-app] [app-name] [app-version] -[app-name] [app-name-simple] - [app-name-simple] - [app-name-simple] +[app-name] <^3> [app-name-simple] [app-name-complex] pragma export-rule [app-name] [app-name-simple] [app-name+simple] -[app-name+simple] [acronym] - [acronym] - [acronym] - [app-prefix] [acronym] - [app-prefix] [syllable] [letter] - [app-prefix] [syllable] 2 [syllable] - [acronym] +[app-name+simple] <^3> [acronym] + <^3> [letter-syll] + [syllable] 2 [syllable] [letter] [acronym] [random-name] [last-name] [syllable] [syllable] - [letter] [syllable] - [letter] [letter] [letter] - [letter] [letter] [letter] [letter] - [letter] [letter] [letter] [letter] - [letter] [letter] [letter] [letter] - [letter] [letter] [letter] [number-word] - [app-prefix] [acronym] - [app-prefix] [random-name] - [app-prefix] [letter] [letter] [letter] [letter] + <&3> [letter] + <^4> <&4> [letter] + <&3> [letter] [number-word] + [random-name] [app-common] -[app-name-complex] [plural+first] [app-type] [app-suffix] - [plural+first] [app-suffix] +[letter-syll] {empty} + +pragma prefix-with [letter-syll] [syllable] [letter] + +pragma prefix-with [app-name+simple] [app-prefix] + +[app-name-complex] [plural+first] [app-type] + [plural+first] + <^2> [acronym] [app-type] [acronym] [app-type] - [acronym] [app-type] [app-suffix] - [app-type] [app-suffix] - [2+syllable] [app-type] [app-suffix] - [random-name] [app-suffix] - [app-prefix+letter] [app-suffix] - [app-prefix+syllable] [app-type] [app-suffix] - [app-common] [app-type] [app-suffix] + [app-type] + [2+syllable] [app-type] + [random-name] + [app-prefix+letter] + [app-prefix+syllable] [app-type] + [app-common] [app-type] [tech-company] [peripheral] [device-type] - [buzzword-adjective] [app-suffix] + [buzzword-adjective] [plural+first] [buzzword-adjective] [buzzword-noun] [buzzword-job] [acronym] [buzzword-noun] - [app-prefix+name] [buzzword-adjective] [buzzword-job] [app-suffix] + [app-prefix+name] [buzzword-adjective] [buzzword-job] [random-name] [buzzword-job] - [buzzword-adjective] [buzzword-noun] [app-suffix] + [buzzword-adjective] [buzzword-noun] [linux-distro] +pragma suffix-with [app-name-complex] [app-suffix] + [device-type] 'WRITE ME' [app-prefix+name] [app-prefix] [random-name] -[app-prefix+letter] [app-prefix] [letter] [letter] [letter] [letter] +[app-prefix+letter] [app-prefix] <&4> [letter] [app-prefix+syllable] [app-prefix] [syllable] [syllable] @@ -885,14 +874,14 @@ pragma export-rule [app-name] [app-version] [app+version] [app+version] 0.0. [1..20] [version-suffix] - 0. [digit-nonzero] . [0..30] + 0. [1..9] . [0..30] 1.0. [0..30] - 1. [digit-nonzero] . [0..30] [version-suffix] - 2. [digit] . [0..30] - 2. [digit] . [0..30] [version-suffix] - [3..9] . [digit] . [0..30] - 0.0 [digit] [version-suffix] - 0. [digit] + 1. [1..9] . [0..30] [version-suffix] + 2. [0..9] . [0..30] + 2. [0..9] . [0..30] [version-suffix] + [3..9] . [0..9] . [0..30] + 0.0 [0..9] [version-suffix] + 0. [0..9] 0. [1..99] 1.0 [version-suffix] 1.00 @@ -900,13 +889,13 @@ pragma export-rule [app-name] 1. [1..99] [version-suffix] [2..20] . [1..99] [version-suffix] -[version-suffix] pl [digit] +[version-suffix] pl [0..9] alpha beta - [1..30] [letter] - -ac [digit] - -pre [digit] + -ac [0..9] + -pre [0..9] [linux-kernel-version] [linux-kernel+version] @@ -914,7 +903,7 @@ pragma export-rule [app-name] 2.3. [50..99] 2.4.0-pre [1..30] 2.4.0-ac [1..30] - 2.4. [digit] + 2.4. [0..9] 2.5. [0..99] [2..4] . [6..9] . [0..99] diff --git a/data/sample-grammars/long-data/cards.gram b/data/sample-grammars/long-data/cards.gram index 21ebc68..2ed1e2b 100755 --- a/data/sample-grammars/long-data/cards.gram +++ b/data/sample-grammars/long-data/cards.gram @@ -2,6 +2,7 @@ [tarot-card] [complete-many-things] [harrowed-many-things] + [alt-tarot-card] pragma initial-rule [card] diff --git a/data/sample-grammars/martial-arts.gram b/data/sample-grammars/martial-arts.gram index 2f9f557..7907e02 100755 --- a/data/sample-grammars/martial-arts.gram +++ b/data/sample-grammars/martial-arts.gram @@ -1,39 +1,39 @@ -[martial-arts-name] → [art-1] [art-2] - [art-1] [art-3] - [art-2] [art-3] - [art-1] [art-2] [art-3] +[martial-arts-name] [art-1] [art-2] + [art-1] [art-3] + [art-2] [art-3] + [art-1] [art-2] [art-3] pragma initial-rule [martial-arts-name] -[art-1] → running - hungry - angry - naked - drunken - fortunate - lazy - swift - powerful - enlightened +[art-1] running + hungry + angry + naked + drunken + fortunate + lazy + swift + powerful + enlightened -[art-2] → ox - tiger - dragon - crane - monkey - turtle - manticore - serpent - hummingbird - demon +[art-2] ox + tiger + dragon + crane + monkey + turtle + manticore + serpent + hummingbird + demon -[art-3] → fist - stance - spinning kick - attack - technique - style - dance - movement - touch - fu +[art-3] fist + stance + spinning kick + attack + technique + style + dance + movement + touch + fu diff --git a/data/sample-grammars/mary-sue.gram b/data/sample-grammars/mary-sue.gram index cb39264..f97ce40 100755 --- a/data/sample-grammars/mary-sue.gram +++ b/data/sample-grammars/mary-sue.gram @@ -1,5 +1,5 @@ -[mary-sue] she appears to be a normal [normal-desc] . [mary-sue2] - she appears to be a normal [normal-desc] [opt-dress] [mary-sue2] +[mary-sue] She appears to be a normal [normal-desc] . [mary-sue2] + She appears to be a normal [normal-desc] [opt-dress] [mary-sue2] [mary-sue2] She is [desc] and she will fight her enemies with her power to [power-desc] [mary-sue3] @@ -177,7 +177,7 @@ pragma initial-rule [mary-sue] cursed by god traveling through time -[power-desc] [power-1] +[power-desc] <^2> [power-1] [power-1] and [power-1] [power-1] [power-p1] [power-p2] @@ -300,10 +300,9 @@ pragma suffix-with [comp] [comp-weapon] [comp-name] [comp-name1] [comp-prefix] [comp-name1] -[comp-prefix] [comp-prefix1] - [comp-prefix2] - [comp-prefix1] [comp-prefix2] - [comp-prefix2] [comp-prefix1] +[comp-prefix] {empty} + +pragma prefix-with [comp-prefix] [comp-prefix1] [comp-prefix2] [comp-name1] dragon mecha @@ -437,10 +436,9 @@ pragma suffix-with [comp] [comp-weapon] rapier scissors -[compweap-prefix] [compweap-1] - [compweap-2] - [compweap-1] [compweap-2] - [compweap-2] [compweap-1] +[compweap-prefix] {empty} + +pragma prefix-with [compweap-prefix] [compweap-1] [compweap-2] [compweap-1] poisoned blessed diff --git a/data/sample-grammars/media.gram b/data/sample-grammars/media.gram index afb49c8..1a37118 100755 --- a/data/sample-grammars/media.gram +++ b/data/sample-grammars/media.gram @@ -10,14 +10,14 @@ pragma initial-rule [media-company] [chan+name] k [chan-name2] w [chan-name2] -[chan-name2] [letter] [letter] [letter] -tv +[chan-name2] <&3> [letter] -tv [radio-station] [radio+name] on frequency [radio+chan] [radio+name] k [radio+name2] w [radio+name2] -[radio+name2] [letter] [letter] [letter] [chan-type] +[radio+name2] <&3> [letter] [chan-type] [chan-type] -fm {$chantype=fm} -am {$chantype=am} @@ -25,11 +25,11 @@ pragma initial-rule [media-company] [radio+chan] 9 [radio-9chan] [$chantype-1chan] -[radio-9chan] [digit] . [digit] +[radio-9chan] [0..9] . [0..9] -[fm-1chan] 1 [digit] [digit] . [digit] +[fm-1chan] 1 [0..9] [0..9] . [0..9] -[am-1chan] 10 [digit] [digit] +[am-1chan] 10 [0..9] [0..9] [newspaper] the [newspaper-pair1] - [newspaper-pair2] the [newspaper-pair1] - [newspaper-pair2] - [newspaper-pair2] @@ -112,8 +112,7 @@ pragma initial-rule [media-company] pragma export-rule [newspaper-pair2] -[cardinal] [act-cardinal] - [act-cardinal] +[cardinal] <^2> [act-cardinal] [act-cardinal] by [act-cardinal] [2+cardinal] diff --git a/data/sample-grammars/mission.gram b/data/sample-grammars/mission.gram index e474fcd..8fbe9ca 100755 --- a/data/sample-grammars/mission.gram +++ b/data/sample-grammars/mission.gram @@ -211,7 +211,7 @@ pragma initial-rule [mission-statement] supply-chains synergies technologies - total {{empty}} quality {{empty}} management + total {empty} quality {empty} management version control vision catalysts for [noun] diff --git a/data/sample-grammars/names.gram b/data/sample-grammars/names.gram index 104c136..a0c41c3 100755 --- a/data/sample-grammars/names.gram +++ b/data/sample-grammars/names.gram @@ -30,17 +30,11 @@ pragma export-rule [random-name] [female-title] [first-name-female] [middle-initial] . [last-name] [gender-neutral-title] [full-name] [generic-title] [full-name] - [full-name] - [full-name] - [full-name] - [full-name] + <^4> [full-name] -[generic-title] [male-title] - [female-title] - [gender-neutral-title] - [male-title] - [female-title] - [gender-neutral-title] +[generic-title] <^2> [male-title] + <^2> [female-title] + <^2> [gender-neutral-title] [career-tech] # @TODO 10/23/17 Ben Culkin :TitleExpansion @@ -54,52 +48,52 @@ pragma export-rule [random-name] Uncle Lord Mayor Prince - archduke - grand duke - duke - marquis - marquess - count - earl - jarl - viscount - baron - lord - emperor - king - tsar - imperator - viceroy - pope - abbot - brother - friar - bishop - archbishob - priest - high priest - father - patriarch - vicar - chaplain - pastor - cardinal - monsieur - herr - senor - signor - emir - sultan - maharajah - lord protector - king-emperor - rex - lord of the manor - high king - crown prince - grand prince - praetor - headmaster + Archduke + Grand Duke + Duke + Marquis + Marquess + Count + Earl + Jarl + Viscount + Baron + Lord + Emperor + King + Tsar + Imperator + Viceroy + Pope + Abbot + Brother + Friar + Bishop + Archbishob + Priest + High Priest + Father + Patriarch + Vicar + Chaplain + Pastor + Cardinal + Monsieur + Herr + Senor + Signor + Emir + Sultan + Maharajah + Lord Protector + King-Emperor + Rex + Lord Of The Manor + High King + Crown Prince + Grand Prince + Praetor + Headmaster [female-title] Ms. Mrs. @@ -107,51 +101,51 @@ pragma export-rule [random-name] Mistress Aunt Lady Mayoress - princess - arch duchess - grand duchess - duchess - marquise - marchioness - countess - viscountess - baroness - lady - empress - queen - tsarina - imperatrix - rex - vicerine - popess - dame - abbess - sister - mother superior - mother - reverend mother - priestess - high priestess - matriarch - madame - mademoiselle - frau - fraulein - senora - senorita - signora - signorina - emira - sultana - maharani - lady protectoress - queen-empress - regina - lady of the manor - high queen - crown princess - grand princess - headmistress + Princess + Arch Duchess + Grand Duchess + Duchess + Marquise + Marchioness + Countess + Viscountess + Baroness + Lady + Empress + Queen + Tsarina + Imperatrix + Rex + Vicerine + Popess + Dame + Abbess + Sister + Mother Superior + Mother + Reverend Mother + Priestess + High Priestess + Matriarch + Madame + Mademoiselle + Frau + Fraulein + Senora + Senorita + Signora + Signorina + Emira + Sultana + Maharani + Lady Protectoress + Queen-Empress + Regina + Lady Of The Manor + High Queen + Crown Princess + Grand Princess + Headmistress [gender-neutral-title] Dr. Professor @@ -172,188 +166,186 @@ pragma export-rule [random-name] [ambassador] [envoy] [secretary] - attache - attache ( to [full-name-and-title] ) - provost - chevalier + Attache + Attache ( to [full-name-and-title] ) + Provost + Chevalier [judicial-title] [religious-title] [military-title] - coach - wizard - grand wizard - imperial wizard - principal - comrade - docent - lama - druid - archdruid - rabbi - ayatollah - bodhisattva - saoshyant - sheikh - archon - legate - satrap - consul - doge - pharaoh - caliph - khagan - khan - shah - shogun - despot - kaiser - don - comissioner - comptroller - courtier + Coach + Wizard + Grand Wizard + Imperial Wizard + Principal + Comrade + Docent + Lama + Druid + Archdruid + Rabbi + Ayatollah + Bodhisattva + Saoshyant + Sheikh + Archon + Legate + Satrap + Consul + Doge + Pharaoh + Caliph + Khagan + Khan + Shah + Shogun + Despot + Kaiser + Don + Comissioner + Comptroller + Courtier courtier (to [full-name-and-title] ) - curator - intendant - superindentent - sheriff - treasurer - warden - lord warden - apprentice + Curator + Intendant + Superindentent + Sheriff + Treasurer + Warden + Lord Warden + Apprentice apprentice (to a [generic-title] ) apprentice (to [full-name-and-title] ) - journeyman - adept - centurion - daimyo - elector - inquisitor - grand inquisitor - pontiff - knight - squire + Journeyman + Adept + Centurion + Daimyo + Elector + Inquisitor + Grand Inquisitor + Pontiff + Knight + Squire squire (to [full-name-and-title] ) -[military-title] admiral - grand admiral - lord high admiral - rear admiral - vice admiral - brigadier - captain - group captain - colonel - lieutenant colonel - commander - commander-in-chief - lieutenant commander - wing commander - commodore - air commodore - corporal - lance corporal - staff corporal - general - first lieutenant - flight lieutenant - major - marshal - air marshal - field marshal - mate - chief mate - first mate +[military-title] mdmiral + Grand Admiral + Lord High Admiral + Rear Admiral + Vice Admiral + Brigadier + Captain + Group Captain + Colonel + Lieutenant Colonel + Commander + Commander-In-Chief + Lieutenant Commander + Wing Commander + Commodore + Air Commodore + Corporal + Lance Corporal + Staff Corporal + General + First Lieutenant + Flight Lieutenant + Major + Marshal + Air Marshal + Field Marshal + Mate + Chief Mate + First Mate [officer] - private - sergeant - sergeant at arms - brigadier general - cadet - ensign + Private + Sergeant + Sergeant At Arms + Brigadier General + Cadet + Ensign -[officer] officer - chief academic officer - chief executive officer - chief information officer - chief operating officer - field officer - first officer - flag officer - warrant officer - petty officer - police officer - political officer - senior officer - staff officer - police officer - constable - agent +[officer] Officer + Chief Academic Officer + Chief Executive Officer + Chief Information Officer + Chief Operating Officer + Field Officer + First Officer + Flag Officer + Warrant Officer + Petty Officer + Police Officer + Political Officer + Senior Officer + Staff Officer + Police Officer + Constable + Agent -[religious-title] venerable - blessed +[religious-title] Venerable + Blessed Saint St. - decon - archdeacon - acolyte - dean - elder - minister - monsignor - reader - almoner + Decon + Archdeacon + Acolyte + Dean + Elder + Minister + Monsignor + Reader + Almoner -[judicial-title] advocate - attorney - attorney general - bailiff - chancellor - judge - justice - lord chief justice - justice of the peace - magistrate - solicitor +[judicial-title] Advocate + Attorney + Attorney General + Bailiff + Chancellor + Judge + Justice + Lord Chief Justice + Justice Of The Peace + Magistrate + Solicitor -[president] president - deputy president - vice president - executive vice president - lord president of the council +[president] President + Deputy President + Vice President + Executive Vice President + Lord President Of The Council -[ambassador] ambassador - ambassador (to [nation] ) +[ambassador] Ambassador + Ambassador (to [nation] ) -[envoy] envoy - envoy (to [nation] ) - envoy (to the [generic-title] ) +[envoy] Envoy + Envoy (to [nation] ) + Envoy (to the [generic-title] ) envoy (to [full-name-and-title] ) - special envoy - special envoy (to [nation] ) - special envoy (to the [generic-title] ) - special envoy (to [full-name-and-title] ) + Special Envoy + Special Envoy (to [nation] ) + Special Envoy (to the [generic-title] ) + Special Envoy (to [full-name-and-title] ) -[secretary] secretary - secretary (to [full-name-and-title] ) - secretary (to the [generic-title] ) - under-secretary - under-secretary (to [full-name-and-title] ) - under-secretary (to the [generic-title] ) - foreign secretary - general secretary - secretary of state +[secretary] Secretary + Secretary (to [full-name-and-title] ) + Secretary (to the [generic-title] ) + Under-Secretary + Under-Secretary (to [full-name-and-title] ) + Under-Secretary (to the [generic-title] ) + Foreign Secretary + General Secretary + Secretary Of State pragma suffix-with [full-name-and-title] [title-generation] -pragma suffix-with [full-name-and-title] [title-suffix] -pragma suffix-with [full-name-and-title] [title-suffix] -pragma suffix-with [full-name-and-title] [title-suffix] +pragma suffix-with [full-name-and-title] <&1..3> [title-suffix] [title-generation] Sr. Jr. [roman-numeral] - the [roman-numeral] - the [ordinal] - the [ordinal-number] + The [roman-numeral] + The [ordinal] + The [ordinal-number] [title-trailer] CPA Ph.D @@ -423,9 +415,9 @@ pragma suffix-with [full-name-and-title] [title-suffix] [random-name] [actual+random-name] -[actual+random-name] [syllable] [syllable] - [syllable] [syllable] [last-syllable] +[actual+random-name] <&1..3> [syllable] + <&1..3> [syllable] [last-syllable] [syllable] [vowel] [consonant-group] [vowel] [consonant-group] [vowel] [syllable] - [vowel] [syllable] [syllable] + [vowel] <&1..3> [syllable] [syllable] [vowel-group] [consonant] diff --git a/data/sample-grammars/numbers.gram b/data/sample-grammars/numbers.gram index 4db84b9..a494fab 100755 --- a/data/sample-grammars/numbers.gram +++ b/data/sample-grammars/numbers.gram @@ -8,12 +8,12 @@ pragma export-rule [small-number] pragma export-rule [medium-number] pragma export-rule [zipcode] -[actual+small-number] [digit-nonzero] - [digit-nonzero] [digit] - [digit-nonzero] [digit] [digit] +[actual+small-number] [1..9] + [1..9] [0..9] + [1..9] [0..9] [0..9] -[actual+medium-number] [digit-nonzero] [digit] [digit] - [digit-nonzero] [digit] [digit] [digit] - [digit-nonzero] [digit] [digit] [digit] [digit] +[actual+medium-number] [1..9] [0..9] [0..9] + [1..9] [0..9] [0..9] [0..9] + [1..9] [0..9] [0..9] [0..9] [0..9] -[actual+zipcode] [digit] [digit] [digit] [digit] [digit] +[actual+zipcode] [0..9] [0..9] [0..9] [0..9] [0..9] diff --git a/data/sample-grammars/ordinal.gram b/data/sample-grammars/ordinal.gram index da4aa4e..70e9b39 100755 --- a/data/sample-grammars/ordinal.gram +++ b/data/sample-grammars/ordinal.gram @@ -3,10 +3,10 @@ pragma export-rule [ordinal-number] [actual+ordinal-number] [ordinal-digit] - 1 [digit] th - [digit-twoup] [ordinal-digit] - [digit-twoup] [ordinal-digit] - [digit-nonzero] [ordinal-number] + 1 [0..9] th + [2..9] [ordinal-digit] + [2..9] [ordinal-digit] + [1..9] [ordinal-number] [ordinal-digit] 1st 2nd diff --git a/data/sample-grammars/organization.gram b/data/sample-grammars/organization.gram index 9c88686..0101aa1 100755 --- a/data/sample-grammars/organization.gram +++ b/data/sample-grammars/organization.gram @@ -1,15 +1,14 @@ [organization-desc] [org-political] -[org-postfix] (allies of [org-political] ) +[org-postfix] <^3> {empty} + (allies of [org-political] ) (enemies of [org-political] ) (secretly opposed to [org-political] ) (secretly in cohorts with [org-political] ) (based in [city] ) (based in [town-name] ) -pragma suffix-with [organization-desc] [org-postfix] -pragma suffix-with [organization-desc] [org-postfix] -pragma suffix-with [organization-desc] [org-postfix] +pragma suffix-with [organization-desc] <&1..3> [org-postfix] [organization] [org-political] @@ -119,7 +118,7 @@ pragma prefix-with [org-goal] [org-goal-abolish] wealth filthy rich -[min+wage] [9..20] . [digit] [digit] +[min+wage] [9..20] . [0..9] [0..9] [protect] bill of rights first amendment diff --git a/data/sample-grammars/part-creature.gram b/data/sample-grammars/part-creature.gram index 41bbb83..5875ea1 100755 --- a/data/sample-grammars/part-creature.gram +++ b/data/sample-grammars/part-creature.gram @@ -16,12 +16,8 @@ pragma prefix-with [creature-choice] [abilities] pragma initial-rule [full-creature] pragma export-rule [creature-choice] -[abilities] [ability] - [ability] - [ability] - [ability] - [quote-ability] and [quote-ability] - [quote-ability] and [quote-ability] +[abilities] <^4> [ability] + <^2> [quote-ability] and [quote-ability] [quote-ability] , [quote-ability] and [quote-ability] [quote-ability] ( [ability] ) @@ -60,12 +56,8 @@ pragma despace-rule [eating] # @TODO 10/26/17 Ben Culkin :CharacteristicAdditions # Add more templates and classes to the list -[characteristics] [characteristic] - [characteristic] - [characteristic] - [characteristic] - [quote-characteristic] and [quote-characteristic] - [quote-characteristic] and [quote-characteristic] +[characteristics] <^4> [characteristic] + <^2> [quote-characteristic] and [quote-characteristic] [quote-characteristic] , [quote-characteristic] and [quote-characteristic] [quote-characteristic] ( [characteristic] ) diff --git a/data/sample-grammars/phone-number.gram b/data/sample-grammars/phone-number.gram index 163ef4a..e9c3a7c 100755 --- a/data/sample-grammars/phone-number.gram +++ b/data/sample-grammars/phone-number.gram @@ -10,20 +10,18 @@ pragma suffix-with [us-phone-number] [extension] pragma export-rule [us-phone-number] -[area+code] ( [digit] [digit] [digit] ) +[area+code] ( [0..9] [0..9] [0..9] ) -[full+num] [digit] [digit] [digit] - [digit] [digit] [digit] [digit] +[full+num] [0..9] [0..9] [0..9] - [0..9] [0..9] [0..9] [0..9] [intl+num] [1..100] - [full+num] -[ext+num] [digit-nonzero] [digit] [digit] +[ext+num] [1..9] [0..9] [0..9] -pragma suffix-with [ext+num] [digit] -pragma suffix-with [ext+num] [digit] -pragma suffix-with [ext+num] [digit] +pragma suffix-with [ext+num] <&1..3> [0..9] -[letter+num] [digit] [digit] [digit] - [letter] [letter] [letter] [letter] +[letter+num] [0..9] [0..9] [0..9] - [letter] [letter] [letter] [letter] -[1800+num] 1-800- [digit] [digit] [digit] - [digit] [digit] [digit] [digit] +[1800+num] 1-800- [0..9] [0..9] [0..9] - [0..9] [0..9] [0..9] [0..9] [1800+letter+num] 1-800- [letter] [letter] [letter] [letter] [letter] [letter] [letter] diff --git a/data/sample-grammars/pokeattacks.gram b/data/sample-grammars/pokeattacks.gram index 649f42c..7d0ec00 100755 --- a/data/sample-grammars/pokeattacks.gram +++ b/data/sample-grammars/pokeattacks.gram @@ -1,29 +1,22 @@ -[pokeattack] [pokeattack-name] +[pokeattack] {@oword:=[word-1]} {@tword:=[word-2]} {@ptype:=[poke-type]} [pokeattack-name] -[attack-type] ( [poke-type] type) - ( [poke-type] / [poke-type] type) +[attack-type] ( [@ptype] type) + ( [@ptype] / [@ptype] type) [attack-pp] ( [5..40] pp ) -pragma despace-rule [attack-type] -pragma despace-rule [attack-pp] - pragma suffix-with [pokeattack] [move-kind] pragma suffix-with [pokeattack] [attack-type] pragma suffix-with [pokeattack] [attack-pp] -[pokeattack-name] [word-1] [word-1] - [word-2] [word-2] - [word-1] [word-2] - [word-2] [word-1] - [word-1] [seperator] [word-1] - [word-2] [seperator] [word-2] - [word-1] [seperator] [word-2] - [word-2] [seperator] [word-1] - [word-1] [seperator] [word-1] - [word-2] [seperator] [word-2] - [word-1] [seperator] [word-2] - [word-2] [seperator] [word-1] +[pokeattack-name] <^2> <&1..2> [@oword] [@oword] + <^2> <&1..2> [@tword] [@tword] + <^2> [@oword] [@tword] + <^2> [@tword] [@oword] + [@oword] [seperator] [@oword] + [@oword] [seperator] [@tword] + [@tword] [seperator] [@oword] + [@tword] [seperator] [@tword] [seperator] - / @@ -54,16 +47,16 @@ pragma suffix-with [pokeattack] [attack-pp] pragma initial-rule [pokeattack] pragma export-rule [pokeattack-name] -[word-11] [word-1] +[word-11] [@oword] pragma suffix-with [word-11] [seperator] -[word-21] [word-2] +[word-21] [@tword] pragma prefix-with [word-21] [seperator] -pragma prefix-with [pokeattack-name] [word-1] -pragma suffix-with [pokeattack-name] [word-2] +pragma prefix-with [pokeattack-name] [word-11] +pragma suffix-with [pokeattack-name] [word-21] [word-1] acid aerial diff --git a/data/sample-grammars/president.gram b/data/sample-grammars/president.gram index 63b928c..4312f4e 100755 --- a/data/sample-grammars/president.gram +++ b/data/sample-grammars/president.gram @@ -1,64 +1,66 @@ -[us-president] george washington - john adams - thomas jefferson - james madison - james monroe - john quincy adams - andrew jackson - martin van buren - william henry harrison - john tyler - james polk - zachary taylor - millard fillmore - franklin pierce - james buchanan - abraham lincoln - andrew johnson - ulysses s grant - rutherford b. hayes - james garfield - chester a. arthur - grover cleveland - benjamin harrison - william mckinley - theodore roosevelt - william taft - woodrow wilson - warren g. harding - calvin coolidge - herbert hoover - franklin d. roosevelt - harry s truman - dwight eisenhower - john f. kennedy - lyndon b. johnson - richard nixon - gerald ford - jimmie carter - ronald reagan - george bush - bill clinton - george w. bush - barack obama - donald trump +[us-president] George Washington + John Adams + Thomas Jefferson + James Madison + James Monroe + John Quincy Adams + Andrew Jackson + Martin Van Buren + William Henry Harrison + John Tyler + James Polk + Zachary Taylor + Millard Fillmore + Franklin Pierce + James Buchanan + Abraham Lincoln + Andrew Johnson + Ulysses S Grant + Rutherford B. Hayes + James Garfield + Chester A. Arthur + Grover Cleveland + Benjamin Harrison + William Mckinley + Theodore Roosevelt + William Taft + Woodrow Wilson + Warren G. Harding + Calvin Coolidge + Herbert Hoover + Franklin D. Roosevelt + Harry S Truman + Dwight Eisenhower + John F. Kennedy + Lyndon B. Johnson + Richard Nixon + Gerald Ford + Jimmie Carter + Ronald Reagan + George Bush + Bill Clinton + George W. Bush + Barack Obama + Donald Trump [us-president-common] washington - adams - jefferson - madison - monroe - adams - jackson - van buren - harrison - taylor - lincoln - johnson - garfield - roosevelt - wilson - truman + Adams + Jefferson + Madison + Monroe + Adams + Jackson + Van Buren + Harrison + Taylor + Lincoln + Johnson + Garfield + Roosevelt + Wilson + Truman + Obama + Trump pragma export-rule [us-president] pragma export-rule [us-president-common] diff --git a/data/sample-grammars/rune.gram b/data/sample-grammars/rune.gram index 4c64e5a..f4bfa44 100755 --- a/data/sample-grammars/rune.gram +++ b/data/sample-grammars/rune.gram @@ -1,19 +1,14 @@ -# @TODO 10/23/17 Ben Culkin :RuneDebug -# Something seems to be wrong with this grammar, and I'm not sure as to -# the exact details. -# -# The problem is that we are getting multiple runes running together -# without an obvious cause. +[rune-string] {@1rune:=[rune-1]} {@2rune:=[rune-2]} {@3rune:=[rune-3]} [act-rune-string] -[rune-string] [rune-2] - [rune-1] [rune-2] - [rune-1] [rune-2] [rune-3] - [rune-2] [rune-3] +[act-rune-string] [@2rune] + [@1rune] [@2rune] + [@1rune] [@2rune] [@3rune] + [@2rune] [@3rune] pragma initial-rule [rune-string] -pragma prefix-with [rune-string] [rune-1] -pragma suffix-with [rune-string] [rune-3] +pragma prefix-with [rune-string] [@1rune] +pragma suffix-with [rune-string] [@3rune] [rune-1] a dagger plunged into vines growing out of diff --git a/data/sample-grammars/states.gram b/data/sample-grammars/states.gram index 43f1402..ee4f547 100755 --- a/data/sample-grammars/states.gram +++ b/data/sample-grammars/states.gram @@ -1,53 +1,53 @@ -[us-state] alabama - alaska - arizona - arkansas - california - colorado - connecticut - delaware - florida - georgia - hawaii - idaho - illinois - indiana - iowa - kansas - kentucky - louisiana - maine - maryland - massachusetts - michigan - minnesota - mississippi - missouri - montana - nebraska - nevada - new hampshire - new jersey - new mexico - new york - north carolina - north dakota - ohio - oklahoma - oregon - pennsylvania - rhode island - south carolina - south dakota - tennessee - texas - utah - vermont - virginia - washington - west virginia - wisconsin - wyoming +[us-state] Alabama + Alaska + Arizona + Arkansas + California + Colorado + Connecticut + Delaware + Florida + Georgia + Hawaii + Idaho + Illinois + Indiana + Iowa + Kansas + Kentucky + Louisiana + Maine + Maryland + Massachusetts + Michigan + Minnesota + Mississippi + Missouri + Montana + Nebraska + Nevada + New Hampshire + New Jersey + New Mexico + New York + North Carolina + North Dakota + Ohio + Oklahoma + Oregon + Pennsylvania + Rhode Island + South Carolina + South Dakota + Tennessee + Texas + Utah + Vermont + Virginia + Washington + West Virginia + Wisconsin + Wyoming pragma export-rule [us-state] pragma export-rule [us-postalstate] diff --git a/data/sample-grammars/superhero.gram b/data/sample-grammars/superhero.gram index cdb609f..c463821 100755 --- a/data/sample-grammars/superhero.gram +++ b/data/sample-grammars/superhero.gram @@ -5,14 +5,9 @@ pragma initial-rule [superhero-desc] [superhero-postfix] [superhero-ally] [superhero-enemy] -pragma suffix-with [superhero-desc] [superhero-postfix] -pragma suffix-with [superhero-desc] [superhero-postfix] -pragma suffix-with [superhero-desc] [superhero-postfix] - +pragma suffix-with [superhero-desc] <&1..3> [superhero-postfix] pragma suffix-with [superhero-desc] [superhero-secret] - -pragma suffix-with [superhero-desc] [superhero-org] -pragma suffix-with [superhero-desc] [superhero-org] +pragma suffix-with [superhero-desc] <&1..2> [superhero-org] [superhero-ally] (ally of [superhero-name] ) (secret ally of [superhero-name] ) @@ -37,15 +32,15 @@ pragma suffix-with [superhero-desc] [superhero-org] (second in command of the [organization] ) ( [generic-title] of the [organization] ) -[superhero-name] [first-part] [second-part] - [second-part] [first-part] - -pragma export-rule [superhero-name] +[superhero-name] {empty} +pragma prefix-with [superhero-name] [first-part] [second-part] pragma suffix-with [superhero-name] [third-part] +pragma prefix-with [superhero-name] [third-part2] pragma suffix-with [superhero-name] [fourth-part] pragma suffix-with [superhero-name] [fifth-part] -pragma prefix-with [superhero-name] [third-part2] + +pragma export-rule [superhero-name] [fifth-part] and the [third-part2] and [third-part2] @@ -123,8 +118,7 @@ pragma suffix-with [fifth-part] [fourth-part] Torch Magus Wizard - [second-class] - [second-class] + <^2> [second-class] [second-class] Rider Caster @@ -137,6 +131,11 @@ pragma suffix-with [fifth-part] [fourth-part] Ruler Shielder Avenger + Foreigner + Alter Ego + Moon Cancer + +pragma prefix-with [second-class] Grand [third-part] ,The [third-part2] @@ -219,8 +218,7 @@ pragma suffix-with [third-part] [fifth-part] Deadly Flaming Thunderer - [major-arcana] - [major-arcana] + <^2> [major-arcana] Cardinal Bishop Archbishop @@ -231,14 +229,12 @@ pragma suffix-with [third-part] [fifth-part] Motherly Sinister Embodiment - [generic-title] - [generic-title] + <^2> [generic-title] [fourth-part] of [fourth-part-act] [fourth-part-act] the [fourth-part-the] - [harrowed-many-things] - [harrowed-many-things] + <^2> [harrowed-many-things] Hope Destiny Justice @@ -249,10 +245,8 @@ pragma suffix-with [third-part] [fifth-part] Knowledge Earth Eternal Fire - [planet] - [planet] - [second-part] - [second-part] + <^2> [planet] + <^2> [second-part] [planet] Earth Mars @@ -282,12 +276,9 @@ pragma suffix-with [third-part] [fifth-part] Ancients Archive Moon - [generic-title] - [generic-title] - [exalt-type] - [exalt-type] - [arcana] - [arcana] + <^2> [generic-title] + <^2> [exalt-type] + <^2> [arcana] [exalt-type] Dawn Zenith @@ -295,10 +286,11 @@ pragma suffix-with [third-part] [fifth-part] Night Eclipse -[arcana] [tarot-card] - Arcana +[arcana] [%tarot-card|%alt-tarot-card] Minor Arcana Major Arcana - [ordinal-roman] Arcana - [ordinal-number] Arcana - [ordinal] Arcana + <^3> [ordinal-arcana] + +[ordinal-arcana] {empty} + +pragma prefix-with [ordinal-arcana] Arcana [%ordinal|%ordinal-roman|%ordinal-number] diff --git a/data/sample-grammars/tarotcard.gram b/data/sample-grammars/tarotcard.gram index 43741a0..ee21c23 100755 --- a/data/sample-grammars/tarotcard.gram +++ b/data/sample-grammars/tarotcard.gram @@ -1,4 +1,4 @@ -[tarot-card] [adjective-of] [title] +[alt-tarot-card] [adjective-of] [title] [adjective-of] [title] [adjective] [adjective-of] [title] [adjective] [noun] [adjective-of] [noun] [title] @@ -13,10 +13,8 @@ pragma initial-rule [tarot-card] -[title] [male-title] - [male-title] - [female-title] - [female-title] +[title] <^2> [male-title] + <^2> [female-title] [misc-title] [male-title] emperor diff --git a/data/sample-grammars/technobabble.gram b/data/sample-grammars/technobabble.gram index 3861576..1f20fb4 100755 --- a/data/sample-grammars/technobabble.gram +++ b/data/sample-grammars/technobabble.gram @@ -1,14 +1,13 @@ -[technobabble] [part-prefix] [part-suffix] [part-problem] - [part-suffix] [part-prefix] [part-problem] - [part-prefix] [part-problem] +[technobabble] [part-clause] [part-problem] +[part-clause] {empty} + +pragma prefix-with [part-clause] [part-prefix] [part-suffix] pragma initial-rule [technobabble] pragma suffix-with [technobabble] [part-cause] -[part-cause] the [part-prefix] - the [part-suffix] - the [part-prefix] [part-suffix] +[part-cause] the [part-clause] pragma suffix-with [part-cause] [add-cause] diff --git a/data/sample-grammars/theory.gram b/data/sample-grammars/theory.gram index af2ce49..828b180 100755 --- a/data/sample-grammars/theory.gram +++ b/data/sample-grammars/theory.gram @@ -1,12 +1,9 @@ -[theory] [plural+last] [theory-suffix] +[theory] <^2> [plural+last] [theory-suffix] + <^2> the [last-name] [theory-suffix] + <^3> the [2+last-name] [theory-suffix] [plural+last] [theory-suffix] - the [2+last-name] [theory-suffix] - the [2+last-name] [theory-suffix] - the [2+last-name] [theory-suffix] the [3+last-name] [theory-suffix] [plural+last] [ordinal] [theory-suffix] - the [last-name] [theory-suffix] - the [last-name] [theory-suffix] pragma initial-rule [theory] diff --git a/data/sample-grammars/trademark.gram b/data/sample-grammars/trademark.gram index 7ec2fef..3871db6 100755 --- a/data/sample-grammars/trademark.gram +++ b/data/sample-grammars/trademark.gram @@ -37,9 +37,7 @@ pragma initial-rule [trademark] cere mor -[trademark+drug] [trademark-drug-fragment] [trademark-drug-suffix] - [trademark-drug-fragment] [trademark-drug-suffix] - [trademark-drug-fragment] [trademark-drug-suffix] +[trademark+drug] <^3> [trademark-drug-fragment] [trademark-drug-suffix] [trademark-fragment] [trademark-drug-suffix] [trademark-fragment] [trademark-drug-fragment] [trademark-drug-suffix] [syllable] [trademark-drug-fragment] [trademark-drug-suffix] diff --git a/data/sample-grammars/web.gram b/data/sample-grammars/web.gram index 357fc36..32d2979 100755 --- a/data/sample-grammars/web.gram +++ b/data/sample-grammars/web.gram @@ -20,14 +20,10 @@ pragma export-rule [big-tld] [actual+email] [email-initial] @ [email-trailing] -[email-initial] [username] - [acronym] - [email-alias] - [full-name] - [username] - [acronym] - [email-alias] - [full-name] +[email-initial] <^2> [username] + <^2> [acronym] + <^2> [email-alias] + <^2> [full-name] [subdomain-name] [email-misc] [email-initial] + [email-initial] @@ -99,7 +95,7 @@ pragma export-rule [big-tld] [url-with-path] [url-with-path] -[url-with-path] [url-protocol] :// www.geocities.com/ [neighborhood] / [digit-nonzero] [digit] [digit] [digit] / +[url-with-path] [url-protocol] :// www.geocities.com/ [neighborhood] / [1..9] [0..9] [0..9] [0..9] / [url-protocol] :// [url-begin] . [acronym] .net/ [url-username] / [url-protocol] :// [url-begin] . [town-name] .net/ [url-username] [url-protocol] :// [subdomain-name] . [acronym] .net/ [url-username] @@ -175,15 +171,9 @@ pragma export-rule [big-tld] [last-name] [syllable] [syllable] -[tld] com - com - com - com - com - net - net - org - org +[tld] <^5> com + <^2> net + <^2> org edu de ca @@ -195,8 +185,7 @@ pragma export-rule [big-tld] se no -[big-tld] com - com +[big-tld] <^2> com net org @@ -204,7 +193,7 @@ pragma export-rule [big-tld] [planet] mail www2 - www [digit] + www [0..9] alpha beta gamma @@ -217,10 +206,10 @@ pragma export-rule [big-tld] [email-initial] [subdomain-name] - [subdomain-name] -[email-misc] - [us-stateadj] +[email-misc] [us-stateadj] [town-name] [complete-many-things] + [minor-arcana] [major-arcana] [trademark+drug] [trademark] diff --git a/data/sample-grammars/zadrons-pouch.gram b/data/sample-grammars/zadrons-pouch.gram index f72cf25..b918f1c 100755 --- a/data/sample-grammars/zadrons-pouch.gram +++ b/data/sample-grammars/zadrons-pouch.gram @@ -64,9 +64,7 @@ pragma export-rule [zadrons-item] imprisoning messaging bounty - [card] - [card] - [card] + <^3> [card] [crys-sphere] → crystal of [crystal-type] [crys-act] |
