-=*oOo*=- Diary of the `pretzel' Work for Release 2.0 -------------------- -=*oOo*=- Thu Mar 7 18:42:58 MEZ 1996: Started work on the new release. Tested the new implementation philosophy on the attribute class. This new philosophy includes: o use noweb instead of CWEB o use LaTeX2e instead of LaTeX o write specs and implementation into one noweb file and use the version.sty to seperate both. There will normally be two extra ``version'' environments inside a noweb file: bigspecs This included, you'll get a fully elaborate specification (with lots of examples). impls This included, the implementation will accompany the specification. I never thought to come back here. :-( Finished work on the attribute class today. Took V.1.5 of pretzel.sty and wrote a basic pretzeldoc.sty package for the documentation. Tue Mar 12 13:10:03 MET 1996 Started converting output.spc/.w to output.nw. Nearly finished. Wed Mar 13 12:34:32 MEZ 1996 Finished converting the Output class to noweb. Wrote a template file for own specializations and tested it with the new Ascii_terminal_output subclass. It seems to work. Thu Mar 14 11:04:52 MEZ 1996 Started rewriting the scanner for formatted token files. I'm trying to use flex's option to generate C++ scanner classes now. This will ease the use of multiple prettyprinters within one program. However one sentence in the flexdoc(1) man page makes my tummy ache: IMPORTANT: the present form of the scanning class is experimental and may change considerably between major releases. I've tried to keep the interface between the FlexLexer class and my own very small. I'm not using a subclass too, since this hides more information. Fri Mar 15 19:43:33 MEZ 1996 Worked hard on the generator for the prettyprinting scanner. Nearly got it to compile. Mon Mar 18 13:10:42 MEZ 1996 The generator for the prettyprinting scanner compiles. This stuff is getting hairy now. There are segmentation faults everywhere! Tue Mar 19 14:24:27 MEZ 1996 I'm on the edge: There's a funny `Internal error' when running ftokens. #0 0x10002ed0 in $PTRGL () warning: (Internal error: pc 0x10002ed0 in read in psymtab, but not in symtab.) I don't know what this is. The Output class outputs 1k of data to the screen and then dumps core. I'm on the edge of changing everything back to the normal C usage of flex. I'm changing everything back. Freezing the current version with name `cppflex'. Tue Mar 19 17:10:58 MEZ 1996 Finished all the changes, tested it and polished the files. That's enough for today. Wed Mar 20 12:40:33 MEZ 1996 Finished main part of transformation for the prettyprinting parser generation. Still need to get the generated output right. Asking Norman, how far his work has gone. Thu Mar 21 12:00:30 MEZ 1996 Finished final parts of the transformation. Tested pretzel and pretzel-it on simple examples. Need to test if two prettyprinters within a single program work too. Fri Mar 22 12:23:41 MEZ 1996 Finished first version of a simple prettyprinter for C. Fri Apr 12 12:05:37 MESZ 1996 Spent at least two weeks full time working on the noweb filter with Norman. The best thing to spring off from that project was an acceptable prettyprinting grammar for C. Today I started to prepare the formatted token files to contain code. There's a shift reduce conflict in the grammar now which I have to inspect. Mon Apr 22 11:19:08 MESZ 1996 Formatted grammar files can contain code now much in the style of formatted token files. Thu Apr 25 09:36:06 MESZ 1996 I haven't written much here on how the noweb filter is going on (and I don't want to put this info here anyway). Just a remark: Today I found the bug why the noweb filter spat out funny things when prettyprinting. I forgot to topp off the ostrstream with ``<< ends''. Fri Jun 7 18:04:57 MESZ 1996 Revised the homepage and WWW information. The current status of the project is: - still need to get a good prettyprinting grammar for C going - Joachim is working on the LaTeX macros - still need to port the stuff to gcc Package available via WWW now is v.2.0a. Scheduled start of work again: Mid July 1996. Mon Sep 2 18:23:55 MESZ 1996 Exams are harder than expected... So it's mid-july now?! Lee Wittenberg woke me up from sleeping on Pretzel and asked me for help. He had couldn't compile v.1.1 on Linux. His error had probably to do with the multiple flex scanner and Bison parser instances. Advised him to get newest version from Pretzel homepage. Ported everything to g++ (only alloca.c needs gcc). This is v.2.0b. Thu Sep 12 20:45:29 MESZ 1996 The ITI compiler seems to be very tolerant regarding multiple objects with the same name. Fixed the problem with multiple definitions of yylex and yyerror in the ftokens and fgrammar directory. The problem was that the parser (either in ftokens or fgrammar) called `a' yylex function, which should be the local yylex function supplied by myself. But there was another yylex function, namely the one produced by flex. Both were renamed using the same prefix (Pretzel_fg and Pretzel_ft) but they were still the two different functions with the same name. The ITI compiler seems to sort things like this out right. Also added the `extern "C"' declarations into ftscan.nw and fgscan.nw as proposed by Lee. Tested the compilation process on the HPs and the new Suns ober in 25. It compiles! This is v.2.0c. Fri Nov 1 15:17:14 MEZ 1996 First work on Pretzelbook. Wrote small example in languages/examples. Wed Nov 6 20:02:41 MEZ 1996 Continued work on Pretzelbook. First version runs through LaTeX now. Put Lee's Java prettyprinter in contrib/leew, but haven't had a chance of trying it. Fri Nov 8 19:55:22 MEZ 1996 Moved all the general noweb prettyprinter specific stuff from contrib/noweb/cee.latex to contrib/noweb/general. Now all files that a noweb prettyprinter needs are in this directory and necessary objects can be added to the pretzel library when you make release. Added -n option to pretzel-it, but haven't tested it. Also had a short look at Lee's Java stuff. Looks good. Will test it when new version of pretzel-it is ready. Thu Nov 14 19:58:37 MEZ 1996 The noweb option of pretzel-it works now. Cleaned up noweb directories and had a first go at Lee's Java prettyprinter. There's are some problems with ./totex though. Will continue later. Fri Nov 29 09:31:38 MEZ 1996 Got Icon. Released 2.0e because somebody in c.p.l wanted a Java prettyprinter for LaTeX. Mon Dec 2 11:45:01 MEZ 1996 Got the icon version of totex to work. Had a look at java.ft and java.fg. Started to write noweb sections of pretzelbook. Will press this thing now until christmas. Tue Dec 3 19:03:32 MEZ 1996 Started real work on the C grammar again. Have to sort out the TeX stuff soon. Lee's files are very helpful. Wed Dec 4 12:00:30 MEZ 1996 High Noon. Worked on the pretzel-noweb.sty but can't get the underscores to work right. Wrote part of Pretzelbook that explains adding C code to your rules. Spent too long on this. Wed Dec 4 18:32:04 MEZ 1996 Handled underscores through a small routine within the lexer. Can't make Pretzel handle empty chunks because I need the synopsis of C++ strstreams. Will look tomorrow. Thu Dec 5 10:11:40 MEZ 1996 The prettyprinting filter can handle empty chunks now. Tue Dec 10 20:05:52 MEZ 1996 Wrote chapter 1 of the Pretzelbook and revised chapter 2. Searched my files for some citations. They will make a good document. Wed Dec 11 12:16:17 MET 1996 Revised pretzel-it(1) manpage. Wed Dec 11 21:32:41 MEZ 1996 Tested the code that typesets context dependencies (i.e. typedefs). Pressed the C prettyprinting grammar to a state where I can continue. Added sections about this to the Pretzelbook. Thu Dec 12 12:18:48 MEZ 1996 The C grammar mangles loops and if constructs well now. Added sections of the Pretzelbook about frustrations while writing prettyprinting grammars. Mon Dec 16 09:39:30 MEZ 1996 Worked whole Sunday on Pretzelbook, hardly finished it. Mon Dec 16 12:06:48 MEZ 1996 Only future work and reference parts of Pretzelbook are missing. Manpages are in new format. Mon Dec 16 20:19:11 MEZ 1996 Everything ready to bundle and ship. Needs some slight package testing. Will do this tomorrow. This is 2.0f. Tue Dec 17 09:33:09 MEZ 1996 Version 2.0f is ready and available. Tue Dec 17 18:42:25 MEZ 1996 Updated WWW pages. Posted README. Tue Jul 8 21:03:08 MESZ 1997 This will be release 2.0g: New is a bug fix in output.nw proposed by Holger Uhr that allows correct cancelling of big_force format commands. Also new is the enhanced Java support for noweb (see contrib/noweb/java.latex). Bug fix in attribute_to_string function within the new Java prettyprinter. Wed Jul 9 12:30:40 MESZ 1997 Added Holger Uhr's version of java.fg (now called javahu.fg) into contrib/huhr. Updated the PretzelBook, which now is in it's second edition :-). Mon Feb 9 17:09:38 MEZ 1998 Added #define's of EXIT_SUCCESS and EXIT_FAILURE macros to all files that use them. This is due to problems by Denis Roegel in France, who seems to have an older system. This is 2.0h. Mon Feb 23 14:13:40 MEZ 1998 Started to try and get a noweb filter to use standard verbatim output if the prettyprinter fails to prettyprint code (files nowebpretzelpp.nw and pretty.nw needed a change). Also need to change the pretzel-noweb.sty too, do that tomorrow. Took up Colman Reilly's suggestion to add a ``ranlib'' to the relevant Makefiles that add stuff to the library libpretzel.a. Doing it by using ar -s. Tue Feb 24 16:33:37 MEZ 1998 Finished work on the verbatim feature of the noweb parser. This resulted in a change to the pretzel-noweb.sty, but it seems to work. This is Version 2.0i. Fri Mar 13 09:18:02 MEZ 1998 Updates manual pages to reflect changes in 2.0i, linked manpages and PretzelBook to the Pretzel Homepage (as suggested by Norman Ramsey). Sat Apr 25 10:04:58 MESZ 1998 Worked on pretzel-it script: now -d option produces the Bison .output file for a detailed analysis of the parser and its problems. Updated pretzel-it(1) manpage accordingly. Changed generated parser to do exectly one call of yyparse() which makes the semantics clearer. Added Michel Plugge's lx2l to contrib/plugge. Must add it to the pretzel-it script soon. Thu Jun 11 13:03:50 MET DST 1998 Moved development site to my ``own'' workstation (sun25.isa) now. Had to make some changes to the global Makefile. Updated WWW pages. Removed a bug introduced on April 25 which caused segmentation faults in prettyjava (replaced ``.'' by ``->'' in fgparse.nw). Thanks to David Wilson for the hint. This is 2.0j. Adjusted the distribution to suit debian standards as proposed by Anthony Towns. Added his GCL prettyprinter to contrib/aj. Places where the version number appear: README, pretzel-it.1, pretzel.1, Makefile. This is 2.0k. Thu Dec 3 12:19:27 MET 1998 Switched to new Linux machine pcd1. There are two seperate versions of the unpacked Pretzel distribution: one on the web server for surfing (which possibly is old), and one in my home (which is the primary version). Fixed a bootstrapping problem: making the first pascalpp prettyprinter in languages/pascal didn't work because it couldn't find pretzel-it and pretzel (weren't installed at that point). Fixed it through explicitly changing paths. Jason Alexander is trying to use Pretzel under Win95/NT. Because he doesn't have noweb I tangled all files and packed them together to form Version 2.0l This is not an official one. That's why I didn't change documentation. Wed Dec 16 12:16:40 MET 1998 It took me 8 hours to find the source of some peculiar misbehaviour (but I found it!). While experimenting with a Perl prettyprinter which mainly left the noweb verbatim output untouched, I discovered that newline command sequences vanished from behind chunks. This was due to my use of the strtok() function from string.h: this function cannot handle empty fields. Used strsep instead. Quote from strsep(3): The strsep() function was introduced as a replacement for strtok(), since the latter cannot handle empty fields. (However, strtok() conforms to ANSI-C and hence is more portable.) Had to recode the output loop in contrib/noweb/general/nowebpretzelpp.nw and introduced some wierd control structure which depends on shortcut expression evaluation. This is Version 2.0m