From b7458b962408e44b47abe70a46f254f9b72a3098 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=BE=E6=B5=A6=20=E7=9F=A5=E4=B9=9F=20Matsuura=20Tomoy?= =?UTF-8?q?a?= Date: Wed, 17 Sep 2025 10:36:49 +0900 Subject: [PATCH] [obsidian] vault backup: 2025-09-17 10:36:49[ --- content/JavaScript.md | 4 ++++ content/Lady Deirdre.md | 10 ++++++++++ content/Tree-Sitter.md | 29 +++++++++++++++++++++++++++++ content/パーサジェネレータ.md | 4 ++++ 4 files changed, 47 insertions(+) create mode 100644 content/JavaScript.md create mode 100644 content/Lady Deirdre.md create mode 100644 content/Tree-Sitter.md create mode 100644 content/パーサジェネレータ.md diff --git a/content/JavaScript.md b/content/JavaScript.md new file mode 100644 index 00000000..ced32096 --- /dev/null +++ b/content/JavaScript.md @@ -0,0 +1,4 @@ +--- +date: 2025-09-17 09:55 +--- +#stub diff --git a/content/Lady Deirdre.md b/content/Lady Deirdre.md new file mode 100644 index 00000000..8f97acb4 --- /dev/null +++ b/content/Lady Deirdre.md @@ -0,0 +1,10 @@ +--- +date: 2025-09-17 09:51 +--- +#programming + +インクリメンタル、並列対応の[[パーサジェネレータ]]。[[Rust]]のマクロで型安全に文法の定義をできる。 + +[Introduction - The Lady Deirdre Guide](https://lady-deirdre.lakhin.com/) + +ただ、オープンソースだがプロプライエタリなライセンス \ No newline at end of file diff --git a/content/Tree-Sitter.md b/content/Tree-Sitter.md new file mode 100644 index 00000000..c64fb259 --- /dev/null +++ b/content/Tree-Sitter.md @@ -0,0 +1,29 @@ +--- +date: 2025-09-17 09:53 +--- +#programming-language + +[Introduction - Tree-sitter](https://tree-sitter.github.io/tree-sitter/) + +モダンな[[パーサジェネレータ]]。 + +[[Rust]]で実装されているが、Cライブラリを経由して様々な言語のバインディングが用意されている。 + +ただ、言語の文法定義は[[JavaScript]]で行うなどちょっと複雑な作りをしている。 + +インクリメンタルな構文解析に対応していることが特徴。 + +--- + +### 実際に使おうとしてみての感想 + +カスタムの構文解析エラーメッセージの定義とかが難しい。これは長年問題になっているみたい + +[Helpful parser error messages · Issue #255 · tree-sitter/tree-sitter · GitHub](https://github.com/tree-sitter/tree-sitter/issues/255) + +--- + +Rustのバインディングの問題。 + +`kind_id`など多くのAPIがu16でのIDを返す + diff --git a/content/パーサジェネレータ.md b/content/パーサジェネレータ.md new file mode 100644 index 00000000..ced32096 --- /dev/null +++ b/content/パーサジェネレータ.md @@ -0,0 +1,4 @@ +--- +date: 2025-09-17 09:55 +--- +#stub