📄 flexdoc.1
字号:
1080(The)S10 I1262(\257ex)S10 R(input)206 1427 A1658(\256le)S1812(consists)S2155(of)S2264(three)S2491(sections,)S2865(separated)S3271(by)S3396(a)S3466(line)S3642(with)S3846(just)S10 B4016(%%)S10 R4241(in)S(it:)84 4344 A7056 V(de\256nitions)424 1180 A7176 V1180(%%)S7296 V1180(rules)S7416 V1180(%%)S7536 V1180(user)S1373(code)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 V1080(The)S10 I(de\256nitions)418 1292 A10 R1765(section)S2105(contains)S2495(declarations)S3037(of)S3176(simple)S10 I3499(name)S10 R(de\256nitions)424 3772 A4251(to)S4384(simplify)S4774(the)S4953(scanner)S1080 V1080(speci\256cation,)S1639(and)S1809(declarations)S2321(of)S10 I2430(start)S(conditions,)443 2639 A10 R3107(which)S3378(are)S3527(explained)S3943(in)S4046(a)S4116(later)S4321(section.)S1248 V1080(Name)S(de\256nitions)424 1346 A1795(have)S2010(the)S2158(form:)S1488 V1180(name)S(de\256nition)385 1423 A1728 V1080(The)S1268("name")S1599(is)S1697(a)S1773(word)S2011(beginning)S2443(with)S2654(a)S2731(letter)S2971(or)S3087(an)S(underscore)442 3214 A3688(\('_'\))S3906(followed)S4296(by)S4428(zero)S4634(or)S4750(more)S4989(letters,)S1848 V1080(digits,)S1359('_',)S1533(or)S('-')102 1648 A1781(\(dash\).)S2114(The)S(de\256nition)385 2302 A2718(is)S2815(taken)S3063(to)S3171(begin)S3424(at)S3527(the)S3680(\256rst)S(non-white-space)666 3867 A4563(character)S4964(follow-)S1968 V1080(ing)S1233(the)S1382(name)S1626(and)S1797(continuing)S2252(to)S2356(the)S2505(end)S2676(of)S2786(the)S2935(line.)S3162(The)S(de\256nition)385 3345 A3756(can)S3922(subsequently)S4472(be)S4593(referred)S4940(to)S5044(using)S2088 V1080("{name}",)S1526(which)S(will)157 1797 A1979(expand)S2294(to)S("\(de\256nition\)".)560 2397 A3007(For)S3172(example,)S2328 V1180(DIGIT)S1556([0-9])S2448 V1180(ID)S1462([a-z][a-z0-9]*)S2688 V1080(de\256nes)S1405("DIGIT")S1804(to)S1923(be)S2059(a)S2145(regular)S2472(expression)S2943(which)S3230(matches)S3601(a)S3687(single)S3968(digit,)S4218(and)S4404("ID")S4634(to)S4753(be)S4889(a)S4975(regular)S2808 V1080(expression)S1543(which)S1822(matches)S2185(a)S2263(letter)S2504(followed)S2895(by)S3028(zero-or-more)S3594(letters-or-digits.)S4299(A)S4405(subsequent)S4884(reference)S2928 V1080(to)S3168 V1180({DIGIT}+"."{DIGIT}*)S3408 V1080(is)S1172(identical)S1544(to)S3648 V1180(\([0-9]\)+"."\([0-9]\)*)S3888 V1080(and)S1250(matches)S1605(one-or-more)S2134(digits)S2382(followed)S2765(by)S2890(a)S2960('.')S3078(followed)S3461(by)S3586(zero-or-more)S4144(digits.)S4056 V1080(The)S10 I1262(rules)S10 R1488(section)S1798(of)S1907(the)S10 I2055(\257ex)S10 R(input)206 2220 A2451(contains)S2811(a)S2881(series)S3136(of)S3245(rules)S3466(of)S3575(the)S3723(form:)S4296 V1180(pattern)S1535(action)S4536 V1080(where)S1352(the)S1500(pattern)S1805(must)S2025(be)S2145(unindented)S2616(and)S2786(the)S2934(action)S3205(must)S3425(begin)S3673(on)S3798(the)S3946(same)S4178(line.)S4704 V1080(See)S1251(below)S1522(for)S1665(a)S1735(further)S2035(description)S2507(of)S2616(patterns)S2960(and)S3130(actions.)S4872 V1080(Finally,)S1420(the)S1573(user)S1771(code)S1991(section)S2307(is)S2405(simply)S2709(copied)S3008(to)S10 B3117(lex.yy.c)S10 R3466(verbatim.)S3905(It)S3998(is)S4096(used)S4311(for)S4460(companion)S4937(routines)S4992 V1080(which)S1362(call)S1543(or)S1662(are)S1821(called)S2097(by)S2232(the)S2390(scanner.)S2783(The)S2975(presence)S3363(of)S3482(this)S3662(section)S3982(is)S4084(optional;)S4476(if)S4573(it)S4664(is)S4766(missing,)S5138(the)S5112 V(second)279 1080 A10 B1384(%%)S10 R1609(in)S1712(the)S(input)206 1860 A2091(\256le)S2245(may)S2443(be)S2563(skipped,)S2925(too.)S5280 V1080(In)S1193(the)S(de\256nitions)424 1345 A1798(and)S1972(rules)S2197(sections,)S2576(any)S10 I2751(indented)S10 R3127(text)S3308(or)S3422(text)S3603(enclosed)S3985(in)S10 B4093(%{)S10 R4263(and)S10 B4438(%})S10 R4608(is)S4705(copied)S5003(verba-)S5400 V1080(tim)S1253(to)S1370(the)S1532(output)S1827(\(with)S2079(the)S2241(%{}'s)S2533(removed\).)S3008(The)S3204(%{}'s)S3496(must)S3730(appear)S4038(unindented)S4522(on)S4660(lines)S4888(by)S5026(them-)S5520 V1080(selves.)S5688 V1080(In)S1200(the)S1359(rules)S1591(section,)S1937(any)S2118(indented)S2500(or)S2620(%{})S2836(text)S3023(appearing)S3456(before)S3750(the)S3909(\256rst)S4102(rule)S4295(may)S4504(be)S4635(used)S4855(to)S4969(declare)S5808 V1080(variables)S1477(which)S1756(are)S1913(local)S2142(to)S2253(the)S2408(scanning)S2797(routine)S3114(and)S3291(\(after)S3543(the)S3698(declarations\))S4251(code)S4473(which)S4751(is)S4850(to)S4960(be)S5087(exe-)S5928 V1080(cuted)S1329(whenever)S1752(the)S1906(scanning)S2294(routine)S2611(is)S2710(entered.)S3089(Other)S3351(indented)S3729(or)S3845(%{})S4057(text)S4240(in)S4350(the)S4505(rule)S4694(section)S5011(is)S(still)151 5110 A6048 V1080(copied)S1374(to)S1478(the)S1627(output,)S1934(but)S2088(its)S2209(meaning)S2581(is)S2674(not)S2828(well-de\256ned)S3358(and)S3529(it)S3611(may)S3810(well)S4010(cause)S4259(compile-time)S4821(errors)S5082(\(this)S6168 V1080(feature)S1386(is)S1478(present)S1794(for)S10 I1937(POSIX)S10 R2243(compliance;)S2760(see)S2914(below)S3185(for)S3328(other)S3560(such)S3769(features\).)S6336 V1080(In)S1190(the)S(de\256nitions)424 1339 A1789(section,)S2125(an)S2246(unindented)S2718(comment)S3118(\(i.e.,)S3326(a)S3397(line)S3574(beginning)S4001(with)S4206("/*"\))S4426(is)S4519(also)S4708(copied)S5003(verba-)S6456 V1080(tim)S1252(to)S1368(the)S1529(output)S1823(up)S1961(to)S2077(the)S2238(next)S2449("*/".)S2697(Also,)S2950(any)S3133(line)S3322(in)S3438(the)S(de\256nitions)424 3599 A4061(section)S4384(beginning)S4823(with)S5039('#')S5194(is)S6576 V(ignored,)332 1080 A(though)278 1437 A1740(this)S1910(style)S2125(of)S2234(comment)S2633(is)S(deprecated)437 2725 A3187(and)S3357(may)S3555(go)S3680(away)S3918(in)S4021(the)S4169(future.)S6744 V9 R720(P)S722(PA)S774(AT)S842(TT)S900(TE)S958(ER)S1016(RN)S1078(NS)S1146(S)S6864 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:)S7104 V1180(x)S1480(match)S1751(the)S1899(character)S2295('x')S7224 V1180(.)S1455(any)S1625(character)S2021(except)S2309(newline)S7344 V1180([xyz])S1543(a)S1613("character)S2050(class";)S2340(in)S2443(this)S2613(case,)S2837(the)S2985(pattern)S7464 V1505(matches)S1860(either)S2115(an)S2235('x',)S2403(a)S2473('y',)S2641(or)S2750(a)S2820('z')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 V1180([abj-oZ])S1592(a)S1662("character)S2099(class")S2361(with)S2565(a)S2635(range)S2884(in)S(it;)84 2987 A3096(matches)S1080 V1505(an)S1625('a',)S1788(a)S1858('b',)S2026(any)S2196(letter)S2429(from)S2650('j')S(through)312 2771 A3108('o',)S1200 V1505(or)S1614(a)S1684('Z')S1320 V1180([\303A-Z])S1576(a)S1646("negated)S2025(character)S2421(class",)S2708(i.e.,)S2881(any)S3051(character)S1440 V1505(but)S1658(those)S1895(in)S1998(the)S2146(class.)S2417(In)S2526(this)S2696(case,)S2920(any)S1560 V1505(character)S1901(EXCEPT)S2308(an)S(uppercase)403 2428 A2856(letter.)S1680 V1180([\303A-Z\\n])S1604(any)S1774(character)S2170(EXCEPT)S2577(an)S(uppercase)403 2697 A3125(letter)S3358(or)S1800 V1505(a)S1575(newline)S1920 V1180(r*)S1489(zero)S1688(or)S1797(more)S2029(r's,)S2186(where)S2458(r)S2517(is)S2609(any)S2779(regular)S3090(expression)S2040 V1180(r+)S1496(one)S1666(or)S1775(more)S2007(r's)S2160 V1180(r?)S1484(zero)S1683(or)S1792(one)S1962(r's)S2094(\(that)S2304(is,)S2421("an)S2582(optional)S2936(r"\))S2280 V1180(r{2,5})S1560(anywhere)S1977(from)S2198(two)S2374(to)S2477(\256ve)S2653(r's)S2400 V1180(r{2,})S1535(two)S1711(or)S1820(more)S2052(r's)S2520 V1180(r{4})S1535(exactly)S1851(4)S1926(r's)S2640 V1180({name})S1619(the)S1767(expansion)S2199(of)S2308(the)S2456("name")S(de\256nition)385 2781 A2760 V1455(\(see)S(above\))274 1643 A2880 V1180("[xyz]\\"foo")S3000 V1455(the)S(literal)236 1603 A1864(string:)S2146([xyz]"foo)S3120 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',)S3240 V1505(then)S1703(the)S1851(ANSI-C)S2213(interpretation)S2781(of)S2890(\\x.)S3360 V1505(Otherwise,)S1970(a)S(literal)236 2040 A2301('X')S2467(\(used)S2710(to)S2813(escape)S3480 V1505(operators)S1905(such)S2114(as)S2223('*'\))S3600 V(\\123)178 1180 A1533(the)S1681(character)S2077(with)S2281(octal)S2502(value)S(123)150 2745 A3720 V1180(\\x2a)S1528(the)S1676(character)S2072(with)S2276(hexadecimal)S2810(value)S3053(2a)S3840 V(\(r\))102 1180 A1482(match)S1753(an)S1873(r;)S1960(parentheses)S2455(are)S2604(used)S2813(to)S2916(override)S3960 V(precedence)454 1505 A1984(\(see)S2172(below\))S4320 V1180(rs)S1478(the)S1626(regular)S1937(expression)S2392(r)S2451(followed)S2834(by)S2959(the)S4440 V1505(regular)S1816(expression)S2271(s;)S2363(called)S2629("concatenation")S4800 V1180(r|s)S1473(either)S1728(an)S1848(r)S1907(or)S2016(an)S2136(s)S5160 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)S5280 V1505(s)S1569(is)S1661(not)S1814(part)S1996(of)S2105(the)S2253(matched)S2619(text.)S2845(This)S3049(type)S5400 V1505(of)S1614(pattern)S1919(is)S2011(called)S2277(as)S("trailing)332 2386 A2743(context".)S5520 V1180(\303r)S1473(an)S1593(r,)S1677(but)S1830(only)S2033(at)S2131(the)S2279(beginning)S2705(of)S2814(a)S2884(line)S5640 V1180(r$)S1489(an)S1609(r,)S1693(but)S1846(only)S2049(at)S2147(the)S2295(end)S2465(of)S2574(a)S2644(line.)S2870(Equivalent)S5760 V1505(to)S1608("r/\\n".)S6120 V1180(<s>r)S1542(an)S1662(r,)S1746(but)S1899(only)S2102(in)S2205(start)S(condition)379 2404 A2808(s)S2872(\(see)S6240 V1455(below)S1726(for)S1869(discussion)S2312(of)S2421(start)S(conditions\))452 2620 A6360 V1180(<s1,s2,s3>r)S6480 V1455(same,)S1712(but)S1865(in)S1968(any)S2138(of)S2247(start)S(conditions)418 2446 A2889(s1,)S6600 V1455(s2,)S1594(or)S1703(s3)S6960 V1180(<<EOF>>)S1699(an)S1819(end-of-\256le)S7080 V(<s1,s2><<EOF>>)736 1180 A7200 V1455(an)S1575(end-of-\256le)S2026(when)S2269(in)S2372(start)S(condition)379 2571 A2975(s1)S3089(or)S3198(s2)S7440 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)S4383(highest)S(precedence)454 4703 A5188(at)S7903 V720(September)S1176(13,)S(1996)200 1326 A2681(\()S2723(26)S2848(May)S(1990)200 3057 A3265(\))S4990(Page)S5211(4)S8143 VEP%%Page: 5 5BP/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(the)S1228(top)S1381(to)S1484(lowest)S1772(at)S1870(the)S2018(bottom.)S2377(Those)S(grouped)329 2648 A3002(together)S3357(have)S3572(equal)S(precedence.)479 3815 A4344(For)S4509(example,)S1200 V1180(foo|bar*)S1440 V1080(is)S1172(the)S1320(same)S1552(as)S1680 V1180(\(foo\)|\(ba\(r*\)\))S1920 V1080(since)S1314(the)S1464('*')S1609(operator)S1972(has)S2133(higher)S(precedence)454 2417 A2898(than)S3098(concatenation,)S3709(and)S3881(concatenation)S4467(higher)S4751(than)S4952(alterna-)S2040 V1080(tion)S1265(\('|'\).)S1500(This)S
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -