1 [![Build Status](https://travis-ci.org/westes/flex.svg?branch=master)](https://travis-ci.org/westes/flex)
3 This is flex, the fast lexical analyzer generator.
5 flex is a tool for generating scanners: programs which recognize
6 lexical patterns in text.
8 The flex codebase is kept in
9 [Git on GitHub.](https://github.com/westes/flex) Source releases of flex with some intermediate files already built can be found on [the github releases page.](https://github.com/westes/flex/releases)
11 Use GitHub's [issues](https://github.com/westes/flex/issues) and
12 [pull request](https://github.com/westes/flex) features to file bugs
15 There are several mailing lists available as well:
17 * flex-announce@lists.sourceforge.net - where posts will be made
18 announcing new releases of flex.
19 * flex-help@lists.sourceforge.net - where you can post questions about
21 * flex-devel@lists.sourceforge.net - where you can discuss development
24 Find information on subscribing to the mailing lists or search in the
25 archive at: https://sourceforge.net/p/flex/mailman/
26 Note: Posting is only allowed from addresses that are subscribed to
29 The flex distribution contains the following files which may be of
33 * NEWS - current version number and list of user-visible changes.
34 * INSTALL - basic installation information.
35 * ABOUT-NLS - description of internationalization support in flex.
36 * COPYING - flex's copyright and license.
37 * doc/ - user documentation.
38 * examples/ - containing examples of some possible flex scanners and a
39 few other things. See the file examples/README for more
41 * tests/ - regression tests. See TESTS/README for details.
42 * po/ - internationalization support files.
44 You need the following tools to build flex from the maintainer's
47 * compiler suite - flex is built with gcc
48 * bash, or a good Bourne-style shell
49 * m4 - `m4 -P` needs to work; GNU m4 and a few others are suitable
50 * GNU bison; to generate parse.c from parse.y
51 * autoconf; for handling the build system
52 * automake; for Makefile generation
53 * gettext; for i18n support
54 * help2man; to generate the flex man page
55 * tar, gzip, lzip, etc.; for packaging of the source distribution
56 * GNU texinfo; to build and test the flex manual. Note that if you want
57 to build the dvi/ps/pdf versions of the documentation you will need
58 texi2dvi and related programs, along with a sufficiently powerful
59 implementation of TeX to process them. See your operating system
60 documentation for how to achieve this. The printable versions of the
61 manual are not built unless specifically requested, but the targets
62 are included by automake.
63 * GNU indent; for indenting the flex source the way we want it done
65 In cases where the versions of the above tools matter, the file
66 configure.ac will specify the minimum required versions.
68 Once you have all the necessary tools installed, life becomes
69 simple. To prepare the flex tree for building, run the script:
75 in the top level of the flex source tree.
77 This script calls the various tools needed to get flex ready for the
78 GNU-style configure script to be able to work.
80 From this point on, building flex follows the usual routine:
83 configure && make && make install
88 This file is part of flex.
90 This code is derived from software contributed to Berkeley by
93 The United States Government has rights in this work pursuant
94 to contract no. DE-AC03-76SF00098 between the United States
95 Department of Energy and the University of California.
97 Redistribution and use in source and binary forms, with or without
98 modification, are permitted provided that the following conditions
101 1. Redistributions of source code must retain the above copyright
102 notice, this list of conditions and the following disclaimer.
103 2. Redistributions in binary form must reproduce the above copyright
104 notice, this list of conditions and the following disclaimer in the
105 documentation and/or other materials provided with the distribution.
107 Neither the name of the University nor the names of its contributors
108 may be used to endorse or promote products derived from this software
109 without specific prior written permission.
111 THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
112 IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
113 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR