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