A parser can run into situations where there is no way to make progress.
When that happens, I record the row and col where you got stuck and the
particular problem you ran into. That is a DeadEnd!
Note: I count rows and columns like a text editor. The beginning is row=1
and col=1. As I chomp characters, the col increments. When I reach a \n
character, I increment the row and set col=1.
A parser can run into situations where there is no way to make progress. When that happens, I record the
row
andcol
where you got stuck and the particularproblem
you ran into. That is aDeadEnd
!Note: I count rows and columns like a text editor. The beginning is
row=1
andcol=1
. As I chomp characters, thecol
increments. When I reach a\n
character, I increment therow
and setcol=1
.