home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / forth / dada / parser1.ltg < prev    next >
Text File  |  1986-02-27  |  1KB  |  41 lines

  1.  
  2.                             Listing 1
  3.                   Prolog Subset Phrase Grammar
  4.  
  5.  
  6.           Start ááááá-> Prolog
  7.  
  8.           Prolog áááá-> Prolog Clause
  9.                      -> Clause
  10.  
  11.           Clause áááá-> Goals '.'
  12.                      -> Goals ':-' Goals '.'
  13.  
  14.           Goals ááááá-> Goals ',' Goal
  15.                      -> Goal
  16.  
  17.           Goal áááááá-> Predicate '(' Components ')'
  18.  
  19.           Components -> Components ',' Component
  20.                      -> Component
  21.  
  22.           Component á-> Functor '(' Components ')'
  23.                      -> '<VARIABLE>'
  24.                      -> Constant
  25.                      -> List
  26.  
  27.           Constant áá-> '<NUMBER>'
  28.                      -> '<ATOM>'
  29.  
  30.           Functor ááá-> '<ATOM>'
  31.  
  32.           Predicate á-> '<ATOM>'è
  33.  áááááááááList áááááá-> '[' ']'
  34.                      -> '[' Head ']'
  35.                      -> '[' Head '|' Tail ']'
  36.  
  37.           Head áááááá-> Components
  38.  
  39.           Tail áááááá-> List
  40.  
  41.