1This is flex.info, produced by makeinfo version 4.13 from flex.texi. 2 3INFO-DIR-SECTION Programming 4START-INFO-DIR-ENTRY 5* flex: (flex). Fast lexical analyzer generator (lex replacement). 6END-INFO-DIR-ENTRY 7 8 The flex manual is placed under the same licensing conditions as the 9rest of flex: 10 11 Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2012 The 12Flex Project. 13 14 Copyright (C) 1990, 1997 The Regents of the University of California. 15All rights reserved. 16 17 This code is derived from software contributed to Berkeley by Vern 18Paxson. 19 20 The United States Government has rights in this work pursuant to 21contract no. DE-AC03-76SF00098 between the United States Department of 22Energy and the University of California. 23 24 Redistribution and use in source and binary forms, with or without 25modification, are permitted provided that the following conditions are 26met: 27 28 1. Redistributions of source code must retain the above copyright 29 notice, this list of conditions and the following disclaimer. 30 31 2. Redistributions in binary form must reproduce the above copyright 32 notice, this list of conditions and the following disclaimer in the 33 documentation and/or other materials provided with the 34 distribution. 35 36 Neither the name of the University nor the names of its contributors 37may be used to endorse or promote products derived from this software 38without specific prior written permission. 39 40 THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED 41WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 42MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 43 44 45Indirect: 46flex.info-1: 1627 47flex.info-2: 288417 48 49Tag Table: 50(Indirect) 51Node: Top1627 52Node: Copyright7692 53Node: Reporting Bugs9211 54Node: Introduction9516 55Node: Simple Examples10344 56Node: Format13631 57Node: Definitions Section14044 58Ref: Definitions Section-Footnote-116302 59Node: Rules Section16370 60Node: User Code Section17527 61Node: Comments in the Input17965 62Node: Patterns19332 63Ref: case and character ranges26156 64Node: Matching30167 65Node: Actions33451 66Node: Generated Scanner42420 67Node: Start Conditions47435 68Node: Multiple Input Buffers57972 69Ref: Scanning Strings64508 70Node: EOF66138 71Node: Misc Macros67724 72Node: User Values70576 73Node: Yacc72907 74Node: Scanner Options73802 75Node: Options for Specifying Filenames76558 76Ref: option-header76784 77Ref: option-outfile77496 78Ref: option-stdout77821 79Node: Options Affecting Scanner Behavior78803 80Ref: option-case-insensitive79044 81Ref: option-lex-compat79477 82Ref: option-batch80009 83Ref: option-interactive80533 84Ref: option-7bit81887 85Ref: option-8bit83191 86Ref: option-default83603 87Ref: option-always-interactive83667 88Ref: option-posix84271 89Ref: option-stack85418 90Ref: option-stdinit85526 91Ref: option-yylineno86004 92Ref: option-yywrap86447 93Node: Code-Level And API Options86715 94Ref: option-ansi-definitions86942 95Ref: option-ansi-prototypes87194 96Ref: option-bison-bridge87441 97Ref: option-bison-locations87780 98Ref: option-noline88040 99Ref: option-reentrant88554 100Ref: option-c++89165 101Ref: option-array89291 102Ref: option-pointer89389 103Ref: option-prefix89517 104Ref: option-main91045 105Ref: option-nounistd91229 106Ref: option-yyclass91737 107Node: Options for Scanner Speed and Size92223 108Ref: option-align92772 109Ref: option-ecs93273 110Ref: option-meta-ecs94309 111Ref: option-read94796 112Ref: option-full96678 113Ref: option-fast96873 114Node: Debugging Options97798 115Ref: option-backup97985 116Ref: option-debug98530 117Ref: option-perf-report99252 118Ref: option-nodefault99878 119Ref: option-trace100196 120Ref: option-nowarn100487 121Ref: option-verbose100555 122Ref: option-warn100984 123Node: Miscellaneous Options101203 124Node: Performance101660 125Node: Cxx111902 126Node: Reentrant119504 127Node: Reentrant Uses120181 128Node: Reentrant Overview121742 129Node: Reentrant Example122541 130Node: Reentrant Detail123315 131Node: Specify Reentrant123748 132Node: Extra Reentrant Argument124395 133Node: Global Replacement125646 134Node: Init and Destroy Functions126874 135Node: Accessor Methods129391 136Node: Extra Data130733 137Node: About yyscan_t132998 138Node: Reentrant Functions133393 139Ref: bison-functions134875 140Node: Lex and Posix135614 141Node: Memory Management142985 142Ref: memory-management143131 143Node: The Default Memory Management143359 144Ref: The Default Memory Management-Footnote-1147165 145Node: Overriding The Default Memory Management147318 146Ref: Overriding The Default Memory Management-Footnote-1149715 147Node: A Note About yytext And Memory149879 148Node: Serialized Tables151112 149Ref: serialization151256 150Node: Creating Serialized Tables152021 151Node: Loading and Unloading Serialized Tables153629 152Node: Tables File Format155397 153Node: Diagnostics162411 154Node: Limitations165820 155Node: Bibliography167768 156Node: FAQ168441 157Node: When was flex born?172681 158Node: How do I expand backslash-escape sequences in C-style quoted strings?173058 159Node: Why do flex scanners call fileno if it is not ANSI compatible?174362 160Node: Does flex support recursive pattern definitions?175157 161Node: How do I skip huge chunks of input (tens of megabytes) while using flex?176003 162Node: Flex is not matching my patterns in the same order that I defined them.176470 163Node: My actions are executing out of order or sometimes not at all.178215 164Node: How can I have multiple input sources feed into the same scanner at the same time?178988 165Node: Can I build nested parsers that work with the same input file?180976 166Node: How can I match text only at the end of a file?181982 167Node: How can I make REJECT cascade across start condition boundaries?182786 168Node: Why cant I use fast or full tables with interactive mode?183800 169Node: How much faster is -F or -f than -C?185058 170Node: If I have a simple grammar cant I just parse it with flex?185370 171Node: Why doesn't yyrestart() set the start state back to INITIAL?185851 172Node: How can I match C-style comments?186478 173Node: The period isn't working the way I expected.187288 174Node: Can I get the flex manual in another format?188535 175Node: Does there exist a "faster" NDFA->DFA algorithm?189024 176Node: How does flex compile the DFA so quickly?189534 177Node: How can I use more than 8192 rules?190501 178Node: How do I abandon a file in the middle of a scan and switch to a new file?191911 179Node: How do I execute code only during initialization (only before the first scan)?192464 180Node: How do I execute code at termination?193241 181Node: Where else can I find help?193567 182Node: Can I include comments in the "rules" section of the file?193940 183Node: I get an error about undefined yywrap().194319 184Node: How can I change the matching pattern at run time?194795 185Node: How can I expand macros in the input?195157 186Node: How can I build a two-pass scanner?196189 187Node: How do I match any string not matched in the preceding rules?197105 188Node: I am trying to port code from AT&T lex that uses yysptr and yysbuf.198014 189Node: Is there a way to make flex treat NULL like a regular character?198809 190Node: Whenever flex can not match the input it says "flex scanner jammed".199330 191Node: Why doesn't flex have non-greedy operators like perl does?199973 192Node: Memory leak - 16386 bytes allocated by malloc.201326 193Ref: faq-memory-leak201624 194Node: How do I track the byte offset for lseek()?202591 195Node: How do I use my own I/O classes in a C++ scanner?204100 196Node: How do I skip as many chars as possible?204943 197Node: deleteme00206017 198Node: Are certain equivalent patterns faster than others?206457 199Node: Is backing up a big deal?209875 200Node: Can I fake multi-byte character support?211781 201Node: deleteme01213222 202Node: Can you discuss some flex internals?214331 203Node: unput() messes up yy_at_bol216575 204Node: The | operator is not doing what I want217677 205Node: Why can't flex understand this variable trailing context pattern?219223 206Node: The ^ operator isn't working220472 207Node: Trailing context is getting confused with trailing optional patterns221707 208Node: Is flex GNU or not?222950 209Node: ERASEME53224623 210Node: I need to scan if-then-else blocks and while loops225393 211Node: ERASEME55226592 212Node: ERASEME56227690 213Node: ERASEME57229048 214Node: Is there a repository for flex scanners?230046 215Node: How can I conditionally compile or preprocess my flex input file?230361 216Node: Where can I find grammars for lex and yacc?230834 217Node: I get an end-of-buffer message for each character scanned.231181 218Node: unnamed-faq-62231776 219Node: unnamed-faq-63232794 220Node: unnamed-faq-64234091 221Node: unnamed-faq-65235057 222Node: unnamed-faq-66235843 223Node: unnamed-faq-67236958 224Node: unnamed-faq-68237945 225Node: unnamed-faq-69239087 226Node: unnamed-faq-70239800 227Node: unnamed-faq-71240561 228Node: unnamed-faq-72241770 229Node: unnamed-faq-73242813 230Node: unnamed-faq-74243737 231Node: unnamed-faq-75244682 232Node: unnamed-faq-76245814 233Node: unnamed-faq-77246520 234Node: unnamed-faq-78247413 235Node: unnamed-faq-79248411 236Node: unnamed-faq-80250111 237Node: unnamed-faq-81251429 238Node: unnamed-faq-82254229 239Node: unnamed-faq-83255186 240Node: unnamed-faq-84256966 241Node: unnamed-faq-85258069 242Node: unnamed-faq-86259076 243Node: unnamed-faq-87260014 244Node: unnamed-faq-88260660 245Node: unnamed-faq-90261491 246Node: unnamed-faq-91262754 247Node: unnamed-faq-92265182 248Node: unnamed-faq-93265681 249Node: unnamed-faq-94266608 250Node: unnamed-faq-95268020 251Node: unnamed-faq-96269538 252Node: unnamed-faq-97270297 253Node: unnamed-faq-98270964 254Node: unnamed-faq-99271629 255Node: unnamed-faq-100272558 256Node: unnamed-faq-101273268 257Node: What is the difference between YYLEX_PARAM and YY_DECL?274081 258Node: Why do I get "conflicting types for yylex" error?274602 259Node: How do I access the values set in a Flex action from within a Bison action?275132 260Node: Appendices275563 261Node: Makefiles and Flex275772 262Ref: Makefiles and Flex-Footnote-1278968 263Ref: Makefiles and Flex-Footnote-2279085 264Ref: Makefiles and Flex-Footnote-3279271 265Node: Bison Bridge279322 266Ref: Bison Bridge-Footnote-1281987 267Node: M4 Dependency282179 268Ref: M4 Dependency-Footnote-1283584 269Node: Common Patterns283719 270Node: Numbers284010 271Node: Identifiers284987 272Node: Quoted Constructs285814 273Node: Addresses286866 274Node: Indices288179 275Node: Concept Index288417 276Node: Index of Functions and Macros313700 277Node: Index of Variables318596 278Node: Index of Data Types320262 279Node: Index of Hooks321150 280Node: Index of Scanner Options321718 281 282End Tag Table 283