<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>todays_mitsui</author_name>
  <author_url>https://blog.hatena.ne.jp/todays_mitsui/</author_url>
  <blog_title>無駄と文化</blog_title>
  <blog_url>https://blog.mudatobunka.org/</blog_url>
  <categories>
    <anon>Rust</anon>
  </categories>
  <description>自然数の和と積を表現する構造体を考えよう。 #[derive(Debug, PartialEq)] enum Term { Sum(usize, usize), Prod(usize, usize), } このような素朴な enum を用意する。 数式をパースして Term を得るようなパーザを作りたい。 combine というパーザコンビネータのライブラリがあるのでこれを使う。 docs.rs 自然数のパーザや演算子のパーザは1行で書ける。 自然数は '0' ~ '9' の文字の1回以上の連なりと定義できる。演算子は '+', '*' のいずれかだ。 use combine::parser:…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.mudatobunka.org%2Fentry%2F2025%2F10%2F27%2F100000&quot; title=&quot;combineではParserのタプルもまたParserになる - 無駄と文化&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>2025-10-27 10:00:00</published>
  <title>combineではParserのタプルもまたParserになる</title>
  <type>rich</type>
  <url>https://blog.mudatobunka.org/entry/2025/10/27/100000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
