changes_from_133.txt
来自「SRI international 发布的OAA框架软件」· 文本 代码 · 共 1,744 行 · 第 1/5 页
TXT
1,744 行
=======================================================================
List of Implemented Fixes and Changes for Maintenance Releases of PCCTS
=======================================================================
DISCLAIMER
The software and these notes are provided "as is". They may include
typographical or technical errors and their authors disclaims all
liability of any kind or nature for damages due to error, fault,
defect, or deficiency regardless of cause. All warranties of any
kind, either express or implied, including, but not limited to, the
implied warranties of merchantability and fitness for a particular
purpose are disclaimed.
-------------------------------------------------------
Note: Items #153 to #1 are now in a separate file named
CHANGES_FROM_133_BEFORE_MR13.txt
-------------------------------------------------------
#312. (Changed in MR33) Bug caused by change #299.
In change #299 a warning message was suppressed when there was
no LT(1) in a semantic predicate and max(k,ck) was 1. The
changed caused the code which set a default predicate depth for
the semantic predicate to be left as 0 rather than set to 1.
This manifested as an error at line #1559 of mrhost.c
Reported by Peter Dulimov.
#311. (Changed in MR33) Added sorcer/lib to Makefile.
Reported by Dale Martin.
#310. (Changed in MR32) In C mode zzastPush was spelled zzastpush in one case.
Reported by Jean-Claude Durand
#309. (Changed in MR32) Renamed baseName because of VMS name conflict
Renamed baseName to pcctsBaseName to avoid library name conflict with
VMS library routine. Reported by Jean-Fran噊is PI怰ONNE.
#308. (Changed in MR32) Used "template" as name of formal in C routine
In astlib.h routine ast_scan a formal was named "template". This caused
problems when the C code was compiled with a C++ compiler. Reported by
Sabyasachi Dey.
#307. (Changed in MR31) Compiler dependent bug in function prototype generation
The code which generated function prototypes contained a bug which
was compiler/optimization dependent. Under some circumstance an
extra character would be included in portions of a function prototype.
Reported by David Cook.
#306. (Changed in MR30) Validating predicate following a token
A validating predicate which immediately followed a token match
consumed the token after the predicate rather than before. Prior
to this fix (in the following example) isValidTimeScaleValue() in
the predicate would test the text for TIMESCALE rather than for
NUMBER:
time_scale :
TIMESCALE
<<isValidTimeScaleValue(LT(1)->getText())>>?
ts:NUMBER
( us:MICROSECOND << tVal = ...>>
| ns:NANOSECOND << tVal = ... >>
)
Reported by Adalbert Perbandt.
#305. (Changed in MR30) Alternatives with guess blocks inside (...)* blocks.
In MR14 change #175 fixed a bug in the prediction expressions for guess
blocks which were of the form (alpha)? beta. Unfortunately, this
resulted in a new bug as exemplified by the example below, which computed
the first set for r as {B} rather than {B C}:
r : ( (A)? B
| C
)*
This example doesn't make any sense as A is not a prefix of B, but it
illustrates the problem. This bug did not appear for:
r : ( (A)?
| C
)*
because it does not use the (alpha)? beta form.
Item #175 fixed an asymmetry in ambiguity messages for the following
constructs which appear to have identical ambiguities (between repeating
the loop vs. exiting the loop). MR30 retains this fix, but the implementation
is slightly different.
r_star : ( (A B)? )* A ;
r_plus : ( (A B)? )+ A ;
Reported by Arpad Beszedes (beszedes inf.u-szeged.hu).
#304. (Changed in MR30) Crash when mismatch between output value counts.
For a rule such as:
r1 : r2>[i,j];
r2 >[int i, int j] : A;
If there were extra actuals for the reference to rule r2 from rule r1
there antlr would crash. This bug was introduced by change #276.
Reported by Sinan Karasu.
#303. (Changed in MR30) DLGLexerBase::replchar
DLGLexerBase::replchar and the C mode routine zzreplchar did not work
properly when the new character was 0.
Reported with fix by Philippe Laporte
#302. (Changed in MR28) Fix significant problems in initial release of MR27.
#301. (Changed in MR27) Default tab stops set to 2 spaces.
To have antlr generate true tabs rather than spaces, use "antlr -tab 0".
To generate 4 spaces per tab stop use "antlr -tab 4"
#300. (Changed in MR27)
Consider the following methods of constructing an AST from ID:
rule1!
: id:ID << #0 = #[id]; >> ;
rule2!
: id:ID << #0 = #id; >> ;
rule3
: ID ;
rule4
: id:ID << #0 = #id; >> ;
For rule_2, the AST corresponding to id would always be NULL. This
is because the user explicitly suppressed AST construction using the
"!" operator on the rule. In MR27 the use of an AST expression
such as #id overrides the "!" operator and forces construction of
the AST.
This fix does not apply to C mode ASTs when the ASTs are referenced
using numbers rather than symbols.
For C mode, this requires that the (optional) function/macro zzmk_ast
be defined. This functions copies information from an attribute into
a previously allocated AST.
Reported by Jan Langer (jan langernetz.de)
#299. (Changed in MR27) Don't warn if k=1 and semantic predicate missing LT(i)
If a semantic does not have a reference to LT(i) or (C mode LATEXT(i))
then pccts doesn't know how many lookahead tokens to use for context.
However, if max(k,ck) is 1 then there is really only one choice and
the warning is unnecessary.
#298. (Changed in MR27) Removed "register" for lastpos in dlgauto.c zzgettok
#297. (Changed in MR27) Incorrect prototypes when used with classic C
There were a number of errors in function headers when antlr was
built with compilers that do not have __STDC__ or __cplusplus set.
The functions which have variable length argument lists now use
PCCTS_USE_STDARG rather than __USE_PROTOTYPES__ to determine
whether to use stdargs or varargs.
#296. (Changed in MR27) Complex return types in rules.
The following return type was not properly handled when
unpacking a struct with containing multiple return values:
rule > [int i, IIR_Bool (IIR_Decl::*constraint)()] : ...
Instead of using "constraint", the program got lost and used
an empty string.
Reported by P.A. Wilsey.
#295. (Changed in MR27) Extra ";" following zzGUESS_DONE sometimes.
Certain constructs with guess blocks in MR23 led to extra ";"
preceding the "else" clause of an "if".
Reported by P.A. Wilsey.
#294. (Changed in MR27) Infinite loop in antlr for nested blocks
An oversight in detecting an empty alternative sometimes led
to an infinite loop in antlr when it encountered a rule with
nested blocks and guess blocks.
Reported by P.A. Wilsey.
#293. (Changed in MR27) Sorcerer optimization of _t->type()
Sorcerer generated code may contain many calls to _t->type() in a
single statement. This change introduces a temporary variable
to eliminate unnnecesary function calls.
Change implemented by Tom Molteno (tim videoscript.com).
#292. (Changed in MR27)
WARNING: Item #267 changes the signature of methods in the AST class.
**** Be sure to revise your AST functions of the same name ***
#291. (Changed in MR24)
Fix to serious code generation error in MR23 for (...)+ block.
#290. (Changed in MR23)
Item #247 describes a change in the way {...} blocks handled
an error. Consider:
r1 : {A} b ;
b : B;
with input "C".
Prior to change #247, the error would resemble "expected B -
found C". This is correct but incomplete, and therefore
misleading. In #247 it was changed to "expected A, B - found
C". This was fine, except for users of parser exception
handling because the exception was generated in the epilogue
for {...} block rather than in rule b. This made it difficult
for users of parser exception handling because B was not
expected in that context. Those not using parser exception
handling didn't notice the difference.
The current change restores the behavior prior to #247 when
parser exceptions are present, but retains the revised behavior
otherwise. This change should be visible only when exceptions
are in use and only for {...} blocks and sub-blocks of the form
(something|something | something | epsilon) where epsilon represents
an empty production and it is the last alternative of a sub-block.
In contrast, (something | epsilon | something) should generate the
same code as before, even when exceptions are used.
Reported by Philippe Laporte (philippe at transvirtual.com).
#289. (Changed in MR23) Bug in matching complement of a #tokclass
Prior to MR23 when a #tokclass was matched in both its complemented form
and uncomplemented form, the bit set generated for its first use was used
for both cases. However, the prediction expression was correctly computed
in both cases. This meant that the second case would never be matched
because, for the second appearance, the prediction expression and the
set to be matched would be complements of each other.
Consider:
#token A "a"
#token B "b"
#token C "c"
#tokclass AB {A B}
r1 : AB /* alt 1x */
| ~AB /* alt 1y */
;
Prior to MR23, this resulted in alternative 1y being unreachable. Had it
been written:
r2 : ~AB /* alt 2x */
: AB /* alt 2y */
then alternative 2y would have become unreachable.
This bug was only for the case of complemented #tokclass. For complemented
#token the proper code was generated.
#288. (Changed in MR23) #errclass not restricted to choice points
The #errclass directive is supposed to allow a programmer to define
print strings which should appear in syntax error messages as a replacement
for some combinations of tokens. For instance:
#errclass Operator {PLUS MINUS TIMES DIVIDE}
If a syntax message includes all four of these tokens, and there is no
"better" choice of error class, the word "Operator" will be used rather
than a list of the four token names.
Prior to MR23 the #errclass definitions were used only at choice points
(which call the FAIL macro). In other cases where there was no choice
(e.g. where a single token or token class were matched) the #errclass
information was not used.
With MR23 the #errclass declarations are used for syntax error messages
when matching a #tokclass, a wildcard (i.e. "*"), or the complement of a
#token or #tokclass (e.g. ~Operator).
Please note that #errclass may now be defined using #tokclass names
(see Item #284).
Reported by Philip A. Wilsey.
#287. (Changed in MR23) Print name for #tokclass
Item #148 describes how to give a print name to a #token so that,for
example, #token ID could have the expression "identifier" in syntax
error messages. This has been extended to #tokclass:
#token ID("identifier") "[a-zA-Z]+"
#tokclass Primitive("primitive type")
{INT, FLOAT, CHAR, FLOAT, DOUBLE, BOOL}
This is really a cosmetic change, since #tokclass names do not appear
in any error messages.
#286. (Changed in MR23) Makefile change to use of cd
In cases where a pccts subdirectory name matched a directory identified
in a $CDPATH environment variable the build would fail. All makefile
cd commands have been changed from "cd xyz" to "cd ./xyz" in order
to avoid this problem.
#285. (Changed in MR23) Check for null pointers in some dlg structures
An invalid regular expression can cause dlg to build an invalid
structure to represent the regular expression even while it issues
error messages. Additional pointer checks were added.
Reported by Robert Sherry.
#284. (Changed in MR23) Allow #tokclass in #errclass definitions
Previously, a #tokclass reference in the definition of an
#errclass was not handled properly. Instead of being expanded
into the set of tokens represented by the #tokclass it was
treated somewhat like an #errclass. However, in a later phase
when all #errclass were expanded into the corresponding tokens
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?