Parcourir la source

chapter06: Translate bison instruction

Xi Ruoyao il y a 7 ans
Parent
commit
57b914b3c4
1 fichiers modifiés avec 21 ajouts et 14 suppressions
  1. 21 14
      chapter06/bison.xml

+ 21 - 14
chapter06/bison.xml

@@ -23,7 +23,7 @@
   <sect2 role="package">
     <title/>
 
-    <para>The Bison package contains a parser generator.</para>
+    <para>Bison 软件包包含语法分析器生成器。</para>
 
     <segmentedlist>
       <segtitle>&buildtime;</segtitle>
@@ -38,7 +38,7 @@
   </sect2>
 
   <sect2 role="installation">
-    <title>安装Bison</title>
+    <title>安装 Bison</title>
 <!-- bison only installs a static library
     <para>Inhibit static library installation:</para>
 
@@ -58,10 +58,14 @@
 <screen><userinput remap="test">make check</userinput></screen>
 -->
 
-    <para>There is a circular dependency between bison and flex with regard to
+    <!--para>There is a circular dependency between bison and flex with regard to
     the checks.  If desired, after installing flex in the next section, the
     bison checks can be run with <command>make check</command>.  Three
-    tests related to lalr1.cc fail for unknown reasons.</para>
+    tests related to lalr1.cc fail for unknown reasons.</para-->
+    <para>在考虑测试的情况下, bison 和 flex 之间存在循环依赖。
+		如果希望的话,可以在下一节安装 flex 后,
+		返回这里运行 <command>make check</command> 运行测试。
+		三个和 lalr1.cc 相关的测试由于不明原因失败。</para>
 
     <para>安装该软件包:</para>
 
@@ -78,7 +82,7 @@
       <segtitle>安装的目录</segtitle>
 
       <seglistitem>
-        <seg>bison and yacc</seg>
+        <seg>bison  yacc</seg>
         <seg>liby.a</seg>
         <seg>/usr/share/bison</seg>
       </seglistitem>
@@ -92,9 +96,12 @@
       <varlistentry id="bison">
         <term><command>bison</command></term>
         <listitem>
-          <para>Generates, from a series of rules, a program for analyzing the
+          <!--para>Generates, from a series of rules, a program for analyzing the
           structure of text files; Bison is a replacement for Yacc (Yet Another
-          Compiler Compiler)</para>
+          Compiler Compiler)</para-->
+          <para>根据一组规则,创建一个用于分析文本文件结构的程序;
+			  Bison 是 Yacc (Yet Another Compiler Compiler) 的替代品。
+		  </para>
           <indexterm zone="ch-system-bison bison">
             <primary sortas="b-bison">bison</primary>
           </indexterm>
@@ -104,10 +111,10 @@
       <varlistentry id="yacc">
         <term><command>yacc</command></term>
         <listitem>
-          <para>A wrapper for <command>bison</command>, meant for programs that
-          still call <command>yacc</command> instead of <command>bison</command>;
-          it calls <command>bison</command> with the <parameter>-y</parameter>
-          option</para>
+          <para><command>bison</command> 的一个封装器,被那些仍然调用
+			  <command>yacc</command> 而非 <command>bison</command>
+			  的程序使用,它使用 <parameter>-y</parameter> 选项调用
+			  <command>bison</command>。</para>
           <indexterm zone="ch-system-bison yacc">
             <primary sortas="b-yacc">yacc</primary>
           </indexterm>
@@ -117,9 +124,9 @@
       <varlistentry id="liby">
         <term><filename class="libraryfile">liby</filename></term>
         <listitem>
-          <para>The Yacc library containing implementations of Yacc-compatible
-          <function>yyerror</function> and <function>main</function> functions;
-          this library is normally not very useful, but POSIX requires it</para>
+			<para>Yacc 库包含与 Yacc 兼容的 <function>yyerror</function>
+				和 <function>main</function> 函数实现;它并不是很有用,
+				但 POSIX 需要它</para>
           <indexterm zone="ch-system-bison liby">
             <primary sortas="c-liby">liby</primary>
           </indexterm>