require 'lgenerator'
generator = Generator.new do |g|
g.start :body
body.do {|e| e[:pointnum] = 0 }
body.is :title, :points
title.is "The ", :movement, " Manifesto:\n"
movement.is do |e|
r = ([:movement_prefix] * (1 + rand(3))) + [:rails_or_component, :movement_suffix]
ret = e.expand(r)
e[:movement] ||= ret
ret
end
movement_prefix.is any(%w[Neo Para Sur Pata Super Meta Post Anti Non Cyber])
movement_suffix.is "Coder" | "Developer" | "Maintainer" | "Monkey" | "Believer"
rails_or_component.is any(%w[Rails RAILS ROR Ror ActionController ActiveRecord
ActiveSupport])
points.is {[:point] * (4 + rand(6))}
point.is {|e| [e[:pointnum] += 1, ". ", :statement, "\n"]}
statement.define do
is :big_thing, " ", "is dead" | "is gone" | "failed", "; " | ", ",
:is_dead_explanation | [:qualifier, " ", :is_dead_explanation], "."
is :big_thing, " is ", :pointless, "."
is :big_thing, " cannot exist" | " is unstable" | " is fragile" |
" will collapse", "."
is :big_thing, " is nothing more than ", :mere_thing, "."
is "there is no ", :nonbearable, "."
is :those_who, " ", :do_silly_thing, " are ", :neg_qual_pl, "."
is :those_who, " ", :do_silly_thing, " are ",
"" | [:qualifier, " "], :what_people_are, "."
is :we, " are ", "" | ["only" | "just" | "simply", " "],
:what_people_are, "."
is :big_guy, " is ", :what_big_guy_is, "."
is :big_guy, " ", :what_big_guy_does, "."
is [:big_guy, " says that " | " once said "] |
["according to ", :big_guy, ", "],
:statement, " ",
["And I ", "believe it." | "agree." | "concur."] | "I agree." |
"I concur." | "I also think that."
13.times { is :tech_statement }
end
qualifier.is "actually" | "in fact" | "definitely" | "most certainly" |
"probably"
we.is "we" | [:movement, "s"]
those_who.is "those who" | ["the ", :what_people_are_2, " who"]
pointless.is "inconsequential" | "pointless" |"a myth" | "an illusion" |
"a foolish dream" | "a fantasy" | "unattainable" |
"delusional" | "not worth it"
do_silly_thing.is ["believe that ", :silly_belief] |
["seek " | (:adverb | " seek ") | "look for ", :ideal_attr] |
["want to find " | "seek ", :ideal_attr, " in ", :big_thing] |
:use_or_do_non_rails