Date: 14 Apr 04 16:45:10 GMT
From: hendrik@pooq.com (Hendrik Boom)
Subject: Re: [Stratego] Count newlines
Message-ID: <20040414164510.GA32638@pooq.com>
References: <20040209150349.24358.qmail@web41114.mail.yahoo.com>
	<Pine.LNX.4.44.0404141001340.28969-100000@lxbill>
MIME-Version: 1.0

On Wed, Apr 14, 2004 at 10:11:06AM +0100, Bill James Ellis wrote:
> Hi,
> 
> I want to be able to relate parts of my
> parsed structure (tree) to the original
> file.
> 
> I would like to count newlines (currently
> just skipped as LAYOUT), and then store
> the value of this counter when important
> bits of the grammar are parsed.

I've found it more useful to count characters.
With a character count I use emacs to move forward
that number of characters, and I'm at the exact point
in the file where the parse gets stuck.  I use character
counts in my hand-written parsers.  I don't know how to
do the like in Stratego.  Line numbers are, I believe,
a relic of the days when people debugged programms using
huge stacks of printed listings because CRTs weren't
available yet.

-- hendrik
_______________________________________________
stratego mailing list
stratego@cs.uu.nl
https://mail.cs.uu.nl/mailman/listinfo/stratego


