HISTORY.TXT   --- PRECCX ---

ver 2.01 May 1992
    First usable version of the inherited attribute compiler compiler.

    '$!' serves as 'EOL-execute-pull new line' , and '$' is just
    `EOL-pull new line' without any execution, permitting backtracking across
    it. `!' on its own just disables backtracking.

ver 2.02 May 1992
    Allowed line continuations when the NEXT line begins with an
    '@", as well as when the current line ends with an '\'.

    So @ ....            @ .... \
       @ .... instead of   .... \ (the latter still works, though).
       @ ....              ....


ver 2.1  May 1992 (Moved to RCS version control).
    I replaced the P_STOP delimiters for arguments in parser-calls
    with a proper preceding count in a char. This saves a few bytes per call.

ver 2.2  May 1992
    Corrected the lexer to be compatible with lex-lexers. It should return
    0 for fail and a token otherwise. Showed up some C 'gets' gotchas
    which I had to allow for under DOS. The 0 return is caught by $! and $.

    And I finally got the backtrack-over-cut detection right!

ver 2.21 June 1992
    Further enhancements for lex-lexer compatibility. Yylval, yylloc, yylen,
    as well as yytchar are now all supported. Lexers must write the synthetic
    attribute for a token into yylval (a parallel stack has been introduced)
    instead of relying on pre-cc to do it right.

    The beginnings of flying program optimization are installed, with more
    to come. Set optimize=0 to turn internal program optimization off.

    Installed dynamic memory allocation for internal stacks in the hope
    of getting more C stack space in DOS. Some success.

    Fixed bugs introduced by the new lexer semantics. 2.2 should never
    have been registered as it was. Now the default lexer uses its own
    character buffer instead of borrowing the token buffer.

    Introduced the *n parser construct (exactly n times) and support for
    it in the kernel routines.

ver 2_22 : Sun Jul 12 17:11:03 1992

    Making stack allocation user definable. Use STACKSIZE, C_STACKSIZE,
    READBUFFERSIZE, FRAMEBUFFERSIZE in the main module.

    Final lexer fixes.

ver 2_23 : Sat Jul 25 21:39:54 1992

    Going back to ANSI code for MSDOS from Turbo-C.

    The optimization default has been turned to off (because the expected
    deficiency finally surfaced, and this will be fixed eventually - I
    have to include the instruction cache in the saved frame).

