home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.compilers      Compiler construction, theory, etc. (Mod      2,753 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 1,073 of 2,753   
   carl immanuel manalo to All   
   prolog and recursive descent parsing?   
   16 Sep 07 16:44:28   
   
   From: carl_thinks_cs@yahoo.com   
      
   How does prolog use recursive descent parsing to solve problems given   
   to it?. Does it make a graph of the parse tree or something?   
      
   I've only encountered recursive descent parsing to solve problems like   
   boolean algebra or number arithmetic but prolog can do much more than   
   this.   
      
   I understand that it's easy enough to do for facts like.   
      
   male(bill).   
   female(mary).   
      
   one only has to compare the query to the facts in the database per   
   token. but what about rules like?   
      
   parent(X,Y):-mother(X,Y).   
   grandparent(X,Y):-parent(X,Z),parent(Z,Y).   
      
   I find it difficult to imagine that you would only check them per   
   token.   
      
   So, how does prolog handle this?   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca