On the modification of the formal grammar at parse time
暂无分享,去创建一个
This article describes a new approach to th e syntactical and semantic analysis of formal languages . Rather than burdening grammar rules with semanti c conditions, this new approach allows for the dynami c incorporation of new rules at reduction moments . Inherited and synthesized attributes may for m terminals or nonterminals in these dynamic rules . Wit h this type of grammar, analysis of a particular progra m can be viewed as a process in which the program changes the 'static' grammar definition in order to adjust the grammar to the program itself .
[1] William A. Barrett,et al. Compiler Construction: Theory and Practice , 1979 .
[2] Alfred V. Aho,et al. Compilers: Principles, Techniques, and Tools , 1986, Addison-Wesley series in computer science / World student series edition.