---------------------------------------------------------------------

next up previous contents
Next: C Up: PAD manual ( pad2ps Previous: Comment

---------------------------------------------------------------------

Draw PAD figure directly from a program

This chapter explains how to make pad2ps series draw PAD figure directly from a program source. It's commonly hard to read someone's program, but it will be much easier to understand with pad2ps series.

When drawing PAD directly from a program , pad2ps series carry out two steps. At first pad2ps series call a parser for the appropriate language and translate the original program into a PADEL file. Then pad2ps series read this PADEL file and draw PAD figure from it. If you want to modify PAD figure of a program, not only to draw PAD of the program as it is, you had better use the parser directly and translate the program into a PADEL file. Then you can modify the PAD figure freely without touching the original program. To convert programs into PADEL, use mkpad  command. If the original program is in C, for example:

% c2pad foo.c > foo.pad

Then modify this foo.pad accordingly and then translate it with pad2ps series.

In case of error the line number printed is not a line number on an original program, but a line number on a file created by parser.


---------------------------------------------------------------------

Go back to pad2ps - automatic PAD drawer.
Go back to Seiichi Yoshida's Home Page.
Copyright(C) Seiichi Yoshida (comet@aerith.net). All rights reserved.
Sun Nov 10 01:36:04 JST 1996