flex.xml 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  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 \
  37. --disable-static \
  38. --docdir=/usr/share/doc/flex-&flex-version;</userinput></screen>
  39. <para>Compile the package:</para>
  40. <screen><userinput remap="make">make</userinput></screen>
  41. <para>To test the results (about 0.5 SBU), issue:</para>
  42. <screen><userinput remap="test">make check</userinput></screen>
  43. <para>Install the package:</para>
  44. <screen><userinput remap="install">make install</userinput></screen>
  45. <!--
  46. <para>There are some packages that expect to find the
  47. <filename class="libraryfile">lex</filename> library in <filename
  48. class="directory">/usr/lib</filename>. Create a symlink to account for
  49. this:</para>
  50. <screen><userinput remap="install">ln -sv libfl.a /usr/lib/libl.a</userinput></screen>
  51. -->
  52. <para>A few programs do not know about <command>flex</command> yet and
  53. try to run its predecessor, <command>lex</command>. To support those
  54. programs, create a symbolic link named <filename>lex</filename> that
  55. runs <filename>flex</filename> in <command>lex</command> emulation
  56. mode:</para>
  57. <screen><userinput remap="install">ln -sv flex /usr/bin/lex</userinput></screen>
  58. </sect2>
  59. <sect2 id="contents-flex" role="content">
  60. <title>Contents of Flex</title>
  61. <segmentedlist>
  62. <segtitle>Installed programs</segtitle>
  63. <segtitle>Installed libraries</segtitle>
  64. <segtitle>Installed directory</segtitle>
  65. <seglistitem>
  66. <seg>flex, flex++ (link to flex), and lex (link to flex)</seg>
  67. <seg>libfl.so and libfl_pic.so</seg>
  68. <seg>/usr/share/doc/flex-&flex-version;</seg>
  69. </seglistitem>
  70. </segmentedlist>
  71. <variablelist>
  72. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  73. <?dbfo list-presentation="list"?>
  74. <?dbhtml list-presentation="table"?>
  75. <varlistentry id="flex">
  76. <term><command>flex</command></term>
  77. <listitem>
  78. <para>A tool for generating programs that recognize patterns in text;
  79. it allows for the versatility to specify the rules for pattern-finding,
  80. eradicating the need to develop a specialized program</para>
  81. <indexterm zone="ch-system-flex flex">
  82. <primary sortas="b-flex">flex</primary>
  83. </indexterm>
  84. </listitem>
  85. </varlistentry>
  86. <varlistentry id="flexpp">
  87. <term><command>flex++</command></term>
  88. <listitem>
  89. <para>An extension of flex, is used for generating C++ code
  90. and classes. It is a symbolic link to <command>flex</command></para>
  91. <indexterm zone="ch-system-flex flexpp">
  92. <primary sortas="b-flex++">flex++</primary>
  93. </indexterm>
  94. </listitem>
  95. </varlistentry>
  96. <varlistentry id="lex">
  97. <term><command>lex</command></term>
  98. <listitem>
  99. <para>A script that runs <command>flex</command> in
  100. <command>lex</command> emulation mode</para>
  101. <indexterm zone="ch-system-flex lex">
  102. <primary sortas="b-lex">lex</primary>
  103. </indexterm>
  104. </listitem>
  105. </varlistentry>
  106. <varlistentry id="libfl">
  107. <term><filename class="libraryfile">libfl</filename></term>
  108. <listitem>
  109. <para>The <filename class="libraryfile">flex</filename> library</para>
  110. <indexterm zone="ch-system-flex libfl">
  111. <primary sortas="c-libfl">libfl</primary>
  112. </indexterm>
  113. </listitem>
  114. </varlistentry>
  115. </variablelist>
  116. </sect2>
  117. </sect1>