⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 flex.1

📁 操作系统设计与实现源码
💻 1
📖 第 1 页 / 共 4 页
字号:
10 R1440(instructs)S10 I1820(\257ex)S10 R1999(to)S2116(generate)S2497(an)S10 I2631(interactive)S10 R3101(scanner,)S3473(that)S3663(is,)S3794(a)S3878(scanner)S4226(which)S4512(stops)S4758(immediately)S1656 V1440(rather)S1704(than)S(looking)306 1905 A2239(ahead)S2502(if)S2592(it)S(knows)262 2676 A2966(that)S3145(the)S3296(currently)S3688(scanned)S4040(text)S(cannot)268 4219 A4515(be)S4637(part)S4821(of)S4932(a)S(longer)257 5004 A1776 V1440(rule's)S1695(match.)S2016(Again,)S2312(see)S10 B2466(\257exdoc\(1\))S10 R2911(for)S3054(details.)S1944 V1440(Note,)S10 B1686(-I)S10 R(cannot)268 1784 A2077(be)S2197(used)S2406(in)S2509(conjunction)S3008(with)S10 I3212(full)S10 R3371(or)S10 I3480(fast)S3650(tables,)S10 R3940(i.e.,)S4113(the)S10 B4261(-f,)S4379(-F,)S4525(-Cf,)S10 R4716(or)S10 B4825(-CF)S10 R5019(flags.)S2112 V10 B1080(-L)S10 R1440(instructs)S10 I1809(\257ex)S10 R1977(not)S2133(to)S2239(generate)S10 B2609(#line)S10 R2844(directives)S3264(in)S10 B3371(lex.yy.c.)S10 R3743(The)S3929(default)S4238(is)S4334(to)S4441(generate)S4812(such)S5025(direc-)S2232 V1440(tives)S1659(so)S1777(error)S2003(messages)S2412(in)S2519(the)S2671(actions)S(will)157 2985 A3171(be)S3295(correctly)S3683(located)S4002(with)S4209(respect)S4523(to)S4629(the)S4780(original)S10 I5121(\257ex)S2352 V10 R(input)206 1440 A1671(\256le,)S1850(and)S2020(not)S2173(to)S2276(the)S2424(fairly)S2668(meaningless)S3190(line)S3366(numbers)S3737(of)S10 B3846(lex.yy.c.)S2520 V1080(-T)S10 R1440(makes)S10 I1724(\257ex)S10 R1891(run)S2052(in)S10 I2157(trace)S10 R2391(mode.)S2691(It)S(will)157 2780 A2964(generate)S3333(a)S3406(lot)S3540(of)S3652(messages)S4060(to)S10 I(stdout)245 4166 A10 R4439(concerning)S4914(the)S5065(form)S2640 V1440(of)S1554(the)S(input)206 1707 A1943(and)S2117(the)S2269(resultant)S(non-deterministic)710 2645 A3384(and)S3558(deterministic)S4113(\256nite)S4349(automata.)S4797(This)S5005(option)S2760 V1440(is)S1532(mostly)S1830(for)S1973(use)S2132(in)S2235(maintaining)S10 I2740(\257ex.)S2928 V10 B1080(-8)S10 R1440(instructs)S10 I1815(\257ex)S10 R1989(to)S2101(generate)S2477(an)S2607(8-bit)S2832(scanner.)S3225(On)S3383(some)S3630(sites,)S3869(this)S4049(is)S4151(the)S4309(default.)S4674(On)S4832(others,)S5138(the)S3048 V1440(default)S1771(is)S1888(7-bit)S2128(characters.)S2638(To)S2800(see)S2979(which)S3275(is)S3392(the)S3565(case,)S3814(check)S4099(the)S4272(verbose)S10 B4635(\(-v\))S10 R4837(output)S5143(for)S3168 V1440("equivalence)S1988(classes)S2294(created".)S2703(If)S2797(the)S2946(denominator)S3480(of)S3590(the)S3739(number)S4072(shown)S4360(is)S(128,)175 4453 A4654(then)S4854(by)S4981(default)S3288 V10 I1440(\257ex)S10 R1605(is)S1697(generating)S2147(7-bit)S2362(characters.)S2847(If)S2940(it)S3021(is)S(256,)175 3113 A3313(then)S3511(the)S3659(default)S3964(is)S4056(8-bit)S4271(characters.)S3456 V10 B1080(-C[efmF])S3576 V10 R1440(controls)S1789(the)S1937(degree)S2231(of)S2340(table)S2561(compression.)S3744 V10 B1440(-Ce)S10 R1625(directs)S10 I1927(flex)S10 R2107(to)S2219(construct)S10 I2622(equivalence)S3137(classes,)S10 R3481(i.e.,)S3663(sets)S3848(of)S3966(characters)S4410(which)S4690(have)S4914(identical)S3864 V1440(lexical)S1779(properties.)S2302(Equivalence)S2870(classes)S3220(usually)S3580(give)S3823(dramatic)S4246(reductions)S4735(in)S4883(the)S5076(final)S3984 V1440(table/object)S1944(file)S2114(sizes)S2345(\(typically)S2766(a)S2846(factor)S3117(of)S3236(2-5\))S3439(and)S3619(are)S3778(pretty)S4048(cheap)S4318(performance-wise)S5082(\(one)S4104 V1440(array)S(look-up)312 1673 A2010(per)S2164(character)S2560(scanned\).)S4272 V10 B1440(-Cf)S10 R1617(specifies)S2006(that)S2193(the)S10 I2352(full)S10 R2522(scanner)S2866(tables)S(should)267 3137 A3440(be)S3571(generated)S3999(-)S10 I4069(flex)S10 R(should)267 4252 A4556(not)S4721(compress)S5138(the)S4392 V1440(tables)S1700(by)S1825(taking)S2101(advantages)S2573(of)S2682(similar)S(transition)380 2987 A3392(functions)S3791(for)S3934(different)S4307(states.)S4560 V10 B1440(-CF)S10 R1636(specifies)S2016(that)S2194(the)S2344(alternate)S2720(fast)S2894(scanner)S3230(representation)S3829(\(described)S4277(in)S10 B4383(flexdoc\(1\)\))S10 R(should)267 4871 A5166(be)S4680 V1440(used.)S4848 V10 B1440(-Cm)S10 R1662(directs)S10 I1962(flex)S10 R2139(to)S2249(construct)S10 I2650(meta-equivalence)S3393(classes,)S10 R3735(which)S4013(are)S4169(sets)S4352(of)S4468(equivalence)S4981(classes)S4968 V1440(\(or)S1598(characters,)S2073(if)S2174(equivalence)S2694(classes)S3013(are)S3176(not)S3343(being)S3605(used\))S3862(that)S4052(are)S4215(commonly)S4683(used)S4906(together.)S5088 V1440(Meta-equivalence)S2194(classes)S2506(are)S2662(often)S2901(a)S2979(big)S3140(win)S3324(when)S3575(using)S3825(compressed)S4333(tables,)S4626(but)S4787(they)S4993(have)S5216(a)S5208 V1440(moderate)S1863(performance)S2421(impact)S2743(\(one)S2970(or)S3101(two)S3299("if")S3490(tests)S3716(and)S3908(one)S4100(array)S(look-up)312 4355 A4714(per)S4890(character)S5328 V1440(scanned\).)S5496 V1440(A)S1557(lone)S10 B1774(-C)S10 R1925(specifies)S2322(that)S2517(the)S2684(scanner)S3036(tables)S(should)267 3315 A3626(be)S3765(compressed)S4284(but)S4456(neither)S4780(equivalence)S5616 V1440(classes)S1745(nor)S1904(meta-equivalence)S2640(classes)S(should)267 2945 A3237(be)S3357(used.)S5784 V1440(The)S1635(options)S10 B1968(-Cf)S10 R2147(or)S10 B2269(-CF)S10 R2476(and)S10 B2659(-Cm)S10 R2888(do)S3027(not)S3194(make)S3451(sense)S3708(together)S4077(-)S4150(there)S4391(is)S4497(no)S(opportunity)468 4636 A5143(for)S5904 V1440(meta-equivalence)S2183(classes)S2495(if)S2588(the)S2742(table)S2969(is)S3067(not)S3226(being)S3480(compressed.)S4036(Otherwise)S4482(the)S4636(options)S4962(may)S5166(be)S6024 V1440(freely)S1701(mixed.)S6192 V1440(The)S1626(default)S(setting)268 1935 A2232(is)S10 B2328(-Cem,)S10 R2618(which)S2893(specifies)S3275(that)S10 I3455(flex)S10 R(should)267 3630 A3926(generate)S4297(equivalence)S4807(classes)S5116(and)S6312 V1440(meta-equivalence)S2178(classes.)S2535(This)S(setting)268 2741 A3036(provides)S3409(the)S3559(highest)S3876(degree)S4172(of)S4282(table)S4504(compression.)S5088(You)S6432 V1440(can)S1607(trade)S1836(off)S1981(faster-executing)S2658(scanners)S3032(at)S3132(the)S3282(cost)S3471(of)S3582(larger)S3846(tables)S4109(with)S4316(the)S4467(following)S4886(generally)S6552 V1440(being)S1688(true:)S6792 V1540(slowest)S1867(&)S1970(smallest)S6912 V1690(-Cem)S7032 V1690(-Cm)S7152 V1690(-Ce)S7272 V1690(-C)S7392 V1690(-C{f,F}e)S7512 V1690(-C{f,F})S7903 V720(September)S1176(13,)S(1996)200 1326 A2681(\()S2723(26)S2848(May)S(1990)200 3057 A3265(\))S4990(Page)S5211(2)S8143 VEP%%Page: 3 3BP/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 V1540(fastest)S1823(&)S1926(largest)S1248 V10 B1440(-C)S10 R1578(options)S1904(are)S2059(not)S2218(cumulative;)S2724(whenever)S3147(the)S3301(flag)S3489(is)S(encountered,)517 3587 A4135(the)S4289(previous)S4666(-C)S(settings)307 4798 A5137(are)S1368 V1440(forgotten.)S1536 V10 B1080(-Sskeleton_file)S1656 V10 R1440(overrides)S1847(the)S2002(default)S2314(skeleton)S2681(\256le)S2842(from)S3070(which)S10 I3348(\257ex)S10 R3520(constructs)S3960(its)S4088(scanners.)S4518(You'll)S4814(never)S5071(need)S1776 V1440(this)S1610(option)S1891(unless)S(you)150 2167 A2342(are)S2491(doing)S10 I2744(\257ex)S10 R2909(maintenance)S3443(or)S3552(development.)S1944 V9 R720(S)S722(SU)S774(UM)S842(MM)S924(MA)S1006(AR)S1074(RY)S1136(Y)S1242(O)S1244(OF)S1312(F)S1402(F)S1404(FL)S1456(LE)S1514(EX)S1572(X)S1678(R)S1680(RE)S1742(EG)S1800(GU)S1868(UL)S1936(LA)S1994(AR)S2062(R)S2162(E)S2164(EX)S2222(XP)S2290(PR)S2342(RE)S2404(ES)S2462(SS)S2514(SI)S2566(IO)S2599(ON)S2667(NS)S2735(S)S2064 V10 R1080(The)S1262(patterns)S1606(in)S1709(the)S(input)206 1857 A2088(are)S(written)286 2237 A2548(using)S2790(an)S2910(extended)S3298(set)S3435(of)S3544(regular)S3855(expressions.)S4399(These)S4665(are:)S2304 V1180(x)S1480(match)S1751(the)S1899(character)S2295('x')S2424 V1180(.)S1455(any)S1625(character)S2021(except)S2309(newline)S2544 V1180([xyz])S1543(a)S1613("character)S2050(class";)S2340(in)S2443(this)S2613(case,)S2837(the)S2985(pattern)S2664 V1505(matches)S1860(either)S2115(an)S2235('x',)S2403(a)S2473('y',)S2641(or)S2750(a)S2820('z')S2784 V1180([abj-oZ])S1592(a)S1662("character)S2099(class")S2361(with)S2565(a)S2635(range)S2884(in)S(it;)84 2987 A3096(matches)S2904 V1505(an)S1625('a',)S1788(a)S1858('b',)S2026(any)S2196(letter)S2429(from)S2650('j')S(through)312 2771 A3108('o',)S3024 V1505(or)S1614(a)S1684('Z')S3144 V1180([\303A-Z])S1576(a)S1646("negated)S2025(character)S2421(class",)S2708(i.e.,)S2881(any)S3051(character)S3264 V1505(but)S1658(those)S1895(in)S1998(the)S2146(class.)S2417(In)S2526(this)S2696(case,)S2920(any)S3384 V1505(character)S1901(EXCEPT)S2308(an)S(uppercase)403 2428 A2856(letter.)S3504 V1180([\303A-Z\\n])S1604(any)S1774(character)S2170(EXCEPT)S2577(an)S(uppercase)403 2697 A3125(letter)S3358(or)S3624 V1505(a)S1575(newline)S3744 V1180(r*)S1489(zero)S1688(or)S1797(more)S2029(r's,)S2186(where)S2458(r)S2517(is)S2609(any)S2779(regular)S3090(expression)S3864 V1180(r+)S1496(one)S1666(or)S1775(more)S2007(r's)S3984 V1180(r?)S1484(zero)S1683(or)S1792(one)S1962(r's)S2094(\(that)S2304(is,)S2421("an)S2582(optional)S2936(r"\))S4104 V1180(r{2,5})S1560(anywhere)S1977(from)S2198(two)S2374(to)S2477(\256ve)S2653(r's)S4224 V1180(r{2,})S1535(two)S1711(or)S1820(more)S2052(r's)S4344 V1180(r{4})S1535(exactly)S1851(4)S1926(r's)S4464 V1180({name})S1619(the)S1767(expansion)S2199(of)S2308(the)S2456("name")S(de\256nition)385 2781 A4584 V1455(\(see)S(above\))274 1643 A4704 V1180("[xyz]\\"foo")S4824 V1455(the)S(literal)236 1603 A1864(string:)S2146([xyz]"foo)S4944 V1180(\\X)S1506(if)S1593(X)S1691(is)S1783(an)S1903('a',)S2066('b',)S('f',)127 2234 A2386('n',)S('r',)127 2554 A2706('t',)S2852(or)S2961('v',)S5064 V1505(then)S1703(the)S1851(ANSI-C)S2213(interpretation)S2781(of)S2890(\\x.)S5184 V1505(Otherwise,)S1970(a)S(literal)236 2040 A2301('X')S2467(\(used)S2710(to)S2813(escape)S5304 V1505(operators)S1905(such)S2114(as)S2223('*'\))S5424 V(\\123)178 1180 A1533(the)S1681(character)S2077(with)S2281(octal)S2502(value)S(123)150 2745 A5544 V1180(\\x2a)S1528(the)S1676(character)S2072(with)S2276(hexadecimal)S2810(value)S3053(2a)S5664 V(\(r\))102 1180 A1482(match)S1753(an)S1873(r;)S1960(parentheses)S2455(are)S2604(used)S2813(to)S2916(override)S5784 V(precedence)454 1505 A1984(\(see)S2172(below\))S6144 V1180(rs)S1478(the)S1626(regular)S1937(expression)S2392(r)S2451(followed)S2834(by)S2959(the)S6264 V1505(regular)S1816(expression)S2271(s;)S2363(called)S2629("concatenation")S6624 V1180(r|s)S1473(either)S1728(an)S1848(r)S1907(or)S2016(an)S2136(s)S6984 V1180(r/s)S1481(an)S1601(r)S1660(but)S1813(only)S2016(if)S2103(it)S2184(is)S2276(followed)S2659(by)S2784(an)S2904(s.)S3018(The)S7104 V1505(s)S1569(is)S1661(not)S1814(part)S1996(of)S2105(the)S2253(matched)S2619(text.)S2845(This)S3049(type)S7224 V1505(of)S1614(pattern)S1919(is)S2011(called)S2277(as)S("trailing)332 2386 A2743(context".)S7344 V1180(\303r)S1473(an)S1593(r,)S1677(but)S1830(only)S2033(at)S2131(the)S2279(beginning)S2705(of)S2814(a)S2884(line)S7464 V1180(r$)S1489(an)S1609(r,)S1693(but)S1846(only)S2049(at)S2147(the)S2295(end)S2465(of)S2574(a)S2644(line.)S2870(Equivalent)S7903 V720(Page)S941(3)S2681(\()S2723(26)S2848(May)S(1990)200 3057 A3265(\))S4455(September)S4911(13,)S(1996)200 5061 A8143 VEP%%Page: 4 4BP/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 V1505(to)S1608("r/\\n".)S1320 V1180(<s>r)S1542(an)S1662(r,)S1746(but)S1899(only)S2102(in)S2205(start)S(condition)379 2404 A2808(s)S2872(\(see)S1440 V1455(below)S1726(for)S1869(discussion)S2312(of)S2421(start)S(conditions\))452 2620 A1560 V1180(<s1,s2,s3>r)S1680 V1455(same,)S1712(but)S1865(in)S1968(any)S2138(of)S2247(start)S(conditions)418 2446 A2889(s1,)S1800 V1455(s2,)S1594(or)S1703(s3)S2160 V1180(<<EOF>>)S1699(an)S1819(end-of-\256le)S2280 V(<s1,s2><<EOF>>)736 1180 A2400 V1455(an)S1575(end-of-\256le)S2026(when)S2269(in)S2372(start)S(condition)379 2571 A2975(s1)S3089(or)S3198(s2)S2640 V1080(The)S1267(regular)S1583(expressions)S2082(listed)S(above)240 2330 A2600(are)S(grouped)329 2754 A(according)397 3113 A3540(to)S(precedence,)479 3648 A4157(from)S

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -