1 %{ -*- Mode:Fundamental -*-
3 * newspeak.l, version 1.1.
4 * Lex filter to transform plain English into NewSpeak.
5 * Copyright (c) 1991 Jamie Zawinski <jwz@jwz.org>.
7 * Permission to use, copy, modify, distribute, and sell this
8 * software and its documentation for any purpose is hereby granted
9 * without fee, provided that the above copyright notice appear in
10 * all copies and that both that copyright notice and this
11 * permission notice appear in supporting documentation. No
12 * representations are made about the suitability of this software
13 * for any purpose. It is provided "as is" without express or
19 * cc -O -o newspeak lex.yy.c
22 * This must be compiled with "flex", not normal "lex". Lex has
23 * some builtin, unchangeable limits which this program exceeds.
24 * This has been verified to work with flex version 2.3.7, and
25 * may not work with flex version 2.3.6.
27 * You can get 'flex' by anonymous FTP to prep.ai.mit.edu, or
28 * anywhere else you get GNU software.
30 * Run this like so: "newspeak < some-text-file | more"
32 * There are some design notes near the end. Suggestions and
33 * improvements to this code are more than welcome.
35 *---------------------------------------------------------------------------
39 unsigned int fcounter = 0;
47 #define CAP(string) capstring(0, (string),0)
48 #define WCAP(string) capstring(Y0,(string),1)
50 #define COMP(string1,string2) compstring(0, (string1),(string2),0)
51 #define WCOMP(string1,string2) compstring(Y0,(string1),(string2),1)
53 #define DUMP() printf("%s",yytext)
55 void capstring(char, char*, int);
56 void compstring(char, char*, char*, int);
57 char _caseify(char, int);
69 W (([ ]?\n[ ]*)|[ ]|[\"'`])
73 YOUNG (([Yy]oung|[Ss]mall|[Ll]ittle){W})
74 DEAD (([Dd]ead|[Dd]eceased){W})
76 ANDOR ({W}(([Aa]nd)|([Oo]r)){W}?)
77 COLOR (red|green|blue|yellow|cyan|magenta|purple|orange|mauve|pink|turquoise|brown|gr[ae]y)
82 /******************************
84 ******************************/
87 [Qq]uite{EW}/[A-Za-z][A-Za-z] CAP("plus");
88 [Rr]ather{EW}/[A-Za-z][A-Za-z][A-Za-z] CAP("plus");
89 [Kk]ind{EW}of{EW}/[A-Za-z][A-Za-z][A-Za-z] CAP("plus");
90 [Kk]inda{EW}/[A-Za-z][A-Za-z][A-Za-z] CAP("plus");
91 [Mm]ore{W}than{W}a{W}(little|bit){W} CAP("plus");
94 [Hh]undreds{W}of{W}[Tt]housands |
95 [Hh]undreds{ANDOR}[Tt]housands |
96 [Hh]undreds{W}if{W}not{W}[Tt]housands |
98 [Mm]illions CAP("doubleplusmany");
100 [Dd]ozens CAP("many");
101 [Hh]undreds CAP("plusmany");
103 ([Bb]right|[Ll]ight|[Ii]ntense){W}/{COLOR} CAP("plus");
104 ([Dd]im|[Ff]aded|[Dd]ark|[Pp]ale){W}/{COLOR} CAP("plusun");
105 ([Dd]im|[Ff]aded|[Dd]ark|[Pp]ale) CAP("unlight");
112 [Aa]wfully{W} CAP("doubleplus");
114 [Ww]hopping{EW} CAP("plusbig");
117 [Aa]ll({W})?[Rr]ight |
118 [Oo][Kk][Aa][Yy] CAP("plusgood");
119 {W}OK/{W} WCAP("plusgood");
121 ([Tt]oo|[Oo]verly|[Tt]hat){W}[Mm]uch CAP("plusmuch");
123 {W}[Bb]ad/{EW} WCAP("ungood");
124 {W}[Pp]oor/{EW} WCAP("ungood");
125 {W}[Ll]ame/{EW} WCAP("ungood");
126 {W}[Pp]itiful/{EW} WCAP("ungood");
127 {W}[Nn]asty/{EW} WCAP("plusungood");
128 {W}[Hh]orrid/{EW} WCAP("doubleplus ungood");
129 {W}[Hh]orrible/{EW} WCAP("doubleplus ungood");
130 {W}[Aa]wful/{W} WCAP("doubleplus ungood");
131 {W}[Ee]vil/{W} WCAP("doubleplus ungood");
134 /******************************
136 ******************************/
139 {W}[Ss]ir/{EW} WCAP("citizen");
140 {W}[Mm]r"."/{EW} WCAP("brother");
141 [Mm]ister/{EW} CAP("brother");
142 [Mm]adame? CAP("sister");
143 {W}[Mm]iss/{EW} WCAP("sister");
144 [Mm]a"'"?am/{EW} CAP("sister");
145 {W}[Mm]r?s"."/{EW} WCAP("sister");
146 Mrs/{EW} CAP("sister");
148 {YOUNG}?[Cc]hildren CAP("young citizens");
149 {YOUNG}?[Bb]oys{ANDOR}[Gg]irl/s CAP("young citizens");
150 {YOUNG}?([Kk]id|[Gg]irl|[Bb]oy|[Cc]hild)/{EW} CAP("young citizen");
152 [Ff]ellow CAP("citizen");
154 [Nn]on{W}?"-"?citizen CAP("unperson");
155 [Nn]on{W}?"-"?member CAP("unperson");
156 [Cc]riminal/s? CAP("unperson");
157 {DEAD}(man|woman) CAP("unperson");
158 {DEAD}(men|women) CAP("unpersons");
160 [Ii]n{W}[Pp]erson DUMP();
162 {W}[Uu]ser WCOMP("party ","worker");
163 [Ss]tudent COMP("party ","worker");
164 [Cc]itizen/s?{EW} COMP("party ","worker");
165 [Pp]erson/s?{EW} COMP("party ","worker");
166 [Pp]eople COMP("party ","workers");
171 [Pp]rofessor printf("Inner Party Member");
172 [Pp]rof"."/{EW} printf("Inner Party Member");
173 [Pp]rof/{EW} printf("Inner Party Member");
175 Representative/s? printf("Inner Party Member");
176 representatives printf("Inner Party Members");
178 [Ww]hite{W}[Cc]ollar |
179 [Uu]pper{W}[Cc]lass COMP("inner ","party");
180 [Mm]iddle{W}[Cc]lass CAP("party");
181 [Bb]lue{W}[Cc]ollar |
182 [Ww]orking{W}[Cc]lass |
183 [Ll]ower{W}[Cc]lass CAP("prole");
184 ([Ff]ool|[Ii]diot)/s?{EW} CAP("prole");
185 [Ss]tupidity CAP("proleness");
188 /******************************
190 ******************************/
193 [Aa]?{W}([Ww]hite{W}[Hh]ouse|[Gg]ovt\.?|[Gg]overnment){W}([Ss]ource|[Oo]fficial|[Ss]pokes(man|woman|person)) CAP("an Inner Party Member");
194 {THE}?[Rr]epublican{W}[Pp]arty COMP("mini","luv");
195 {THE}?[Dd]emocratic{W}[Pp]arty COMP("mini","plenty");
197 {THE}?Congress printf("MiniPax");
198 {THE}?[Ss]enate printf("MiniPax");
199 {THE}?[Hh]ouse{W}[Oo]f{W}[Rr]epresentatives printf("MiniPax");
200 {THE}?[Ss]tate{W}[Dd]epartment printf("MiniPax");
201 {THE}?[Ss]tate{W}[Dd]ept"."? printf("MiniPax");
202 {THE}?[Dd]efen[cs]e{W}[Dd]epartment |
203 {THE}?[Dd]efen[cs]e{W}[Dd]ept"."? |
204 {THE}?[Ww]ar{W}[Dd]epartment |
205 {THE}?[Ww]ar{W}[Dd]ept"."? |
206 {THE}?[Hh]ouse{W}of{W}[Cc]ommons |
212 {THE}?[Ss]ecret{W}[Ss]ervice COMP("mini","luv");
213 {THE}?White{W}House |
214 {THE}?Kremlin printf("MiniTrue");
215 {THE}?(CIA|NSA|FBI|MI"-"?5)/{EW} printf("MiniTrue");
216 {THE}?("C.I.A."|"N.S.A."|"F.B.I.")/{EW} printf("MiniTrue");
217 {THE}?[Aa]rchive/s? COMP("mini","rec");
218 {THE}?[Ll]ibrary COMP("mini","rec");
219 {THE}?[Ll]ibraries COMP("mini","recs");
221 [Tt]hought{W}[Pp]olice|[Nn]azis? COMP("think","pol");
222 [Vv]ice{W}[Ss]quad COMP("sex","pol");
223 PMRC|"P.M.R.C." COMP("sex","pol");
225 [Oo]fficer CAP("minister");
227 {THE}?[Dd]epartment{EW}of{EW}. |
228 {THE}?[Dd]ept"."?{EW}of{EW}. |
229 {THE}?[Uu]niversity{EW}of{EW}. |
230 {THE}?[Uu]niv"."?{EW}of{EW}. |
231 {THE}?[Dd]ept"."?{EW}of{EW}. |
232 {THE}?([Ss]ub"-"?)?[Cc]omm?itt?ee{EW}(of|on){EW}. |
233 {THE}?[Ss]chool{EW}of{EW}. {
234 if ((yytext[yyleng-1] >= 'A') && (yytext[yyleng-1] <= 'Z'))
235 /* "the school of Law" --> "MiniLaw" */
236 printf("Mini%c",yytext[yyleng-1]);
237 else if ((yytext[yyleng-1] >= 'a') && (yytext[yyleng-1] <= 'z'))
238 /* "the school of law" --> "MiniLaw" (not "Minilaw") */
239 printf("Mini%c",yytext[yyleng-1] - ('a' - 'A'));
240 /* "the school of 5 things" --> "Ministry of 5 things" */
241 else printf("Ministry of %c",yytext[yyleng-1]);
245 [Uu]niversity CAP("ministry");
246 [Uu]niv"."?/{W} CAP("ministry");
247 [Dd]ept"."?/{W} CAP("ministry");
248 ([Ss]ub"-"?)?[Cc]omm?itt?ee CAP("ministry");
250 {THE}[Pp]roject/{EW} CAP("the Three Year Plan");
251 [Oo]ur{W}[Pp]roject/{EW} CAP("our Three Year Plan");
252 [Bb]udget printf("Three Year Plan");
253 [Pp]roject/{ES} printf("Three Year Plan");
255 {W}({THE}|([aa]{W}))[Pp]roject printf("%cthe Three Year Plan",Y0);
257 [A-Za-z]+"'"[Ss]/{W}(law|Law|LAW|book|Book|BOOK|rule|Rule|RULE){EW} printf("Goldstein's");
260 /******************************
262 ******************************/
265 [Ii]n{W}love{EW} CAP("SexCriming");
266 [Ll]ove{W}you/{EW} CAP("love Big Brother");
267 [Ll]ove{W}me/{EW} CAP("love Big Brother");
272 [Pp]rocreation COMP("good","sex");
275 [Pp]rocreate COMP("good","sexwise");
281 [Nn]ews{W}?[Pp]apers? |
284 [Rr]ock{EW}?"-"?(and|"&"|"'"?n"'"?){EW}?"-"?[Rr]oll({W}[Mm]usic)? |
285 (([Rr]ock|[Cc]lassical|[Ii]ndustrial|[Pp]op|[Dd]ance|[Rr]ap){W})?[Mm]usic |
289 [Cc]omic{W}[Bb]ooks? |
290 ([Ss]tar{W}?)?[Tt]rek COMP("prole","feed");
292 [Pp]eace{W}[Mm]ovement |
293 [Pp]eace{W}[Pp]rotest |
295 ([Pp]assive{W})?[Rr]esistance |
298 [Rr]esearch COMP("crime","think");
300 /******************************
302 ******************************/
305 [Jj]esus{W}[Cc]hrist |
309 [Mm]artin{W}[Ll]uther{W}[Kk]ing |
310 J\.?\ ?R\.?\ \"?Bob\"?\ Dobbs printf("doubleplus crimethinker");
312 ([Jj]esse{W})?[Hh]elms |
313 ([RrDd]on(ald)?{W})?[Rr]ea?gan |
314 [Gg]eorge{W}[Gg]uscoria printf("doubleplus goodthinker");
316 [Jj]ewish COMP("crime","thinkwise");
322 [Aa]gnostic COMP("crime","thinker");
324 [Ff]aith COMP("belly","feel");
327 /******************************
329 ******************************/
332 [Ee]ngland|{THE}?[Uu]nited{W}[Kk]ingdom |
333 ({THE}?[Uu]nited{W}[Ss]tates{W}[Oo]f{W})?[Aa]merica |
334 {THE}?[Uu]nited{W}[Ss]tates|USA|"U.S.A."|[Cc]anada |
335 [Gg]ermany|[Ii]srael|[Ee]urope printf("Oceana");
337 Iranian|Iraqu?i|Libyan|Russian|African|Egyptian printf("Eurasian");
338 Iran|Iraq|Libya|Russia|Africa|Egypt |
339 ([Ss]audi{W})?Arabia|{THE}?Soviet{W}Union printf("Eurasia");
340 [Ss]oviet printf("Eurasian");
342 [Cc]hinese|[Jj]apanese|[Tt]aiwanese |
343 [Pp]hillipino|[Ii]ndian|[Aa]ustralian|[Mm]exican |
344 [Nn]icaraguan|[Ss]alvadori?an printf("Eastasian");
345 China|[Jj]apan|[Tt]aiwan|{THE}?[Pp]hillipines|[Ii]ndia |
346 [Aa]ustralia|[Mm]exico|[Nn]icaragua|[Ee]l{W}[Ss]alvador printf("Eastasia");
348 [Kk]uwaiti printf("Eurasian");
349 [Kk]uwait printf("The Malabar Front");
352 /******************************
353 * Miscellaneous Translations *
354 ******************************/
357 {W}[Ff]aster WCAP("plus speedful");
358 {W}[Ss]lower WCAP("plus unspeedful");
359 {W}[Ff]ast WCAP("speedful");
360 {W}[Ss]low WCAP("unspeedful");
362 [Mm]odern CAP("plusnew");
363 [Aa]ncient CAP("plusunnew");
364 {W}old/{W} WCAP("plusunnew");
366 [Hh]appiness CAP("joyfulness");
367 [Hh]appy CAP("joyful");
368 [Qq]uick CAP("speedful");
369 {W}[Ss]peedy WCAP("speedful");
370 [Hh]eavy CAP("weightful");
371 [Hh]eavill?y CAP("weightfully");
372 [Ss]ick(ly)? CAP("unhealthful");
378 [Dd]isgusting COMP("crime","thinkful");
386 [Dd]estroy CAP("unbuild");
388 [Ii]nanimate CAP("unlifeful");
389 [Ss]ociety|[Cc]ulture printf("IngSoc");
390 [A-Za-z]+isi?m/{EW} printf("Goldsteinism");
391 [A-Za-z]+ist/{EW} printf("Goldsteinist");
393 {W}[Dd]ead WCAP("unlifeful");
394 {W}[Dd]eath WCAP("unlife");
395 {W}[Ll]ie WCAP("untruth");
396 {W}[Ff]alsehood WCAP("untruth");
397 {W}[Mm]istake/{EW} WCAP("untruth");
398 {W}[Ww]hisper WCAP("unshout");
399 {W}[Pp]roud WCAP("prideful");
401 [Ff]alse CAP("untrue");
402 [Dd]ark CAP("unlight");
403 [Bb]lack CAP("unwhite");
404 [Ff]orbidden CAP("unallowed");
405 [Ff]orbid CAP("unallow");
406 [Ff]ailure CAP("unsuccess");
407 [Ff]ail/{EW} CAP("unwin");
409 [Ss]tatistics?/{EW} CAP("propaganda");
410 {W}[Aa]n{W}[Aa]nn?ouncement WCAP("a NewsFlash");
411 [Aa]nn?ouncement printf("NewsFlash");
412 [Ii]nstructions? printf("B. B. DayOrder");
414 [Aa]lmost|[Nn]early CAP("within measurable distance of");
415 [Ff]unny CAP("humorful");
417 [Dd]oom CAP("unsave");
418 [Cc]haos CAP("unorder");
419 [Cc]haotic CAP("unorderful");
420 [Ee]nslaved CAP("protected");
421 [Ee]nslave CAP("protect");
422 [Dd]angerous CAP("unsafewise");
423 [Dd]anger CAP("unsafe");
424 ([Bb]lind{W})?[Oo]bedience COMP("ing","soc");
425 \"?[Nn]ew{W}[Ww]orld{W}[Oo]rder\"? printf("IngSoc");
428 [Ii]ndividuality COMP("own","life");
430 IMHO printf("for the love of Big Brother");
435 [Aa]ccept(ance)? COMP("belly","feel");
441 {THE}?[Aa]merican{W}[Ww]ay |
443 [Pp]assion COMP("crime","think");
448 [Ee]rotica COMP("sex","crime");
452 [Ee]rotic COMP("sex","crimeful");
454 [Cc]ritic/s?{W} COMP("crime","thinker");
456 [Ii]nfant{W}[Mm]ortality COMP("inf","mort");
459 [Pp]arents COMP("family ","units");
460 [Mm]other{ANDOR}[Ff]ather |
461 [Bb]rother{ANDOR}[Ss]ister COMP("family ","unit");
462 {W}[Pp]arent/s?{EW} WCOMP("family ","unit");
463 [Ff]amily COMP("family ","unit");
465 God/{EW} printf("Big Brother");
466 [Pp]res(ident|".")({W}([Bb]ush|[Rr]eagan))? printf("Big Brother");
467 [Pp]rime{W}[Mm]inister printf("Big Brother");
469 ([Gg][Nn][Uu]{W}([Ee]macs|EMACS){W})?[Gg]eneral{W}[Pp]ublic{W}[Ll]icense printf("NewSpeak Dictionary");
471 (questioning|murder|ass?ass?ination)/{ES} printf("interrogation");
473 [Ss]keptic/{EW} CAP("unperson");
474 [Ss]illy CAP("foolhardy");
475 {W}[A-Za-z][A-Za-z]?illy DUMP();
476 [Ss]outhern|[Ss]outherly CAP("southwise");
477 [Nn]orthern|[Nn]ortherly CAP("northwise");
478 [Ee]astern|[Ee]easterly CAP("eastwise");
479 [Ww]estern|[Ww]esterly CAP("westwise");
480 [Pl]leasant CAP("goodwise");
481 [Vv]iolent CAP("unpeacewise");
482 [Vv]iolence CAP("unpeaceness");
483 [Ii]ndifference CAP("uncarefulness");
484 [Ii]ndifferent CAP("uncareful");
485 [Bb]elly CAP("abdomen");
486 [Cc]omic CAP("humorwise");
487 {W}[Uu]nless WCAP("lest");
488 usually printf("usualwise");
490 [Gg]uerillas COMP("party ","workers");
492 [Ww]ar/{EW} CAP("engagement");
493 [Dd]efen[cs]e/{EW} CAP("peace");
494 [Ii]nvasion CAP("liberation");
497 /******************************
498 * Syllable Rewriting *
499 ******************************
501 not the ___ the un___
503 anti___ un___ (etc...)
514 <CONSONANT>ous ___eful
520 [Ii]sn"'"t{W}my{W} CAP("is my un");
521 [Ii]s{W}not{W}my{W} CAP("is my un");
522 [Ii]sn"'"t{W}[Tt]he{W} CAP("is the un");
523 [Ii]s{W}not{W}[Tt]he{W} CAP("is the un");
524 [Ii]sn"'"t{W}[Ii]n{W}[Tt]he{W} CAP("is in the un");
525 [Ii]s{W}not{W}[Ii]n{W}[Tt]he{W} CAP("is in the un");
526 [Ii]t"'"?s{W}not{W}[Tt]he{W} CAP("it's the un");
527 [Ii]sn"'"t{W} CAP("is un");
528 [Ii]s{W}not{W} CAP("is un");
529 [Nn]ot{W}[Tt]he{W} CAP("the un");
530 [Nn]ot{W}[Mm]y{W} CAP("my un");
531 [Nn]ot{W}[Aa]{W} CAP("an un");
532 [Nn]ot{W}have{W} CAP("has un");
533 [Nn]ot{W}be{W} CAP("be un");
534 [Nn]ot{W}[Oo]nly/{W} CAP("unonly"); /* avoid "unonwise" */
537 [Aa]{W}[Nn]on"-"? printf("%cn%cun",Y0,Y1); /* "a non_" -> "an un_" */
542 {W}[Ii]l"-"?/[a-z][a-z] WCAP("un");
544 {W}[Nn]on"-"? WCAP("un");
546 robably|ventually|[Oo]bvious|[Bb]asic|{W}[Oo]nly|otally |
547 [Aa]rctic|holic|{EW}ally|{EW}[Aa]pply|{W}[Tt]opic DUMP();
549 {W}([Tt]raf|[Pp]aci|[Ss]peci)fi/c{W} DUMP();
550 {W}(ma|tra)gi/c{W} DUMP();
551 {W}(pub|cyc|re|fro|gar)li/c{W} DUMP();
552 {W}(eth|cli|to)ni/c{W} DUMP();
553 {W}(E|cle|met|cit)ri/c{W} DUMP();
554 {W}(ch|ep|tr?op|t|mus|stat|att)i/c{W} DUMP();
556 {W}[Aa]tlantic DUMP();
558 [ \t\n][drstwDRSTW]ally printf("%c%cally", Y0, Y1);
560 [a-z]ically/{W} printf("%cwise", Y0);
561 [a-z]ally/{W} printf("%cwise", Y0);
562 [a-z][a-z]lly/{W} printf("%c%cwise", Y0,Y1);
563 [a-z][a-z][a-z]ly/{W} printf("%c%c%cwise", Y0,Y1,Y2);
564 [a-z]ical/{W} printf("%cwise", Y0);
566 [a-km-qs-z]aic/{EW} printf("%cwise", Y0); /* not laic, raic */
567 [a-z]lic/{EW} printf("%clwise", Y0);
568 [a-z]nnic/{EW} printf("%cnwise", Y0);
569 [a-z][aeiou]tric/{EW} printf("%c%ctwise", Y0, Y1);
570 [a-z]tric/{EW} printf("%cwise", Y0);
571 [a-z]ic/{EW} printf("%cwise", Y0);
572 [a-z]lly/{EW} printf("%cwise", Y0);
573 [a-z]ly/{EW} printf("%cwise", Y0);
575 [aeiouy][^aeiouy]ous/{EW} printf("%c%cful",Y0,Y1);
576 [^aeiouy]ous/{EW} printf("%ceful",Y0);
577 [^e]ous/{EW} printf("%cful",Y0);
579 [A-Za-z]+less/{EW} { yytext[yyleng-4] = '\0';
580 if (((yytext[1] < 'A') || (yytext[1] > 'Z')) &&
581 (yytext[0] >= 'A') && (yytext[0] <= 'Z'))
582 yytext[0] = yytext[0] - ('a' - 'A');
583 printf("%cn%sful",C('u'), yytext);
586 ". " { printf("%s",yytext);
588 if (14 == fcounter++) printf("(fnord) ");
591 [.,!?]\"([^\n\".!]+[.!])?\n/[\n\t ] printf("%c Hail Big Brother!\"%s",Y0,yytext+2);
592 \"([.,!?][^\n\".!]+[.!])?\n/[\n\t ] printf("%c Hail Big Brother!\"%s",Y1,yytext+2);
594 . printf("%s", yytext);
598 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
599 * Brief description of Orwell's NewSpeak:
600 * ---------------------------------------
601 * Each word was made to serve as noun, verb, adjective and adverb. In
602 * particular, nouns and verbs were made exactly the same -- hence "think"
603 * replaced "thought" as a noun (viz. "crimethink" = thought crime, "thinkpol"
604 * = thought police). Adjectives were formed by adding "-ful" to a noun/verb;
605 * adverbs were formed by adding "-wise." Hence "speedful" = fast,
606 * "speedwise" = quickly, "unspeedwise" = slowly.
608 * The decision on which word should be negated was made fairly randomly;
609 * "dark" could be "unlight," or "light" could be "undark". But in all cases
610 * the most important objective (aside from ideological restriction) was
611 * euphony; the words had to be easily pronounceable.
613 * Most verb inflections were made regular; "he thinked," "he goed," "he
614 * eated"; only the auxiliaries and modals (to be, to have, may, shall, will,
615 * etc.) were allowed to inflect irregularly. Plurals were also regularized:
616 * "mans," "oxes," "childs." [This isn't implemented here.]
618 * There were three sets of words. The A vocabulary was for everyday use:
619 * car, man, red, good, etc. It was restricted to fairly simple words.
621 * The B vocabulary consisted of political/ideological words with very
622 * complicated connotations. All of the B words were compound words --
623 * bellyfeel (blind emotional acceptance of the ideology), oldthink (the way
624 * of thought before the Revolution), crimethink, Ingsoc, goodsex (intercourse
625 * solely for the purpose of making babies and with no physical enjoyment on
626 * the part of the female), sexcrime (any kind of sex but goodsex, including
627 * sex for its own sake), goodthink (thinking in accordance with Ingsoc), and
628 * so on. These words were also subject to the modifications mentioned
629 * above--hence "goodthinker," "goodthinkful," "goodthinkwise."
631 * The C vocabulary consisted of scientific and technical words (though there
632 * was no longer any word for "science," any connotation it might have being
633 * subsumed into "Ingsoc").
635 * Implementing a translator for all of this would be really complicated --
636 * I'd need rather extensive lists of the "irregular" words (so they could be
637 * regularized), as well as lists of politically meaningful words (so they
638 * could be excised or translated into either "goodthink" or "crimethink," as
639 * appropriate). Any kind of sexual topic should become "sexcrime" (it being
640 * unlikely that any talk of sex these days would fit into "goodsex").
642 * Basically, the reason it's hard is that NewSpeak was intended to *decrease*
643 * the vocabulary, and subsume complicated ideas into politically correct
644 * words so that you wouldn't have to understand the ideas anymore; you'd just
645 * have to emit the right words. So to properly "translate" anything into
646 * NewSpeak, you have to cut the vocabulary way down.
647 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
655 printf("\nHail Big Brother!\n");
659 void capstring(firstchar,string,i)
660 char firstchar, *string;
663 if (firstchar != 0) putchar(firstchar);
664 putchar( (yytext[i] <= 'Z') ? (string[0] - ' ') : string[0]);
665 printf("%s",string+1);
668 void compstring(firstchar,string1,string2,i)
669 char firstchar, *string1, *string2;
672 capstring(firstchar,string1,i);
673 capstring(0,string2,i);
680 if (yytext[i] <= 'Z') return (c - ' ');
687 return _caseify(c,0);