正在加载图片...
Special Notations for Optional Constructs Optional construct are indicated by surrounding them with square brackets【…l The grammar rules for if-statements with optional else parts would be written as follows in EBNF: statement>if-stmt other if-stmt>if (exp )statement else statement I exp→0|1 stmt-sequence stmt; stmt-sequence stmt is written as stmt-sequence> stmt stmt-sequenceSpecial Notations for Optional Constructs • Optional construct are indicated by surrounding them with square brackets [...]. • The grammar rules for if-statements with optional else￾parts would be written as follows in EBNF: statement → if-stmt | other if-stmt → if ( exp ) statement [ else statement ] exp → 0 | 1 • stmt-sequence → stmt; stmt-sequence | stmt is written as • stmt-sequence → stmt [ ; stmt-sequence ]
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有