Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • Are you talking about the Crenshaw tutorial [] that some user here wrote about in his journal? Well: "me too". I'm also converting it into something prettier, and the easiest to get quick and decent results, is HTML. Actually I already got quite far in a small amount of code, starting by simply treating sequences of empty lines as an indication to start a new paragraph.

    My main remaining problem now is to reliably recognize the code sections. They start and end with lines of Pascal comments containing nothing

    • Indeed, I am.

      I've been thinking about that. My first (hackish) solution was to add a <P> to any line that ended in a } or a ;, and then add a <BLOCKQUOTE> wrapper around every begin/end pair.

      The results are easy to read but not monospaced. I realize it's a crappy solution, but it works. (Realistically, I should be writing a really thin parser, and maybe I will someday, but this is a one-shot job, etc.)

      The results look like this:



      { Output a String with Tab and CRLF }

      procedure EmitLn(s: string);


      Emit(s); WriteLn;


      It's really just a quick hack to make it more readable. If I get the motivation to do it respectably I'll actually figure out where the code begins and ends.


      You are what you think.