ver 2_30 : Mon Aug 24 14:30:32 1992

    Changes to source code for better portability. Changed to SUCCESS=1
    for forward compatibility with monad model, hence the new release
    numbering (the old libraries won't work with the new code). Made the
    output code simpler for dead C compilers to understand.

    Various internal improvements to the library code, and introduced
    p_starparse0n(), for the monad `a\x b' construct (not fully functional).
    Removed the decorative `a[b]' syntax.
    
    Corrected a bug in some0n() and another in the push macro
    which meant that changes in MAXPROGRAMSIZE weren't seen by ccx.h.

    I introduced globals to contain all the user-definable numbers, just
    in case they need to change dynamically in future. The struct precc_data
    contains them all.

ver 2_31 : Mon Mar 19 1993
 
    Various minor internal changes for compatibility and better
    program comprehensability.

ver 2_32 : August 1993
 
    ditto.

ver 2_40 : Apr 25 1993

    Implemented the `a\x b' syntax correctly at last. Various cleanups
    of the precc.y script to support this, particularly in the management
    of local environments (which really should be handled as inherited
    parameters, but aren't, for bootstrap reasons).

    Corrected a bug in the implementation of `!' which prevented
    recognition of many backtrack errors through it.

    Split the precc.y script into three: precc.y, lex.y, c.y .

    Introduced the `!{foo}' construct, which causes reentry at parser
    foo in case of a backtrack error through that point.

    The buffer-sizes in the precc utility itself can now be set on
    the command line, as well as by C macros in clients.

    patch: August 1994. Altered sources to reduce compiler warnings.
    Mended a bug in findbrkt which meant that strings and quotes were
    not recognized in parser args. Made #line N "source" directives
    appear in emitted code.

ver 2_41 beta: august 1994. 
    Moved synthetic attribute construction into the compile stage.
    The C stack is now being used for attribute passing, and C is looking
    after the frame shifts, not precc. Synthesized attributes can now
    be passed as inherited parameters at parse time. The old attribute
    stack has been discarded (STACKSIZE=0 by default) and call_mode is
    obsolete.  Optimization also obsolete because shifting handled by C.

    Synthetic attributes should be constructed within @...@ .
    E.g foo = bar gum @hum@ . I added encryption to get around the problem 
    that naked zeros couldn't be constructed before. Now there is no
    restriction and I think the encryption is invisible.

    Named synthetic attributes should be dereferenced using the $foo
    syntax:    bar = gum\foo {: print($foo); :} . This does a cast.

    The old $1 $2 syntax is supported, but only if you use the -old
    switch to precc, and the generated code is horrible. It should still
    be more robust than before, however. The $0 reference is DISALLOWED
    now. $$ is now meaningless and should be replaced with $1, if at all.
    Actions cannot make changes to these variables any longer.

    Further cleanup in the bit of preccx.y I couldn't understand before.

    Fixed: a huge bug that has been there forever. The read buffer is
    now always flushed on _successfully_ passing a cut mark
    (!). It wasn't, with resulting overflows, before. The buffer is now
    also being watched for overflow. Cleaned up pstr/maxp/buffer code.

    Removed: #line N directives from emitted code. Too confusing!

ver 2.42 September 1994. Minor code changes to pass ansi lint and manual
    text cleanups. Code is now clean if -w-pro flag is set to avoid
    warnings about "function used with no prototype". This only happens
    because I use foo(); instead of foo(void); style declarations.

    Decided on {: :} and {@ @} syntax for actions and attributes
    respectively, but it is not strictly enforced yet and a little
    inefficient unless C compiler optimization is used.  Fixed a
    specification script error which wasn't allowing trailing or leading
    white space within {@ @}.

ver 2.43 February 1995. Type safe. And now takes any types as synthetic
    attributes (VALUE), and probably any as inherited attributes
    (PARAM).  VALUE has to be a multiple of PARAM still.  You do have to
    recompile the library when changing VALUE.  The generated code
    distinguishes VALUEs but treats them as an array of PARAM, so I
    suppose the code might fail on a machine where argument lists are
    not contiguous (AIX?).

    Fixed a bug - errors occurring before the = sign were being
    reflected to stdout instead of stderr.

    Made {: :} and {@ @} enforced and hence enabled the interiors to be
    scanned real securely, since I no longer have to analyse it as a C
    code structure but can treat it as a pure lexical sequence.  Was
    able to leave the older syntaxes and analyses too, thanks to
    backtracking, so this is all backward compatible.

    Added yywrap() lex compatibility.  Return 1 to get the parser to
    retry after failure. The default yywrap() does that for you.

    Trying to preserve newlines in embedded C code. Think it's OK.

    Altered [A] and A* and A+ to return the attribute of the last
    occurrence of A to succeed. It wasn't defined before.

    Eliminated the only floating point operation I could find - in the
    title display! - and checked that the dos code compiles without a
    floating point library. That elimates an obscure compile
    difficulty some people reported.

    Bugfix: the command line options for memory resizing in precc itself
    weren't quite being seen at the right time, which meant that resizing
    upwards wasn't seen. It all works now. It only affected precc, not
    clients. Sorry.

    Bugfix: allowed more whitespace in guard conditions and predicates.

    Bugfix: allowed $-variables in literals and anti-literals. Sorry.
    (it seemed you had to use naked references before).

    Fixed a machine dependency that made HP machines unable to transfer
    synthetic variables into actions. The stack direction is now sensed.

    Featurefix: "!" seemed to eat a newline if it landed on one. Now not.

    Bugfix: was minor malformation in code produced by -old.

ver 2.44 June 1996. Public release. Autoconf'ed?

ver 2.45b June 1998. Put frames back on call stack. Too much trouble
    to have them anywhere else. I don't believe in MSDOS! They were
    only on a separate stack so msdos could keep them out of its puny
    64K segment. -f removed.

    Making parse failures do longjmps to the previous branchpoint,
    instead of returning one step at a time via the call stack.
    Marginally faster and better branching control.  The longjmp targets
    go on the call stack too, so we stack-hop down now.  This is an
    implementation of try/catch in C.

    Partial bugfix: Implemented ){...}( or {) .. (} for safe C parses in
    tests.

ver 2.45c August 1998. 
    Packed all globals into a single struct and pass it to all
    functions, including the parsers, as "self". This is an OO
    version.

    Added :{ ... }:  and @{ ... }@ alternative syntax with safe parsing
    of interior.

ver 2.45d Sept 1998
    Tried simplyfing makefiles for execution on aix and such empy headed
    systems.
    
    Bugfix:  fixed bug in *n constructs (since 2.43 at least). 
    A counter in p_iter0n() was static when should have been
    automatic. The result was that it acted like *1 usually. Thanks to
    <Wouter.Fovel@mips.be>.

ver 2.45e Oct 1998
    More makefile fixes. Portability fixes.

ver 2.45f Dec 1998
    More makefile fixes.

ver 2.45g Dec 1998
    pstr/maxp/pc backwards compatibility added - hope pc/lineno not broken.
    Regularized type decls for easier coding in c++. Still compiles,
    but doesn't link in c++. Getting closer. Adding extern "C"s.

ver 2.45h Dec 1998
    Now compiles and links under g++. Passes all tests with g++ instead of
    gcc as compiler.    

ver 2.45i Dec 1998
    More improvements under g++. BUGFIX: predicates weren't testing
    a token when there were more than 7 implicit env args - that's
    the (p(x,y,z)) syntax. Also change to take token as first arg
    to predicate, not last (no  diff for zero args, the usual case).

ver 2.45j Jan 1999
    Makefile fixes for install-doc and install-inc. BUGFIX: yylex
    was jumping some backslashes wrongly when virtual buffer not
    equal to real line.  Side-effect: we lose the automatic
    allow-escape-of-eol in the default lexer (too complicated with
    double buffering). Thanks to dmg@csg.uwaterloo.ca.
    Test0 seems to go bad with jump returns.  WORKAROUND: Compile with
    -DDO_NOT_USE_JUMPS. Make default for now?

ver 2.45k Jan 1999
    Makefile fixes. Moved examples dir into src and do the build for
    it in build.

ver 2.50 Jan 1999
    release. Doc updates.

