随笔分类 - 编译原理
摘要:Exercises for Section 2.2 2.2.1 Consider the context-free grammar: S → S S + | S S * | a Show how the string aa+a* can be generated by this grammar. C
阅读全文
摘要:一、无符号整数的文法 num → 0 | S S → TE // S 表示以[1-9]开头的 任意长度的字符串, 也就是无符号整数啦。 E → DE | ε // E表示任意长度数字串或空串 D → T | 0 // D表示[0-9]的终结符 T → 1 | … | 9 // T表示[1-9]的终结
阅读全文

浙公网安备 33010602011771号