Flex is a fast lexical analyser generator. It is a tool for generating programs that perform pattern-matching on text. See documentation
- The Core Planners: [email protected]
Binary package
Binary packages can be set as runtime or build time dependencies. See Defining your dependencies for more information.
To add core/flex as a dependency, you can add one of the following to your plan file.
pkg_build_deps=(core/flex)
pkg_deps=(core/flex)
To install this plan, you should run the following commands to first install, and then link the binaries this plan creates.
hab pkg install core/flex --binlink
will add the following binaries to the PATH:
- /bin/lex
- /bin/flex
- /bin/flex++
For example:
$ hab pkg install core/flex --binlink
» Installing core/flex
☁ Determining latest version of core/flex in the 'stable' channel
→ Using core/flex/2.6.4/20200305232255
★ Install of core/flex/2.6.4/20200305232255 complete with 0 new packages installed.
» Binlinking lex from core/flex/2.6.4/20200305232255 into /bin
★ Binlinked lex from core/flex/2.6.4/20200305232255 to /bin/lex
» Binlinking flex from core/flex/2.6.4/20200305232255 into /bin
★ Binlinked flex from core/flex/2.6.4/20200305232255 to /bin/flex
» Binlinking flex++ from core/flex/2.6.4/20200305232255 into /bin
★ Binlinked flex++ from core/flex/2.6.4/20200305232255 to /bin/flex++
You can now use the binary as normal. For example:
/bin/flex --help
or flex --help
$ flex --help
Usage: flex [OPTIONS] [FILE]...
Generates programs that perform pattern-matching on text.
Table Compression:
-Ca, --align trade off larger tables for better memory alignment
-Ce, --ecs construct equivalence classes
-Cf do not compress tables; use -f representation
...
...