(printlevel 5)
(loadfile "oopl.wl")
(loadfile "stream.wl")
(loadfile "collect.wl")
(loadfile "grammar.wl")
(loadfile "parser.wl")
(setq aParser [{TopDownParser} new "sample.grm"])

(print 
  (setq aStream 
        [{Stream} on '#["the" "boy" "ate" "a" "tasty" "little" "pizza"]]))
(print [aParser parse aStream 's])
[aStream reset]
(print [aParser parse aStream 'np])
[aStream peek]
(print [aParser parse aStream 'vp])

; or:
;
;	(setq anotherStream 
;	      [{Stream} on '(john said that mary kicked the ball)])
;	[aParser parse anotherStream 's]
;
