------------------------------------------------------------
This is the second part of a two part file.
This is a list of changes to pccts 1.33 prior to MR13
For more recent information see CHANGES_FROM_133.txt
------------------------------------------------------------
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.
#153. (Changed in MR12b) Bug in computation of -mrhoist suppression set
Consider the following grammar with k=1 and "-mrhoist on":
r1 : (A)? => ((p>>? x /* l1 */
| r2 /* l2 */
;
r2 : A /* l4 */
| (B)? => <<q>>? y /* l5 */
;
In earlier versions the mrhoist routine would see that both l1 and
l2 contained predicates and would assume that this prevented either
from acting to suppress the other predicate. In the example above
it didn't realize the A at line l4 is capable of suppressing the
predicate at l1 even though alt l2 contains (indirectly) a predicate.
This is fixed in MR12b.
Reported by Reinier van den Born (reinier@vnet.ibm.com)
#153. (Changed in MR12a) Bug in computation of -mrhoist suppression set
An oversight similar to that described in Item #152 appeared in
the computation of the set that "covered" a predicate. If a
predicate expression included a term such as p=AND(q,r) the context
of p was taken to be context(q) & context(r), when it should have
been context(q) | context(r). This is fixed in MR12a.
#152. (Changed in MR12) Bug in generation of predicate expressions
The primary purpose for MR12 is to make quite clear that MR11 is
obsolete and to fix the bug related to predicate expressions.
In MR10 code was added to optimize the code generated for
predicate expression tests. Unfortunately, there was a
significant oversight in the code which resulted in a bug in
the generation of code for predicate expression tests which
contained predicates combined using AND:
r0 : (r1)* "@" ;
r1 : (AAA)? => <<p LATEXT(1)>>? r2 ;
r2 : (BBB)? => <<q LATEXT(1)>>? Q
| (BBB)? => <<r LATEXT(1)>>? Q
;
In MR11 (and MR10 when using "-mrhoist on") the code generated
for r0 to predict r1 would be equivalent to:
if ( LA(1)==Q &&
(LA(1)==AAA && LA(1)==BBB) &&
( p && ( q || r )) ) {
This is incorrect because it expresses the idea that LA(1)
*must* be AAA in order to attempt r1, and *must* be BBB to
attempt r2. The result was that r1 became unreachable since
both condition can not be simultaneously true.
The general philosophy of code generation for predicates
can be summarized as follows:
a. If the context is true don't enter an alt
for which the corresponding predicate is false.
If the context is false then it is okay to enter
the alt without evaluating the predicate at all.
b. A predicate created by ORing of predicates has
context which is the OR of their individual contexts.
c. A predicate created by ANDing of predicates has
(surprise) context which is the OR of their individual
contexts.
d. Apply these rules recursively.
e. Remember rule (a)
The correct code should express the idea that *if* LA(1) is
AAA then p must be true to attempt r1, but if LA(1) is *not*
AAA then it is okay to attempt r1, provided that *if* LA(1) is
BBB then one of q or r must be true.
if ( LA(1)==Q &&
( !(LA(1)==AAA || LA(1)==BBB) ||
( ! LA(1) == AAA || p) &&
( ! LA(1) == BBB || q || r ) ) ) {
I believe this is fixed in MR12.
Reported by Reinier van den Born (reinier@vnet.ibm.com)
#151a. (Changed in MR12) ANTLRParser::getLexer()
As a result of several requests, I have added public methods to
get a pointer to the lexer belonging to a parser.
ANTLRTokenStream *ANTLRParser::getLexer() const
Returns a pointer to the lexer being used by the
parser. ANTLRTokenStream is the base class of
DLGLexer
ANTLRTokenStream *ANTLRTokenBuffer::getLexer() const
Returns a pointer to the lexer being used by the
ANTLRTokenBuffer. ANTLRTokenStream is the base
class of DLGLexer
You must manually cast the ANTLRTokenStream to your program's
lexer class. Because the name of the lexer's class is not fixed.
Thus it is impossible to incorporate it into the DLGLexerBase
class.
#151b.(Changed in MR12) ParserBlackBox member getLexer()
The template class ParserBlackBox now has a member getLexer()
which returns a pointer to the lexer.
#150. (Changed in MR12) syntaxErrCount and lexErrCount now public
See Item #127 for more information.
#149. (Changed in MR12) antlr option -info o (letter o for orphan)
If there is more than one rule which is not referenced by any
other rule then all such rules are listed. This is useful for
alerting one to rules which are not used, but which can still
contribute to ambiguity. For example:
start : a Z ;
unused: a A ;
a : (A)+ ;
will cause an ambiguity report for rule "a" which will be
difficult to understand if the user forgets about rule "unused"
simply because it is not used in the grammar.
#148. (Changed in MR11) #token names appearing in zztokens,token_tbl
In a #token statement like the following:
#token Plus "\+"
the string "Plus" appears in the zztokens array (C mode) and
token_tbl (C++ mode). This string is used in most error
messages. In MR11 one has the option of using some other string,
(e.g. "+") in those tables.
In MR11 one can write:
#token Plus ("+") "\+"
#token RP ("(") "\("
#token COM ("comment begin") "/\*"
A #token statement is allowed to appear in more than one #lexclass
with different regular expressions. However, the token name appears
only once in the zztokens/token_tbl array. This means that only
one substitute can be specified for a given #token name. The second
attempt to define a substitute name (different from the first) will
result in an error message.
#147. (Changed in MR11) Bug in follow set computation
There is a bug in 1.33 vanilla and all maintenance releases
prior to MR11 in the computation of the follow set. The bug is
different than that described in Item #82 and probably more
common. It was discovered in the ansi.g grammar while testing
the "ambiguity aid" (Item #119). The search for a bug started
when the ambiguity aid was unable to discover the actual source
of an ambiguity reported by antlr.
The problem appears when an optimization of the follow set
computation is used inappropriately. The result is that the
follow set used i
没有合适的资源?快使用搜索试试~ 我知道了~
TianoCore / EDK II
共2000个文件
c:2625个
h:2095个
inf:1037个
需积分: 5 1 下载量 64 浏览量
2021-11-02
00:15:18
上传
评论 1
收藏 18.61MB ZIP 举报
温馨提示
EDK II is a modern, feature-rich, cross-platform firmware development environment for the UEFI and UEFI Platform Initialization (PI) specifications. https://github.com/tianocore/tianocore.github.io/wiki/Getting-Started-with-EDK-II
资源推荐
资源详情
资源评论
收起资源包目录
TianoCore / EDK II (2000个子文件)
RandomNumber.c 340KB
ScsiDisk.c 200KB
ConfigRouting.c 199KB
Setup.c 198KB
ConSplitter.c 162KB
SecureBootConfigImpl.c 161KB
Database.c 160KB
Pci.c 155KB
Crypto.c 154KB
scan.c 147KB
HiiLib.c 146KB
Variable.c 139KB
UefiHandleParsingLib.c 139KB
GenFvInternalLib.c 138KB
UefiShellLib.c 138KB
gen.c 137KB
XhciSched.c 137KB
FormDisplay.c 130KB
EbcExecute.c 130KB
IScsiConfig.c 129KB
ShellProtocol.c 128KB
GenFw.c 122KB
SafeString.c 122KB
CryptLib.c 120KB
SafeIntLib.c 116KB
S3IoLib.c 114KB
PrintInfo.c 111KB
DevicePathFromText.c 110KB
UefiDriverModel.c 108KB
DevicePathFromText.c 107KB
BiosVideo.c 107KB
UefiScsiLib.c 106KB
XhciSched.c 102KB
LegacyPci.c 102KB
Font.c 101KB
ConfigKeywordHandler.c 101KB
Shell.c 100KB
Ip6Nd.c 99KB
HddPasswordDxe.c 99KB
Tcg2Dxe.c 98KB
AtaAtapiPassThru.c 97KB
Expression.c 97KB
antlr.c 96KB
SmramProfileRecord.c 95KB
AhciMode.c 94KB
DxeNetLib.c 93KB
Dhcp6Io.c 91KB
MpLib.c 91KB
IfrParse.c 90KB
AuthenticodeTests.c 89KB
Gcd.c 88KB
MtrrLib.c 88KB
PxeBcImpl.c 88KB
FileSystemOperations.c 86KB
IoHighLevel.c 86KB
IoHighLevel.c 86KB
IScsiProto.c 86KB
SdMmcPciHci.c 86KB
X86UnitTestHost.c 85KB
SdHci.c 85KB
FwVol.c 85KB
Helpers.c 84KB
DebugAgent.c 84KB
BootScriptSave.c 83KB
IdeMode.c 83KB
IoHighLevel.c 83KB
EmmcHci.c 83KB
IoHighLevel.c 83KB
BmBoot.c 83KB
DevicePathToText.c 83KB
OpalDriver.c 82KB
PciEnumeratorSupport.c 82KB
mrhoist.c 81KB
Ip4Impl.c 80KB
EmmcBlockIo.c 80KB
Presentation.c 80KB
TestBaseSafeIntLib.c 80KB
UfsPassThruHci.c 80KB
Ip6ConfigImpl.c 80KB
RedfishDiscoverDxe.c 79KB
UhcPeim.c 79KB
AuthService.c 79KB
IScsiMisc.c 77KB
FileBuffer.c 77KB
LzmaEnc.c 77KB
BasePeCoff.c 76KB
PrintLib.c 76KB
String.c 76KB
QueryTable.c 76KB
AtapiPeim.c 75KB
TcgStorageOpalCore.c 73KB
PciIo.c 71KB
FmpDxe.c 71KB
Xhci.c 71KB
DxeCorePerformanceLib.c 71KB
PxeBcDhcp6.c 71KB
PiSmmIpl.c 70KB
DriverSample.c 70KB
DxeImageVerificationLib.c 70KB
IortGenerator.c 69KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
Fast_Furious
- 粉丝: 2
- 资源: 11
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 嵌入式系统通用驱动程序接口及其实现-Spi设备驱动程序
- 高分项目基于STM32单片机的温度控制系统源代码+项目资料齐全+教程文档.zip
- 哈工大软件学院编译原理实验(Python实现)
- 基于matlab app designer设计的一个简易的数独生成与求解器源码+项目说明.zip
- 基于MATLAB实现的一个音乐播放器音乐特效处理时域与频域波形显示等源码+项目说明.zip
- 树状数组(Binary Indexed Tree,BIT)高效地处理动态的区间求和问题
- A keygen for Navicat(C++)
- navicat数据库管理工具管理数据库,执行查询、编辑数据、备份和恢复
- 期末大作业基于Matlab语言的路标识别项目资料齐全+说明文档+GUI界面+详细注释.zip
- 基于Phthon+OpenCV的组合动作常规摄像头人脸活体检测识别系统
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功