OSDN Git Service

雑多な修正等.
authorrezoo <rezoolab@gmail.com>
Fri, 25 Jun 2010 06:55:51 +0000 (15:55 +0900)
committerrezoo <rezoolab@gmail.com>
Fri, 25 Jun 2010 06:55:51 +0000 (15:55 +0900)
detail.rst
index.rst
language-examples.rst
language-naming.rst
language.rst

index c2ae9bc..73572ef 100644 (file)
@@ -41,7 +41,7 @@ omakeは多くのシステムとIO関数を含んでいる、フル機能のプ
 ----------------------------------
 .. Dynamic scoping means that the value of a variable is determined by the most recent binding of the variable in scope at runtime. Consider the following program.
 
-動的なスコーピングは言い換えると、変数の値が実行されているスコープ中で、もっとも近くで束縛されている変数によって決定されることを意味しています。以下のプログラムについて考えてましょう。 ::
+動的なスコーピングは言い換えると、変数の値が実行されているスコープ中で、もっとも近くで束縛されている変数によって決定されることを意味しています。以下のプログラムについて考えてましょう。 ::
 
     OPTIONS = a b c
     f() =
@@ -80,7 +80,7 @@ omakeは多くのシステムとIO関数を含んでいる、フル機能のプ
 
 .. However, dynamic scoping also has drawbacks. First, it can become confusing: you might have a variable that is intended to be private, but it is accidentally redefined elsewhere. For example, you might have the following code to construct search paths.
 
-しかしながら、動的なスコーピングは欠点も持っています。はじめに、この機能は分かりずらいです。あなたはプライベートにしたい変数があるとします。しかしこれはどこか別の場所で再定義される恐れがあります。例えば、あなたは以下の検索パスを組み立てるコードを持っていたとします。 ::
+しかしながら、動的なスコーピングは欠点も持っています。はじめに、この機能はバグの箇所が分かり辛くなることがあります。具体的にいうと、あなたはプライベートにしたい変数があるとします。しかしこれはどこか別の場所で再定義される恐れがあります。例えば、あなたは以下の検索パスを組み立てるコードを持っていたとします。 ::
 
    PATHSEP = :
    make-path(dirs) =
@@ -326,7 +326,7 @@ omakeでの評価は先行して行われます。これは評価文に遭遇し
 ----------------------------------
 .. omake is an object-oriented language. Everything is an object, including base values like numbers and strings. In many projects, this may not be so apparent because most evaluation occurs in the default toplevel object, the Pervasives object, and few other objects are ever defined.
 
-omakeã\81¯ã\82ªã\83\96ã\82¸ã\82§ã\82¯ã\83\88æ\8c\87å\90\91å\9e\8bè¨\80èª\9eã\81§ã\81\99ã\80\82æ\95°ã\82\84æ\96\87å­\97å\88\97ã\81®ã\82\88ã\81\86ã\81ªå\9fºæ\9c¬ç\9a\84ã\81ªå\80¤ã\82\92å\90«ã\82\80ã\80\81ã\81\99ã\81¹ã\81¦ã\81¯オブジェクトで表現されます。多くのプロジェクトの場合、通常のトップレベルのオブジェクト中でほとんどの式が評価されるため、これを見ることはあまりありませんが、 ``Pervasives`` オブジェクトと、2,3個の他のオブジェクトが最初から定義されています。
+omakeã\81¯ã\82ªã\83\96ã\82¸ã\82§ã\82¯ã\83\88æ\8c\87å\90\91å\9e\8bè¨\80èª\9eã\81§ã\81\99ã\80\82æ\95°ã\82\84æ\96\87å­\97å\88\97ã\81®ã\82\88ã\81\86ã\81ªå\9fºæ\9c¬ç\9a\84ã\81ªå\80¤ã\82\92å\90«ã\82\80ã\81\99ã\81¹ã\81¦ã\81\8cオブジェクトで表現されます。多くのプロジェクトの場合、通常のトップレベルのオブジェクト中でほとんどの式が評価されるため、これを見ることはあまりありませんが、 ``Pervasives`` オブジェクトと、2,3個の他のオブジェクトが最初から定義されています。
 
 .. However, objects provide additional means for data structuring, and in some cases judicious use of objects may simplify your project.
 
@@ -352,15 +352,15 @@ omakeはオブジェクト指向型言語です。数や文字列のような基
 
 .. An extends directive specifies that this object inherits from the specified parent-object. The object may have any number of extends directives. If there is more than on extends directive, then fields and methods are inherited from all parent objects. If there are name conflicts, the later definitions override the earlier definitions.
 
