編譯課上做的小程序,用四種分析方法分別實現(LL1,算符優先,遞歸下降,簡單詞法分析)
完成對正則文法所描述的Pascal語言子集單詞符號的詞法分析程序。
<標識符>→字母︱ <標識符>字母︱ <標識符>數字
<無符號整數>→數字︱ <無符號整數>數字
<單字符分界符> →+ ︱- ︱* ︱ ︱(︱)
<雙字符分界符>→<大于>=︱<小于>=︱<小于>>︱<冒號>=︱<斜豎>*
<小于>→<
<等于>→=
<大于>→>
<冒號> →:
<斜豎> →/
識別語言的保留字 :begin end if then else for do while and or not
The standard that governs the design of avioniccomponents and systems, DO-254, is one of the mostpoorly understood but widely applicable standardsin the avionic industry. While information on thegeneral aspects of the standard is easy to obtain, thedetails of exactly how to implement the standard aresketchy. And once an entity develops a process thatachieves compliance, the details of how compliancewas achieved become part of the intellectualproperty of that entity. This white paper focuses onthe details of developing a DO-254 compliantprocess for the design of FPGAs.
The standard that governs the design of avioniccomponents and systems, DO-254, is one of the mostpoorly understood but widely applicable standardsin the avionic industry. While information on thegeneral aspects of the standard is easy to obtain, thedetails of exactly how to implement the standard aresketchy. And once an entity develops a process thatachieves compliance, the details of how compliancewas achieved become part of the intellectualproperty of that entity. This white paper focuses onthe details of developing a DO-254 compliantprocess for the design of FPGAs.
A major goal of this book is to show to make devices that are inherently reliable by design. While a lot of attention has been given to “quality improvement,” the majority of the emphasis has been placed on the processes that occur after the design of a product is complete. Design deficiencies are a significant problem, and can be exceedingly difficult to identify in the field. These types of quality problems can be addressed in the design phase with relatively little effort, and with far less expense than will be incurred later in the process. Unfortunately, there are many hardware designers and organizations that, for various reasons, do not understand the significance and expense of an unreliable design. The design methodology presented in this text is intended to address this problem.