Skip to content

Latest commit

 

History

History
54 lines (31 loc) · 1.27 KB

问题.md

File metadata and controls

54 lines (31 loc) · 1.27 KB

##问题

非关键字 "//"[^\n]* { /* consume //-comment */ }

{L}({L}|{D})* { count(); return(check_type()); }

0[xX]{H}+{IS}? { count(); return(CONSTANT); } 0[0-7]{IS}? { count(); return(CONSTANT); } [1-9]{D}{IS}? { count(); return(CONSTANT); } L?'(\.|[^\\'\n])+' { count(); return(CONSTANT); }

{D}+{E}{FS}? { count(); return(CONSTANT); } {D}"."{D}+{E}?{FS}? { count(); return(CONSTANT); } {D}+"."{D}{E}?{FS}? { count(); return(CONSTANT); } 0[xX]{H}+{P}{FS}? { count(); return(CONSTANT); } 0[xX]{H}"."{H}+{P}?{FS}? { count(); return(CONSTANT); } 0[xX]{H}+"."{H}{P}?{FS}? { count(); return(CONSTANT); }

L?"(\.|[^\\"\n])" { count(); return(STRING_LITERAL); } [ \t\v\n\f] { count(); } . { / Add code to complain about unmatched characters */ }

----------------------------分切线----------------------------

卡壳 已解决 问题定位:求闭包没有考虑环

0[0-7]{IS}? { count(); return(CONSTANT); } 转dfa时 [1-9]{D}{IS}? { count(); return(CONSTANT); } 转dfa时

dfa 结束状态数不对劲 关键字和非关键字冲突; {L}({L}|{D})* { count(); return(check_type()); } "_Bool" { count(); return(BOOL); } 这个时候怎么办?

其他运行结果不正确 好像!都是在转dfa时

##一些注意点 ø 转int后 为195

/r/n的问题