Hey everybody. I do quite a bit in of work in text formatting
languages like groff and nroff, and there are some simple organizational
tasks that I think should be fairly easy to automate (i.e. -
complex page headers/footers, table of contents, etc.), and so for the past
month or so I've been toying with the idea of writing a front
end for groff in perl. Until about a year ago my primary platform
was Pascal, and having written a few lexical scanners in that
language I am very familiar (and incidentally quite dependent
on) the use of the pos() function. This function returns the index
of a character in a string, and is useful for determining the
location of whitespace and tokens. Although I have considered
doing this in lex or yacc, I think it would be a shot in the arm
for my perl skills to sit down and write a good 'ol lexical
scanner in this language. I'm about 90% sure that it's just some library
function I'm missing, but it would be helpful if someone could
point me in the right direction. Thanks.