home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / windows / winlisp.zip / OOPL.LZH / TEST.WL < prev   
Text File  |  1989-08-05  |  574b  |  24 lines

  1. (printlevel 5)
  2. (loadfile "oopl.wl")
  3. (loadfile "stream.wl")
  4. (loadfile "collect.wl")
  5. (loadfile "grammar.wl")
  6. (loadfile "parser.wl")
  7. (setq aParser [{TopDownParser} new "sample.grm"])
  8.  
  9. (print 
  10.   (setq aStream 
  11.         [{Stream} on '#["the" "boy" "ate" "a" "tasty" "little" "pizza"]]))
  12. (print [aParser parse aStream 's])
  13. [aStream reset]
  14. (print [aParser parse aStream 'np])
  15. [aStream peek]
  16. (print [aParser parse aStream 'vp])
  17.  
  18. ; or:
  19. ;
  20. ;    (setq anotherStream 
  21. ;          [{Stream} on '(john said that mary kicked the ball)])
  22. ;    [aParser parse anotherStream 's]
  23. ;
  24.