<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>ganmacs</author_name>
  <author_url>https://blog.hatena.ne.jp/ganmacs/</author_url>
  <blog_title>memo-mode</blog_title>
  <blog_url>https://ganmacs.hatenablog.com/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>あたらしく研究室に入って(2度目)スクリプト言語の作り方って本が課題なのでやっていまして、そのときlexer作るんですが while (token = lexer.read) != EOF ... end 的な書き方してて嫌な気持ちになったので他にまともな書き方がないか調べました． どうしたいか while とかの中で代入はすきじゃないのでしたくない eachみたいにつかえる けど，任意の位置でreadできるようにしたい しかしメモリ使用量を抑えたいので一気に配列に突っ込むとかはしたくない つまり下みたいにはしたくない # ファイルひらいて一気に配列に突っ込む file = open(file…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fganmacs.hatenablog.com%2Fentry%2F2015%2F04%2F19%2F114259&quot; title=&quot;while (token = lexer.read) != EOFをEnumeratorをつかってどうにかしたい - memo-mode&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>http://ecx.images-amazon.com/images/I/510YcnlCQ7L.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2015-04-19 11:42:59</published>
  <title>while (token = lexer.read) != EOFをEnumeratorをつかってどうにかしたい</title>
  <type>rich</type>
  <url>https://ganmacs.hatenablog.com/entry/2015/04/19/114259</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