-``extends`` 文はこのオブジェクトが指定された ``parent-object`` に継承されていることを指定します。オブジェクトは任意の数の ``extends`` 文を含めることができます。もしおおくの ``extends`` 文が存在した場合、すべての親オブジェクトのメソッドとフィールドは継承されます。もし名前が衝突していた場合、前の定義は後の定義でオーバーライドされます。
+``extends`` 文はこのオブジェクトが指定された ``parent-object`` に継承されていることを指定します。オブジェクトは任意の数の ``extends`` 文を含めることができます。もしくの ``extends`` 文が存在した場合、すべての親オブジェクトのメソッドとフィールドは継承されます。もし名前が衝突していた場合、前の定義は後の定義でオーバーライドされます。
 
 .. The class directive is optional. If specified, it defines a name for the object that can be used in instanceof operations, as well as :: scoping directives discussed below.
 
-``class`` 文はなくても構いません。もし指定されていた場合、 ``instanceof`` 演算子を使うことでオブジェクト名を新たに定義することができるようになります。これは下で議論する ``::`` スコープ文と同様です。
+``class`` 文はなくても構いません。指定されていた場合、 ``instanceof`` 演算子を使うことでオブジェクト名を新たに定義することができるようになります。これは下で議論する ``::`` スコープ文と同様です。
 
 .. The body of the object is actually an arbitrary program. The variables defined in the body of the object become its fields, and the functions defined in the body become its methods.
 
\82ªã\83\96ã\82¸ã\82§ã\82¯ã\83\88ã\81«ã\81¯ä»»æ\84\8fã\81®å\86\85容ã\81®ã\83\97ã\83­ã\82°ã\83©ã\83 ã\82\92è¨\98è¿°ã\81§ã\81\8dã\81¾ã\81\99ã\80\82ã\82ªã\83\96ã\82¸ã\82§ã\82¯ã\83\88ã\81®ä¸­ã\81«å®\9a義ã\81\95ã\82\8cã\81\9få¤\89æ\95°ã\81¯ã\83\95ã\82£ã\83¼ã\83«ã\83\89ã\81¨å®\9a義ã\81\95ã\82\8cã\81¦ã\80\81é\96¢æ\95°ã\81¯ã\83¡ã\82½ã\83\83ã\83\89ã\81¨å®\9a義ã\81\95ã\82\8cã\81¾ã\81\99ã\80\82
+オブジェクトには任意の内容のプログラムを記述できます。オブジェクトの中に定義された変数はフィールドと定義され、関数はメソッドと定義されます。
 
 .. index::
    single: フィールド
index a19f1cc..e05899a 100644 (file)
--- a/index.rst
+++ b/index.rst
@@ -13,7 +13,7 @@
 
 1.1 注意事項
 ------------------
-*OMakeマニュアル 日本語訳 v1.2.5*
+*OMakeマニュアル 日本語訳 v1.2.6*
 
 このドキュメントは `OMake <http://omake.metaprl.org/>`_ バージョン0.9.8.5の `マニュアル <http://omake.metaprl.org/manual/omake.html>`_ を日本語訳したものです。 **この翻訳に関して原作者の許可は取っておりませんので、正当な権利者からの申し立てにより予告なく削除する場合があります。**
 
index 1e224a8..59f06eb 100644 (file)
@@ -38,7 +38,7 @@ OMakeの基本となる型は文字列とシーケンス、そして値からな
 
 .. One central property of arrays is that whitespace in the elements is significant. This can be useful, especially for filenames that contain whitespace. 
 
-成分にホワイトスペースを含めることができるという配列の主要機能は重要です。これはホワイトスペースを含むファイル名にとって特に役立ちます。 ::
+配列は成分にホワイトスペースを含めることができます。これは配列の主要な特徴の一つであり、重要な役割を担います。また、これはホワイトスペースを含むファイル名にとって特に役立ちます。 ::
 
    # ディレクトリ中の現在のファイルを並べる
     osh> ls -Q
index 75bb460..78209e1 100644 (file)
@@ -27,7 +27,7 @@
 ----------------------------------
 .. The private. qualifier is used to define variables that are private to the current file/scope. The values are not accessible outside the scope. Private variables are statically (lexically) scoped.
 
