1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

RustでパーサージェネレーターParolを使い始める

Last updated at Posted at 2025-08-14

Parolって?

READMEを読んでください

GitHubリポジトリ

ドキュメント

インストール

これに従う
https://jsinger67.github.io/GettingStarted.html

cargo install parol
$ parol -V
parol 4.0.1

プロジェクトを作る

parol new --bin --path ./my_grammar
cd ./my_grammar
cargo build

失敗します。

修正する

この記事を書いた理由です。

cargo.toml が下のようになっています。

[dependencies]
anyhow = "1.0"
env_logger = "0.11"
parol_runtime = "3.0"
thiserror = "2.0"

[build-dependencies]
parol = "4.0.1"

依存関係が間違っているのでしょうか?
下を実行すると解決します。

cargo add parol_runtime@4.0
cargo add scnr2

追記(2025-09-02)

cargo 1.87.0 だと駄目でした。これが関わっていそうなので 1.88.0 以降にしましょう

文法を設定しよう

サンプルがあるので参考にするといいです

Rustでレッツ自作言語ライフ!

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?