1This is flex.info, produced by makeinfo version 6.0 from flex.texi. 2 3The flex manual is placed under the same licensing conditions as the 4rest of flex: 5 6 Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2012 The Flex 7Project. 8 9 Copyright (C) 1990, 1997 The Regents of the University of California. 10All rights reserved. 11 12 This code is derived from software contributed to Berkeley by Vern 13Paxson. 14 15 The United States Government has rights in this work pursuant to 16contract no. DE-AC03-76SF00098 between the United States Department of 17Energy and the University of California. 18 19 Redistribution and use in source and binary forms, with or without 20modification, are permitted provided that the following conditions are 21met: 22 23 1. Redistributions of source code must retain the above copyright 24 notice, this list of conditions and the following disclaimer. 25 26 2. Redistributions in binary form must reproduce the above copyright 27 notice, this list of conditions and the following disclaimer in the 28 documentation and/or other materials provided with the 29 distribution. 30 31 Neither the name of the University nor the names of its contributors 32may be used to endorse or promote products derived from this software 33without specific prior written permission. 34 35 THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED 36WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 37MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 38INFO-DIR-SECTION Programming 39START-INFO-DIR-ENTRY 40* flex: (flex). Fast lexical analyzer generator (lex replacement). 41END-INFO-DIR-ENTRY 42 43 44Indirect: 45flex.info-1: 1622 46flex.info-2: 319164 47 48Tag Table: 49(Indirect) 50Node: Top1622 51Node: Copyright9420 52Node: Reporting Bugs10939 53Node: Introduction11244 54Node: Simple Examples12073 55Node: Format15361 56Node: Definitions Section15816 57Ref: Definitions Section-Footnote-118074 58Node: Rules Section18142 59Node: User Code Section19300 60Node: Comments in the Input19738 61Node: Patterns21108 62Ref: case and character ranges27940 63Node: Matching31943 64Node: Actions35228 65Node: Generated Scanner44190 66Node: Start Conditions49209 67Node: Multiple Input Buffers59751 68Ref: Scanning Strings66292 69Node: EOF67921 70Node: Misc Macros69507 71Node: User Values72361 72Node: Yacc74686 73Node: Scanner Options75581 74Node: Options for Specifying Filenames78370 75Ref: option-header78596 76Ref: option-outfile79310 77Ref: option-stdout79635 78Node: Options Affecting Scanner Behavior80618 79Ref: option-case-insensitive80859 80Ref: option-lex-compat81292 81Ref: option-batch81824 82Ref: option-interactive82343 83Ref: option-7bit83697 84Ref: option-8bit85001 85Ref: option-default85413 86Ref: option-always-interactive85477 87Ref: option-posix86081 88Ref: option-stack87228 89Ref: option-stdinit87336 90Ref: option-yylineno87815 91Ref: option-yywrap88258 92Node: Code-Level And API Options88525 93Ref: option-ansi-definitions88752 94Ref: option-ansi-prototypes89000 95Ref: option-bison-bridge89248 96Ref: option-bison-locations89589 97Ref: option-noline89849 98Ref: option-reentrant90363 99Ref: option-c++90975 100Ref: option-array91101 101Ref: option-pointer91199 102Ref: option-prefix91326 103Ref: option-main92854 104Ref: option-nounistd93038 105Ref: option-yyclass93549 106Node: Options for Scanner Speed and Size94033 107Ref: option-align94583 108Ref: option-ecs95085 109Ref: option-meta-ecs96124 110Ref: option-read96612 111Ref: option-full98495 112Ref: option-fast98690 113Node: Debugging Options99614 114Ref: option-backup99801 115Ref: option-debug100346 116Ref: option-perf-report101068 117Ref: option-nodefault101694 118Ref: option-trace102012 119Ref: option-nowarn102303 120Ref: option-verbose102371 121Ref: option-warn102800 122Node: Miscellaneous Options103019 123Node: Performance103475 124Node: Cxx113722 125Node: Reentrant121814 126Node: Reentrant Uses122548 127Node: Reentrant Overview124110 128Node: Reentrant Example124910 129Node: Reentrant Detail125683 130Node: Specify Reentrant126187 131Node: Extra Reentrant Argument126837 132Node: Global Replacement128089 133Node: Init and Destroy Functions129324 134Node: Accessor Methods131845 135Node: Extra Data133192 136Node: About yyscan_t135459 137Node: Reentrant Functions135856 138Ref: bison-functions137340 139Node: Lex and Posix138079 140Node: Memory Management145426 141Ref: memory-management145572 142Node: The Default Memory Management145806 143Ref: The Default Memory Management-Footnote-1149626 144Node: Overriding The Default Memory Management149779 145Ref: Overriding The Default Memory Management-Footnote-1152193 146Node: A Note About yytext And Memory152357 147Node: Serialized Tables153597 148Ref: serialization153741 149Node: Creating Serialized Tables154521 150Node: Loading and Unloading Serialized Tables156136 151Node: Tables File Format157909 152Node: Diagnostics164934 153Node: Limitations168343 154Node: Bibliography170291 155Node: FAQ170961 156Node: When was flex born?176124 157Node: How do I expand backslash-escape sequences in C-style quoted strings?176501 158Node: Why do flex scanners call fileno if it is not ANSI compatible?177804 159Node: Does flex support recursive pattern definitions?178601 160Node: How do I skip huge chunks of input (tens of megabytes) while using flex?179448 161Node: Flex is not matching my patterns in the same order that I defined them.179915 162Node: My actions are executing out of order or sometimes not at all.181661 163Node: How can I have multiple input sources feed into the same scanner at the same time?182434 164Node: Can I build nested parsers that work with the same input file?184419 165Node: How can I match text only at the end of a file?185426 166Node: How can I make REJECT cascade across start condition boundaries?186230 167Node: Why cant I use fast or full tables with interactive mode?187244 168Node: How much faster is -F or -f than -C?188501 169Node: If I have a simple grammar cant I just parse it with flex?188813 170Node: Why doesn't yyrestart() set the start state back to INITIAL?189295 171Node: How can I match C-style comments?189922 172Node: The period isn't working the way I expected.190732 173Node: Can I get the flex manual in another format?191977 174Node: Does there exist a "faster" NDFA->DFA algorithm?192467 175Node: How does flex compile the DFA so quickly?192977 176Node: How can I use more than 8192 rules?193943 177Node: How do I abandon a file in the middle of a scan and switch to a new file?195353 178Node: How do I execute code only during initialization (only before the first scan)?195907 179Node: How do I execute code at termination?196684 180Node: Where else can I find help?197010 181Node: Can I include comments in the "rules" section of the file?197384 182Node: I get an error about undefined yywrap().197764 183Node: How can I change the matching pattern at run time?198240 184Node: How can I expand macros in the input?198602 185Node: How can I build a two-pass scanner?199634 186Node: How do I match any string not matched in the preceding rules?200552 187Node: I am trying to port code from AT&T lex that uses yysptr and yysbuf.201461 188Node: Is there a way to make flex treat NULL like a regular character?202256 189Node: Whenever flex can not match the input it says "flex scanner jammed".202776 190Node: Why doesn't flex have non-greedy operators like perl does?203419 191Node: Memory leak - 16386 bytes allocated by malloc.204772 192Ref: faq-memory-leak205070 193Node: How do I track the byte offset for lseek()?206041 194Node: How do I use my own I/O classes in a C++ scanner?207550 195Node: How do I skip as many chars as possible?208393 196Node: deleteme00209468 197Node: Are certain equivalent patterns faster than others?209908 198Node: Is backing up a big deal?213326 199Node: Can I fake multi-byte character support?215232 200Node: deleteme01216673 201Node: Can you discuss some flex internals?217782 202Node: unput() messes up yy_at_bol220026 203Node: The | operator is not doing what I want221128 204Node: Why can't flex understand this variable trailing context pattern?222674 205Node: The ^ operator isn't working223923 206Node: Trailing context is getting confused with trailing optional patterns225158 207Node: Is flex GNU or not?226401 208Node: ERASEME53228074 209Node: I need to scan if-then-else blocks and while loops228844 210Node: ERASEME55230043 211Node: ERASEME56231141 212Node: ERASEME57232499 213Node: Is there a repository for flex scanners?233497 214Node: How can I conditionally compile or preprocess my flex input file?233813 215Node: Where can I find grammars for lex and yacc?234286 216Node: I get an end-of-buffer message for each character scanned.234633 217Node: unnamed-faq-62235228 218Node: unnamed-faq-63236246 219Node: unnamed-faq-64237543 220Node: unnamed-faq-65238509 221Node: unnamed-faq-66239295 222Node: unnamed-faq-67240410 223Node: unnamed-faq-68241397 224Node: unnamed-faq-69242539 225Node: unnamed-faq-70243252 226Node: unnamed-faq-71244013 227Node: unnamed-faq-72245222 228Node: unnamed-faq-73246265 229Node: unnamed-faq-74247189 230Node: unnamed-faq-75248134 231Node: unnamed-faq-76249266 232Node: unnamed-faq-77249972 233Node: unnamed-faq-78250865 234Node: unnamed-faq-79251863 235Node: unnamed-faq-80253563 236Node: unnamed-faq-81254881 237Node: unnamed-faq-82257681 238Node: unnamed-faq-83258638 239Node: unnamed-faq-84260418 240Node: unnamed-faq-85261521 241Node: unnamed-faq-86262528 242Node: unnamed-faq-87263466 243Node: unnamed-faq-88264112 244Node: unnamed-faq-90264943 245Node: unnamed-faq-91266206 246Node: unnamed-faq-92268634 247Node: unnamed-faq-93269133 248Node: unnamed-faq-94270060 249Node: unnamed-faq-95271472 250Node: unnamed-faq-96272990 251Node: unnamed-faq-97273749 252Node: unnamed-faq-98274416 253Node: unnamed-faq-99275081 254Node: unnamed-faq-100276010 255Node: unnamed-faq-101276720 256Node: What is the difference between YYLEX_PARAM and YY_DECL?277533 257Node: Why do I get "conflicting types for yylex" error?278057 258Node: How do I access the values set in a Flex action from within a Bison action?278587 259Node: Appendices279016 260Node: Makefiles and Flex279281 261Ref: Makefiles and Flex-Footnote-1282483 262Ref: Makefiles and Flex-Footnote-2282600 263Ref: Makefiles and Flex-Footnote-3282787 264Node: Bison Bridge282838 265Ref: Bison Bridge-Footnote-1285505 266Node: M4 Dependency285697 267Ref: M4 Dependency-Footnote-1287111 268Node: Common Patterns287247 269Node: Numbers287570 270Node: Identifiers288546 271Node: Quoted Constructs289373 272Node: Addresses290427 273Node: Indices291739 274Node: Concept Index292031 275Node: Index of Functions and Macros319164 276Node: Index of Variables324133 277Node: Index of Data Types325799 278Node: Index of Hooks326687 279Node: Index of Scanner Options327255 280 281End Tag Table 282