@@ -11,7 +11,7 @@ msgid ""
11
11
msgstr ""
12
12
"Project-Id-Version : Python 3.7\n "
13
13
"Report-Msgid-Bugs-To : \n "
14
- "POT-Creation-Date : 2019-01-01 10:14+0900 \n "
14
+ "POT-Creation-Date : 2019-09-21 03:33+0000 \n "
15
15
"PO-Revision-Date : 2019-09-01 03:30+0000\n "
16
16
"Last-Translator : tomo, 2019\n "
17
17
"Language-Team : Japanese (https://www.transifex.com/python-doc/teams/5390/ja/)\n "
@@ -75,20 +75,11 @@ msgid ""
75
75
"trees to be created in the target version, with the only restriction being "
76
76
"that migrating to an older version of the interpreter will not support more "
77
77
"recent language constructs. The parse trees are not typically compatible "
78
- "from one version to another, whereas source code has always been forward-"
79
- "compatible."
78
+ "from one version to another, though source code has usually been forward-"
79
+ "compatible within a major release series ."
80
80
msgstr ""
81
- "もっとも重要なことは、内部パーサが処理する Python "
82
- "の文法についてよく理解しておく必要があるということです。言語の文法に関する完全な情報については、 :ref:`reference-index` "
83
- "を参照してください。標準の Python ディストリビューションに含まれるファイル :file:`Grammar/Grammar` "
84
- "の中で定義されている文法仕様から、パーサ自身は作成されています。このモジュールが作成する ST オブジェクトの中に格納される解析木は、下で説明する "
85
- ":func:`expr` または :func:`suite` 関数によって作られるときに内部パーサから実際に出力されるものです。 "
86
- ":func:`sequence2st` が作る ST オブジェクトは忠実にこれらの構造をシミュレートしています。言語の形式文法が改訂されるために、 "
87
- "\" 正しい\" と考えられるシーケンスの値が Python のあるバージョンから別のバージョンで変化することがあるということに注意してください。しかし、"
88
- " Python "
89
- "のあるバージョンから別のバージョンへテキストのソースのままコードを移せば、目的のバージョンで正しい解析木を常に作成できます。ただし、インタープリタの古いバージョンへ移行する際に、最近の言語コンストラクトをサポートしていないことがあるという制限だけがあります。ソースコードが常に前方互換性があるのに対して、一般的に解析木はあるバージョンから別のバージョンへの互換性がありません。"
90
-
91
- #: ../../library/parser.rst:56
81
+
82
+ #: ../../library/parser.rst:57
92
83
msgid ""
93
84
"Each element of the sequences returned by :func:`st2list` or "
94
85
":func:`st2tuple` has a simple form. Sequences representing non-terminal "
@@ -121,7 +112,7 @@ msgstr ""
121
112
"トークンに対応する数値です。行番号情報が必要なときに返される別の形式では、同じトークンが ``(1, 'if', 12)`` "
122
113
"のように表されます。ここでは、 ``12`` が終端記号の見つかった行番号を表しています。"
123
114
124
- #: ../../library/parser.rst:73
115
+ #: ../../library/parser.rst:74
125
116
msgid ""
126
117
"Terminal elements are represented in much the same way, but without any "
127
118
"child elements and the addition of the source text which was identified. "
@@ -133,7 +124,7 @@ msgstr ""
133
124
"キーワードの例が代表的なものです。終端記号のいろいろな型は、 C ヘッダファイル :file:`Include/token.h` と Python "
134
125
"モジュール :mod:`token` で定義されています。"
135
126
136
- #: ../../library/parser.rst:79
127
+ #: ../../library/parser.rst:80
137
128
msgid ""
138
129
"The ST objects are not required to support the functionality of this module,"
139
130
" but are provided for three purposes: to allow an application to amortize "
@@ -148,7 +139,7 @@ msgstr ""
148
139
"のリストやタプル表現に比べてメモリ空間を保全する解析木表現を提供するため、解析木を操作する追加モジュールを C で作ることを簡単にするため。ST "
149
140
"オブジェクトを使っていることを隠すために、簡単な \" ラッパー\" クラスを Python で作ることができます。"
150
141
151
- #: ../../library/parser.rst:87
142
+ #: ../../library/parser.rst:88
152
143
msgid ""
153
144
"The :mod:`parser` module defines functions for a few distinct purposes. The"
154
145
" most important purposes are to create ST objects and to convert ST objects "
@@ -160,29 +151,29 @@ msgstr ""
160
151
"オブジェクトを解析木とコンパイルされたコードオブジェクトのような他の表現に変換することです。しかし、 ST "
161
152
"オブジェクトで表現された解析木の型を調べるために役に立つ関数もあります。"
162
153
163
- #: ../../library/parser.rst:97
154
+ #: ../../library/parser.rst:98
164
155
msgid "Module :mod:`symbol`"
165
156
msgstr ":mod:`symbol` モジュール"
166
157
167
- #: ../../library/parser.rst:97
158
+ #: ../../library/parser.rst:98
168
159
msgid "Useful constants representing internal nodes of the parse tree."
169
160
msgstr "解析木の内部ノードを表す便利な定数。"
170
161
171
- #: ../../library/parser.rst:100
162
+ #: ../../library/parser.rst:101
172
163
msgid "Module :mod:`token`"
173
164
msgstr ":mod:`token` モジュール"
174
165
175
- #: ../../library/parser.rst:100
166
+ #: ../../library/parser.rst:101
176
167
msgid ""
177
168
"Useful constants representing leaf nodes of the parse tree and functions for"
178
169
" testing node values."
179
170
msgstr "便利な解析木の葉のノードを表す定数とノード値をテストするための関数。"
180
171
181
- #: ../../library/parser.rst:107
172
+ #: ../../library/parser.rst:108
182
173
msgid "Creating ST Objects"
183
174
msgstr "ST オブジェクトを作成する"
184
175
185
- #: ../../library/parser.rst:109
176
+ #: ../../library/parser.rst:110
186
177
msgid ""
187
178
"ST objects may be created from source code or from a parse tree. When "
188
179
"creating an ST object from source, different functions are used to create "
@@ -191,7 +182,7 @@ msgstr ""
191
182
"ST オブジェクトはソースコードあるいは解析木から作られます。ST オブジェクトをソースから作るときは、``'eval'`` と ``'exec'`` "
192
183
"形式を作成するために別々の関数が使われます。"
193
184
194
- #: ../../library/parser.rst:116
185
+ #: ../../library/parser.rst:117
195
186
msgid ""
196
187
"The :func:`expr` function parses the parameter *source* as if it were an "
197
188
"input to ``compile(source, 'file.py', 'eval')``. If the parse succeeds, an "
@@ -202,7 +193,7 @@ msgstr ""
202
193
"関数はパラメータ *source* を構文解析します。解析が成功した場合は、 ST "
203
194
"オブジェクトは内部解析木表現を保持するために作成されます。そうでなければ、適切な例外を発生させます。"
204
195
205
- #: ../../library/parser.rst:124
196
+ #: ../../library/parser.rst:125
206
197
msgid ""
207
198
"The :func:`suite` function parses the parameter *source* as if it were an "
208
199
"input to ``compile(source, 'file.py', 'exec')``. If the parse succeeds, an "
@@ -213,7 +204,7 @@ msgstr ""
213
204
"関数はパラメータ *source* を構文解析します。解析が成功した場合は、 ST "
214
205
"オブジェクトは内部解析木表現を保持するために作成されます。そうでなければ、適切な例外を発生させます。"
215
206
216
- #: ../../library/parser.rst:132
207
+ #: ../../library/parser.rst:133
217
208
msgid ""
218
209
"This function accepts a parse tree represented as a sequence and builds an "
219
210
"internal representation if possible. If it can validate that the tree "
@@ -239,7 +230,7 @@ msgstr ""
239
230
"を解析した結果のようなコンストラクトが原因であるかもしれません。このようなコンストラクトは Python "
240
231
"のパーサを逃れますが、バイトコードインタープリタによってチェックされます。"
241
232
242
- #: ../../library/parser.rst:145
233
+ #: ../../library/parser.rst:146
243
234
msgid ""
244
235
"Sequences representing terminal tokens may be represented as either two-"
245
236
"element lists of the form ``(1, 'name')`` or as three-element lists of the "
@@ -250,17 +241,17 @@ msgstr ""
250
241
"終端トークンを表すシーケンスは、``(1, 'name')`` 形式の二つの要素のリストか、または ``(1, 'name', 56)`` "
251
242
"形式の三つの要素のリストです。三番目の要素が存在する場合は、有効な行番号だとみなされます。行番号が指定されるのは、入力木の終端記号の一部に対してです。"
252
243
253
- #: ../../library/parser.rst:154
244
+ #: ../../library/parser.rst:155
254
245
msgid ""
255
246
"This is the same function as :func:`sequence2st`. This entry point is "
256
247
"maintained for backward compatibility."
257
248
msgstr "これは :func:`sequence2st` と同じ関数です。このエントリポイントは後方互換性のために維持されています。"
258
249
259
- #: ../../library/parser.rst:161
250
+ #: ../../library/parser.rst:162
260
251
msgid "Converting ST Objects"
261
252
msgstr "ST オブジェクトを変換する"
262
253
263
- #: ../../library/parser.rst:163
254
+ #: ../../library/parser.rst:164
264
255
msgid ""
265
256
"ST objects, regardless of the input used to create them, may be converted to"
266
257
" parse trees represented as list- or tuple- trees, or may be compiled into "
@@ -270,7 +261,7 @@ msgstr ""
270
261
"作成するために使われた入力に関係なく、ST "
271
262
"オブジェクトはリスト木またはタプル木として表される解析木へ変換されるか、または実行可能なオブジェクトへコンパイルされます。解析木は行番号情報を持って、あるいは持たずに抽出されます。"
272
263
273
- #: ../../library/parser.rst:171
264
+ #: ../../library/parser.rst:172
274
265
msgid ""
275
266
"This function accepts an ST object from the caller in *st* and returns a "
276
267
"Python list representing the equivalent parse tree. The resulting list "
@@ -287,7 +278,7 @@ msgstr ""
287
278
" :func:`st2tuple` "
288
279
"を代わりに使うべきです。リスト表現が必要とされるとき、この関数はタプル表現を取り出して入れ子のリストに変換するよりかなり高速です。"
289
280
290
- #: ../../library/parser.rst:181
281
+ #: ../../library/parser.rst:182
291
282
msgid ""
292
283
"If *line_info* is true, line number information will be included for all "
293
284
"terminal tokens as a third element of the list representing the token. Note"
@@ -297,7 +288,7 @@ msgstr ""
297
288
"*line_info* が真ならば、トークンを表すリストの三番目の要素として行番号情報がすべての終端トークンに含まれます。与えられた行番号はトークン "
298
289
"*が終わる* 行を指定していることに注意してください。フラグが偽または省略された場合は、この情報は省かれます。"
299
290
300
- #: ../../library/parser.rst:189
291
+ #: ../../library/parser.rst:190
301
292
msgid ""
302
293
"This function accepts an ST object from the caller in *st* and returns a "
303
294
"Python tuple representing the equivalent parse tree. Other than returning a"
@@ -306,7 +297,7 @@ msgstr ""
306
297
"この関数は呼び出し側から *st* に ST オブジェクトを受け取り、解析木と等価な Python "
307
298
"のタプルを返します。リストの代わりにタプルを返す以外は、この関数は :func:`st2list` と同じです。"
308
299
309
- #: ../../library/parser.rst:193
300
+ #: ../../library/parser.rst:194
310
301
msgid ""
311
302
"If *line_info* is true, line number information will be included for all "
312
303
"terminal tokens as a third element of the list representing the token. This"
@@ -315,7 +306,7 @@ msgstr ""
315
306
"*line_info* "
316
307
"が真ならば、トークンを表すリストの三番目の要素として行番号情報がすべての終端トークンに含まれます。フラグが偽または省略された場合は、この情報は省かれます。"
317
308
318
- #: ../../library/parser.rst:204
309
+ #: ../../library/parser.rst:205
319
310
msgid ""
320
311
"The Python byte compiler can be invoked on an ST object to produce code "
321
312
"objects which can be used as part of a call to the built-in :func:`exec` or "
@@ -329,7 +320,7 @@ msgstr ""
329
320
"パラメータで指定されるソースファイル名を使って、 *st* からパーサへ内部解析木を渡します。 *filename* "
330
321
"に与えられるデフォルト値は、ソースが ST オブジェクトだったことを示唆しています。"
331
322
332
- #: ../../library/parser.rst:211
323
+ #: ../../library/parser.rst:212
333
324
msgid ""
334
325
"Compiling an ST object may result in exceptions related to compilation; an "
335
326
"example would be a :exc:`SyntaxError` caused by the parse tree for ``del "
@@ -346,11 +337,11 @@ msgstr ""
346
337
"は、実際には Python バイトコンパイラによって通常作り出されます。これが :mod:`parser` "
347
338
"モジュールがこの時点で例外を発生できる理由です。解析木のインスペクションを行うことで、コンパイルが失敗するほとんどの原因をプログラムによって診断することができます。"
348
339
349
- #: ../../library/parser.rst:224
340
+ #: ../../library/parser.rst:225
350
341
msgid "Queries on ST Objects"
351
342
msgstr "ST オブジェクトに対する問い合わせ"
352
343
353
- #: ../../library/parser.rst:226
344
+ #: ../../library/parser.rst:227
354
345
msgid ""
355
346
"Two functions are provided which allow an application to determine if an ST "
356
347
"was created as an expression or a suite. Neither of these functions can be "
@@ -361,7 +352,7 @@ msgstr ""
361
352
"ST が :func:`expr` または :func:`suite` を通してソースコードから作られたかどうか、あるいは、 "
362
353
":func:`sequence2st` を通して解析木から作られたかどうかを決定できません。"
363
354
364
- #: ../../library/parser.rst:236
355
+ #: ../../library/parser.rst:237
365
356
msgid ""
366
357
"When *st* represents an ``'eval'`` form, this function returns true, "
367
358
"otherwise it returns false. This is useful, since code objects normally "
@@ -375,7 +366,7 @@ msgstr ""
375
366
" :func:`compilest` によって作成されたコードオブジェクトに問い合わせることはできませんし、そのコードオブジェクトは組み込み "
376
367
":func:`compile` 関数によって作成されたコードオブジェクトと同じであることに注意してください。"
377
368
378
- #: ../../library/parser.rst:245
369
+ #: ../../library/parser.rst:246
379
370
msgid ""
380
371
"This function mirrors :func:`isexpr` in that it reports whether an ST object"
381
372
" represents an ``'exec'`` form, commonly known as a \" suite.\" It is not "
@@ -386,11 +377,11 @@ msgstr ""
386
377
":func:`isexpr` に酷似しています。追加の構文が将来サポートされるかもしれないので、この関数が ``not isexpr(st)`` "
387
378
"と等価であるとみなすのは安全ではありません。"
388
379
389
- #: ../../library/parser.rst:254
380
+ #: ../../library/parser.rst:255
390
381
msgid "Exceptions and Error Handling"
391
382
msgstr "例外とエラー処理"
392
383
393
- #: ../../library/parser.rst:256
384
+ #: ../../library/parser.rst:257
394
385
msgid ""
395
386
"The parser module defines a single exception, but may also pass other built-"
396
387
"in exceptions from other portions of the Python runtime environment. See "
@@ -399,7 +390,7 @@ msgstr ""
399
390
"parser モジュールは例外を一つ定義していますが、Python "
400
391
"ランタイム環境の他の部分が提供する別の組み込み例外を発生させることもあります。各関数が発生させる例外の情報については、それぞれ関数を参照してください。"
401
392
402
- #: ../../library/parser.rst:263
393
+ #: ../../library/parser.rst:264
403
394
msgid ""
404
395
"Exception raised when a failure occurs within the parser module. This is "
405
396
"generally produced for validation failures rather than the built-in "
@@ -417,7 +408,7 @@ msgstr ""
417
408
"へ渡される解析木の中の障害を引き起こすシーケンスを含むタプルと説明用の文字列である場合があります。モジュール内の他の関数の呼び出しは単純な文字列値を検出すればよいだけですが、"
418
409
" :func:`sequence2st` の呼び出しはどちらの例外の型も処理できる必要があります。"
419
410
420
- #: ../../library/parser.rst:272
411
+ #: ../../library/parser.rst:273
421
412
msgid ""
422
413
"Note that the functions :func:`compilest`, :func:`expr`, and :func:`suite` "
423
414
"may raise exceptions which are normally raised by the parsing and "
@@ -432,53 +423,53 @@ msgstr ""
432
423
":exc:`OverflowError` 、 :exc:`SyntaxError` および :exc:`SystemError` "
433
424
"が含まれます。こうした場合には、これらの例外が通常その例外に関係する全ての意味を伝えます。詳細については、各関数の説明を参照してください。"
434
425
435
- #: ../../library/parser.rst:283
426
+ #: ../../library/parser.rst:284
436
427
msgid "ST Objects"
437
428
msgstr "ST オブジェクト"
438
429
439
- #: ../../library/parser.rst:285
430
+ #: ../../library/parser.rst:286
440
431
msgid ""
441
432
"Ordered and equality comparisons are supported between ST objects. Pickling "
442
433
"of ST objects (using the :mod:`pickle` module) is also supported."
443
434
msgstr ""
444
435
"ST オブジェクト間の順序と等値性の比較がサポートされています。 (:mod:`pickle` モジュールを使った) ST "
445
436
"オブジェクトのピクルス化もサポートされています。"
446
437
447
- #: ../../library/parser.rst:291
438
+ #: ../../library/parser.rst:292
448
439
msgid ""
449
440
"The type of the objects returned by :func:`expr`, :func:`suite` and "
450
441
":func:`sequence2st`."
451
442
msgstr ":func:`expr` 、 :func:`suite` と :func:`sequence2st` が返すオブジェクトの型。"
452
443
453
- #: ../../library/parser.rst:294
444
+ #: ../../library/parser.rst:295
454
445
msgid "ST objects have the following methods:"
455
446
msgstr "ST オブジェクトは次のメソッドを持っています:"
456
447
457
- #: ../../library/parser.rst:299
448
+ #: ../../library/parser.rst:300
458
449
msgid "Same as ``compilest(st, filename)``."
459
450
msgstr "``compilest(st, filename)`` と同じ。"
460
451
461
- #: ../../library/parser.rst:304
452
+ #: ../../library/parser.rst:305
462
453
msgid "Same as ``isexpr(st)``."
463
454
msgstr "``isexpr(st)`` と同じ。"
464
455
465
- #: ../../library/parser.rst:309
456
+ #: ../../library/parser.rst:310
466
457
msgid "Same as ``issuite(st)``."
467
458
msgstr "``issuite(st)`` と同じ。"
468
459
469
- #: ../../library/parser.rst:314
460
+ #: ../../library/parser.rst:315
470
461
msgid "Same as ``st2list(st, line_info, col_info)``."
471
462
msgstr "``st2list(st, line_info, col_info)`` と同じ。"
472
463
473
- #: ../../library/parser.rst:319
464
+ #: ../../library/parser.rst:320
474
465
msgid "Same as ``st2tuple(st, line_info, col_info)``."
475
466
msgstr "``st2tuple(st, line_info, col_info)`` と同じ。"
476
467
477
- #: ../../library/parser.rst:323
468
+ #: ../../library/parser.rst:324
478
469
msgid "Example: Emulation of :func:`compile`"
479
470
msgstr "例: :func:`compile` のエミュレーション"
480
471
481
- #: ../../library/parser.rst:325
472
+ #: ../../library/parser.rst:326
482
473
msgid ""
483
474
"While many useful operations may take place between parsing and bytecode "
484
475
"generation, the simplest operation is to do nothing. For this purpose, "
@@ -488,15 +479,15 @@ msgstr ""
488
479
"たくさんの有用な演算を構文解析とバイトコード生成の間に行うことができますが、もっとも単純な演算は何もしないことです。このため、 "
489
480
":mod:`parser` モジュールを使って中間データ構造を作ることは次のコードと等価です ::"
490
481
491
- #: ../../library/parser.rst:335
482
+ #: ../../library/parser.rst:336
492
483
msgid ""
493
484
"The equivalent operation using the :mod:`parser` module is somewhat longer, "
494
485
"and allows the intermediate internal parse tree to be retained as an ST "
495
486
"object::"
496
487
msgstr ""
497
488
":mod:`parser` モジュールを使った等価な演算はやや長くなりますが、 ST オブジェクトとして中間内部解析木が維持されるようにします::"
498
489
499
- #: ../../library/parser.rst:345
490
+ #: ../../library/parser.rst:346
500
491
msgid ""
501
492
"An application which needs both ST and code objects can package this code "
502
493
"into readily available functions::"
0 commit comments