⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wishlist

📁 <B>Digital的Unix操作系统VAX 4.2源码</B>
💻
字号:
Date: 25 Apr 1980 1546-PST (Friday)From: mike at UCLA Computer Science VAX (Mike Urban)Subject: ATTN: DDL ImplementorsTo: cc (UCLA Computer Club)   I would like the following changes made in DDL:1) Friendlier Parsing.  You should be able to say 	give troll the knife   and get away with it (with "knife" as Dobj and "troll" as Iobj).  You   should get messages like "I don't know how to tke" in the event   of a bad verb, and "I think 'north' is a verb" in the event   of a weird parse like "push north wall".  You should be able   to say things like "e.s.s.take thing. eat thing. look" and have   the parser treat the "." as equivalent to and end-of-line.  		/* ACCOMPLISHED 6/13/80.  Syntax errors are now		of the form "I don't know how to xxx" if an unknown		word is encountered (the whole word, not just 5 letters		is printed); "I don't know the word 'xxxxxx'" for other		unknown words; and "I don't understand, because I 		think 'xxxxxx' is a [noun/verb/adjective/etc]" for		other syntax errors.  The separator was already		built into the lexer, but it's a comma, not a period.		And VERB IOBJ DOBJ is a legal syntax now, but 		VERB PREP IOBJ DOBJ isn't (tho it's easy to add) */	MAYBE   (if it isn't hard), you should be able to say "take this, that, the other"   and have a more sophisticated control loop which causes it to act   like "take this.  take that.  take the other" with the EXCEPTION that   no daemon/fuse processing is performed (no turn increment) and that   the whole thing can be short-circuited by an appropriate Exit code.2) Generalized routine and object handling.  The routines associated with   objects should be properties of that object just like the others.  The   constants that tell WHICH property is, say, the Action property should   be predefined.  So ($setp room1 LDESC Rubbl) would set the long    description of room1 to the routine Rubbl (which describes the rubble   left by the explosion you just triggered...).   	/*** ACCOMPLISHED 6/6/80 ***/3) Improved global handling.  The programmer shouldn't have to know the   "address" of his globals.  Instead, a construct like  	VAR score   would be the equivalent of saying "score = xxx" where xxx is one less   than the last VAR done.  	/*** ACCOMPLISHED 5/29/80 ***/4) Improved grammeme access.  There should be predefined VARs which   contain the values of ($verb) ($dobj) and ($iobj).  You should   be able to re-assign these.  SO, you should be able to say       turn off lamp      and the PreVerb routine for "turn" might contain something like	(($eq @Iobj off):		($setg Verb douse)		($setg Iobj 0)	)		/*** Accomplished 6/12/80; Only change in			ddlrun is #defines for verbtodo, etc */   Because verbs don't have properties, we may wish for functions   to access their preverb and action routines as well.5) String handling:  It'd sure be nice to have someone type	incant "abra ca dabra"    and be able to talk about ($subs Dobj @var 1) or ($indx @Dobj "abra")   or whatever.  I don't know exactly how to implement it yet.		/*** Accomplished 7/28/80;  STRINGs are negative-valued		objects.  If the lexer gets a string, it puts it into		a temporary string area (that is flushed every turn) and		returns an index (not pointer) into that are as a negative		number.  The parser knows about these and can handle		verb string  and  verb string prep iobj   sentences.		(the latter being for "Incant "rise" over seed".)		If the dobj or iobj of an input is a string, the dobj		and iobj routines called are the ones associated with		the object STRING (if such is defined by the DDL		programmer).  At present, the functions $substr, $length		and $eqst  are defined.  $substr returns a negative		pointer into the temp string area; this can be stored		in a global, for example.  A permanent string area		is available, but I haven't written the function 		($sets glbl string) which would move the string to the		permanent area and put its index therein into glbl. 				Mike		***/		/*** On 8/20/80, I added a new function (which, mirable dictu,		will allow coding of the "echo" room!), ($read), which		pauses, gets a line of input, and returns the line as		a string!  Gee, if we code up ($pars str verb dobj iobj)...6) Ctrl-D should terminate the program.  Ctrl-C should interrupt whatever   is happening and begin a new turn.   Note that this may leave things in a bad state.7) New language construct: (WHILE condexp : formlist) is essentially   equivalent to (condexp : formlist ($____ formlist+condexp)) where   "($____ formlist+condexp)" is a new operator, JUMPB (jump back),   which is just like the current $.... jump forward instruction, but   (obviously) negative, and unconditional.  It goes back exactly to   the beginning of the test.		/*** ACCOMPLISHED 8/18/80 --Mike ***/8) New routine ($rand n) produces a somewhat random number in the range   1..n .	/*** ACCOMPLISHED 8/18/80 ***/9) DDLRUN sources should be reorganized so as to enable recompilation   of less than the entire program if some less global change (such   as the addition of a new routine, or a bug fix in the parser) is   made.		/*** Somewhat accomplished 10/80.  Still needs 		     work.  In particular, changes in extvars.c must		     be reflected in extvars.h ***/10) The symbol table, and the hash routine, are simple-minded.  The   5-character limitation on names is a real pain for some people.   For example, you can't even fake the Zork puzzle room by allowing   someone to say "push northern wall".     These changes don't have to go together.		/*** ACCOMPLISHED(!!) 11/80.  Identifiers are pretty			much as long as you like.  The symbol table,			now alphabetized, contains indices (not pointers)			into a pool of identifiers that starts at			sbrk(0).  A binary search algorithm is used.			This will enable a future version to respond			correctly to unambiguous abbreviations for			things at runtime (like news for the aard			newspaper, for a cogent example).  This			hasn't been tested for portability to a			PDP-11 under V7, so beware. As of 11/18,			the symbol table is still unencrypted ***/		/*** The runtime parser recognizes unambiguous 			abbreviations.  The symbol table is still			unencrypted.  1/81 ***/11) It should be available on a micro.			/* Not yet.  But the thinking has begun! */			/* This will necessitate some rearchitecture			   especially wrt buffering of routines/strings */12) The ACTION routine for verbs should execute AFTER the action     routine for your room; this enables east(ACTION) to correctly    default to ($say "Can't go that way.") and allow one to generally    live without $hit and $miss, crocky routines that they are.    See ../sample (espec. transit.ddl) for a specimen of how this works.			/* 11/80 */13) Routines that get the action and preaction routines for verbs    should be made available.  14) Fuses and daemons aren't QUITE right (fuses go off after your daemon	has typed a prompt, for a real-world example).  Maybe they	shd be on a homogenized priority queue?15) It should be frozen real soon.			/* As of 1/81, we're STILL thinking in terms			   of "just this ONE more feature..."  Damn. */	Mike

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -