正在加载图片...
Regular Expressions (cont.) We may remove parentheses by using precedence rules. 一米 highest -concatenation next -1 lowest ·ab*lc means (a(b))(c) 。EX: -∑={0,1} -01=>{0,1} -(011)011)=>{00,01,10,11} -0*=>{ε,0,00,000,0000…} -(01)*=>all strings with 0 and 1,including the empty string CS308 Compiler Theory 10Regular Expressions (cont.) • We may remove parentheses by using precedence rules. – * highest – concatenation next – | lowest • ab *|c means (a(b) *)|(c) • Ex: – Σ = {0,1} – 0|1 => {0,1} – (0|1)(0|1) => {00,01,10,11} – 0* – 0 => { ε ,0 00 000 0000 } 0,00,000,0000,.... } – (0|1)* => all strings with 0 and 1, including the empty string CS308 Compiler Theory 10
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有