-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgrammar.baba
155 lines (137 loc) · 14.3 KB
/
grammar.baba
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
@import('baba-grammar-common/transforms/verb', verb)
@import('baba-grammar-common/transforms/noun', noun)
@import('baba-grammar-common/transforms/common', common)
@export('sentence', sentence)
@export('paragraph', paragraph)
@export('git-noun', noun.git)
@export('git-verb', verb.git)
@export('command-action', command-action)
@export('command-description', command-description)
@export('command-option-raw', command-option-raw)
# Variables
$command-noun <noun.git>
$command-verb <verb.git>
sentence [
"<condition:common.uppercase-first>, <statement>.",
"<condition:common.uppercase-first>, <statement>, <conclusion>.",
"<statement:common.uppercase-first>.",
"<statement:common.uppercase-first>, <conclusion>.",
]
paragraph [
"<sentence> <sentence>",
"<sentence> <sentence> <sentence>",
"<sentence> <sentence> <sentence> <sentence>",
]
verb {
common [abandon, abduct, abolish, abuse, accuse, acquire, activate, adapt, add, address, adjust, advise, aid, alert, allocate, answer, apprehend, approach, arbitrate, arrange, arrest, assault, assemble, assess, assign, assist, attack, attract, audit, augment, authenticate, authorize, automate, avoid, award, balance, bang, beat, berate, bite, blast, blend, block, blow, book, boost, brace, brief, brighten, buck, bump, bury, bushwhack, calculate, call, calm, cancel, capitalize, catch, centralize, certify, challenge, change, channel, charge, chart, chase, check, choke, circumscribe, circumvent, clap, clarify, classify, climb, clip, clutch, coach, collaborate, collapse, collate, collect, collide, combine, command, commandeer, compile, complete, compose, compute, conceive, condense, configure, conserve, consolidate, construct, consult, contract, control, convert, coordinate, correlate, counsel, count, cram, crash, create, cripple, critique, cultivate, cure, customize, cut, decorate, decrease, define, delegate, delete, delineate, deliver, demonstrate, derive, describe, design, detail, detect, determine, develop, devise, diagnose, dictate, direct, discard, discover, dispatch, display, dissect, distinguish, distribute, ditch, divert, dodge, dominate, dope, double, douse, draft, drag, drain, dramatize, drape, draw, dress, drill, drink, drop, drown, drug, dry, dunk, earn, edge, edit, educate, eject, elect, elevate, eliminate, employ, enable, enact, encourage, endure, engage, engineer, enjoin, ensnare, ensure, enter, equip, escalate, escape, establish, evacuate, evade, evaluate, evict, examine, execute, exhale, exhibit, exit, expand, expedite, expel, explode, experience, experiment, explain, explore, expose, extend, extirpate, extract, extricate, fade, fake, fashion, fear, feed, feel, fight, file, fill, find, finger, finish, fix, flag, flap, flash, flatten, flaunt, flay, flick, fling, flip, flog, flounder, flout, flush, focus, fondle, force, forecast, forge, formalize, form, formulate, fornicate, foster, found, fumble, fund, furnish, gain, gather, generate, gesture, get, give, gouge, govern, graduate, grab, grasp, greet, grind, grip, grope, ground, grow, guard, guide, gyrate, hack, hail, halt, halve, hammer, handle, hang, harass, hasten, haul, head, help, hide, hijack, hire, hit, hitch, hoist, hold, hug, hurl, hurtle, hypothesize, identify, ignore, illustrate, imitate, implement, improve, improvise, increase, index, indict, individualize, induce, inflict, influence, inform, initiate, inject, injure, insert, inspect, inspire, install, instigate, instruct, integrate, intensify, interchange, interpret, interview, introduce, invade, invent, investigate, isolate, itemize, jab, jam, jar, jerk, jimmy, jingle, jolt, judge, jump, justify, keel, keynote, kibitz, kick, kidnap, kill, knife, land, lash, launch, lead, leap, learn, lecture, lessen, level, license, lick, link, listen, locate, log, lower, make, maim, maintain, manage, mangle, manipulate, manufacture, mark, market, massage, master, maul, measure, mediate, meet, mend, mentor, mimic, minimize, mobilize, mock, model, molest, monitor, motivate, mourn, move, mumble, murder, muster, mutilate, nab, nag, nail, narrow, needle, negotiate, nick, nip, nominate, nurture, observe, obtain, occupy, offer, operate, order, organize, originate, outline, overcome, oversee, pack, paddle, page, panic, park, parry, pass, pat, patrol, pause, paw, peel, penetrate, perceive, perfect, perform, persuade, photograph, pick, picket, pile, pilot, pin, pinch, pioneer, pirate, pitch, place, plan, play, plow, plunge, pocket, poke, polish, pose, position, pounce, predict, prepare, prescribe, present, print, prioritize, probe, process, procure, prod, produce, program, project, promote, prompt, proofread, propel, propose, protect, prove, provide, provoke, publicize, publish, pull, pump, punch, purchase, purge, pursue, push, qualify, question, quicken, quit, quiz, race, raid, raise, ram, ransack, rate, rattle, ravage, read, realize, rebuild, receive, recommend, reconcile, record, recoup, recruit, redeem, reduce, refer, regain, regulate, reinforce, rejoin, relate, relax, relieve, remove, render, renew, renovate, reorganize, repair, repel, report, represent, repulse, research, resign, resist, resolve, respond, restore, retain, retaliate, retreat, retrieve, reveal, review, revise, ride, rip, risk, rob, rock, roll, rub, rush, salute, satisfy, save, saw, scale, scan, scare, scatter, scavenge, schedule, scold, scoop, score, scour, scout, scrape, scream, screen, screw, scrub, scruff, scuffle, sculpt, seal, search, secure, seduce, segment, seize, select, sell, sense, serve, service, set, sever, sew, shake, shanghai, shape, share, sharpen, shave, shear, shell, shield, shift, shock, shoot, shorten, shout, shove, shovel, show, shun, sidestep, signal, simplify, sip, skim, skip, skirt, slacken, slam, slap, slash, slay, slide, smack, smear, smell, smuggle, snap, snatch, sniff, snuggle, soak, soil, solve, sort, spear, spin, splice, split, spot, spread, stack, stamp, start, startle, steal, steer, stiffen, stifle, stimulate, stock, stomp, stop, strangle, strap, streamline, strengthen, stress, strike, strip, stroke, stub, study, stuff, stun, subdue, submerge, submit, suck, summarize, summon, supervise, support, surrender, survey, suspend, sustain, swagger, swallow, swap, swing, swipe, switch, synergize, synthesize, systematize, tabulate, tackle, take, tap, target, taste, taunt, teach, tear, tease, terrorize, test, thrash, thread, threaten, throw, tickle, tie, tighten, tilt, tip, toss, touch, tout, track, train, transcribe, transfer, transform, translate, transport, trap, tread, treat, trim, trip, triple, tuck, tug, tumble, turn, tutor, twist, type, uncover, understand, undertake, undo, undress, unfold, unify, unite, unravel, untangle, unwind, update, usher, utilize, vacate, validate, value, vanquish, vault, vent, verbalize, verify, violate, ward, watch, wave, weigh, whack, whip, whirl, whistle, widen, wield, wiggle, withdraw, work, wreck, wrench, wrestle, write, yank, yell, yelp, yield, zap, zip]
git [add, allot, annotate, apply, archive, bisect, blame, branch, bundle, catalog, check, checkout, cherry-pick, clean, clone, commit, configure, count, describe, diff, export, fail, fast-export, fast-import, fetch, filter-branch, format-patch, forward-port, fsck, grep, import, index, initialize, log, merge, name, note, pack, parse, patch, perform, prevent, prune, pull, push, quiltimport, reapply, rebase, reflog, relink, remote, remove, repack, request, reset, reset, return, rev-list, rev-parse, revert, save, send, set, show, specify, stage, stash, strip]
process [catalog, initialize, consolidate]
prefix ['pre-', 'post-', 'sub-']
synonym {
perform [perform, execute, apply]
supply [supply, specify, set, define, provide]
will [can, must, should, could, will]
verify [control, verify, check]
}
}
noun {
git [archive, area, base, branch, change, commit, file, head, history, index, log, object, origin, pack, path, ref, remote, stage, stash, submodule, subtree, tag, tip, tree, upstream]
locations [downstream, local, remote, upstream]
location ["<<'non-'?>verb.git:verb.tense.past' '?><noun.locations>"]
synonym {
failure [failure, error]
option [option, argument, flag]
command [command, executable, action]
}
}
adjective {
git-action [automatic, passive, temporary, staged]
relevant [relevant, applicable, appropriate, significant]
synonym {
possible [
"possible",
"a <synonym.small-chance' '?>likelihood",
"a <synonym.small-chance' '?>chance",
]
}
}
adverb {
synonym {
immediately [
'immediately',
"<preposition.time> <verb.prefix><verb.process:verb.tense.present-participle>"+5,
]
previously [previously, earlier, formerly, once]
sometimes [when appropriate, "in <determiner> cases"]
cleanly-stem [cleanly, successfully]
cleanly ["<<'un'?>adverb.synonym.cleanly-stem>"]
}
}
synonym {
small-chance [certain]
}
conjunction {
and-or [and, or, and/or]
conditional [if, when, whenever, provided that]
conclusion [as, because, and, but, so]
}
preposition {
position [before, below, for, from, inside, next to, opposite of, outside, over, to]
time [during, after, prior to, before]
}
determiner-prefix [ 'pre-', 'post-', 'all ', 'any ', '' ]
determiner [
"<determiner-prefix><verb.git:verb.tense.past>"+5,
all, the, the most recent
]
subject [
the user,
"the <command-name> command"+5,
]
current-command-name-raw "git-<$command-verb>-<$command-noun>"
current-command-name "\<code><current-command-name-raw>\</code>"
command-name-raw "git-<verb.common>-<noun.git>"
command-name "\<code><command-name-raw>\</code>"
command-option-raw "--<<verb.common>'-'?><verb.common>-<noun.git>"
command-option "\<code><command-option-raw>\</code>"
command-action "<$command-verb> <noun.location> <$command-noun:noun.plural> <preposition.position> <determiner> <verb.git:verb.tense.past> <located-noun:noun.plural>"
command-description "<$command-verb:verb.tense.present> <noun.location> <$command-noun:noun.plural> <preposition.position> <determiner> <verb.git:verb.tense.past> <located-noun:noun.plural>."
git-path-raw [ "<noun.git:noun.plural>/<noun.git:noun.plural>/" ]
git-path [ "\<code><git-path-raw>\</code>" ]
multiple-nouns ["<determiner> <verb.git:verb.tense.past> <noun.git:noun.plural>"]
located-noun ["<noun.location' '?><noun.git>"]
constant-noun-prefix [new, old, this, other, remote, local]
constant-noun-constant ["<verb.common>_<constant-noun-prefix'_'?><noun.git>"]
constant-noun [
"\<i><<constant-noun-prefix|verb.common '-'><noun.git>>\</i>",
"\<code><constant-noun-constant:common.constantify>\</code>",
]
condition [
"<conjunction.conditional> <constant-noun> is <'not '?><verb.git:verb.tense.past>",
"<conjunction.conditional> <command-name> <verb.git:verb.tense.present> <noun.git:common.prepend-an>",
]
conclusion "<conjunction.conclusion> <statement>"
statement [
"<constant-noun> is <verb.git:verb.tense.past> to <verb.git> the <noun.git> of <determiner> <noun.git:noun.plural> <preposition.position> the <noun.git>",
"<current-command-name> <command-option> <verb.synonym.will> <verb.synonym.perform> <adjective.git-action:common.prepend-an> <command-name> before <<verb.git:verb.tense.present-participle' the 'noun.git> | 'doing anything else'>",
"<multiple-nouns> are <verb.git:verb.tense.past> to <constant-noun> by <command-name>",
"the same set of <noun.git:noun.plural> would <adverb.synonym.sometimes' '?>be <verb.git:verb.tense.past> to <adjective.git-action:common.prepend-an> <noun.git>",
"<multiple-nouns> that were <adverb.synonym.previously> <verb.git:verb.tense.past> <preposition.position> the <adjective.git-action> <noun.git:noun.plural> are <verb.git:verb.tense.past> to <adjective.git-action:common.prepend-an> <noun.git>",
"<verb.git:verb.tense.past:common.prepend-an> <noun.synonym.failure> <verb.synonym.will> prevent <adjective.git-action> <verb.git:verb.tense.present-participle> of <multiple-nouns>",
"<subject> <verb.synonym.will> <verb.git> <determiner> <noun.git:noun.plural> <conjunction.and-or> run <command-name> <command-option> instead",
"to <verb.git> <adjective.git-action:common.prepend-an> <constant-noun> <conjunction.and-or> <verb.git> the working <noun.git:noun.plural>, use the command <command-name> <command-option>",
"the <noun.git> to be <verb.git:verb.tense.past> can be <verb.synonym.supply:verb.tense.past> in several ways",
"the <command-option> <noun.synonym.option> can be used to <verb.git> <noun.git:common.prepend-an> for the <noun.git> that is <verb.git:verb.tense.past> by <adjective.git-action:common.prepend-an> <noun.git>",
"any <verb.git:verb.tense.present-participle> of <noun.git:common.prepend-an> that <verb.git:verb.tense.present> <noun.git:common.prepend-an> <adverb.synonym.immediately> after can be <verb.git:verb.tense.past> with <command-name>",
"after <verb.git:verb.tense.present-participle> <noun.git:noun.plural> to any <noun.git:noun.plural>, <subject> can <verb.git> the <noun.git> of the <noun.git:noun.plural>",
"after <current-command-name:common.prepend-an> (<verb.git:verb.tense.past> by <command-name><' 'conjunction.and-or' 'command-name?>) <verb.git:verb.tense.present> <noun.git:common.prepend-an>, <adverb.synonym.cleanly> <verb.git:verb.tense.past> <noun.git:noun.plural> are <verb.git:verb.tense.past> for <subject>, and <noun.git:noun.plural> that were <verb.git:verb.tense.past> during <verb.git:verb.tense.present-participle> are left in <verb.git:verb.tense.past:common.prepend-an> state",
"<multiple-nouns> <verb.git:verb.tense.past> by <noun.git:noun.plural> in the <located-noun>, but that <adverb.synonym.sometimes' '?>are <'not '?>in <constant-noun>, are <verb.git:verb.tense.past> to <adjective.git-action:common.prepend-an> <noun.git>",
"<current-command-name> takes <noun.synonym.option:noun.plural> <adjective.relevant> to the <command-name> <noun.synonym.command> to <verb.synonym.verify> what is <verb.git:verb.tense.past> and how",
]
option-description [
"<verb.git> the <noun.git:noun.plural> of <determiner> <noun.git:noun.plural> that are <verb.git:verb.tense.past>",
"<conjunction.conditional> this <noun.synonym.option> is <verb.synonym.supply:verb.tense.past>, the <noun.git> prefixes <git-path> <conjunction.and-or> <git-path>",
"the <noun.git> <verb.synonym.will> <'not '?>be <verb.common:verb.tense.past> by <verb.git:verb.tense.past:common.prepend-an> <noun.git>",
"use <noun.git> to <verb.git> <git-path> to <verb.git:verb.tense.past:common.prepend-an> <noun.git>",
"with<'out'?> this <noun.synonym.option>, <current-command-name> <command-option> <verb.git:verb.tense.present> <noun.git:noun.plural> that <verb.git> the <verb.synonym.supply:verb.tense.past> <noun.git:noun.plural>",
]