summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorManoj Srivastava <srivasta@golden-gryphon.com>2006-02-25 11:25:45 -0800
committerManoj Srivastava <srivasta@golden-gryphon.com>2006-02-25 11:25:45 -0800
commit174cabe1a0b3cc6b2a061106f74e9b1c04252eec (patch)
tree3fe25aa13e39b2553ee696816df57a3384dc682b /doc
parentc2b22e08bd48278f2cf125f054c9f6286e345ff0 (diff)
Imported Upstream version 2.5.33
Diffstat (limited to 'doc')
-rw-r--r--doc/Makefile.in60
-rw-r--r--doc/flex.14
-rw-r--r--doc/flex.info461
-rw-r--r--doc/flex.info-111
-rw-r--r--doc/flex.info-22
-rw-r--r--doc/flex.info-332
-rw-r--r--doc/flex.info-47
-rw-r--r--doc/flex.info-54
-rw-r--r--doc/flex.info-649
-rw-r--r--doc/flex.info-72
-rw-r--r--doc/flex.texi77
-rwxr-xr-xdoc/mdate-sh58
-rw-r--r--doc/stamp-vti8
-rw-r--r--doc/version.texi8
14 files changed, 469 insertions, 314 deletions
diff --git a/doc/Makefile.in b/doc/Makefile.in
index 558853f..f38e413 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.7 from Makefile.am.
+# Makefile.in generated by automake 1.7.5 from Makefile.am.
# @configure_input@
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -75,6 +75,7 @@ LEXLIB = @LEXLIB@
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
+LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LN_S = @LN_S@
LTLIBICONV = @LTLIBICONV@
@@ -111,6 +112,7 @@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
+am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
bindir = @bindir@
build = @build@
@@ -157,6 +159,7 @@ EXTRA_DIST = \
$(man_MANS)
subdir = doc
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
@@ -183,9 +186,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
.texi.info:
- @rm -f $@ $@-[0-9] $@-[0-9][0-9]
+ @rm -f $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]
$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
- `test -f '$<' || echo '$(srcdir)/'`$< -o $@
+ -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
.texi.dvi:
TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
@@ -200,7 +203,7 @@ flex.info: flex.texi version.texi
flex.dvi: flex.texi version.texi
flex.pdf: flex.texi version.texi
version.texi: stamp-vti
-stamp-vti: flex.texi $(top_srcdir)/configure.in
+stamp-vti: flex.texi $(top_srcdir)/configure
@(dir=.; test -f ./flex.texi || dir=$(srcdir); \
set `$(SHELL) $(srcdir)/mdate-sh $$dir/flex.texi`; \
echo "@set UPDATED $$1 $$2 $$3"; \
@@ -223,7 +226,7 @@ TEXI2DVI = texi2dvi
TEXI2PDF = $(TEXI2DVI) --pdf --batch
DVIPS = dvips
.dvi.ps:
- $(DVIPS) $< -o $@
+ $(DVIPS) -o $@ $<
uninstall-info-am:
$(PRE_UNINSTALL)
@@ -231,16 +234,19 @@ uninstall-info-am:
install-info --version | grep -i -v debian) >/dev/null 2>&1; then \
list='$(INFO_DEPS)'; \
for file in $$list; do \
- echo " install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$file"; \
- install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$file; \
+ relfile=`echo "$$file" | sed 's|^.*/||'`; \
+ echo " install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$relfile"; \
+ install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$relfile; \
done; \
else :; fi
@$(NORMAL_UNINSTALL)
@list='$(INFO_DEPS)'; \
for file in $$list; do \
+ relfile=`echo "$$file" | sed 's|^.*/||'`; \
+ relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \
(if cd $(DESTDIR)$(infodir); then \
- echo " rm -f $$file $$file-[0-9] $$file-[0-9][0-9])"; \
- rm -f $$file $$file-[0-9] $$file-[0-9][0-9]; \
+ echo " rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9])"; \
+ rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \
else :; fi); \
done
@@ -256,16 +262,16 @@ dist-info: $(INFO_DEPS)
done
mostlyclean-aminfo:
- -rm -f flex.aux flex.cp flex.cps flex.fn flex.fns flex.hk flex.ky flex.log \
- flex.op flex.pg flex.tmp flex.toc flex.tp flex.tps flex.vr \
- flex.vrs flex.dvi flex.pdf flex.ps
+ -rm -f flex.aux flex.cp flex.cps flex.fn flex.fns flex.hk flex.hks flex.ky \
+ flex.kys flex.log flex.op flex.ops flex.pg flex.pgs flex.tmp \
+ flex.toc flex.tp flex.tps flex.vr flex.vrs flex.dvi flex.pdf \
+ flex.ps
maintainer-clean-aminfo:
- list='$(INFO_DEPS)'; for i in $$list; do \
- rm -f $$i; \
- if test "`echo $$i-[0-9]*`" != "$$i-[0-9]*"; then \
- rm -f $$i-[0-9]*; \
- fi; \
+ @list='$(INFO_DEPS)'; for i in $$list; do \
+ i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \
+ echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \
+ rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \
done
man1dir = $(mandir)/man1
@@ -304,6 +310,10 @@ uninstall-man1:
done; \
for i in $$list; do \
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+ case "$$ext" in \
+ 1*) ;; \
+ *) ext='1' ;; \
+ esac; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
inst=`echo $$inst | sed -e 's/^.*\///'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
@@ -323,9 +333,11 @@ distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
@@ -355,7 +367,6 @@ all-am: Makefile $(INFO_DEPS) $(MANS)
installdirs:
$(mkinstalldirs) $(DESTDIR)$(infodir) $(DESTDIR)$(man1dir)
-
install: install-am
install-exec: install-exec-am
install-data: install-data-am
@@ -410,9 +421,11 @@ install-info-am: $(INFO_DEPS)
@list='$(INFO_DEPS)'; \
for file in $$list; do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
- for ifile in echo $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9]; do \
+ file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \
+ for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \
+ $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \
if test -f $$ifile; then \
- relfile=`expr "$$ifile" : "$$d/\(.*\)"`; \
+ relfile=`echo "$$ifile" | sed 's|^.*/||'`; \
echo " $(INSTALL_DATA) $$ifile $(DESTDIR)$(infodir)/$$relfile"; \
$(INSTALL_DATA) $$ifile $(DESTDIR)$(infodir)/$$relfile; \
else : ; fi; \
@@ -423,8 +436,9 @@ install-info-am: $(INFO_DEPS)
install-info --version | grep -i -v debian) >/dev/null 2>&1; then \
list='$(INFO_DEPS)'; \
for file in $$list; do \
- echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\
- install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\
+ relfile=`echo "$$file" | sed 's|^.*/||'`; \
+ echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$relfile";\
+ install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$relfile || :;\
done; \
else : ; fi
install-man: install-man1
diff --git a/doc/flex.1 b/doc/flex.1
index 2a34650..5218e17 100644
--- a/doc/flex.1
+++ b/doc/flex.1
@@ -1,5 +1,5 @@
-.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.27.
-.TH FLEX "1" "April 2003" "flex 2.5.31" "User Commands"
+.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.29.
+.TH FLEX "1" "February 2006" "flex 2.5.33" "User Commands"
.SH NAME
flex \- fast lexical analyzer generator
.SH SYNOPSIS
diff --git a/doc/flex.info b/doc/flex.info
index 012bc80..d32eadc 100644
--- a/doc/flex.info
+++ b/doc/flex.info
@@ -1,4 +1,4 @@
-This is flex.info, produced by makeinfo version 4.3d from flex.texi.
+This is flex.info, produced by makeinfo version 4.5 from flex.texi.
INFO-DIR-SECTION Programming
START-INFO-DIR-ENTRY
@@ -39,236 +39,239 @@ WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.

Indirect:
-flex.info-1: 1543
-flex.info-2: 44188
-flex.info-3: 94777
-flex.info-4: 143377
-flex.info-5: 193020
-flex.info-6: 242671
-flex.info-7: 279163
+flex.info-1: 1542
+flex.info-2: 44385
+flex.info-3: 94974
+flex.info-4: 144097
+flex.info-5: 193935
+flex.info-6: 243586
+flex.info-7: 281964

Tag Table:
(Indirect)
-Node: Top1543
-Node: Copyright7312
-Node: Reporting Bugs8746
-Node: Introduction9041
-Node: Simple Examples9868
-Node: Format13257
-Node: Definitions Section13670
-Ref: Definitions Section-Footnote-115928
-Node: Rules Section15996
-Node: User Code Section17149
-Node: Comments in the Input17582
-Node: Patterns18951
-Ref: case and character ranges24209
-Node: Matching26884
-Node: Actions30169
-Node: Generated Scanner39171
-Node: Start Conditions44188
-Node: Multiple Input Buffers54900
-Ref: Scanning Strings61518
-Node: EOF63134
-Node: Misc Macros64729
-Node: User Values67581
-Node: Yacc69909
-Node: Scanner Options70812
-Node: Options for Specifing Filenames73572
-Ref: option-header73785
-Ref: option-outfile74497
-Ref: option-stdout74822
-Node: Options Affecting Scanner Behavior75804
-Ref: option-case-insensitive76034
-Ref: option-lex-compat76467
-Ref: option-batch76999
-Ref: option-interactive77523
-Ref: option-7bit78877
-Ref: option-8bit80181
-Ref: option-default80593
-Ref: option-always-interactive80657
-Ref: option-posix81261
-Ref: option-stack82408
-Ref: option-stdinit82516
-Ref: option-yylineno82994
-Ref: option-yywrap83437
-Node: Code-Level And API Options83705
-Ref: option-ansi-definitions83922
-Ref: option-ansi-prototypes84174
-Ref: option-bison-bridge84421
-Ref: option-bison-locations84760
-Ref: option-noline85020
-Ref: option-reentrant85534
-Ref: option-c++86145
-Ref: option-array86271
-Ref: option-pointer86369
-Ref: option-prefix86497
-Ref: option-main88026
-Ref: option-nounistd88210
-Ref: option-yyclass88718
-Node: Options for Scanner Speed and Size89198
-Ref: option-align89737
-Ref: option-ecs90238
-Ref: option-meta-ecs91274
-Ref: option-read91761
-Ref: option-full93644
-Ref: option-fast93839
-Node: Debugging Options94777
-Ref: option-backup94954
-Ref: option-debug95499
-Ref: option-perf-report96222
-Ref: option-nodefault96848
-Ref: option-trace97166
-Ref: option-nowarn97457
-Ref: option-verbose97525
-Ref: option-warn97954
-Node: Miscellaneous Options98173
-Node: Performance98647
-Node: Cxx108984
-Node: Reentrant116582
-Node: Reentrant Uses117256
-Node: Reentrant Overview118857
-Node: Reentrant Example119649
-Node: Reentrant Detail120406
-Node: Specify Reentrant120832
-Node: Extra Reentrant Argument121468
-Node: Global Replacement122709
-Node: Init and Destroy Functions123927
-Node: Accessor Methods126080
-Node: Extra Data127413
-Node: About yyscan_t129584
-Node: Reentrant Functions129969
-Ref: bison-functions131451
-Node: Lex and Posix132192
-Node: Memory Management139441
-Ref: memory-management139581
-Node: The Default Memory Management139812
-Ref: The Default Memory Management-Footnote-1143224
-Node: Overriding The Default Memory Management143377
-Ref: Overriding The Default Memory Management-Footnote-1145815
-Node: A Note About yytext And Memory145979
-Node: Serialized Tables147205
-Ref: serialization147343
-Node: Creating Serialized Tables148111
-Node: Loading and Unloading Serialized Tables149714
-Node: Tables File Format151473
-Node: Diagnostics158482
-Node: Limitations161890
-Node: Bibliography163835
-Node: FAQ164505
-Node: When was flex born?168543
-Node: How do I expand \ escape sequences in C-style quoted strings?168915
-Node: Why do flex scanners call fileno if it is not ANSI compatible?170198
-Node: Does flex support recursive pattern definitions?170988
-Node: How do I skip huge chunks of input (tens of megabytes) while using flex?171838
-Node: Flex is not matching my patterns in the same order that I defined them.172308
-Node: My actions are executing out of order or sometimes not at all.174057
-Node: How can I have multiple input sources feed into the same scanner at the same time?174845
-Node: Can I build nested parsers that work with the same input file?176836
-Node: How can I match text only at the end of a file?177845
-Node: How can I make REJECT cascade across start condition boundaries?178653
-Node: Why cant I use fast or full tables with interactive mode?179672
-Node: How much faster is -F or -f than -C?180934
-Node: If I have a simple grammar cant I just parse it with flex?181249
-Node: Why doesnt yyrestart() set the start state back to INITIAL?181732
-Node: How can I match C-style comments?182361
-Node: The period isnt working the way I expected.183176
-Node: Can I get the flex manual in another format?184425
-Node: Does there exist a "faster" NDFA->DFA algorithm?184916
-Node: How does flex compile the DFA so quickly?185428
-Node: How can I use more than 8192 rules?186398
-Node: How do I abandon a file in the middle of a scan and switch to a new file?187812
-Node: How do I execute code only during initialization (only before the first scan)?188368
-Node: How do I execute code at termination?189130
-Node: Where else can I find help?189459
-Node: Can I include comments in the "rules" section of the file?189834
-Node: I get an error about undefined yywrap().190216
-Node: How can I change the matching pattern at run time?190696
-Node: How can I expand macros in the input?191061
-Node: How can I build a two-pass scanner?192102
-Node: How do I match any string not matched in the preceding rules?193020
-Node: I am trying to port code from AT&T lex that uses yysptr and yysbuf.193933
-Node: Is there a way to make flex treat NULL like a regular character?194731
-Node: Whenever flex can not match the input it says "flex scanner jammed".195255
-Node: Why doesnt flex have non-greedy operators like perl does?195906
-Node: Memory leak - 16386 bytes allocated by malloc.197261
-Ref: faq-memory-leak197558
-Node: How do I track the byte offset for lseek()?198529
-Node: How do I use my own I/O classes in a C++ scanner?200040
-Node: How do I skip as many chars as possible?200886
-Node: deleteme00201966
-Node: Are certain equivalent patterns faster than others?202412
-Node: Is backing up a big deal?205901
-Node: Can I fake multi-byte character support?207873
-Node: deleteme01209350
-Node: Can you discuss some flex internals?210475
-Node: unput() messes up yy_at_bol212765
-Node: The | operator is not doing what I want213903
-Node: Why can't flex understand this variable trailing context pattern?215495
-Node: The ^ operator isn't working216760
-Node: Trailing context is getting confused with trailing optional patterns218031
-Node: Is flex GNU or not?219300
-Node: ERASEME53221014
-Node: I need to scan if-then-else blocks and while loops221810
-Node: ERASEME55223030
-Node: ERASEME56224144
-Node: ERASEME57225538
-Node: Is there a repository for flex scanners?226572
-Node: How can I conditionally compile or preprocess my flex input file?226890
-Node: Where can I find grammars for lex and yacc?227366
-Node: I get an end-of-buffer message for each character scanned.227716
-Node: unnamed-faq-62228314
-Node: unnamed-faq-63229363
-Node: unnamed-faq-64230676
-Node: unnamed-faq-65231678
-Node: unnamed-faq-66232480
-Node: unnamed-faq-67233611
-Node: unnamed-faq-68234614
-Node: unnamed-faq-69235772
-Node: unnamed-faq-70236506
-Node: unnamed-faq-71237283
-Node: unnamed-faq-72238513
-Node: unnamed-faq-73239582
-Node: unnamed-faq-74240527
-Node: unnamed-faq-75241498
-Node: unnamed-faq-76242671
-Node: unnamed-faq-77243393
-Node: unnamed-faq-78244302
-Node: unnamed-faq-79245316
-Node: unnamed-faq-80247052
-Node: unnamed-faq-81248396
-Node: unnamed-faq-82251237
-Node: unnamed-faq-83252220
-Node: unnamed-faq-84254026
-Node: unnamed-faq-85255145
-Node: unnamed-faq-86256193
-Node: unnamed-faq-87257167
-Node: unnamed-faq-88257829
-Node: unnamed-faq-90258686
-Node: unnamed-faq-91259985
-Node: unnamed-faq-92262469
-Node: unnamed-faq-93262984
-Node: unnamed-faq-94263927
-Node: unnamed-faq-95265370
-Node: unnamed-faq-96266904
-Node: unnamed-faq-97267689
-Node: unnamed-faq-98268372
-Node: unnamed-faq-99269063
-Node: unnamed-faq-100270023
-Node: unnamed-faq-101270749
-Node: Appendices271519
-Node: Makefiles and Flex271686
-Ref: Makefiles and Flex-Footnote-1274903
-Ref: Makefiles and Flex-Footnote-2275020
-Node: Bison Bridge275071
-Ref: Bison Bridge-Footnote-1277745
-Node: M4 Dependency277937
-Ref: M4 Dependency-Footnote-1278853
-Node: Indices278925
-Node: Concept Index279163
-Node: Index of Functions and Macros296037
-Node: Index of Variables299256
-Node: Index of Data Types300483
-Node: Index of Hooks301087
-Node: Index of Scanner Options301589
+Node: Top1542
+Node: Copyright7508
+Node: Reporting Bugs8942
+Node: Introduction9238
+Node: Simple Examples10065
+Node: Format13454
+Node: Definitions Section13867
+Ref: Definitions Section-Footnote-116125
+Node: Rules Section16193
+Node: User Code Section17346
+Node: Comments in the Input17779
+Node: Patterns19148
+Ref: case and character ranges24406
+Node: Matching27081
+Node: Actions30366
+Node: Generated Scanner39368
+Node: Start Conditions44385
+Node: Multiple Input Buffers55097
+Ref: Scanning Strings61715
+Node: EOF63331
+Node: Misc Macros64926
+Node: User Values67778
+Node: Yacc70106
+Node: Scanner Options71009
+Node: Options for Specifing Filenames73769
+Ref: option-header73982
+Ref: option-outfile74694
+Ref: option-stdout75019
+Node: Options Affecting Scanner Behavior76001
+Ref: option-case-insensitive76231
+Ref: option-lex-compat76664
+Ref: option-batch77196
+Ref: option-interactive77720
+Ref: option-7bit79074
+Ref: option-8bit80378
+Ref: option-default80790
+Ref: option-always-interactive80854
+Ref: option-posix81458
+Ref: option-stack82605
+Ref: option-stdinit82713
+Ref: option-yylineno83191
+Ref: option-yywrap83634
+Node: Code-Level And API Options83902
+Ref: option-ansi-definitions84119
+Ref: option-ansi-prototypes84371
+Ref: option-bison-bridge84618
+Ref: option-bison-locations84957
+Ref: option-noline85217
+Ref: option-reentrant85731
+Ref: option-c++86342
+Ref: option-array86468
+Ref: option-pointer86566
+Ref: option-prefix86694
+Ref: option-main88223
+Ref: option-nounistd88407
+Ref: option-yyclass88915
+Node: Options for Scanner Speed and Size89395
+Ref: option-align89934
+Ref: option-ecs90435
+Ref: option-meta-ecs91471
+Ref: option-read91958
+Ref: option-full93841
+Ref: option-fast94036
+Node: Debugging Options94974
+Ref: option-backup95151
+Ref: option-debug95696
+Ref: option-perf-report96419
+Ref: option-nodefault97045
+Ref: option-trace97363
+Ref: option-nowarn97654
+Ref: option-verbose97722
+Ref: option-warn98151
+Node: Miscellaneous Options98370
+Node: Performance98844
+Node: Cxx109181
+Node: Reentrant116780
+Node: Reentrant Uses117454
+Node: Reentrant Overview119055
+Node: Reentrant Example119847
+Node: Reentrant Detail120604
+Node: Specify Reentrant121030
+Node: Extra Reentrant Argument121666
+Node: Global Replacement122907
+Node: Init and Destroy Functions124125
+Node: Accessor Methods126278
+Node: Extra Data127611
+Node: About yyscan_t129782
+Node: Reentrant Functions130167
+Ref: bison-functions131649
+Node: Lex and Posix132390
+Node: Memory Management139771
+Ref: memory-management139911
+Node: The Default Memory Management140142
+Ref: The Default Memory Management-Footnote-1143944
+Node: Overriding The Default Memory Management144097
+Ref: Overriding The Default Memory Management-Footnote-1146535
+Node: A Note About yytext And Memory146699
+Node: Serialized Tables147925
+Ref: serialization148063
+Node: Creating Serialized Tables148831
+Node: Loading and Unloading Serialized Tables150434
+Node: Tables File Format152193
+Node: Diagnostics159202
+Node: Limitations162610
+Node: Bibliography164555
+Node: FAQ165225
+Node: When was flex born?169457
+Node: How do I expand \ escape sequences in C-style quoted strings?169829
+Node: Why do flex scanners call fileno if it is not ANSI compatible?171112
+Node: Does flex support recursive pattern definitions?171902
+Node: How do I skip huge chunks of input (tens of megabytes) while using flex?172752
+Node: Flex is not matching my patterns in the same order that I defined them.173222
+Node: My actions are executing out of order or sometimes not at all.174971
+Node: How can I have multiple input sources feed into the same scanner at the same time?175759
+Node: Can I build nested parsers that work with the same input file?177750
+Node: How can I match text only at the end of a file?178759
+Node: How can I make REJECT cascade across start condition boundaries?179567
+Node: Why cant I use fast or full tables with interactive mode?180586
+Node: How much faster is -F or -f than -C?181848
+Node: If I have a simple grammar cant I just parse it with flex?182163
+Node: Why doesnt yyrestart() set the start state back to INITIAL?182646
+Node: How can I match C-style comments?183275
+Node: The period isnt working the way I expected.184090
+Node: Can I get the flex manual in another format?185339
+Node: Does there exist a "faster" NDFA->DFA algorithm?185830
+Node: How does flex compile the DFA so quickly?186342
+Node: How can I use more than 8192 rules?187312
+Node: How do I abandon a file in the middle of a scan and switch to a new file?188726
+Node: How do I execute code only during initialization (only before the first scan)?189282
+Node: How do I execute code at termination?190044
+Node: Where else can I find help?190373
+Node: Can I include comments in the "rules" section of the file?190749
+Node: I get an error about undefined yywrap().191131
+Node: How can I change the matching pattern at run time?191611
+Node: How can I expand macros in the input?191976
+Node: How can I build a two-pass scanner?193017
+Node: How do I match any string not matched in the preceding rules?193935
+Node: I am trying to port code from AT&T lex that uses yysptr and yysbuf.194848
+Node: Is there a way to make flex treat NULL like a regular character?195646
+Node: Whenever flex can not match the input it says "flex scanner jammed".196170
+Node: Why doesnt flex have non-greedy operators like perl does?196821
+Node: Memory leak - 16386 bytes allocated by malloc.198176
+Ref: faq-memory-leak198473
+Node: How do I track the byte offset for lseek()?199444
+Node: How do I use my own I/O classes in a C++ scanner?200955
+Node: How do I skip as many chars as possible?201801
+Node: deleteme00202881
+Node: Are certain equivalent patterns faster than others?203327
+Node: Is backing up a big deal?206816
+Node: Can I fake multi-byte character support?208788
+Node: deleteme01210265
+Node: Can you discuss some flex internals?211390
+Node: unput() messes up yy_at_bol213680
+Node: The | operator is not doing what I want214818
+Node: Why can't flex understand this variable trailing context pattern?216410
+Node: The ^ operator isn't working217675
+Node: Trailing context is getting confused with trailing optional patterns218946
+Node: Is flex GNU or not?220215
+Node: ERASEME53221929
+Node: I need to scan if-then-else blocks and while loops222725
+Node: ERASEME55223945
+Node: ERASEME56225059
+Node: ERASEME57226453
+Node: Is there a repository for flex scanners?227487
+Node: How can I conditionally compile or preprocess my flex input file?227805
+Node: Where can I find grammars for lex and yacc?228281
+Node: I get an end-of-buffer message for each character scanned.228631
+Node: unnamed-faq-62229229
+Node: unnamed-faq-63230278
+Node: unnamed-faq-64231591
+Node: unnamed-faq-65232593
+Node: unnamed-faq-66233395
+Node: unnamed-faq-67234526
+Node: unnamed-faq-68235529
+Node: unnamed-faq-69236687
+Node: unnamed-faq-70237421
+Node: unnamed-faq-71238198
+Node: unnamed-faq-72239428
+Node: unnamed-faq-73240497
+Node: unnamed-faq-74241442
+Node: unnamed-faq-75242413
+Node: unnamed-faq-76243586
+Node: unnamed-faq-77244308
+Node: unnamed-faq-78245217
+Node: unnamed-faq-79246231
+Node: unnamed-faq-80247967
+Node: unnamed-faq-81249311
+Node: unnamed-faq-82252152
+Node: unnamed-faq-83253135
+Node: unnamed-faq-84254941
+Node: unnamed-faq-85256060
+Node: unnamed-faq-86257108
+Node: unnamed-faq-87258082
+Node: unnamed-faq-88258744
+Node: unnamed-faq-90259601
+Node: unnamed-faq-91260900
+Node: unnamed-faq-92263384
+Node: unnamed-faq-93263899
+Node: unnamed-faq-94264842
+Node: unnamed-faq-95266285
+Node: unnamed-faq-96267819
+Node: unnamed-faq-97268604
+Node: unnamed-faq-98269287
+Node: unnamed-faq-99269978
+Node: unnamed-faq-100270938
+Node: unnamed-faq-101271664
+Node: What is the difference between YYLEX_PARAM and YY_DECL?272498
+Node: Why do I get "conflicting types for yylex" error?273023
+Node: How do I access the values set in a Flex action from within a Bison action?273556
+Node: Appendices273990
+Node: Makefiles and Flex274157
+Ref: Makefiles and Flex-Footnote-1277374
+Ref: Makefiles and Flex-Footnote-2277491
+Node: Bison Bridge277542
+Ref: Bison Bridge-Footnote-1280216
+Node: M4 Dependency280408
+Ref: M4 Dependency-Footnote-1281591
+Node: Indices281726
+Node: Concept Index281964
+Node: Index of Functions and Macros298838
+Node: Index of Variables302057
+Node: Index of Data Types303284
+Node: Index of Hooks303888
+Node: Index of Scanner Options304390

End Tag Table
diff --git a/doc/flex.info-1 b/doc/flex.info-1
index 178d382..da0d581 100644
--- a/doc/flex.info-1
+++ b/doc/flex.info-1
@@ -1,4 +1,4 @@
-This is flex.info, produced by makeinfo version 4.3d from flex.texi.
+This is flex.info, produced by makeinfo version 4.5 from flex.texi.
INFO-DIR-SECTION Programming
START-INFO-DIR-ENTRY
@@ -47,8 +47,8 @@ flex
perform pattern-matching on text. The manual includes both tutorial and
reference sections.
- This edition of `The flex Manual' documents `flex' version 2.5.31.
-It was last updated on 27 March 2003.
+ This edition of `The flex Manual' documents `flex' version 2.5.33.
+It was last updated on 20 February 2006.
* Menu:
@@ -230,6 +230,9 @@ FAQ
* unnamed-faq-99::
* unnamed-faq-100::
* unnamed-faq-101::
+* What is the difference between YYLEX_PARAM and YY_DECL?::
+* Why do I get "conflicting types for yylex" error?::
+* How do I access the values set in a Flex action from within a Bison action?::
Appendices
@@ -292,7 +295,7 @@ Reporting Bugs
If you have problems with `flex' or think you have found a bug,
please send mail detailing your problem to
-<lex-help@lists.sourceforge.net>. Patches are always welcome.
+<flex-help@lists.sourceforge.net>. Patches are always welcome.

File: flex.info, Node: Introduction, Next: Simple Examples, Prev: Reporting Bugs, Up: Top
diff --git a/doc/flex.info-2 b/doc/flex.info-2
index 87025fa..b2ca705 100644
--- a/doc/flex.info-2
+++ b/doc/flex.info-2
@@ -1,4 +1,4 @@
-This is flex.info, produced by makeinfo version 4.3d from flex.texi.
+This is flex.info, produced by makeinfo version 4.5 from flex.texi.
INFO-DIR-SECTION Programming
START-INFO-DIR-ENTRY
diff --git a/doc/flex.info-3 b/doc/flex.info-3
index a6cc465..7884ba1 100644
--- a/doc/flex.info-3
+++ b/doc/flex.info-3
@@ -1,4 +1,4 @@
-This is flex.info, produced by makeinfo version 4.3d from flex.texi.
+This is flex.info, produced by makeinfo version 4.5 from flex.texi.
INFO-DIR-SECTION Programming
START-INFO-DIR-ENTRY
@@ -612,18 +612,18 @@ scanner classes; you must use `%pointer' (the default).
If you want to create multiple (different) lexer classes, you use the
`-P' flag (or the `prefix=' option) to rename each `yyFlexLexer' to
-some other `xxFlexLexer'. You then can include `FlexLexer.h>' in your
+some other `xxFlexLexer'. You then can include `<FlexLexer.h>' in your
other sources once per lexer class, first renaming `yyFlexLexer' as
follows:
#undef yyFlexLexer
#define yyFlexLexer xxFlexLexer
- #include <FflexLexer.h>
+ #include <FlexLexer.h>
#undef yyFlexLexer
#define yyFlexLexer zzFlexLexer
- #include FlexLexer.h>
+ #include <FlexLexer.h>
if, for example, you used `%option prefix="xx"' for one of your
scanners and `%option prefix="zz"' for the other.
@@ -1217,6 +1217,10 @@ exceptions:
`flex' being used is a beta version, then the symbol `FLEX_BETA'
is defined.
+ * The symbols `[[' and `]]' in the code sections of the input may
+ conflict with the m4 delimiters. *Note M4 Dependency::.
+
+
The following `flex' features are not included in `lex' or the POSIX
specification:
@@ -1312,13 +1316,19 @@ all memory when you call `yylex_destroy' *Note faq-memory-leak::.
will grow if necessary, doubling the size each time. Flex frees
this memory when you call yylex_destroy(). The default size of
this buffer (16384 bytes) is almost always too large. The ideal
- size for this buffer is the length of the longest token expected.
- Flex will allocate a few extra bytes for housekeeping.
-
-16kb for the REJECT state. This will only be allocated if you use REJECT.
- The size is the same as the input buffer, so if you override the
- size of the input buffer, then you automatically override the size
- of this buffer as well.
+ size for this buffer is the length of the longest token expected,
+ in bytes, plus a little more. Flex will allocate a few extra
+ bytes for housekeeping. Currently, to override the size of the
+ input buffer you must `#define YY_BUF_SIZE' to whatever number of
+ bytes you want. We don't plan to change this in the near future,
+ but we reserve the right to do so if we ever add a more robust
+ memory management API.
+
+64kb for the REJECT state. This will only be allocated if you use REJECT.
+ The size is the large enough to hold the same number of states as
+ characters in the input buffer. If you override the size of the
+ input buffer (via `YY_BUF_SIZE'), then you automatically override
+ the size of this buffer as well.
100 bytes for the start condition stack.
Flex allocates memory for the start condition stack. This is the
diff --git a/doc/flex.info-4 b/doc/flex.info-4
index 260ea8d..2304293 100644
--- a/doc/flex.info-4
+++ b/doc/flex.info-4
@@ -1,4 +1,4 @@
-This is flex.info, produced by makeinfo version 4.3d from flex.texi.
+This is flex.info, produced by makeinfo version 4.5 from flex.texi.
INFO-DIR-SECTION Programming
START-INFO-DIR-ENTRY
@@ -685,6 +685,9 @@ here.
* unnamed-faq-99::
* unnamed-faq-100::
* unnamed-faq-101::
+* What is the difference between YYLEX_PARAM and YY_DECL?::
+* Why do I get "conflicting types for yylex" error?::
+* How do I access the values set in a Flex action from within a Bison action?::

File: flex.info, Node: When was flex born?, Next: How do I expand \ escape sequences in C-style quoted strings?, Up: FAQ
@@ -1161,7 +1164,7 @@ Where else can I find help?
===========================
You can find the flex homepage on the web at
-`http://lex.sourceforge.net/'. See that page for details about flex
+`http://flex.sourceforge.net/'. See that page for details about flex
mailing lists as well.

diff --git a/doc/flex.info-5 b/doc/flex.info-5
index c3b0c72..8935ccf 100644
--- a/doc/flex.info-5
+++ b/doc/flex.info-5
@@ -1,4 +1,4 @@
-This is flex.info, produced by makeinfo version 4.3d from flex.texi.
+This is flex.info, produced by makeinfo version 4.5 from flex.texi.
INFO-DIR-SECTION Programming
START-INFO-DIR-ENTRY
@@ -78,7 +78,7 @@ Is there a way to make flex treat NULL like a regular character?
================================================================
Yes, `\0' and `\x00' should both do the trick. Perhaps you have an
-ancient version of `flex'. The latest release is version 2.5.31.
+ancient version of `flex'. The latest release is version 2.5.33.

File: flex.info, Node: Whenever flex can not match the input it says "flex scanner jammed"., Next: Why doesnt flex have non-greedy operators like perl does?, Prev: Is there a way to make flex treat NULL like a regular character?, Up: FAQ
diff --git a/doc/flex.info-6 b/doc/flex.info-6
index 4af8802..04f95d8 100644
--- a/doc/flex.info-6
+++ b/doc/flex.info-6
@@ -1,4 +1,4 @@
-This is flex.info, produced by makeinfo version 4.3d from flex.texi.
+This is flex.info, produced by makeinfo version 4.5 from flex.texi.
INFO-DIR-SECTION Programming
START-INFO-DIR-ENTRY
@@ -826,7 +826,7 @@ unnamed-faq-100
Vern

-File: flex.info, Node: unnamed-faq-101, Prev: unnamed-faq-100, Up: FAQ
+File: flex.info, Node: unnamed-faq-101, Next: What is the difference between YYLEX_PARAM and YY_DECL?, Prev: unnamed-faq-100, Up: FAQ
unnamed-faq-101
===============
@@ -857,6 +857,40 @@ unnamed-faq-101
Vern

+File: flex.info, Node: What is the difference between YYLEX_PARAM and YY_DECL?, Next: Why do I get "conflicting types for yylex" error?, Prev: unnamed-faq-101, Up: FAQ
+
+What is the difference between YYLEX_PARAM and YY_DECL?
+=======================================================
+
+ YYLEX_PARAM is not a flex symbol. It is for Bison. It tells Bison to
+pass extra params when it calls yylex() from the parser.
+
+ YY_DECL is the Flex declaration of yylex. The default is similar to
+this:
+
+
+ #define int yy_lex ()
+
+
+File: flex.info, Node: Why do I get "conflicting types for yylex" error?, Next: How do I access the values set in a Flex action from within a Bison action?, Prev: What is the difference between YYLEX_PARAM and YY_DECL?, Up: FAQ
+
+Why do I get "conflicting types for yylex" error?
+=================================================
+
+ This is a compiler error regarding a generated Bison parser, not a
+Flex scanner. It means you need a prototype of yylex() in the top of
+the Bison file. Be sure the prototype matches YY_DECL.
+
+
+File: flex.info, Node: How do I access the values set in a Flex action from within a Bison action?, Prev: Why do I get "conflicting types for yylex" error?, Up: FAQ
+
+How do I access the values set in a Flex action from within a Bison action?
+===========================================================================
+
+ With $1, $2, $3, etc. These are called "Semantic Values" in the
+Bison manual. See *Note Top: (bison)Top.
+
+
File: flex.info, Node: Appendices, Next: Indices, Prev: FAQ, Up: Top
Appendices
@@ -1064,11 +1098,15 @@ the actions will be sent through m4. Please follow these rules to
protect your code from unwanted `m4' processing.
* Do not use symbols that begin with, `m4_', such as, `m4_define',
- or `m4_include', since those are reserved for `m4' macro names.
+ or `m4_include', since those are reserved for `m4' macro names. If
+ for some reason you need m4_ as a prefix, use a preprocessor
+ #define to get your symbol past m4 unmangled.
* Do not use the strings `[[' or `]]' anywhere in your code. The
- former is not valid in C, except within comments, but the latter
- is valid in code such as `x[y[z]]'.
+ former is not valid in C, except within comments and strings, but
+ the latter is valid in code such as `x[y[z]]'. The solution is
+ simple. To get the literal string `"]]"', use `"]""]"'. To get the
+ array notation `x[y[z]]', use `x[y[z] ]'.
`m4' is only required at the time you run `flex'. The generated
@@ -1077,6 +1115,7 @@ scanner is ordinary C or C++, and does _not_ require `m4'.
---------- Footnotes ----------
(1) The use of m4 is subject to change in future revisions of flex.
+It is not part of the public API of flex. Do not depend on it.

File: flex.info, Node: Indices, Prev: Appendices, Up: Top
diff --git a/doc/flex.info-7 b/doc/flex.info-7
index ef030b8..8ccc35c 100644
--- a/doc/flex.info-7
+++ b/doc/flex.info-7
@@ -1,4 +1,4 @@
-This is flex.info, produced by makeinfo version 4.3d from flex.texi.
+This is flex.info, produced by makeinfo version 4.5 from flex.texi.
INFO-DIR-SECTION Programming
START-INFO-DIR-ENTRY
diff --git a/doc/flex.texi b/doc/flex.texi
index 64d9767..130cf09 100644
--- a/doc/flex.texi
+++ b/doc/flex.texi
@@ -256,6 +256,9 @@ FAQ
* unnamed-faq-99::
* unnamed-faq-100::
* unnamed-faq-101::
+* What is the difference between YYLEX_PARAM and YY_DECL?::
+* Why do I get "conflicting types for yylex" error?::
+* How do I access the values set in a Flex action from within a Bison action?::
Appendices
@@ -290,7 +293,7 @@ Indices
If you have problems with @code{flex} or think you have found a bug,
please send mail detailing your problem to
-@email{lex-help@@lists.sourceforge.net}. Patches are always welcome.
+@email{flex-help@@lists.sourceforge.net}. Patches are always welcome.
@node Introduction, Simple Examples, Reporting Bugs, Top
@chapter Introduction
@@ -3866,7 +3869,7 @@ Here is an example of a simple C++ scanner:
If you want to create multiple (different) lexer classes, you use the
@samp{-P} flag (or the @code{prefix=} option) to rename each
@code{yyFlexLexer} to some other @samp{xxFlexLexer}. You then can
-include @file{FlexLexer.h>} in your other sources once per lexer class,
+include @file{<FlexLexer.h>} in your other sources once per lexer class,
first renaming @code{yyFlexLexer} as follows:
@cindex include files, with C++
@@ -3876,11 +3879,11 @@ first renaming @code{yyFlexLexer} as follows:
@verbatim
#undef yyFlexLexer
#define yyFlexLexer xxFlexLexer
- #include <FflexLexer.h>
+ #include <FlexLexer.h>
#undef yyFlexLexer
#define yyFlexLexer zzFlexLexer
- #include FlexLexer.h>
+ #include <FlexLexer.h>
@end verbatim
@end example
@@ -4585,6 +4588,12 @@ indicating which version of @code{flex} generated the scanner. For
example, for the 2.5.22 release, these defines would be 2, 5 and 22
respectively. If the version of @code{flex} being used is a beta
version, then the symbol @code{FLEX_BETA} is defined.
+
+@item
+The symbols @samp{[[} and @samp{]]} in the code sections of the input
+may conflict with the m4 delimiters. @xref{M4 Dependency}.
+
+
@end itemize
@cindex POSIX comp;compliance
@@ -4694,12 +4703,15 @@ character buffer. This buffer is typically the largest chunk of dynamic memory
flex consumes. This buffer will grow if necessary, doubling the size each time.
Flex frees this memory when you call yylex_destroy(). The default size of this
buffer (16384 bytes) is almost always too large. The ideal size for this
-buffer is the length of the longest token expected. Flex will allocate a few
-extra bytes for housekeeping.
+buffer is the length of the longest token expected, in bytes, plus a little more. Flex will allocate a few
+extra bytes for housekeeping. Currently, to override the size of the input buffer
+you must @code{#define YY_BUF_SIZE} to whatever number of bytes you want. We don't plan
+to change this in the near future, but we reserve the right to do so if we ever add a more robust memory management
+API.
-@item 16kb for the REJECT state. This will only be allocated if you use REJECT.
-The size is the same as the input buffer, so if you override the size of the
-input buffer, then you automatically override the size of this buffer as well.
+@item 64kb for the REJECT state. This will only be allocated if you use REJECT.
+The size is the large enough to hold the same number of states as characters in the input buffer. If you override the size of the
+input buffer (via @code{YY_BUF_SIZE}), then you automatically override the size of this buffer as well.
@item 100 bytes for the start condition stack.
Flex allocates memory for the start condition stack. This is the stack used
@@ -5392,6 +5404,9 @@ publish them here.
* unnamed-faq-99::
* unnamed-faq-100::
* unnamed-faq-101::
+* What is the difference between YYLEX_PARAM and YY_DECL?::
+* Why do I get "conflicting types for yylex" error?::
+* How do I access the values set in a Flex action from within a Bison action?::
@end menu
@node When was flex born?
@@ -5827,7 +5842,7 @@ You can specify an action for the @code{<<EOF>>} rule.
@unnumberedsec Where else can I find help?
You can find the flex homepage on the web at
-@uref{http://lex.sourceforge.net/}. See that page for details about flex
+@uref{http://flex.sourceforge.net/}. See that page for details about flex
mailing lists as well.
@node Can I include comments in the "rules" section of the file?
@@ -8005,6 +8020,34 @@ then the problem is that the last rule needs to be "{whitespace}" !
@end verbatim
@end example
+@node What is the difference between YYLEX_PARAM and YY_DECL?
+@unnumberedsec What is the difference between YYLEX_PARAM and YY_DECL?
+
+YYLEX_PARAM is not a flex symbol. It is for Bison. It tells Bison to pass extra
+params when it calls yylex() from the parser.
+
+YY_DECL is the Flex declaration of yylex. The default is similar to this:
+
+@example
+@verbatim
+#define int yy_lex ()
+@end verbatim
+@end example
+
+
+@node Why do I get "conflicting types for yylex" error?
+@unnumberedsec Why do I get "conflicting types for yylex" error?
+
+This is a compiler error regarding a generated Bison parser, not a Flex scanner.
+It means you need a prototype of yylex() in the top of the Bison file.
+Be sure the prototype matches YY_DECL.
+
+@node How do I access the values set in a Flex action from within a Bison action?
+@unnumberedsec How do I access the values set in a Flex action from within a Bison action?
+
+With $1, $2, $3, etc. These are called "Semantic Values" in the Bison manual.
+See @ref{Top, , , bison, the GNU Bison Manual}.
+
@node Appendices, Indices, FAQ, Top
@appendix Appendices
@@ -8228,9 +8271,9 @@ As you can see, there really is no magic here. We just use
@node M4 Dependency, , Bison Bridge, Appendices
@section M4 Dependency
@cindex m4
-
The macro processor @code{m4}@footnote{The use of m4 is subject to change in
-future revisions of flex.} must be installed wherever flex is installed.
+future revisions of flex. It is not part of the public API of flex. Do not depend on it.}
+must be installed wherever flex is installed.
@code{flex} invokes @samp{m4}, found by searching the directories in the
@code{PATH} environment variable. Any code you place in section 1 or in the
actions will be sent through m4. Please follow these rules to protect your
@@ -8239,11 +8282,15 @@ code from unwanted @code{m4} processing.
@itemize
@item Do not use symbols that begin with, @samp{m4_}, such as, @samp{m4_define},
-or @samp{m4_include}, since those are reserved for @code{m4} macro names.
+or @samp{m4_include}, since those are reserved for @code{m4} macro names. If for
+some reason you need m4_ as a prefix, use a preprocessor #define to get your
+symbol past m4 unmangled.
@item Do not use the strings @samp{[[} or @samp{]]} anywhere in your code. The
-former is not valid in C, except within comments, but the latter is valid in
-code such as @code{x[y[z]]}.
+former is not valid in C, except within comments and strings, but the latter is valid in
+code such as @code{x[y[z]]}. The solution is simple. To get the literal string
+@code{"]]"}, use @code{"]""]"}. To get the array notation @code{x[y[z]]},
+use @code{x[y[z] ]}.
@end itemize
diff --git a/doc/mdate-sh b/doc/mdate-sh
index c079aed..b610b47 100755
--- a/doc/mdate-sh
+++ b/doc/mdate-sh
@@ -1,6 +1,6 @@
#!/bin/sh
# Get modification time of a file or directory and pretty-print it.
-# Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
+# Copyright (C) 1995, 1996, 1997, 2003 Free Software Foundation, Inc.
# written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, June 1995
#
# This program is free software; you can redistribute it and/or modify
@@ -30,24 +30,38 @@ export LC_ALL
LC_TIME=C
export LC_TIME
-# Get the extended ls output of the file or directory.
-# On HPUX /bin/sh, "set" interprets "-rw-r--r--" as options, so the "x" below.
+save_arg1="$1"
+
+# Find out how to get the extended ls output of a file or directory.
if ls -L /dev/null 1>/dev/null 2>&1; then
- set - x`ls -L -l -d $1`
+ ls_command='ls -L -l -d'
else
- set - x`ls -l -d $1`
+ ls_command='ls -l -d'
fi
-# The month is at least the fourth argument
-# (3 shifts here, the next inside the loop).
-shift
-shift
-shift
-# Find the month. Next argument is day, followed by the year or time.
+# A `ls -l' line looks as follows on OS/2.
+# drwxrwx--- 0 Aug 11 2001 foo
+# This differs from Unix, which adds ownership information.
+# drwxrwx--- 2 root root 4096 Aug 11 2001 foo
+#
+# To find the date, we split the line on spaces and iterate on words
+# until we find a month. This cannot work with files whose owner is a
+# user named `Jan', or `Feb', etc. However, it's unlikely that `/'
+# will be owned by a user whose name is a month. So we first look at
+# the extended ls output of the root directory to decide how many
+# words should be skipped to get the date.
+
+# On HPUX /bin/sh, "set" interprets "-rw-r--r--" as options, so the "x" below.
+set - x`$ls_command /`
+
+# Find which argument is the month.
month=
+command=
until test $month
do
shift
+ # Add another shift to the command.
+ command="$command shift;"
case $1 in
Jan) month=January; nummonth=1;;
Feb) month=February; nummonth=2;;
@@ -64,6 +78,28 @@ do
esac
done
+# Get the extended ls output of the file or directory.
+set - x`eval "$ls_command \"\$save_arg1\""`
+
+# Remove all preceding arguments
+eval $command
+
+# Get the month. Next argument is day, followed by the year or time.
+case $1 in
+ Jan) month=January; nummonth=1;;
+ Feb) month=February; nummonth=2;;
+ Mar) month=March; nummonth=3;;
+ Apr) month=April; nummonth=4;;
+ May) month=May; nummonth=5;;
+ Jun) month=June; nummonth=6;;
+ Jul) month=July; nummonth=7;;
+ Aug) month=August; nummonth=8;;
+ Sep) month=September; nummonth=9;;
+ Oct) month=October; nummonth=10;;
+ Nov) month=November; nummonth=11;;
+ Dec) month=December; nummonth=12;;
+esac
+
day=$2
# Here we have to deal with the problem that the ls output gives either
diff --git a/doc/stamp-vti b/doc/stamp-vti
index 1cec6fe..7711f31 100644
--- a/doc/stamp-vti
+++ b/doc/stamp-vti
@@ -1,4 +1,4 @@
-@set UPDATED 27 March 2003
-@set UPDATED-MONTH March 2003
-@set EDITION 2.5.31
-@set VERSION 2.5.31
+@set UPDATED 20 February 2006
+@set UPDATED-MONTH February 2006
+@set EDITION 2.5.33
+@set VERSION 2.5.33
diff --git a/doc/version.texi b/doc/version.texi
index 1cec6fe..7711f31 100644
--- a/doc/version.texi
+++ b/doc/version.texi
@@ -1,4 +1,4 @@
-@set UPDATED 27 March 2003
-@set UPDATED-MONTH March 2003
-@set EDITION 2.5.31
-@set VERSION 2.5.31
+@set UPDATED 20 February 2006
+@set UPDATED-MONTH February 2006
+@set EDITION 2.5.33
+@set VERSION 2.5.33