[comp.sys.mac.programmer] Format of Think Pascal source files.

d_volaric@vaxa.cc.uwa.oz.au (08/25/90)

Would anyone out there know what the file format of the Think Pascal
"Entire Document" (as opposed to "Text Only") source file type? Does anyone
know where I might get information on it? I'm thinking of writing a source
cross-reference/analyer thingy and having to save my files as text all the 
time would be very boring.

The same thing for the project file would be very useful too.

Any help would be much appreciated,

Darko Volaric,
Dvorak Computer.

siegel@endor.uucp (Rich Siegel) (08/25/90)

In article <1990Aug25.020749.2091@vaxa.cc.uwa.oz.au> d_volaric@vaxa.cc.uwa.oz.au writes:
>Would anyone out there know what the file format of the Think Pascal
>"Entire Document" (as opposed to "Text Only") source file type? Does anyone
>know where I might get information on it? I'm thinking of writing a source
>cross-reference/analyer thingy and having to save my files as text all the 
>time would be very boring.
>
>The same thing for the project file would be very useful too.

	The internals of the Entire Document and project file are proprietary.

	It would actually make your task simpler to cross-reference pure
text source files, particularly because the code would be portable to other
systems, and also because text is much simpler to scan and parse.

R.


 Rich Siegel	Software Engineer	Symantec Languages Group
 Internet: siegel@endor.harvard.edu	UUCP: ..harvard!endor!siegel

I hate fascist Pnews implementations which limit the .signature to 4 lines.

philip@pescadero.Stanford.EDU (Philip Machanick) (08/26/90)

In article <4007@husc6.harvard.edu>, siegel@endor.uucp (Rich Siegel) writes:
> In article <1990Aug25.020749.2091@vaxa.cc.uwa.oz.au>
d_volaric@vaxa.cc.uwa.oz.au writes:
> >Would anyone out there know what the file format of the Think Pascal
> >"Entire Document" (as opposed to "Text Only") source file type? Does anyone
> >know where I might get information on it? I'm thinking of writing a source
> >cross-reference/analyer thingy and having to save my files as text all the 
> >time would be very boring.
> >
> >The same thing for the project file would be very useful too.
> 
> 	The internals of the Entire Document and project file are proprietary.
> 
On a slightly different tack: I think it would be really useful if source files
could be saved formatted / readable in a word processor. This would be great
for incorporating sections from listings into documentation, course handouts,
textbooks etc.

Philip Machanick
philip@pescadero.stanford.edu

phils@chaos.cs.brandeis.edu (Phil Shapiro) (08/27/90)

> On a slightly different tack: I think it would be really useful if source files
> could be saved formatted / readable in a word processor. This would be great
> for incorporating sections from listings into documentation, course handouts,
> textbooks etc.

Since ThP doesn't support cutting/pasting of Styled Text, you can't
get bolded keywords.  However, you do get capitalization and
indention, so one could write a macro (style sheet ?) that
automatically emboldens keywords.  There are only 45 of them, and
they're listed on p. 242 (in the 3.0 manual).

	-phil shapiro, symantec tech support
--
Phil Shapiro
phils@chaos.cs.brandeis.edu

d_volaric@vaxa.cc.uwa.oz.au (08/29/90)

In article <4007@husc6.harvard.edu>, siegel@endor.uucp (Rich Siegel) writes:
> 
> 	The internals of the Entire Document and project file are proprietary.

Is there an address (paper mail type) I can write Symantec at? I'm quite willing
to sign non-disclosure agreements, stick to certain contitions, etc.

> 
> 	It would actually make your task simpler to cross-reference pure
> text source files, particularly because the code would be portable to other
> systems, and also because text is much simpler to scan and parse.
> 

Well, yes and no. I'm thinking of doing a version for Turbo Pascal on the
PC (boo, hiss) and I'll end up writing a scanner and lexical analyser anyway,
but I had this dream of running a cross referencing tool under multifinder
(i.e. who defines <object>; <object> calls <object>; <object> is called by
<object>; etc, where <object> is a unit, object, type var or const. Very handy
for large projects and/or code you didn't write.) which updates every now and
then. Saving as text is slow on large files and having to explicitly save each
file in the project as text would be very time consuming.

Looking at the wonderful auto-formatter in Think Pascal, it seems to do the
scanning and lexing (and even some parsing) already. I'm assuming this is saved
in the document. This greatly reduces the workload for me. It means I only have
to do some simple parsing (searching for identifiers, procedure/function
headings, and with statments (the yuk bit) and counting begins and ends).

Having the file formats would be nice, but it's not worth hacking them.

> R.
> 
>
>  Rich Siegel	Software Engineer	Symantec Languages Group
>  Internet: siegel@endor.harvard.edu	UUCP: ..harvard!endor!siegel

Darko Volaric,
Dvorak Computer.

d_volaric@vaxa.cc.uwa.oz.au (08/29/90)

In article <1990Aug25.222646.5830@Neon.Stanford.EDU>,
philip@pescadero.Stanford.EDU (Philip Machanick) writes:
> On a slightly different tack: I think it would be really useful if source files
> could be saved formatted / readable in a word processor. This would be great
> for incorporating sections from listings into documentation, course handouts,
> textbooks etc.

If someone is willing to LEGALLY send me some file format specs for their
favorite wordproc and do dome testing, I'll write a little freeware export 
utility.

This is assuming, of course, that Symantec gives me the specs. I'll include this
appication in my letter, if I get to write it.

> Philip Machanick
> philip@pescadero.stanford.edu

Darko Volaric,
Dvorak Computer.