"PARSER for TRINITY: (C)1986 Infocom, Inc. All rights reserved." ; > > > ; "RETROFIX #36" "Parse-cont variable" > > > > > "Orphan flag" > > > > > "Byte offset to # of entries in LEXV" "Word offset to start of LEXV entries" "Number of words per LEXV entry" "Offset to parts of speech byte" "Offset to first part of speech" "First part of speech bit mask in PSOFF byte" > > > > ; > > > > > > > > <> <> <>>> > ; "FIX #44" > > "For MAGPIE." > " Grovel down the input finding the verb, prepositions, and noun clauses. If the input is or , fall out immediately setting PRSA to ,V?WALK and PRSO to . Otherwise, perform all required orphaning, syntax checking, and noun clause lookup." ) (OF-FLAG <>) (LEN 0) (DIR <>) (NW 0) (LW 0) (CNT -1) OWINNER OMERGED (TMP1 0)) > ) (T >)> )>> > > > > > > > > > > >)> > > >> > ; ,VEHBIT>> ; >)> >)> ; "FIX #36" > )> > >) ( > > )>) (T > > ; ,VEHBIT>> >)> > > ) ( )> "> )> > ; > 0> ) (T )> ,W?QUOTE> ; "Quote first token?" > ; "If so, ignore it." >)> ,W?THEN ,W?PLEASE ,W?SO> > ; "Ignore boring 1st words." >)> > ,W?GO> ; "GO first input word?" >> ;" followed by verb?"> > ;"If so, ignore it." >)> ) ( ,W?OOPS> > ,W?PERIOD ,W?COMMA> > >)> ; "FIX #38" > ) ( ; "FIX #39" )> >> ;"Fixes OOPS w/chars" 6>> 7>> <+ <* ,P-LEXELEN> 3>> > > ) (T > )>) (T >)> ,W?AGAIN ,W?G> >> ; "FIX #50" ) ( > ,W?PERIOD ,W?COMMA ,W?THEN> > ,W?AND>> >> 2>>) (T )>) (T > 1>>)> 0> ; "FIX #36" ) (T >)> ; > ; "FIX #44" ) (T >)>>) (T ; "Fixed BM 2/28/86" > ; "FIX #37" >>>> > >>> > > > 0> > ) (>> ) ( > ; >> ) (T >>)> > ; ) ( ; > ; "FIX #40" > ) ( >> > )> ; "FIX #40" > ) ( >) (T )>)> >> ) (> ,ACT?WALK ,ACT?GO> > > ; > > >>> ,W?THEN>)> > > )>) (> > ; "For RUN, etc." 2>>>> >>) (> > >> ; "1 IN RETROFIX #34" > > >> ; )> ; "Save OF-word" ) ( >> )>) ( ) (T > > > > )>)>) ( ; "RETROFIX #34" > ) (T >)>) () ( > ) (T )>) (T )> >>)> > ; "FIX #44" > )> > > ; "FIX #44" > ) ; (T )> ; > )> ; "Why was this here?" ; > >> )>> ) "AUX" X Y Z) >>> > >> >> >> )> > )) > "Check whether word pointed at by PTR is the correct part of speech. The second argument is the part of speech (,PS?). The 3rd argument (,P1?), if given, causes the value for that part of speech to be returned." > .BIT> ) (T > > >)> )>)>> "Scan through a noun phrase, leaving a pointer to its starting location:" ) (FIRST?? T) NW (LW 0)) 2>> > .VAL> .WRD> >) (T >)> > )> > >> ,W?THE ,W?A ,W?AN> 4>>)> > 0> >> )> >> ) ( > ; >> ) (T >>)> ; ,ACT?MAKE ,ACT?TAKE>> )> >> ) ( ) ( ; > > >)>) ( >> > >> >) ;"3/16/83: This clause used to be later." ( > ;"10/26/84: next stmt changed" >> > ,W?THEN> >) ( >> .WRD>) ( > T) ( > >> 2>>> ) (T >)>) ; "Next clause replaced by following one to enable OLD WOMAN, HELLO" ; ( >> >>) ( > T) ( >> > ,W?THEN> >) ( T) (T )>) (T )> > >>> > >> > )> > ,PLAYER ,NOT-HERE-OBJECT> > ) ( > ) ( ) ( > ) ( ) (T )>> > > ) (> >) (T > )> > > > ; ) ( ) ( )> ) (T )>)>> "Number of SEEVERBS" > ) (I <>) "AUX" (V <>) OA OO OI ONP (WHO <>) (TUCH <>)) #DECL ((A) FIX (O) (I) ) > >> )> > > ) (> > ) (T )>) ( > ) (T )>)> ) (T )>) (T > )> )> )>)> >> ) (T )> )> )> )>) (T ) (T )> )>)> > )> )> )>) (T ) (T )> )>)> > )> )> )>) (T ) (T )> )>)> )> )>)> > > > > >)>)> ; ; ">) (T )> )> ,M-WINNER>>)> ,P?ACTION> ,M-BEG>>)> >>)> > )> >> ,PRAM ,POCKET>> > > > ,PRAM>>> ,PRAM ,POCKET>> > > > ,PRAM>>>>> )> >> ,DISH ,POCKET>> > > >> ,DISH ,POCKET>> > > >>>> )> > > > >> > > > > >>>> )> >> ,DORY ,POCKET>> > > > ,DORY>>> ,DORY ,POCKET>> > > > ,DORY>>>>> )> > > > ,P?CONTFCN>> >)>)> > > > ,P?CONTFCN>> >)>)> > >>)>)> > ; > > ,P?CONTFCN>> >)>)> >> >> ; )>)> >>)> > ) "AUX" OBJ) > > > )>) (> )>)> >) (T )>> ) (T )>> > > > > > > > > > > >> > > > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > ; > ; > > ; > > > > > > > > >> > > > > > > > > > > > > > > > >> > > > > > > > > > > >> > > > > > > > > > > > > > > > > > >>>> ; > ) ( > ) ( ; ; > ) ( > ) ( > ) ( > ) (T )>> > > )> > > )> > > )> > > )> > > )> > > )> > > > >> ) (T )>> "For AGAIN purposes, put contents of one LEXV table into another." > > > 2>> > 3>> > > )>>> "Put contents of one INBUF into another." 1>> > )>>> "Put the word in the positions specified from P-INBUF to the end of OOPS-INBUF, leaving the appropriate pointers in AGAIN-LEXV." > ) (T >> >>>)> > >> )>> .LEN> > ) (DOLLAR <>)) > 2>> > 3>> > 0> ) (T > > ) ( ) ( ) (> >> ) (T <- .CHR %>>>)> >)>> ) ( )> >>)> > ,W?MONEY) (T > ,W?INTNUM)>> > > ) WRD) > 0>> ,PS?VERB ,P1?VERB> > > ) ; "FIX #45" ( 0>> ,PS?ADJECTIVE ;,P1?ADJECTIVE> ) ( > > > )> >> >>> ) ( ) ( 1> > > > > > ;"? DELETE?" >)> ;"? DELETE?" )>) (T > ;>)> >) (T )>) ( 1> > > > > > ;"? DELETE?" >)>)> > > ) (T )>) ( > > > ) (T > > >)> > > ) (T > )>) ( ,PS?ADJECTIVE> ;"same as WT?" >> ) ; ( ) ( ,PS?OBJECT> ) (T )> )> > > )>>)>)> > > > ; 0>> > > ,P-ITBLLEN> ) (T >)>> T> > > > > > > > > > > > "Print undefined word in input. PTR points to the unknown word in P-LEXV" )> ) (T > >)>>> >> > > >> 2> 3>> > > "]" CR> > " Perform syntax matching operations, using P-ITBL as the source of the verb and adjectives for this input. Returns false if no syntax matches, and does it's own orphaning. If return is true, the syntax is saved in P-SYNTAX." ) (DRIVE2 <>) PREP VERB) > )> >> > > ,P-SONUMS>> T) ;"Added 4/27/83" (> >> >>> ) ( > > ) ( > )>)> > ) (T )>) (T >)>> >>> ) ( >>> ) ( ) (T ) (T )> ) ( ,PERSON>> ,PERSON>>> ) (T )> ) (T )> )> > ) (T )>> ) (T > )> )>> > ;"? ,P-OTBL?" ) (> >) (T > )>> )> > > > ) (T >)>> )> > )> > ) ( > )>> .THE?>> ) WRD (FIRST?? T) (PN <>)) ) (T >) (T )> > >> >> >>> )> ) ( > > >> ) ( ) ( ; ) (T > )> > ) ( > ) ( > ) ( > ) ( > ) (T >)> >)>)> >>> "Check for words to be capitalized here." ; > ) (T )>> "Number of entries in CAPS." > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >> ; > > >) (T > 32>> 1> <+ 1>>)>> > )> > ; ) ( ) (T )> 0>> > )> 0>> > ; "Will it ever work? --SWG" )> )>> ) "AUX" BEG END) > > ,P-LEXELEN> 2>>> ,P-LEXELEN>>>> ) (T >> )> >)> >>> 2>> .WRD> > 2>> ) ( .PREP> >>)>>> >> ) ( > )> > 1> > >> > )> > ) (T )> )> )>) (T )>> >> > ,P-PRSO> > > >>)> >> > ,P-PRSI> > > 1> >) (T >)>)>)> > > )> > > ; > ,P-BUTS> T) (T .OBJ> >)> >> .NTBL> > > > > > > "Which noun phrase is being parsed?" > > > > > > > ) LEN WV WRD NW (WAS-ALL? <>) ONEOBJ) ;"Next SETG 6/21/84 for WHICH retrofix" > )> > >> )> ) (T > ) (T >)> >)>) ( > > ) ( ) ( >)>) (T > > >)>) ( >> ;"Next SETG 6/21/84 for WHICH retrofix" > > T) () () ( )>) ( >> ; "FIX #41" ) ( )>)> > > )>>> ) (OLEN 0) OBJ ADJ X) > ; )> )> > >) (> > )>)> > > )> )> > > )> )> ; )> ) (T )> )> .TLEN>> ; )> ) ( > > >> "?]" CR>)> ) ( >>> .LEN>> ) (T )> >> .TBL>>> )> > > ) ( >> ) ( > ,P-NC1) (T ,P-NC2)>> <>> ) ( )> > > )>) ( > ; "RETROFIX #33" ; > > > ) (T )>)> > > ) ( ; )> )> >> > )> > > >> ; )) )> > ) (T )>> > > ; "Needed only for ZIL" ; "This MOBY-FIND works in ZIP only!" ; > >> >)> )>> > >)> .LEN> "This MOBY-FIND works in both ZIL and ZIP." ; )> % ;>> ;"ZIP case" '> > >> >)> )>>>) (T ;"ZIL case" ' > ) (T >)>> >)> > 1> >)> > ; > > >> >)> )>> > >)> .LEN) (T ;"ZIL case" > ) (T >)>> > 0> )> > 0> )> > 1> >)> > > > .LEN)>> > ) ( >) (T >)> > > > )> ) ( )> > 1> )>>> > > > ; )> > )> )> )>>)> .LEN> > )>)>)>> > ) (T ) ( ) (T )>)>> ) (T >)> > > )> > > )> > ; ; "Z0 deleted this" > ; ; "ADDED 3/26/85" ; "Needed only for ZIL" >>> ; >> > ,P-SRCALL) ; ( ,P-SRCALL) ;"Z0 deleted this" (T ,P-SRCTOP)>>)> > )>>)>> ) ( >> 2>> ; 2> 1>>>>> ) ( >> 2>> ; >>>> ) ( >> )> > > .OBJ> > > ; > >> ) (T )>> > ) ( > > > )> ) ( > )> ) ( > )> ) ( > )> )> > > > >> > >) ( >> >) (> >) ( >> ) ( > ) (T >)> > > > ) ( ) (T ) (> ) (T )>)> )> ) ( > ) ( ) (T )> )> )>)> )>>)> > ; > >> )> ; 0> )> >> > ) (T )>) ( > ) (T )>) ( > ) (T )>) ( > ) (T )>)> > >> > ) ( >> ) (> >) ( >> >) ; ( >> >) ( > >) (T )> > > ) ( ) (T ) (> )> )> ) ( > ) ( ) (T )> )> )>)>>) (T)>> ) TMP) 1> ,SMANY>>> ) ( 1> ,SMANY>>> )> ; ; )> ; > ) ( > >) (T >)> ) (T )>> ; )> > ) (T >)> > ) (T )>) ( )>>> > > > )> > ) (RMBIT T) "AUX" OHERE (LIT <>)) > ) ( )> > ) (T > > )>)> 0> )>)> > "PICK-NEXT expects an LTABLE of strings, with an initial element of 2." > > > )> > > T) ( ) ( > > ) (T )> ) (T ) (T )> )>)> )> ) (T )> > )> > )> > "Number of HAVEVERBS." > "Number of TALKVERBS." > "Number of TOUCHVERBS" > "Number of HURTVERBS." > "# PUTVERBS." > "Number of MOVEVERBS." > > ) (T )>> ) (T )>> ) (T )>> ; ) (PLACE <>)) ) ( > ) (T )> ) (T )>> ; ) (T )> ) ( ) (T )> ) (T )>> ) (T > ) ( > >> ) (T >)>> )>> > > > ) (T )>> )) > ) ( ) (T >)> > > )>) (T )>)>) (T > > )>) (T )>)>)> ) ( ) (T )> > ; > )> > > ) (T )> ) ( > ,P?GENERIC> .TBL>>> ) ( ) (T )> ) ( ) ( ) (T ,NOT-HERE-OBJECT)>> )) > )> )>) ( <>>) (T <>>)>> ) (TWO? <>)) > )> > > )> > > >) (T > >) (T ) (T )>)> )> > ) (T >)> ) (T > )> )>>)> > > )> > > > > )> > > > ) "AUX" OBJ NXT STR (1ST? T) (TWO? <>) (IT? <>) (ANY? <>)) )> )> ; "Hide invisible objects" > )> )> > > )> > ; "If HERE, apply FDESCs and DESCFCNs and eliminate those objects" > ; "FDESCs" )> > > >> )> > > ; "DESCFCNs" )> > > > )> >)> ; "Print whatever's left in a nice sentence" > > > ; ) ( ) (T )>)>) (T ) (T )>)> )> ; > )> > )> > ) (T >)> ) (T > )> )> )>>)> > ) ( ) (T )> >> )> > > ) (> >> ) (T >)>> > > ) ( 2>> ) (T )>> ; > 2>> ; >)>> ) ( > ) ( ) (T )>> ) (> >> )> > ,ROOMS ,GLOBAL-OBJECTS> ) ( ) ( > ) (T )>> )) )> > "Reprint a validated sentence." > T) ( ) ( 1>>> ) (T > )> > ; "Length of word." > ; "Point to 1st char." ; "Print word, cap 1st char if 1st word or proper noun." ; "Init char count." > >> >)> > )> ) ( )>)> )>> ; ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )>)> )> > > >> > "Input save buffers; first byte hold length of string, zero if none." > > > ) SAVLEN CNT WLEN WPTR X) > )> ; "Rotate next table into position." ; "Copy last input line into INSAVE-A." > > )>) ( T ; > ; ; )>) ( 46) ( 63) (T 33)>> )>)>) (T ; "Move word to INSAVE-A." > ; "Add a space." )> > > >> ; "Char ptr." ; "Init # chars moved." > ; "All caps." > >)> ; "Move char." ; "Point to next char." ; "Overflow?" > ; "Word done?" )>>)> > ; "Update P-LEXV pointers." > ; "Overflowed?" ; "Back up and exit." ) ( ; "Exit if no more tokens." )>> > ; "Remember length of line." >