flex.xml 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  4. <!ENTITY % general-entities SYSTEM "../general.ent">
  5. %general-entities;
  6. ]>
  7. <sect1 id="ch-system-flex" role="wrap">
  8. <?dbhtml filename="flex.html"?>
  9. <sect1info condition="script">
  10. <productname>flex</productname>
  11. <productnumber>&flex-version;</productnumber>
  12. <address>&flex-url;</address>
  13. </sect1info>
  14. <title>Flex-&flex-version;</title>
  15. <indexterm zone="ch-system-flex">
  16. <primary sortas="a-Flex">Flex</primary>
  17. </indexterm>
  18. <sect2 role="package">
  19. <title/>
  20. <para>The Flex package contains a utility for generating programs that
  21. recognize patterns in text.</para>
  22. <segmentedlist>
  23. <segtitle>&buildtime;</segtitle>
  24. <segtitle>&diskspace;</segtitle>
  25. <seglistitem>
  26. <seg>&flex-ch6-sbu;</seg>
  27. <seg>&flex-ch6-du;</seg>
  28. </seglistitem>
  29. </segmentedlist>
  30. </sect2>
  31. <sect2 role="installation">
  32. <title>Installation of Flex</title>
  33. <para>Prepare Flex for compilation:</para>
  34. <screen><userinput remap="configure">./configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info</userinput></screen>
  35. <para>Compile the package:</para>
  36. <screen><userinput remap="make">make</userinput></screen>
  37. <para>To test the results (about 0.5 SBU), issue:</para>
  38. <screen><userinput remap="test">make -k check</userinput></screen>
  39. <para>There are two tests that fail due to incompatibilities
  40. with the most recent version of bison.</para>
  41. <para>Install the package:</para>
  42. <screen><userinput remap="install">make install</userinput></screen>
  43. <para>There are some packages that expect to find the
  44. <filename class="libraryfile">lex</filename> library in <filename
  45. class="directory">/usr/lib</filename>. Create a symlink to account for
  46. this:</para>
  47. <screen><userinput remap="install">ln -sv libfl.a /usr/lib/libl.a</userinput></screen>
  48. <para>A few programs do not know about <command>flex</command> yet and
  49. try to run its predecessor, <command>lex</command>. To support those
  50. programs, create a wrapper script named <filename>lex</filename> that
  51. calls <filename>flex</filename> in <command>lex</command> emulation
  52. mode:</para>
  53. <screen><userinput remap="install">cat &gt; /usr/bin/lex &lt;&lt; "EOF"
  54. <literal>#!/bin/sh
  55. # Begin /usr/bin/lex
  56. exec /usr/bin/flex -l "$@"
  57. # End /usr/bin/lex</literal>
  58. EOF
  59. chmod -v 755 /usr/bin/lex</userinput></screen>
  60. <para>If desired, install the <filename>flex.pdf</filename> documentation
  61. file:</para>
  62. <screen><userinput remap="install">mkdir -v /usr/share/doc/flex-&flex-version;
  63. cp -v doc/flex.pdf /usr/share/doc/flex-&flex-version;</userinput></screen>
  64. </sect2>
  65. <sect2 id="contents-flex" role="content">
  66. <title>Contents of Flex</title>
  67. <segmentedlist>
  68. <segtitle>Installed programs</segtitle>
  69. <segtitle>Installed libraries</segtitle>
  70. <seglistitem>
  71. <seg>flex and lex</seg>
  72. <seg>libfl.a and libfl_pic.a</seg>
  73. </seglistitem>
  74. </segmentedlist>
  75. <variablelist>
  76. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  77. <?dbfo list-presentation="list"?>
  78. <?dbhtml list-presentation="table"?>
  79. <varlistentry id="flex">
  80. <term><command>flex</command></term>
  81. <listitem>
  82. <para>A tool for generating programs that recognize patterns in text;
  83. it allows for the versatility to specify the rules for pattern-finding,
  84. eradicating the need to develop a specialized program</para>
  85. <indexterm zone="ch-system-flex flex">
  86. <primary sortas="b-flex">flex</primary>
  87. </indexterm>
  88. </listitem>
  89. </varlistentry>
  90. <varlistentry id="lex">
  91. <term><command>lex</command></term>
  92. <listitem>
  93. <para>A script that runs <command>flex</command> in
  94. <command>lex</command> emulation mode</para>
  95. <indexterm zone="ch-system-flex lex">
  96. <primary sortas="b-lex">lex</primary>
  97. </indexterm>
  98. </listitem>
  99. </varlistentry>
  100. <varlistentry id="libfl.a">
  101. <term><filename class="libraryfile">libfl.a</filename></term>
  102. <listitem>
  103. <para>The <filename class="libraryfile">flex</filename> library</para>
  104. <indexterm zone="ch-system-flex libfl.a">
  105. <primary sortas="c-libfl.a">libfl.a</primary>
  106. </indexterm>
  107. </listitem>
  108. </varlistentry>
  109. </variablelist>
  110. </sect2>
  111. </sect1>