Subject: Re: [Stratego] Count newlines
From: [email-masked] (Hendrik Boom)
Date: 14 Apr 04 16:45:10 GMT

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
[email-masked]
https://mail.cs.uu.nl/mailman/listinfo/stratego