📄 flex.1
字号:
6984 V(gone)195 1440 A1664(ahead)S1928(and)S2102(set)S2243(up)S10 I2372(yyin)S10 R2569(to)S2676(point)S2911(to)S3018(another)S(input)206 3350 A3586(\256le,)S3770(and)S3945(scanning)S4332(continues.)S4797(If)S4895(it)S4981(returns)S7104 V1440(true)S(\(non-zero\),)451 1622 A2098(then)S2296(the)S2444(scanner)S2777(terminates,)S3247(returning)S3641(0)S3716(to)S3819(its)S3939(caller.)S7272 V1440(The)S1646(default)S10 B1975(yywrap\(\))S10 R2416(always)S2745(returns)S3074(1.)S3223(Presently,)S3672(to)S3799(redefine)S4179(it)S(you)150 4284 A4483(must)S4728(first)S("#undef)320 4941 A7392 V1440(yywrap",)S1845(as)S1966(it)S2059(is)S2163(currently)S2564(implemented)S3126(as)S3247(a)S3329(macro.)S3667(It)S3765(is)S3868(likely)S4133(that)S10 B4320(yywrap\(\))S10 R(will)157 4748 A(soon)189 4941 A5166(be)S7512 V1440(defined)S1767(to)S1870(be)S1990(a)S2060(function)S2420(rather)S2681(than)S2879(a)S2949(macro.)S7903 V720(Page)S941(5)S2681(\()S2723(26)S2848(May)S(1990)200 3057 A3265(\))S4455(September)S4911(13,)S(1996)200 5061 A8143 VEP%%Page: 6 6BP/slant 0 def/height 0 def480 V10 R720(FLEX)S981(\()S1023(1)S1081(\))S2756(Version)S3100(2.3)S4866(FLEX)S5127(\()S5169(1)S5227(\))S960 V1080(-)S1440(YY_USER_ACTION)S2354(can)S2522(be)S2645(rede\256ned)S3049(to)S3156(provide)S3492(an)S3616(action)S3891(which)S4166(is)S4262(always)S4571(executed)S4958(prior)S5183(to)S1080 V1440(the)S1588(matched)S1954(rule's)S2209(action.)S1248 V1080(-)S1440(The)S1624(macro)S10 B1903(YY_USER_INIT)S10 R2663(may)S2863(be)S2985(rede\256ned)S3388(to)S3494(provide)S3829(an)S3952(action)S4226(which)S4500(is)S4595(always)S4903(executed)S1368 V1440(before)S1723(the)S1871(\256rst)S2053(scan.)S1536 V1080(-)S1440(In)S1573(the)S1745(generated)S2186(scanner,)S2568(the)S2740(actions)S3074(are)S3247(all)S3397(gathered)S3793(in)S3920(one)S4115(large)S4367(switch)S4680(statement)S5116(and)S1656 V1440(separated)S1852(using)S10 B2100(YY_BREAK,)S10 R2710(which)S2987(may)S3191(be)S3317(rede\256ned.)S3773(By)S3921(default,)S4257(it)S4344(is)S4442(simply)S4746(a)S4822("break",)S5183(to)S1776 V1440(separate)S(each)185 1796 A2006(rule's)S2261(action)S2532(from)S2753(the)S2901(following)S3317(rule's.)S1944 V9 R720(F)S722(FI)S774(IL)S807(LE)S865(ES)S923(S)S2064 V10 I1080(flex.skel)S10 R1440(skeleton)S1800(scanner.)S2232 V10 I1080(lex.yy.c)S10 R1440(generated)S1857(scanner)S2190(\(called)S10 I(lexyy.c)278 2490 A10 R2793(on)S2918(some)S3155(systems\).)S2400 V10 I1080(lex.backtrack)S2520 V10 R1440(backtracking)S1985(information)S2485(for)S10 B2628(-b)S10 R2743(\257ag)S2919(\(called)S10 I3219(lex.bck)S10 R3527(on)S3652(some)S3889(systems\).)S2688 V10 B1080(-lfl)S10 R1440(library)S1734(with)S1938(which)S2209(to)S2312(link)S2493(the)S2641(scanners.)S2856 V9 R720(S)S722(SE)S774(EE)S832(E)S913(A)S915(AL)S983(LS)S1041(SO)S1093(O)S2976 V10 R(\257exdoc\(1\),)439 1080 A1544(lex\(1\),)S(yacc\(1\),)328 1835 A2188(sed\(1\),)S2490(awk\(1\).)S3144 V1080(M.)S1219(E.)S1331(Lesk)S1552(and)S1722(E.)S1834(Schmidt,)S10 I2219(LEX)S2424(-)S2483(Lexical)S2805(Analyzer)S3188(Generator)S3312 V9 R720(D)S722(DI)S790(IA)S823(AG)S891(GN)S959(NO)S1027(OS)S1095(ST)S1147(TI)S1205(IC)S1238(CS)S1300(S)S3432 V10 I(reject_used_but_not_detected)1206 1080 A(unde\256ned)390 2311 A10 R2726(or)S3600 V10 I(yymore_used_but_not_detected)1273 1080 A(unde\256ned)390 2381 A2799(-)S10 R2861(These)S3130(errors)S3394(can)S3562(occur)S3814(at)S3915(compile)S4268(time.)S4526(They)S4762(indicate)S5110(that)S3720 V1080(the)S1231(scanner)S1567(uses)S10 B1768(REJECT)S10 R2193(or)S10 B2305(yymore\(\))S10 R2725(but)S2881(that)S10 I3060(\257ex)S10 R3228(failed)S3486(to)S3592(notice)S3865(the)S4015(fact,)S4219(meaning)S4592(that)S10 I4770(\257ex)S10 R4937(scanned)S3840 V1080(the)S1232(\256rst)S1418(two)S1598(sections)S(looking)306 1951 A2286(for)S2433(occurrences)S2944(of)S3057(these)S3294(actions)S3609(and)S3784(failed)S4044(to)S4152(\256nd)S4338(any,)S4538(but)S4696(somehow)S(you)150 5111 A3960 V1080(snuck)S1346(some)S1590(in)S1699(\(via)S1887(a)S1963(#include)S2340(\256le,)S2525(for)S2674(example\).)S3130(Make)S3390(an)S3516(explicit)S3849(reference)S4257(to)S4366(the)S4520(action)S4797(in)S(your)184 4906 A10 I5121(\257ex)S4080 V10 R(input)206 1080 A1323(\256le.)S1539(\(Note)S1806(that)S1994(previously)S10 I2455(\257ex)S10 R(supported)396 2632 A3065(a)S10 B(%used/%unused)732 3147 A10 R3916(mechanism)S4411(for)S4566(dealing)S4899(with)S5116(this)S4200 V1080(problem;)S1480(this)S1662(feature)S1980(is)S(still)151 2084 A(supported)396 2271 A2703(but)S2867(now)S(deprecated,)462 3076 A3574(and)S(will)157 3755 A3948(go)S4084(away)S(soon)189 4333 A4558(unless)S4845(the)S5004(author)S4320 V1080(hears)S1318(from)S1539(people)S1832(who)S2030(can)S2195(argue)S(compellingly)530 2444 A2999(that)S3175(they)S3373(need)S3588(it.\))S4488 V10 I1080(\257ex)S(scanner)318 1268 A1634(jammed)S2001(-)S10 R2083(a)S2176(scanner)S2532(compiled)S2954(with)S10 B3181(-s)S10 R3302(has)S(encountered)492 3484 A4024(an)S(input)206 4167 A4421(string)S4698(which)S4992(wasn't)S4608 V1080(matched)S1446(by)S1571(any)S1741(of)S1850(its)S1970(rules.)S4776 V10 I1080(\257ex)S(input)206 1256 A1498(buffer)S1774(over\257owed)S2251(-)S10 R2321(a)S2402(scanner)S2746(rule)S2939(matched)S3316(a)S3397(string)S(long)178 3663 A(enough)295 3878 A4210(to)S4325(over\257ow)S4720(the)S4880(scanner's)S4896 V1080(internal)S(input)206 1413 A1644(buffer)S1916(\(16K)S2148(bytes)S2385(-)S2444(controlled)S2877(by)S10 B3002(YY_BUF_MAX)S10 R3716(in)S3819("\257ex.skel"\).)S5064 V10 I(scanner)318 1080 A1426(requires)S1789(-8)S(\257ag)150 1901 A2080(-)S10 R2143(Your)S2379(scanner)S2716(speci\256cation)S3254(includes)S(recognizing)475 3618 A4122(8-bit)S4341(characters)S4780(and)S(you)150 4954 A5133(did)S5184 V1080(not)S1233(specify)S1549(the)S1697(-8)S1806(\257ag)S1982(\(and)S(your)184 2186 A2395(site)S2560(has)S2719(not)S2872(installed)S3238(\257ex)S3414(with)S3618(-8)S3727(as)S3836(the)S3984(default\).)S5352 V10 I1080(fatal)S1290(\257ex)S(scanner)318 1456 A1801(internal)S2146(error--end)S2598(of)S2703(buffer)S2970(missed)S3271(-)S10 R3332(This)S3538(can)S3705(occur)S3956(in)S4061(an)S4183(scanner)S4518(which)S4791(is)S4885(reentered)S5472 V1080(after)S1312(a)S(long-jump)418 1403 A1867(has)S2047(jumped)S2394(out)S2568(\(or)S2732(over\))S2991(the)S3160(scanner's)S3587(activation)S4030(frame.)S4362(Before)S4683(reentering)S5138(the)S5592 V1080(scanner,)S1438(use:)S5832 V1180(yyrestart\()S1592(yyin)S1795(\);)S6120 V10 I1080(too)S1238(many)S1486(%t)S1628(classes!)S1977(-)S10 R2041(You)S2244(managed)S2637(to)S2745(put)S2903(every)S3157(single)S3427(character)S3828(into)S4015(its)S4141(own)S4345(%t)S4488(class.)S10 I4765(\257ex)S10 R4936(requires)S6240 V1080(that)S1256(at)S1354(least)S1564(one)S1734(of)S1843(the)S1991(classes)S2296(share)S2534(characters.)S6408 V9 R720(A)S722(AU)S790(UT)S858(TH)S916(HO)S984(OR)S1052(R)S6528 V10 R1080(Vern)S1312(Paxson,)S1657(with)S1867(the)S2021(help)S2225(of)S2340(many)S2594(ideas)S2832(and)S3008(much)S3262(inspiration)S3723(from)S3950(Van)S4149(Jacobson.)S4598(Original)S4965(version)S6648 V1080(by)S1205(Jef)S1348(Poskanzer.)S6816 V1080(See)S(\257exdoc\(1\))414 1251 A1690(for)S(additional)402 1833 A2260(credits)S2554(and)S2724(the)S2872(address)S3199(to)S3302(send)S3511(comments)S3949(to.)S6984 V9 R720(D)S722(DE)S790(EF)S848(FI)S900(IC)S933(CI)S995(IE)S1028(EN)S1086(NC)S1154(CI)S1216(IE)S1249(ES)S1307(S)S1397(/)S1399(/)S1464(B)S1466(BU)S1528(UG)S1596(GS)S1664(S)S7104 V10 R1080(Some)S(trailing)291 1382 A1746(context)S2115(patterns)S(cannot)268 2507 A2848(be)S3016(properly)S3430(matched)S3844(and)S4062(generate)S4477(warning)S4881(messages)S7224 V1080(\("Dangerous)S(trailing)291 1617 A1934(context"\).)S2381(These)S2648(are)S2798(patterns)S3143(where)S3416(the)S3565(ending)S3864(of)S3974(the)S4123(\256rst)S4306(part)S4489(of)S4599(the)S4748(rule)S4931(matches)S7344 V1080(the)S1230(beginning)S1658(of)S1769(the)S(second)279 1920 A2227(part,)S2437(such)S2649(as)S("zx*/xy*",)430 2761 A3219(where)S3494(the)S3645('x*')S3841(matches)S4199(the)S4350('x')S4496(at)S4597(the)S4748(beginning)S5177(of)S7464 V1080(the)S(trailing)291 1252 A1592(context.)S1987(\(Note)S2266(that)S2466(the)S2638(POSIX)S2978(draft)S3217(states)S3489(that)S3688(the)S3859(text)S4058(matched)S4447(by)S4595(such)S4827(patterns)S5194(is)S7903 V720(September)S1176(13,)S(1996)200 1326 A2681(\()S2723(26)S2848(May)S(1990)200 3057 A3265(\))S4990(Page)S5211(6)S8143 VEP%%Page: 7 7BP/slant 0 def/height 0 def480 V10 R720(FLEX)S981(\()S1023(1)S1081(\))S2756(Version)S3100(2.3)S4866(FLEX)S5127(\()S5169(1)S5227(\))S960 V(unde\256ned.\))455 1080 A1128 V1080(For)S1250(some)S(trailing)291 1492 A1813(context)S2139(rules,)S2391(parts)S2618(which)S2895(are)S3050(actually)S3400(\256xed-length)S3917(are)S4072(not)S(recognized)442 4231 A4704(as)S4819(such,)S5059(lead-)S1248 V1080(ing)S1235(to)S1340(the)S(abovementioned)664 1490 A2181(performance)S2718(loss.)S2951(In)S3062(particular,)S3500(parts)S3722(using)S3965('|')S4079(or)S4189({n})S4361(\(such)S4605(as)S4715("foo{3}"\))S5137(are)S1368 V1080(always)S1385(considered)S1846(variable-length.)S1536 V1080(Combining)S(trailing)291 1566 A1892(context)S2223(with)S2437(the)S2595(special)S2910('|')S3033(action)S3314(can)S3489(result)S3748(in)S10 I3861(\256xed)S10 R(trailing)291 4086 A4413(context)S4745(being)S5004(turned)S1656 V1080(into)S1261(the)S1409(more)S1641(expensive)S10 I2068(variable)S10 R(trailing)291 2428 A2744(context.)S3115(For)S3280(example,)S3671(this)S3841(happens)S4195(in)S4298(the)S4446(following)S4862(example:)S1896 V1180(%%)S2016 V1180(abc)S1470(|)S2136 V1180(xyz/def)S2424 V1080(Use)S1262(of)S(unput\(\))296 1371 A1692(invalidates)S2153(yytext)S2429(and)S2599(yyleng.)S2592 V1080(Use)S1265(of)S(unput\(\))296 1377 A1701(to)S1807(push)S2024(back)S2242(more)S2477(text)S2657(than)S2859(was)S3045(matched)S3415(can)S3584(result)S3837(in)S3944(the)S4096(pushed-back)S4633(text)S4813(matching)S5216(a)S2712 V1080(beginning-of-line)S(\('\303'\))170 1809 A2004(rule)S2186(even)S(though)278 2401 A2704(it)S2785(didn't)S3050(come)S3293(at)S3391(the)S3539(beginning)S3965(of)S4074(the)S4222(line)S(\(though)312 4398 A4735(this)S4905(is)S4997(rare!\).)S2880 V1080(Pattern-matching)S1799(of)S1908(NUL's)S2214(is)S2306(substantially)S2839(slower)S3133(than)S3331(matching)S3730(other)S3962(characters.)S3048 V10 I1080(\257ex)S10 R1256(does)S1476(not)S1640(generate)S2018(correct)S2335(#line)S2572(directives)S3000(for)S3154(code)S3380(internal)S3724(to)S3838(the)S3997(scanner;)S4369(thus,)S(bugs)189 4598 A4824(in)S10 I4939(\257ex.skel)S3168 V10 R1080(yield)S(bogus)239 1306 A1570(line)S1746(numbers.)S3336 V1080(Due)S1274(to)S1379(both)S1584(buffering)S1986(of)S(input)206 2097 A2330(and)S2502(read-ahead,)S(you)150 2997 A(cannot)268 3174 A3469(intermix)S3837(calls)S4049(to)S4154(<stdio.h>)S4565(routines,)S4941(such)S5152(as,)S3456 V1080(for)S1223(example,)S10 B1614(getchar\(\),)S10 R2057(with)S10 I2261(\257ex)S10 R2426(rules)S2647(and)S2817(expect)S3105(it)S3186(to)S3289(work.)S3571(Call)S10 B(input\(\))298 3764 A10 R4087(instead.)S3624 V1080(The)S1272(total)S1486(table)S1717(entries)S2021(listed)S2274(by)S2410(the)S10 B2569(-v)S10 R2689(\257ag)S2876(excludes)S3264(the)S3423(number)S3766(of)S3886(table)S4118(entries)S4423(needed)S4744(to)S4858(determine)S3744 V1080(what)S1303(rule)S1487(has)S1648(been)S1865(matched.)S2283(The)S2467(number)S2800(of)S2910(entries)S3205(is)S3298(equal)S3542(to)S3646(the)S3795(number)S4128(of)S4238(DFA)S4466(states)S4716(if)S4804(the)S4953(scanner)S3864 V1080(does)S1289(not)S1442(use)S10 B1601(REJECT,)S10 R2048(and)S2218(somewhat)S2651(greater)S2957(than)S3155(the)S3303(number)S3635(of)S3744(states)S3993(if)S4080(it)S4161(does.)S4032 V10 B1080(REJECT)S10 R(cannot)268 1502 A1795(be)S1915(used)S2124(with)S2328(the)S10 I2476(-f)S10 R2563(or)S10 I2672(-F)S10 R2793(options.)S4200 V1080(Some)S1351(of)S1477(the)S1642(macros,)S2000(such)S2226(as)S10 B2353(yywrap\(\),)S10 R2813(may)S3029(in)S3150(the)S3316(future)S3600(become)S3956(functions)S4373(which)S4662(live)S4856(in)S4977(the)S10 B5143(-l\257)S4320 V10 R1080(library.)S1424(This)S(will)157 1628 A(doubtless)379 1810 A2214(break)S2463(a)S2533(lot)S2664(of)S2773(code,)S3013(but)S3166(may)S3364(be)S3484(required)S3845(for)S3988(POSIX-compliance.)S4488 V1080(The)S10 I1262(\257ex)S10 R1427(internal)S1760(algorithms)S2215(need)S2430(documentation.)S7903 V720(Page)S941(7)S2681(\()S2723(26)S2848(May)S(1990)200 3057 A3265(\))S4455(September)S4911(13,)S(1996)200 5061 A8143 VEP%%Trailer%%DocumentFonts: Times-Roman Times-Bold Times-Italic%%Pages: 7
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -