📄 history
字号:
Coco/R for C and C++
====================
Version 1.00 - Apr-13-1994
- First released version
Version 1.02 - Sep-15-1994
- Minor bug repaired in SCANNER.FRM file.
- Some bugs found in CRA.C (incorrect deterministic automata on
transitions with character sets with some elements in common; not a
complete inclusion). Algorithm corrected.
- Minor bug fixed in the CONTEXT management of CRA.C (reported by
Universidad Rafael Landivar's students).
- Minor bug repaired in State0 vector generation (thank to Jean Carlo
Solis of the Universidad Rafael Landivar for the fix).
- Improved portability in the source code and generated scanners still
further (thank to Martin Mueller of the University of New Mexico for
changes to NextStep).
- Improved internal table dump routines.
Version 1.03 - Oct-12-1994
- Fixed minor bug in SCANNER.FRM file when using MS-DOS. (O_BINARY
added to the open mode options. Thanks to L. Barrera and L. Bocalleti
of the Universidad del Valle de Guatemala for the fixes).
Version 1.04 - Jan-15-1995
- Minor bug repaired in the documentation for Cocol (the grammar for
productions had semantic actions before "=", needed only for Modula
or Pascal versions).
- Simple bug fixed in the generation of literal token generation.
- Corrected some of the .FRM files when checking the number of arguments
to the compiler.
- Corrected the management of TAB characters in reporting an error's
column number. (TAB character is assumed to be 8 characters long,
same as UNIX TAB).
Thank to Markus Klingspor of Wuerzburg University, Germany, for reporting
the bugs and his suggested corrections.
Version 1.05 - Mar-10-1995
- Corrected compiler.frm: (Included some function header definitions to
work with GNU g++, thanks to Markus Klinsgpor).
- Improved performance of the generated scanner.
- Corrected a bug in CRA.C in the CONTEXT management.
- Corrected an interesting bug in GenCompiler(), which had remained
unnoticed for so long, because it works in many DOS and UNIX
compilers (it did not work in Watcom C++ - thanks again for
discovering the problem to Markus Klingspor and his students)
Version 1.06 - Mar-29-1996
- Support provided for C++. The scanner and parser may optionally
be generated as classes. This allows you to have multiple scanners
and parsers in the same program. (Thanks to Pat Terry, Markus
Klinsgpor, and some of our students for comments, testing and for
fixing some bugs.)
- Fixed a bug in the parser's ExpectWeak function. (Thanks to Pat
Terry.)
- Special thanks to Pat Terry of Rhodes University for testing and
improvements to many of the new object classes, source code and
examples.
- Support added for customizing file extensions in the generated
parsers and scanners (CRCEXT and CRHEXT environment variables).
- Improved source debugging (-d option) on the ".atg" file.
With these new fixes, you can set breakpoints on any part of
the ".atg" file. Previous versions only supported breakpoints
on semantic actions.
Version 1.061 - Aug-27-1996
- Fixed a bug in the comments generation. (Pat Terry)
Version 1.062 - Nov-25-1996
- Fixed a bug in the expression graph construction.
Function crt.c:LinkGraph. It did not work fine when using
meaningless "(" ... ")" constructs like: ("A" "B") "C".
Thanks to Joe Armstrong <joe@erix.ericsson.se> for reporting
Version 1.07 - Oct-10-1997
- Coco/R did not report an error when using a CHARACTER SET name
in the productions.
Thanks to Barrie Stott (UK) for discovering the bug.
- Incorrect token names were generated for token strings starting
with a digit character (for example "2bOrNot2b"), or for names
that became too long.
Thanks to Soteri Panagou (RU) for reporting these bugs.
- Fixed a bug that sometimes allowed undefined character set names
to cause the system to loop
- Fix all main drivers frames (compiler.frm, cr.frm, etc.) to support
relative and absolute paths in filenames.
In the Unix version, only the "-" character is valid to supply the
command line options. /cplus2/cr_error.[hc]pp was also fixed.
All other frame files kept the same as in version 1.06.
- Improved documentation compatible with that in Pat Terry's book
"Compilers and Compiler Generators" (International Thomson,
1997, ISBN 1-85032-298-8)
Version 1.08 - Mar-31-1998
- Support for MS Visual C++ 5.0
- Support for defining variables in the command line using the
-Dvarname=value option. For example:
cocor -DCRHEXT=hxx -DCRCEXR=cxx -DCRFRAMES=..\frm taste.atg
NOTE: a simple -D without a variable means DEBUG!
- Reorganized the code to support user defined file extensions.
Version 1.09 - Aug-24-98
- Minor cosmetic changes to adapt code to allow for greater consistency with
Java version; a few minor bugs fixed in comment handling.
- Taste package slightly improved
- Fixed a bug in the scanner generator (ConvertToStates function)
- Fixed bug in use of high ASCII characters in strings
- Literal token strings of zero length no longer allowed
Version 1.10 - Oct-06-98
- Fixed elusive bug in CRA module in AddMeltSets that caused problems with
very complex scanners
- Fixed bug in CRX.C that occasionally resulted in first sets being incorrectly
initialized in parser.
- Added debugging assert macros to help detect obscure memory leaks; small
changes in CRA, COLLECT and CRT to handle this.
Version 1.11 - Nov-05-98
- Applied Ken Stout's fix to allow long file pointers
- Eliminated allowing incomplete strings within attributes and actions
- Minor improvements to documentation
Version 1.12 - Jul-09-99
- Attributes may now be demarcated by matching <. and .> or by < and >. This
extension allows for the > character to appear in an actual parameter.
- Omitting the closing .) in an action can lead to errors that are hard to
find, so the digraph (. appearing within a semantic action is now flagged as
an error (Thanks to Hans Ellenberger for this suggestion).
- Small additions to C++ interface to allow position of token to be extracted,
and text to be extracted from a known position
Version 1.13 - Sep-02-99
- Fixed minor bug in parser that caused a crash when the TOKENS section had
(illegally) supplied tokens with semantic attributes
Version 1.14 - Nov-18-99
- Improved the scanner generator (LeftContext)
- Fixed minor bug in comment handling when they were not properly sepcified
- Changed hidden token names to EOF_Sym and No_Sym to avoid name clashes
- Fixed errors in string handling with embedded quotes like 'xxx\'xxx'
- Fixed nasty bug whereby EOF_Sym sometimes went missing from AllSyncs
- Added CHR('A') as an alternative to CHR(65) in CHARACTER specification
- Improved function header generation for void functions in C version
- Better support for ANSI C compilers, WIN32 compilers and latest EGCS - for
example, function prototypes use (void) instead of (), main returns an int
and so on.
- Added /q option to support interaction with editors (for exqample QEdit)
- Most frame files changed to correspond to these changes.
- Added -q directive to provide listing output more suited to interfacing
with editors that can interrogate error messages by line, column.
Version 1.15 - Apr-30-00
- Insistence that IGNORE CASE appear first if it appears at all
- Improved the scanner generator (LeftContext No longer needed)
Version 1.16 - June-19-01
- Minor bug fixed in scanner that caused trouble with tokens of the silly form
ttt = hhh [ { hhh } ] .
- Definition of string changed as below
CHARACTERS
cntl = CHR(0)..CHR(31).
back = CHR(92) .
noQuote1 = ANY - '"' - cntl - back .
noQuote2 = ANY - "'" - cntl - back .
graphic = ANY - cntl .
TOKENS
string = '"' {noQuote1 | back graphic } '"'
| "'" {noQuote2 | back graphic } "'" .
(This may break some existing source. The effect is that \" \' and \\ in
strings are all treated as in C. Previously this was not so consistent.
=end=
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -