<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>reinyannyan</author_name>
  <author_url>https://blog.hatena.ne.jp/reinyannyan/</author_url>
  <blog_title>(new Hatena).blog()</blog_title>
  <blog_url>https://reinyannyan.hatenadiary.org/</blog_url>
  <categories>
    <anon>Scheme</anon>
  </categories>
  <description>ここ数日 HTML パーサーの開発に取り組んでいたんですが、その過程で次のような問題にぶつかりました。HTML を構文解析して木構造を作る際に、トークン (字句) を一つずつ返してくれるジェネレータが欲しい、と思ったんです。一般に、言語の解析は字句解析と構文解析の2段階から成りますが (参照: Wikipedia:構文解析) 字句を一つ取り出してその都度構文解析に回したい、と考えたわけです。例えば、 &lt;body&gt; &lt;p&gt;text with &lt;a href=&quot;foo.htm&quot;&gt;anchor&lt;/a&gt; in between&lt;/p&gt; &lt;/body&gt; のような HTML 片があった時に、次のようにして一…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Freinyannyan.hatenadiary.org%2Fentry%2F20080804%2Fp1&quot; title=&quot; 部分継続による Python 風ジェネレータ - (new Hatena).blog()&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2008-08-04 00:00:00</published>
  <title> 部分継続による Python 風ジェネレータ</title>
  <type>rich</type>
  <url>https://reinyannyan.hatenadiary.org/entry/20080804/p1</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
