- 博客(4)
- 收藏
- 关注
原创 input module of lexical analyzer in lcc
[input sub-module of lexical analyzer]. requirement > speed, as fast as possible > there is rarely a limit on line length, i.e, line length can be aribitrary > extract tokens of C language definition. techniqual implementation tips > read input cha
2011-03-07 15:35:00 430
原创 lexical scanner of number token in lcc
<br />. how to recognize integer constant<br /> (1) get the value from literal string & check overflow<br /> > integer in hex<br /> int d = 0;<br /> while(*++rcp) {<br /> if (map[*rcp] & DIGIT) {<br /> d = *rcp - '0';<br /
2011-03-07 15:33:00 354
原创 lexical scanner of string literal token in lcc
1. string literals in c language > "hello world" // ok > L"hello world" // ok (wide character for representing chinese, japanese) > "i " "love " "you" // ok, apply string concetation > "i " "love " "you"
2011-03-05 23:34:00 548
原创 C programming language BNF definition
<br /><br />translation-unit:<br />external-declaration<br />translation-unit external-declaration<br />external-declaration:<br />function-definition<br />declaration<br />function-definition:<br />declaration-specifiersopt declaratordeclaration-listopt
2011-03-01 00:15:00 682
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人