Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Goのパーサ作ってvscode拡張作ってみた!
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
ほりしょー
July 31, 2023
Technology
220
0
Share
Goのパーサ作ってvscode拡張作ってみた!
「めぐろLT#5」にて発表
https://meguro-lt.connpass.com/event/288483/
ほりしょー
July 31, 2023
More Decks by ほりしょー
See All by ほりしょー
開発プロセスを継続的に改善する仕組み作り ~ 強いスクラムをいかに維持するか ~
h0r15h0
0
130
ドメインイベント増えすぎ問題
h0r15h0
2
860
LLM(Copilot)を最大限活用するための取り組みとその副産物
h0r15h0
1
210
現実世界の事象から学ぶSOLID原則
h0r15h0
30
22k
集団意思決定の落とし穴と誰も望まない技術的負債
h0r15h0
1
5.2k
デザインパターンを学んだら世界が広がった話
h0r15h0
2
420
Other Decks in Technology
See All in Technology
AIが自律的に働く時代へ Amazon Quick で実現するAIエージェント紹介
koheiyoshikawa
0
160
The 7 pitfalls of AI
ufried
0
120
Agents CLI と Gemini Enterprise Agent Platform で マルチエージェント開発が楽しくなる!
kaz1437
0
190
小説執筆のハーネスエンジニアリング
yoshitetsu
0
880
VespaのParent Childを用いたフィードパフォーマンスの改善
taking
0
170
基盤を育てる 外部SaaS連携の運用
gamonges_dresscode
1
130
独断と偏見で試してみる、 シングル or マルチエージェント どっちがいいの?
shichijoyuhi
1
220
GitHub Copilot CLI と VS Code Agent Mode の使い分け
tomokusaba
0
110
[Oracle TechNight#99] 生成AI時代のAI/ML入門 ~ AIとオラクルデータベースの関係 (後半)
oracle4engineer
PRO
1
150
要件定義の精度を高めるための型と生成AIの活用 / Using Types and Generative AI to Improve the Accuracy of Requirements Definition
haru860
0
230
Shipping AI Agents — Lessons from Production
vvatanabe
0
300
AIはハッカーを減らすのか、増やすのか?──現役ホワイトハッカーから見るAI時代のリアル【MEGU-Meet】
cscengineer
PRO
0
240
Featured
See All Featured
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
280
Music & Morning Musume
bryan
47
7.2k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.2k
Art, The Web, and Tiny UX
lynnandtonic
304
21k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
180
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.9k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.2k
sira's awesome portfolio website redesign presentation
elsirapls
0
230
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
380
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
490
Transcript
ほりしょー Go のパーサを作って VSCode 拡張作ってみた!
ほりしょー(堀崎祥) ラクスル23 新卒入社 ハコベル所属 サーバーサイドエンジニア Go / Ruby / DDD
自己紹介
なに作ったの?
Go Getter Setter Go のstruct からGetter, Setter を自動生成 してくれるVSCode 拡張
VSCode Marketplace GitHub
なぜ作ったのか? 既存拡張では 自動入力できない 構文が存在 生成コードの テンプレートを 用意したい Go の言語仕様を おさらいしたい
1 2 3
なぜ作ったのか? 入力フォーマット を自由に設定 したい 既存拡張では 自動入力できない 構文が存在 Go の言語仕様を おさらいしたい
1 2 今日は ← → の話 3 独自パーサ 言語仕様
パーサ VSCode 拡張 独自パーサの話 既存拡張は正規表現ベース → 複雑な型(複数行に及ぶ型, struct とか) が存在すると解析できない。
ならば、言語仕様に則った パーサを作ってしまおう パーサジェネレータの Flex, Bison(ts-jison) を使用して パーサを作成 (ts-jison) Flex, Bison パーサ生成
パーサジェネレータ 元はGCC に使用 Ruby, Go などにも使用されていた パーサを作成するためのプログラム 細かい処理を気にせず 構文規則を記述しパーサを作成可能 Flex(
字句解析), Bison( 構文解析) 頑張って構文規則を書いてくのみ! BNF 記法
言語仕様は? Go では言語仕様が公開されている The Go Programming Language Specification EBNF 記法で記述されているため
Bison に移行しやすい。 言語仕様は薄いので頑張って読む!
なぜ作ったのか? 入力フォーマット を自由に設定 したい 既存拡張では 自動入力できない 構文が存在 Go の言語仕様を おさらいしたい
1 2 3 独自パーサ 言語仕様 今日は ← → の話 (VSCode 拡張の話はしません🙇) 構文規則を頑張って書く Go のSpec を漁る
ぜひ使ってみ てください〜 Go Getter Setter VSCode Marketplace GitHub