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