alex / alex/rply

meaning of "Production 'xxx' is not reachable"?

オープン
#108 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
391
フォーク
62
PR マージ指標
30日以内にマージされた PR はありません

説明

Take the test case for example:

https://github.com/alex/rply/blob/19a9e08c486b2723a2e2378df6edb6a26e2df4a5/tests/test_warnings.py#L83

Below are three cases with changed `unused` production rule:

### case 1 -- No Warning
```python
@pg.production("main : VALUE")
def main(p):
return p[0]

@pg.production("unused : main")
def unused(p):
pass
```

### case 2 -- Show Warning
```python
@pg.production("main : VALUE")
def main(p):
return p[0]

@pg.production("unused : OTHER main")
def unused(p):
pass
```

### case 3 -- No Warning

```python
@pg.production("main : VALUE")
def main(p):
return p[0]

@pg.production("unused : VALUE main")
def unused(p):
pass
```

Now I'm quite puzzled about the meaning of this warning.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。