"Generic PARSER file for The ZORK Trilogy started on 7/28/83 by MARC -- GERMAN VIA , pdl's revision" ;"ein, eine, ect. replaces w?one in all cases" "> > > > > ;"pointers used by CLAUSE-COPY (source/destination beginning/end pointers)" ;"zilch automatically sticks number of last obj here" ;> ;> ;> > ;"INBUF - Input buffer for READ" ;> ;> <> <> <>>> "word pointer to unknown token in P-LEXV" "word pointer to sentence start in P-LEXV" "byte length of unparsed tokens in P-LEXV" "byte pointer to first free byte in OOPS-INBUF" ;"Parse-cont variable" > ;> ;"Orphan flag" > > > > > ;"Parser variables and temporaries" ;"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" ,PLUS-MODE> 6) (T 4)>> "Offset to parts of speech byte" ,PLUS-MODE> 7) (T 5)>> "Offset to first part of speech" ; ;"Offset to first part of speech" ; ;"First part of speech bit mask in PSOFF byte" > > > > > > " 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 <>) OWINNER OMERGED LEN (DIR <>) (NW 0) (LW 0) (CNT -1)) > ,P-ITBLLEN> ) (T >)> )>> > > > > > ; ,VEHBIT>> >)> >)> > )> > >) (,P-CONT >> )> >) (T > ,VEHBIT>> >)> > )> % ,PLUS-MODE> ' ">>) (T '">)> )> > )> > ,W?ACH> > ,W?PERIOD ,W?COMMA> > >)> > ) ( > ,W?QUOTE>> ) ( )> >> ;"maybe fix oops vs. chars.?" 6>> 7>> <+ <* ,P-LEXELEN> 3>> > > ) (T > )>) (T > )> >)> ,W?WIEDER> > ) (,P-OFLAG ) ( ) ( > ,W?PERIOD ,W?COMMA ,W?DANN> > ,W?UND>> >> 2>>) (T )>) (T > 1>>)> 0> ) (T >)> ;> ) (T >)>>) (T > >>>> > >>> > > > 0> > ) (> >> ) (T >>)> > ) ( ;"Last NOT added 7/3"> ) (ELSE )>)> >) (T )>)> >> ) (> ,ACT?GEH> > >> > >>> ,W?DANN>)> > > )>) (> > 2>>>> >>) (> > ;"JEFF 'VOLL' FOR BAG OF COINS" > > ;>> ) (> >> )>) ( ) (T > > > > )>)>) ( > ) (T >)>) () ( > ) (T )>) (T )> >>)> > > ) (ELSE )> > > > 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>> ;"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> ) ( 1) ;"NEW-VOC" (T > > >)> )>)>> ;" Scan through a noun clause, leave a pointer to its starting location" ) (FIRST?? T) NW (LW 0)) 2>> > > .VAL> .WRD> >) (T >)> > )> > >> ,W?DER ,W?DIE ,W?DAS> ,W?EIN ,W?EINE ,W?EINEM> ,W?EINEN ,W?EINER>> 4>>)> > 0> >> )> > >> ) (T >>)> ) ( > > >)>) ( ;"ADDED 4/27 FOR TURTLE,UP" >> > >> >) ( > >> T) ( ;"semi ala BZork and elsewhere" > >) ( > >> 2>>> ) (T >)>) ( 0>>> >>) ( >> > ,W?DANN> >) ( T) (T )>) (T )> > >>> )) > 2>> > 3>> > 0> ) (T > ) ( ) ( > <- .CHR 48>>>) (T )> >)>> ) (.TIM >) ( )> >>)> ,W?INTNUM> > ;"New ORPHAN-MERGE for TRAP Retrofix 6/21/84" ) WRD) > 0>> ,PS?VERB ,P1?VERB> > >>> ) (>> > > > )> >>> >>> ) ( ) ( 1> > > > > > >)> )>) (T >)> >) (T )>) ( 1> > > > > > >)>)> > > ) (T )>) (> > > > ) (T > > >)> > > ) (T > )>) ( ,PS?ADJECTIVE> >> ) (; ) ( ,PS?OBJECT> ) (T )> )> > > )>>)>)> > > > > ,P-ITBLLEN> ) (T >)>> T> ;"New ACLAUSE-WIN for TRAP retrofix 6/21/84" > > > 0>> > > > > 0>> > > > ;"Print undefined word in input. PTR points to the unknown word in P-LEXV" ) "AUX" (DID-CAP <>)) ) (ELSE .CAP?> 32>>) (T >)> >)>>> )> ;"> "> >> 2> 3>> ; > >> )> ; "> >> 2> 3>> > >> ;" 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 TMP THE-PREP) >> )> >> > > ,P-SONUMS>> T) (> >> >>> ) ( > > ) ( > )>)> ) (T )>) (T >)>> >>> ) ( >>> ) ( ) (> ) (T > ) (> <;PRINTB CAPITALIZE >) (T T>;"cap" )> ; ;"REMEMBER: THE FIRST SYNTAX IN SYNTAX FILE THAT'S FOUND WILL BE THE ONE ORPHANED - but player CAN type only verb and a specific prep" ;"etc., ie, is verb a non-sep? eg, SEH IN OBJ" > > ) (T >)>) (.DRIVE2 ;"syntax needs an second prep and object" ;"eg, Mit was?" ;"will not CAPITALIZE a prep, somehow - thus T semied" ;T> ) (T ;"perhaps this ELSE can't happen" ) (> >) (T > )> )> )>> > >> > >> ) (T )>> Ich verstehe das nicht! Worauf beziehst du dich?%<" CR> > )> > > > ) (T >)>> )> > )> > ) (.D2 > )>> ; .THE?>> ) "AUX" BEG END) > >) (ELSE > >)> > ) (Q? <>)) ) (T > T) ( ) (.NOSP >) (ELSE )> ) ( ) ( ) (T .CP> )> ) ( > ) ( > ) ( > ) (T >)> >)>)> >>> ;"in, e.g. Wishbringer, for preps longer that 6 letters, special case to print" ) "AUX" WRD) )> > ) (T )>> ;"e.g., suspect has no this clause" >)> ;"semied to print, Mit was?" > 32>> 1> <+ 1>>> ) "AUX" BEG END) >> >> ,P-LEXELEN> 2>>> ,P-LEXELEN> 2>>> ) (T >> )> >)> >>> 2>> .WRD> > 2>> ) ( .PREP> >>)>>> >> > > > ;"it seems most direct objects are in the acc. case and all indirect objects are in the dative case; ie, for GWIMing just look at PRSO or PRSI to determine case - except for 'talk with troll', listen for bird, listen to bird" )> > > 1> > > > > ; )> ; > ) (T )>) ;"acc prep for prso" ( ) (T )> >) ;"GWIM-PRSI" ( ) (T )> ; ) (T )> ) ;ELSE ( > ) (T )> .OBJ)>) (T )>> > 0>> > ,P-PRSI> >)> > 0>> > ,P-PRSO> >)> >> > >)> >>> >)>)> > > ) (> ,P-BUTS>) (T .OBJ> >)> >> .NTBL> > > > ;> > > > > > > ) LEN WV WRD NW (WAS-ALL <>)) > )> > >> )> ) (T > ) (T >)> >)>) ( > > ) ( >)>) (T > > >)>) ( >> > > T) () () ( )>) (> ;"below replacement line via BZork" > ;) ( )>)> > > )>>> ) (OLEN 0) OBJ) > )> ,P-ADJ> >) ;"added by JEFF or Z3 to make 'go to dir' work" (> > )>)> > > )> )> > > )> ) (T )> )> .TLEN>> ) ( >> > >> > )> ) ( >>> .LEN>> ) (T )> > ) ( ,P-NC1) (T ,P-NC2)>> <>> ) (.VRB )> > > )>)> .GCHECK> > ;"Changed 6/10/83 - MARC" ; > > ;> ) (T )>)> > > ) ( )> > > >> > > ;> ;"If the possible matching syns for an object are all the same gender, then you could just check gender of the first object found to determine 'Welcher, Welches, or Welche'" > > 1> ) (; 3> )> ; ) (,P-ADJ ) ;(ELSE )>) (ELSE >)> > ;"this and next line used above TELL" > > )> ) ( )> > 1> )>>> > > 2> 1>> > .TBL> )> )>>)> ;> 4> 1>> >> 1>>> 5>> > > ) ( )>>)> .LEN> > > )>)>> > ) (T ) ( ) (T )>)>> > > > )> > > > >> ,P-SRCALL) ( ,P-SRCALL) (T ,P-SRCTOP)>>>)> >) (T )>>)>> > .OBJ> >> > >>> ) > >> > 0> ) (T >> > ) (T )>) ( > ) (T )>) ( > ) (T )>)> > >> ) (> >) ( > T>> >) (T )> > )> ; ; ; ) ( > ; )>)>)>>) (T)>> > ) TMP) 1> ,SMANY>>> ) ( 1> ,SMANY>>> )> ) (T )> "> > ) ( >) (T >)> ) (T)>> )> > ) (ELSE >)> > >>) ( )>>> ;> ) ( )>>> > )) > )> > ) (T > > )>)> 0> )>)> .LIT> ;> 0> ,W?ES>> ) (T <>>)>> ;> 0> ,W?ES>> ) (T <>>)>> ;"old zork1 version w/ switch" ) (> <- 2> 1>>>> ) (>> ; 1>>> ,PLUS-MODE> '>) (T '>)>>>> ) (> >> )> > ) (T >)> ) ( ) ;( ) (T )>) ( ) ( ) ( > ) ( ,HERE >> ) (> ) ( > ) (T )>> ) ( )> ) (T >)>>>