首页>
外国专利>
Method and apparatus for efficient evaluation of semantic attributes in LALR parsing
Method and apparatus for efficient evaluation of semantic attributes in LALR parsing
展开▼
机译:在LALR解析中有效评估语义属性的方法和装置
展开▼
页面导航
摘要
著录项
相似文献
摘要
A method and apparatus for compiling source code that pre- evaluates certain semantic attributes during syntactical analysis. The invention performs certain type of semantic analysis, such as checking semantic attributes, during the operation of the syntactical analyzer, while the parse tree is being built, instead of waiting to perform these checks in a separate pass through the parse tree during semantic analysis. The present invention modifies the format of nodes in the parse tree to include fields for semantic attributes and modifies the actions associated with grammar productions so that they create parse tree nodes of the correct format. In addition, the present invention includes semantic attribute routines that determine the attribute values to store in the parse tree for the various semantic attributes.
展开▼