; Gramática ejemplo de dypar. Escaneada y procesada con OCR.

<be-present> -> (is | are | be | am)

(have-present -> (have | has)
(have-past> -> (?(have-present> had) 
<have-future> -> (will have ?had)
<have> -> ((have-present> | <have-past> | (have-future>)

<be-past> -> (was | were | <have-present> been | had been)
<be-future> -> (will be | will have been)
<be> -> (<be-present> | <be-past> | <be-future>)

<q-word) -> (what | who | where | when | how | why | how much | how many | how come) 
<www> -> (what | who | which)

<poss> -> (%apost s)

(what-q> -> (<www> <be-pres> | <www> <poss>)

<pos-modal> -> (could | would | can )
<polite> -> (<pos-modal> you)

<me-us> -> (me | us)

(info-reql> -> (?<polite> (<info-req2> ?<what-q>)
<info-req2> -> (tell <me-us> ?about | give <me-us> | print | type )
<ínfo-req3> -> (<www> | ?<polite> (into-req2> ?<www>)
<info-req> -> ((what-q> | <info-req1>)

<a-an> -> (a | an)

<all> -> (all | everything | what) 
<bulk> -> (bulk | majority | greater part) 
<universal-quant> -> (?almost all | ?almost every ?one | each | most | many | the <bulk> of)

<det> -> (the | <a-an> | <universal-quant>)

<punct> -> (%qmark | <dpunct>)
<dpunct> -> (%period | %emark)

(<info-req> ?<det> (!nam := $) ?<punct>)
=>
(ltm-ret !nam 'isa: nil nil)

((info-req> ?<det> (!prop := $) of ?<det>  (!nam :• $) ?<punct>)
=>
(ltm-ret !nam !prop nil nil)

((info-req3> (!prop := $) <be-pres> ?<det> (!nam:= $) ?<punct>)
=>
(ltm-ret !nam !prop nil nil)

(<be-pres> ?<det> (!nam := $) ?<a-an> (!val :• $) ?<punct>)
=>
(ltm-ret !nam 'isa: !val nil)

(<be-pres> ?<det> (!prop := $) of ?<det> (!nam :• $) ?<det> (!val:=$)
	?<punct>)
=>
(ltm-ret !nam !prop !val nil)

<prp> -> (of | to | for | with)
<prp-about> -> (about | on)
<prp-in> -> (on | in | into | onto | inside | within)
<tof> -> (to | of)
<ofor> -> (of | for)

(<be-pres> ?<det> (!va] :=$) ?<det> (!prop := $) <tof> ?<det> 
           (!nam := $) ?<punct>)
=>

(ltm-ret !nam !prop !val nil)

<known> -> (you <know-have> | ?is known | there is | stored
                            | in memory)
(know-have> -> (know | have)

((info-req> <all> ?<that-do> ?<known> <prp-about> (!nam := $)
	?<dpunct>)
=>
(1tm-ret-all !nam)

<label> -> (word | term | name | label)
<dlabel> -> (?the <label>)
<name> -> (?proper name | ?proper noun | token ?mode)

(?<dlabel> (|nam := $) <be-pres> <a-an> <name> ?<dpunct>)
=>
(ltm-store !nam 'token 'node-type: nil nil)

<same> -> (what | <same1>)
<same1> -> (?the same ?thing <as-that>)
<as-that> -> (as | that)
(that-do> -> (that | do)
(means-does -> (means | does)

(?<dlabel> (!nam := $) <be-pres> <a-an> synonym <ofor> ?<dlabel>
	!val := $) ?<dpunct>)
=>
(progn (ltm-store !nam !val 'synonym nil nil)
       (msg "Henceforth when you type "
             !nam " I'll interpret it "
              "as " !val t))

?<det>	(!nam := $) means ?<same> (!val := $) ?<means-does>
	?<dpunct>)
=>
(ltm-store !nam !val 'synonym nil nil)

<typeof> -> (<type> ?of)
<type> -> (type | kind | form | instance | example)

(?<a-an> (!nam := $) <be-pres> <a-an> ?<typeof> !val := $) ?<dpunct>)
=>
(ltm-store !nam !val 'isa: nil nil)

(?<det> !val := $) <be-pres> ?<det> (!prop := $) of ?<det> (!nam := $)
              ?<dpunct>)
=>
(ltm-store !nam !val !prop nil nil)

(?<det>	(!nam := $) <be-pres> (!vorp := $) ?<dpunct>)
=>
(ltm-spec !nam !vorp nil nil nil)

(?<det>	(!nam := $) <be-pres> <a-an> (!vorp := $) (!val := $)
	?<dpunct>)

(progn	(ltm-store !nam !val 'isa: nil ní1)
	(ltm-spec !nam !vorp nil nil t))

(inverse-rol> -> (<Inverse> ?<rel> ?name)
<inverse> -> (inverse | opposite | <backpointer>)
<backpointer> -> (back pointer  | back %dash pointer | backpointer)
<rel> -> (relation | property  | attribute | pointer | arc)

<forget> -> (remove | delete | erase |  forget ?about | wipe out)
<load> -> (load | input |  read ?in | dskin)
<store> -> (save | store | output | write ?out | dskout | print ?out)
<exit> -> (quit | exit | end ?$ session | ?good bye)
<command> -> (<forget> | <load> |<store> | <exit>)

<verb> -> (<command> | <be> | <info-req> | <have>)

(?<pos-modal> <forget> ?<det> (!prop := $) ?<prop> of (!nam := $)
               ?<punct>)
=>
(ltm-forget !nam !prop)

(?<polite> <load> ?the ?file (!fil := $) ?%period)

=>

(loadfile !fil)

(?<polite> <store> ?<prp-in> ?the ?file (!fil := $) ?<punct>)
=>
(storefile !fil)

(<exit> $r) => 'exit

<neg> -> (no | not | never |none | nothing | %apost t)
<pos> -> (yes | sure | indeed | certainly | certain | surely)

((&u <nag>) <neg> $r)
=>
(msg "I do not understand negations yet." (N 1))

((!s1 :- (&u please)) please (!s2 :• $r))
::>
(append !s1 !s2

((!s1 := (&u <q-word>)) (!q := <q-word)) (!s2 := (&u <be>))
	(!v := <be>) ?(!p := <punct>))
::>
(nconc !s1 !q !v !s2 !p)

((!s1 := (&u <q-word))) (!w1 := <q-word>) <poss> (!s2 := $r))
::>
(nconc !s1 !w1 (list 'is) !s2)

((!s1 :- (&u $ <poss>)) !w1 := $) <poss> (!w2 :=$) (!s2 := $r))
::>
(nconc !s1 !w2 (list 'of) !w1 !s2)

(?<det> (!w1 := $) (!prp := <prp>) ?<det> (!w2 :=$)  (!v := <verb>)
        (!s2 := $r))
::>
(nconc !s2 !v !w1 !prp !w2)