-``private.`` ä¿®é£¾å­\90ã\81¯å¤\89æ\95°ã\81\8cç\8f¾å\9c¨ã\81®ã\83\95ã\82¡ã\82¤ã\83«ã\82\84ã\82¹ã\82³ã\83¼ã\83\97ä¸\8aã\81®ã\83\97ã\83©ã\82¤ã\83\99ã\83¼ã\83\88ã\81ªã\82\82ã\81®ã\81§ã\81\82ã\82\8bã\81¨å®\9a義ã\81\97ã\81\9fã\81\84å ´å\90\88ã\81«ç\94¨ã\81\84ã\81¾ã\81\99ã\80\82å\80¤ã\81¯å¤\96のスコープから参照することができません。プライベートな変数は静的にスコープされています。 ::
+``private.`` ä¿®é£¾å­\90ã\81¯å¤\89æ\95°ã\81\8cç\8f¾å\9c¨ã\81®ã\83\95ã\82¡ã\82¤ã\83«ã\82\84ã\82¹ã\82³ã\83¼ã\83\97ä¸\8aã\81§ã\83\97ã\83©ã\82¤ã\83\99ã\83¼ã\83\88ã\81ªã\82\82ã\81®ã\81§ã\81\82ã\82\8bã\81¨å®\9a義ã\81\97ã\81\9fã\81\84å ´å\90\88ã\81«ç\94¨ã\81\84ã\81¾ã\81\99ã\80\82å\80¤ã\81¯å¤\96é\83¨のスコープから参照することができません。プライベートな変数は静的にスコープされています。 ::
 
     Obj. =
        private.X = 1
 
 .. In general, it is a good idea to define object variables as protected. The resulting code is more modular because variables in your object will not produce unexpected clashes with variables defined in other parts of the project.
 
-ä¸\80è\88¬ç\9a\84ã\81«ã\80\81ä¿\9dè­·ã\81\95ã\82\8cã\81\9fã\82ªã\83\96ã\82¸ã\82§ã\82¯ã\83\88å¤\89æ\95°ã\82\92å®\9a義ã\81\99ã\82\8bã\81\93ã\81¨ã\81¯è\89¯ã\81\84ã\81¨ã\81\95ã\82\8cã\81¦ã\81\84ã\81¾ã\81\99ã\80\82ã\83\97ã\83­ã\82¸ã\82§ã\82¯ã\83\88ã\81®ä»\96ã\81®é\83¨å\88\86ã\81§å®\9a義ã\81\95ã\82\8cã\81\9få¤\89æ\95°ã\81¨è¢«ã\81£ã\81¦ã\81\97ã\81¾ã\81£ã\81\9fã\81\9fã\82\81ã\81«èµ·ã\81\93ã\82\8bã\80\81æ\84\8få\9b³ã\81\97ã\81ªã\81\84ã\83\90ã\82°ã\82\92ç\94\9fã\81¿å\87ºã\81\95ã\81ªã\81\84ã\81\9fã\82\81ã\81§ã\81\99ã\80\82ã\81\9dã\81®çµ\90æ\9e\9c、コードはよりモジュール化されます。
+ä¸\80è\88¬ç\9a\84ã\81«ã\80\81ä¿\9dè­·ã\81\95ã\82\8cã\81\9fã\82ªã\83\96ã\82¸ã\82§ã\82¯ã\83\88å¤\89æ\95°ã\82\92å®\9a義ã\81\99ã\82\8bã\81\93ã\81¨ã\81¯è\89¯ã\81\84ã\81\93ã\81¨ã\81¨ã\81\95ã\82\8cã\81¦ã\81\84ã\81¾ã\81\99ã\80\82ã\83\97ã\83­ã\82¸ã\82§ã\82¯ã\83\88ã\81®ä»\96ã\81®é\83¨å\88\86ã\81§å®\9a義ã\81\95ã\82\8cã\81\9få¤\89æ\95°ã\81¨è¢«ã\81£ã\81¦ã\81\97ã\81¾ã\81£ã\81\9fã\81\9fã\82\81ã\81«èµ·ã\81\93ã\82\8bã\80\81æ\84\8få\9b³ã\81\97ã\81ªã\81\84ã\83\90ã\82°ã\82\92ç\94\9fã\81¿å\87ºã\81\95ã\81ªã\81\84ã\81\9fã\82\81ã\81§ã\81\99ã\80\82çµ\90æ\9e\9cã\81¨ã\81\97ã\81¦、コードはよりモジュール化されます。
 
 .. index::
    single: global.
