next up previous
Next: 15.11.2001: (Gruppenarbeit & Berichte: Up: 13.11.2001: Grammatik: prozedurale Aspekte Previous: Prettyprinted parse output from

Sample traces from the LISP recursive-descent parser

The trace shows the current state of the input string to be parsed, and the current state of the stack.

Parsing...
-> (the man saw)
((() s))
-> (the man saw)
(((s) np vp) (() s))
-> (the man saw)
(((np) n) ((s) np vp) (() s))
-> (the man saw)
(((np) det n) ((s) np vp) (() s))
-> (man saw)
(((det the)) ((np) det n) ((s) np vp) (() s))
-> (man saw)
(((np (det the)) n) ((s) np vp) (() s))
-> (saw)
(((n man)) ((np (det the)) n) ((s) np vp) (() s))
-> (saw)
(((np (det the) (n man))) ((s) np vp) (() s))
-> (saw)
(((s (np (det the) (n man))) vp) (() s))
-> (saw)
(((vp) v) ((s (np (det the) (n man))) vp) (() s))
-> ()
(((v saw)) ((vp) v) ((s (np (det the) (n man))) vp) (() s))
-> ()
(((vp (v saw))) ((s (np (det the) (n man))) vp) (() s))
-> ()
(((s (np (det the) (n man)) (vp (v saw)))) (() s))
-> ()
((((s (np (det the) (n man)) (vp (v saw))))))
...

The trace output resulting from further backtracking has been omitted.



Dafydd Gibbon, Wed Feb 12 10:50:41 MET 2003 Automatically generated, links may change - update every session.