Computer Science ›› 2012, Vol. 39 ›› Issue (Z11): 276-279.
Previous Articles Next Articles
Online:
Published:
Abstract: Expression is a basic unit of a program. There will be side effect while using increasing operator or decreasing operator in an expression or in a function call. If there is side effect in a program,the result of a program will be abnormal, even more, the computer system will be breakdown. In this paper, the reasons that cause the side effect in an expression arc analyzed and the lexical rule and attributed grammar that can detect the side effect in expression or in a function call are provided. By using the lexical analyzer that generated form the lexical rule and the parser analyzer generated from the attributed grammar, the expressions and function calls that contain side effect can be detected.
Key words: Side effect of an expression, Side effect of function call, Lexical rule, Attributed grammar
0 / / Recommend
Add to citation manager EndNote|Reference Manager|ProCite|BibTeX|RefWorks
URL: https://www.jsjkx.com/EN/
https://www.jsjkx.com/EN/Y2012/V39/IZ11/276
Cited