@@ -259,7 +259,7 @@ OMake 0.9.8では、 ``public`` は ``global`` 修飾子と同義語でした。
       * If the variable is defined in an object, it is qualified with this..
       * Otherwise, the variable is public. 
 
-最後に、明示的に修飾されていない変数についてはどうなるのでしょうか?このような場合、以下のルールが使われます。
+最後に、明示的に修飾されていない変数についてはどうなるのでしょうか?このような場合、以下のルールが用いられます。
 
 * もし変数が関数の引数ならば、その変数はプライベートとなります。
 * もし変数がオブジェクト中で定義されているならば、 ``this.`` 修飾子で定義されます。
index e36e493..c07b5d6 100644 (file)
@@ -34,7 +34,7 @@
 
 .. Unlike make(1), variable expansion is eager and pure (see also the section on Scoping). That is, variable values are expanded immediately and new variable definitions do not affect old ones. For example, suppose we extend the previous example with following variable definitions.
 
-``make(1)`` ã\81¨ã\81¯é\81\95ã\81\84ã\80\81å¤\89æ\95°ã\81®å±\95é\96\8bã\81¯ *å\85\88è¡\8cã\81\97ã\81¦(eager)* è¡\8cã\82\8fã\82\8cã\80\81 *ç´\94ç²\8bã\81ª(pure)* ã\83¡ã\82«ã\83\8bã\82ºã\83 ã\81§ã\81\99(詳細ã\81¯ ":ref:`label4.8`",":ref:`label6.1`" ã\82\92å\8f\82ç\85§ã\81\97ã\81¦ã\81\8fã\81 ã\81\95ã\81\84\80\82ã\81\93ã\82\8cã\81¯ã\81¤ã\81¾ã\82\8aã\80\81å¤\89æ\95°ã\81®å\80¤ã\81¯å\8d³åº§ã\81«å±\95é\96\8bã\81\95ã\82\8cã\82\8bã\81\9fã\82\81ã\80\81æ\96°ã\81\97ã\81\84å¤\89æ\95°ã\81¸ã\81®æ\9d\9fç¸\9bã\81¯古い値に影響されないことを意味しています。例えば、前回の例を以下のような変数の束縛に拡張した場合について考えてみましょう。 ::
+``make(1)`` ã\81¨ã\81¯é\81\95ã\81\84ã\80\81å¤\89æ\95°ã\81®å±\95é\96\8bã\81¯ *å\85\88è¡\8cã\81\97ã\81¦(eager)* è¡\8cã\82\8fã\82\8cã\80\81 *ç´\94ç²\8bã\81ª(pure)* ã\83¡ã\82«ã\83\8bã\82ºã\83 ã\81¨ã\81ªã\81£ã\81¦ã\81\84ã\81¾ã\81\99(詳細ã\81¯ ":ref:`label4.8`",":ref:`label6.1`" ã\82\92å\8f\82ç\85§ã\81\97ã\81¦ã\81\8fã\81 ã\81\95ã\81\84\80\82ã\81\93ã\82\8cã\81¯ã\81¤ã\81¾ã\82\8aã\80\81å¤\89æ\95°ã\81®å\80¤ã\81¯å\8d³åº§ã\81«å±\95é\96\8bã\81\95ã\82\8cã\82\8bã\81\93ã\81¨ã\81«ã\82\88ã\81£ã\81¦ã\80\81æ\96°ã\81\97ã\81\84å¤\89æ\95°ã\81¸ã\81®æ\9d\9fç¸\9bã\81\8c古い値に影響されないことを意味しています。例えば、前回の例を以下のような変数の束縛に拡張した場合について考えてみましょう。 ::
 
    X = $(COMMAND)
    COMMAND = $(COMMAND) -O3
@@ -66,7 +66,7 @@
 ---------------------
 .. Arrays can be defined by appending the [] sequence to the variable name and defining initial values for the elements as separate lines. Whitespace is significant on each line. The following code sequence prints c d e.
 
-配列は変数名の後ろに ``[]`` を追加し、初期値を改行を使って要素を指定することで定義できます。各々の行でのスペースはOMakeにおいて重要です。例えば、以下のコードは文字列 ``c d e`` が出力されます。 ::
+配列は変数名の後ろに ``[]`` を追加し、初期値を改行を用いて要素を指定することで定義できます。各々の行でのスペースはOMakeにおいて重要な役割を担っています。例えば、以下のコードは文字列 ``c d e`` が出力されます。 ::
 
     X[] =
         a b
@@ -84,7 +84,7 @@
 -----------------------
 .. The following characters are special to omake: $():,=#\. To treat any of these characters as normal text, they should be escaped with the backslash character \.
 
-文字 ``$():,=#\`` はOMakeの特殊文字に指定されています。これらの文字を普通の文字としてOMakeで扱うためには、バックスラッシュ文字 ``\`` でエスケープする必要があります。 ::
+文字 ``$():,=#\`` はOMakeの特殊文字に指定されています。これらの文字を通常の文字としてOMakeで扱うためには、バックスラッシュ文字 ``\`` でエスケープする必要があります。 ::
 
     DOLLAR = \$
 
 
 .. The parameters are a comma-separated list of identifiers, and the body must be placed on a separate set of lines that are indented from the function definition itself. For example, the following text defines a function that concatenates its arguments, separating them with a colon.
 
\83\91ã\83©ã\83¡ã\83¼ã\82¿ã\81¯è­\98å\88¥ã\81\95ã\81\9bã\82\8bためにカンマを用いて分割し、コードは関数定義からインデントした状態で、別の行に設置する必要があります。例えば、以下のコードは引数 ``a`` と ``b`` をコロンを用いて結びつける関数について定義しています。 ::
\83\91ã\83©ã\83¡ã\83¼ã\82¿ã\81¯è­\98å\88¥ã\81®ためにカンマを用いて分割し、コードは関数定義からインデントした状態で、別の行に設置する必要があります。例えば、以下のコードは引数 ``a`` と ``b`` をコロンを用いて結びつける関数について定義しています。 ::
 
     ColonFun(a, b) =
         return($(a):$(b))
 ..  NOTE: as of version 0.9.6, return is a control operation, causing the function to immediately return. In the following example, when the argument a is true, the function f immediately returns the value 1 without evaluating the print statement.
 
 .. warning::
-  バージョン0.9.6から ``return`` 文は関数を制御する命令文となりましたので、return文が呼ばれた場合、関数はただちに値を返して終了します。以下の例では引数 ``a`` が ``true`` であった場合、関数 ``f`` はただちにprint文を評価することなく値1を返します。 ::
+  バージョン0.9.6から ``return`` 文は関数を制御する命令文となりましたので、return文が呼ばれた場合、関数はただちに値を返して終了します。以下の例では引数 ``a`` が ``true`` であったのなら、関数 ``f`` はただちにprint文を評価することなく値1を返します。 ::
 
     f(a) =
        if $(a)
 
 .. If the file specified is not an absolute filenmame, both include and open operations search for the file based on the OMAKEPATH variable. In case of the open directive, the search is performed at parse time, and the argument to open may not contain any expressions.
 
-ファイル名が絶対パスで指定されていない場合、 ``include`` と ``open`` 文の両方は ``OMAKEPATH`` 変数上のパスを探します。 ``open`` 文の場合、この検索は *パースするときに実行される* ので、 ``open`` の引数に他の式を含める必要はありません。
+ファイル名が絶対パスで指定されていない場合、 ``include`` と ``open`` 文の両方は ``OMAKEPATH`` 変数上のパスを探します。 ``open`` 文の場合、この検索は *パースするに実行される* ので、 ``open`` の引数に他の式を含める必要はありません。
 
 .. index::
    single: section
@@ -394,9 +394,7 @@ omakeのスコープはインデントのレベルで定義されます。イン
 ---------------------
 .. OMake is an object-oriented language. Generally speaking, an object is a value that contains fields and methods. An object is defined with a . suffix for a variable. For example, the following object might be used to specify a point (1, 5) on the two-dimensional plane.
 
-OMakeはオブジェクト指向言語です。一般的に、オブジェクトはフィールド(\*)とメソッドを持っています。オブジェクトは変数名の最後に ``.`` を加えることで定義できます。例えば、以下のオブジェクトは2次元平面上での点(1, 5)を表しています。
-
-(\*訳注: プロパティもしくはメンバ変数と置き換えても良いです) ::
+OMakeはオブジェクト指向言語です。一般的に、オブジェクトはフィールド(訳注: プロパティもしくはメンバ変数と置き換えても良いです)とメソッドを持っています。オブジェクトは変数名の最後に ``.`` を加えることで定義できます。例えば、以下のオブジェクトは2次元平面上での点(1, 5)を表しています。 ::
 
     Coord. =
         x = 1