flex.xml 4.7 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>First, skip running three regression tests that require bison.</para>
  34. <screen><userinput remap="pre">sed -i -e '/test-bison/d' tests/Makefile.in</userinput></screen>
  35. <para>Prepare Flex for compilation:</para>
  36. <screen><userinput remap="configure">./configure --prefix=/usr --docdir=/usr/share/doc/flex-&flex-version;</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 check</userinput></screen>
  41. <para>Install the package:</para>
  42. <screen><userinput remap="install">make install</userinput></screen>
  43. <!--
  44. <para>There are some packages that expect to find the
  45. <filename class="libraryfile">lex</filename> library in <filename
  46. class="directory">/usr/lib</filename>. Create a symlink to account for
  47. this:</para>
  48. <screen><userinput remap="install">ln -sv libfl.a /usr/lib/libl.a</userinput></screen>
  49. -->
  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 symbolic link named <filename>lex</filename> that
  53. runs <filename>flex</filename> in <command>lex</command> emulation
  54. mode:</para>
  55. <screen><userinput remap="install">ln -s flex /usr/bin/lex</userinput></screen>
  56. </sect2>
  57. <sect2 id="contents-flex" role="content">
  58. <title>Contents of Flex</title>
  59. <segmentedlist>
  60. <segtitle>Installed programs</segtitle>
  61. <segtitle>Installed libraries</segtitle>
  62. <segtitle>Installed directories</segtitle>
  63. <seglistitem>
  64. <seg>flex, flex++ (link to flex), and lex (link to flex)</seg>
  65. <seg>libfl.{a,so} and libfl_pic.{a,so}</seg>
  66. <seg>/usr/share/doc/flex-&flex-version;</seg>
  67. </seglistitem>
  68. </segmentedlist>
  69. <variablelist>
  70. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  71. <?dbfo list-presentation="list"?>
  72. <?dbhtml list-presentation="table"?>
  73. <varlistentry id="flex">
  74. <term><command>flex</command></term>
  75. <listitem>
  76. <para>A tool for generating programs that recognize patterns in text;
  77. it allows for the versatility to specify the rules for pattern-finding,
  78. eradicating the need to develop a specialized program</para>
  79. <indexterm zone="ch-system-flex flex">
  80. <primary sortas="b-flex">flex</primary>
  81. </indexterm>
  82. </listitem>
  83. </varlistentry>
  84. <varlistentry id="flexpp">
  85. <term><command>flex++</command></term>
  86. <listitem>
  87. <para>An extension of flex, is used for generating C++ code
  88. and classes. It is a symbolic link to <command>flex</command></para>
  89. <indexterm zone="ch-system-flex flexpp">
  90. <primary sortas="b-flex++">flex++</primary>
  91. </indexterm>
  92. </listitem>
  93. </varlistentry>
  94. <varlistentry id="lex">
  95. <term><command>lex</command></term>
  96. <listitem>
  97. <para>A script that runs <command>flex</command> in
  98. <command>lex</command> emulation mode</para>
  99. <indexterm zone="ch-system-flex lex">
  100. <primary sortas="b-lex">lex</primary>
  101. </indexterm>
  102. </listitem>
  103. </varlistentry>
  104. <varlistentry id="libfl">
  105. <term><filename class="libraryfile">libfl</filename></term>
  106. <listitem>
  107. <para>The <filename class="libraryfile">flex</filename> library</para>
  108. <indexterm zone="ch-system-flex libfl">
  109. <primary sortas="c-libfl">libfl</primary>
  110. </indexterm>
  111. </listitem>
  112. </varlistentry>
  113. </variablelist>
  114. </sect2>
  115. </sect1>