flex.xml 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  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>First, fix some regression tests:</para>
  34. <screen><userinput remap="pre">patch -Np1 -i ../&flex-bison-patch;</userinput></screen>
  35. <para>Prepare Flex for compilation:</para>
  36. <screen><userinput remap="configure">./configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info</userinput></screen>
  37. <para>Compile the package:</para>
  38. <screen><userinput remap="make">make</userinput></screen>
  39. <para>To test the results (about 0.5 SBU), issue:</para>
  40. <screen><userinput remap="test">make -k check</userinput></screen>
  41. <para>There are two tests that fail due to incompatibilities
  42. with the most recent version of bison.</para>
  43. <para>Install the package:</para>
  44. <screen><userinput remap="install">make install</userinput></screen>
  45. <para>There are some packages that expect to find the
  46. <filename class="libraryfile">lex</filename> library in <filename
  47. class="directory">/usr/lib</filename>. Create a symlink to account for
  48. this:</para>
  49. <screen><userinput remap="install">ln -sv libfl.a /usr/lib/libl.a</userinput></screen>
  50. <para>A few programs do not know about <command>flex</command> yet and
  51. try to run its predecessor, <command>lex</command>. To support those
  52. programs, create a wrapper script named <filename>lex</filename> that
  53. calls <filename>flex</filename> in <command>lex</command> emulation
  54. mode:</para>
  55. <screen><userinput remap="install">cat &gt; /usr/bin/lex &lt;&lt; "EOF"
  56. <literal>#!/bin/sh
  57. # Begin /usr/bin/lex
  58. exec /usr/bin/flex -l "$@"
  59. # End /usr/bin/lex</literal>
  60. EOF
  61. chmod -v 755 /usr/bin/lex</userinput></screen>
  62. <para>If desired, install the <filename>flex.pdf</filename> documentation
  63. file:</para>
  64. <screen><userinput remap="install">mkdir -v /usr/share/doc/flex-&flex-version;
  65. cp -v doc/flex.pdf /usr/share/doc/flex-&flex-version;</userinput></screen>
  66. </sect2>
  67. <sect2 id="contents-flex" role="content">
  68. <title>Contents of Flex</title>
  69. <segmentedlist>
  70. <segtitle>Installed programs</segtitle>
  71. <segtitle>Installed libraries</segtitle>
  72. <seglistitem>
  73. <seg>flex and lex</seg>
  74. <seg>libfl.a and libfl_pic.a</seg>
  75. </seglistitem>
  76. </segmentedlist>
  77. <variablelist>
  78. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  79. <?dbfo list-presentation="list"?>
  80. <?dbhtml list-presentation="table"?>
  81. <varlistentry id="flex">
  82. <term><command>flex</command></term>
  83. <listitem>
  84. <para>A tool for generating programs that recognize patterns in text;
  85. it allows for the versatility to specify the rules for pattern-finding,
  86. eradicating the need to develop a specialized program</para>
  87. <indexterm zone="ch-system-flex flex">
  88. <primary sortas="b-flex">flex</primary>
  89. </indexterm>
  90. </listitem>
  91. </varlistentry>
  92. <varlistentry id="lex">
  93. <term><command>lex</command></term>
  94. <listitem>
  95. <para>A script that runs <command>flex</command> in
  96. <command>lex</command> emulation mode</para>
  97. <indexterm zone="ch-system-flex lex">
  98. <primary sortas="b-lex">lex</primary>
  99. </indexterm>
  100. </listitem>
  101. </varlistentry>
  102. <varlistentry id="libfl.a">
  103. <term><filename class="libraryfile">libfl.a</filename></term>
  104. <listitem>
  105. <para>The <filename class="libraryfile">flex</filename> library</para>
  106. <indexterm zone="ch-system-flex libfl.a">
  107. <primary sortas="c-libfl.a">libfl.a</primary>
  108. </indexterm>
  109. </listitem>
  110. </varlistentry>
  111. </variablelist>
  112. </sect2>
  113. </sect1>