2013-12-06 12:04:52 +01:00
|
|
|
|
This is flex.info, produced by makeinfo version 4.13 from flex.texi.
|
2012-06-06 16:10:32 +02:00
|
|
|
|
|
|
|
|
|
INFO-DIR-SECTION Programming
|
|
|
|
|
START-INFO-DIR-ENTRY
|
|
|
|
|
* flex: (flex). Fast lexical analyzer generator (lex replacement).
|
|
|
|
|
END-INFO-DIR-ENTRY
|
|
|
|
|
|
|
|
|
|
The flex manual is placed under the same licensing conditions as the
|
|
|
|
|
rest of flex:
|
|
|
|
|
|
2013-12-06 12:04:52 +01:00
|
|
|
|
Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2012 The
|
|
|
|
|
Flex Project.
|
2012-06-06 16:10:32 +02:00
|
|
|
|
|
|
|
|
|
Copyright (C) 1990, 1997 The Regents of the University of California.
|
|
|
|
|
All rights reserved.
|
|
|
|
|
|
|
|
|
|
This code is derived from software contributed to Berkeley by Vern
|
|
|
|
|
Paxson.
|
|
|
|
|
|
|
|
|
|
The United States Government has rights in this work pursuant to
|
|
|
|
|
contract no. DE-AC03-76SF00098 between the United States Department of
|
|
|
|
|
Energy and the University of California.
|
|
|
|
|
|
|
|
|
|
Redistribution and use in source and binary forms, with or without
|
|
|
|
|
modification, are permitted provided that the following conditions are
|
|
|
|
|
met:
|
|
|
|
|
|
|
|
|
|
1. Redistributions of source code must retain the above copyright
|
|
|
|
|
notice, this list of conditions and the following disclaimer.
|
|
|
|
|
|
|
|
|
|
2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
|
notice, this list of conditions and the following disclaimer in the
|
|
|
|
|
documentation and/or other materials provided with the
|
|
|
|
|
distribution.
|
|
|
|
|
|
|
|
|
|
Neither the name of the University nor the names of its contributors
|
|
|
|
|
may be used to endorse or promote products derived from this software
|
|
|
|
|
without specific prior written permission.
|
|
|
|
|
|
|
|
|
|
THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
|
|
|
|
|
WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
|
|
|
|
|
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Indirect:
|
2013-12-06 12:04:52 +01:00
|
|
|
|
flex.info-1: 1627
|
|
|
|
|
flex.info-2: 288417
|
2012-06-06 16:10:32 +02:00
|
|
|
|
|
|
|
|
|
Tag Table:
|
|
|
|
|
(Indirect)
|
2013-12-06 12:04:52 +01:00
|
|
|
|
Node: Top1627
|
|
|
|
|
Node: Copyright7692
|
|
|
|
|
Node: Reporting Bugs9211
|
|
|
|
|
Node: Introduction9516
|
|
|
|
|
Node: Simple Examples10344
|
|
|
|
|
Node: Format13631
|
|
|
|
|
Node: Definitions Section14044
|
|
|
|
|
Ref: Definitions Section-Footnote-116302
|
|
|
|
|
Node: Rules Section16370
|
|
|
|
|
Node: User Code Section17527
|
|
|
|
|
Node: Comments in the Input17965
|
|
|
|
|
Node: Patterns19332
|
|
|
|
|
Ref: case and character ranges26156
|
|
|
|
|
Node: Matching30167
|
|
|
|
|
Node: Actions33451
|
|
|
|
|
Node: Generated Scanner42420
|
|
|
|
|
Node: Start Conditions47435
|
|
|
|
|
Node: Multiple Input Buffers57972
|
|
|
|
|
Ref: Scanning Strings64508
|
|
|
|
|
Node: EOF66138
|
|
|
|
|
Node: Misc Macros67724
|
|
|
|
|
Node: User Values70576
|
|
|
|
|
Node: Yacc72907
|
|
|
|
|
Node: Scanner Options73802
|
|
|
|
|
Node: Options for Specifying Filenames76558
|
|
|
|
|
Ref: option-header76784
|
|
|
|
|
Ref: option-outfile77496
|
|
|
|
|
Ref: option-stdout77821
|
|
|
|
|
Node: Options Affecting Scanner Behavior78803
|
|
|
|
|
Ref: option-case-insensitive79044
|
|
|
|
|
Ref: option-lex-compat79477
|
|
|
|
|
Ref: option-batch80009
|
|
|
|
|
Ref: option-interactive80533
|
|
|
|
|
Ref: option-7bit81887
|
|
|
|
|
Ref: option-8bit83191
|
|
|
|
|
Ref: option-default83603
|
|
|
|
|
Ref: option-always-interactive83667
|
|
|
|
|
Ref: option-posix84271
|
|
|
|
|
Ref: option-stack85418
|
|
|
|
|
Ref: option-stdinit85526
|
|
|
|
|
Ref: option-yylineno86004
|
|
|
|
|
Ref: option-yywrap86447
|
|
|
|
|
Node: Code-Level And API Options86715
|
|
|
|
|
Ref: option-ansi-definitions86942
|
|
|
|
|
Ref: option-ansi-prototypes87194
|
|
|
|
|
Ref: option-bison-bridge87441
|
|
|
|
|
Ref: option-bison-locations87780
|
|
|
|
|
Ref: option-noline88040
|
|
|
|
|
Ref: option-reentrant88554
|
|
|
|
|
Ref: option-c++89165
|
|
|
|
|
Ref: option-array89291
|
|
|
|
|
Ref: option-pointer89389
|
|
|
|
|
Ref: option-prefix89517
|
|
|
|
|
Ref: option-main91045
|
|
|
|
|
Ref: option-nounistd91229
|
|
|
|
|
Ref: option-yyclass91737
|
|
|
|
|
Node: Options for Scanner Speed and Size92223
|
|
|
|
|
Ref: option-align92772
|
|
|
|
|
Ref: option-ecs93273
|
|
|
|
|
Ref: option-meta-ecs94309
|
|
|
|
|
Ref: option-read94796
|
|
|
|
|
Ref: option-full96678
|
|
|
|
|
Ref: option-fast96873
|
|
|
|
|
Node: Debugging Options97798
|
|
|
|
|
Ref: option-backup97985
|
|
|
|
|
Ref: option-debug98530
|
|
|
|
|
Ref: option-perf-report99252
|
|
|
|
|
Ref: option-nodefault99878
|
|
|
|
|
Ref: option-trace100196
|
|
|
|
|
Ref: option-nowarn100487
|
|
|
|
|
Ref: option-verbose100555
|
|
|
|
|
Ref: option-warn100984
|
|
|
|
|
Node: Miscellaneous Options101203
|
|
|
|
|
Node: Performance101660
|
|
|
|
|
Node: Cxx111902
|
|
|
|
|
Node: Reentrant119504
|
|
|
|
|
Node: Reentrant Uses120181
|
|
|
|
|
Node: Reentrant Overview121742
|
|
|
|
|
Node: Reentrant Example122541
|
|
|
|
|
Node: Reentrant Detail123315
|
|
|
|
|
Node: Specify Reentrant123748
|
|
|
|
|
Node: Extra Reentrant Argument124395
|
|
|
|
|
Node: Global Replacement125646
|
|
|
|
|
Node: Init and Destroy Functions126874
|
|
|
|
|
Node: Accessor Methods129391
|
|
|
|
|
Node: Extra Data130733
|
|
|
|
|
Node: About yyscan_t132998
|
|
|
|
|
Node: Reentrant Functions133393
|
|
|
|
|
Ref: bison-functions134875
|
|
|
|
|
Node: Lex and Posix135614
|
|
|
|
|
Node: Memory Management142985
|
|
|
|
|
Ref: memory-management143131
|
|
|
|
|
Node: The Default Memory Management143359
|
|
|
|
|
Ref: The Default Memory Management-Footnote-1147165
|
|
|
|
|
Node: Overriding The Default Memory Management147318
|
|
|
|
|
Ref: Overriding The Default Memory Management-Footnote-1149715
|
|
|
|
|
Node: A Note About yytext And Memory149879
|
|
|
|
|
Node: Serialized Tables151112
|
|
|
|
|
Ref: serialization151256
|
|
|
|
|
Node: Creating Serialized Tables152021
|
|
|
|
|
Node: Loading and Unloading Serialized Tables153629
|
|
|
|
|
Node: Tables File Format155397
|
|
|
|
|
Node: Diagnostics162411
|
|
|
|
|
Node: Limitations165820
|
|
|
|
|
Node: Bibliography167768
|
|
|
|
|
Node: FAQ168441
|
|
|
|
|
Node: When was flex born?172681
|
|
|
|
|
Node: How do I expand backslash-escape sequences in C-style quoted strings?173058
|
|
|
|
|
Node: Why do flex scanners call fileno if it is not ANSI compatible?174362
|
|
|
|
|
Node: Does flex support recursive pattern definitions?175157
|
|
|
|
|
Node: How do I skip huge chunks of input (tens of megabytes) while using flex?176003
|
|
|
|
|
Node: Flex is not matching my patterns in the same order that I defined them.176470
|
|
|
|
|
Node: My actions are executing out of order or sometimes not at all.178215
|
|
|
|
|
Node: How can I have multiple input sources feed into the same scanner at the same time?178988
|
|
|
|
|
Node: Can I build nested parsers that work with the same input file?180976
|
|
|
|
|
Node: How can I match text only at the end of a file?181982
|
|
|
|
|
Node: How can I make REJECT cascade across start condition boundaries?182786
|
|
|
|
|
Node: Why cant I use fast or full tables with interactive mode?183800
|
|
|
|
|
Node: How much faster is -F or -f than -C?185058
|
|
|
|
|
Node: If I have a simple grammar cant I just parse it with flex?185370
|
|
|
|
|
Node: Why doesn't yyrestart() set the start state back to INITIAL?185851
|
|
|
|
|
Node: How can I match C-style comments?186478
|
|
|
|
|
Node: The period isn't working the way I expected.187288
|
|
|
|
|
Node: Can I get the flex manual in another format?188535
|
|
|
|
|
Node: Does there exist a "faster" NDFA->DFA algorithm?189024
|
|
|
|
|
Node: How does flex compile the DFA so quickly?189534
|
|
|
|
|
Node: How can I use more than 8192 rules?190501
|
|
|
|
|
Node: How do I abandon a file in the middle of a scan and switch to a new file?191911
|
|
|
|
|
Node: How do I execute code only during initialization (only before the first scan)?192464
|
|
|
|
|
Node: How do I execute code at termination?193241
|
|
|
|
|
Node: Where else can I find help?193567
|
|
|
|
|
Node: Can I include comments in the "rules" section of the file?193940
|
|
|
|
|
Node: I get an error about undefined yywrap().194319
|
|
|
|
|
Node: How can I change the matching pattern at run time?194795
|
|
|
|
|
Node: How can I expand macros in the input?195157
|
|
|
|
|
Node: How can I build a two-pass scanner?196189
|
|
|
|
|
Node: How do I match any string not matched in the preceding rules?197105
|
|
|
|
|
Node: I am trying to port code from AT&T lex that uses yysptr and yysbuf.198014
|
|
|
|
|
Node: Is there a way to make flex treat NULL like a regular character?198809
|
|
|
|
|
Node: Whenever flex can not match the input it says "flex scanner jammed".199330
|
|
|
|
|
Node: Why doesn't flex have non-greedy operators like perl does?199973
|
|
|
|
|
Node: Memory leak - 16386 bytes allocated by malloc.201326
|
|
|
|
|
Ref: faq-memory-leak201624
|
|
|
|
|
Node: How do I track the byte offset for lseek()?202591
|
|
|
|
|
Node: How do I use my own I/O classes in a C++ scanner?204100
|
|
|
|
|
Node: How do I skip as many chars as possible?204943
|
|
|
|
|
Node: deleteme00206017
|
|
|
|
|
Node: Are certain equivalent patterns faster than others?206457
|
|
|
|
|
Node: Is backing up a big deal?209875
|
|
|
|
|
Node: Can I fake multi-byte character support?211781
|
|
|
|
|
Node: deleteme01213222
|
|
|
|
|
Node: Can you discuss some flex internals?214331
|
|
|
|
|
Node: unput() messes up yy_at_bol216575
|
|
|
|
|
Node: The | operator is not doing what I want217677
|
|
|
|
|
Node: Why can't flex understand this variable trailing context pattern?219223
|
|
|
|
|
Node: The ^ operator isn't working220472
|
|
|
|
|
Node: Trailing context is getting confused with trailing optional patterns221707
|
|
|
|
|
Node: Is flex GNU or not?222950
|
|
|
|
|
Node: ERASEME53224623
|
|
|
|
|
Node: I need to scan if-then-else blocks and while loops225393
|
|
|
|
|
Node: ERASEME55226592
|
|
|
|
|
Node: ERASEME56227690
|
|
|
|
|
Node: ERASEME57229048
|
|
|
|
|
Node: Is there a repository for flex scanners?230046
|
|
|
|
|
Node: How can I conditionally compile or preprocess my flex input file?230361
|
|
|
|
|
Node: Where can I find grammars for lex and yacc?230834
|
|
|
|
|
Node: I get an end-of-buffer message for each character scanned.231181
|
|
|
|
|
Node: unnamed-faq-62231776
|
|
|
|
|
Node: unnamed-faq-63232794
|
|
|
|
|
Node: unnamed-faq-64234091
|
|
|
|
|
Node: unnamed-faq-65235057
|
|
|
|
|
Node: unnamed-faq-66235843
|
|
|
|
|
Node: unnamed-faq-67236958
|
|
|
|
|
Node: unnamed-faq-68237945
|
|
|
|
|
Node: unnamed-faq-69239087
|
|
|
|
|
Node: unnamed-faq-70239800
|
|
|
|
|
Node: unnamed-faq-71240561
|
|
|
|
|
Node: unnamed-faq-72241770
|
|
|
|
|
Node: unnamed-faq-73242813
|
|
|
|
|
Node: unnamed-faq-74243737
|
|
|
|
|
Node: unnamed-faq-75244682
|
|
|
|
|
Node: unnamed-faq-76245814
|
|
|
|
|
Node: unnamed-faq-77246520
|
|
|
|
|
Node: unnamed-faq-78247413
|
|
|
|
|
Node: unnamed-faq-79248411
|
|
|
|
|
Node: unnamed-faq-80250111
|
|
|
|
|
Node: unnamed-faq-81251429
|
|
|
|
|
Node: unnamed-faq-82254229
|
|
|
|
|
Node: unnamed-faq-83255186
|
|
|
|
|
Node: unnamed-faq-84256966
|
|
|
|
|
Node: unnamed-faq-85258069
|
|
|
|
|
Node: unnamed-faq-86259076
|
|
|
|
|
Node: unnamed-faq-87260014
|
|
|
|
|
Node: unnamed-faq-88260660
|
|
|
|
|
Node: unnamed-faq-90261491
|
|
|
|
|
Node: unnamed-faq-91262754
|
|
|
|
|
Node: unnamed-faq-92265182
|
|
|
|
|
Node: unnamed-faq-93265681
|
|
|
|
|
Node: unnamed-faq-94266608
|
|
|
|
|
Node: unnamed-faq-95268020
|
|
|
|
|
Node: unnamed-faq-96269538
|
|
|
|
|
Node: unnamed-faq-97270297
|
|
|
|
|
Node: unnamed-faq-98270964
|
|
|
|
|
Node: unnamed-faq-99271629
|
|
|
|
|
Node: unnamed-faq-100272558
|
|
|
|
|
Node: unnamed-faq-101273268
|
|
|
|
|
Node: What is the difference between YYLEX_PARAM and YY_DECL?274081
|
|
|
|
|
Node: Why do I get "conflicting types for yylex" error?274602
|
|
|
|
|
Node: How do I access the values set in a Flex action from within a Bison action?275132
|
|
|
|
|
Node: Appendices275563
|
|
|
|
|
Node: Makefiles and Flex275772
|
|
|
|
|
Ref: Makefiles and Flex-Footnote-1278968
|
|
|
|
|
Ref: Makefiles and Flex-Footnote-2279085
|
|
|
|
|
Ref: Makefiles and Flex-Footnote-3279271
|
|
|
|
|
Node: Bison Bridge279322
|
|
|
|
|
Ref: Bison Bridge-Footnote-1281987
|
|
|
|
|
Node: M4 Dependency282179
|
|
|
|
|
Ref: M4 Dependency-Footnote-1283584
|
|
|
|
|
Node: Common Patterns283719
|
|
|
|
|
Node: Numbers284010
|
|
|
|
|
Node: Identifiers284987
|
|
|
|
|
Node: Quoted Constructs285814
|
|
|
|
|
Node: Addresses286866
|
|
|
|
|
Node: Indices288179
|
|
|
|
|
Node: Concept Index288417
|
|
|
|
|
Node: Index of Functions and Macros313700
|
|
|
|
|
Node: Index of Variables318596
|
|
|
|
|
Node: Index of Data Types320262
|
|
|
|
|
Node: Index of Hooks321150
|
|
|
|
|
Node: Index of Scanner Options321718
|
2012-06-06 16:10:32 +02:00
|
|
|
|
|
|
|
|
|
End Tag Table
|