flex.xml 4.8 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-fin-sbu;</seg>
  27. <seg>&flex-fin-du;</seg>
  28. </seglistitem>
  29. </segmentedlist>
  30. </sect2>
  31. <sect2 role="installation">
  32. <title>Installation of Flex</title>
  33. <!--
  34. <para>First, fix a problem introduced with glibc-2.26:</para>
  35. <screen><userinput remap="pre">sed -i "/math.h/a #include &lt;malloc.h&gt;" src/flexdef.h</userinput></screen>
  36. <para>The build procedure assumes the <application>help2man</application>
  37. program is available to create a man page from the executable - -help option.
  38. This is not present, so we use an environment variable to skip this process.
  39. Now, prepare Flex for compilation:</para> -->
  40. <para>Prepare Flex for compilation:</para>
  41. <!-- <screen><userinput remap="configure">HELP2MAN=/tools/bin/true \ -->
  42. <screen><userinput remap="configure">./configure --prefix=/usr --docdir=/usr/share/doc/flex-&flex-version;</userinput></screen>
  43. <para>Compile the package:</para>
  44. <screen><userinput remap="make">make</userinput></screen>
  45. <para>To test the results (about 0.5 SBU), issue:</para>
  46. <screen><userinput remap="test">make check</userinput></screen>
  47. <para>Install the package:</para>
  48. <screen><userinput remap="install">make install</userinput></screen>
  49. <para>A few programs do not know about <command>flex</command> yet and
  50. try to run its predecessor, <command>lex</command>. To support those
  51. programs, create a symbolic link named <filename>lex</filename> that
  52. runs <filename>flex</filename> in <command>lex</command> emulation
  53. mode:</para>
  54. <screen><userinput remap="install">ln -sv flex /usr/bin/lex</userinput></screen>
  55. </sect2>
  56. <sect2 id="contents-flex" role="content">
  57. <title>Contents of Flex</title>
  58. <segmentedlist>
  59. <segtitle>Installed programs</segtitle>
  60. <segtitle>Installed libraries</segtitle>
  61. <segtitle>Installed directory</segtitle>
  62. <seglistitem>
  63. <seg>flex, flex++ (link to flex), and lex (link to flex)</seg>
  64. <seg>libfl.so</seg>
  65. <seg>/usr/share/doc/flex-&flex-version;</seg>
  66. </seglistitem>
  67. </segmentedlist>
  68. <variablelist>
  69. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  70. <?dbfo list-presentation="list"?>
  71. <?dbhtml list-presentation="table"?>
  72. <varlistentry id="flex">
  73. <term><command>flex</command></term>
  74. <listitem>
  75. <para>A tool for generating programs that recognize patterns in text;
  76. it allows for the versatility to specify the rules for pattern-finding,
  77. eradicating the need to develop a specialized program</para>
  78. <indexterm zone="ch-system-flex flex">
  79. <primary sortas="b-flex">flex</primary>
  80. </indexterm>
  81. </listitem>
  82. </varlistentry>
  83. <varlistentry id="flexpp">
  84. <term><command>flex++</command></term>
  85. <listitem>
  86. <para>An extension of flex, is used for generating C++ code
  87. and classes. It is a symbolic link to <command>flex</command></para>
  88. <indexterm zone="ch-system-flex flexpp">
  89. <primary sortas="b-flex++">flex++</primary>
  90. </indexterm>
  91. </listitem>
  92. </varlistentry>
  93. <varlistentry id="lex">
  94. <term><command>lex</command></term>
  95. <listitem>
  96. <para>A symbolic link that runs <command>flex</command> in
  97. <command>lex</command> emulation mode</para>
  98. <indexterm zone="ch-system-flex lex">
  99. <primary sortas="b-lex">lex</primary>
  100. </indexterm>
  101. </listitem>
  102. </varlistentry>
  103. <varlistentry id="libfl">
  104. <term><filename class="libraryfile">libfl</filename></term>
  105. <listitem>
  106. <para>The <filename class="libraryfile">flex</filename> library</para>
  107. <indexterm zone="ch-system-flex libfl">
  108. <primary sortas="c-libfl">libfl</primary>
  109. </indexterm>
  110. </listitem>
  111. </varlistentry>
  112. </variablelist>
  113. </sect2>
  114. </sect1>