next up previous
Next: If again Up: No Title Previous: States in JavaCUP

Debugging JavaCUP

Calling debug_parse() in ParserTest instead of parse() (You can use -debug), using input 5+3 yields
\begin{program}
\char93 ~Initializing~parser
\\ \char93 ~Current~Symbol~is~\char...
 ...\char93 8~to~state~\char93 2
\\ \char93 ~Current~token~is~\char93 0\end{program}

\begin{program}
\char93 ~Reduce~with~prod~\char93 3~[NT=2,~SZ=1]
\\ \char93 ~Got...
 ...with~prod~\char93 0~[NT=0,~SZ=2]
\\ \char93 ~Goto~state~\char93 --1\end{program}



Christoph Zenger
4/6/2000